1: /*	@(#)genbsubs.c	1.1	*/
   2: 
   3: /* The output of bunequal is the offset of the byte which didn't match;
   4:  * if all the bytes match, then we return n.
   5:  * bunequal(s1, s2, n) */
   6: 
   7: int
   8: bunequal(s1, s2, n)
   9: register char *s1, *s2;
  10: register n;
  11: {
  12:     register int i = 0;
  13: 
  14:     while (i++ < n) {
  15:     if (*s1++ != *s2++) {
  16:         break;
  17:     }
  18:     }
  19:     return(i-1);
  20: }
  21: 
  22: /* bskip(s1, n, b) : finds the first occurrence of any byte != 'b' in the 'n'
  23:  * bytes beginning at 's1'.
  24:  */
  25: 
  26: int
  27: bskip(s1, n, b)
  28: register char *s1;
  29: register int n;
  30: register int b;
  31: {
  32:     register int i = 0;
  33: 
  34:     while (i++ < n) {
  35:     if (*s1++ != b) {
  36:         break;
  37:     }
  38:     }
  39:     return(i-1);
  40: }

Defined functions

bskip defined in line 26; used 2 times
bunequal defined in line 7; used 1 times
Last modified: 1986-01-11
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 776
Valid CSS Valid XHTML 1.0 Strict