1: /* $Header$ */
   2: 
   3: /*
   4:  * Author: Peter J. Nicklin
   5:  */
   6: 
   7: /*
   8:  * pbrmkey() removes key from buffer.
   9:  */
  10: #include "pdbuf.h"
  11: 
  12: extern char *CURPBUF;           /* current database buffer */
  13: 
  14: void
  15: pbrmkey(key)
  16:     char *key;          /* key string */
  17: {
  18:     register char *bp;      /* buffer pointer */
  19:     char *pbskipkey();      /* skip key field */
  20:     int klen;           /* key string length */
  21:     int pbcmpkey();         /* compare keys */
  22:     int strlen();           /* string length */
  23:     void pbshrink();        /* shrink buffer */
  24: 
  25:     bp = CURPBUF;
  26:     klen = strlen(key);
  27:     while (*bp != _PBFS && *bp != '\0')
  28:         {
  29:         if (pbcmpkey(key, bp) == 0)
  30:             {
  31:             if (bp[klen] == _PBKS)
  32:                 klen++;
  33:             pbshrink(bp, klen);
  34:             break;
  35:             }
  36:         bp = pbskipkey(bp);
  37:         }
  38: }

Defined functions

Last modified: 1985-07-03
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 590
Valid CSS Valid XHTML 1.0 Strict