MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / read

Method read

linux/lnxdata.cpp:136–155  ·  view source on GitHub ↗

read either a string from the current record

Source from the content-addressed store, hash-verified

134
135// read either a string from the current record
136bool oeLnxAppDatabase::read(const char *label, char *entry, int *entrylen) {
137 ASSERT(label);
138 ASSERT(entry);
139 ASSERT(entrylen);
140 if (!database) {
141 mprintf(0, "Can't read record because database NULL\n");
142 return false;
143 }
144
145 // See if it exists
146 int size = database->GetDataSize((char *)label);
147 if (size > 0)
148 *entrylen = size - 1; //-1 because of NULL
149 else
150 return false;
151
152 // ok it exists, no look it up
153 database->LookupRecord((char *)label, entry);
154 return true;
155}
156
157// read a variable-sized integer from the current record
158bool oeLnxAppDatabase::read(const char *label, void *entry, int wordsize) {

Callers 13

mng_IsNetworkUpFunction · 0.45
mng_InitNetTablesFunction · 0.45
d3d_PollDevicesFunction · 0.45
IOOps.hFile · 0.45
LoadEditorSettingsFunction · 0.45
OnInitDialogMethod · 0.45
OnInitDialogMethod · 0.45
OnInitDialogMethod · 0.45
DoStuffMethod · 0.45
ScriptCompileFunction · 0.45
nw_InitNetworkingFunction · 0.45
nw_ReccomendPPSFunction · 0.45

Calls 2

GetDataSizeMethod · 0.45
LookupRecordMethod · 0.45

Tested by

no test coverage detected