#include "utils.h"
#include "logging.h"
#include <assert.h>
#include <errno.h>
#include <ctype.h>
#include <memory.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
Go to the source code of this file.
Functions | |
ssize_t | fread_dyn (char **destp, size_t *n, FILE *stream) |
double | get_time (void) |
LOG_DEFAULT_CATEGORY (utils) | |
void * | xcalloc (size_t a, size_t b) |
void * | xmalloc (size_t n) |
void * | xrealloc (void *ptr, size_t size) |
int | xstrcasecmp (const char *a, const char *b) |
char * | xstrcat2 (const char *s1, const char *s2) |
char * | xstrdup (const char *s) |
duplicates a string and returns a pointer to the new string | |
int | xstrncasecmp (const char *a, const char *b, size_t n) |
ssize_t fread_dyn | ( | char ** | destp, | |
size_t * | n, | |||
FILE * | stream | |||
) |
Definition at line 134 of file utils.c.
Referenced by music_load(), save_game(), and slurp_gamedat().
LOG_DEFAULT_CATEGORY | ( | utils | ) |
void* xcalloc | ( | size_t | a, | |
size_t | b | |||
) |
Definition at line 83 of file utils.c.
Referenced by alloc_dirty_tree(), av_setup(), and frm_read_tbl().
void* xmalloc | ( | size_t | n | ) |
Definition at line 69 of file utils.c.
Referenced by fread_dyn(), gxCreateVirtual(), Help(), init_theora(), init_vorbis(), load_audio_file(), main(), read_intro_images(), remove_savedat(), s_open_helper(), setup_options(), VAB(), xstrcat2(), and xstrdup().
Definition at line 120 of file utils.c.
Referenced by fread_dyn(), frm_read_tbl(), load_audio_file(), main(), music_load(), parse_var_value(), PortOutLine(), and s_open_helper().
int xstrcasecmp | ( | const char * | a, | |
const char * | b | |||
) |
char* xstrcat2 | ( | const char * | s1, | |
const char * | s2 | |||
) |
char* xstrdup | ( | const char * | s | ) |
duplicates a string and returns a pointer to the new string
Definition at line 99 of file utils.c.
Referenced by frm_read_tbl(), get_homedir(), and setup_options().
int xstrncasecmp | ( | const char * | a, | |
const char * | b, | |||
size_t | n | |||
) |
Definition at line 56 of file utils.c.
Referenced by DoPack(), get_music(), GetFailStat(), Help(), and next_saved_game().