Index: ossp-pkg/rc/rc_config.c RCS File: /v/ossp/cvs/ossp-pkg/rc/rc_config.c,v rcsdiff -q -kk '-r1.24' '-r1.25' -u '/v/ossp/cvs/ossp-pkg/rc/rc_config.c,v' 2>/dev/null --- rc_config.c 2002/07/30 16:32:40 1.24 +++ rc_config.c 2002/08/01 08:09:04 1.25 @@ -296,7 +296,7 @@ try { /* Test members for empty attributes */ if (!configGetval(RC_EVL_VAL) && !configGetval(RC_EXC_VAL) \ && !configGetval(RC_PRN_VAL)) - clioptSetval(RC_PRN_VAL, "1"); + clioptSetval(RC_PRN_VAL, RC_DEF_ON); /* if (!configGetval(RC_USE_VAL)) if (!configGetval(RC_HLP_VAL)) @@ -345,14 +345,14 @@ if (!configGetval(RC_ASS_VAL))*/ if (!configGetval(RC_DEF_VAL)) - clioptSetval(RC_DEF_VAL, "^%(\\w+).*?\\n(.*?)^$"); + clioptSetval(RC_DEF_VAL, RC_DEF_DEF); /* if (!configGetval(RC_REF_VAL)) if (!configGetval(RC_PRM_VAL)) if (!configGetval(RC_TRM_VAL))*/ if (!configGetval(RC_NCF_VAL)) - clioptSetval(RC_NCF_VAL, "config"); + clioptSetval(RC_NCF_VAL, RC_DEF_NCF); /* if (!configGetval(RC_CMN_VAL)) if (!configGetval(RC_DFL_VAL)) Index: ossp-pkg/rc/rc_const.h RCS File: /v/ossp/cvs/ossp-pkg/rc/rc_const.h,v rcsdiff -q -kk '-r1.10' '-r1.11' -u '/v/ossp/cvs/ossp-pkg/rc/rc_const.h,v' 2>/dev/null --- rc_const.h 2002/07/30 16:33:51 1.10 +++ rc_const.h 2002/08/01 08:09:04 1.11 @@ -70,6 +70,7 @@ #define RC_DFL_DESC "Name of the default section in a rcfile." #define RC_ERR_DESC "Name of the error section in a rcfile." +/* Option friendly names, should not include newline termination */ #define RC_USE_NAME "usage" #define RC_DBG_NAME "debug" #define RC_VER_NAME "version" @@ -102,6 +103,7 @@ #define RC_DFL_NAME "NameDefault" #define RC_ERR_NAME "NameError" +/* Error and warning strings, should not include newline termination */ #define RC_ERRSTR_OK "Okay" #define RC_ERRSTR_USE "Usage" #define RC_ERRSTR_MEM "Memory" @@ -118,4 +120,10 @@ #define RC_GLOB_WILD "all" +/* Default values, do not include newlines and special chars must be escaped */ +#define RC_DEF_ON "1" /* Digital switch */ +#define RC_DEF_OFF "0" /* Digital switch */ +#define RC_DEF_DEF "^%(\\w+).*?\\n(.*?)^$" /* Section definition */ +#define RC_DEF_NCF "config" /* Config section name */ + #endif /* __OSSPRC_CONST_H__ */