MCPcopy Create free account
hub / github.com/crawl/crawl / _add_entry

Function _add_entry

crawl-ref/source/database.cc:498–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496}
497
498static 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
512static void _parse_text_db(LineInput &inf, DBM *db)
513{

Callers 2

_regenerate_dbMethod · 0.85
_parse_text_dbFunction · 0.85

Calls 3

_trim_leading_newlinesFunction · 0.85
dbm_storeFunction · 0.85
endFunction · 0.85

Tested by

no test coverage detected