home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / ListSERV1_4.lha / ListSERV / source / RCS / info.c,v < prev    next >
Encoding:
Text File  |  1993-12-27  |  5.4 KB  |  224 lines

  1. head    1.1;
  2. branch    1.1.1;
  3. access;
  4. symbols;
  5. locks
  6.     simons:1.1.1.3
  7.     andy:1.1; strict;
  8. comment    @ * @;
  9.  
  10.  
  11. 1.1
  12. date    92.09.14.11.03.52;    author andy;    state Exp;
  13. branches
  14.     1.1.1.1;
  15. next    ;
  16.  
  17. 1.1.1.1
  18. date    93.12.26.00.41.06;    author simons;    state Exp;
  19. branches;
  20. next    1.1.1.2;
  21.  
  22. 1.1.1.2
  23. date    93.12.26.19.35.55;    author simons;    state Exp;
  24. branches;
  25. next    1.1.1.3;
  26.  
  27. 1.1.1.3
  28. date    93.12.27.17.24.01;    author simons;    state Exp;
  29. branches;
  30. next    ;
  31.  
  32.  
  33. desc
  34. @Original Unix-Listserv distribution.
  35. @
  36.  
  37.  
  38. 1.1
  39. log
  40. @checked in with -k by simons at 1993/12/26 00:08:53
  41. @
  42. text
  43. @#include "listserv.h"
  44.  
  45. static char rcsid[] = "$Header: /usr/local/src/mail/listserv/RCS/info.c,v 1.1 92/09/14 11:03:52 andy Exp Locker: andy $";
  46.  
  47. extern FILE *msg;
  48. extern FILE *mailer;
  49.  
  50. infoindex(from,request)
  51. char *from, *request;
  52.         {
  53.         printf("called sendhelp with %s %s\n", from, request);
  54.         callmailer("", from, request);
  55.         mailcat(INFOFILE,"");
  56.         pclose(mailer);
  57.         return;
  58.         }
  59.  
  60. sendinfo(from, command)
  61. char *from, *command;
  62.         {
  63.         int i;
  64.         char *p;
  65.         char doc[256],
  66.              tmp[512],
  67.              buf[BUFSIZ];
  68.  
  69.         printf("called sendfaq with %s %s\n", from, command);
  70.         /* Grab filenames trailing after word "info" */
  71.         strcpy(buf, command);
  72.         while(p = index(buf, ' '))
  73.                 {
  74.                 /* Get rid of extra blanks
  75.                    and return if only trailing whitespace remains */
  76.                 while(*(++p) == ' ')
  77.                         ;
  78.                 if(!strlen(p))
  79.                         return;
  80.  
  81.                 strcpy(buf, p);
  82.                 sscanf(buf, "%s", doc);
  83.                 if (index(doc, '*'))
  84.                         {
  85.                         callmailer("", from, command);
  86.                         sprintf(tmp, "%s/INFOHELP", SERVDIR);
  87.                         mailcat(tmp, "\t");
  88.                         fflush(mailer);
  89.                         pclose(mailer);
  90.                         continue;
  91.                         }
  92.                 sprintf(tmp, "%s/%s", INFODIR, doc);
  93.                 callmailer("", from, command);
  94.                 if(access(tmp,R_OK) == 0)
  95.                         {
  96.                         mailcat(tmp, "\t");
  97.                         fflush(mailer);
  98.                         pclose(mailer);
  99.                         }
  100.                 else
  101.                         {
  102.                         fprintf(mailer, "File %s does not exist.", doc);
  103.                         fflush(mailer);
  104.                         pclose(mailer);
  105.                         }
  106.                 }
  107.  
  108.         }
  109. @
  110.  
  111.  
  112. 1.1.1.1
  113. log
  114. @Changed source code to compiler under SAS/C 6.50.
  115. @
  116. text
  117. @a1 1
  118. #include "protos.h"
  119. d3 1
  120. a3 1
  121. static char rcsid[] = "$Id$";
  122. d5 4
  123. a8 1
  124. void infoindex(from,request)
  125. d18 1
  126. a18 1
  127. void sendinfo(from, command)
  128. @
  129.  
  130.  
  131. 1.1.1.2
  132. log
  133. @Removed the complete local/non-local user determination, including
  134. all >outsider< parameters and the cleanup() routine.
  135. Changed UNIX-paths to conform with AmigaDOS.
  136. @
  137. text
  138. @d4 1
  139. a4 1
  140. static char rcsid[] = "$Id: info.c,v 1.1.1.1 1993/12/26 00:41:06 simons Exp simons $";
  141. d42 1
  142. a42 1
  143.                         sprintf(tmp, "%sINFOHELP", SERVDIR);
  144. @
  145.  
  146.  
  147. 1.1.1.3
  148. log
  149. @Removed the 'INFO'-command--for the moment.
  150. @
  151. text
  152. @d1 64
  153. a64 69
  154. /*
  155.  * Currently, the INFO-command is disabled!!
  156.  *                                      -peter
  157.  *
  158.  * #include "listserv.h"
  159.  * #include "protos.h"
  160.  *
  161.  * static char rcsid[] = "$Id: info.c,v 1.1.1.2 1993/12/26 19:35:55 simons Exp simons $";
  162.  *
  163.  * void infoindex(from,request)
  164.  * char *from, *request;
  165.  *         {
  166.  *         printf("called sendhelp with %s %s\n", from, request);
  167.  *         callmailer("", from, request);
  168.  *         mailcat(INFOFILE,"");
  169.  *         pclose(mailer);
  170.  *         return;
  171.  *         }
  172.  *
  173.  * void sendinfo(from, command)
  174.  * char *from, *command;
  175.  *         {
  176.  *         int i;
  177.  *         char *p;
  178.  *         char doc[256],
  179.  *              tmp[512],
  180.  *              buf[BUFSIZ];
  181.  *
  182.  *         printf("called sendfaq with %s %s\n", from, command);
  183.  *         / * Grab filenames trailing after word "info" * /
  184.  *         strcpy(buf, command);
  185.  *         while(p = index(buf, ' '))
  186.  *                 {
  187.  *                 / * Get rid of extra blanks
  188.  *                   * and return if only trailing whitespace remains * /
  189.  *                 while(*(++p) == ' ')
  190.  *                         ;
  191.  *                 if(!strlen(p))
  192.  *                         return;
  193.  *
  194.  *                 strcpy(buf, p);
  195.  *                 sscanf(buf, "%s", doc);
  196.  *                 if (index(doc, '*'))
  197.  *                         {
  198.  *                         callmailer("", from, command);
  199.  *                         sprintf(tmp, "%sINFOHELP", SERVDIR);
  200.  *                         mailcat(tmp, "\t");
  201.  *                         fflush(mailer);
  202.  *                         pclose(mailer);
  203.  *                         continue;
  204.  *                         }
  205.  *                 sprintf(tmp, "%s/%s", INFODIR, doc);
  206.  *                 callmailer("", from, command);
  207.  *                 if(access(tmp,R_OK) == 0)
  208.  *                         {
  209.  *                         mailcat(tmp, "\t");
  210.  *                         fflush(mailer);
  211.  *                         pclose(mailer);
  212.  *                         }
  213.  *                 else
  214.  *                         {
  215.  *                         fprintf(mailer, "File %s does not exist.", doc);
  216.  *                         fflush(mailer);
  217.  *                         pclose(mailer);
  218.  *                         }
  219.  *                 }
  220.  *
  221.  *         }
  222.  */
  223. @
  224.