1: /* $Header$ */
   2: 
   3: /*
   4:  * Author: Peter J. Nicklin
   5:  */
   6: 
   7: /*
   8:  * pbrmstring() removes string identified by id from buffer.
   9:  */
  10: #include "pdbuf.h"
  11: 
  12: extern char *CURPBUF;           /* current database buffer */
  13: 
  14: void
  15: pbrmstring(id)
  16:     register char *id;      /* string identifier */
  17: {
  18:     register char *bp;      /* buffer pointer */
  19:     char *pbskipfield();        /* skip to next non-key field */
  20:     int flen;           /* field length */
  21:     int pblenfield();       /* length of nonm-key field */
  22:     void pbshrink();        /* shrink buffer */
  23: 
  24:     bp = CURPBUF;
  25:     while (*(bp = pbskipfield(bp)) != '\0')
  26:         if (bp[0] == id[0] && bp[1] == id[1] && bp[2] == '=')
  27:             {
  28:             flen = pblenfield(bp);
  29:             if (bp[flen] == _PBFS)
  30:                 flen++;
  31:             pbshrink(bp, flen);
  32:             break;
  33:             }
  34: }

Defined functions

pbrmstring defined in line 14; used 2 times
Last modified: 1985-07-03
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 566
Valid CSS Valid XHTML 1.0 Strict