Lines 11-17
Link Here
|
11 |
#endif /* MEMWATCH */ |
11 |
#endif /* MEMWATCH */ |
12 |
#include "extern.h" |
12 |
#include "extern.h" |
13 |
|
13 |
|
14 |
#define BUFFER_LEN 82 |
14 |
#define BUFFER_LEN 100 |
15 |
#define IS_BIT(x) (!strcmp(x, "0") || !strcmp(x, "1")) |
15 |
#define IS_BIT(x) (!strcmp(x, "0") || !strcmp(x, "1")) |
16 |
|
16 |
|
17 |
static void process_boolean(char *option, char *value, int *variable) { |
17 |
static void process_boolean(char *option, char *value, int *variable) { |
Lines 30-36
void parse_config(char *config) {
Link Here
|
30 |
char *option; /* config file option */ |
30 |
char *option; /* config file option */ |
31 |
char *value; /* value for option */ |
31 |
char *value; /* value for option */ |
32 |
|
32 |
|
33 |
int line_number = 1; |
33 |
int line_number = 0; |
34 |
char *chop; |
34 |
char *chop; |
35 |
|
35 |
|
36 |
/* MEMWATCH: reports this isnt freed, why? */ |
36 |
/* MEMWATCH: reports this isnt freed, why? */ |
Lines 45-50
void parse_config(char *config) {
Link Here
|
45 |
} |
45 |
} |
46 |
|
46 |
|
47 |
while (fgets(buffer, sizeof(buffer), fp)) { |
47 |
while (fgets(buffer, sizeof(buffer), fp)) { |
|
|
48 |
line_number++; |
48 |
if (buffer[0] == '#' || buffer[0] == ';' || buffer[0] == '\n') |
49 |
if (buffer[0] == '#' || buffer[0] == ';' || buffer[0] == '\n') |
49 |
continue; |
50 |
continue; |
50 |
remove_crud(buffer); |
51 |
remove_crud(buffer); |
Lines 123-130
void parse_config(char *config) {
Link Here
|
123 |
else |
124 |
else |
124 |
if (!quiet) |
125 |
if (!quiet) |
125 |
printf("parse_config: option %s is not valid\n", option); |
126 |
printf("parse_config: option %s is not valid\n", option); |
126 |
|
|
|
127 |
line_number++; |
128 |
} |
127 |
} |
129 |
|
128 |
|
130 |
debug(3, "parse_config: read %s [%i]\n", config, line_number-1); |
129 |
debug(3, "parse_config: read %s [%i]\n", config, line_number-1); |
131 |
- |
|
|