diff options
| author | Jacob Nevins <jacobn@chiark.greenend.org.uk> | 2005-02-17 19:00:48 +0000 |
|---|---|---|
| committer | Jacob Nevins <jacobn@chiark.greenend.org.uk> | 2005-02-17 19:00:48 +0000 |
| commit | 45dd6bf764064c3b2a9f087d8206179f514638ac (patch) | |
| tree | 48031c7b55380daef6591727dbd0843af77ee844 /error.c | |
| parent | 4a48e5878f2ededa8bc33e620e26489bf911c5cb (diff) | |
| download | halibut-45dd6bf764064c3b2a9f087d8206179f514638ac.zip halibut-45dd6bf764064c3b2a9f087d8206179f514638ac.tar.gz halibut-45dd6bf764064c3b2a9f087d8206179f514638ac.tar.bz2 halibut-45dd6bf764064c3b2a9f087d8206179f514638ac.tar.xz | |
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]
Diffstat (limited to 'error.c')
| -rw-r--r-- | error.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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; |