diff options
| author | jakob <jakob@memeware.net> | 2017-01-13 20:54:39 -0500 |
|---|---|---|
| committer | jakob <jakob@memeware.net> | 2017-01-13 20:54:39 -0500 |
| commit | d6a443127b6f8173aeab214942e0b6f31f7c4224 (patch) | |
| tree | 0a148b4b77019e559342aee9bd12923c98d6d90b /src/cli.h | |
| parent | b51100b3330605a6c9bdb3e07e7f9981ff73f6ec (diff) | |
Fixed memory leaking issues and introduced a feature to list the contents of an archive.
Diffstat (limited to 'src/cli.h')
| -rw-r--r-- | src/cli.h | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -20,17 +20,25 @@ /* Enumerable type representing Nekopara games, as they have different encryption keys. It's stored as an enum because multiple strcmp calls to figure out how to decrypt is a waste of processor cycles. */ -typedef enum game { +typedef enum game_type { NO_CRYPTO, NEKOPARA_VOLUME_0, NEKOPARA_VOLUME_0_STEAM, NEKOPARA_VOLUME_1, NEKOPARA_VOLUME_1_STEAM, -} game; +} game_type; + +/* Enumerable type for mode of operation. Used in the main function + to decide what to do after the initial XP3 sanity checks. */ +typedef enum mode_type { + EXTRACT, + LIST, +} mode_type; /* Binary structure for storing command-line options. */ struct configuration { - game source; /* Which decryption key to use. */ + game_type game; /* Which decryption key to use. */ + mode_type mode; /* What to do after initial sanity checks. */ const char *archive_path; /* Path to archive to extract. */ }; |