| 288 | } |
| 289 | |
| 290 | txID fxFindName(txMachine* the, txString theString) |
| 291 | { |
| 292 | txU1* aString; |
| 293 | txU4 aSum; |
| 294 | txU4 aModulo; |
| 295 | txSlot* result; |
| 296 | |
| 297 | aString = (txU1*)theString; |
| 298 | aSum = 0; |
| 299 | while (*aString != 0) { |
| 300 | aSum = (aSum << 1) + *aString++; |
| 301 | } |
| 302 | aSum &= 0x7FFFFFFF; |
| 303 | aModulo = aSum % the->nameModulo; |
| 304 | result = the->nameTable[aModulo]; |
| 305 | while (result != C_NULL) { |
| 306 | if (result->value.key.sum == aSum) |
| 307 | if (c_strcmp(result->value.key.string, theString) == 0) |
| 308 | return mxGetKeySlotID(result); |
| 309 | result = result->next; |
| 310 | } |
| 311 | return 0; |
| 312 | } |
| 313 | |
| 314 | txBoolean fxIsKeyName(txMachine* the, txID theID) |
| 315 | { |
no outgoing calls
no test coverage detected