--- fe.c +++ fe.c @@ -128,7 +128,7 @@ /* read rules */ - while ( (r = getline(f)) != 0) { + while ( (r = get_line(f)) != 0) { rulecount++; if (tail) { tail->next = r; --- getline.c +++ getline.c @@ -27,7 +27,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ /* - * getline() picks up a magicfilter rule line and passes it back to magicfilter + * get_line() picks up a magicfilter rule line and passes it back to magicfilter * * rules are: * @@ -172,10 +172,10 @@ /* - * getline() gets a rule off the input stream + * get_line() gets a rule off the input stream */ struct rule * -getline(FILE *input) +get_line(FILE *input) { static char *bfr = 0; /* a buffer for reading lines into */ static int buflen = 0; /* size of that buffer */ @@ -189,13 +189,13 @@ /* initialize the line buffer the first time in */ if ( (bfr = malloc(buflen=80)) == 0) { - perror("getline::malloc"); + perror("get_line::malloc"); exit(1); } } if ( (r = calloc(1, sizeof *r)) == 0) { - perror("getline::calloc"); + perror("get_line::calloc"); exit(1); } @@ -240,7 +240,7 @@ } if ( (r->pattern = strdup(q)) == 0) { - perror("getline::strdup"); + perror("get_line::strdup"); exit(1); } @@ -289,7 +289,7 @@ if (hint) if ( (r->hint = strdup(hint)) == 0) { - perror("getline::strdup"); + perror("get_line::strdup"); exit(1); } @@ -302,11 +302,11 @@ while ( (q = getarg(&p)) != 0) { r->argv = realloc(r->argv, (3 + r->argc) * sizeof r->argv[0]); if (r->argv == 0) { - perror("getline::realloc"); + perror("get_line::realloc"); exit(1); } if ( (r->argv[r->argc++] = strdup(q)) == 0) { - perror("getline::strdup"); + perror("get_line::strdup"); exit(1); } } @@ -330,4 +330,4 @@ } ++ruleno; return r; -} /* getline */ +} /* get_line */ --- rule.h +++ rule.h @@ -55,7 +55,7 @@ struct rule *next; /* next rule in the chain */ } ; -extern struct rule *getline(FILE *); +extern struct rule *get_line(FILE *); extern struct rule *rules; char * action_p(enum rule_action);