Functions | |
| char * | macs_get_config (const void *ctxp, const char *key,...) |
| Fetch a configuration value. | |
| char ** | macs_get_configs (const void *ctxp, int *nodes, const char *key,...) |
| Fetch several configuration values. | |
| char ** | macs_get_methods (const void *ctxp, int server) |
| Fetch a list of available methods. | |
|
||||||||||||||||
|
Fetch a configuration value.
void showLIA() {
char *value;
fputs("(normal) Fetching cgi/LIA:",stderr);
value=macs_get_config("cgi","LIA",NULL);
if (!value) { fputs("No cgi/LIA found.\n",stderr); return; }
fprintf(stderr,"%s\n",value);
free(value);
}
|
|
||||||||||||||||||||
|
Fetch several configuration values.
void showSFSs() {
char **values;
int nodes, i;
fputs("(array) Fetching SFS/p",stderr);
values=macs_get_configs(ctxp,&nodes,"SFS","p",NULL);
if (!values) { fputs("No SFS/p found.\n",stderr); return; }
fprintf(stderr,"(%d):",nodes);
for (i=0; i < nodes; i++) {
fprintf(stderr,"%s%s",values[i],i==nodes-1?"\n":",");
free(values[i]);
}
if (!values) return;
free(values);
}
|
|
||||||||||||
|
Fetch a list of available methods.
|
1.2.16