parent
ebee02e196
commit
34eb29d797
15
src/db.cc
15
src/db.cc
|
@ -7,10 +7,17 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
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.
|
||||
//
|
||||
|
|
12
src/db.h
12
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 */
|
||||
|
|
Loading…
Reference in New Issue