From 32a1a9f331bce2f713fc5573a1ad75f4714364c1 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 24 Jan 2005 06:44:25 +0000 Subject: [PATCH] * yasm.c (options): Allow -i as a synonym for -I. * yasm-options.c (parse_cmdline): Make unrecognized options warnings instead of errors. These two changes make yasm more closely match the nasm command line. The long-term fix for this will be making a nasm-like frontend. Requested by: Brian Gladman svn path=/trunk/yasm/; revision=1197 --- frontends/yasm/yasm-options.c | 12 +++++++----- frontends/yasm/yasm.c | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/frontends/yasm/yasm-options.c b/frontends/yasm/yasm-options.c index 98b97503..a314bafd 100644 --- a/frontends/yasm/yasm-options.c +++ b/frontends/yasm/yasm-options.c @@ -45,7 +45,7 @@ int parse_cmdline(int argc, char **argv, opt_option *options, size_t nopts, void (*print_error) (const char *fmt, ...)) { - int errors = 0; + int errors = 0, warnings = 0; size_t i; int got_it; @@ -86,8 +86,9 @@ parse_cmdline(int argc, char **argv, opt_option *options, size_t nopts, } } if (!got_it) { - print_error(_("unrecognized option `%s'"), argv[0]); - errors++; + print_error(_("warning: unrecognized option `%s'"), + argv[0]); + warnings++; } } else { /* sopt */ @@ -119,8 +120,9 @@ parse_cmdline(int argc, char **argv, opt_option *options, size_t nopts, } } if (!got_it) { - print_error(_("unrecognized option `%s'"), argv[0]); - errors++; + print_error(_("warning: unrecognized option `%s'"), + argv[0]); + warnings++; } } } else { /* not an option, then it should be a file or something */ diff --git a/frontends/yasm/yasm.c b/frontends/yasm/yasm.c index c98a7fd9..a5129b77 100644 --- a/frontends/yasm/yasm.c +++ b/frontends/yasm/yasm.c @@ -144,6 +144,8 @@ static opt_option options[] = N_("enables/disables warning"), NULL }, { 'e', "preproc-only", 0, preproc_only_handler, 0, N_("preprocess only (writes output to stdout by default)"), NULL }, + { 'i', NULL, 1, opt_preproc_option, 0, + N_("add include path"), N_("path") }, { 'I', NULL, 1, opt_preproc_option, 0, N_("add include path"), N_("path") }, { 'P', NULL, 1, opt_preproc_option, 1, -- 2.40.0