1: #ifndef lint
   2: static char sccsid[] = "@(#)versys.c	5.1 (Berkeley) 7/2/83";
   3: #endif
   4: 
   5: #include "uucp.h"
   6: 
   7: #define SNAMESIZE 7
   8: 
   9: /*******
  10:  *	versys(name)	verify system names n1 and n2
  11:  *	char *name;
  12:  *
  13:  *	return codes:  0  |  FAIL
  14:  */
  15: 
  16: versys(name)
  17: register char *name;
  18: {
  19:     register FILE *fp;
  20:     char line[1000];
  21:     char s1[SNAMESIZE + 1];
  22:     char myname[SNAMESIZE + 1];
  23: 
  24:     sprintf(myname, "%.7s", Myname);
  25:     sprintf(s1, "%.7s", name);
  26:     if (strcmp(s1, myname) == 0)
  27:         return(0);
  28: 
  29:     fp = fopen(SYSFILE, "r");
  30:     ASSERT(fp != NULL, "CAN'T OPEN", SYSFILE, 0);
  31:     while (cfgets(line, sizeof(line), fp) != NULL) {
  32:         char *targs[100];
  33: 
  34:         getargs(line, targs);
  35:         targs[0][7] = '\0';
  36:         if (strcmp(s1, targs[0]) == SAME) {
  37:             fclose(fp);
  38:             return(0);
  39:         }
  40:     }
  41:     fclose(fp);
  42:     return(FAIL);
  43: }

Defined functions

versys defined in line 16; used 4 times

Defined variables

sccsid defined in line 2; never used

Defined macros

SNAMESIZE defined in line 7; used 2 times
Last modified: 1983-07-03
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 728
Valid CSS Valid XHTML 1.0 Strict