diff --git a/src/conio/Common.gmake b/src/conio/Common.gmake index f8a00ca29ed8434eec527a5276350f4e2ea6442c..49827d0a7a75c28f97da34eaeb144a942aaff464 100644 --- a/src/conio/Common.gmake +++ b/src/conio/Common.gmake @@ -3,4 +3,7 @@ ifndef NO_X ifeq ($(os),linux) CIOLIB-MT_LIBS += $(UL_PRE)dl$(UL_SUF) endif + ifeq ($(os),sunos) + CIOLIB-MT_LIBS += $(UL_PRE)dl$(UL_SUF) + endif endif diff --git a/src/conio/ansi_cio.c b/src/conio/ansi_cio.c index 126c613271065fdebbdbaa626d8219d94979585b..f3a5dd7afd5b3e64e6cc8b72b00b81ffb0d2865f 100644 --- a/src/conio/ansi_cio.c +++ b/src/conio/ansi_cio.c @@ -732,7 +732,12 @@ int ansi_initciolib(long inmode) if (isatty(STDIN_FILENO)) { tcgetattr(STDIN_FILENO,&tio_default); tio_raw = tio_default; - cfmakeraw(&tio_raw); + /* cfmakeraw(&tio_raw); */ + tio_raw.c_iflag &= ~(IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); + tio_raw.c_oflag &= ~OPOST; + tio_raw.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + tio_raw.c_cflag &= ~(CSIZE|PARENB); + tio_raw.c_cflag |= CS8; tcsetattr(STDIN_FILENO,TCSANOW,&tio_raw); setvbuf(stdout, NULL, _IONBF, 0); atexit(ansi_fixterm); diff --git a/src/conio/console.c b/src/conio/console.c index 4e0ae134f48fac420da20ef15de7b756da635990..99e53f6e7233ecea9519a188e3abc118c7425f05 100644 --- a/src/conio/console.c +++ b/src/conio/console.c @@ -523,14 +523,17 @@ get_lines() if (lines == NULL) { lines = (TextLine *)malloc(sizeof(TextLine) * (CONSOLE_MAX_ROWS+1)); - if (lines == NULL) - err(1, "Could not allocate data structure for text lines\n"); - + if (lines == NULL) { + fprintf(stderr, "Could not allocate data structure for text lines\n"); + exit(1); + } for (i = 0; i < (CONSOLE_MAX_ROWS+1); ++i) { lines[i].max_length = DpyCols; lines[i].data = (WORD *)malloc(CONSOLE_MAX_COLS * sizeof(WORD)); - if (lines[i].data == NULL) - err(1, "Could not allocate data structure for text lines\n"); + if (lines[i].data == NULL) { + fprintf(stderr, "Could not allocate data structure for text lines\n"); + exit(1); + } lines[i].changed = 1; } } @@ -1082,8 +1085,10 @@ resize_window() XSizeHints *sh; sh = x11.XAllocSizeHints(); - if (sh == NULL) - err(1, "Could not get XSizeHints structure"); + if (sh == NULL) { + fprintf(stderr, "Could not get XSizeHints structure"); + exit(1); + } sh->base_width = FW * DpyCols + 4; sh->base_height = FH * (DpyRows+1) + 4;