2 * Copyright (c) 1990 The Regents of the University of California.
5 * Redistribution and use in source and binary forms are permitted
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * and/or other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 <<siprintf>>, <<fiprintf>>, <<iprintf>>, <<sniprintf>>, <<asiprintf>>, <<asniprintf>>---format output (integer only)
50 int iprintf(const char *<[format]>, ...);
51 int fiprintf(FILE *<[fd]>, const char *<[format]> , ...);
52 int siprintf(char *<[str]>, const char *<[format]>, ...);
53 int sniprintf(char *<[str]>, size_t <[size]>, const char *<[format]>,
55 int asiprintf(char **<[strp]>, const char *<[format]>, ...);
56 char *asniprintf(char *<[str]>, size_t *<[size]>,
57 const char *<[format]>, ...);
59 int _iprintf_r(struct _reent *<[ptr]>, const char *<[format]>, ...);
60 int _fiprintf_r(struct _reent *<[ptr]>, FILE *<[fd]>,
61 const char *<[format]>, ...);
62 int _siprintf_r(struct _reent *<[ptr]>, char *<[str]>,
63 const char *<[format]>, ...);
64 int _sniprintf_r(struct _reent *<[ptr]>, char *<[str]>, size_t <[size]>,
65 const char *<[format]>, ...);
66 int _asiprintf_r(struct _reent *<[ptr]>, char **<[strp]>,
67 const char *<[format]>, ...);
68 char *_asniprintf_r(struct _reent *<[ptr]>, char *<[str]>,
69 size_t *<[size]>, const char *<[format]>, ...);
72 <<iprintf>>, <<fiprintf>>, <<siprintf>>, <<sniprintf>>,
73 <<asiprintf>>, and <<asniprintf>> are the same as <<printf>>,
74 <<fprintf>>, <<sprintf>>, <<snprintf>>, <<asprintf>>, and
75 <<asnprintf>>, respectively, except that they restrict usage
76 to non-floating-point format specifiers.
78 <<_iprintf_r>>, <<_fiprintf_r>>, <<_asiprintf_r>>,
79 <<_siprintf_r>>, <<_sniprintf_r>>, <<_asniprintf_r>> are
80 simply reentrant versions of the functions above.
83 Similar to <<printf>>, <<fprintf>>, <<sprintf>>, <<snprintf>>, <<asprintf>>,
87 <<iprintf>>, <<fiprintf>>, <<siprintf>>, <<sniprintf>>, <<asiprintf>>,
88 and <<asniprintf>> are newlib extensions.
90 Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
91 <<lseek>>, <<read>>, <<sbrk>>, <<write>>.
102 _siprintf_r (struct _reent
*ptr
,
104 const char *fmt
, ...)
110 f
._flags
= __SWR
| __SSTR
;
112 f
._bf
._base
= f
._p
= (unsigned char *) str
;
113 f
._bf
._size
= f
._w
= INT_MAX
;
114 f
._file
= -1; /* No file. */
116 ret
= _svfiprintf_r (ptr
, &f
, fmt
, ap
);
126 const char *fmt
, ...)
132 f
._flags
= __SWR
| __SSTR
;
134 f
._bf
._base
= f
._p
= (unsigned char *) str
;
135 f
._bf
._size
= f
._w
= INT_MAX
;
136 f
._file
= -1; /* No file. */
138 ret
= _svfiprintf_r (_REENT
, &f
, fmt
, ap
);