make COM_LoadCacheFile not useless

master
an 2019-12-04 05:53:54 -05:00
parent c9eb79e2c6
commit 0c63cad638
3 changed files with 9 additions and 5 deletions

View File

@ -1591,10 +1591,14 @@ byte *COM_LoadTempFile(const char *path, uint32_t *path_id)
return COM_LoadFile(path, LOADFILE_TEMPHUNK, path_id);
}
void COM_LoadCacheFile(const char *path, struct cache_user_s *cu, uint32_t *path_id)
byte *COM_LoadCacheFile(const char *path, struct cache_user_s *cu, uint32_t *path_id)
{
byte *buf;
loadcache = cu;
COM_LoadFile(path, LOADFILE_CACHE, path_id);
buf = COM_LoadFile(path, LOADFILE_CACHE, path_id);
return buf;
}
// uses temp hunk if larger than bufsize

View File

@ -288,8 +288,8 @@ byte *COM_LoadHunkFile(const char *path, uint32_t *path_id);
// allocates the buffer on the hunk.
byte *COM_LoadZoneFile(const char *path, uint32_t *path_id);
// allocates the buffer on the zone.
void COM_LoadCacheFile(const char *path, struct cache_user_s *cu,
uint32_t *path_id);
byte *COM_LoadCacheFile(const char *path, struct cache_user_s *cu,
uint32_t *path_id);
// uses cache mem for allocating the buffer.
byte *COM_LoadMallocFile(const char *path, uint32_t *path_id);
// allocates the buffer on the system mem (malloc).

View File

@ -132,7 +132,7 @@ enum
OP_BITOR
};
typedef struct statement_s
typedef struct
{
uint16_t op;
int16_t a, b, c;