| 496 | } |
| 497 | |
| 498 | static void _add_entry(DBM *db, const string &k, string &v) |
| 499 | { |
| 500 | _trim_leading_newlines(v); |
| 501 | datum key, value; |
| 502 | key.dptr = (char *) k.c_str(); |
| 503 | key.dsize = k.length(); |
| 504 | |
| 505 | value.dptr = (char *) v.c_str(); |
| 506 | value.dsize = v.length(); |
| 507 | |
| 508 | if (dbm_store(db, key, value, DBM_REPLACE)) |
| 509 | end(1, true, "Error storing %s", k.c_str()); |
| 510 | } |
| 511 | |
| 512 | static void _parse_text_db(LineInput &inf, DBM *db) |
| 513 | { |
no test coverage detected