From 45dd6bf764064c3b2a9f087d8206179f514638ac Mon Sep 17 00:00:00 2001 From: Jacob Nevins Date: Thu, 17 Feb 2005 19:00:48 +0000 Subject: Changes/additions to input character set handling: - After discussion with Simon, change the default input charset back to ASCII, rather than trying to work it out from the locale, for the sake of promoting .but file portability. - Add a new command-line option "--input-charset=csname", which overrides the ASCII default for all input files (since there's no other way to use a non-ASCII-compatible input file). - Output a warning if -Cinput-charset:foo is specified that it has no effect. - Update the docs to match all this. Also try to clarify some other things in this area that caught me out. [originally from svn r5332] --- error.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'error.c') diff --git a/error.c b/error.c index 7b9ceaa..0011b18 100644 --- a/error.c +++ b/error.c @@ -37,6 +37,17 @@ static void do_error(int code, va_list ap) { sprintf(error, "unrecognised option `-%.200s'", sp); flags = PREFIX; break; + case err_cmdcharset: + sp = va_arg(ap, char *); + sprintf(error, "character set `%.200s' not recognised", sp); + flags = PREFIX; + break; + case err_futileopt: + sp = va_arg(ap, char *); + sp2 = va_arg(ap, char *); + sprintf(error, "warning: option `-%s' has no effect%s", sp, sp2); + flags = PREFIX; + break; case err_noinput: /* no arguments */ sprintf(error, "no input files"); flags = PREFIX; -- cgit v1.1