45 |
#ifdef DEBUG |
#ifdef DEBUG |
46 |
printf("debug: configuration file: '%s'\n", cfg); |
printf("debug: configuration file: '%s'\n", cfg); |
47 |
#endif |
#endif |
48 |
|
#ifdef PERMISSIONS |
49 |
check_permissions(cfg); |
check_perms(cfg); |
50 |
|
#endif |
51 |
fp = fopen(cfg, "r"); |
fp = fopen(cfg, "r"); |
52 |
|
|
53 |
if (!fp) { |
if (!fp) { |
68 |
} |
} |
69 |
|
|
70 |
|
|
71 |
|
#ifdef PERMISSIONS |
72 |
/* |
/* |
73 |
* Checks the permissions of the configuration file. |
* Checks the permissions of the configuration file. |
74 |
*/ |
*/ |
75 |
int check_permissions(char *cfg) |
int check_perms(char *cfg) |
76 |
{ |
{ |
77 |
struct stat fs; |
struct stat fs; |
78 |
|
|
97 |
|
|
98 |
return 0; |
return 0; |
99 |
} |
} |
100 |
|
#endif |
101 |
|
|
102 |
/* |
/* |
103 |
* Parses configuration file. |
* Parses configuration file. |
165 |
return 1; |
return 1; |
166 |
} |
} |
167 |
|
|
168 |
|
for (i = 0; i < 7; i++) |
169 |
|
regfree(&creg[i]); |
170 |
|
|
171 |
return 0; |
return 0; |
172 |
} |
} |
173 |
|
|