--- fsl.c 2002/07/18 15:53:36 1.14
+++ fsl.c 2002/07/19 13:26:20 1.15
@@ -82,9 +82,11 @@
FSL_ERR_USE, /* invalid use */
FSL_ERR_MEM, /* no more memory available */
FSL_ERR_SYS /* operating system error, see errno */
- //FSL_ERR_FMT, /* formatting error */
- //FSL_ERR_INT, /* internal error */
- //FSL_ERR_SYN, /* syntax error */
+#if 0
+ FSL_ERR_FMT, /* formatting error */
+ FSL_ERR_INT, /* internal error */
+ FSL_ERR_SYN, /* syntax error */
+#endif
} fsl_rc_t;
fsl_rc_t readfileorallfiles(buf_t *, const char *);
@@ -170,7 +172,7 @@
LOG_PRIMASK
};
-void traverse(cfg_t *cfg, cfg_node_t *cfgnode)
+static void traverse(cfg_t *cfg, cfg_node_t *cfgnode)
{
int rc;
cfg_node_t *cfgchld;
@@ -205,7 +207,7 @@
* Returns the number of characters (to be) written to output. Output can be suppressed
* by passing a NULL outpbuf. The terminating NUL is not counted but will be written!
*/
-int substcapture(const char *inbuf, int inlen, const char **capary, int nary, char *outbuf)
+static int substcapture(const char *inbuf, int inlen, const char **capary, int nary, char *outbuf)
{
int i; /* input cursor, current position */
int n; /* outbuf cursor, next possible write position */
@@ -269,7 +271,7 @@
cfg_node_type_t cfgtype;
int cfgnumc;
int cfgnume;
- char *cfgargtoka[3]; //FIXME hardcoded maximum number of arguments
+ char *cfgargtoka[3]; /*FIXME hardcoded maximum number of arguments */
char *cfgargtok;
char *argident;
char *argmatch;
@@ -280,7 +282,7 @@
char *cpIdent;
char *cpFacility;
char *cpISF;
-#define OVECSIZE 30 //FIXME find a good place for this
+#define OVECSIZE 30 /*FIXME find a good place for this*/
int ovec[OVECSIZE];
const char **acpMatch;
l2_channel_t *ch; /* scratch variable */
@@ -336,7 +338,7 @@
cp = l2_env_strerror(ctx.l2_env, l2rv); fprintf(stderr, "Error: logging failed to register string formatter %s(%d)\n", cp, l2rv); CU(1); }
if ((l2rv = l2_env_formatter(ctx.l2_env, 'm', l2_util_fmt_errno, NULL)) != L2_OK) {
cp = l2_env_strerror(ctx.l2_env, l2rv); fprintf(stderr, "Error: logging failed to register errno formatter %s(%d)\n", cp, l2rv); CU(1); }
- if ((l2rv = l2_env_settimer(ctx.l2_env, 20)) != L2_OK) { //FIXME do we need this?
+ if ((l2rv = l2_env_settimer(ctx.l2_env, 20)) != L2_OK) { /*FIXME do we need this?*/
cp = l2_env_strerror(ctx.l2_env, l2rv); fprintf(stderr, "Error: failed to configure timer %s(%d)\n", cp, l2rv); CU(1); }
/* create L2 noop channel */
@@ -371,7 +373,7 @@
/* find root and check if it is a sequence and has one or more directives below it */
if ((cfgrv = cfg_node_root(cfg, &cfgseq)) != CFG_OK) {
(void)cfg_error(cfg, cfgrv, &cp); fprintf(stderr, "Error: cfg_node_root() failed with error %s (%d)\n", cp, cfgrv); CU(1); }
- //FIXME traverse(cfg, cfgseq); /* DEBUG */
+ /*FIXME traverse(cfg, cfgseq); DEBUG */
if ((cfgrv = cfg_node_get(cfg, cfgseq, CFG_NODE_ATTR_TYPE, &cfgtype)) != CFG_OK) {
(void)cfg_error(cfg, cfgrv, &cp); fprintf(stderr, "Error: cfg_node_get(CFG_NODE_ATTR_TYPE) failed with error %s (%d)\n", cp, cfgrv); CU(1); }
if (cfgtype != CFG_NODE_TYPE_SEQ) {
@@ -385,7 +387,7 @@
if ((cfgrv = cfg_node_get(cfg, cfgseq, CFG_NODE_ATTR_CHILD1, &cfgdir)) != CFG_OK) {
(void)cfg_error(cfg, cfgrv, &cp); fprintf(stderr, "Error: cfg_node_get(CFG_NODE_ATTR_CHILD1) failed with error %s (%d)\n", cp, cfgrv); CU(1); }
while (cfgdir != NULL) {
- //FIXME fprintf(stderr, "DEBUG: cfgdir=0x%.8lx\n", (unsigned long)cfgdir);
+ /*FIXME fprintf(stderr, "DEBUG: cfgdir=0x%.8lx\n", (unsigned long)cfgdir); */
/* check if operating on a directive */
if ((cfgrv = cfg_node_get(cfg, cfgdir, CFG_NODE_ATTR_TYPE, &cfgtype)) != CFG_OK) {
@@ -440,7 +442,7 @@
cfgargtoka[i] = cfgargtok;
}
- if ((strcmp(cfgargtoka[0], "ident") == 0) || (strcmp(cfgargtoka[0], "default") == 0)) { //FIXME currently default and ident are identical
+ if ((strcmp(cfgargtoka[0], "ident") == 0) || (strcmp(cfgargtoka[0], "default") == 0)) { /*FIXME currently default and ident are identical*/
argident = cfgargtoka[0];
argmatch = cfgargtoka[1];
@@ -559,7 +561,7 @@
{
int oldmask;
- //FIXME this is currently a no-op. Should we care about maskpri, set l2 global mask or continue to ignore?
+ /*FIXME this is currently a no-op. Should we care about maskpri, set l2 global mask or continue to ignore?*/
/* remember the logging mask */
oldmask = ctx.maskpri;
if (maskpri != 0)
|