1: /* $Header$ */ 2: 3: /* 4: * Author: Peter J. Nicklin 5: */ 6: 7: /* 8: * prmstring() removes id=string from each entry corresponding to key. 9: */ 10: #include <stdio.h> 11: #include "null.h" 12: #include "path.h" 13: #include "pdb.h" 14: 15: void 16: prmstring(key, id, pdbp) 17: char *key; /* key string */ 18: char *id; /* string identifier */ 19: PDB *pdbp; /* database stream */ 20: { 21: char *pbfndkey(); /* find key */ 22: int pgetent(); /* load next entry into buffer */ 23: int pputent(); /* write buffer to database */ 24: void pbrmstring(); /* remove string field */ 25: void rewindpdb(); /* rewind database */ 26: 27: rewindpdb(pdbp); 28: while (pgetent(pdbp) != EOF) 29: { 30: if (pbfndkey(key) != NULL) 31: pbrmstring(id); 32: pputent(pdbp); 33: } 34: }