utils.c File Reference

#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)
voidxcalloc (size_t a, size_t b)
voidxmalloc (size_t n)
voidxrealloc (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)


Function Documentation

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().

double get_time ( void   ) 

Definition at line 27 of file utils.c.

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().

void* xrealloc ( void ptr,
size_t  size 
)

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 
)

Definition at line 44 of file utils.c.

Referenced by GenerateTables(), and get_music_file().

char* xstrcat2 ( const char *  s1,
const char *  s2 
)

Definition at line 109 of file utils.c.

Referenced by get_homedir().

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().


Generated on Fri Sep 28 00:35:47 2007 for raceintospace by  doxygen 1.5.3