Retro Rocket Kernel
BASIC-Powered Operating System
printf.h File Reference
#include "kernel.h"

Macros

#define va_start(ap, X)   __builtin_va_start(ap, X)
 
#define va_arg(ap, type)   __builtin_va_arg(ap, type)
 
#define va_end(ap)   __builtin_va_end(ap)
 
#define PR_LJ   0x001 /* left justify */
 
#define PR_CA   0x002 /* use A-F instead of a-f for hex */
 
#define PR_SG   0x004 /* signed numeric conversion (%d vs. %u) */
 
#define PR_32   0x008 /* long (32-bit) numeric conversion */
 
#define PR_16   0x010 /* short (16-bit) numeric conversion */
 
#define PR_WS   0x020 /* PR_SG set and num was < 0 */
 
#define PR_LZ   0x040 /* pad left with '0' instead of ' ' */
 
#define PR_FP   0x080 /* pointers are far */
 
#define PR_64   0x100 /* long (32-bit) numeric conversion */
 
#define PR_BUFLEN   26
 

Typedefs

typedef __builtin_va_list va_list
 
typedef int(* fnptr_t) (unsigned c, void **helper, const void *end)
 

Functions

int vsprintf (char *buf, const char *fmt, va_list args)
 
int vsnprintf (char *buf, size_t max, const char *fmt, va_list args)
 
int sprintf (char *buf, const char *fmt,...)
 
int snprintf (char *buf, size_t max, const char *fmt,...)
 
int vprintf (const char *fmt, va_list args)
 
int printf (const char *fmt,...)
 
int dprintf (const char *fmt,...)
 Debug only to int 0xE9. More...
 

Detailed Description

Author
Craig Edwards (craig.nosp@m.edwa.nosp@m.rds@b.nosp@m.rain.nosp@m.box.c.nosp@m.c)

Macro Definition Documentation

◆ PR_16

#define PR_16   0x010 /* short (16-bit) numeric conversion */

◆ PR_32

#define PR_32   0x008 /* long (32-bit) numeric conversion */

◆ PR_64

#define PR_64   0x100 /* long (32-bit) numeric conversion */

◆ PR_BUFLEN

#define PR_BUFLEN   26

◆ PR_CA

#define PR_CA   0x002 /* use A-F instead of a-f for hex */

◆ PR_FP

#define PR_FP   0x080 /* pointers are far */

◆ PR_LJ

#define PR_LJ   0x001 /* left justify */

◆ PR_LZ

#define PR_LZ   0x040 /* pad left with '0' instead of ' ' */

◆ PR_SG

#define PR_SG   0x004 /* signed numeric conversion (%d vs. %u) */

◆ PR_WS

#define PR_WS   0x020 /* PR_SG set and num was < 0 */

◆ va_arg

#define va_arg (   ap,
  type 
)    __builtin_va_arg(ap, type)

◆ va_end

#define va_end (   ap)    __builtin_va_end(ap)

◆ va_start

#define va_start (   ap,
 
)    __builtin_va_start(ap, X)

Typedef Documentation

◆ fnptr_t

typedef int(* fnptr_t) (unsigned c, void **helper, const void *end)

◆ va_list

typedef __builtin_va_list va_list

Function Documentation

◆ dprintf()

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

Debug only to int 0xE9.

Parameters
fmtformat specifier
...format args
Returns
int number of printed characters

◆ printf()

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

◆ snprintf()

int snprintf ( char *  buf,
size_t  max,
const char *  fmt,
  ... 
)

◆ sprintf()

int sprintf ( char *  buf,
const char *  fmt,
  ... 
)

◆ vprintf()

int vprintf ( const char *  fmt,
va_list  args 
)

◆ vsnprintf()

int vsnprintf ( char *  buf,
size_t  max,
const char *  fmt,
va_list  args 
)

◆ vsprintf()

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