[xiph-cvs] cvs commit: icecast/src main.c
Ed
oddsock at xiph.org
Mon Dec 29 08:18:49 PST 2003
oddsock 03/12/29 11:18:48
Modified: src main.c
Log:
add option to display icecast version string, and cleaned up usage a bit..
Revision Changes Path
1.36 +11 -3 icecast/src/main.c
Index: main.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/main.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- main.c 4 Dec 2003 16:24:34 -0000 1.35
+++ main.c 29 Dec 2003 16:18:48 -0000 1.36
@@ -64,8 +64,12 @@
static void _print_usage()
{
- printf("Usage:\n");
- printf("\ticecast -c <file>\t\tSpecify configuration file\n");
+ printf("usage: icecast [-h -b -v] -c <file>\n");
+ printf("options:\n");
+ printf("\t-c <file>\tSpecify configuration file\n");
+ printf("\t-h\t\tDisplay usage\n");
+ printf("\t-v\t\tDisplay version info\n");
+ printf("\t-b\t\tRun icecast in the background\n");
printf("\n");
}
@@ -121,7 +125,7 @@
int i = 1;
int processID = 0;
- if (argc < 3) return -1;
+ if (argc < 2) return -1;
while (i < argc) {
if (strcmp(argv[i], "-b") == 0) {
@@ -133,6 +137,10 @@
}
#endif
}
+ if (strcmp(argv[i], "-v") == 0) {
+ fprintf(stdout, "%s\n", ICECAST_VERSION_STRING);
+ exit(0);
+ }
if (strcmp(argv[i], "-c") == 0) {
if (i + 1 < argc) {
strncpy(filename, argv[i + 1], size-1);
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list