1: /* uucp.c - various parameters for rmail */
   2: 
   3: /* LINTLIBRARY */
   4: 
   5: #include "../h/strings.h"
   6: #include <stdio.h>
   7: 
   8: 
   9: #define NOTOK   (-1)
  10: #define OK  0
  11: 
  12: #define SYSFILE "/usr/lib/uucp/L.sys"
  13: 
  14: /*  */
  15: 
  16: int    uucpsite (system)
  17: register char  *system;
  18: {
  19:     register char  *bp;
  20:     char    buffer[BUFSIZ];
  21:     register FILE  *fp;
  22: 
  23:     if ((fp = fopen (SYSFILE, "r")) == NULL)
  24:     return NOTOK;
  25: 
  26:     while (fgets (buffer, sizeof buffer, fp)) {
  27:     if (strncmp (buffer, "xxx", 3) == 0
  28:         || (bp = index (buffer, ' ')) == NULL)
  29:         continue;
  30:     *bp = NULL;
  31:     if (strcmp (buffer, system) == 0) {
  32:         (void) fclose (fp);
  33:         return OK;
  34:     }
  35:     }
  36: 
  37:     (void) fclose (fp);
  38:     return NOTOK;
  39: }

Defined functions

uucpsite defined in line 16; never used

Defined macros

NOTOK defined in line 9; used 2 times
OK defined in line 10; used 1 times
  • in line 33
SYSFILE defined in line 12; used 1 times
  • in line 23
Last modified: 1986-04-21
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 877
Valid CSS Valid XHTML 1.0 Strict