diff --git a/polymer/eduke32/build/include/cache1d.h b/polymer/eduke32/build/include/cache1d.h index 8cd89910b..b23e822cd 100644 --- a/polymer/eduke32/build/include/cache1d.h +++ b/polymer/eduke32/build/include/cache1d.h @@ -45,6 +45,7 @@ int32_t ktell(int32_t handle); void kclose(int32_t handle); void krename(int32_t crcval, int32_t filenum, const char *newname); +char const * kfileparent(int32_t handle); typedef struct { intptr_t *hand; int32_t leng; char *lock ; } cactype; diff --git a/polymer/eduke32/build/src/cache1d.c b/polymer/eduke32/build/src/cache1d.c index f05690b21..fbddd27b0 100644 --- a/polymer/eduke32/build/src/cache1d.c +++ b/polymer/eduke32/build/src/cache1d.c @@ -1100,6 +1100,16 @@ void krename(int32_t crcval, int32_t filenum, const char *newname) } } +char const * kfileparent(int32_t const handle) +{ + int32_t const groupnum = filegrp[handle]; + + if ((unsigned)groupnum >= MAXGROUPFILES || groupfil[groupnum] == -1) + return NULL; + + return groupname[groupnum]; +} + int32_t kopen4load(const char *filename, char searchfirst) { int32_t newhandle = MAXOPENFILES-1;