REpsp2
PSP2 OS reverse engineering
Loading...
Searching...
No Matches
sysclib.h File Reference
#include <stddef.h>
#include <stdarg.h>
#include <scetypes.h>

Go to the source code of this file.

Data Structures

struct  idiv_return
struct  udiv_return
struct  lldiv_t
struct  ulldiv_t

Macros

#define CTYPE_UPPER   0x01 /* uppercase letter */
#define CTYPE_LOWER   0x02 /* lowercase letter */
#define CTYPE_DIGIT   0x04 /* digit */
#define CTYPE_SPACE   0x08 /* space */
#define CTYPE_PUNCT   0x10 /* punctuation */
#define CTYPE_CONTROL   0x20 /* control codes (incl. DEL) */
#define CTYPE_HEXDIGIT   0x40 /* hexadecimal digit (A~F/a~f)*/
#define CTYPE_UNK_0x80   0x80 /* never used */
#define __isxx(ch, msk)
#define iscntrl(ch)
#define isprint(ch)
#define isspace(ch)
#define ispunct(ch)
#define isalnum(ch)
#define isalpha(ch)
#define isupper(ch)
#define islower(ch)
#define isdigit(ch)
#define isxdigit(ch)

Typedefs

typedef struct lldiv_t lldiv_t
typedef struct ulldiv_t ulldiv_t

Functions

int tolower (int ch)
int toupper (int ch)
unsigned look_ctype_table (int ch)
void * memset (void *dest, int ch, size_t count)
int strcmp (const char *lhs, const char *rhs)
int memcmp (const void *lhs, const void *rhs, size_t count)
char * strstr (const char *str, const char *substr)
char * strchr (const char *str, int ch)
void * memcpy (void *dest, const void *src, size_t count)
void * memchr (const void *ptr, int ch, size_t count)
void * memmove (void *dest, const void *src, size_t size)
char * strncpy (char *dest, const char *src, size_t count)
char * strrchr (const char *str, int ch)
char * strncat (char *dest, const char *src, size_t count)
int strnlen (const char *s, size_t maxlen)
int strlen (const char *s)
int vsnprintf (char *s, size_t n, const char *fmt, va_list arg)
int snprintf (char *buffer, size_t bufsz, const char *format,...)
unsigned long strtoul (const char *str, char **str_end, int base)
long long strtoll (const char *str, char **str_end, int base)
long strtol (const char *str, char **str_end, int base)
int strlcat (char *dst, const char *src, size_t dstsize)
size_t strlcpy (char *dst, const char *src, size_t dstsize)
int timingsafe_bcmp (const void *b1, const void *b2, size_t len)
void * __memset_chk (void *dest, int c, size_t len, size_t destlen)
void * __strlcat_chk (char *dst, const char *src, size_t dstsize, size_t dstlen)
char * __strncat_chk (char *dest, const char *src, size_t count, size_t dstlen)
void * __memmove_chk (void *dest, const void *src, size_t len, size_t destlen)
char * __strcpy_chk (char *dest, const char *src, size_t destlen)
int __snprintf_chk (char *str, size_t maxlen, int flag, size_t strlen, const char *format,...)
void * __memcpy_chk (void *dest, const void *src, size_t len, size_t destlen)
char * __strncpy_chk (char *s1, const char *s2, size_t n, size_t s1len)
char * __strlcpy_chk (char *s1, const char *s2, size_t n, size_t s1len)
char * __strcat_chk (char *dest, const char *src, size_t destlen)
int __prnt (void(*cb)(void *argp, int ch), void *argp, const char *fmt, va_list ap)
 Generic formatted output processing function.
char * SceSysclibForDriver_FE39AEAC (char *dst, const char *src, size_t dstsize)
noreturn void __stack_chk_fail (void)
long long __aeabi_lmul (long long, long long)
lldiv_t __aeabi_ldivmod (long long n, long long d)
ulldiv_t __aeabi_uldivmod (unsigned long long n, unsigned long long d)
long long __aeabi_llsl (long long, int)
long long __aeabi_llsr (long long, int)
long long __aeabi_lasr (long long, int)
int __aeabi_lcmp (long long, long long)
int __aeabi_ulcmp (unsigned long long, unsigned long long)
int __aeabi_idiv (int numerator, int denominator)
unsigned __aeabi_uidiv (unsigned numerator, unsigned denominator)
idiv_return __aeabi_idivmod (int numerator, int denominator)
udiv_return __aeabi_uidivmod (unsigned numerator, unsigned denominator)

Variables

unsigned int __stack_chk_guard

Macro Definition Documentation

◆ __isxx

#define __isxx ( ch,
msk )
Value:
((look_ctype_table(ch) & (msk)) != 0)
unsigned look_ctype_table(int ch)
Definition sysclib.c:158

Definition at line 36 of file sysclib.h.

◆ CTYPE_CONTROL

#define CTYPE_CONTROL   0x20 /* control codes (incl. DEL) */

Definition at line 22 of file sysclib.h.

◆ CTYPE_DIGIT

#define CTYPE_DIGIT   0x04 /* digit */

Definition at line 19 of file sysclib.h.

◆ CTYPE_HEXDIGIT

#define CTYPE_HEXDIGIT   0x40 /* hexadecimal digit (A~F/a~f)*/

Definition at line 23 of file sysclib.h.

◆ CTYPE_LOWER

#define CTYPE_LOWER   0x02 /* lowercase letter */

Definition at line 18 of file sysclib.h.

◆ CTYPE_PUNCT

#define CTYPE_PUNCT   0x10 /* punctuation */

Definition at line 21 of file sysclib.h.

◆ CTYPE_SPACE

#define CTYPE_SPACE   0x08 /* space */

Definition at line 20 of file sysclib.h.

◆ CTYPE_UNK_0x80

#define CTYPE_UNK_0x80   0x80 /* never used */

Definition at line 24 of file sysclib.h.

◆ CTYPE_UPPER

#define CTYPE_UPPER   0x01 /* uppercase letter */

Definition at line 17 of file sysclib.h.

◆ isalnum

#define isalnum ( ch)
Value:
#define __isxx(ch, msk)
Definition sysclib.h:36
#define CTYPE_UPPER
Definition sysclib.h:17
#define CTYPE_LOWER
Definition sysclib.h:18
#define CTYPE_DIGIT
Definition sysclib.h:19

Definition at line 43 of file sysclib.h.

◆ isalpha

#define isalpha ( ch)
Value:

Definition at line 44 of file sysclib.h.

◆ iscntrl

#define iscntrl ( ch)
Value:
#define CTYPE_CONTROL
Definition sysclib.h:22

Definition at line 37 of file sysclib.h.

◆ isdigit

#define isdigit ( ch)
Value:

Definition at line 47 of file sysclib.h.

◆ islower

#define islower ( ch)
Value:

Definition at line 46 of file sysclib.h.

◆ isprint

#define isprint ( ch)
Value:
#define CTYPE_UNK_0x80
Definition sysclib.h:24
#define CTYPE_PUNCT
Definition sysclib.h:21

Definition at line 38 of file sysclib.h.

◆ ispunct

#define ispunct ( ch)
Value:

Definition at line 42 of file sysclib.h.

◆ isspace

#define isspace ( ch)
Value:
#define CTYPE_SPACE
Definition sysclib.h:20

Definition at line 39 of file sysclib.h.

◆ isupper

#define isupper ( ch)
Value:

Definition at line 45 of file sysclib.h.

◆ isxdigit

#define isxdigit ( ch)
Value:
#define CTYPE_HEXDIGIT
Definition sysclib.h:23

Definition at line 48 of file sysclib.h.

Typedef Documentation

◆ lldiv_t

typedef struct lldiv_t lldiv_t

◆ ulldiv_t

typedef struct ulldiv_t ulldiv_t

Function Documentation

◆ __aeabi_idiv()

int __aeabi_idiv ( int numerator,
int denominator )

◆ __aeabi_idivmod()

idiv_return __aeabi_idivmod ( int numerator,
int denominator )

◆ __aeabi_lasr()

long long __aeabi_lasr ( long long ,
int  )

◆ __aeabi_lcmp()

int __aeabi_lcmp ( long long ,
long long  )

◆ __aeabi_ldivmod()

lldiv_t __aeabi_ldivmod ( long long n,
long long d )

◆ __aeabi_llsl()

long long __aeabi_llsl ( long long ,
int  )

◆ __aeabi_llsr()

long long __aeabi_llsr ( long long ,
int  )

◆ __aeabi_lmul()

long long __aeabi_lmul ( long long ,
long long  )

◆ __aeabi_uidiv()

unsigned __aeabi_uidiv ( unsigned numerator,
unsigned denominator )

◆ __aeabi_uidivmod()

udiv_return __aeabi_uidivmod ( unsigned numerator,
unsigned denominator )

◆ __aeabi_ulcmp()

int __aeabi_ulcmp ( unsigned long long ,
unsigned long long  )

◆ __aeabi_uldivmod()

ulldiv_t __aeabi_uldivmod ( unsigned long long n,
unsigned long long d )

◆ __memcpy_chk()

void * __memcpy_chk ( void * dest,
const void * src,
size_t len,
size_t destlen )

◆ __memmove_chk()

void * __memmove_chk ( void * dest,
const void * src,
size_t len,
size_t destlen )

◆ __memset_chk()

void * __memset_chk ( void * dest,
int c,
size_t len,
size_t destlen )

◆ __prnt()

int __prnt ( void(* cb )(void *argp, int ch),
void * argp,
const char * fmt,
va_list ap )

Generic formatted output processing function.

This functions generates printf()-like formatted output from fmt + ap and invokes the user callback cb for each character of the output stream.

Name comes from PSP (according to HENkaku wiki) - not confirmed official.

fmt may contain the following format characters:

  • TBD

cb is called two times in addition to each character of the output stream:

  • with ch=0x200 before any character of the output stream (start marker)
  • with ch=0x201 after all characters of the output stream (end marker)
Parameters
cbputchar()-like callback invoked for each character of the output stream (+ two additional times with ch=0x200 and ch=0x201 - see above)
argpuser argument passed verbatim to cb
fmtformat string
apargument list
Returns
number of characters generated in the output stream (not including special calls to cb with ch=0x200 and ch=0x201)
Note
snprintf and vsnprintf are implemented internally on top of of this function so all remarks here also apply to these functions.
Exported by SceSysclibForDriver
NID: 0xE38E7605

◆ __snprintf_chk()

int __snprintf_chk ( char * str,
size_t maxlen,
int flag,
size_t strlen,
const char * format,
... )

◆ __stack_chk_fail()

noreturn void __stack_chk_fail ( void )

◆ __strcat_chk()

char * __strcat_chk ( char * dest,
const char * src,
size_t destlen )

◆ __strcpy_chk()

char * __strcpy_chk ( char * dest,
const char * src,
size_t destlen )

◆ __strlcat_chk()

void * __strlcat_chk ( char * dst,
const char * src,
size_t dstsize,
size_t dstlen )

◆ __strlcpy_chk()

char * __strlcpy_chk ( char * s1,
const char * s2,
size_t n,
size_t s1len )

◆ __strncat_chk()

char * __strncat_chk ( char * dest,
const char * src,
size_t count,
size_t dstlen )

◆ __strncpy_chk()

char * __strncpy_chk ( char * s1,
const char * s2,
size_t n,
size_t s1len )

◆ look_ctype_table()

unsigned look_ctype_table ( int ch)

Name is guessed from PSP and should be official.

Returns
bitmask of CTYPE_* flags for the given character
Exported by SceSysclibForDriver
NID: 0xCDF7F155

Definition at line 158 of file sysclib.c.

◆ memchr()

void * memchr ( const void * ptr,
int ch,
size_t count )

◆ memcmp()

int memcmp ( const void * lhs,
const void * rhs,
size_t count )

◆ memcpy()

void * memcpy ( void * dest,
const void * src,
size_t count )

◆ memmove()

void * memmove ( void * dest,
const void * src,
size_t size )

◆ memset()

void * memset ( void * dest,
int ch,
size_t count )

◆ SceSysclibForDriver_FE39AEAC()

char * SceSysclibForDriver_FE39AEAC ( char * dst,
const char * src,
size_t dstsize )

Similar to strlcpy(): copies up to dstsize - 1 characters from src to dst then NUL-terminates dst (except if dstsize == 0).

The return value is same as strncpy() (i.e., equal to dst).

Exported by SceSysclibForDriver
NID: 0xFE39AEAC

◆ snprintf()

int snprintf ( char * buffer,
size_t bufsz,
const char * format,
... )

◆ strchr()

char * strchr ( const char * str,
int ch )

◆ strcmp()

int strcmp ( const char * lhs,
const char * rhs )

◆ strlcat()

int strlcat ( char * dst,
const char * src,
size_t dstsize )

◆ strlcpy()

size_t strlcpy ( char * dst,
const char * src,
size_t dstsize )

◆ strlen()

int strlen ( const char * s)

◆ strncat()

char * strncat ( char * dest,
const char * src,
size_t count )

◆ strncpy()

char * strncpy ( char * dest,
const char * src,
size_t count )

◆ strnlen()

int strnlen ( const char * s,
size_t maxlen )

◆ strrchr()

char * strrchr ( const char * str,
int ch )

◆ strstr()

char * strstr ( const char * str,
const char * substr )

◆ strtol()

long strtol ( const char * str,
char ** str_end,
int base )

◆ strtoll()

long long strtoll ( const char * str,
char ** str_end,
int base )

◆ strtoul()

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

◆ timingsafe_bcmp()

int timingsafe_bcmp ( const void * b1,
const void * b2,
size_t len )

◆ tolower()

int tolower ( int ch)
Exported by SceSysclibForDriver
NID: 0x0021DAF9

Definition at line 144 of file sysclib.c.

◆ toupper()

int toupper ( int ch)
Exported by SceSysclibForDriver
NID: 0xA685DCB1

Definition at line 151 of file sysclib.c.

◆ vsnprintf()

int vsnprintf ( char * s,
size_t n,
const char * fmt,
va_list arg )

Variable Documentation

◆ __stack_chk_guard

unsigned int __stack_chk_guard
extern