Home
last modified time | relevance | path

Searched full:file (Results 1 – 25 of 778) sorted by relevance

12345678910>>...32

/picolibc-latest/newlib/libc/stdio/
Dstdio.tex18 @chapter Input and Output (@file{stdio.h})
27 The corresponding declarations are in @file{stdio.h}.
43 * Function clearerr:: Clear file or stream error indicator
44 * Function diprintf:: Print to a file descriptor (integer only)
45 * Function dprintf:: Print to a file descriptor
46 * Function fclose:: Close a file
48 * Function fdopen:: Turn an open file into a stream
49 * Function feof:: Test for end of file
51 * Function fflush:: Flush buffered file output
52 * Function fgetc:: Get a character from a file or stream
[all …]
Dfopen.c20 <<fopen>>---open a file
29 FILE *fopen(const char *<[file]>, const char *<[mode]>);
31 FILE *fopen(
32 const char *<[file]>, const char *<[mode]>);
36 file. Specify the file's name as the string at <[file]>, and the kind
37 of access you need to the file with the string at <[mode]>.
48 Open the file for reading; the operation will fail if the file does
52 Open the file for writing @emph{from the beginning} of the file:
53 effectively, this always creates a new file. If the file whose name you
57 Open the file for appending data, that is writing from the end of
[all …]
Dstdio_ext.h19 void __fpurge (FILE *);
20 int __fsetlocking (FILE *, int);
30 __fbufsize (FILE *__fp) { return (size_t) __fp->_bf._size; } in __fbufsize()
33 __freading (FILE *__fp) { return (__fp->_flags & __SRD) != 0; } in __freading()
36 __fwriting (FILE *__fp) { return (__fp->_flags & __SWR) != 0; } in __fwriting()
39 __freadable (FILE *__fp) { return (__fp->_flags & (__SRD | __SRW)) != 0; } in __freadable()
42 __fwritable (FILE *__fp) { return (__fp->_flags & (__SWR | __SRW)) != 0; } in __fwritable()
45 __flbf (FILE *__fp) { return (__fp->_flags & __SLBF) != 0; } in __flbf()
48 __fpending (FILE *__fp) { return __fp->_p - __fp->_bf._base; } in __fpending()
52 size_t __fbufsize (FILE *);
[all …]
Dfreopen.c20 <<freopen>>---open a file using an existing file descriptor
29 FILE *freopen(const char *restrict <[file]>, const char *restrict <[mode]>,
30 FILE *restrict <[fp]>);
31 FILE *freopen( const char *restrict <[file]>,
32 const char *restrict <[mode]>, FILE *restrict <[fp]>);
35 Use this variant of <<fopen>> if you wish to specify a particular file
37 the file.
39 If <[fp]> was associated with another file or stream, <<freopen>>
40 closes that other file or stream (but ignores any errors while closing
43 <[file]> and <[mode]> are used just as in <<fopen>>.
[all …]
Dstdio.h53 typedef __FILE FILE; typedef
77 * try to write or read from a file that is in `read' or `write' mode.
104 short _flags; /* flags, below; this FILE is free if 0 */
147 short _flags; /* flags, below; this FILE is free if 0 */
248 #define __SL64 0x8000 /* is 64-bit offset large file */
298 #define SEEK_SET 0 /* set file offset to offset */
301 #define SEEK_CUR 1 /* set file offset to current plus offset */
304 #define SEEK_END 2 /* set file offset to EOF plus offset */
335 FILE * tmpfile (void);
341 int fclose (FILE *);
[all …]
Dstdio_ext.c4 …,<<__freadable>>,<<__fwritable>>,<<__freading>>,<<__fwriting>>---access internals of FILE structure
24 size_t __fbufsize(FILE *<[fp]>);
25 size_t __fpending(FILE *<[fp]>);
26 int __flbf(FILE *<[fp]>);
27 int __freadable(FILE *<[fp]>);
28 int __fwritable(FILE *<[fp]>);
29 int __freading(FILE *<[fp]>);
30 int __fwriting(FILE *<[fp]>);
33 These functions provides access to the internals of the FILE structure <[fp]>.
69 __fbufsize (FILE * fp) in __fbufsize()
[all …]
Dfseek.c20 <<fseek>>, <<fseeko>>---set file position
33 int fseek(FILE *<[fp]>, long <[offset]>, int <[whence]>);
34 int fseeko(FILE *<[fp]>, off_t <[offset]>, int <[whence]>);
35 int fseek( FILE *<[fp]>,
37 int fseeko( FILE *<[fp]>,
41 Objects of type <<FILE>> can have a ``position'' that records how much
42 of the file your program has already read. Many of the <<stdio>> functions
45 You can use <<fseek>>/<<fseeko>> to set the position for the file identified by
50 <<SEEK_SET>>---<[offset]> is the absolute file position (an offset
51 from the beginning of the file) desired. <[offset]> must be positive.
[all …]
Dlocal.h37 streams are initialized to use file descriptors 0, 1 and 2 respectively. In
38 case _STDIO_CLOSE_PER_REENT_STD_STREAMS is defined these file descriptors
143 extern wint_t __fgetwc (FILE *);
144 extern wint_t __fputwc (wchar_t, FILE *);
146 extern int _svfscanf (FILE *, const char *,va_list);
147 extern int _ssvfscanf (FILE *, const char *,va_list);
148 extern int _svfiscanf (FILE *, const char *,va_list);
149 extern int _ssvfiscanf (FILE *, const char *,va_list);
150 extern int _svfwscanf (FILE *, const wchar_t *,va_list);
151 extern int _ssvfwscanf (FILE *, const wchar_t *,va_list);
[all …]
Dfputc.c20 <<fputc>>, <<fputc_unlocked>>---write a character on a stream or file
33 int fputc(int <[ch]>, FILE *<[fp]>);
37 int fputc_unlocked(int <[ch]>, FILE *<[fp]>);
40 int fputc( int <[ch]>, FILE *<[fp]>);
43 int fputc_unlocked( int <[ch]>, FILE *<[fp]>);
47 <<unsigned char>>, then writes it to the file or stream identified by
50 If the file was opened with append mode (or if the stream cannot
52 file or stream. Otherwise, the new character is written at the
62 if they are called while the invoking thread owns the (FILE *)
92 FILE * file) in fputc() argument
[all …]
Dftell.c20 <<ftell>>, <<ftello>>---return position in a stream or file
33 long ftell(FILE *<[fp]>);
34 off_t ftello(FILE *<[fp]>);
35 long ftell( FILE *<[fp]>);
36 off_t ftello( FILE *<[fp]>);
39 Objects of type <<FILE>> can have a ``position'' that records how much
40 of the file your program has already read. Many of the <<stdio>> functions
43 The result of <<ftell>>/<<ftello>> is the current position for a file
45 use it with <<fseek>>/<<fseeko>> to return the file to this
50 count to represent the file position; this is the same number that
[all …]
Dtmpfile.c19 <<tmpfile>>---create a temporary file
28 FILE *tmpfile(void);
30 FILE *_tmpfile_r(struct _reent *<[reent]>);
33 Create a temporary file (a file which will be deleted automatically),
34 using a name generated by <<tmpnam>>. The temporary file is opened with
36 as a binary file (without any data transformations the host system may
43 <<tmpfile>> normally returns a pointer to the temporary file. If no
44 temporary file could be created, the result is NULL, and <<errno>>
68 FILE *
71 FILE *fp; in tmpfile()
Dfflush.c20 <<fflush>>, <<fflush_unlocked>>---flush buffered file output
33 int fflush(FILE *<[fp]>);
37 int fflush_unlocked(FILE *<[fp]>);
40 int fflush( FILE *<[fp]>);
44 int fflush_unlocked( FILE *<[fp]>);
50 Use <<fflush>> to deliver any such pending output (for the file
56 Additionally, if <[fp]> is a seekable input stream visiting a file
57 descriptor, set the position of the file descriptor to match next
65 if they are called while the invoking thread owns the (FILE *)
98 /* Flush a single file, or (if fp is NULL) all files. */
[all …]
Dfindfp.c61 std (FILE *ptr, in std()
63 int file) in std() argument
70 ptr->_file = file; in std()
101 stdin_init(FILE *ptr) in stdin_init()
107 stdout_init(FILE *ptr) in stdout_init()
109 /* On platforms that have true file system I/O, we can verify in stdout_init()
123 stderr_init(FILE *ptr) in stderr_init()
138 FILE file[]; member
147 malloc (sizeof (*g) + n * sizeof (FILE)); in sfmoreglue()
152 g->glue._iobs = g->file; in sfmoreglue()
[all …]
/picolibc-latest/newlib/libc/tinystdio/
Dstdio.h103 struct __file file; /* main file struct */ member
104 int (*close)(struct __file *); /* function to close file */
109 .file = FDEV_SETUP_STREAM(put, get, flush, (rwflag) | __SCLOSE), \
114 struct __file_close cfile; /* close file struct */
128 \c FILE is the opaque structure that is passed around between the
137 typedef __FILE FILE; typedef
148 extern FILE *const stdin;
149 extern FILE *const stdout;
150 extern FILE *const stderr;
184 * Return code for an end-of-file condition during device read.
[all …]
Dfdevopen.c34 /** \file */
50 and the second a pointer to FILE, and shall return 0
56 a pointer to FILE as its single argument,
60 If an end-of-file condition was reached while reading from the
68 file. This allows the underlying I/O implementation to perform
83 fdevclose(FILE *f) in fdevclose()
92 FILE *
93 fdevopen(int (*put)(char, FILE *), int (*get)(FILE *), int (*flush)(FILE *)) in fdevopen() argument
103 cf->file.flags = __SCLOSE; in fdevopen()
107 cf->file.get = get; in fdevopen()
[all …]
/picolibc-latest/newlib/libc/stdio64/
Dfreopen64.c20 <<freopen64>>---open a large file using an existing file descriptor
29 FILE *freopen64(const char *<[file]>, const char *<[mode]>,
30 FILE *<[fp]>);
31 FILE *_freopen64_r(struct _reent *<[ptr]>, const char *<[file]>,
32 const char *<[mode]>, FILE *<[fp]>);
35 Use this variant of <<fopen64>> if you wish to specify a particular file
37 the file.
39 If <[fp]> was associated with another file or stream, <<freopen64>>
40 closes that other file or stream (but ignores any errors while closing
43 <[file]> and <[mode]> are used just as in <<fopen>>.
[all …]
Dstdio64.tex18 @chapter Large File Input and Output (@file{stdio.h})
26 The corresponding declarations are in @file{stdio.h}.
29 * Function fdopen64:: Turn open large file into a stream
30 * Function fopen64:: Open a large file
31 * Function freopen64:: Open a large file using an existing file descriptor
32 * Function fsetpos64:: Restore position of a large stream or file
33 * Function fgetpos64:: Get position of a large stream or file
34 * Function ftello64:: Return position in a large stream or file
35 * Function fseeko64:: Set large file position
36 * Function tmpfile64:: Create a temporary large file
Dfopen64.c20 <<fopen64>>---open a large file
29 FILE *fopen64(const char *<[file]>, const char *<[mode]>);
30 FILE *_fopen64_r(void *<[reent]>,
31 const char *<[file]>, const char *<[mode]>);
34 <<fopen64>> is identical to <<fopen>> except it opens a large file that
38 <<fopen64>> return a file pointer which you can use for other file
39 operations, unless the file you requested could not be opened; in that
61 FILE *
63 const char *file, in fopen64() argument
66 register FILE *fp; in fopen64()
[all …]
Dtmpfile64.c19 <<tmpfile64>>---create a large temporary file
28 FILE *tmpfile64(void);
30 FILE *_tmpfile64_r(void *<[reent]>);
33 Create a large temporary file (a file which will be deleted automatically),
34 using a name generated by <<tmpnam>>. The temporary file is opened with
36 as a binary file (without any data transformations the host system may
37 perform for text files). The file may be larger than 2GB.
46 <<tmpfile64>> normally returns a pointer to the temporary file. If no
47 temporary file could be created, the result is NULL, and <<errno>>
72 FILE *
[all …]
/picolibc-latest/test/
Dtest-ungetc-ftell.c47 FILE *file; in main() local
51 file = fopen( TEST_FILE_NAME, "wb" ); in main()
52 if( file == NULL ) return 1; in main()
53 fputs(str, file); in main()
54 fclose(file); in main()
56 file = fopen( TEST_FILE_NAME, "rb" ); in main()
57 if(file == NULL) return 1; in main()
59 first = fgetc(file); in main()
62 start = ftell(file); in main()
65 ungetc(first, file); // Use ungetc to put the character back in main()
[all …]
Dtest-wchar.c45 FILE *file; in main() local
50 file = fopen("testfile.dat", "w"); in main()
51 if (file == NULL) return 1; in main()
53 /* Write wide characters to the file */ in main()
54 fputws(string, file); in main()
55 fclose(file); in main()
58 file = fopen("testfile.dat", "r"); in main()
62 /* Read wide-char by wide-char from the file */ in main()
63 res = fgetwc(file); in main()
65 printf("Test Failed: Failed to read wide character from file\n"); in main()
[all …]
/picolibc-latest/doc/
Dos.md15 complex file operations so that a minimal system can easily support
20 FILE objects. The pointers may reside in read-only memory, but the
21 FILE objects may not. A single FILE object may be used for all three
23 stored in the same location. The FILE object contains function
27 sample_putc(char c, FILE *file)
29 (void) file; /* Not used in this function
35 sample_getc(FILE *file)
38 (void) file; /* Not used in this function */
44 provide, will be called to flush pending output to the file, e.g.,
48 sample_flush(FILE *file)
[all …]
/picolibc-latest/dummyhost/
Diob.c45 dummy_putc(char c, FILE *file) in dummy_putc() argument
48 (void) file; in dummy_putc()
53 dummy_getc(FILE *file) in dummy_getc() argument
55 (void) file; in dummy_getc()
60 dummy_flush(FILE *file) in dummy_flush() argument
62 (void) file; in dummy_flush()
66 static FILE __stdio = FDEV_SETUP_STREAM(dummy_putc, dummy_getc, dummy_flush, _FDEV_SETUP_RW);
71 #define STDIO_ALIAS(x) FILE *const x = &__stdio;
74 FILE *const stdin = &__stdio;
/picolibc-latest/newlib/libc/
Dsys.tex38 definition for @code{errno} in the header file @file{errno.h}, as part
46 them using the @code{errno} macro from @file{errno.h}).
49 interfaces. You must include @file{errno.h}, then disable the macro,
68 Close a file. Minimal implementation:
71 int close(int file) @{
113 Status of an open file. For consistency with other minimal
115 special devices. The @file{sys/stat.h} header file required is
116 distributed in the @file{include} subdirectory for this C library.
120 int fstat(int file, struct stat *st) @{
143 int isatty(int file) @{
[all …]
/picolibc-latest/newlib/libc/iconv/ces/
Dmkdeps.pl52 * This file was automatically generated mkdeps.pl script. Don't edit.
83 # Default input configuration file name
85 # Real input configuration file name
98 print "\t-$infile_opt - input file with configuration ($default_infile ";
99 print "file will be used by default)\n";
104 # Input file name.
112 # Find and fetch sections from input file
116 # Opening input file
117 print "Debug: open \"$infile\" input file.\n" if $verbose;
118 open (INFILE, '<', $infile) or err "Can't open \"$infile\" file for reading.\n"
[all …]

12345678910>>...32