X_root_mngr.c File Reference

#include "sxversion.h"
#include "sxcommon.h"
#include "X_root.h"
#include <unistd.h>
Include dependency graph for X_root_mngr.c:

Go to the source code of this file.

Defines

#define max(x, y)   (((x) > (y)) ? (x) : (y))
#define min(x, y)   (((x) < (y)) ? (x) : (y))
#define WRITE(p, l)   if ((bytes = (l))>0 && ((size_t)write (F_X_root, p, bytes) != bytes)) return SXFALSE
#define READ(p, l)   if ((bytes = (l)) > 0 && ((size_t)read (F_X_root, p, bytes) != bytes)) return SXFALSE

Functions

SXINT sxnext_prime (SXINT germe)
static void X_root_sat_mess (FILE *stat_file, char *header_name, SXINT old_size, SXINT new_size)
void X_root_int_cpy (SXINT *old, SXINT *new, SXINT old_size)
void X_root_alloc (X_root_header *header, char *name, SXINT init_elem_nb, SXINT average_list_nb_per_bucket, void(*system_oflw)(SXINT), void(*user_oflw)(SXINT, SXINT), SXINT(*cmp)(SXINT), SXUINT(*scrmbl)(SXINT), SXINT(*suppress)(SXINT), SXINT(*assign)(SXINT), FILE *stat_file)
void X_root_clear (X_root_header *header)
void X_root_stat (FILE *stat_file, X_root_header *header)
void X_root_free (X_root_header *header)
SXINT X_root_is_set (X_root_header *header, SXUINT scramble)
SXINT X_root_gc (X_root_header *header)
SXBOOLEAN X_root_set (X_root_header *header, SXUINT scramble, SXINT *ref)
void X_root_lock (X_root_header *header)
SXBOOLEAN X_root_write (X_root_header *header, sxfiledesc_t F_X_root)
SXBOOLEAN X_root_read (X_root_header *header, sxfiledesc_t F_X_root)
void X_root_array_to_c (X_root_header *header, FILE *F_X, char *name)
void X_root_header_to_c (X_root_header *header, FILE *F_X, char *name)
void X_root_reuse (X_root_header *header, char *name, void(*system_oflw)(SXINT), void(*user_oflw)(SXINT, SXINT), SXINT(*cmp)(SXINT), SXUINT(*scrmbl)(SXINT), SXINT(*suppress)(SXINT), SXINT(*assign)(SXINT), FILE *stat_file)

Variables

static char ME [] = "X_root_mngr"
char WHAT_X_ROOT_MNGR [] = "@(#)SYNTAX - $Id: X_root_mngr.c 1416 2008-06-25 14:42:55Z rlacroix $" WHAT_DEBUG
static SXUINT HASH_VAL_

Define Documentation

#define max ( x,
 )     (((x) > (y)) ? (x) : (y))

Definition at line 41 of file X_root_mngr.c.

Referenced by gen(), get_best(), min_max_pos(), vector2c(), X_root_stat(), and XH_stat().

#define min ( x,
 )     (((x) < (y)) ? (x) : (y))
#define READ ( p,
 )     if ((bytes = (l)) > 0 && ((size_t)read (F_X_root, p, bytes) != bytes)) return SXFALSE
#define WRITE ( p,
 )     if ((bytes = (l))>0 && ((size_t)write (F_X_root, p, bytes) != bytes)) return SXFALSE

Function Documentation

SXINT sxnext_prime ( SXINT  germe  ) 

Definition at line 60 of file sxnext_prime.c.

void X_root_alloc ( X_root_header *  header,
char name,
SXINT  init_elem_nb,
SXINT  average_list_nb_per_bucket,
void(*)(SXINT)  system_oflw,
void(*)(SXINT, SXINT)  user_oflw,
SXINT(*)(SXINT)  cmp,
SXUINT(*)(SXINT)  scrmbl,
SXINT(*)(SXINT)  suppress,
SXINT(*)(SXINT)  assign,
FILE *  stat_file 
)

Definition at line 62 of file X_root_mngr.c.

References SXFALSE, sxnext_prime(), and SXTRUE.

Referenced by X_alloc(), XxY_alloc(), and XxYxZ_alloc().

void X_root_array_to_c ( X_root_header *  header,
FILE *  F_X,
char name 
)

Definition at line 476 of file X_root_mngr.c.

References top.

Referenced by X_array_to_c(), XxY_array_to_c(), and XxYxZ_array_to_c().

void X_root_clear ( X_root_header *  header  ) 

Definition at line 104 of file X_root_mngr.c.

References SXFALSE, and top.

Referenced by X_clear(), XxY_clear(), and XxYxZ_clear().

void X_root_free ( X_root_header *  header  ) 

Definition at line 159 of file X_root_mngr.c.

References SXFALSE, and X_root_stat().

Referenced by X_free(), XxY_free(), and XxYxZ_free().

SXINT X_root_gc ( X_root_header *  header  ) 

Definition at line 206 of file X_root_mngr.c.

Referenced by X_gc(), X_root_set(), XxY_gc(), and XxYxZ_gc().

void X_root_header_to_c ( X_root_header *  header,
FILE *  F_X,
char name 
)

Definition at line 528 of file X_root_mngr.c.

Referenced by X_header_to_c(), XxY_header_to_c(), and XxYxZ_header_to_c().

void X_root_int_cpy ( SXINT *  old,
SXINT *  new,
SXINT  old_size 
)
SXINT X_root_is_set ( X_root_header *  header,
SXUINT  scramble 
)

Definition at line 171 of file X_root_mngr.c.

References HASH_VAL_, and prev.

Referenced by X_is_set(), X_root_set(), XxY_is_set(), and XxYxZ_is_set().

void X_root_lock ( X_root_header *  header  ) 

Definition at line 405 of file X_root_mngr.c.

References SXTRUE.

Referenced by X_lock(), XxY_lock(), and XxYxZ_lock().

SXBOOLEAN X_root_read ( X_root_header *  header,
sxfiledesc_t  F_X_root 
)

Definition at line 451 of file X_root_mngr.c.

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

Referenced by X_read(), XxY_read(), and XxYxZ_read().

void X_root_reuse ( X_root_header *  header,
char name,
void(*)(SXINT)  system_oflw,
void(*)(SXINT, SXINT)  user_oflw,
SXINT(*)(SXINT)  cmp,
SXUINT(*)(SXINT)  scrmbl,
SXINT(*)(SXINT)  suppress,
SXINT(*)(SXINT)  assign,
FILE *  stat_file 
)

Definition at line 556 of file X_root_mngr.c.

Referenced by X_reuse(), XxY_reuse(), and XxYxZ_reuse().

static void X_root_sat_mess ( FILE *  stat_file,
char header_name,
SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 46 of file X_root_mngr.c.

References ME.

Referenced by X_root_set().

SXBOOLEAN X_root_set ( X_root_header *  header,
SXUINT  scramble,
SXINT *  ref 
)
void X_root_stat ( FILE *  stat_file,
X_root_header *  header 
)

Definition at line 121 of file X_root_mngr.c.

References max, min, n, and top.

Referenced by X_root_free(), X_stat(), XxY_stat(), and XxYxZ_stat().

SXBOOLEAN X_root_write ( X_root_header *  header,
sxfiledesc_t  F_X_root 
)

Definition at line 431 of file X_root_mngr.c.

References bytes, SXBOOLEAN, SXTRUE, and WRITE.

Referenced by X_write(), XxY_write(), and XxYxZ_write().


Variable Documentation

SXUINT HASH_VAL_ [static]

Definition at line 44 of file X_root_mngr.c.

Referenced by X_root_is_set(), and X_root_set().

char ME[] = "X_root_mngr" [static]

Definition at line 29 of file X_root_mngr.c.

Referenced by X_root_sat_mess().

char WHAT_X_ROOT_MNGR[] = "@(#)SYNTAX - $Id: X_root_mngr.c 1416 2008-06-25 14:42:55Z rlacroix $" WHAT_DEBUG

Definition at line 37 of file X_root_mngr.c.


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