util.c File Reference

#include "util.h"
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>

Defines

#define UTIL_H_IMPLEMENTATION
#define MAXSTRLEN   256
#define RINGSIZE   16
#define O_BINARY   0

Functions

icharistrdup (const ichar *s)
icharistrcpy (ichar *d, const ichar *s)
int istrcaseeq (const ichar *s1, const ichar *s2)
int istrncaseeq (const ichar *s1, const ichar *s2, int len)
int istrprefix (const ichar *pref, const ichar *s)
icharistrchr (const ichar *s, int c)
icharistrupper (ichar *s)
icharistrlower (ichar *s)
int istrhash (const ichar *t, int tsize)
int istrcasehash (const ichar *t, int tsize)
int istrtol (const ichar *s, long *val)
icharbufnew_icharbuf ()
void free_icharbuf (icharbuf *buf)
void __add_icharbuf (icharbuf *buf, int chr)
void del_icharbuf (icharbuf *buf)
void terminate_icharbuf (icharbuf *buf)
void empty_icharbuf (icharbuf *buf)
int ostrlen (const ochar *s)
ocharostrdup (const ochar *s)
ocharbufnew_ocharbuf ()
void free_ocharbuf (ocharbuf *buf)
void __add_ocharbuf (ocharbuf *buf, int chr)
void del_ocharbuf (ocharbuf *buf)
void terminate_ocharbuf (ocharbuf *buf)
void empty_ocharbuf (ocharbuf *buf)
char * str2ring (const char *in)
char * ringallo (size_t size)
char const * str_summary (char const *s, int len)
icharload_sgml_file_to_charp (const char *file, int normalise_rsre, int *length)
void sgml_nomem ()
void * sgml_malloc (size_t size)
void * sgml_realloc (void *old, size_t size)
void * sgml_calloc (size_t n, size_t size)
void sgml_free (void *mem)

Variables

static char * ring [RINGSIZE]
static int ringp

Define Documentation

#define MAXSTRLEN   256
 

#define O_BINARY   0
 

#define RINGSIZE   16
 

#define UTIL_H_IMPLEMENTATION
 


Function Documentation

void __add_icharbuf icharbuf buf,
int  chr
 

void __add_ocharbuf ocharbuf buf,
int  chr
 

void del_icharbuf icharbuf buf  ) 
 

void del_ocharbuf ocharbuf buf  ) 
 

void empty_icharbuf icharbuf buf  ) 
 

void empty_ocharbuf ocharbuf buf  ) 
 

void free_icharbuf icharbuf buf  ) 
 

void free_ocharbuf ocharbuf buf  ) 
 

int istrcaseeq const ichar s1,
const ichar s2
 

int istrcasehash const ichar t,
int  tsize
 

ichar* istrchr const ichar s,
int  c
 

ichar* istrcpy ichar d,
const ichar s
 

ichar* istrdup const ichar s  ) 
 

int istrhash const ichar t,
int  tsize
 

ichar* istrlower ichar s  ) 
 

int istrncaseeq const ichar s1,
const ichar s2,
int  len
 

int istrprefix const ichar pref,
const ichar s
 

int istrtol const ichar s,
long *  val
 

ichar* istrupper ichar s  ) 
 

ichar* load_sgml_file_to_charp const char *  file,
int  normalise_rsre,
int length
 

icharbuf* new_icharbuf void   ) 
 

ocharbuf* new_ocharbuf void   ) 
 

ochar* ostrdup const ochar s  ) 
 

int ostrlen const ochar s  ) 
 

char* ringallo size_t  size  ) 
 

void* sgml_calloc size_t  n,
size_t  size
 

void sgml_free void *  mem  ) 
 

void* sgml_malloc size_t  size  ) 
 

void sgml_nomem void   ) 
 

void* sgml_realloc void *  old,
size_t  size
 

char* str2ring const char *  in  ) 
 

char const* str_summary char const *  s,
int  len
 

void terminate_icharbuf icharbuf buf  ) 
 

void terminate_ocharbuf ocharbuf buf  ) 
 


Variable Documentation

char* ring[RINGSIZE] [static]
 

int ringp [static]
 


Generated on Wed Jul 26 13:26:56 2006 for XSB by  doxygen 1.4.5