# 2.11BSD#431 - /usr/src/usr.bin/uucp/prefix.c

##### Functions

    prefix            X
    wprefix           X

       1: #ifndef lint
       2: static char sccsid[] = "@(#)prefix.c	5.3 (Berkeley) 6/20/85";
       3: #endif
       4:
       5: /*LINTLIBRARY*/
       6:
       7: /*
       8:  *	check s2 for prefix s1
       9:  *
      10:  *	return 0 - !=
      11:  *	return 1 - ==
      12:  */
      13:
      14: prefix(s1, s2)
      15: register char *s1, *s2;
      16: {
      17:     register char c;
      18:
      19:     while ((c = *s1++) == *s2++)
      20:         if (c == '\0')
      21:             return 1;
      22:     return c == '\0';
      23: }
      24:
      25: /*
      26:  *	check s2 for prefix s1 with a wildcard character ?
      27:  *
      28:  *	return 0 - !=
      29:  *	return 1 - ==
      30:  */
      31:
      32: wprefix(s1, s2)
      33: register char *s1, *s2;
      34: {
      35:     register char c;
      36:
      37:     while ((c = *s1++) != '\0')
      38:         if (*s2 == '\0'  ||  (c != *s2++  &&  c != '?'))
      39:             return 0;
      40:     return 1;
      41: }

#### Defined functions

prefix defined in line 14; used 21 times

- in /usr/src/usr.bin/uucp/anlwrk.c line 139
- in /usr/src/usr.bin/uucp/chkpth.c line 65, 73
- in /usr/src/usr.bin/uucp/conn.c line 679, 688, 929-939(4), 945, 952
- in /usr/src/usr.bin/uucp/gnsys.c line 51
- in /usr/src/usr.bin/uucp/uuclean.c line 137
- in /usr/src/usr.bin/uucp/uulog.c line 79-81(2)
- in /usr/src/usr.bin/uucp/uuq.c line 275, 366
- in /usr/src/usr.bin/uucp/uux.c line 118
- in /usr/src/usr.bin/uucp/uuxqt.c line 230, 342, 634

wprefix defined in line 32; used 1 times

- in /usr/src/usr.bin/uucp/conn.c line 845

#### Defined variables

sccsid defined in line 2; never used

Last modified: 1987-02-17 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 436 |