Home
last modified time | relevance | path

Searched refs:flags (Results 1 – 25 of 129) sorted by relevance

123456

/picolibc-latest/newlib/libc/tinystdio/
Dvfprintf.c154 #define SKIP_FLOAT_ARG(flags, ap) do { \ argument
155 if ((flags & (FL_LONG | FL_REPD_TYPE)) == (FL_LONG | FL_REPD_TYPE)) \
162 #define SKIP_FLOAT_ARG(flags, ap) (void) va_arg(ap, uint32_t) argument
165 #define SKIP_FLOAT_ARG(flags, ap) (void) va_arg(ap, double) argument
173 #define arg_to_t(ap, flags, _s_, _result_) \ argument
174 if ((flags) & FL_LONG) { \
175 if ((flags) & FL_REPD_TYPE) \
181 if ((flags) & FL_SHORT) { \
182 if ((flags) & FL_REPD_TYPE) \
192 #define arg_to_t(ap, flags, _s_, _result_) \ argument
[all …]
Dvfscanf.c141 getmb(FILE *stream, scanf_context_t *context, mbstate_t *ps, uint16_t flags) in getmb() argument
145 if (flags & FL_LONG) { in getmb()
183 _putmb(void *addr, wint_t wi, mbstate_t *ps, uint16_t flags) in _putmb() argument
185 if (flags & FL_LONG) { in _putmb()
197 #define putmb(addr, wi, ps, flags, fail) do { \ argument
199 addr = _putmb(addr, wi, ps, flags); \
206 _putmb(void *addr, wint_t wi, uint16_t flags) in _putmb() argument
208 if (flags & FL_LONG) { in _putmb()
217 #define putmb(addr, wi, ps, flags, fail) do { \ argument
219 addr = _putmb(addr, wi, flags); \
[all …]
Dstrtoi.h58 unsigned char flags = 0; in strtoi() local
69 flags = FLAG_NEG; in strtoi()
94 strtoi_utype ucutoff = (strtoi_utype) strtoi_max + flags; in strtoi()
120 flags |= FLAG_OFLOW; in strtoi()
124 flags |= FLAG_OFLOW; in strtoi()
136 if (flags & FLAG_NEG) in strtoi()
139 if (flags & FLAG_OFLOW) { in strtoi()
Dconv_flt.c97 # define CHECK_LONG() (flags & FL_LONG)
98 # define CHECK_LONG_LONG() (flags & FL_LONGLONG)
100 # define CHECK_LONG() (flags & (FL_LONG|FL_LONGLONG))
201 conv_flt (FLT_STREAM *stream, FLT_CONTEXT *context, width_t width, void *addr, uint16_t flags) in conv_flt() argument
215 flags |= FL_MINUS; in conv_flt()
311 if ((flags & FL_FHEX) && (c = TOLOWER(i) - 'a') <= 5) in conv_flt()
318 flags |= FL_ANY; in conv_flt()
319 if (!(flags & FL_OVFL) && uintdigits > uintdigitsmax) { in conv_flt()
320 flags |= FL_OVFL; in conv_flt()
331 if (flags & FL_OVFL) { in conv_flt()
[all …]
Ddtoa_engine.c72 uint8_t flags = 0; in __dtoa_engine() local
75 flags |= DTOA_MINUS; in __dtoa_engine()
78 flags |= DTOA_NAN; in __dtoa_engine()
80 flags |= DTOA_INF; in __dtoa_engine()
84 flags |= DTOA_ZERO; in __dtoa_engine()
220 dtoa->flags = flags; in __dtoa_engine()
Dfwide.c42 stream->flags = (stream->flags & ~__SWIDE) | ((mode > 0) ? __SWIDE : 0); in fwide()
43 return (stream->flags & __SWIDE) ? 1 : -1; in fwide()
Dftoa_engine.c92 uint8_t flags = 0; in __ftoa_engine() local
109 flags = DTOA_MINUS; in __ftoa_engine()
120 flags |= DTOA_ZERO; in __ftoa_engine()
125 flags |= DTOA_INF; in __ftoa_engine()
127 flags |= DTOA_NAN; in __ftoa_engine()
250 ftoa->flags = flags; in __ftoa_engine()
/picolibc-latest/newlib/libc/posix/
Dfnmatch.c57 fnmatch(const char *pattern, const char *string, int flags) in fnmatch() argument
66 if ((flags & FNM_LEADING_DIR) && *string == '/') in fnmatch()
72 if (*string == '/' && (flags & FNM_PATHNAME)) in fnmatch()
74 if (*string == '.' && (flags & FNM_PERIOD) && in fnmatch()
76 ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) in fnmatch()
86 if (*string == '.' && (flags & FNM_PERIOD) && in fnmatch()
88 ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) in fnmatch()
93 if (flags & FNM_PATHNAME) in fnmatch()
94 return ((flags & FNM_LEADING_DIR) || in fnmatch()
99 else if (c == '/' && flags & FNM_PATHNAME) { in fnmatch()
[all …]
Dnftw.c49 …(const char *, const struct stat *, int, struct FTW *), int fd_limit, int flags, struct history *h) in do_nftw() argument
58 if ((flags & FTW_PHYS) ? lstat(path, &st) : stat(path, &st) < 0) { in do_nftw()
59 if (!(flags & FTW_PHYS) && errno==ENOENT && !lstat(path, &st)) in do_nftw()
65 else if (flags & FTW_DEPTH) type = FTW_DP; in do_nftw()
68 if (flags & FTW_PHYS) type = FTW_SL; in do_nftw()
74 if ((flags & FTW_MOUNT) && h && st.st_dev != h->dev) in do_nftw()
93 if (!(flags & FTW_DEPTH) && (r=fn(path, &st, type, &lev))) in do_nftw()
116 if ((r=do_nftw(path, fn, fd_limit-1, flags, &new))) { in do_nftw()
128 if ((flags & FTW_DEPTH) && (r=fn(path, &st, type, &lev))) in do_nftw()
134 …ar *path, int (*fn)(const char *, const struct stat *, int, struct FTW *), int fd_limit, int flags) in nftw() argument
[all …]
/picolibc-latest/semihost/machine/m68k/
Dm68k_open.c45 static int gdb_flags(int flags) { in gdb_flags() argument
48 gdb = flags & 3; in gdb_flags()
49 if (flags & O_RDWR) in gdb_flags()
51 if (flags & O_APPEND) in gdb_flags()
53 if (flags & O_CREAT) in gdb_flags()
55 if (flags & O_TRUNC) in gdb_flags()
57 if (flags & O_EXCL) in gdb_flags()
63 open(const char *pathname, int flags, ...) in open() argument
67 va_start(ap,flags); in open()
72 gdb_flags(flags), mode); in open()
/picolibc-latest/semihost/machine/nios2/
Dnios2_open.c45 static int gdb_flags(int flags) { in gdb_flags() argument
48 gdb = flags & 3; in gdb_flags()
49 if (flags & O_RDWR) in gdb_flags()
51 if (flags & O_APPEND) in gdb_flags()
53 if (flags & O_CREAT) in gdb_flags()
55 if (flags & O_TRUNC) in gdb_flags()
57 if (flags & O_EXCL) in gdb_flags()
63 open(const char *pathname, int flags, ...) in open() argument
67 va_start(ap,flags); in open()
72 gdb_flags(flags), mode); in open()
/picolibc-latest/newlib/libc/stdio/
Dvfscanf.c385 register int flags; /* flags as defined above */ in _SVFSCANF() local
616 flags = 0; in _SVFSCANF()
648 if ((flags & (CHAR | SHORT | LONG | LONGDBL | SUPPRESS | MALLOC)) in _SVFSCANF()
651 flags |= SUPPRESS; in _SVFSCANF()
654 if (flags & (CHAR | SHORT | LONG | LONGDBL)) in _SVFSCANF()
660 flags |= LONGDBL; in _SVFSCANF()
664 flags |= LONG; in _SVFSCANF()
667 if (flags & (CHAR | SHORT | LONG | LONGDBL)) in _SVFSCANF()
669 flags |= LONGDBL; in _SVFSCANF()
672 if (flags & (CHAR | SHORT | LONG | LONGDBL)) in _SVFSCANF()
[all …]
Dvfwscanf.c290 register int flags; /* flags as defined above */ in _SVFWSCANF() local
521 flags = 0; in _SVFWSCANF()
550 if ((flags & (CHAR | SHORT | LONG | LONGDBL | SUPPRESS | MALLOC)) in _SVFWSCANF()
553 flags |= SUPPRESS; in _SVFWSCANF()
556 if (flags & (CHAR | SHORT | LONG | LONGDBL)) in _SVFWSCANF()
562 flags |= LONGDBL; in _SVFWSCANF()
566 flags |= LONG; in _SVFWSCANF()
569 if (flags & (CHAR | SHORT | LONG | LONGDBL)) in _SVFWSCANF()
571 flags |= LONGDBL; in _SVFWSCANF()
575 if (flags & (CHAR | SHORT | LONG | LONGDBL)) in _SVFWSCANF()
[all …]
Dnano-vfscanf_float.c65 pdata->flags |= SIGNOK | NDIGITS | DPTOK | EXPOK; in _scanf_float()
76 if (pdata->flags & NDIGITS) in _scanf_float()
78 pdata->flags &= ~SIGNOK; in _scanf_float()
99 pdata->flags &= ~(SIGNOK | NDIGITS); in _scanf_float()
106 if (pdata->flags & SIGNOK) in _scanf_float()
108 pdata->flags &= ~SIGNOK; in _scanf_float()
115 && (pdata->flags & (NDIGITS | DPTOK | EXPOK)) == in _scanf_float()
118 pdata->flags &= ~(SIGNOK | DPTOK | EXPOK | NDIGITS); in _scanf_float()
144 && (pdata->flags & (NDIGITS | DPTOK | EXPOK)) == in _scanf_float()
147 pdata->flags &= ~(SIGNOK | DPTOK | EXPOK | NDIGITS); in _scanf_float()
[all …]
Dnano-vfprintf_i.c74 if (pdata->flags & HEXPREFIX) in _printf_common()
78 if ((pdata->flags & (LADJUST|ZEROPAD)) == 0) in _printf_common()
86 if (pdata->flags & HEXPREFIX) in _printf_common()
94 if ((pdata->flags & (LADJUST|ZEROPAD)) != ZEROPAD || n < 0) in _printf_common()
127 _uquad = SARG (pdata->flags); in _printf_i()
137 _uquad = UARG (pdata->flags); in _printf_i()
151 pdata->flags |= HEXPREFIX; in _printf_i()
153 pdata->flags |= LONGINT; in _printf_i()
160 _uquad = UARG (pdata->flags); in _printf_i()
162 if (pdata->flags & ALT) in _printf_i()
[all …]
Dvfwprintf.c360 register int flags; /* flags as above */ in VFWPRINTF() local
539 (flags&QUADINT ? GET_ARG (N, ap, quad_t) : \ in VFWPRINTF()
540 flags&LONGINT ? GET_ARG (N, ap, long) : \ in VFWPRINTF()
541 flags&SHORTINT ? (long)(short)GET_ARG (N, ap, int) : \ in VFWPRINTF()
542 flags&CHARINT ? (long)(signed char)GET_ARG (N, ap, int) : \ in VFWPRINTF()
545 (flags&QUADINT ? GET_ARG (N, ap, u_quad_t) : \ in VFWPRINTF()
546 flags&LONGINT ? GET_ARG (N, ap, u_long) : \ in VFWPRINTF()
547 flags&SHORTINT ? (u_long)(u_short)GET_ARG (N, ap, int) : \ in VFWPRINTF()
548 flags&CHARINT ? (u_long)(unsigned char)GET_ARG (N, ap, int) : \ in VFWPRINTF()
552 (flags&LONGINT ? GET_ARG (N, ap, long) : \ in VFWPRINTF()
[all …]
Dvfprintf.c391 register int flags; /* flags as above */ in VFPRINTF() local
553 (flags&QUADINT ? GET_ARG (N, ap, quad_t) : \ in VFPRINTF()
554 flags&LONGINT ? GET_ARG (N, ap, long) : \ in VFPRINTF()
555 flags&SHORTINT ? (long)(short)GET_ARG (N, ap, int) : \ in VFPRINTF()
556 flags&CHARINT ? (long)(signed char)GET_ARG (N, ap, int) : \ in VFPRINTF()
560 (flags&QUADINT ? GET_ARG (N, ap, u_quad_t) : \ in VFPRINTF()
561 flags&LONGINT ? GET_ARG (N, ap, u_long) : \ in VFPRINTF()
562 flags&SHORTINT ? (u_long)(u_short)GET_ARG (N, ap, int) : \ in VFPRINTF()
563 flags&CHARINT ? (u_long)(GET_ARG (N, ap, int) & 0xff) : \ in VFPRINTF()
567 (flags&QUADINT ? GET_ARG (N, ap, u_quad_t) : \ in VFPRINTF()
[all …]
Dnano-vfscanf_i.c57 if ((pdata->flags & SUPPRESS) == 0) in _scanf_chars()
66 if ((pdata->flags & SUPPRESS) == 0) in _scanf_chars()
82 if ((pdata->flags & SUPPRESS) == 0) in _scanf_chars()
120 pdata->flags |= NDIGITS | NZDIGITS | NNZDIGITS; in _scanf_i()
133 pdata->flags |= PFXOK; in _scanf_i()
135 pdata->flags &= ~(NZDIGITS | NDIGITS); in _scanf_i()
139 if ((pdata->flags & (PFXOK | NZDIGITS)) != PFXOK) in _scanf_i()
148 pdata->flags |= NDIGITS; in _scanf_i()
176 else if (n == '0' && (pdata->flags & NNZDIGITS)) in _scanf_i()
186 pdata->flags &= ~(NDIGITS | NNZDIGITS); in _scanf_i()
[all …]
Dnano-vfprintf_float.c51 int flags, char *sign, int *decpt, int ch, int *length,
66 __cvt (struct _reent *data, _PRINTF_FLOAT_TYPE value, int ndigits, int flags, in __cvt() argument
103 if ((ch != 'g' && ch != 'G') || flags & ALT) in __cvt()
187 if (pdata->flags & LONGDBL) in _printf_float()
210 pdata->flags &= ~ZEROPAD; in _printf_float()
222 pdata->flags &= ~ZEROPAD; in _printf_float()
235 pdata->flags |= FPT; in _printf_float()
237 cp = __cvt (data, _fpvalue, pdata->prec, pdata->flags, &softsign, in _printf_float()
254 if (ndig > 1 || pdata->flags & ALT) in _printf_float()
265 if (pdata->prec || pdata->flags & ALT) in _printf_float()
[all …]
Dnano-vfprintf_local.h149 #define SARG(flags) \ argument
150 (flags&LONGINT ? GET_ARG (N, (*ap), long) : \
151 flags&SHORTINT ? (long)(short)GET_ARG (N, (*ap), int) : \
152 flags&CHARINT ? (long)(signed char)GET_ARG (N, (*ap), int) : \
154 #define UARG(flags) \ argument
155 (flags&LONGINT ? GET_ARG (N, (*ap), u_long) : \
156 flags&SHORTINT ? (u_long)(u_short)GET_ARG (N, (*ap), int) : \
157 flags&CHARINT ? (u_long)(unsigned char)GET_ARG (N, (*ap), int) : \
191 int flags; /* Flags. */ member
Dmktemp.c146 int flags) in _gettemp() argument
225 if ((*doopen = open (path, O_CREAT | O_EXCL | O_RDWR | flags, in _gettemp()
293 int flags) in mkostemp() argument
297 return (_gettemp (path, &fd, 0, 0, flags & ~O_ACCMODE) ? fd : -1); in mkostemp()
304 int flags) in mkostemps() argument
308 return (_gettemp (path, &fd, 0, len, flags & ~O_ACCMODE) ? fd : -1); in mkostemps()
/picolibc-latest/newlib/libc/machine/riscv/machine/
Dfenv-fp.h129 fexcept_t flags; in fegetexceptflag() local
130 __asm__ volatile("frflags %0" : "=r"(flags)); in fegetexceptflag()
134 *flagp = flags & excepts; in fegetexceptflag()
328 fexcept_t flags = *flagp & FE_ALL_EXCEPT; in fesetexceptflag() local
333 __asm__ volatile("csrs fflags, %0" : : "r"(flags & excepts)); in fesetexceptflag()
416 fexcept_t flags; in fetestexcept() local
417 __asm__ volatile("frflags %0" : "=r"(flags)); in fetestexcept()
425 return (flags & excepts); in fetestexcept()
447 fexcept_t flags; in feupdateenv() local
448 __asm__ volatile("frflags %0" : "=r"(flags)); in feupdateenv()
[all …]
/picolibc-latest/test/libc-testsuite/
Dfnmatch.c49 static void printflags(const struct xlat *map, int flags) { in printflags() argument
52 if (! flags) { in printflags()
59 if (map->val && (flags & map->val) == map->val) { in printflags()
62 flags &= ~(map->val); in printflags()
65 if (flags) printf("%sunknown=%#x", sep, flags); in printflags()
74 int flags; member
158 r = fnmatch(tests[i].pattern, tests[i].string, tests[i].flags); in test_fnmatch()
164 printflags(fnmatch_flags, tests[i].flags); in test_fnmatch()
/picolibc-latest/newlib/libc/search/
Dhash_buf.c181 if (hashp->nbufs || (bp->flags & BUF_PIN)) { in newbuf()
204 if ((bp->addr != 0) || (bp->flags & BUF_BUCKET)) { in newbuf()
212 if ((bp->flags & BUF_MOD) && __put_page(hashp, bp->page, in newbuf()
213 bp->addr, (int)IS_BUCKET(bp->flags), 0)) in newbuf()
223 if (IS_BUCKET(bp->flags)) { in newbuf()
231 ((bp->flags & BUF_MOD) || in newbuf()
248 if (IS_BUCKET(xbp->flags) || in newbuf()
256 if ((xbp->flags & BUF_MOD) && __put_page(hashp, in newbuf()
260 xbp->flags = 0; in newbuf()
285 bp->flags = 0; in newbuf()
[all …]
/picolibc-latest/semihost/
Dopen.c55 open(const char *pathname, int flags, ...) in open() argument
59 switch (flags & (O_RDONLY|O_WRONLY|O_RDWR)) { in open()
64 if (flags & O_TRUNC) in open()
70 if (flags & O_TRUNC) in open()

123456