File modules/ca/ca_configFns.c

  $Revision:

CA module: definitions of most functions.
Status: NOT REVIEWED, NOT TESTED
Author(s): Ambrose Magee

Included Files


Preprocessor definitions

#define DICT_INIT

Global Variable dictionary

dict_t dictionary[]
Visible in:  modules/ac/access_control.c
   modules/ca/ca_configFns.c
Used in: ca_get_UpdSourceHandle()modules/ca/ca_configFns.c
  ca_get_adminStrElement()modules/ca/ca_configFns.c
  ca_get_boolean()modules/ca/ca_configFns.c
  ca_get_dirlist()modules/ca/ca_configFns.c
  ca_get_int()modules/ca/ca_configFns.c
  ca_get_string()modules/ca/ca_configFns.c
  ca_mandVarChk()modules/ca/ca_configFns.c
  ca_readConfig()modules/ca/ca_configFns.c
  ca_sanityChk()modules/ca/ca_configFns.c
  ca_set_boolean()modules/ca/ca_configFns.c
  ca_set_dirlist()modules/ca/ca_configFns.c
  ca_set_int()modules/ca/ca_configFns.c
  ca_set_string()modules/ca/ca_configFns.c
  ca_writeNewValue()modules/ca/ca_configFns.c

Global Variable Lock

pthread_mutex_t Lock
Included from modules/ca/ca_defs.h
Visible in:  modules/ac/access_control.c
   modules/ca/ca_configFns.c
Used in: ca_get_adminIntElement()modules/ca/ca_configFns.c
  ca_get_adminStrElement()modules/ca/ca_configFns.c
  ca_get_boolean()modules/ca/ca_configFns.c
  ca_get_dirlist()modules/ca/ca_configFns.c
  ca_get_int()modules/ca/ca_configFns.c
  ca_get_string()modules/ca/ca_configFns.c
  ca_set_boolean()modules/ca/ca_configFns.c
  ca_set_string()modules/ca/ca_configFns.c
  ca_srchandle2Intelement()modules/ca/ca_configFns.c
  ca_srchandle2Strelement()modules/ca/ca_configFns.c

Global Function ca_UpdSrcHandle2IntElement()

int ca_UpdSrcHandle2IntElement ( ca_updDbSource_t* uh, int srcAttrib )
Prototyped in: modules/ca/ca_configFns.h
Calls: fprintf()

Global Function ca_UpdSrcHandle2StrElement()

char* ca_UpdSrcHandle2StrElement ( ca_updDbSource_t* uh, int srcAttrib )
Prototyped in: modules/ca/ca_configFns.h
Calls: UT_strdup_real(), fprintf(), puts()

Global Function ca_change_int_value()

int* ca_change_int_value ( char value[] )
Calls: UT_malloc_real(), sscanf()
Called by: ca_set_boolean()modules/ca/ca_configFns.c
  ca_set_int()modules/ca/ca_configFns.c

Global Function ca_getAllSources()

void ca_getAllSources ( GSList* sources )
Prototyped in: modules/ca/ca_configFns.h
Calls: printf()

Global Function ca_getAsource()

void ca_getAsource ( char* sourceName, GSList* sources )
Prototyped in: modules/ca/ca_configFns.h
Calls: printf(), puts(), strcmp()

Global Function ca_getConfig()

void ca_getConfig ( values_t confVars[], int size )
Prototyped in: modules/ca/ca_configFns.h
Calls: printf(), puts()

Global Function ca_getDatabase()

void ca_getDatabase ( ca_database_t db )
Prototyped in: modules/ca/ca_configFns.h
Calls: printf()

Global Function ca_getDictionary()

void ca_getDictionary ( dict_t woordenboek[], int size )
Prototyped in: modules/ca/ca_configFns.h
Calls: printf()

Global Function ca_getSource()

void ca_getSource ( ca_database_list_t src )
Prototyped in: modules/ca/ca_configFns.h
Calls: printf()

Global Function ca_getSourceDetails()

ca_dbSource_t* ca_getSourceDetails ( char* sourceName, GSList* sources )
Prototyped in: modules/ca/ca_configFns.h
Calls: strcasecmp()
Called by: ca_get_SourceHandleByName()modules/ca/ca_configFns.c

Global Function ca_getStorageLocation()

int ca_getStorageLocation ( char* confVar, dict_t woordenboek[], int size )
Calls: fprintf(), strcmp()
Called by: ca_readConfig()modules/ca/ca_configFns.c

Global Function ca_getType()

int ca_getType ( char* confVar, dict_t woordenboek[], int size )
Calls: strcmp()
Called by: ca_readConfig()modules/ca/ca_configFns.c

Global Function ca_get_SourceHandleByName()

ca_SrcHdl_t* ca_get_SourceHandleByName ( char* srcName )
Prototyped in: modules/ca/ca_configFns.h
Calls: ca_getSourceDetails()modules/ca/ca_configFns.c
References Variables: sourceList

Global Function ca_get_SourceHandleByPosition()

ca_SrcHdl_t* ca_get_SourceHandleByPosition ( int position )
Prototyped in: modules/ca/ca_configFns.h
Calls: g_slist_nth_data()
References Variables: sourceList

Global Function ca_get_UpdSourceHandle()

ca_updDbSource_t* ca_get_UpdSourceHandle ( int symbol )
Prototyped in: modules/ca/ca_configFns.h
Calls: fprintf(), strcmp()
References Variables: dictionarymodules/ca/ca_configFns.c
  confVars

Global Function ca_get_adminIntElement()

int ca_get_adminIntElement ( int symbol, int adminAttrib )
Prototyped in: modules/ca/ca_configFns.h
Calls: fprintf(), pthread_mutex_lock(), pthread_mutex_unlock(), puts()
Called by: AC_dbopen_admin()modules/ac/access_control.c
References Variables: Lockmodules/ca/ca_configFns.c
  confVars

Global Function ca_get_adminStrElement()

char* ca_get_adminStrElement ( int symbol, int adminAttrib )
Prototyped in: modules/ca/ca_configFns.h
Calls: UT_strdup_real(), fprintf(), pthread_mutex_lock(), pthread_mutex_unlock(), puts(), strcmp()
Called by: AC_dbopen_admin()modules/ac/access_control.c
References Variables: Lockmodules/ca/ca_configFns.c
  dictionarymodules/ca/ca_configFns.c
  confVars

Global Function ca_get_boolean()

int ca_get_boolean ( int symbol )
Prototyped in: modules/ca/ca_configFns.h
Calls: fprintf(), printf(), pthread_mutex_lock(), pthread_mutex_unlock(), strcmp()
References Variables: Lockmodules/ca/ca_configFns.c
  dictionarymodules/ca/ca_configFns.c
  confVars

Global Function ca_get_dirlist()

char* ca_get_dirlist ( int symbol )
Prototyped in: modules/ca/ca_configFns.h
Calls: UT_strdup_real(), fprintf(), printf(), pthread_mutex_lock(), pthread_mutex_unlock(), strcmp()
References Variables: Lockmodules/ca/ca_configFns.c
  dictionarymodules/ca/ca_configFns.c
  confVars

Global Function ca_get_int()

int ca_get_int ( int symbol )
Prototyped in: modules/ca/ca_configFns.h
Calls: fprintf(), printf(), pthread_mutex_lock(), pthread_mutex_unlock(), strcmp()
Called by: AC_decay()modules/ac/access_control.c
References Variables: Lockmodules/ca/ca_configFns.c
  dictionarymodules/ca/ca_configFns.c
  confVars

Global Function ca_get_string()

char* ca_get_string ( int symbol )
Prototyped in: modules/ca/ca_configFns.h
Calls: UT_strdup_real(), fprintf(), pthread_mutex_lock(), pthread_mutex_unlock(), strcmp()
References Variables: Lockmodules/ca/ca_configFns.c
  dictionarymodules/ca/ca_configFns.c
  confVars

Global Function ca_malloc()

void ca_malloc ( char* someStr, int memSize )
Calls: exit(), fprintf(), malloc()

Global Function ca_mandVarChk()

int ca_mandVarChk ( void )
Prototyped in: modules/ca/ca_configFns.h
Calls: fprintf()
References Variables: dictionarymodules/ca/ca_configFns.c
  confVars, configError_1Str, configError_2Str, configWarningStr

Global Function ca_populateDictionary()

void ca_populateDictionary ( dict_t woordenboek[], int size )
Prototyped in: modules/ca/ca_configFns.h
Calls: stringPack()modules/ca/ca_configFns.c
  fclose(), fgets(), fopen(), fprintf(), g_strchomp(), g_strfreev(), g_strsplit(), strcpy(), strlen(), strncmp()

Global Function ca_readConfig()

void ca_readConfig ( const char* configFile, values_t confVars[], int size )
Prototyped in: modules/ca/ca_configFns.h
Calls: ca_getStorageLocation()modules/ca/ca_configFns.c
  ca_getType()modules/ca/ca_configFns.c
  UT_calloc_real(), UT_free_real(), UT_malloc_real(), atoi(), fgets(), fopen(), fprintf(), fscanf(), g_strchomp(), g_strchug(), g_strfreev(), g_string_append(), g_string_new(), g_strsplit(), memcpy(), printf(), sscanf(), strcpy(), strlen(), strncmp()
References Variables: dictionarymodules/ca/ca_configFns.c

Global Function ca_sanityChk()

int ca_sanityChk ( values_t confVars[] )
Prototyped in: modules/ca/ca_configFns.h
Calls: fprintf()
References Variables: dictionarymodules/ca/ca_configFns.c
  configError_1Str, configError_2Str, configWarningStr

Global Function ca_set_boolean()

void ca_set_boolean ( int symbol )
Prototyped in: modules/ca/ca_configFns.h
Calls: ca_change_int_value()modules/ca/ca_configFns.c
  fclose(), fflush(), fgets(), fopen(), fprintf(), fscanf(), g_string_assign(), printf(), pthread_mutex_lock(), pthread_mutex_unlock(), puts(), scanf(), sscanf(), strcmp(), strcpy(), strlen()
References Variables: Lockmodules/ca/ca_configFns.c
  dictionarymodules/ca/ca_configFns.c
  globals, locals, tempFile, testFile

Global Function ca_set_dirlist()

void ca_set_dirlist ( int symbol )
Prototyped in: modules/ca/ca_configFns.h
Calls: UT_free_real(), UT_malloc_real(), exit(), fflush(), fprintf(), g_string_assign(), printf(), scanf(), strcmp(), strcpy()
References Variables: dictionarymodules/ca/ca_configFns.c
  globals, locals

Global Function ca_set_int()

void ca_set_int ( int symbol )
Prototyped in: modules/ca/ca_configFns.h
Calls: ca_change_int_value()modules/ca/ca_configFns.c
  ca_writeNewValue()modules/ca/ca_configFns.c
  fflush(), fprintf(), g_string_assign(), printf(), puts(), scanf(), sscanf(), strcmp()
References Variables: dictionarymodules/ca/ca_configFns.c
  globals, locals

Global Function ca_set_string()

void ca_set_string ( int symbol )
Prototyped in: modules/ca/ca_configFns.h
Calls: UT_free_real(), UT_malloc_real(), exit(), fflush(), fprintf(), g_string_assign(), gets(), printf(), pthread_mutex_lock(), pthread_mutex_unlock(), strcmp(), strcpy()
References Variables: Lockmodules/ca/ca_configFns.c
  dictionarymodules/ca/ca_configFns.c
  globals, locals

Global Function ca_srchandle2Intelement()

int ca_srchandle2Intelement ( ca_SrcHdl_t* ah, int srcAttrib )
Prototyped in: modules/ca/ca_configFns.h
Calls: fprintf(), pthread_mutex_lock(), pthread_mutex_unlock()
References Variables: Lockmodules/ca/ca_configFns.c

Global Function ca_srchandle2Strelement()

char* ca_srchandle2Strelement ( ca_SrcHdl_t* ah, int srcAttrib )
Prototyped in: modules/ca/ca_configFns.h
Calls: UT_strdup_real(), fprintf(), pthread_mutex_lock(), pthread_mutex_unlock(), puts()
References Variables: Lockmodules/ca/ca_configFns.c

Global Function ca_writeNewValue()

int ca_writeNewValue ( int dictSymbol, char* newValue )
Prototyped in: modules/ca/ca_configFns.h
Calls: fclose(), fflush(), fgets(), fopen(), fprintf(), fscanf(), printf(), strcmp(), strcpy(), strlen(), unlink()
Called by: ca_set_int()modules/ca/ca_configFns.c
References Variables: dictionarymodules/ca/ca_configFns.c
  tempFile, testFile

Global Function opSplitsen()

void opSplitsen ( FILE* filePtr, gchar** tokenArray )
Prototyped in: modules/ca/ca_configFns.h
Calls: stringPack()modules/ca/ca_configFns.c
  fgets(), g_strchomp(), g_strsplit(), strcpy(), strlen(), strncmp()

Global Function stringPack()

void stringPack ( char* dest, const char* source )
Prototyped in: modules/ca/ca_configFns.h
Called by: ca_populateDictionary()modules/ca/ca_configFns.c
  opSplitsen()modules/ca/ca_configFns.c

Global Function testFunction()

void testFunction ( values_t array[] )
Calls: printf()