port over DB's overhaul of safe_tempnam() and his changes to
check_operating_dir() to make it use boolean values (plus a few more
boolean-related tweaks of mine); also stop wrapping the bad_chr
parameter of parse_mbchar() in #ifdefs for cleanliness, as the
allow_tabcomp parameter of check_operating_dir() isn't wrapped in
#ifdefs, and don't set bad_chr to TRUE when we get a null byte in a
multibyte string, as it's not an invalid multibyte character


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2316 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
diff --git a/src/winio.c b/src/winio.c
index 8553d66..08df4f2 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -1858,11 +1858,8 @@
 void do_statusbar_delete(void)
 {
     if (statusbar_x < statusbar_xend) {
-	int char_buf_len = parse_mbchar(answer + statusbar_x, NULL
-#ifdef NANO_WIDE
-		, NULL
-#endif
-		, NULL);
+	int char_buf_len = parse_mbchar(answer + statusbar_x, NULL,
+		NULL, NULL);
 
 	charmove(answer + statusbar_x, answer + statusbar_x +
 		char_buf_len, statusbar_xend - statusbar_x -
@@ -1896,11 +1893,8 @@
     /* Move forward until we find the character after the last letter of
      * the current word. */
     while (statusbar_x < statusbar_xend) {
-	char_mb_len = parse_mbchar(answer + statusbar_x, char_mb
-#ifdef NANO_WIDE
-		, NULL
-#endif
-		, NULL);
+	char_mb_len = parse_mbchar(answer + statusbar_x, char_mb, NULL,
+		NULL);
 
 	/* If we've found it, stop moving forward through the current
 	 * line. */
@@ -1915,11 +1909,8 @@
 	current_x += char_mb_len;
 
     while (statusbar_x < statusbar_xend) {
-	char_mb_len = parse_mbchar(answer + statusbar_x, char_mb
-#ifdef NANO_WIDE
-		, NULL
-#endif
-		, NULL);
+	char_mb_len = parse_mbchar(answer + statusbar_x, char_mb, NULL,
+		NULL);
 
 	/* If we've found it, stop moving forward through the current
 	 * line. */
@@ -1945,11 +1936,8 @@
     /* Move backward until we find the character before the first letter
      * of the current word. */
     while (!begin_line) {
-	char_mb_len = parse_mbchar(answer + statusbar_x, char_mb
-#ifdef NANO_WIDE
-		, NULL
-#endif
-		, NULL);
+	char_mb_len = parse_mbchar(answer + statusbar_x, char_mb, NULL,
+		NULL);
 
 	/* If we've found it, stop moving backward through the current
 	 * line. */
@@ -1970,11 +1958,8 @@
 	statusbar_x = move_mbleft(answer, statusbar_x);
 
     while (!begin_line) {
-	char_mb_len = parse_mbchar(answer + statusbar_x, char_mb
-#ifdef NANO_WIDE
-		, NULL
-#endif
-		, NULL);
+	char_mb_len = parse_mbchar(answer + statusbar_x, char_mb, NULL,
+		NULL);
 
 	/* If we've found it, stop moving backward through the current
 	 * line. */
@@ -1996,11 +1981,8 @@
 	    statusbar_x = move_mbleft(answer, statusbar_x);
 
 	while (!begin_line) {
-	    char_mb_len = parse_mbchar(answer + statusbar_x, char_mb
-#ifdef NANO_WIDE
-		, NULL
-#endif
-		, NULL);
+	    char_mb_len = parse_mbchar(answer + statusbar_x, char_mb,
+		NULL, NULL);
 
 	    /* If we've found it, stop moving backward through the
 	     * current line. */
@@ -2075,11 +2057,7 @@
 	/* Interpret the next multibyte character.  If it's an invalid
 	 * multibyte character, interpret it as though it's a byte
 	 * character. */
-	char_buf_len = parse_mbchar(output + i, char_buf
-#ifdef NANO_WIDE
-		, NULL
-#endif
-		, NULL);
+	char_buf_len = parse_mbchar(output + i, char_buf, NULL, NULL);
 
 	i += char_buf_len;
 
@@ -2122,11 +2100,7 @@
     assert(str != NULL);
 
     while (*str != '\0') {
-	int str_len = parse_mbchar(str, NULL
-#ifdef NANO_WIDE
-		, NULL
-#endif
-		, &length);
+	int str_len = parse_mbchar(str, NULL, NULL, &length);
 
 	if (length > xplus)
 	    break;
@@ -2151,11 +2125,7 @@
     assert(str != NULL);
 
     while (*str != '\0') {
-	int str_len = parse_mbchar(str, NULL
-#ifdef NANO_WIDE
-		, NULL
-#endif
-		, &length);
+	int str_len = parse_mbchar(str, NULL, NULL, &length);
 
 	str += str_len;
 
@@ -2269,11 +2239,8 @@
 	buf[start_index] != '\t')) {
 	/* We don't display all of buf[start_index] since it starts to
 	 * the left of the screen. */
-	buf_mb_len = parse_mbchar(buf + start_index, buf_mb
-#ifdef NANO_WIDE
-		, NULL
-#endif
-		, NULL);
+	buf_mb_len = parse_mbchar(buf + start_index, buf_mb, NULL,
+		NULL);
 
 	if (is_cntrl_mbchar(buf_mb)) {
 	    if (column < start_col) {
@@ -2307,6 +2274,8 @@
 	buf_mb_len = parse_mbchar(buf + start_index, buf_mb
 #ifdef NANO_WIDE
 		, &bad_char
+#else
+		, NULL
 #endif
 		, NULL);