Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

util.c File Reference

#include "config.h"
#include "misc.h"
#include "lisp.h"
#include "dir.h"

Include dependency graph for util.c:

Include dependency graph

Namespaces

namespace  Xconq

Classes

struct  a_malloc
struct  a_timeline_entry
struct  a_timeline_block

Defines

#define INT64   long long
#define NUMMALLOCRECS   200
#define BLOCKSIZE   10000

Typedefs

typedef a_timeline_block TimelineBlock

Functions

void init_xrandom (int seed)
int xrandom (int m)
int probability (int prob)
int prob_fraction (int n)
void report_malloc ()
void * xmalloc (int amt)
void tprintf (char *buf, char *str,...)
void tnprintf (char *buf, int n, char *str,...)
void vtprintf (char *buf, char *str, va_list ap)
int select_by_weight (int *arr, int numvals)
char * copy_string (char *str)
char * pad_blanks (char *str, int n)
int iindex (int ch, char *str)
long idifftime (time_t t1, time_t t0)
void case_panic (char *str, int var)
int isqrt (int i)
void init_debug_to_stdout ()
void update_debugging ()
void toggle_debugging (int *flagp)
void debug_printf (char *str,...)
void debugm_printf (char *str,...)
void debugg_printf (char *str,...)
void record_activity_start (char *type, int detail)
void record_activity_end (char *type, int detail)
void dump_activity_trace (void)
void init_error (char *str,...)
void init_warning (char *str,...)
void run_error (char *str,...)
void run_warning (char *str,...)
void log_warning (char *typ, char *str)
PackedBoolTablecreate_packed_bool_table (int m, int n)
 Prototypes of functions used in the packed boolean implementation.

void init_packed_bool_table (PackedBoolTable *tbl)
void destroy_packed_bool_table (PackedBoolTable *tbl)

Variables

int my_rid = 0
 My remote id.

int master_rid = 0
 Master remote id.

LibraryPathxconq_libs
 Library path list.

LibraryPathlast_user_xconq_lib
 Last user library.

int dirx [NUMDIRS] = DIRX
 X delta array.

int diry [NUMDIRS] = DIRY
int warnings_suppressed
 Warnings suppressed flag.

int warnings_logged = TRUE
 Warnings logged.

int xmalloc_warnings
 Memory warning flag.

int memory_exhausted
 Memory exhausted flag.

long initrandstate = -1
long randstate = -1
int overflow
int numoverflow
int totmalloc
int nextmalloc
int copymalloc
int grandtotmalloc
a_mallocmallocs
int Debug = FALSE
int DebugM = FALSE
int DebugG = FALSE
FILE * dfp = NULL
FILE * dgfp = NULL
FILE * dmfp = NULL
FILE * ffp = NULL
int firstdebug = TRUE
int activity_trace

Define Documentation

#define BLOCKSIZE   10000
 

#define INT64   long long
 

#define NUMMALLOCRECS   200
 


Typedef Documentation

typedef struct a_timeline_block TimelineBlock
 


Function Documentation

void case_panic char *  str,
int  var
 

char* copy_string char *  str  ) 
 

PackedBoolTable* create_packed_bool_table int  m,
int  n
 

Prototypes of functions used in the packed boolean implementation.

void debug_printf char *  str,
... 
 

void debugg_printf char *  str,
... 
 

void debugm_printf char *  str,
... 
 

void destroy_packed_bool_table PackedBoolTable tbl  ) 
 

void dump_activity_trace void   ) 
 

long idifftime time_t  t1,
time_t  t0
 

int iindex int  ch,
char *  str
 

void init_debug_to_stdout void   ) 
 

void init_error char *  str,
... 
 

void init_packed_bool_table PackedBoolTable tbl  ) 
 

void init_warning char *  str,
... 
 

void init_xrandom int  seed  ) 
 

int isqrt int  i  ) 
 

void log_warning char *  typ,
char *  str
 

char* pad_blanks char *  str,
int  n
 

int prob_fraction int  n  ) 
 

int probability int  prob  ) 
 

void record_activity_end char *  type,
int  detail
 

void record_activity_start char *  type,
int  detail
 

void report_malloc void   ) 
 

void run_error char *  str,
... 
 

void run_warning char *  str,
... 
 

int select_by_weight int *  arr,
int  numvals
 

void tnprintf char *  buf,
int  n,
char *  str,
... 
 

void toggle_debugging int *  flagp  ) 
 

void tprintf char *  buf,
char *  str,
... 
 

void update_debugging void   ) 
 

void vtprintf char *  buf,
char *  str,
va_list  ap
 

void* xmalloc int  amt  ) 
 

int xrandom int  m  ) 
 


Variable Documentation

int activity_trace
 

int copymalloc
 

int Debug = FALSE
 

int DebugG = FALSE
 

int DebugM = FALSE
 

FILE* dfp = NULL
 

FILE* dgfp = NULL
 

int dirx[NUMDIRS] = DIRX
 

X delta array.

int diry[NUMDIRS] = DIRY
 

FILE* dmfp = NULL
 

FILE* ffp = NULL
 

int firstdebug = TRUE
 

int grandtotmalloc
 

long initrandstate = -1
 

LibraryPath* last_user_xconq_lib
 

Last user library.

Pointer to last LibraryPath loaded by user.

struct a_malloc * mallocs
 

int master_rid = 0
 

Master remote id.

int memory_exhausted
 

Memory exhausted flag.

int my_rid = 0
 

My remote id.

int nextmalloc
 

int numoverflow
 

int overflow
 

long randstate = -1
 

int totmalloc
 

int warnings_logged = TRUE
 

Warnings logged.

int warnings_suppressed
 

Warnings suppressed flag.

LibraryPath* xconq_libs
 

Library path list.

List of LibraryPath's to Xconq libraries (games)

int xmalloc_warnings
 

Memory warning flag.


Generated on Sat Sep 17 10:29:44 2005 for XconqKernel by doxygen 1.3.6