sxsubset_mngr.c File Reference

#include "sxversion.h"
#include "sxcommon.h"
#include "sxsubset.h"
#include "sxalloc.h"
#include <memory.h>
#include <unistd.h>
#include <string.h>
Include dependency graph for sxsubset_mngr.c:

Go to the source code of this file.

Defines

#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 SXSUBSET_STR1_SIZE_   128
#define SXSUBSET_STR2_SIZE_   14
#define sxsubset_init_str(s)
#define sxsubset_cat_str(s, n)   memcpy (sxsubset_str_ + sxsubset_str_lgth_, s, n)

Functions

SXINT sxnext_prime (SXINT germe)
static void sxsubset_subset_oflw (sxindex_header *subset_hd, SXINT old_line_nb, SXINT old_size)
void sxsubset_elem_oflw (sxsubset_header *h, SXINT new_cardinal)
void sxsubset_alloc (sxsubset_header *h, SXINT subset_nb, SXINT cardinal, SXINT(*user_subset_oflw)(SXINT, SXINT), SXINT(*user_elem_oflw)(SXINT, SXINT), FILE *stat_file)
void sxsubset_stat (FILE *stat_file, sxsubset_header *h)
void sxsubset_free (sxsubset_header *h)
SXINT sxsubset_seek (sxsubset_header *h)
SXBOOLEAN sxsubset_unset (sxsubset_header *h, SXINT subset_nb)
SXINT sxsubset_set (sxsubset_header *h, SXINT subset_nb)
SXBOOLEAN sxsubset_write (sxsubset_header *header, sxfiledesc_t file_descr)
SXBOOLEAN sxsubset_read (sxsubset_header *header, sxfiledesc_t file_descr, char *name, SXINT(*subset_oflw)(SXINT, SXINT), SXINT(*elem_oflw)(SXINT, SXINT), FILE *stat_file)
static void print_display (SXINT x)
static void sxsubset_out_tab_int (FILE *file, char *name, SXINT *tab, SXINT size)
static void sxsubset_out_tab_struct (FILE *file, char *struct_name, char *name, void(*print)(SXINT), SXINT size, SXINT top)
void sxsubset_array_to_c (sxsubset_header *header, FILE *file, char *name)
void sxsubset_header_to_c (sxsubset_header *header, FILE *file, char *name)
void sxsubset_to_c (sxsubset_header *header, FILE *file, char *name, SXBOOLEAN is_static)
void sxsubset_reuse (sxsubset_header *header, SXINT(*user_subset_oflw)(SXINT, SXINT), SXINT(*user_elem_oflw)(SXINT, SXINT), FILE *stat_file)

Variables

char WHAT_SXSUBSET_MNGR [] = "@(#)SYNTAX - $Id: sxsubset_mngr.c 1429 2008-07-03 14:28:41Z rlacroix $" WHAT_DEBUG
static SXINT bytes
static sxsubset_header * _p_hd
static FILE * _file
static char sxsubset_str_ [SXSUBSET_STR1_SIZE_+SXSUBSET_STR2_SIZE_]
static SXINT sxsubset_str_lgth_

Define Documentation

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

Definition at line 327 of file sxsubset_mngr.c.

#define sxsubset_cat_str ( s,
n   )     memcpy (sxsubset_str_ + sxsubset_str_lgth_, s, n)

Definition at line 402 of file sxsubset_mngr.c.

Referenced by sxsubset_array_to_c(), and sxsubset_header_to_c().

#define sxsubset_init_str (  ) 
Value:

Definition at line 399 of file sxsubset_mngr.c.

Referenced by sxsubset_array_to_c(), and sxsubset_header_to_c().

#define SXSUBSET_STR1_SIZE_   128

Definition at line 395 of file sxsubset_mngr.c.

#define SXSUBSET_STR2_SIZE_   14

Definition at line 396 of file sxsubset_mngr.c.

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

Definition at line 326 of file sxsubset_mngr.c.


Function Documentation

static void print_display ( SXINT  x  )  [static]

Definition at line 384 of file sxsubset_mngr.c.

Referenced by sxsubset_array_to_c().

SXINT sxnext_prime ( SXINT  germe  ) 

Definition at line 60 of file sxnext_prime.c.

void sxsubset_alloc ( sxsubset_header *  h,
SXINT  subset_nb,
SXINT  cardinal,
SXINT(*)(SXINT, SXINT)  user_subset_oflw,
SXINT(*)(SXINT, SXINT)  user_elem_oflw,
FILE *  stat_file 
)

Definition at line 176 of file sxsubset_mngr.c.

References p, sxbm_calloc(), sxindex_alloc(), sxnext_prime(), and sxsubset_subset_oflw().

void sxsubset_array_to_c ( sxsubset_header *  header,
FILE *  file,
char name 
)
void sxsubset_elem_oflw ( sxsubset_header *  h,
SXINT  new_cardinal 
)

Definition at line 144 of file sxsubset_mngr.c.

References sxbm_calloc(), and sxbm_resize().

void sxsubset_free ( sxsubset_header *  h  ) 

Definition at line 230 of file sxsubset_mngr.c.

References sxbm_free(), and sxsubset_stat().

void sxsubset_header_to_c ( sxsubset_header *  header,
FILE *  file,
char name 
)

Definition at line 466 of file sxsubset_mngr.c.

References sxindex_header_to_c(), sxsubset_cat_str, and sxsubset_init_str.

Referenced by sxsubset_to_c().

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

Definition at line 405 of file sxsubset_mngr.c.

Referenced by sxsubset_array_to_c().

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

Definition at line 423 of file sxsubset_mngr.c.

Referenced by sxsubset_array_to_c().

SXBOOLEAN sxsubset_read ( sxsubset_header *  header,
sxfiledesc_t  file_descr,
char name,
SXINT(*)(SXINT, SXINT)  subset_oflw,
SXINT(*)(SXINT, SXINT)  elem_oflw,
FILE *  stat_file 
)

Definition at line 348 of file sxsubset_mngr.c.

References READ, sxbm_calloc(), sxbm_read(), SXBOOLEAN, and sxindex_read().

void sxsubset_reuse ( sxsubset_header *  header,
SXINT(*)(SXINT, SXINT)  user_subset_oflw,
SXINT(*)(SXINT, SXINT)  user_elem_oflw,
FILE *  stat_file 
)

Definition at line 506 of file sxsubset_mngr.c.

SXINT sxsubset_seek ( sxsubset_header *  h  ) 

Definition at line 246 of file sxsubset_mngr.c.

References sxindex_seek().

SXINT sxsubset_set ( sxsubset_header *  h,
SXINT  subset_nb 
)

Definition at line 285 of file sxsubset_mngr.c.

References p.

void sxsubset_stat ( FILE *  stat_file,
sxsubset_header *  h 
)

Definition at line 208 of file sxsubset_mngr.c.

References top.

Referenced by sxsubset_free().

static void sxsubset_subset_oflw ( sxindex_header *  subset_hd,
SXINT  old_line_nb,
SXINT  old_size 
) [static]

Definition at line 70 of file sxsubset_mngr.c.

References p, q, sxba_copy(), sxbm_calloc(), sxbm_resize(), and sxnext_prime().

Referenced by sxsubset_alloc().

void sxsubset_to_c ( sxsubset_header *  header,
FILE *  file,
char name,
SXBOOLEAN  is_static 
)

Definition at line 495 of file sxsubset_mngr.c.

References sxsubset_array_to_c(), and sxsubset_header_to_c().

SXBOOLEAN sxsubset_unset ( sxsubset_header *  h,
SXINT  subset_nb 
)

Definition at line 262 of file sxsubset_mngr.c.

References p.

SXBOOLEAN sxsubset_write ( sxsubset_header *  header,
sxfiledesc_t  file_descr 
)

Definition at line 331 of file sxsubset_mngr.c.

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


Variable Documentation

FILE* _file [static]

Definition at line 380 of file sxsubset_mngr.c.

sxsubset_header* _p_hd [static]

Definition at line 379 of file sxsubset_mngr.c.

SXINT bytes [static]

Definition at line 328 of file sxsubset_mngr.c.

char sxsubset_str_[SXSUBSET_STR1_SIZE_+SXSUBSET_STR2_SIZE_] [static]

Definition at line 397 of file sxsubset_mngr.c.

SXINT sxsubset_str_lgth_ [static]

Definition at line 398 of file sxsubset_mngr.c.

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

Definition at line 65 of file sxsubset_mngr.c.


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