SSBM Decomp
Loading...
Searching...
No Matches
strtoul.c File Reference
#include <MSL/ctype.h>
#include <MSL/errno.h>
#include <MSL/limits.h>
#include <MSL/scanf.h>
#include <MSL/string.h>
#include <MSL/strtoul.h>

Macros

#define final_state(scan_state)   (scan_state & (finished | failure))
 
#define success(scan_state)    (scan_state & (leading_zero | digit_loop | finished))
 
#define fetch()   (count++, (*ReadProc)(ReadProcArg, 0, __GetAChar))
 
#define unfetch(c)   (*ReadProc)(ReadProcArg, c, __UngetAChar)
 

Enumerations

enum  scan_states {
  start = 0x01 ,
  check_for_zero = 0x02 ,
  leading_zero = 0x04 ,
  need_digit = 0x08 ,
  digit_loop = 0x10 ,
  finished = 0x20 ,
  failure = 0x40
}
 

Functions

unsigned long strtoul (const char *str, char **end, int base)
 
unsigned long __strtoul (int base, int max_width, int(*ReadProc)(void *, int, int), void *ReadProcArg, int *chars_scanned, int *negative, int *overflow)
 

Macro Definition Documentation

◆ final_state

#define final_state (   scan_state)    (scan_state & (finished | failure))

◆ success

#define success (   scan_state)     (scan_state & (leading_zero | digit_loop | finished))

◆ fetch

#define fetch ( )    (count++, (*ReadProc)(ReadProcArg, 0, __GetAChar))

◆ unfetch

#define unfetch (   c)    (*ReadProc)(ReadProcArg, c, __UngetAChar)

Enumeration Type Documentation

◆ scan_states

Enumerator
start 
check_for_zero 
leading_zero 
need_digit 
digit_loop 
finished 
failure 

Function Documentation

◆ strtoul()

unsigned long strtoul ( const char *  str,
char **  end,
int  base 
)

◆ __strtoul()

unsigned long __strtoul ( int  base,
int  max_width,
int(*)(void *, int, int)  ReadProc,
void *  ReadProcArg,
int *  chars_scanned,
int *  negative,
int *  overflow 
)