commit - 1134ebde7e9791e46cbbb9356aa0abf4617125da
commit + 13bc6832b964af6431e0b8c6c8586405474e3e71
blob - e03be4c0dcc342c5c4bee7432c3f25219682d085
blob + 5c67c9b6991543475718b5f280e03afe3d39a724
--- regress/tog/common.sh
+++ regress/tog/common.sh
. ../cmdline/common.sh
+unset TOG_COLORS
+unset TOG_DIFF_ALGORITHM
unset TOG_VIEW_SPLIT_MODE
unset LC_ALL
+export TERM=vt220
export LC_ALL=C.UTF-8
export COLUMNS=80
export LINES=24
blob - f28f644c2ffd30e11a5646fd5f92ca54144e5829
blob + 3700f7273b4957614715d370d0453f195ef84da0
--- tog/tog.c
+++ tog/tog.c
} tog_io;
static int using_mock_io;
-#define TOG_SCREEN_DUMP "SCREENDUMP"
-#define TOG_SCREEN_DUMP_LEN (sizeof(TOG_SCREEN_DUMP) - 1)
-#define TOG_KEY_SCRDUMP SHRT_MIN
+#define TOG_KEY_SCRDUMP SHRT_MIN
/*
* We implement two types of views: parent views and child views.
/*
* Extract visible substring of line y from the curses screen
- * and strip trailing whitespace. If vline is set and locale is
- * UTF-8, overwrite line[vline] with '|' because the ACS_VLINE
- * character is written out as 'x'. Write the line to file f.
+ * and strip trailing whitespace. If vline is set, overwrite
+ * line[vline] with '|' because the ACS_VLINE character is
+ * written out as 'x'. Write the line to file f.
*/
static const struct got_error *
view_write_line(FILE *f, int y, int vline)
*/
strip_trailing_ws(line, &r);
- if (vline > 0 && got_locale_is_utf8())
+ if (vline > 0)
line[vline] = '|';
w = fprintf(f, "%s\n", line);
view->child->begin_y : view->begin_y;
for (i = 0; i < view->lines; i++) {
- if (hline && got_locale_is_utf8() && i == hline - 1) {
+ if (hline && i == hline - 1) {
int c;
/* ACS_HLINE writes out as 'q', overwrite it */
*ch = KEY_DOWN;
else if (strncasecmp(line, "KEY_UP", 6) == 0)
*ch = KEY_UP;
- else if (strncasecmp(line, TOG_SCREEN_DUMP, TOG_SCREEN_DUMP_LEN) == 0)
+ else if (strncasecmp(line, "SCREENDUMP", 10) == 0)
*ch = TOG_KEY_SCRDUMP;
else
*ch = *line;
goto done;
}
- /* use local TERM so we test in different environments */
if (newterm(NULL, tog_io.cout, tog_io.cin) == NULL)
err = got_error_msg(GOT_ERR_IO,
"newterm: failed to initialise curses");