Added usage screen

This commit is contained in:
Pierre Pronchery 2009-10-14 00:00:31 +00:00
parent a3491d5fe8
commit 4d9f3c9ca5
2 changed files with 45 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/* $Id$ */ /* $Id$ */
/* Copyright (c) 2007 Pierre Pronchery <khorben@defora.org> */ /* Copyright (c) 2009 Pierre Pronchery <khorben@defora.org> */
/* This file is part of DeforaOS Unix utils */ /* This file is part of DeforaOS Unix utils */
/* utils is not free software; you can redistribute it and/or modify it under /* utils is not free software; you can redistribute it and/or modify it under
* the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 * the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 3.0
@ -16,8 +16,28 @@
/* main */ #include <unistd.h>
int main(void) #include <stdio.h>
/* usage */
static int _usage(void)
{ {
fputs("Usage: false\n", stderr);
return 1;
}
/* main */
int main(int argc, char * argv[])
{
int o;
while((o = getopt(argc, argv, "")) != -1)
switch(o)
{
default:
return _usage();
}
return 1; return 1;
} }

View File

@ -16,8 +16,28 @@
/* main */ #include <unistd.h>
int main(void) #include <stdio.h>
/* usage */
static int _usage(void)
{ {
fputs("Usage: true\n", stderr);
return 1;
}
/* main */
int main(int argc, char * argv[])
{
int o;
while((o = getopt(argc, argv, "")) != -1)
switch(o)
{
default:
return _usage();
}
return 0; return 0;
} }