X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/b4e3fab85fcd9f5b1502ec991c81302b910492d3..0f3b947bda5f34662a611272b9f12199e0da9aca:/fatfs/documents/doc/puts.html diff --git a/fatfs/documents/doc/puts.html b/fatfs/documents/doc/puts.html new file mode 100644 index 0000000..92c7e74 --- /dev/null +++ b/fatfs/documents/doc/puts.html @@ -0,0 +1,61 @@ + + + + + + + + +FatFs - f_puts + + + + +
+

f_puts

+

The f_puts function writes a string to the file.

+
+int f_puts (
+  const TCHAR* str, /* [IN] String */
+  FIL* fp           /* [IN] File object */
+);
+
+
+ +
+

Parameters

+
+
str
+
Pointer to the null terminated string to be written. The terminator character will not be written.
+
fp
+
Pointer to the open file object structure.
+
+
+ + +
+

Return Value

+

When the string was written successfuly, it returns number of character encoding units written to the file. When the function failed due to disk full or any error, an EOF (-1) will be returned.

+
+ + +
+

Description

+

When FatFs is configured for Unicode API (FF_LFN_UNICODE >= 1), character encoding on the string fuctions, f_putc, f_puts, f_printf and f_gets function, is also switched to Unicode. The input Unicode characters in multiple encoding unit, such as surrogate pair and multi-byte sequence, should not be divided into two function calls, or the character will be lost. The character encoding on the file to be written via this functions is selected by FF_STRF_ENCODE. The characters with wrong encoding or invalid for the output encoding will be lost.

+
+ + +
+

QuickInfo

+

This is a wrapper function of f_write function. Available when FF_FS_READONLY == 0 and FF_USE_STRFUNC >= 1. When FF_USE_STRFUNC == 2, '\n's contained in the input string are output as '\r'+'\n' each.

+
+ + +
+

See Also

+

f_open, f_putc, f_printf, f_gets, f_close, FIL

+
+ +

Return

+ +