- Reduce bold level a bit
authorMatthew Mondor <mmondor@pulsar-zone.net>
Sat, 16 Apr 2022 20:55:54 +0000 (20:55 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Sat, 16 Apr 2022 20:55:54 +0000 (20:55 +0000)
- Experiment with gradual additive cursor vs XOR.  This allows
  to more easily distinguish its position when selecting
  inverse/colored text in tmux or editors.

MATT/TODO.txt
configure
hacks/analogterm.c
hacks/analogterm.h
utils/textclient.c

index 119e673..001e827 100644 (file)
@@ -9,9 +9,6 @@ BUILD
 TODO
 ====
 
-- Alternative keyboard layouts don't work well.
-  By sending encoded UTF-8 sequences accents work.
-  Dead keys appear to need special handling.  Keysyms include them.
 - Now that upwards smooth scrolling has been implemented:
   - May be possible to do the same for downwards
   - May need to support sending XOFF/XON to control speed, if too fast it
@@ -70,6 +67,8 @@ TODO
   despite that, so there must be something different going on with analogterm.
   I should also check if xterm on Ubuntu uses the same stty settings like for
   ERASE.  No such problem with RPI2 and ArchLinux.
+  Update: Ubuntu x86-64 confirmed to use ^?/Delete by default in xterm, with
+  "tput kbs | xxd" showing it.
 - Apparently eol2 can be used for Flush and Linux would not support it.  On
   NetBSD I see it applied by xterm, so have included in tcsetattr(3).  This
   may be wrong on Linux.  Moreover, running xterm remotely from an Ubuntu
index 0e95401..24f29c2 100755 (executable)
--- a/configure
+++ b/configure
@@ -4368,7 +4368,7 @@ fi
   if test -n "$GCC"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on gcc compiler warnings." >&5
 $as_echo "Turning on gcc compiler warnings." >&6; }
-    CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
+    CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes -Wno-variadic-macros -Wno-overflow"
     OBJCC="$OBJCC -Wall"
     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
     # and so perhaps now we can do without -pedantic?
index 9a03e39..11c4af6 100644 (file)
@@ -127,7 +127,7 @@ void
 at_drawcursor(analogterm_sim_t *sim)
 {
        analogterm_state_t *st = sim->st;
-       int x, y;
+       int x, y, y2;
        signed char *pp;
 
        if (st->blink && cursor_waitnext == 0)
@@ -138,13 +138,14 @@ at_drawcursor(analogterm_sim_t *sim)
        }
        cursor_laststate = st->blink;
 
-       for (y = 0; y < 8; y++) {
+       for (y = y2 = 0; y < 8; y++, y2 += 7) {
                pp = &sim->inp->signal
                    [(ANALOGTV_TOP + smooth_scroll_offset + 3) +
                    (8 * st->cursy) + y]
                    [(ANALOGTV_PIC_START + 100) + (7 * st->cursx)];
                for (x = 0; x < 7; x++)
-                       *pp++ ^= 64/*TMODE_NORMAL_LEVEL*/;
+                       /* *pp++ ^= (48 + y2); */
+                       *pp++ += (10 + y2);
        }
 }
 
index 2644c0d..97c342b 100644 (file)
@@ -38,7 +38,7 @@
 #define TMODE_BGCOLOR          (1L << 11)
 
 #define TMODE_NORMAL_LEVEL     (ANALOGTV_WHITE_LEVEL - 35)
-#define TMODE_BOLD_LEVEL       (ANALOGTV_WHITE_LEVEL + 25)
+#define TMODE_BOLD_LEVEL       (ANALOGTV_WHITE_LEVEL + 20)
 #define TMODE_DIM_LEVEL                (ANALOGTV_WHITE_LEVEL - 60)
 
 #define CHARSETS               2
index 4a3d081..ded2d0b 100644 (file)
@@ -748,8 +748,7 @@ textclient_putc (text_data *d, XKeyEvent *k)
                if (keysym == XK_Delete) {
                        keysym = XK_BackSpace;
                        swapped = true;
-               }
-               else if (keysym == XK_BackSpace) {
+               } else if (keysym == XK_BackSpace) {
                        keysym = XK_Delete;
                        swapped = true;
                }