Subversion Repositories HelenOS-historic

Rev

Rev 323 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 323 Rev 405
Line 143... Line 143...
143
}
143
}
144
 
144
 
145
/** Print NULL terminated string
145
/** Print NULL terminated string
146
 *
146
 *
147
 * Print characters from str using putchar() until
147
 * Print characters from str using putchar() until
148
 * \x00 character is reached.
148
 * \\0 character is reached.
149
 *
149
 *
150
 * @param str Characters to print.
150
 * @param str Characters to print.
151
 *
151
 *
152
 */
152
 */
153
void print_str(const char *str)
153
void print_str(const char *str)
Line 207... Line 207...
207
 
207
 
208
/** General formatted text print
208
/** General formatted text print
209
 *
209
 *
210
 * Print text formatted according the fmt parameter
210
 * Print text formatted according the fmt parameter
211
 * and variant arguments. Each formatting directive
211
 * and variant arguments. Each formatting directive
212
 * begins with % (percentage) character and one of the
212
 * begins with \% (percentage) character and one of the
213
 * following character:
213
 * following character:
214
 *
214
 *
215
 * %    Prints the percentage character.
215
 * \%    Prints the percentage character.
-
 
216
 *
216
 * s    The next variant argument is treated as char*
217
 * s    The next variant argument is treated as char*
217
 *      and printed as a NULL terminated string.
218
 *      and printed as a NULL terminated string.
-
 
219
 *
218
 * c    The next variant argument is treated as a single char.
220
 * c    The next variant argument is treated as a single char.
-
 
221
 *
219
 * p    The next variant argument is treated as a maximum
222
 * p    The next variant argument is treated as a maximum
220
 *      bit-width integer with respect to architecture
223
 *      bit-width integer with respect to architecture
221
 *      and printed in full hexadecimal width.
224
 *      and printed in full hexadecimal width.
-
 
225
 *
222
 * P    As with 'p', but '0x' is prefixed.
226
 * P    As with 'p', but '0x' is prefixed.
-
 
227
 *
223
 * q    The next variant argument is treated as a 64b integer
228
 * q    The next variant argument is treated as a 64b integer
224
 *      and printed in full hexadecimal width.
229
 *      and printed in full hexadecimal width.
-
 
230
 *
225
 * Q    As with 'q', but '0x' is prefixed.
231
 * Q    As with 'q', but '0x' is prefixed.
-
 
232
 *
226
 * l    The next variant argument is treated as a 32b integer
233
 * l    The next variant argument is treated as a 32b integer
227
 *      and printed in full hexadecimal width.
234
 *      and printed in full hexadecimal width.
-
 
235
 *
228
 * L    As with 'l', but '0x' is prefixed.
236
 * L    As with 'l', but '0x' is prefixed.
-
 
237
 *
229
 * w    The next variant argument is treated as a 16b integer
238
 * w    The next variant argument is treated as a 16b integer
230
 *      and printed in full hexadecimal width.
239
 *      and printed in full hexadecimal width.
-
 
240
 *
231
 * W    As with 'w', but '0x' is prefixed.
241
 * W    As with 'w', but '0x' is prefixed.
-
 
242
 *
232
 * b    The next variant argument is treated as a 8b integer
243
 * b    The next variant argument is treated as a 8b integer
233
 *      and printed in full hexadecimal width.
244
 *      and printed in full hexadecimal width.
-
 
245
 *
234
 * N    As with 'b', but '0x' is prefixed.
246
 * B    As with 'b', but '0x' is prefixed.
-
 
247
 *
235
 * d    The next variant argument is treated as integer
248
 * d    The next variant argument is treated as integer
236
 *      and printed in standard decimal format (only significant
249
 *      and printed in standard decimal format (only significant
237
 *      digits).
250
 *      digits).
-
 
251
 *
238
 * x    The next variant argument is treated as integer
252
 * x    The next variant argument is treated as integer
239
 *      and printed in standard hexadecimal format (only significant
253
 *      and printed in standard hexadecimal format (only significant
240
 *      digits).
254
 *      digits).
-
 
255
 *
241
 * X    As with 'x', but '0x' is prefixed.
256
 * X    As with 'x', but '0x' is prefixed.
-
 
257
 *
242
 * .    The decimal number following period will be treated as precision
258
 * .    The decimal number following period will be treated as precision
243
 *      for printing floating point numbers. One of 'e', 'E', 'f' or 'F'
259
 *      for printing floating point numbers. One of 'e', 'E', 'f' or 'F'
244
 *      must follow.
260
 *      must follow.
-
 
261
 *
245
 * e    The next variant argument is treated as double precision float
262
 * e    The next variant argument is treated as double precision float
246
 *      and printed in exponent notation with only one digit before decimal point
263
 *      and printed in exponent notation with only one digit before decimal point
247
 *      in specified precision. The exponent sign is printed as 'e'.
264
 *      in specified precision. The exponent sign is printed as 'e'.
-
 
265
 *
248
 * E    As with 'e', but the exponent sign is printed as 'E'.
266
 * E    As with 'e', but the exponent sign is printed as 'E'.
-
 
267
 *
249
 * f    The next variant argument is treated as double precision float
268
 * f    The next variant argument is treated as double precision float
250
 *      and printed in decimal notation in specified precision.
269
 *      and printed in decimal notation in specified precision.
-
 
270
 *
251
 * F    As with 'f'.
271
 * F    As with 'f'.
252
 *
272
 *
253
 * All other characters from fmt except the formatting directives
273
 * All other characters from fmt except the formatting directives
254
 * are printed in verbatim.
274
 * are printed in verbatim.
255
 *
275
 *
256
 * @param fmt Formatting NULL terminated string.
276
 * @param fmt Formatting NULL terminated string.
257
 *
-
 
258
 */
277
 */
259
void printf(const char *fmt, ...)
278
void printf(const char *fmt, ...)
260
{
279
{
261
    int irqpri, i = 0;
280
    int irqpri, i = 0;
262
    va_list ap;
281
    va_list ap;