1: /* $Header$ */
   2: 
   3: /*
   4:  * Author: Peter J. Nicklin
   5:  */
   6: 
   7: /*
   8:  * pbcmpkey() compares keys and returns an integer greater than, equal to,
   9:  * or less than 0, depending on whether key is lexicographically greater
  10:  * than, equal to, or less than the key field pointed to by bp.
  11:  */
  12: #include "pdbuf.h"
  13: 
  14: pbcmpkey(key, bp)
  15:     register char *key;     /* key string */
  16:     register char *bp;      /* buffer pointer */
  17: {
  18:     for (; *key == *bp && *key != '\0'; key++, bp++)
  19:         continue;
  20:     if (*key == '\0' && (*bp == _PBKS || *bp == _PBFS || *bp == '\0'))
  21:         return(0);
  22:     return(*key - *bp);
  23: }
Last modified: 1985-07-03
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 638
Valid CSS Valid XHTML 1.0 Strict