catalog.c File Reference

#include "xsb_config.h"
#include "util.h"
#include "catalog.h"
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <dtd.h>

Data Structures

struct  catalogue_item
struct  _catalog_file

Defines

#define DTD_MINOR_ERRORS   1
#define MAXPATHLEN   1024
#define MAXLINE   1024
#define EOS   '\0'
#define uc(p)   (*(unsigned char const *)(p))
#define isDirSep(c)   ((c) == '/')
#define DIRSEPSTR   "/"

Typedefs

typedef catalogue_itemcatalogue_item_ptr
typedef _catalog_file catalog_file

Functions

static char * DirName (const char *f, char *dir)
int is_absolute_path (const char *name)
char * localpath (const char *ref, const char *name)
int register_catalog_file (const char *file, catalog_location where)
static void init_catalog ()
static int ci_streql (char const *a, char const *b)
static int cs_streql (char const *a, char const *b)
static int scan_overflow (size_t buflen)
static int scan (FILE *src, char *buffer, size_t buflen, int kw_expected)
static void squish (char *pubid)
static void load_one_catalogue (catalog_file *file)
char const * find_in_catalogue (int kind, char const *name, char const *pubid, char const *sysid, int ci)

Variables

static catalogue_item_ptr first_item = 0
static catalogue_item_ptr last_item = 0
static catalog_filecatalog

Define Documentation

#define DIRSEPSTR   "/"
 

#define DTD_MINOR_ERRORS   1
 

#define EOS   '\0'
 

#define isDirSep  )     ((c) == '/')
 

#define MAXLINE   1024
 

#define MAXPATHLEN   1024
 

#define uc  )     (*(unsigned char const *)(p))
 


Typedef Documentation

typedef struct _catalog_file catalog_file
 

typedef struct catalogue_item* catalogue_item_ptr
 


Function Documentation

static int ci_streql char const *  a,
char const *  b
[static]
 

static int cs_streql char const *  a,
char const *  b
[static]
 

static char* DirName const char *  f,
char *  dir
[static]
 

char const* find_in_catalogue int  kind,
char const *  name,
char const *  pubid,
char const *  sysid,
int  ci
 

static void init_catalog  )  [static]
 

int is_absolute_path const char *  name  ) 
 

Check if the path is absolute or relative Input : path Output : TRUE if path is absolute/ FALSE otherwise

static void load_one_catalogue catalog_file file  )  [static]
 

char * localpath const char *  ref,
const char *  name
 

Return the local path of the file specified

int register_catalog_file const char *  file,
catalog_location  where
 

static int scan FILE *  src,
char *  buffer,
size_t  buflen,
int  kw_expected
[static]
 

static int scan_overflow size_t  buflen  )  [static]
 

static void squish char *  pubid  )  [static]
 


Variable Documentation

catalog_file* catalog [static]
 

catalogue_item_ptr first_item = 0 [static]
 

catalogue_item_ptr last_item = 0 [static]
 


Generated on Wed Jul 26 13:26:55 2006 for XSB by  doxygen 1.4.5