1:  /* ts.c: minor string processing subroutines */
   2: match (s1, s2)
   3:     char *s1, *s2;
   4: {
   5:     while (*s1 == *s2)
   6:         if (*s1++ == '\0')
   7:             return(1);
   8:         else
   9:             s2++;
  10:     return(0);
  11: }
  12: prefix(small, big)
  13:     char *small, *big;
  14: {
  15: int c;
  16: while ((c= *small++) == *big++)
  17:     if (c==0) return(1);
  18: return(c==0);
  19: }
  20: letter (ch)
  21:     {
  22:     if (ch >= 'a' && ch <= 'z')
  23:         return(1);
  24:     if (ch >= 'A' && ch <= 'Z')
  25:         return(1);
  26:     return(0);
  27:     }
  28: numb(str)
  29:     char *str;
  30:     {
  31:     /* convert to integer */
  32:     int k;
  33:     for (k=0; *str >= '0' && *str <= '9'; str++)
  34:         k = k*10 + *str - '0';
  35:     return(k);
  36:     }
  37: digit(x)
  38:     {
  39:     return(x>= '0' && x<= '9');
  40:     }
  41: max(a,b)
  42: {
  43: return( a>b ? a : b);
  44: }
  45: tcopy (s,t)
  46:     char *s, *t;
  47: {
  48:     while (*s++ = *t++);
  49: }

Defined functions

digit defined in line 37; used 6 times
letter defined in line 20; used 2 times
match defined in line 2; used 6 times
max defined in line 41; used 2 times
numb defined in line 28; used 1 times
prefix defined in line 12; used 6 times
tcopy defined in line 45; used 1 times
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 624
Valid CSS Valid XHTML 1.0 Strict