1: /* $Header$ */ 2: 3: /* 4: * Author: Peter J. Nicklin 5: */ 6: 7: /* 8: * pbcmpfield() compares non-key fields and returns an integer greater than, 9: * equal to, or less than 0, depending on whether field is lexicographically 10: * greater than, equal to, or less than the non-key field pointed to by bp. 11: */ 12: #include "pdbuf.h" 13: 14: pbcmpfield(field, bp) 15: register char *field; /* field string */ 16: register char *bp; /* buffer pointer */ 17: { 18: for (; *field == *bp && *field != '\0'; field++, bp++) 19: continue; 20: if (*field == '\0' && (*bp == _PBFS || *bp == '\0')) 21: return(0); 22: return(*field - *bp); 23: }