XINU
Functions
printf.c File Reference
#include <xinu.h>
#include <stdio.h>
#include <stdarg.h>
Include dependency graph for printf.c:

Go to the source code of this file.

Functions

void _fdoprnt (char *, va_list, int(*)(did32, char), int)
 
int printf (const char *fmt,...)
 

Function Documentation

◆ _fdoprnt()

void _fdoprnt ( char *  ,
va_list  ,
int(*)(did32, char)  ,
int   
)

Referenced by printf().

Here is the caller graph for this function:

◆ printf()

int printf ( const char *  fmt,
  ... 
)

Definition at line 13 of file printf.c.

References _fdoprnt(), putc(), stdout, va_end, and va_start.

Referenced by arp_dmp(), arp_dump(), main(), printFreeList(), printMemUse(), xsh_argecho(), xsh_arp(), xsh_cat(), xsh_clear(), xsh_date(), xsh_devdump(), xsh_echo(), xsh_help(), xsh_kill(), xsh_ls(), xsh_memdump(), xsh_memstat(), xsh_netinfo(), xsh_ping(), xsh_ps(), xsh_sleep(), xsh_udpdump(), xsh_udpecho(), xsh_udpeserver(), and xsh_uptime().

17 {
18  va_list ap;
19  syscall putc(did32, char);
20 
21  va_start(ap, fmt);
22  _fdoprnt((char *)fmt, ap, putc, stdout);
23  va_end(ap);
24 
25  return 0;
26 }
#define stdout
Definition: stdio.h:16
#define va_start(last, va)
va_list型を初期化し、可変長引数の使用を開始する。
Definition: stdarg.h:25
void _fdoprnt(char *, va_list, int(*)(did32, char), int)
syscall putc(did32, char)
デバイスへ文字1Byteを送信する。
Definition: putc.c:18
#define va_end(va)
可変長引数の処理を終了する。
Definition: stdarg.h:42
int32 did32
デバイスID
Definition: kernel.h:28
__builtin_va_list va_list
可変個の実引数を扱うための情報を保持するための型(__builtin_va_listはGCCに定義された型) ...
Definition: stdarg.h:7
int32 syscall
システムコール関数 返り値の型
Definition: kernel.h:47
Here is the call graph for this function:
Here is the caller graph for this function: