XxY_mngr.c File Reference

#include "sxversion.h"
#include "sxcommon.h"
#include "XxY.h"
#include <memory.h>
Include dependency graph for XxY_mngr.c:

Go to the source code of this file.

Defines

#define WRITE(p, l)   if ((bytes = (l)) > 0 && ((size_t)write (F_XxY, p, bytes) != bytes)) return SXFALSE
#define READ(p, l)   if ((bytes=(l))>0&&(((size_t)read (F_XxY, p, bytes)) != bytes)) return SXFALSE

Functions

void sxtrap (char *caller, char *message)
SXINT sxlast_bit (SXINT nb)
static void XxY_cpy (struct XxY_elem *old, struct XxY_elem *new, SXINT old_size)
static void XxY_assoc_oflw (SXINT old_size, SXINT new_size)
static void XxY_system_oflw (SXINT old_top)
static SXINT XxY_cmp (SXINT x)
static SXUINT XxY_scrmbl (SXINT x)
static SXINT XxY_assign (SXINT x)
static SXINT XY_orig (SXINT x, SXINT kind)
static SXINT XxY_suppress (SXINT erased_lnk_hd)
void XxY_alloc (XxY_header *header, char *name, SXINT init_elem_nb, SXINT average_list_nb_per_bucket, SXINT average_X_assoc, SXINT average_Y_assoc, void(*user_oflw)(SXINT, SXINT), FILE *stat_file)
void XxY_clear (XxY_header *header)
void XxY_stat (FILE *stat_file, XxY_header *header)
void XxY_free (XxY_header *header)
SXINT XxY_is_set (XxY_header *header, SXINT X, SXINT Y)
void XxY_gc (XxY_header *header)
SXBOOLEAN XxY_set (XxY_header *header, SXINT X, SXINT Y, SXINT *ref)
void XxY_lock (XxY_header *header)
void XxY_unlock (XxY_header *header)
SXBOOLEAN XxY_set_and_close (XxY_header *header, SXINT X, SXINT Y, SXINT *ref)
void XxY_to_SXBM (XxY_header *header, SXBOOLEAN(*get_couple)(SXINT *, SXINT *, SXINT), SXINT couple_nb, X_header *index_hd, SXBA **M)
SXBOOLEAN XxY_write (XxY_header *header, sxfiledesc_t F_XxY)
SXBOOLEAN XxY_read (XxY_header *header, sxfiledesc_t F_XxY, char *name, void(*user_oflw)(SXINT, SXINT), FILE *stat_file)
void XxY_array_to_c (XxY_header *header, FILE *F_XxY, char *name)
void XxY_header_to_c (XxY_header *header, FILE *F_XxY, char *name)
void XxY_to_c (XxY_header *header, FILE *F_XxY, char *name, SXBOOLEAN is_static)
void XxY_reuse (XxY_header *header, char *name, void(*user_oflw)(SXINT, SXINT), FILE *stat_file)

Variables

static char ME [] = "XxY_mngr"
char WHAT_XXY_MNGR [] = "@(#)SYNTAX - $Id: XxY_mngr.c 1491 2008-07-23 16:13:15Z sagot $" WHAT_DEBUG
static SXINT X_
static SXINT Y_
static XxY_header * HEADER_
static SXINT KIND_

Define Documentation

#define READ ( p,
 )     if ((bytes=(l))>0&&(((size_t)read (F_XxY, p, bytes)) != bytes)) return SXFALSE
#define WRITE ( p,
 )     if ((bytes = (l)) > 0 && ((size_t)write (F_XxY, p, bytes) != bytes)) return SXFALSE

Function Documentation

SXINT sxlast_bit ( SXINT  nb  ) 

Definition at line 31 of file sxnext_prime.c.

void sxtrap ( char caller,
char message 
)

Definition at line 33 of file sxtrap.c.

void XxY_alloc ( XxY_header *  header,
char name,
SXINT  init_elem_nb,
SXINT  average_list_nb_per_bucket,
SXINT  average_X_assoc,
SXINT  average_Y_assoc,
void(*)(SXINT, SXINT)  user_oflw,
FILE *  stat_file 
)
void XxY_array_to_c ( XxY_header *  header,
FILE *  F_XxY,
char name 
)

Definition at line 678 of file XxY_mngr.c.

References SXTRUE, X_root_array_to_c(), and X_to_c().

Referenced by sxre_array_to_c(), and XxY_to_c().

static SXINT XxY_assign ( SXINT  x  )  [static]

Definition at line 149 of file XxY_mngr.c.

References HEADER_, KIND_, X_, X_set(), and Y_.

Referenced by XxY_alloc(), XxY_read(), and XxY_reuse().

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

Definition at line 56 of file XxY_mngr.c.

References HEADER_, KIND_, and X_root_int_cpy().

Referenced by XxY_alloc(), XxY_read(), and XxY_reuse().

void XxY_clear ( XxY_header *  header  ) 
static SXINT XxY_cmp ( SXINT  x  )  [static]

Definition at line 112 of file XxY_mngr.c.

References HEADER_, X_, and Y_.

Referenced by XxY_alloc(), XxY_read(), and XxY_reuse().

static void XxY_cpy ( struct XxY_elem *  old,
struct XxY_elem *  new,
SXINT  old_size 
) [static]

Definition at line 47 of file XxY_mngr.c.

Referenced by XxY_system_oflw().

void XxY_free ( XxY_header *  header  ) 
void XxY_gc ( XxY_header *  header  ) 

Definition at line 412 of file XxY_mngr.c.

References HEADER_, X_root_gc(), and XxY_suppress().

void XxY_header_to_c ( XxY_header *  header,
FILE *  F_XxY,
char name 
)

Definition at line 734 of file XxY_mngr.c.

References SXBOOLEAN, and X_root_header_to_c().

Referenced by sxre_header_to_c(), and XxY_to_c().

SXINT XxY_is_set ( XxY_header *  header,
SXINT  X,
SXINT  Y 
)
void XxY_lock ( XxY_header *  header  ) 

Definition at line 450 of file XxY_mngr.c.

References HEADER_, KIND_, X_lock(), and X_root_lock().

Referenced by process_weights(), and XxYxZ_lock().

SXBOOLEAN XxY_read ( XxY_header *  header,
sxfiledesc_t  F_XxY,
char name,
void(*)(SXINT, SXINT)  user_oflw,
FILE *  stat_file 
)
void XxY_reuse ( XxY_header *  header,
char name,
void(*)(SXINT, SXINT)  user_oflw,
FILE *  stat_file 
)
static SXUINT XxY_scrmbl ( SXINT  x  )  [static]

Definition at line 139 of file XxY_mngr.c.

References HEADER_, X_, and Y_.

Referenced by XxY_alloc(), XxY_read(), and XxY_reuse().

SXBOOLEAN XxY_set ( XxY_header *  header,
SXINT  X,
SXINT  Y,
SXINT *  ref 
)
SXBOOLEAN XxY_set_and_close ( XxY_header *  header,
SXINT  X,
SXINT  Y,
SXINT *  ref 
)

Definition at line 500 of file XxY_mngr.c.

References SXTRUE, XxY_is_set(), and XxY_set().

void XxY_stat ( FILE *  stat_file,
XxY_header *  header 
)

Definition at line 315 of file XxY_mngr.c.

References n, X_root_stat(), and X_stat().

Referenced by XxYxZ_stat().

static SXINT XxY_suppress ( SXINT  erased_lnk_hd  )  [static]

Definition at line 193 of file XxY_mngr.c.

References HEADER_, and XY_orig().

Referenced by XxY_alloc(), XxY_gc(), XxY_read(), and XxY_reuse().

static void XxY_system_oflw ( SXINT  old_top  )  [static]

Definition at line 72 of file XxY_mngr.c.

References HEADER_, X_root_int_cpy(), and XxY_cpy().

Referenced by XxY_alloc(), XxY_read(), and XxY_reuse().

void XxY_to_c ( XxY_header *  header,
FILE *  F_XxY,
char name,
SXBOOLEAN  is_static 
)

Definition at line 760 of file XxY_mngr.c.

References XxY_array_to_c(), and XxY_header_to_c().

Referenced by process_weights(), and XxYxZ_array_to_c().

void XxY_to_SXBM ( XxY_header *  header,
SXBOOLEAN(*)(SXINT *, SXINT *, SXINT)  get_couple,
SXINT  couple_nb,
X_header *  index_hd,
SXBA **  M 
)

Definition at line 532 of file XxY_mngr.c.

References n, sxba_empty(), sxbm_calloc(), sxbm_resize(), SXBOOLEAN, SXTRUE, X_alloc(), X_clear(), and X_set().

void XxY_unlock ( XxY_header *  header  ) 

Definition at line 477 of file XxY_mngr.c.

References SXFALSE.

Referenced by XxYxZ_unlock().

SXBOOLEAN XxY_write ( XxY_header *  header,
sxfiledesc_t  F_XxY 
)

Definition at line 589 of file XxY_mngr.c.

References bytes, SXBOOLEAN, SXFALSE, SXTRUE, WRITE, X_root_write(), and X_write().

Referenced by sxdp_write(), sxre_write(), and XxYxZ_write().

static SXINT XY_orig ( SXINT  x,
SXINT  kind 
) [static]

Definition at line 181 of file XxY_mngr.c.

References HEADER_, ME, sxtrap(), and X_is_set().

Referenced by XxY_suppress().


Variable Documentation

XxY_header* HEADER_ [static]
SXINT KIND_ [static]

Definition at line 44 of file XxY_mngr.c.

Referenced by XxY_assign(), XxY_assoc_oflw(), and XxY_lock().

char ME[] = "XxY_mngr" [static]

Definition at line 29 of file XxY_mngr.c.

Referenced by XY_orig().

char WHAT_XXY_MNGR[] = "@(#)SYNTAX - $Id: XxY_mngr.c 1491 2008-07-23 16:13:15Z sagot $" WHAT_DEBUG

Definition at line 37 of file XxY_mngr.c.

SXINT X_ [static]

Definition at line 42 of file XxY_mngr.c.

Referenced by XxY_assign(), XxY_cmp(), XxY_is_set(), XxY_scrmbl(), and XxY_set().

SXINT Y_ [static]

Definition at line 42 of file XxY_mngr.c.

Referenced by XxY_assign(), XxY_cmp(), XxY_is_set(), XxY_scrmbl(), and XxY_set().


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