coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
vtxprintf.c File Reference
#include <console/vtxprintf.h>
#include <ctype.h>
#include <string.h>
#include <types.h>
Include dependency graph for vtxprintf.c:

Go to the source code of this file.

Macros

#define call_tx(x)   tx_byte(x, data)
 
#define ZEROPAD   1 /* pad with zero */
 
#define SIGN   2 /* unsigned/signed long */
 
#define PLUS   4 /* show plus */
 
#define SPACE   8 /* space if plus */
 
#define LEFT   16 /* left justified */
 
#define SPECIAL   32 /* 0x */
 
#define LARGE   64 /* use 'ABCDEF' instead of 'abcdef' */
 

Functions

static int number (void(*tx_byte)(unsigned char byte, void *data), unsigned long long inum, int base, int size, int precision, int type, void *data)
 
int vtxprintf (void(*tx_byte)(unsigned char byte, void *data), const char *fmt, va_list args, void *data)
 

Macro Definition Documentation

◆ call_tx

#define call_tx (   x)    tx_byte(x, data)

Definition at line 12 of file vtxprintf.c.

◆ LARGE

#define LARGE   64 /* use 'ABCDEF' instead of 'abcdef' */

Definition at line 20 of file vtxprintf.c.

◆ LEFT

#define LEFT   16 /* left justified */

Definition at line 18 of file vtxprintf.c.

◆ PLUS

#define PLUS   4 /* show plus */

Definition at line 16 of file vtxprintf.c.

◆ SIGN

#define SIGN   2 /* unsigned/signed long */

Definition at line 15 of file vtxprintf.c.

◆ SPACE

#define SPACE   8 /* space if plus */

Definition at line 17 of file vtxprintf.c.

◆ SPECIAL

#define SPECIAL   32 /* 0x */

Definition at line 19 of file vtxprintf.c.

◆ ZEROPAD

#define ZEROPAD   1 /* pad with zero */

Definition at line 14 of file vtxprintf.c.

Function Documentation

◆ number()

static int number ( void(*)(unsigned char byte, void *data)  tx_byte,
unsigned long long  inum,
int  base,
int  size,
int  precision,
int  type,
void data 
)
static

Definition at line 22 of file vtxprintf.c.

References base, c, call_tx, count, LARGE, LEFT, PLUS, SIGN, SPACE, SPECIAL, type, and ZEROPAD.

Referenced by vtxprintf().

Here is the caller graph for this function:

◆ vtxprintf()

int vtxprintf ( void(*)(unsigned char byte, void *data)  tx_byte,
const char *  fmt,
va_list  args,
void data 
)

Definition at line 102 of file vtxprintf.c.

References __fallthrough, args, base, call_tx, count, isdigit(), LARGE, LEFT, number(), PLUS, s, SIGN, skip_atoi(), SPACE, SPECIAL, strnlen(), va_arg, and ZEROPAD.

Referenced by vprintk(), vsnprintf(), and wrap_interactive_printf().

Here is the call graph for this function:
Here is the caller graph for this function: