Make use of argc/argv easier
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *markov_tabl
|
||||
void sp_stretch_markov (hcstat_table_t *in, hcstat_table_t *out);
|
||||
void sp_stretch_root (hcstat_table_t *in, hcstat_table_t *out);
|
||||
|
||||
int mask_ctx_init (mask_ctx_t *mask_ctx, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const folder_config_t *folder_config, const restore_ctx_t *restore_ctx, const hashconfig_t *hashconfig);
|
||||
int mask_ctx_init (mask_ctx_t *mask_ctx, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const folder_config_t *folder_config, const hashconfig_t *hashconfig);
|
||||
void mask_ctx_destroy (mask_ctx_t *mask_ctx);
|
||||
|
||||
int mask_ctx_parse_maskfile (mask_ctx_t *mask_ctx, user_options_t *user_options, const hashconfig_t *hashconfig);
|
||||
|
||||
+10
-1
@@ -123,6 +123,7 @@ typedef enum status_rc
|
||||
|
||||
typedef enum wl_mode
|
||||
{
|
||||
WL_MODE_NONE = 0,
|
||||
WL_MODE_STDIN = 1,
|
||||
WL_MODE_FILE = 2,
|
||||
WL_MODE_MASK = 3
|
||||
@@ -1124,6 +1125,11 @@ typedef struct user_options
|
||||
bool workload_profile_chgd;
|
||||
bool segment_size_chgd;
|
||||
|
||||
char *hc_bin;
|
||||
|
||||
int hc_argc;
|
||||
char **hc_argv;
|
||||
|
||||
} user_options_t;
|
||||
|
||||
typedef struct user_options_extra
|
||||
@@ -1135,7 +1141,10 @@ typedef struct user_options_extra
|
||||
|
||||
u32 wordlist_mode;
|
||||
|
||||
int optind;
|
||||
char *hc_hash; // can be filename or string
|
||||
|
||||
int hc_workc; // can be 0 in bf-mode = default mask
|
||||
char **hc_workv;
|
||||
|
||||
} user_options_extra_t;
|
||||
|
||||
|
||||
@@ -160,11 +160,13 @@ void user_options_init (user_options_t *user_options);
|
||||
|
||||
void user_options_destroy (user_options_t *user_options);
|
||||
|
||||
int user_options_parse (user_options_t *user_options, int argc, char **argv);
|
||||
int user_options_getopt (user_options_t *user_options, int argc, char **argv);
|
||||
|
||||
int user_options_sanity (user_options_t *user_options, restore_ctx_t *restore_ctx, user_options_extra_t *user_options_extra);
|
||||
int user_options_sanity (const user_options_t *user_options);
|
||||
|
||||
int user_options_extra_init (user_options_t *user_options, restore_ctx_t *restore_ctx, user_options_extra_t *user_options_extra);
|
||||
void user_options_preprocess (user_options_t *user_options);
|
||||
|
||||
void user_options_extra_init (const user_options_t *user_options, user_options_extra_t *user_options_extra);
|
||||
|
||||
void user_options_extra_destroy (user_options_extra_t *user_options_extra);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user