![]() |
naev 0.12.5
|
Archiver that allows us to blacklist certain files by creating empty versions of them. More...

Go to the source code of this file.
Data Structures | |
| struct | BlkFile |
| Represents a file in a directory. Used to enumerate files. More... | |
Macros | |
| #define | PCRE2_CODE_UNIT_WIDTH 8 |
| #define | BLACKLIST_FILENAME "naev.BLACKLIST" |
Functions | |
| static PHYSFS_Io * | blk_unsupportedIO (void *opaque, const char *filename) |
| static int | blk_unsupported (void *opaque, const char *name) |
| static void * | blk_openArchive (PHYSFS_Io *io, const char *name, int forWrite, int *claimed) |
| static PHYSFS_EnumerateCallbackResult | blk_enumerate (void *opaque, const char *dirname, PHYSFS_EnumerateCallback cb, const char *origdir, void *callbackdata) |
| static PHYSFS_Io * | blk_openRead (void *opaque, const char *fnm) |
| static int | blk_stat (void *opaque, const char *fn, PHYSFS_Stat *stat) |
| static void | blk_closeArchive (void *opaque) |
| static PHYSFS_sint64 | blk_read (struct PHYSFS_Io *io, void *buf, PHYSFS_uint64 len) |
| static PHYSFS_sint64 | blk_write (struct PHYSFS_Io *io, const void *buffer, PHYSFS_uint64 len) |
| static int | blk_seek (struct PHYSFS_Io *io, PHYSFS_uint64 offset) |
| static PHYSFS_sint64 | blk_tell (struct PHYSFS_Io *io) |
| static PHYSFS_sint64 | blk_length (struct PHYSFS_Io *io) |
| static struct PHYSFS_Io * | blk_duplicate (struct PHYSFS_Io *io) |
| static int | blk_flush (struct PHYSFS_Io *io) |
| static void | blk_destroy (struct PHYSFS_Io *io) |
| static int | blk_enumerateCallback (void *data, const char *origdir, const char *fname) |
| Used to build the blacklist and pseudo filesystem when iterating over real files. | |
| static pcre2_code * | regex_make (char *const *lst) |
| int | blacklist_init (void) |
| Initializes the blacklist system if necessary. If no plugin is blacklisting, it will not do anything. | |
| int | blacklist_append (const char *path) |
| Appends a regex string to be blacklisted. | |
| int | whitelist_append (const char *path) |
| Appends a regex string to be whitelisted. | |
| void | blacklist_exit (void) |
| Exits the blacklist system and cleans up as necessary. | |
| static int | blk_matches (char **lst, const char *filename) |
| Tries to match a string in an array of strings that are sorted. | |
Variables | |
| static pcre2_code * | blk_re = NULL |
| static pcre2_match_data * | blk_match |
| static char ** | blk_blacklists_re = NULL |
| static pcre2_code * | wht_re = NULL |
| static pcre2_match_data * | wht_match |
| static char ** | wht_blacklists_re = NULL |
| static char ** | blk_blacklists |
| static char ** | blk_dirnames = NULL |
| static BlkFile * | blk_fs |
| static const PHYSFS_Archiver | blk_archiver |
| The archiver for blacklists. | |
| static const PHYSFS_Io | blk_emptyio |
| Mimicks an empty file. | |
| static const PHYSFS_Stat | blk_emptystat |
| Stat for an empty regular file. | |
| static const PHYSFS_Stat | blk_emptystatdir |
| Stat for a fake directory. | |
Archiver that allows us to blacklist certain files by creating empty versions of them.
Definition in file physfs_archiver_blacklist.c.
| #define BLACKLIST_FILENAME "naev.BLACKLIST" |
Definition at line 19 of file physfs_archiver_blacklist.c.
| #define PCRE2_CODE_UNIT_WIDTH 8 |
Definition at line 12 of file physfs_archiver_blacklist.c.
| int blacklist_append | ( | const char * | path | ) |
Appends a regex string to be blacklisted.
Definition at line 319 of file physfs_archiver_blacklist.c.
| void blacklist_exit | ( | void | ) |
Exits the blacklist system and cleans up as necessary.
Definition at line 349 of file physfs_archiver_blacklist.c.
| int blacklist_init | ( | void | ) |
Initializes the blacklist system if necessary. If no plugin is blacklisting, it will not do anything.
Definition at line 266 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 462 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 515 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 504 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 416 of file physfs_archiver_blacklist.c.
|
static |
Used to build the blacklist and pseudo filesystem when iterating over real files.
Definition at line 137 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 509 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 498 of file physfs_archiver_blacklist.c.
|
static |
Tries to match a string in an array of strings that are sorted.
Definition at line 382 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 403 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 437 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 467 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 485 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 448 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 492 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 396 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 389 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 476 of file physfs_archiver_blacklist.c.
|
static |
Definition at line 231 of file physfs_archiver_blacklist.c.
| int whitelist_append | ( | const char * | path | ) |
Appends a regex string to be whitelisted.
Definition at line 334 of file physfs_archiver_blacklist.c.
|
static |
The archiver for blacklists.
Definition at line 61 of file physfs_archiver_blacklist.c.
|
static |
List of blacklisted files (for direct access).
Definition at line 37 of file physfs_archiver_blacklist.c.
|
static |
Original regex strings.
Definition at line 32 of file physfs_archiver_blacklist.c.
|
static |
List of blacklisted directories (for direct access, necessary to enumerate).
Definition at line 39 of file physfs_archiver_blacklist.c.
|
static |
Mimicks an empty file.
Definition at line 96 of file physfs_archiver_blacklist.c.
|
static |
Stat for an empty regular file.
Definition at line 112 of file physfs_archiver_blacklist.c.
|
static |
Stat for a fake directory.
Definition at line 124 of file physfs_archiver_blacklist.c.
|
static |
Fake filesystem structure of directory-file pairs.
Definition at line 41 of file physfs_archiver_blacklist.c.
|
static |
Stores the matching structure of the regex (for speed).
Definition at line 30 of file physfs_archiver_blacklist.c.
|
static |
Stores the compiled regex.
Definition at line 29 of file physfs_archiver_blacklist.c.
|
static |
Original regex strings.
Definition at line 36 of file physfs_archiver_blacklist.c.
|
static |
Stores the matching structure of the regex (for speed).
Definition at line 34 of file physfs_archiver_blacklist.c.
|
static |
Stores the compiled regex.
Definition at line 33 of file physfs_archiver_blacklist.c.