Browse Source

Use bfg_waddstr even with Unicode disabled, since it's needed for red highlight

Luke Dashjr 12 years ago
parent
commit
d1900af425
1 changed files with 3 additions and 11 deletions
  1. 3 11
      miner.c

+ 3 - 11
miner.c

@@ -2805,7 +2805,6 @@ static void text_print_status(int thr_id)
 #ifdef HAVE_CURSES
 #ifdef HAVE_CURSES
 static int attr_bad = A_BOLD;
 static int attr_bad = A_BOLD;
 
 
-#ifdef USE_UNICODE
 static
 static
 void bfg_waddstr(WINDOW *win, const char *s)
 void bfg_waddstr(WINDOW *win, const char *s)
 {
 {
@@ -2825,6 +2824,7 @@ next:
 			case '\0':
 			case '\0':
 				goto done;
 				goto done;
 			default:
 			default:
+def:
 				++p;
 				++p;
 				goto next;
 				goto next;
 			case '\1':
 			case '\1':
@@ -2836,6 +2836,8 @@ next:
 				wattron(win, attr_bad);
 				wattron(win, attr_bad);
 				goto next;
 				goto next;
 			case '|':
 			case '|':
+				if (!use_unicode)
+					goto def;
 				PREP_ADDCH;
 				PREP_ADDCH;
 				wadd_wch(win, WACS_VLINE);
 				wadd_wch(win, WACS_VLINE);
 				goto next;
 				goto next;
@@ -2850,16 +2852,6 @@ done:
 	return;
 	return;
 #undef PREP_ADDCH
 #undef PREP_ADDCH
 }
 }
-#define bfg_waddstr(win, s)  do {  \
-	if (use_unicode)  \
-		bfg_waddstr(win, s);  \
-	else  \
-		waddstr(win, s);  \
-}while(0)
-
-#else
-#define bfg_waddstr(win, s)  waddstr(win, s)
-#endif
 
 
 static inline
 static inline
 void bfg_hline(WINDOW *win, int y)
 void bfg_hline(WINDOW *win, int y)