UVLoader
Userland Vita Loader
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Data Structures | Macros | Typedefs
Library Functions

String and memory functions. More...

Data Structures

struct  uidiv_result
 Division result. More...
 

Macros

#define DEBUG_LOGGING   0
 Disable debug logging.
 
#define VERBOSE_LOGGING   0
 Disable verbose logging.
 
#define MAX_LOG_LENGTH   0x100
 Any log entry larger than this will cause a buffer overflow!
 
#define IF_DEBUG   if (DEBUG_LOGGING)
 Place before calling LOG to only show when debugging.
 
#define IF_VERBOSE   if (VERBOSE_LOGGING)
 Place before calling LOG to only show when verbose output is enabled.
 
#define LOG(args...)   vita_logf (__FILE__, __LINE__, args)
 Write a log entry.
 

Typedefs

typedef struct uidiv_result uidiv_result_t
 Division result.
 

stdarg.h functions

See stdarg.h documentation for details.

typedef __builtin_va_list va_list
 
#define va_start(ap, v)   __builtin_va_start(ap, v)
 
#define va_arg(ap, type)   __builtin_va_arg(ap, type)
 
#define va_end(ap)   __builtin_va_end(ap)
 

string.h functions

See string.h documention for details.

void * memcpy (void *destination, const void *source, u32_t num)
 
char * strcpy (char *destination, const char *source)
 
int memcmp (const void *ptr1, const void *ptr2, u32_t num)
 
int strcmp (const char *str1, const char *str2)
 
int strncmp (const char *str1, const char *str2, u32_t num)
 
void * memset (void *ptr, int value, u32_t num)
 
u32_t strlen (const char *str)
 

stdio.h functions

See stdio.h documention for details.

int vsprintf (char *str, const char *fmt, va_list ap)
 Simple vsprintf.
 
int sprintf (char *str, const char *format,...)
 Simple sprintf.
 

Additional functions

char * memstr (char *haystack, int h_length, char *needle, int n_length)
 Search for a string in memory.
 
uidiv_result_t uidiv (u32_t num, u32_t dem)
 Unsigned integer division.
 
void vita_init_log ()
 Sets the logging function.
 
void vita_logf (char *file, int line,...)
 Writes a log entry.
 

Detailed Description

String and memory functions.

Typedef Documentation

typedef struct uidiv_result uidiv_result_t

Division result.

See Also
uidiv

Function Documentation

char* memstr ( char *  haystack,
int  h_length,
char *  needle,
int  n_length 
)

Search for a string in memory.

Uses the Boyer-Moore algorithm to search.

Returns
First occurrence of needle in haystack
Parameters
haystackWhere to search
h_lengthLength of haystack
needleString to find
n_lengthLength of needle
int sprintf ( char *  str,
const char *  format,
  ... 
)

Simple sprintf.

Only supports c, s, u, x, X with optional zero padding. Always returns zero.

uidiv_result_t uidiv ( u32_t  num,
u32_t  dem 
)

Unsigned integer division.

ARM does not have native division support

Returns
Result of operation or zero if dividing by zero.
Parameters
numNumerator
demDenominator
void vita_logf ( char *  file,
int  line,
  ... 
)

Writes a log entry.

Writes log to all places set in options including log file, on screen, and console.

Parameters
fileSource file of code writing to log
lineLine number of code writing to log
int vsprintf ( char *  str,
const char *  fmt,
va_list  ap 
)

Simple vsprintf.

Only supports c, s, u, x, X with optional zero padding. Always returns zero.