/[darkstattype]/trunk/darkstattype.c
ViewVC logotype

Diff of /trunk/darkstattype.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 7 by trond, 2014-03-19T15:40:13Z Revision 8 by trond, 2014-03-20T09:00:33Z
# Line 82  void show_usage(int exitcode) Line 82  void show_usage(int exitcode)
82      fprintf(stderr, "%s: missing filename\n\n", progname);      fprintf(stderr, "%s: missing filename\n\n", progname);
83      show_usage(EXIT_FAILURE);      show_usage(EXIT_FAILURE);
84    } // if    } // if
85    
86    filename = argv[0];    filename = argv[0];
87    
88    decode_file();    decode_file();
89    
90    return EXIT_SUCCESS;    return EXIT_SUCCESS;
91  } // main()  } // main()
92    
93  void show_usage(int exitcode)  void show_usage(int exitcode)
94  {  {
95    fprintf((exitcode == EXIT_SUCCESS) ? stdout : stderr,    fprintf((exitcode == EXIT_SUCCESS) ? stdout : stderr,
96      "Usage: %s [-h] [-v] filename\n"      "Usage: %s [-h] [-v] filename\n"
97      " E.g.: %s darkstat.db\n",      " E.g.: %s darkstat.db\n\n"
98    
99        "Options:\n"
100        "-h\tShow this help message and exit.\n"
101        "-v\tShow version and copyright and exit.\n",
102      progname, progname);      progname, progname);
103    
104    exit(exitcode);    exit(exitcode);
105  } // show_usage()  } // show_usage()
106    
107  void show_version(void)  void show_version(void)
108  {  {
109    puts("darkstattype 1.0");    puts("darkstattype 1.0");
110    puts("$Ximalas$");    puts("$Ximalas$");
111    puts("");    puts("");
112    
113    puts("Copyright © 2014, Trond Endrestøl <Trond.Endrestol@ximalas.info>");    puts("Copyright © 2014, Trond Endrestøl <Trond.Endrestol@ximalas.info>");
114    puts("All rights reserved.");    puts("All rights reserved.");
115    puts("");    puts("");
116    puts("Redistribution and use in source and binary forms, with or without");    puts("Redistribution and use in source and binary forms, with or without");


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

svn@ximalas.info
ViewVC Help
Powered by ViewVC 1.3.0-dev