home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / uupoll068.lha / misc / uupoll067.lha / src / info.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-16  |  2.6 KB  |  85 lines

  1.  
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <string.h>
  5. #include <proto/dos.h>
  6. #include "defines.h"
  7. #include "cus.h"
  8. #include "rev.h"
  9.  
  10. void giveversioninfo(char *progname)
  11. {
  12.     char *buffer = NULL;
  13.     char *ptr;
  14.  
  15.     if ((buffer = (char *)malloc(RANGE_12BIT)) == NULL)
  16.         CU2();
  17.     ptr = buffer;
  18.     strupr(progname);
  19.     ptr += sprintf(ptr, ""
  20.                         "            __\n"
  21.                         "   /  //  //__)_  / /\n"
  22.                         "  (__/(__//   (_)(_(_\n"
  23.                         "\n"
  24.                         "  the UUCP polling server                    R%s.%d (%s)\n"
  25.                         "\n"
  26.                         "  (c)Copyright 1991,92 Ralf S. Engelschall, All Rights Reserved.\n"
  27.                         "  (c)Copyright 1991,92 Cyvaned Systems,     All Rights Reserved.\n\n",
  28.                         Version, Revision, Date );
  29.  
  30.     ptr += sprintf(ptr, "    This  material is distributed under the conditions specified\n"
  31.                         "  in  the  UUPoll  manual file.  Using this program implies that\n"
  32.                         "  you have accepted these licence statements and/or conditions.\n"
  33.                         "\n"
  34.                         "                                    Ralf S. Engelschall\n"
  35.                         "                                    rse@angle.muc.sub.org\n\n" );
  36.     strlwr(progname);
  37.     Write(Output(), buffer, (int)(ptr-buffer));
  38.     CUS:
  39.     if (buffer)
  40.         free(buffer);
  41.     return;
  42. }
  43.  
  44.  
  45. void giveusage(char *progname)
  46. {
  47.     char *buffer = NULL;
  48.     char *ptr;
  49.     char padstr[RANGE_5BIT];
  50.     int i;
  51.     char *cp;
  52.  
  53.     if ((buffer = (char *)malloc(RANGE_12BIT)) == NULL)
  54.         CU2();
  55.     ptr = buffer;
  56.     strlwr(progname);
  57.     for (i = strlen(progname), cp = padstr; i > 0; i--)
  58.         *cp++ = SP;
  59.     *cp = NUL;
  60.     ptr += sprintf(ptr, "\n"
  61.                         " %s [-s [System]] [-S [System]] [-r Num] [-d Sec] [-t Min]\n"
  62.                         " %s [-u Arg] [-m] [-e [Cmnd]] [-E [Cmnd]] [-n [User]]\n"
  63.                         " %s [-a] [-p [Num]] [-c [Mode] [-j [Status]]\n"
  64.                         " %s [-i [Mode]] [-x Num] [-v] [-?]\n"
  65.                         "\n"
  66.                         " s  poll the specified system             u  additional uucico arguments\n"
  67.                         " S  as 's' but ignore time restriction    m  setup modem before startup\n"
  68.                         " r  number of retries before giving up    e  execute after polling session\n"
  69.                         " d  seconds of retry delay time           E  as 'e' but execute always\n"
  70.                         " t  minutes of restriction time           n  notify user if session fails\n"
  71.                         "\n"
  72.                         " a  always poll - ignore success status   i  current host status information\n"
  73.                         " p  poll only if pending work             x  number of debuglevel\n"
  74.                         " c  check for already spawned uucico      v  version info\n"
  75.                         " j  switch/set job control status         ?  usage info\n"
  76.                         "\n",
  77.                         progname, padstr, padstr, padstr);
  78.     Write(Output(), buffer, (int)(ptr-buffer));
  79.     CUS:
  80.     if (buffer)
  81.         free(buffer);
  82.     return;
  83. }
  84.  
  85.