txBoolean fxFindURI(txMachine* the, txString base, txString name, txString dot, txID* id) { char path[PATH_MAX]; txSlot* key; if (*dot) { fxMergePath(base, name, path); if (fxFindArchive(the, path) || fxFindFile(the, path)) { key = fxNewNameC(the, path); *id = key->ID; return 1; } } else { txString* extension; for (extension = gxExtensions; *extension; extension++) { c_strcpy(dot, *extension); fxMergePath(base, name, path); if (fxFindArchive(the, path) || fxFindFile(the, path)) { key = fxNewNameC(the, path); *id = key->ID; return 1; } } *dot = 0; } *id = XS_NO_ID; return 0; }
txID fxID(txMachine* the, txString theName) { txSlot* aKey; aKey = fxNewNameC(the, theName); return aKey->ID; }