#include <kernel.h>#include <device.h>#include <vararg.h>


Go to the source code of this file.
Defines | |
| #define | puts(s) fputs(CONSOLE, s) |
| #define | printf(...) fprintf (CONSOLE, __VA_ARGS__) |
| #define | scanf(fmt, args) fscanf(CONSOLE, fmt, args) |
Functions | |
| syscall | kprintf (char *,...) |
| syscall | kputc (device *, unsigned char) |
| int | _doscan (register char *, register int **, int(*)(void), int(*)(char), int, int) |
| int | fscanf (int, char *, int) |
| int | sscanf (char *, char *, int) |
| char * | fgets (int, char *, int) |
| void | _doprnt (char *, va_list, int(*)(int, int), int) |
| int | fprintf (int, char *,...) |
| int | sprintf (char *, char *,...) |
| int | fputs (int, char *) |
Definition in file stdio.h.
| #define printf | ( | ... | ) | fprintf (CONSOLE, __VA_ARGS__) |
Definition at line 42 of file stdio.h.
Referenced by test_bigargs(), test_deltaQueue(), test_procQueue(), test_recursion(), test_schedule(), test_semaphore(), test_semaphore2(), test_semaphore3(), test_semaphore4(), testFail(), and testPass().
| #define puts | ( | s | ) | fputs(CONSOLE, s) |
| void _doprnt | ( | char * | , | |
| va_list | , | |||
| int(*)(int, int) | , | |||
| int | ||||
| ) |
| int _doscan | ( | register char * | , | |
| register int ** | , | |||
| int(*)(void) | , | |||
| int(*)(char) | , | |||
| int | , | |||
| int | ||||
| ) |
| char* fgets | ( | int | dev, | |
| char * | s, | |||
| int | n | |||
| ) |
| int fprintf | ( | int | dev, | |
| char * | fmt, | |||
| ... | ||||
| ) |
Print a formatted message on specified device (file)
| dev | device to write to | |
| *fmt | format string |
Definition at line 20 of file fprintf.c.
References _doprnt(), OK, putc(), va_end, and va_start.
Referenced by shell(), testItem(), uartStat(), xsh_exit(), xsh_gpiostat(), xsh_help(), xsh_kill(), xsh_led(), xsh_memstat(), xsh_ps(), xsh_reset(), xsh_sleep(), xsh_testsuite(), and xsh_uartstat().
| int fputs | ( | int | dev, | |
| char * | s | |||
| ) |
| int fscanf | ( | int | dev, | |
| char * | fmt, | |||
| int | args | |||
| ) |
| syscall kprintf | ( | char * | fmt, | |
| ... | ||||
| ) |
| syscall kputc | ( | device * | pdev, | |
| unsigned char | c | |||
| ) |
kputc - perform a synchronous kernel write to the console tty
| *pdev | pointer to device on which to write character | |
| c | character to write |
Definition at line 21 of file kprintf.c.
References dentry::controlblk, uart::cout, dentry::csr, uart::csr, uart_csreg::ier, uart_csreg::lsr, NULL, SYSERR, UART_LSR_TEMT, and uarttab.
Referenced by kprintf().
| int sprintf | ( | char * | str, | |
| char * | fmt, | |||
| ... | ||||
| ) |
Format arguments and place output in a string
| *str | output string | |
| *fmt | format string |
Definition at line 19 of file sprintf.c.
References _doprnt(), sprntf(), va_end, and va_start.
Referenced by test_checkProcState(), test_checkResult(), test_checkSemCount(), test_deltaQueue(), test_procQueue(), test_semaphore(), test_semaphore2(), test_semaphore3(), and test_semaphore4().
| int sscanf | ( | char * | str, | |
| char * | fmt, | |||
| int | args | |||
| ) |
Read from a string according to a format.
| *str | string to read from | |
| *fmt | format string | |
| args | number of arguments in format string |
Definition at line 22 of file sscanf.c.
References _doscan(), sgetch(), and sungetch().
1.5.5