On Tue, Apr 08, 2014 at 02:11:24PM +0200, Roberto E. Vargas Caballero wrote:
> > -#define Rectangle XRectangle
> >
> ...
> > - Rectangle r;
> > + XRectangle r;
>
> You remove the define at all in this point, and if I remember well, this
> define was needed to avoid something. Maybe Christoph can talk a bit
> more about this, because I think he was who write these defines.
There are defines that are used to avoid conflicts with already defined
types. But here I just removed #define and applied it everywhere (one
place) manually.
Also, I have another cleanup patch. It removes special case of ^[,
because it is handled well by "control code" case. I have tested it
using
printf '\e[12l'
and it works.
diff --git a/st.c b/st.c
index a104a50..ef732a5 100644
--- a/st.c
+++ b/st.c
@@ -2315,10 +2315,7 @@ techo(char *buf, int len) {
for(; len > 0; buf++, len--) {
char c = *buf;
- if(c == '\033') { /* escape */
- tputc("^", 1);
- tputc("[", 1);
- } else if(c < '\x20') { /* control code */
+ if(c < '\x20') { /* control code */
if(c != '\n' && c != '\r' && c != '\t') {
c |= '\x40';
tputc("^", 1);