--- rxvt-unicode/src/init.C 2010/04/01 00:12:33 1.263 +++ rxvt-unicode/src/init.C 2010/06/15 10:33:47 1.269 @@ -176,7 +176,7 @@ "rgb:00/ff/ff", // 6/14: bright cyan (Cyan) "rgb:ff/ff/ff", // 7/15: bright white (White) -#ifndef USE_256_COLORS +#if !USE_256_COLORS // 88 xterm colours "rgb:00/00/00", "rgb:00/00/8b", @@ -512,6 +512,7 @@ #endif #ifdef OPTION_HC NULL, + NULL, #endif COLOR_SCROLLBAR, #ifdef RXVT_SCROLLBAR @@ -1534,11 +1535,16 @@ /* * standard System V termios interface */ - if (tcgetattr (STDIN_FILENO, tio) < 0) + // does not work as stdin is not a tty + // if (tcgetattr (STDIN_FILENO, tio) < 0) + if (1) { // return error - use system defaults, // where possible, and zero elsewhere memset (tio, 0, sizeof (struct termios)); + if (VDISABLE) + for (int i = 0; i < NCCS; i++) + tio->c_cc[i] = VDISABLE; tio->c_cc[VINTR] = CINTR; tio->c_cc[VQUIT] = CQUIT; @@ -1568,16 +1574,6 @@ } tio->c_cc[VEOF] = CEOF; - tio->c_cc[VEOL] = VDISABLE; -# ifdef VEOL2 - tio->c_cc[VEOL2] = VDISABLE; -# endif -# ifdef VSWTC - tio->c_cc[VSWTC] = VDISABLE; -# endif -# ifdef VSWTCH - tio->c_cc[VSWTCH] = VDISABLE; -# endif # if VMIN != VEOF tio->c_cc[VMIN] = 1; # endif @@ -1586,7 +1582,7 @@ # endif if (erase != -1) - tio->c_cc[VERASE] = (char)erase; + tio->c_cc[VERASE] = erase; /* input modes */ tio->c_iflag = (BRKINT | IGNPAR | ICRNL @@ -1618,7 +1614,7 @@ /* cpp token stringize doesn't work on all machines */ # define FOO(flag,name) \ if ((tio->c_iflag) & flag) \ - fprintf (stderr, "%s ", name) + fprintf (stderr, "%s ", name) /* c_iflag bits */ FOO (IGNBRK, "IGNBRK");