Home
last modified time | relevance | path

Searched refs:_flags (Results 1 – 25 of 73) sorted by relevance

123

/picolibc-3.5.0-3.4.0/newlib/libc/stdio/
Drefill.c29 if ((fp->_flags & (__SLBF | __SWR)) == (__SLBF | __SWR)) in lflush()
52 if (fp->_flags & __SEOF) in _srefill()
56 if ((fp->_flags & __SRD) == 0) in _srefill()
58 if ((fp->_flags & __SRW) == 0) in _srefill()
61 fp->_flags |= __SERR; in _srefill()
65 if (fp->_flags & __SWR) in _srefill()
69 fp->_flags &= ~__SWR; in _srefill()
73 fp->_flags |= __SRD; in _srefill()
102 if (fp->_flags & (__SLBF | __SNBF)) in _srefill()
105 short orig_flags = fp->_flags; in _srefill()
[all …]
Dwsetup.c45 if ((fp->_flags & __SWR) == 0) in _swsetup()
47 if ((fp->_flags & __SRW) == 0) in _swsetup()
50 fp->_flags |= __SERR; in _swsetup()
53 if (fp->_flags & __SRD) in _swsetup()
58 fp->_flags &= ~(__SRD | __SEOF); in _swsetup()
62 fp->_flags |= __SWR; in _swsetup()
71 && (!(fp->_flags & __SSTR) || (fp->_flags & __SMBF))) in _swsetup()
74 if (fp->_flags & __SLBF) in _swsetup()
85 fp->_w = fp->_flags & __SNBF ? 0 : fp->_bf._size; in _swsetup()
87 if (!fp->_bf._base && (fp->_flags & __SMBF)) in _swsetup()
[all …]
Dstdio_ext.h37 __freading (FILE *__fp) { return (__fp->_flags & __SRD) != 0; } in __freading()
40 __fwriting (FILE *__fp) { return (__fp->_flags & __SWR) != 0; } in __fwriting()
43 __freadable (FILE *__fp) { return (__fp->_flags & (__SRD | __SRW)) != 0; } in __freadable()
46 __fwritable (FILE *__fp) { return (__fp->_flags & (__SWR | __SRW)) != 0; } in __fwritable()
49 __flbf (FILE *__fp) { return (__fp->_flags & __SLBF) != 0; } in __flbf()
67 #define __freading(__fp) (((__fp)->_flags & __SRD) != 0)
68 #define __fwriting(__fp) (((__fp)->_flags & __SWR) != 0)
69 #define __freadable(__fp) (((__fp)->_flags & (__SRD | __SRW)) != 0)
70 #define __fwritable(__fp) (((__fp)->_flags & (__SWR | __SRW)) != 0)
71 #define __flbf(__fp) (((__fp)->_flags & __SLBF) != 0)
Dfflush.c112 flags = fp->_flags; in _sflush()
119 fp->_flags |= __SNPT; in _sflush()
144 if (fp->_flags & __SOFF) in _sflush()
151 if (fp->_flags & __SL64) in _sflush()
165 fp->_flags |= __SERR; in _sflush()
169 if (fp->_flags & __SRD) in _sflush()
179 if (fp->_flags & __SL64) in _sflush()
190 fp->_flags &= ~__SNPT; in _sflush()
194 if ((fp->_flags & __SOFF) && (curoff != -1 || _REENT_ERRNO(ptr) == 0)) in _sflush()
202 fp->_flags |= __SERR; in _sflush()
[all …]
Dmakebuf.c47 if (fp->_flags & __SNBF) in _smakebuf()
56 if (!(fp->_flags & __SSTR)) in _smakebuf()
58 fp->_flags = (fp->_flags & ~__SLBF) | __SNBF; in _smakebuf()
65 fp->_flags |= __SMBF; in _smakebuf()
69 fp->_flags = (fp->_flags & ~__SNBF) | __SLBF; in _smakebuf()
70 fp->_flags |= flags; in _smakebuf()
101 if (fp->_flags & __SMBF) in _swhatbuf()
Dsetvbuf.c124 if (fp->_flags & __SMBF) in setvbuf()
126 fp->_flags &= ~(__SLBF | __SNBF | __SMBF | __SOPT | __SNPT | __SEOF); in setvbuf()
136 fp->_flags |= _swhatbuf ( fp, &iosize, &ttyflag); in setvbuf()
163 fp->_flags |= __SNBF; in setvbuf()
170 fp->_flags |= __SMBF; in setvbuf()
188 fp->_flags |= __SNPT; in setvbuf()
196 fp->_flags |= __SLBF; in setvbuf()
200 if (fp->_flags & __SWR) in setvbuf()
206 if (fp->_flags & __SLBF) in setvbuf()
Dfseeko.c123 if (fp->_flags & __SAPP && fp->_flags & __SWR) in fseeko()
152 if (fp->_flags & __SOFF) in fseeko()
163 if (fp->_flags & __SRD) in fseeko()
169 else if (fp->_flags & __SWR && fp->_p != NULL) in fseeko()
203 if (fp->_flags & (__SWR | __SRW | __SNBF | __SNPT)) in fseeko()
205 if ((fp->_flags & __SOPT) == 0) in fseeko()
216 fp->_flags |= __SNPT; in fseeko()
224 fp->_flags |= __SOPT; in fseeko()
247 if (fp->_flags & __SOFF) in fseeko()
295 fp->_flags &= ~__SEOF; in fseeko()
[all …]
Dstdio_ext.c81 return (fp->_flags & __SLBF) != 0; in __flbf()
87 return (fp->_flags & (__SRD | __SRW)) != 0; in __freadable()
93 return (fp->_flags & (__SWR | __SRW)) != 0; in __fwritable()
99 return (fp->_flags & __SRD) != 0; in __freading()
105 return (fp->_flags & __SWR) != 0; in __fwriting()
Dftello.c105 if (!(fp->_flags & __SRD) && (fp->_flags & __SWR) && in ftello()
107 (fp->_flags & __SAPP)) in ftello()
116 else if (fp->_flags & __SOFF) in ftello()
127 if (fp->_flags & __SRD) in ftello()
138 else if ((fp->_flags & __SWR) && fp->_p != NULL) in ftello()
Dstdio.c43 if (fp->_flags & __SCLE) in __sread()
59 fp->_flags &= ~__SOFF; /* paranoia */ in __sread()
88 if (fp->_flags & __SAPP) in __swrite()
90 fp->_flags &= ~__SOFF; /* in case O_APPEND mode is set */ in __swrite()
93 if (fp->_flags & __SCLE) in __swrite()
118 fp->_flags &= ~__SOFF; in __sseek()
121 fp->_flags |= __SOFF; in __sseek()
Dfreopen.c118 if (fp->_flags == 0) in freopen()
119 fp->_flags = __SEOF; /* hold on to it */ in freopen()
122 if (fp->_flags & __SWR) in freopen()
186 if (fp->_flags & __SMBF) in freopen()
200 fp->_flags &= ~__SORD; in freopen()
207 fp->_flags = 0; /* set it free */ in freopen()
221 fp->_flags = flags; in freopen()
231 fp->_flags |= __SCLE; in freopen()
Dfvwrite.c71 if (fp->_flags & __SCLE) /* text mode */ in _sfvwrite()
90 if (fp->_flags & __SNBF) in _sfvwrite()
108 else if ((fp->_flags & __SLBF) == 0) in _sfvwrite()
127 if (fp->_flags & __SSTR) in _sfvwrite()
129 if (len >= (size_t) w && fp->_flags & (__SMBF | __SOPT)) in _sfvwrite()
143 if (fp->_flags & __SOPT) in _sfvwrite()
153 fp->_flags = (fp->_flags & ~__SOPT) | __SMBF; in _sfvwrite()
164 fp->_flags &= ~__SMBF; in _sfvwrite()
264 fp->_flags |= __SERR; in _sfvwrite()
Dfopen.c133 fp->_flags = 0; /* release */ in fopen()
144 fp->_flags = flags; in fopen()
151 if (fp->_flags & __SAPP) in fopen()
156 fp->_flags |= __SCLE; in fopen()
Dfclose.c78 if (fp->_flags == 0) /* not open! */ in fclose()
89 r = (fp->_flags & __SWR) ? _sflush ( fp) : 0; in fclose()
98 if (fp->_flags & __SMBF) in fclose()
105 fp->_flags = 0; /* release this FILE for reuse */ in fclose()
Dungetc.c131 fp->_flags &= ~__SEOF; in ungetc()
133 if ((fp->_flags & __SRD) == 0) in ungetc()
139 if ((fp->_flags & __SRW) == 0) in ungetc()
144 if (fp->_flags & __SWR) in ungetc()
151 fp->_flags &= ~__SWR; in ungetc()
155 fp->_flags |= __SRD; in ungetc()
Dnano-vfprintf.c182 if (len >= w && fp->_flags & (__SMBF | __SOPT)) in _ssputs()
197 if (fp->_flags & __SOPT) in _ssputs()
207 fp->_flags = (fp->_flags & ~__SOPT) | __SMBF; in _ssputs()
236 fp->_flags |= __SERR; in _ssputs()
271 if (len >= w && fp->_flags & (__SMBF | __SOPT)) in _ssprint()
287 if (fp->_flags & __SOPT) in _ssprint()
297 fp->_flags = (fp->_flags & ~__SOPT) | __SMBF; in _ssprint()
336 fp->_flags |= __SERR; in _ssprint()
481 if (fp->_flags & __SMBF && !fp->_bf._base) in VFPRINTF()
Dfwalk.c46 if (fp->_flags != 0 && fp->_flags != 1 && fp->_file != -1) in _fwalk_sglue()
Dfunopen.c214 fp->_flags = 0; /* release */ in funopen()
232 fp->_flags = __SRW; in funopen()
238 fp->_flags = __SRD; in funopen()
245 fp->_flags = __SWR; in funopen()
255 fp->_flags |= __SL64; in funopen()
/picolibc-3.5.0-3.4.0/newlib/libc/stdio64/
Dftello64.c85 if (!(fp->_flags & __SL64)) in ftello64()
102 if (!(fp->_flags & __SRD) && (fp->_flags & __SWR) && in ftello64()
104 (fp->_flags & __SAPP)) in ftello64()
113 else if (fp->_flags & __SOFF) in ftello64()
124 if (fp->_flags & __SRD) in ftello64()
135 else if (fp->_flags & __SWR && fp->_p != NULL) in ftello64()
Dfseeko64.c104 if (!(fp->_flags & __SL64)) in fseeko64()
125 if (fp->_flags & __SAPP && fp->_flags & __SWR) in fseeko64()
154 if (fp->_flags & __SOFF) in fseeko64()
165 if (fp->_flags & __SRD) in fseeko64()
171 else if (fp->_flags & __SWR && fp->_p != NULL) in fseeko64()
204 if (fp->_flags & (__SWR | __SRW | __SNBF | __SNPT)) in fseeko64()
206 if ((fp->_flags & __SOPT) == 0) in fseeko64()
214 fp->_flags |= __SNPT; in fseeko64()
222 fp->_flags |= __SOPT; in fseeko64()
241 if (fp->_flags & __SOFF) in fseeko64()
[all …]
Dfreopen64.c120 if (fp->_flags == 0) in freopen64()
121 fp->_flags = __SEOF; /* hold on to it */ in freopen64()
124 if (fp->_flags & __SWR) in freopen64()
188 if (fp->_flags & __SMBF) in freopen64()
202 fp->_flags &= ~__SORD; in freopen64()
209 fp->_flags = 0; /* set it free */ in freopen64()
223 fp->_flags = flags; in freopen64()
234 fp->_flags |= __SCLE; in freopen64()
237 fp->_flags |= __SL64; in freopen64()
Dfopen64.c82 fp->_flags = 0; /* release */ in fopen64()
93 fp->_flags = flags; in fopen64()
101 if (fp->_flags & __SAPP) in fopen64()
106 fp->_flags |= __SCLE; in fopen64()
109 fp->_flags |= __SL64; in fopen64()
Dstdio64.c43 fp->_flags &= ~__SOFF; in __sseek64()
46 fp->_flags |= __SOFF; in __sseek64()
64 if (fp->_flags & __SAPP) in __swrite64()
66 fp->_flags &= ~__SOFF; /* in case O_APPEND mode is set */ in __swrite64()
69 if (fp->_flags & __SCLE) in __swrite64()
Dfdopen64.c70 fp->_flags = flags; in fdopen64()
100 fp->_flags |= __SCLE; in fdopen64()
103 fp->_flags |= __SL64; in fdopen64()
/picolibc-3.5.0-3.4.0/newlib/libc/stdio/sys/
Dstdio.h28 # define _flockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __lock_acquire_recursive((fp)->_lock))
36 # define _funlockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __lock_release_recursive((fp)->_lock))

123