UVLoader
Userland Vita Loader
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Data Structures | Macros | Typedefs
utils.h File Reference

Common functions. More...

#include "types.h"

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.
 

Functions

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.
 

stdarg.h functions

See stdarg.h documentation for details.

#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)
 
typedef __builtin_va_list va_list
 

Detailed Description

Common functions.