UbixOS  2.0
vsprintf.c File Reference
#include <stdarg.h>
#include <string.h>
Include dependency graph for vsprintf.c:

Go to the source code of this file.

Macros

#define do_div(n, base)
 
#define is_digit(c)   ((c) >= '0' && (c) <= '9')
 
#define LEFT   16 /* left justified */
 
#define PLUS   4 /* show plus */
 
#define SIGN   2 /* unsigned/signed long */
 
#define SMALL   64 /* use 'abcdef' instead of 'ABCDEF' */
 
#define SPACE   8 /* space if plus */
 
#define SPECIAL   32 /* 0x */
 
#define ZEROPAD   1 /* pad with zero */
 

Functions

int vsprintf (char *buf, const char *fmt, va_list args)
 

Macro Definition Documentation

◆ do_div

#define do_div (   n,
  base 
)
Value:
({ \
int __res; \
__asm__("divl %4":"=a" (n),"=d" (__res):"0" (n),"1" (0),"r" (base)); \
__res; })

Definition at line 56 of file vsprintf.c.

◆ is_digit

#define is_digit (   c)    ((c) >= '0' && (c) <= '9')

Definition at line 38 of file vsprintf.c.

◆ LEFT

#define LEFT   16 /* left justified */

Definition at line 52 of file vsprintf.c.

◆ PLUS

#define PLUS   4 /* show plus */

Definition at line 50 of file vsprintf.c.

◆ SIGN

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

Definition at line 49 of file vsprintf.c.

◆ SMALL

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

Definition at line 54 of file vsprintf.c.

◆ SPACE

#define SPACE   8 /* space if plus */

Definition at line 51 of file vsprintf.c.

◆ SPECIAL

#define SPECIAL   32 /* 0x */

Definition at line 53 of file vsprintf.c.

◆ ZEROPAD

#define ZEROPAD   1 /* pad with zero */

Definition at line 48 of file vsprintf.c.

Function Documentation

◆ vsprintf()

int vsprintf ( char *  buf,
const char *  fmt,
va_list  args 
)

Definition at line 124 of file vsprintf.c.

References is_digit, LEFT, PLUS, SPACE, SPECIAL, and ZEROPAD.

Referenced by kpanic().