G:/ScriptBasic/source/conftree.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "conftree.h"

Go to the source code of this file.

Defines

#define ALLOC(X)   (pCT->memory_allocating_function((X),pCT->pMemorySegment))
#define FREE(X)   (pCT->memory_releasing_function((X),pCT->pMemorySegment))

Functions

static void * _mya (size_t x, void *y)
static void _myf (void *x, void *y)
int cft_init (ptConfigTree pCT, void *(*memory_allocating_function)(size_t, void *), void(*memory_releasing_function)(void *, void *), void *pMemorySegment)
int cft_GetConfigFileName (ptConfigTree pCT, char **ppszConfigFile, char *env, char *DefaultFileName)
int cft_start (ptConfigTree pCT, void *(*memory_allocating_function)(size_t, void *), void(*memory_releasing_function)(void *, void *), void *pMemorySegment, char *Envir, char *pszDefaultFileName, char *pszForcedFileName)
static int strmyeq (ptConfigTree pCT, char *a, char *b)
CFT_NODE cft_FindNode (ptConfigTree pCT, CFT_NODE lStartNode, char *key)
int cft_GetEx (ptConfigTree pCT, char *key, CFT_NODE *plNodeId, char **ppszValue, long *plValue, double *pdValue, int *type)
char * cft_GetString (ptConfigTree pCT, char *key)
CFT_NODE cft_EnumFirst (ptConfigTree pCT, CFT_NODE lNodeId)
long cft_EnumNext (ptConfigTree pCT, long lNodeId)
char * cft_GetKey (ptConfigTree pCT, CFT_NODE lNodeId)
int cft_ReadConfig (ptConfigTree pCT, char *pszFileName)
int cft_WriteConfig (ptConfigTree pCT, char *pszFileName)
void cft_DropConfig (ptConfigTree pCT)

Variables

static char MAGIC [4] = { 0x43, 0x46, 0x47, 0x1A }


Define Documentation

#define ALLOC  )     (pCT->memory_allocating_function((X),pCT->pMemorySegment))
 

Definition at line 114 of file conftree.c.

#define FREE  )     (pCT->memory_releasing_function((X),pCT->pMemorySegment))
 

Definition at line 115 of file conftree.c.


Function Documentation

static void* _mya size_t  x,
void *  y
[static]
 

Definition at line 117 of file conftree.c.

Referenced by cft_init(), log_init(), and lsp_init().

static void _myf void *  x,
void *  y
[static]
 

Definition at line 120 of file conftree.c.

References free().

Referenced by cft_init(), log_init(), and lsp_init().

void cft_DropConfig ptConfigTree  pCT  ) 
 

Definition at line 800 of file conftree.c.

References FREE, and NULL.

CFT_NODE cft_EnumFirst ptConfigTree  pCT,
CFT_NODE  lNodeId
 

Definition at line 628 of file conftree.c.

Referenced by AppStart(), DumpTree(), and modu_Init().

long cft_EnumNext ptConfigTree  pCT,
long  lNodeId
 

Definition at line 656 of file conftree.c.

Referenced by AppStart(), DumpTree(), ipreproc_LoadInternalPreprocessor(), main(), modu_Init(), modu_LoadModule(), modu_Preload(), and reader_ProcessIncludeFiles().

CFT_NODE cft_FindNode ptConfigTree  pCT,
CFT_NODE  lStartNode,
char *  key
 

Definition at line 437 of file conftree.c.

References i, NULL, and strmyeq().

Referenced by AppStart(), cft_GetEx(), and modu_Init().

int cft_GetConfigFileName ptConfigTree  pCT,
char **  ppszConfigFile,
char *  env,
char *  DefaultFileName
 

Definition at line 216 of file conftree.c.

References ALLOC, cbData, fp, i, NULL, Ret, s, strcpy(), and STRING_BUFFER_LENGTH.

Referenced by cft_start(), and scriba_GetConfigFileName().

int cft_GetEx ptConfigTree  pCT,
char *  key,
CFT_NODE *  plNodeId,
char **  ppszValue,
long *  plValue,
double *  pdValue,
int *  type
 

Definition at line 519 of file conftree.c.

References cft_FindNode().

Referenced by AppStart(), cft_GetString(), execute_InitStructure(), ipreproc_LoadInternalPreprocessor(), main(), modu_Init(), modu_LoadModule(), modu_Preload(), and reader_ProcessIncludeFiles().

char* cft_GetKey ptConfigTree  pCT,
CFT_NODE  lNodeId
 

Definition at line 670 of file conftree.c.

References NULL.

Referenced by AppStart(), ipreproc_LoadInternalPreprocessor(), modu_Init(), modu_LoadModule(), modu_Preload(), and reader_ProcessIncludeFiles().

char* cft_GetString ptConfigTree  pCT,
char *  key
 

Definition at line 595 of file conftree.c.

References cft_GetEx(), dummy(), NULL, and type.

Referenced by epreproc(), GetExtensionVersion(), ipreproc_LoadInternalPreprocessor(), main(), modu_Init(), modu_LoadModule(), and scriba_GetCacheFileName().

int cft_init ptConfigTree  pCT,
void *(*)(size_t, void *)  memory_allocating_function,
void(*)(void *, void *)  memory_releasing_function,
void *  pMemorySegment
 

Definition at line 147 of file conftree.c.

References _mya(), _myf(), and NULL.

Referenced by cft_start(), and main().

int cft_ReadConfig ptConfigTree  pCT,
char *  pszFileName
 

Definition at line 683 of file conftree.c.

References ALLOC, fp, FREE, MAGIC, and NULL.

Referenced by cft_start(), and main().

int cft_start ptConfigTree  pCT,
void *(*)(size_t, void *)  memory_allocating_function,
void(*)(void *, void *)  memory_releasing_function,
void *  pMemorySegment,
char *  Envir,
char *  pszDefaultFileName,
char *  pszForcedFileName
 

Definition at line 358 of file conftree.c.

References ALLOC, cft_GetConfigFileName(), cft_init(), cft_ReadConfig(), iError, NULL, and strcpy().

Referenced by GetExtensionVersion(), main(), and scriba_LoadConfiguration().

int cft_WriteConfig ptConfigTree  pCT,
char *  pszFileName
 

Definition at line 747 of file conftree.c.

References fp, MAGIC, and NULL.

Referenced by main().

static int strmyeq ptConfigTree  pCT,
char *  a,
char *  b
[static]
 

Definition at line 409 of file conftree.c.

Referenced by cft_FindNode().


Variable Documentation

char MAGIC[4] = { 0x43, 0x46, 0x47, 0x1A } [static]
 

Definition at line 105 of file conftree.c.

Referenced by cft_ReadConfig(), and cft_WriteConfig().


Generated on Sun Mar 12 23:56:34 2006 for ScriptBasic by  doxygen 1.4.6-NO