[Onhm-cvs-commits] CVS: Software/common/include configuration.h,NONE,1.1
Status: Planning
Brought to you by:
cheezel
|
From: Brian C. <bch...@us...> - 2005-12-06 12:14:44
|
Update of /cvsroot/onhm/Software/common/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1921/common/include Added Files: configuration.h Log Message: Added configuration retrieval code to the project --- NEW FILE: configuration.h --- /****************************************************************************** * File name: common/include/configuration.h * Purpose: To provide the support functions which will enable the program * making use of these routines to daemonise itself correctly under * unix/linux platform. * Author: Brian A Cheeseman. * Date: 17 September 2004. * Copyright: (c) 2004, Brian A Cheeseman. * License: GNU General Public License Version 2. See LICENSE for details. ******************************************************************************/ #ifndef __ONHM_CONFIGURATION_H__ #define __ONHM_CONFIGURATION_H__ #define CONFIG_LOAD_SUCCESSFUL 0 #define CONFIG_CANNOT_OPEN_FILE -1 #define CONFIG_VALUE_OUT_OF_RANGE -2 #define CONFIG_VALUE_MISSING -3 #define MAX_STRING_LEN 4096 #define PARAM_TYPE_INT 0 #define PARAM_TYPE_STRING 1 #define PARAM_OPTIONAL 0 #define PARAM_MANDATORY 1 extern int reloadConfiguration; struct ConfigItem { char *paramName; void *variable; void *defaultval; int type; int mandatory; int min; int max; }; int loadConfiguration(char *configFile, struct ConfigItem *config); #endif |