home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / b / bmh02src.zip / HELP.C < prev    next >
C/C++ Source or Header  |  1992-08-17  |  882b  |  41 lines

  1. /*
  2.    help.c : Copyright Paul Healy, EI9GL, 1992.
  3.  
  4.    920708 : Created.
  5. */
  6. #include <stdio.h>
  7. #include <stdlib.h>
  8. #include <string.h>
  9. #include "help.h"
  10.  
  11. static char Version[]="0.2";
  12.  
  13. void
  14. version(void)
  15. {
  16.    fprintf(stderr, "Version: %s\n", Version);
  17.    fprintf(stderr, "%s\n%s\n%s\n%s",
  18.    "Copyright 1992 Paul Healy EI9GL, permission granted for non-commercial use.",
  19.    "bmh is derived from bm, which is copyright:",
  20.    "Copyright 1987 Bdale Garbee, permission granted for non-commercial use.",
  21.    "Copyright 1988 Dave Trulli NN2Z, permission granted for non-commercial use.");
  22. }
  23.  
  24. static void
  25. help(char *usage)
  26. {
  27.    fprintf(stderr, "Usage: %s \n\n", usage);
  28.    version();
  29.    exit(0);
  30. }
  31.  
  32. void
  33. dohelp(int argc, char *argv[], char *usage)
  34. {
  35.    int i;
  36.  
  37.    for (i=1; i<argc; i++)
  38.       if (strcmp("-help", argv[i]) == 0)
  39.          help(usage);
  40. }
  41.