Skip to content

Commit

Permalink
raw instead of termio
Browse files Browse the repository at this point in the history
  • Loading branch information
freakout42 committed Nov 22, 2024
1 parent 630127a commit 009955c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion runform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,5 @@ $(FORMAXE): ../generate/formax.inp
clean:
for D in colquery crypt membed elk regex ../generate; do ( cd $$D; make clean >/dev/null; ); done
rm -f *.o a.out *core.* runform runform0 curkeys curkeys.h test afiedt.buf \
/tmp/odbc.log ads_* $(EXAMPLE) testelk formax.frm company.h out *.exe
/tmp/odbc.log ads_* $(EXAMPLE) testelk formax.frm company.h out *.exe libncursesw6.dll scotty.*
rm -rf bin include lib
9 changes: 5 additions & 4 deletions runform/Makefile.W32
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ clean:
rm -f *.o runform $(OBJB)
for SUB in colquery elk regex; do cd $$SUB; make clean CC=gcc; cd ..; done

# prepare
# wget -O../../curses//ncurses-win32.zip https://invisible-island.net/datafiles/release/mingw32.zip
# unzip ../../curses/ncurses-win32.zip
# cp bin/libncursesw6.dll .
libncursesw6.dll:
unzip ../bin/ncurses-win32.zip
cp bin/libncursesw6.dll .

# wget -O../bin/ncurses-win32.zip https://invisible-island.net/datafiles/release/mingw32.zip
# compile with msys + mingw32
7 changes: 6 additions & 1 deletion runform/screen.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/* curses screen handling interface */
#include <cstdarg>
#include <unistd.h>
#ifndef USETERMIO
#ifndef WIN32
#define WIN32
#endif
#endif
#ifndef WIN32
#include <termios.h>
#include <term.h>
Expand Down Expand Up @@ -95,7 +100,7 @@ if (colcode == -1) {

int Screen::setattributs(int attrib) {
nocurses(attrib);
#ifndef WIN32
#ifdef USETERMIO
if (attrib & A_REVERSE) {
if (enter_reverse_mode == NULL) /* terminal has no reverse mode */
attrib |= A_STANDOUT; /* use standout instead */
Expand Down

0 comments on commit 009955c

Please sign in to comment.