commit 9ec76e557390cfa660e88739882f84eee87e073f
parent fc693210d5044b0735bfed92433a7cfb979f5521
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Thu, 23 Dec 2004 19:55:57 +0000
remove command line and rcfile option for --noutf8, as UTF-8 support is
now autodetected, and add #ifdefs around two variables that are unused
when NANO_WIDE isn't defined
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2194 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
4 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -29,11 +29,9 @@ CVS code -
by DLR)
- Change references to "open files" to "open file buffers", for
consistency. (DLR)
- - Add option to disable UTF-8 sequence interpretation:
- -O/--noutf8 on the command line, Meta-O as a toggle, and
- "noutf8" in the rcfile. This is so people using single-byte
- encodings such as KOI8-R can type properly again. (DLR, found
- by Arthur Ivanov)
+ - Add flag to disable UTF-8 sequence interpretation, so that
+ people using single-byte encodings such as KOI8-R can type
+ properly again. (DLR, found by Arthur Ivanov)
- Massively overhaul the input and output routines to support
buffered input and output, the first steps toward
wide/multibyte character input and output, and
diff --git a/src/nano.c b/src/nano.c
@@ -929,9 +929,6 @@ void usage(void)
#ifndef NANO_SMALL
print1opt("-N", "--noconvert", N_("Don't convert files from DOS/Mac format"));
#endif
-#ifdef NANO_WIDE
- print1opt("-O", "--noutf8", N_("Don't convert files from UTF-8 format"));
-#endif
#ifndef DISABLE_JUSTIFY
print1opt(_("-Q [str]"), _("--quotestr=[str]"), N_("Quoting string, default \"> \""));
#endif
@@ -3732,9 +3729,6 @@ int main(int argc, char **argv)
#endif
{"ignorercfiles", 0, 0, 'I'},
#endif
-#ifdef NANO_WIDE
- {"noutf8", 0, 0, 'O'},
-#endif
#ifndef DISABLE_JUSTIFY
{"quotestr", 1, 0, 'Q'},
#endif
@@ -3812,9 +3806,9 @@ int main(int argc, char **argv)
while ((optchr =
#ifdef HAVE_GETOPT_LONG
- getopt_long(argc, argv, "h?ABE:FHINOQ:RST:VY:Zabcdefgijklmo:pr:s:tvwxz", long_options, NULL)
+ getopt_long(argc, argv, "h?ABE:FHINQ:RST:VY:Zabcdefgijklmo:pr:s:tvwxz", long_options, NULL)
#else
- getopt(argc, argv, "h?ABE:FHINOQ:RST:VY:Zabcdefgijklmo:pr:s:tvwxz")
+ getopt(argc, argv, "h?ABE:FHINQ:RST:VY:Zabcdefgijklmo:pr:s:tvwxz")
#endif
) != -1) {
@@ -3858,9 +3852,6 @@ int main(int argc, char **argv)
SET(NO_CONVERT);
break;
#endif
- case 'O':
- SET(NO_UTF8);
- break;
#ifndef DISABLE_JUSTIFY
case 'Q':
quotestr = mallocstrcpy(quotestr, optarg);
diff --git a/src/rcfile.c b/src/rcfile.c
@@ -68,9 +68,6 @@ const static rcoption rcopts[] = {
#endif
{"nofollow", NOFOLLOW_SYMLINKS},
{"nohelp", NO_HELP},
-#ifdef NANO_WIDE
- {"noutf8", NO_UTF8},
-#endif
#ifndef DISABLE_WRAPPING
{"nowrap", NO_WRAP},
#endif
diff --git a/src/winio.c b/src/winio.c
@@ -1739,7 +1739,9 @@ size_t display_string_len(const char *buf, size_t start_col, size_t
int wide_buf_len;
/* How many bytes wide is this character? */
size_t old_col = start_col;
+#ifdef NANO_WIDE
bool bad_char;
+#endif
wide_buf_len = parse_char(buf, &wide_buf, &start_col
#ifdef NANO_WIDE
@@ -1884,7 +1886,9 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool
while (index < alloc_len && buf[start_index] != '\0') {
int wide_buf, wide_buf_len;
+#ifdef NANO_WIDE
bool bad_char;
+#endif
wide_buf_len = parse_char(buf + start_index, &wide_buf, NULL
#ifdef NANO_WIDE