read either a string from the current record
| 134 | |
| 135 | // read either a string from the current record |
| 136 | bool 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 |
| 158 | bool oeLnxAppDatabase::read(const char *label, void *entry, int wordsize) { |
no test coverage detected