mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-02-27 04:43:52 +01:00
inih is confusing (0 is error, 1 is success, why? who the fuck knows)
This commit is contained in:
12
src/rds95.c
12
src/rds95.c
@@ -42,14 +42,10 @@ static inline void show_help(char *name) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Usage: %s [options]\n"
|
"Usage: %s [options]\n"
|
||||||
"\n"
|
"\n"
|
||||||
"\t-C,--ctl\tFIFO control pipe\n"
|
"\t-c,--config\tSet the config path [default: %s]\n"
|
||||||
"\t-d,--device\tPulseAudio device to use (default: %s)\n"
|
|
||||||
"\t-s,--streams\tNumber of RDS streams (1-%d, default: %d)\n"
|
|
||||||
"\n",
|
"\n",
|
||||||
name,
|
name,
|
||||||
RDS_DEVICE,
|
DEFAULT_CONFIG_PATH,
|
||||||
MAX_STREAMS,
|
|
||||||
DEFAULT_STREAMS
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,9 +70,9 @@ static int config_handler(void* user, const char* section, const char* name, con
|
|||||||
config->num_streams = atoi(value);
|
config->num_streams = atoi(value);
|
||||||
if(config->num_streams > MAX_STREAMS || config->num_streams == 0) return 1;
|
if(config->num_streams > MAX_STREAMS || config->num_streams == 0) return 1;
|
||||||
} else {
|
} else {
|
||||||
return 1;
|
return 0;
|
||||||
}
|
}
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
|||||||
Reference in New Issue
Block a user