File src/dlb.c

References Functions: lib_dlb_cleanup()src/dlb.c
  lib_dlb_fclose()src/dlb.c
  lib_dlb_fgetc()src/dlb.c
  lib_dlb_fgets()src/dlb.c
  lib_dlb_fopen()src/dlb.c
  lib_dlb_fread()src/dlb.c
  lib_dlb_fseek()src/dlb.c
  lib_dlb_ftell()src/dlb.c
  lib_dlb_init()src/dlb.c

Included Files


Preprocessor definitions

#define MAX_LIBS 4

#define DLB_MIN_VERS 1

#define DLB_MAX_VERS 1

#define do_dlb_init

#define do_dlb_cleanup

#define do_dlb_fopen

#define do_dlb_fclose

#define do_dlb_fread

#define do_dlb_fseek

#define do_dlb_fgets

#define do_dlb_fgetc

#define do_dlb_ftell


Typedef dlb_procs_t

typedef struct dlb_procs dlb_procs_t
struct dlb_procs 
   { 
     boolean (*dlb_init_proc)(void); 
     void (*dlb_cleanup_proc)(void); 
     boolean (*dlb_fopen_proc)(dlb*,const char*,const char*); 
     int (*dlb_fclose_proc)(dlb*); 
     int (*dlb_fread_proc)(char*,int,int,dlb*); 
     int (*dlb_fseek_proc)(dlb*,long,int); 
     char* (*dlb_fgets_proc)(char*,int,dlb*); 
     int (*dlb_fgetc_proc)(dlb*); 
     long (*dlb_ftell_proc)(dlb*); 
   } 

Global Variable lib_dlb_procs

const dlb_procs_t lib_dlb_procs
Visible in:  src/dlb.c
Used in: dlb_init()src/dlb.c

Local Variables

dlb_libs
static library dlb_libs[4]
Used in: find_file()
  lib_dlb_cleanup()
  lib_dlb_init()

dlb_procs
static const dlb_procs_t* dlb_procs
Used in: dlb_cleanup()
  dlb_fclose()
  dlb_fgetc()
  dlb_fgets()
  dlb_fopen()
  dlb_fread()
  dlb_fseek()
  dlb_ftell()
  dlb_init()

dlb_initialized
static boolean dlb_initialized
Used in: dlb_cleanup()
  dlb_fclose()
  dlb_fgetc()
  dlb_fgets()
  dlb_fopen()
  dlb_fread()
  dlb_fseek()
  dlb_ftell()
  dlb_init()


Global Function close_library()

void close_library ( library* lp )
Prototyped in: src/dlb.c
Calls: fclose(), free(), memset()
Called by: lib_dlb_cleanup()src/dlb.c

Global Function dlb_cleanup()

void dlb_cleanup ( void )
Prototyped in: include/dlb.h
References Variables: dlb_initializedsrc/dlb.c
  dlb_procssrc/dlb.c

Global Function dlb_fclose()

int dlb_fclose ( dlb* dp )
Prototyped in: include/dlb.h
Calls: fclose(), free()
References Variables: dlb_initializedsrc/dlb.c
  dlb_procssrc/dlb.c

Global Function dlb_fgetc()

int dlb_fgetc ( dlb* dp )
Prototyped in: include/dlb.h
Calls: fgetc()
References Variables: dlb_initializedsrc/dlb.c
  dlb_procssrc/dlb.c

Global Function dlb_fgets()

char* dlb_fgets ( char* buf, int len, dlb* dp )
Prototyped in: include/dlb.h
Calls: fgets()
References Variables: dlb_initializedsrc/dlb.c
  dlb_procssrc/dlb.c

Global Function dlb_fopen()

dlb* dlb_fopen ( const char* name, const char* mode )
Prototyped in: include/dlb.h
Calls: alloc()src/alloc.c
  fopen_datafile(), free()
References Variables: dlb_initializedsrc/dlb.c
  dlb_procssrc/dlb.c

Global Function dlb_fread()

int dlb_fread ( char* buf, int size, int quan, dlb* dp )
Prototyped in: include/dlb.h
Calls: fread()
Called by: lib_dlb_fgets()src/dlb.c
References Variables: dlb_initializedsrc/dlb.c
  dlb_procssrc/dlb.c

Global Function dlb_fseek()

int dlb_fseek ( dlb* dp, long pos, int whence )
Prototyped in: include/dlb.h
Calls: fseek()
References Variables: dlb_initializedsrc/dlb.c
  dlb_procssrc/dlb.c

Global Function dlb_ftell()

long dlb_ftell ( dlb* dp )
Prototyped in: include/dlb.h
Calls: ftell()
References Variables: dlb_initializedsrc/dlb.c
  dlb_procssrc/dlb.c

Global Function dlb_init()

boolean dlb_init ( void )
Prototyped in: include/dlb.h
References Variables: dlb_initializedsrc/dlb.c
  dlb_procssrc/dlb.c
  lib_dlb_procssrc/dlb.c

Global Function open_library()

boolean open_library ( const char* lib_name, library* lp )
Prototyped in: src/dlb.c
Calls: readlibdir()src/dlb.c
  fclose(), fopen_datafile()
Called by: lib_dlb_init()src/dlb.c

Local Function find_file()

static boolean find_file ( const char* name, library** lib, long* startp, long* sizep )
Prototyped in: src/dlb.c
Calls: strcmp()
Called by: lib_dlb_fopen()src/dlb.c
References Variables: dlb_libssrc/dlb.c

Local Function lib_dlb_cleanup()

static void lib_dlb_cleanup ( void )
Prototyped in: src/dlb.c
Calls: close_library()src/dlb.c
Used in:  src/dlb.c
References Variables: dlb_libssrc/dlb.c

Local Function lib_dlb_fclose()

static int lib_dlb_fclose ( dlb* dp )
Prototyped in: src/dlb.c
Used in:  src/dlb.c

Local Function lib_dlb_fgetc()

static int lib_dlb_fgetc ( dlb* dp )
Prototyped in: src/dlb.c
Calls: lib_dlb_fread()src/dlb.c
Used in:  src/dlb.c

Local Function lib_dlb_fgets()

static char* lib_dlb_fgets ( char* buf, int len, dlb* dp )
Prototyped in: src/dlb.c
Calls: dlb_fread()src/dlb.c
Used in:  src/dlb.c

Local Function lib_dlb_fopen()

static boolean lib_dlb_fopen ( dlb* dp, const char* name, const char* mode )
Prototyped in: src/dlb.c
Calls: find_file()src/dlb.c
Used in:  src/dlb.c

Local Function lib_dlb_fread()

static int lib_dlb_fread ( char* buf, int size, int quan, dlb* dp )
Prototyped in: src/dlb.c
Calls: fread(), fseek()
Called by: lib_dlb_fgetc()src/dlb.c
Used in:  src/dlb.c

Local Function lib_dlb_fseek()

static int lib_dlb_fseek ( dlb* dp, long pos, int whence )
Prototyped in: src/dlb.c
Used in:  src/dlb.c

Local Function lib_dlb_ftell()

static long lib_dlb_ftell ( dlb* dp )
Prototyped in: src/dlb.c
Used in:  src/dlb.c

Local Function lib_dlb_init()

static boolean lib_dlb_init ( void )
Prototyped in: src/dlb.c
Calls: open_library()src/dlb.c
  memset()
Used in:  src/dlb.c
References Variables: dlb_libssrc/dlb.c

Local Function readlibdir()

static boolean readlibdir ( library* lp )
Prototyped in: src/dlb.c
Calls: alloc()src/alloc.c
  eos(), free(), fscanf(), fseek()
Called by: open_library()src/dlb.c