diff options
author | dvshkurko <dvshkurko@yandex-team.ru> | 2022-02-10 16:45:51 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:51 +0300 |
commit | 321ee9bce31ec6e238be26dbcbe539cffa2c3309 (patch) | |
tree | 14407a2757cbf29eb97e266b7f07e851f971000c /contrib/tools/yasm/frontends | |
parent | 2f6ca198245aeffd5e2d82b65927c2465b68b4f5 (diff) | |
download | ydb-321ee9bce31ec6e238be26dbcbe539cffa2c3309.tar.gz |
Restoring authorship annotation for <dvshkurko@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/yasm/frontends')
-rw-r--r-- | contrib/tools/yasm/frontends/yasm/yasm.c | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/contrib/tools/yasm/frontends/yasm/yasm.c b/contrib/tools/yasm/frontends/yasm/yasm.c index 2bd08890df..57911326b0 100644 --- a/contrib/tools/yasm/frontends/yasm/yasm.c +++ b/contrib/tools/yasm/frontends/yasm/yasm.c @@ -50,9 +50,9 @@ /*@null@*/ /*@only@*/ static char *global_prefix = NULL, *global_suffix = NULL; /*@null@*/ /*@only@*/ static char *list_filename = NULL, *map_filename = NULL; /*@null@*/ /*@only@*/ static char *machine_name = NULL; -static char **replace_params; -static int replace_size = 0; -static int replace_capacity = 0; +static char **replace_params; +static int replace_size = 0; +static int replace_capacity = 0; static int special_options = 0; /*@null@*/ /*@dependent@*/ static yasm_arch *cur_arch = NULL; /*@null@*/ /*@dependent@*/ static const yasm_arch_module * @@ -110,7 +110,7 @@ static int opt_preproc_option(char *cmd, /*@null@*/ char *param, int extra); static int opt_ewmsg_handler(char *cmd, /*@null@*/ char *param, int extra); static int opt_makedep_handler(char *cmd, /*@null@*/ char *param, int extra); static int opt_prefix_handler(char *cmd, /*@null@*/ char *param, int extra); -static int opt_replace_handler(char *cmd, /*@null@*/ char *param, int extra); +static int opt_replace_handler(char *cmd, /*@null@*/ char *param, int extra); static int opt_suffix_handler(char *cmd, /*@null@*/ char *param, int extra); #if defined(CMAKE_BUILD) && defined(BUILD_SHARED_LIBS) static int opt_plugin_handler(char *cmd, /*@null@*/ char *param, int extra); @@ -118,7 +118,7 @@ static int opt_plugin_handler(char *cmd, /*@null@*/ char *param, int extra); #if defined(CMAKE_BUILD) && !defined(BUILD_SHARED_LIBS) void yasm_init_plugin(void); -void yasm_plugin_set_replace(const char* replace[], int size); +void yasm_plugin_set_replace(const char* replace[], int size); #endif static /*@only@*/ char *replace_extension(const char *orig, /*@null@*/ @@ -217,8 +217,8 @@ static opt_option options[] = { 'N', "plugin", 1, opt_plugin_handler, 0, N_("load plugin module"), N_("plugin") }, #endif - { 0, "replace", 1, opt_replace_handler, 0, - N_("replace names"), N_("replace") }, + { 0, "replace", 1, opt_replace_handler, 0, + N_("replace names"), N_("replace") }, }; /* version message */ @@ -663,10 +663,10 @@ main(int argc, char *argv[]) return EXIT_FAILURE; } -#if defined(CMAKE_BUILD) && !defined(BUILD_SHARED_LIBS) - yasm_plugin_set_replace(replace_params, replace_size); -#endif - +#if defined(CMAKE_BUILD) && !defined(BUILD_SHARED_LIBS) + yasm_plugin_set_replace(replace_params, replace_size); +#endif + /* If not already specified, default to bin as the object format. */ if (!cur_objfmt_module) { if (!objfmt_keyword) @@ -1199,33 +1199,33 @@ opt_prefix_handler(/*@unused@*/ char *cmd, char *param, /*@unused@*/ int extra) return 0; } -static void -opt_free_replace(void) -{ - yasm_xfree(replace_params); - replace_capacity = 0; - replace_size = 0; -} - -static int -opt_replace_handler(/*@unused@*/ char *cmd, char *param, /*@unused@*/ int extra) -{ - if (replace_capacity == 0) { - atexit(opt_free_replace); - } - if (replace_size == replace_capacity) { - replace_capacity += 10; - replace_params = yasm_xrealloc(replace_params, replace_capacity); - } - - assert(param != NULL); - replace_params[replace_size] = yasm__xstrdup(param); - ++replace_size; - - return 0; -} - +static void +opt_free_replace(void) +{ + yasm_xfree(replace_params); + replace_capacity = 0; + replace_size = 0; +} + static int +opt_replace_handler(/*@unused@*/ char *cmd, char *param, /*@unused@*/ int extra) +{ + if (replace_capacity == 0) { + atexit(opt_free_replace); + } + if (replace_size == replace_capacity) { + replace_capacity += 10; + replace_params = yasm_xrealloc(replace_params, replace_capacity); + } + + assert(param != NULL); + replace_params[replace_size] = yasm__xstrdup(param); + ++replace_size; + + return 0; +} + +static int opt_suffix_handler(/*@unused@*/ char *cmd, char *param, /*@unused@*/ int extra) { if (global_suffix) |