sxword_mngr.c File Reference

#include "sxversion.h"
#include "sxunix.h"
#include "sxword.h"
#include "sxscrmbl.h"
#include <string.h>
#include <unistd.h>
Include dependency graph for sxword_mngr.c:

Go to the source code of this file.

Defines

#define SXCHAR_TO_STRING(c)   ((sxc_to_str+128)[c])
#define WRITE(p, l)   ((bytes=(l))>0&&(write(file_descr, p, (size_t)bytes) == bytes))
#define READ(p, l)   ((bytes=(l))>0&&(read (file_descr, p, (size_t)bytes) == bytes))

Functions

charsxword_get (sxword_header *header, SXINT ste)
SXUINT sxword_len (sxword_header *header, SXINT ste)
SXINT sxword_2save (sxword_header *header, char *string, SXUINT sxword_2save_strlen)
SXINT sxword_2retrieve (sxword_header *header, char *string, SXUINT strlength)
SXINT sxword_retrieve (sxword_header *header, char *string)
SXINT sxword_save (sxword_header *header, char *string)
void sxword_stat (sxword_header *header, FILE *stat_file)
static struct sxword_string * free_strings (struct sxword_string *string, void(*sxword_string_free)(void *))
void sxword_clear (sxword_header *header)
void sxword_alloc (sxword_header *header, char *area_name, SXUINT init_words_nb, SXUINT average_word_nb_per_bucket, SXUINT average_word_lgth, void *(*sxword_alloc_malloc)(size_t), void *(*sxword_alloc_calloc)(size_t, size_t), void *(*sxword_alloc_realloc)(void *, size_t), void *(*resize)(void *, size_t), void(*sxword_alloc_free)(void *), void(*oflw)(SXINT, SXINT), FILE *stat_file)
void sxword_free (sxword_header *header)
static SXBOOLEAN write_table (sxword_header *header, sxfiledesc_t file_descr)
static SXBOOLEAN read_table (sxword_header *header, sxfiledesc_t file_descr)
SXBOOLEAN sxword_write (sxword_header *header, sxfiledesc_t file_descr)
SXBOOLEAN sxword_read (sxword_header *header, sxfiledesc_t file_descr, char *area_name, void *(*sxword_read_malloc)(size_t), void *(*sxword_read_calloc)(size_t, size_t), void *(*sxword_read_realloc)(void *, size_t), void *(*resize)(void *, size_t), void(*sxword_read_free)(void *), void(*oflw)(SXINT, SXINT), FILE *stat_file)
SXUINT sxword_array_to_c (sxword_header *header, FILE *file, char *name)
void sxword_header_to_c (sxword_header *header, FILE *file, char *name, SXUINT total_lgth)
void sxword_to_c (sxword_header *header, FILE *file, char *name, SXBOOLEAN is_static)
void sxword_reuse (sxword_header *header, char *area_name, void *(*sxword_reuse_malloc)(size_t), void *(*sxword_reuse_calloc)(size_t, size_t), void *(*sxword_reuse_realloc)(void *, size_t), void *(*resize)(void *, size_t), void(*sxword_reuse_free)(void *), void(*oflw)(SXINT, SXINT), FILE *stat_file)

Variables

char WHAT_SXWORD_MNGR [] = "@(#)SYNTAX - $Id: sxword_mngr.c 1672 2008-12-05 12:18:19Z sagot $" WHAT_DEBUG
charsxc_to_str []

Define Documentation

#define READ ( p,
 )     ((bytes=(l))>0&&(read (file_descr, p, (size_t)bytes) == bytes))

Definition at line 430 of file sxword_mngr.c.

#define SXCHAR_TO_STRING (  )     ((sxc_to_str+128)[c])
#define WRITE ( p,
 )     ((bytes=(l))>0&&(write(file_descr, p, (size_t)bytes) == bytes))

Definition at line 429 of file sxword_mngr.c.


Function Documentation

static struct sxword_string* free_strings ( struct sxword_string *  string,
void(*)(void *)  sxword_string_free 
) [static, read]

Definition at line 295 of file sxword_mngr.c.

Referenced by sxword_clear(), and sxword_free().

static SXBOOLEAN read_table ( sxword_header *  header,
sxfiledesc_t  file_descr 
) [static]

Definition at line 456 of file sxword_mngr.c.

References bytes, p, READ, SXFALSE, and SXTRUE.

Referenced by sxword_read().

SXINT sxword_2retrieve ( sxword_header *  header,
char string,
SXUINT  strlength 
)
SXINT sxword_2save ( sxword_header *  header,
char string,
SXUINT  sxword_2save_strlen 
)
void sxword_alloc ( sxword_header *  header,
char area_name,
SXUINT  init_words_nb,
SXUINT  average_word_nb_per_bucket,
SXUINT  average_word_lgth,
void *(*)(size_t)  sxword_alloc_malloc,
void *(*)(size_t, size_t)  sxword_alloc_calloc,
void *(*)(void *, size_t)  sxword_alloc_realloc,
void *(*)(void *, size_t)  resize,
void(*)(void *)  sxword_alloc_free,
void(*)(SXINT, SXINT)  oflw,
FILE *  stat_file 
)
SXUINT sxword_array_to_c ( sxword_header *  header,
FILE *  file,
char name 
)

Definition at line 543 of file sxword_mngr.c.

References SXCHAR_TO_STRING.

Referenced by sxre_array_to_c(), and sxword_to_c().

void sxword_clear ( sxword_header *  header  ) 

Definition at line 314 of file sxword_mngr.c.

References free_strings().

Referenced by sxspell_do_it(), and sxword_alloc().

void sxword_free ( sxword_header *  header  ) 
char* sxword_get ( sxword_header *  header,
SXINT  ste 
)

Definition at line 53 of file sxword_mngr.c.

void sxword_header_to_c ( sxword_header *  header,
FILE *  file,
char name,
SXUINT  total_lgth 
)

Definition at line 614 of file sxword_mngr.c.

Referenced by sxre_header_to_c(), and sxword_to_c().

SXUINT sxword_len ( sxword_header *  header,
SXINT  ste 
)

Definition at line 67 of file sxword_mngr.c.

SXBOOLEAN sxword_read ( sxword_header *  header,
sxfiledesc_t  file_descr,
char area_name,
void *(*)(size_t)  sxword_read_malloc,
void *(*)(size_t, size_t)  sxword_read_calloc,
void *(*)(void *, size_t)  sxword_read_realloc,
void *(*)(void *, size_t)  resize,
void(*)(void *)  sxword_read_free,
void(*)(SXINT, SXINT)  oflw,
FILE *  stat_file 
)

Definition at line 501 of file sxword_mngr.c.

References bytes, READ, and read_table().

Referenced by sxre_read().

SXINT sxword_retrieve ( sxword_header *  header,
char string 
)
void sxword_reuse ( sxword_header *  header,
char area_name,
void *(*)(size_t)  sxword_reuse_malloc,
void *(*)(size_t, size_t)  sxword_reuse_calloc,
void *(*)(void *, size_t)  sxword_reuse_realloc,
void *(*)(void *, size_t)  resize,
void(*)(void *)  sxword_reuse_free,
void(*)(SXINT, SXINT)  oflw,
FILE *  stat_file 
)

Definition at line 660 of file sxword_mngr.c.

Referenced by make_proper_semact(), make_tdef_semact(), and sxre_reuse().

SXINT sxword_save ( sxword_header *  header,
char string 
)

Definition at line 237 of file sxword_mngr.c.

References sxword_2save().

Referenced by make_proper_semact(), and reg_exp_pcn_alloc().

void sxword_stat ( sxword_header *  header,
FILE *  stat_file 
)

Definition at line 246 of file sxword_mngr.c.

Referenced by sxword_free().

void sxword_to_c ( sxword_header *  header,
FILE *  file,
char name,
SXBOOLEAN  is_static 
)

Definition at line 647 of file sxword_mngr.c.

References sxword_array_to_c(), and sxword_header_to_c().

SXBOOLEAN sxword_write ( sxword_header *  header,
sxfiledesc_t  file_descr 
)

Definition at line 482 of file sxword_mngr.c.

References bytes, WRITE, and write_table().

Referenced by sxre_write().

static SXBOOLEAN write_table ( sxword_header *  header,
sxfiledesc_t  file_descr 
) [static]

Definition at line 433 of file sxword_mngr.c.

References bytes, p, SXFALSE, SXTRUE, and WRITE.

Referenced by sxword_write().


Variable Documentation

Definition at line 41 of file sxc_to_str.c.

Referenced by nds_recovery(), and recovery().

char WHAT_SXWORD_MNGR[] = "@(#)SYNTAX - $Id: sxword_mngr.c 1672 2008-12-05 12:18:19Z sagot $" WHAT_DEBUG

Definition at line 34 of file sxword_mngr.c.


Generated on Wed Apr 21 16:39:39 2010 for syntax-6.0b7 by  doxygen 1.6.1