2 * OBOS Command line apps
4 * Larry Cow <larrycow@free.fr>
11 #define DEFAULT_USER "baron"
13 #define HELP_TIP "Try '%s --help' for more information.\n"
15 #define HELP_MESSAGE "Usage: /bin/logname [OPTION]...
16 Print the name of the current
18 --help\t display this help and exit
19 --version\t output version information and exit
21 Reports bugs to <larrycow@free.fr>."
23 #define VERSION_MESSAGE "logname (OBOS) 1.0
26 Coded by Larry Cow 2002
27 Released under the MIT license with OpenBeOS."
29 void dispatch_args(char* av0
, char* av1
)
31 if (!strcmp(av1
, "--help"))
36 if (!strcmp(av1
, "--version"))
38 puts(VERSION_MESSAGE
);
41 printf(HELP_TIP
, av0
);
44 int main(int argc
, char* argv
[])
47 dispatch_args(argv
[0], argv
[1]);
50 char* user
= getenv("USER");