#include <time.h>
Go to the source code of this file.
Data Structures | |
struct | filedb_top |
struct | filedb_header |
struct | filedb_entry |
Defines | |
#define | filedb_tot_dynspace(fdh) |
#define | filedb_zero_dynspace(fdh) |
#define | malloc_fdbe() _malloc_fdbe(__FILE__, __LINE__) |
#define | filedb_getfile(fdb, pos, get) _filedb_getfile(fdb, pos, get, __FILE__, __LINE__) |
#define | filedb_matchfile(fdb, pos, match) _filedb_matchfile(fdb, pos, match, __FILE__, __LINE__) |
#define | filedb_updatefile(fdb, pos, fdbe, update) _filedb_updatefile(fdb, pos, fdbe, update, __FILE__, __LINE__) |
#define | filedb_addfile(fdb, fdbe) _filedb_addfile(fdb, fdbe, __FILE__, __LINE__) |
#define | filedb_movefile(fdb, pos, fdbe) _filedb_movefile(fdb, pos, fdbe, __FILE__, __LINE__) |
#define | FILEMATCH (match+sofar) |
#define | FILEQUOTE '\\' |
#define | FILEWILDS '*' |
#define | FILEWILDQ '?' |
#define | FILEDB_VERSION1 0x0001 |
#define | FILEDB_VERSION2 0x0002 |
#define | FILEDB_VERSION3 0x0003 |
#define | FILEDB_NEWEST_VER FILEDB_VERSION3 |
#define | POS_NEW 0 |
#define | FILE_UNUSED 0x0001 |
#define | FILE_DIR 0x0002 |
#define | FILE_HIDDEN 0x0004 |
#define | FILEDB_ESTDYN 50 |
Enumerations | |
enum | { GET_HEADER, GET_FILENAME, GET_FULL, UPDATE_HEADER, UPDATE_SIZE, UPDATE_ALL, TYPE_NEW, TYPE_EXIST } |
Functions | |
static void | free_fdbe (filedb_entry **) |
static filedb_entry * | _malloc_fdbe (char *, int) |
static int | filedb_readtop (FILE *, filedb_top *) |
static int | filedb_writetop (FILE *, filedb_top *) |
static int | filedb_delfile (FILE *, long) |
static filedb_entry * | filedb_findempty (FILE *, int) |
static int | _filedb_updatefile (FILE *, long, filedb_entry *, int, char *, int) |
static int | _filedb_movefile (FILE *, long, filedb_entry *, char *, int) |
static int | _filedb_addfile (FILE *, filedb_entry *, char *, int) |
static filedb_entry * | _filedb_getfile (FILE *, long, int, char *, int) |
static filedb_entry * | _filedb_matchfile (FILE *, long, char *, char *, int) |
static filedb_entry * | filedb_getentry (char *, char *) |
#define FILE_DIR 0x0002 |
Definition at line 140 of file filedb3.h.
Referenced by cmd_mkdir(), cmd_mv_cp(), cmd_reget_get(), cmd_rm(), cmd_rmdir(), convert_old_files(), filedb_change(), filedb_getdirs(), filedb_getfiles(), filedb_ls(), filedb_update(), files_reget(), resolve_dir(), tcl_getflags(), tcl_mkdir(), tcl_mv_cp(), tcl_rmdir(), and tcl_setflags().
#define FILE_HIDDEN 0x0004 |
Definition at line 141 of file filedb3.h.
Referenced by cmd_desc(), cmd_hide(), cmd_mv_cp(), cmd_reget_get(), cmd_rm(), cmd_unhide(), filedb_ls(), files_reget(), and tcl_mv_cp().
#define FILE_UNUSED 0x0001 |
Definition at line 139 of file filedb3.h.
Referenced by _filedb_getfile(), _filedb_matchfile(), convert_version1(), convert_version2(), filedb_cleanup(), filedb_delfile(), filedb_findempty(), filedb_getdirs(), filedb_getfiles(), filedb_ls(), filedb_mergeempty(), and filedb_update().
#define filedb_addfile | ( | fdb, | |||
fdbe | ) | _filedb_addfile(fdb, fdbe, __FILE__, __LINE__) |
Definition at line 118 of file filedb3.h.
Referenced by cmd_mv_cp(), convert_old_files(), convert_version1(), convert_version2(), filedb_update(), tcl_mkdir(), and tcl_mv_cp().
#define FILEDB_ESTDYN 50 |
#define filedb_getfile | ( | fdb, | |||
pos, | |||||
get | ) | _filedb_getfile(fdb, pos, get, __FILE__, __LINE__) |
Definition at line 115 of file filedb3.h.
Referenced by _filedb_matchfile(), filedb_cleanup(), filedb_findempty(), filedb_getdirs(), filedb_getfiles(), filedb_ls(), filedb_mergeempty(), and filedb_update().
#define filedb_matchfile | ( | fdb, | |||
pos, | |||||
match | ) | _filedb_matchfile(fdb, pos, match, __FILE__, __LINE__) |
Definition at line 116 of file filedb3.h.
Referenced by cmd_desc(), cmd_hide(), cmd_mkdir(), cmd_mv_cp(), cmd_reget_get(), cmd_rm(), cmd_rmdir(), cmd_unhide(), filedb_add(), filedb_change(), filedb_getentry(), filedb_setdesc(), filedb_setowner(), filedb_update(), files_reget(), incr_file_gots(), resolve_dir(), tcl_mkdir(), tcl_mv_cp(), tcl_rmdir(), and tcl_setflags().
#define filedb_movefile | ( | fdb, | |||
pos, | |||||
fdbe | ) | _filedb_movefile(fdb, pos, fdbe, __FILE__, __LINE__) |
#define FILEDB_NEWEST_VER FILEDB_VERSION3 |
#define filedb_tot_dynspace | ( | fdh | ) |
Value:
((fdh).filename_len + (fdh).desc_len + \ (fdh).chan_len + (fdh).uploader_len + (fdh).flags_req_len)
Definition at line 102 of file filedb3.h.
Referenced by _filedb_getfile(), _filedb_updatefile(), and filedb_delfile().
#define filedb_updatefile | ( | fdb, | |||
pos, | |||||
fdbe, | |||||
update | ) | _filedb_updatefile(fdb, pos, fdbe, update, __FILE__, __LINE__) |
Definition at line 117 of file filedb3.h.
Referenced by cmd_desc(), cmd_hide(), cmd_mkdir(), cmd_unhide(), filedb_add(), filedb_change(), filedb_mergeempty(), filedb_setdesc(), filedb_setowner(), filedb_update(), incr_file_gots(), tcl_mkdir(), and tcl_setflags().
#define FILEDB_VERSION1 0x0001 |
#define FILEDB_VERSION3 0x0003 |
#define filedb_zero_dynspace | ( | fdh | ) |
Value:
{ \ (fdh).filename_len = 0; \ (fdh).desc_len = 0; \ (fdh).chan_len = 0; \ (fdh).uploader_len = 0; \ (fdh).flags_req_len = 0; \ }
Definition at line 105 of file filedb3.h.
Referenced by filedb_delfile().
#define FILEMATCH (match+sofar) |
#define FILEQUOTE '\\' |
#define FILEWILDQ '?' |
#define FILEWILDS '*' |
#define malloc_fdbe | ( | ) | _malloc_fdbe(__FILE__, __LINE__) |
Definition at line 114 of file filedb3.h.
Referenced by cmd_mkdir(), cmd_mv_cp(), convert_old_files(), convert_version1(), convert_version2(), filedb_findempty(), filedb_update(), tcl_mkdir(), and tcl_mv_cp().
#define POS_NEW 0 |
Definition at line 136 of file filedb3.h.
Referenced by _filedb_addfile(), _filedb_updatefile(), and cmd_mkdir().
anonymous enum |
GET_HEADER | |
GET_FILENAME | |
GET_FULL | |
UPDATE_HEADER | |
UPDATE_SIZE | |
UPDATE_ALL | |
TYPE_NEW | |
TYPE_EXIST |
Definition at line 145 of file filedb3.h.
00145 { 00146 GET_HEADER, /* Only save minimal data */ 00147 GET_FILENAME, /* Additionally save filename */ 00148 GET_FULL, /* Save all data */ 00149 00150 UPDATE_HEADER, /* Only update header */ 00151 UPDATE_SIZE, /* Update header, enforce new buf sizes */ 00152 UPDATE_ALL, /* Update additional data too */ 00153 00154 TYPE_NEW, /* New entry */ 00155 TYPE_EXIST /* Existing entry */ 00156 };
static int _filedb_addfile | ( | FILE * | , | |
filedb_entry * | , | |||
char * | , | |||
int | ||||
) | [static] |
static filedb_entry* _filedb_getfile | ( | FILE * | , | |
long | , | |||
int | , | |||
char * | , | |||
int | ||||
) | [static] |
static filedb_entry* _filedb_matchfile | ( | FILE * | , | |
long | , | |||
char * | , | |||
char * | , | |||
int | ||||
) | [static] |
static int _filedb_movefile | ( | FILE * | , | |
long | , | |||
filedb_entry * | , | |||
char * | , | |||
int | ||||
) | [static] |
static int _filedb_updatefile | ( | FILE * | , | |
long | , | |||
filedb_entry * | , | |||
int | , | |||
char * | , | |||
int | ||||
) | [static] |
static filedb_entry* _malloc_fdbe | ( | char * | , | |
int | ||||
) | [static] |
static int filedb_delfile | ( | FILE * | , | |
long | ||||
) | [static] |
static filedb_entry* filedb_findempty | ( | FILE * | , | |
int | ||||
) | [static] |
static filedb_entry* filedb_getentry | ( | char * | , | |
char * | ||||
) | [static] |
static int filedb_readtop | ( | FILE * | , | |
filedb_top * | ||||
) | [static] |
static int filedb_writetop | ( | FILE * | , | |
filedb_top * | ||||
) | [static] |
static void free_fdbe | ( | filedb_entry ** | ) | [static] |