/*
+ * When this is enabled, input, video memory, copy and pasting are not
+ * affected, but the video display forces lowercase characters to uppercase.
+ */
+#define UPPERCASE_VIEW false
+
+extern bool cfg_uppercaseview;
+
+
+/*
* The XShm extention allows to accelerate graphics when the client is running
* on the same system as the X11 server.
*/
* sequence, prefill a line array with mode/glyph.
*/
for (col = 0; col < cfg_text_width; col++) {
- uint32_t m = st->text_mode[row][col];
+ uint32_t m = st->text_mode[row][col],
+ c = st->text_char[row][col];
+ if (cfg_uppercaseview && c > 96 && c < 123)
+ c -= 32;
row_modes[col] = m;
- row_glyphs[col] = font_glyph(st,
- st->text_char[row][col], (m & TMODE_GFX) != 0);
+ row_glyphs[col] = font_glyph(st, c,
+ (m & TMODE_GFX) != 0);
/* XOR text cursor handling */
if (!st->cursor_disabled && st->cursor_y == row &&
"\nUsage: %s [-8|-u] [-w <cols>] [-h <rows>] [-E <n>] [-s]\n"
" [-C <color>] [-c] [-W] [-b] [-r <ms>] [-B <ticks>] [-j <n>]\n"
" [-P] [-m <mode>] [-M] [-d] [-D] [-S] [-p <parameters>]\n"
- " [-l <pixels>] [-f <delay>] [-z <ms>] [-Z <skip>] \n"
+ " [-l <pixels>] [-f <delay>] [-U] [-z <ms>] [-Z <skip>]\n"
" [-e <command> [<arguments>]]\n\n"
"Where:\n"
" -8 / -u - 8-bit mode (Latin-1), unicode+UTF-8. 8-bit mode is\n"
" -f - Number of frames to keep reverse video on for the flash\n"
" of the visual bell. May not be visible with very low\n"
" values. Also depends on -r.\n"
+ " -U - Does not affect input/output, copy-paste or video memory\n"
+ " but forces the display to uppercase viewed characters.\n"
+ " While this function could eventually be more complete,\n"
+ " it only currently works with ASCII characters.\n"
+ " May be problematic with case-sensitive data like files.\n"
" -z - Slow bandwidth/bps simulation. Sleep the specified\n"
" number of milliseconds before reading each byte from the\n"
" application tty(4). Will also affect the rate of input\n"
progname = strdup(argv[0]);
while ((ch = getopt(argc, argv,
- "?8uw:h:E:scC:Wr:bB:j:Pm:MdDSp:l:f:z:Z:e:")) != -1) {
+ "?8uw:h:E:scC:Wr:bB:j:Pm:MdDSp:l:f:Uz:Z:e:")) != -1) {
switch (ch) {
case '8':
cfg_unicode = false;
if ((i = atoi(optarg)) >= 0 && i <= 100)
cfg_flashtime = i;
break;
+ case 'U':
+ cfg_uppercaseview = true;
+ break;
case 'z':
if ((i = atoi(optarg)) > -1 && i <= 100000)
cfg_inputsleep = i;