sxlist_mngr.c File Reference

#include "sxversion.h"
#include "sxcommon.h"
#include "sxlist.h"
#include "SS.h"
#include "sxalloc.h"
#include <memory.h>
#include <unistd.h>
#include <string.h>
Include dependency graph for sxlist_mngr.c:

Go to the source code of this file.

Defines

#define SX_GLOBAL_VAR_LIST_HEADER
#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))
#define SXLIST_STR1_SIZE_   128
#define SXLIST_STR2_SIZE_   14
#define sxlist_init_str(s)
#define sxlist_cat_str(s, n)   memcpy (sxlist_str_ + sxlist_str_lgth_, s, n)

Functions

static void sxlist_list_oflw (sxindex_header *list_hd, SXINT old_line_nb, SXINT old_size)
static void sxlist_hd_oflw (SXINT old_size, SXINT new_size)
static void sxlist_elem_oflw (sxindex_header *elem_hd, SXINT old_line_nb, SXINT old_size)
void sxlist_alloc (sxlist_header *h, char *name, SXINT init_elem_nb, SXINT average_list_nb_per_bucket, SXINT average_list_size, SXINT(*user_list_oflw)(SXINT, SXINT), SXINT(*user_elem_oflw)(SXINT, SXINT), FILE *stat_file)
void sxlist_stat (FILE *stat_file, sxlist_header *header)
void sxlist_free (sxlist_header *h)
SXBOOLEAN sxlist_set (sxlist_header *h, SXINT scrmbl, SXINT *elem_stack, SXINT *result)
void sxlist_erase (sxlist_header *h, SXINT l)
SXBOOLEAN sxlist_write (sxlist_header *header, sxfiledesc_t file_descr)
SXBOOLEAN sxlist_read (sxlist_header *header, sxfiledesc_t file_descr, char *name, SXINT(*list_oflw)(SXINT, SXINT), SXINT(*elem_oflw)(SXINT, SXINT), FILE *stat_file)
static void print_list_to_attr (SXINT x)
static void print_buckets (SXINT x)
static void sxlist_out_tab_int (FILE *file, char *name, SXINT *tab, SXINT size, SXINT top)
static void sxlist_out_tab_struct (FILE *file, char *struct_name, char *name, void(*print)(SXINT), SXINT size, SXINT top)
void sxlist_array_to_c (sxlist_header *header, FILE *file, char *name)
void sxlist_header_to_c (sxlist_header *header, FILE *file, char *name)
void sxlist_to_c (sxlist_header *header, FILE *file, char *name, SXBOOLEAN is_static)
void sxlist_reuse (sxlist_header *header, char *name, SXINT(*user_list_oflw)(SXINT, SXINT), SXINT(*user_elem_oflw)(SXINT, SXINT), FILE *stat_file)

Variables

char WHAT_SXLIST_MNGR [] = "@(#)SYNTAX - $Id: sxlist_mngr.c 1429 2008-07-03 14:28:41Z rlacroix $" WHAT_DEBUG
static SXINT bytes
static sxlist_header * _p_hd
static FILE * _file
static char sxlist_str_ [SXLIST_STR1_SIZE_+SXLIST_STR2_SIZE_]
static SXINT sxlist_str_lgth_

Define Documentation

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

Definition at line 316 of file sxlist_mngr.c.

#define SX_GLOBAL_VAR_LIST_HEADER

Definition at line 43 of file sxlist_mngr.c.

#define sxlist_cat_str ( s,
n   )     memcpy (sxlist_str_ + sxlist_str_lgth_, s, n)

Definition at line 399 of file sxlist_mngr.c.

Referenced by sxlist_array_to_c(), and sxlist_header_to_c().

#define sxlist_init_str (  ) 
Value:

Definition at line 396 of file sxlist_mngr.c.

Referenced by sxlist_array_to_c(), and sxlist_header_to_c().

#define SXLIST_STR1_SIZE_   128

Definition at line 392 of file sxlist_mngr.c.

#define SXLIST_STR2_SIZE_   14

Definition at line 393 of file sxlist_mngr.c.

#define WRITE ( p,
 )     ((bytes=(l))>0&&(write(file_descr, p, (size_t)bytes) == bytes))

Definition at line 315 of file sxlist_mngr.c.


Function Documentation

static void print_buckets ( SXINT  x  )  [static]

Definition at line 381 of file sxlist_mngr.c.

Referenced by sxlist_array_to_c().

static void print_list_to_attr ( SXINT  x  )  [static]

Definition at line 367 of file sxlist_mngr.c.

Referenced by sxlist_array_to_c().

void sxlist_alloc ( sxlist_header *  h,
char name,
SXINT  init_elem_nb,
SXINT  average_list_nb_per_bucket,
SXINT  average_list_size,
SXINT(*)(SXINT, SXINT)  user_list_oflw,
SXINT(*)(SXINT, SXINT)  user_elem_oflw,
FILE *  stat_file 
)
void sxlist_array_to_c ( sxlist_header *  header,
FILE *  file,
char name 
)
static void sxlist_elem_oflw ( sxindex_header *  elem_hd,
SXINT  old_line_nb,
SXINT  old_size 
) [static]

Definition at line 100 of file sxlist_mngr.c.

Referenced by sxlist_alloc(), and sxlist_reuse().

void sxlist_erase ( sxlist_header *  h,
SXINT  l 
)

Definition at line 277 of file sxlist_mngr.c.

References p, r, and X_is_set().

Referenced by GC_states().

void sxlist_free ( sxlist_header *  h  ) 

Definition at line 179 of file sxlist_mngr.c.

References sxlist_stat(), and X_free().

Referenced by sxdp_free().

static void sxlist_hd_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 83 of file sxlist_mngr.c.

References X_root_int_cpy().

Referenced by sxlist_alloc(), sxlist_read(), and sxlist_reuse().

void sxlist_header_to_c ( sxlist_header *  header,
FILE *  file,
char name 
)

Definition at line 468 of file sxlist_mngr.c.

References sxindex_header_to_c(), sxlist_cat_str, sxlist_init_str, and X_header_to_c().

Referenced by sxlist_to_c().

static void sxlist_list_oflw ( sxindex_header *  list_hd,
SXINT  old_line_nb,
SXINT  old_size 
) [static]

Definition at line 58 of file sxlist_mngr.c.

Referenced by sxlist_alloc(), and sxlist_reuse().

static void sxlist_out_tab_int ( FILE *  file,
char name,
SXINT *  tab,
SXINT  size,
SXINT  top 
) [static]

Definition at line 402 of file sxlist_mngr.c.

Referenced by sxlist_array_to_c().

static void sxlist_out_tab_struct ( FILE *  file,
char struct_name,
char name,
void(*)(SXINT)  print,
SXINT  size,
SXINT  top 
) [static]

Definition at line 419 of file sxlist_mngr.c.

Referenced by sxlist_array_to_c().

SXBOOLEAN sxlist_read ( sxlist_header *  header,
sxfiledesc_t  file_descr,
char name,
SXINT(*)(SXINT, SXINT)  list_oflw,
SXINT(*)(SXINT, SXINT)  elem_oflw,
FILE *  stat_file 
)

Definition at line 334 of file sxlist_mngr.c.

References READ, SXBOOLEAN, sxindex_read(), sxlist_hd_oflw(), and X_read().

Referenced by sxdp_read().

void sxlist_reuse ( sxlist_header *  header,
char name,
SXINT(*)(SXINT, SXINT)  user_list_oflw,
SXINT(*)(SXINT, SXINT)  user_elem_oflw,
FILE *  stat_file 
)

Definition at line 515 of file sxlist_mngr.c.

References sxindex_reuse(), sxlist_elem_oflw(), sxlist_hd_oflw(), sxlist_list_oflw(), and X_reuse().

Referenced by sxdp_G0().

SXBOOLEAN sxlist_set ( sxlist_header *  h,
SXINT  scrmbl,
SXINT *  elem_stack,
SXINT *  result 
)

Definition at line 205 of file sxlist_mngr.c.

References in, r, SXFALSE, sxindex_seek(), SXTRUE, and X_set().

Referenced by sxdp_add_new_state(), and sxdp_init_state().

void sxlist_stat ( FILE *  stat_file,
sxlist_header *  header 
)

Definition at line 155 of file sxlist_mngr.c.

Referenced by sxlist_free().

void sxlist_to_c ( sxlist_header *  header,
FILE *  file,
char name,
SXBOOLEAN  is_static 
)

Definition at line 504 of file sxlist_mngr.c.

References sxlist_array_to_c(), and sxlist_header_to_c().

SXBOOLEAN sxlist_write ( sxlist_header *  header,
sxfiledesc_t  file_descr 
)

Definition at line 320 of file sxlist_mngr.c.

References sxindex_write(), WRITE, and X_write().

Referenced by sxdp_write().


Variable Documentation

FILE* _file [static]

Definition at line 364 of file sxlist_mngr.c.

sxlist_header* _p_hd [static]

Definition at line 363 of file sxlist_mngr.c.

SXINT bytes [static]

Definition at line 317 of file sxlist_mngr.c.

char sxlist_str_[SXLIST_STR1_SIZE_+SXLIST_STR2_SIZE_] [static]

Definition at line 394 of file sxlist_mngr.c.

SXINT sxlist_str_lgth_ [static]

Definition at line 395 of file sxlist_mngr.c.

char WHAT_SXLIST_MNGR[] = "@(#)SYNTAX - $Id: sxlist_mngr.c 1429 2008-07-03 14:28:41Z rlacroix $" WHAT_DEBUG

Definition at line 54 of file sxlist_mngr.c.


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