diff --git a/src/db.cc b/src/db.cc index 734cc37..b419d07 100644 --- a/src/db.cc +++ b/src/db.cc @@ -7,10 +7,17 @@ #include #include +typedef struct FileList { + XList xlist; + struct FileList* next; +} FileList; + +static int _db_list_compare(const void* p1, const void* p2); + // Generic file progress report handler. // // 0x51DEEC -FileReadProgressHandler* gFileReadProgressHandler = NULL; +static FileReadProgressHandler* gFileReadProgressHandler = NULL; // Bytes read so far while tracking progress. // @@ -18,15 +25,15 @@ FileReadProgressHandler* gFileReadProgressHandler = NULL; // and this value resets to zero. // // 0x51DEF0 -int gFileReadProgressBytesRead = 0; +static int gFileReadProgressBytesRead = 0; // The number of bytes to read between calls to progress handler. // // 0x673040 -int gFileReadProgressChunkSize; +static int gFileReadProgressChunkSize; // 0x673044 -FileList* gFileListHead; +static FileList* gFileListHead; // Opens file database. // diff --git a/src/db.h b/src/db.h index 6d4ce6e..f6206a6 100644 --- a/src/db.h +++ b/src/db.h @@ -10,17 +10,6 @@ typedef XFile File; typedef void FileReadProgressHandler(); typedef char* StrdupProc(const char* string); -typedef struct FileList { - XList xlist; - struct FileList* next; -} FileList; - -extern FileReadProgressHandler* gFileReadProgressHandler; -extern int gFileReadProgressBytesRead; - -extern int gFileReadProgressChunkSize; -extern FileList* gFileListHead; - int dbOpen(const char* filePath1, int a2, const char* filePath2, int a4); int _db_current(int a1); bool _db_total(); @@ -75,6 +64,5 @@ void _db_register_mem(MallocProc* mallocProc, StrdupProc* strdupProc, FreeProc* int fileGetSize(File* stream); void fileSetReadProgressHandler(FileReadProgressHandler* handler, int size); void _db_enable_hash_table_(); -int _db_list_compare(const void* p1, const void* p2); #endif /* DB_H */