Mario Kart 64
Loading...
Searching...
No Matches
_Printf.c File Reference
#include "libultra_internal.h"
#include <stdarg.h>
#include <string.h>
#include "printf.h"
Include dependency graph for _Printf.c:

Macros

#define STATIC   static
 
#define ATOI(i, a)
 
#define _PROUT(dst, fmt, _size)
 
#define _PAD(i, m, c, src, extracond)
 

Functions

STATIC void _Putfld (printf_struct *, va_list *, u8, u8 *)
 
s32 _Printf (char *(*prout)(char *, const char *, size_t), char *dst, const char *fmt, va_list args)
 

Variables

const char length_str [] = "hlL"
 
const char flags_str [] = " +-#0"
 
const u32 flags_arr [] = { FLAGS_SPACE, FLAGS_PLUS, FLAGS_MINUS, FLAGS_HASH, FLAGS_ZERO, 0 }
 
char _spaces [] = " "
 
char _zeroes [] = "00000000000000000000000000000000"
 

Macro Definition Documentation

◆ _PAD

#define _PAD ( i,
m,
c,
src,
extracond )
Value:
if (extracond && m > 0) \
for (i = m; i > 0; i -= c) { \
if ((u32) i > 32) \
c = 32; \
else \
c = i; \
_PROUT(dst, src, c); \
}
unsigned int u32
Definition ultratypes.h:16

◆ _PROUT

#define _PROUT ( dst,
fmt,
_size )
Value:
if (_size > 0) { \
dst = prout(dst, fmt, _size); \
if (dst != 0) \
sp78.size += _size; \
else \
return sp78.size; \
}

◆ ATOI

#define ATOI ( i,
a )
Value:
for (i = 0; *a >= '0' && *a <= '9'; a++) \
if (i < 999) \
i = *a + i * 10 - '0';

◆ STATIC

#define STATIC   static

Function Documentation

◆ _Printf()

s32 _Printf ( char *(* prout )(char *, const char *, size_t),
char * dst,
const char * fmt,
va_list args )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _Putfld()

STATIC void _Putfld ( printf_struct * a0,
va_list * args,
u8 type,
u8 * buff )
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ _spaces

char _spaces[] = " "

◆ _zeroes

char _zeroes[] = "00000000000000000000000000000000"

◆ flags_arr

const u32 flags_arr[] = { FLAGS_SPACE, FLAGS_PLUS, FLAGS_MINUS, FLAGS_HASH, FLAGS_ZERO, 0 }

◆ flags_str

const char flags_str[] = " +-#0"

◆ length_str

const char length_str[] = "hlL"