Date: Sun, 21 Jul 1996 19:35:02 +0200 (IST) From: Eli Zaretskii To: djgpp-workers AT delorie DOT com Subject: Info 3.7 Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII The original port didn't switch stdin to BINARY mode, which causes SIGINT if you press Ctrl-C (e.g. C-x C-c should quit Info, not abort it). These patches take care of that problem: *** info/pc_term.c~0 Fri Jul 19 14:49:06 1996 --- info/pc_term.c Sun Jul 21 18:26:56 1996 *************** *** 24,29 **** --- 24,32 ---- #include #include #include + #include + #include + #include #include "pc_term.h" #include "terminal.h" #include "termdep.h" *************** static unsigned char norm_attr, inv_a *** 41,46 **** --- 44,54 ---- /* Put the screen in the video mode and colors which Info will use. */ void pc_prep_terminal () { + /* Switch stdin to BINARY mode. This enables us to get + all the keystrokes, including Ctrl-C. */ + if (isatty (fileno (stdin))) + setmode (fileno (stdin), O_BINARY); + textattr (norm_attr); /* Do not set screen height if we already have it, because *************** void pc_unprep_terminal () *** 60,65 **** --- 68,77 ---- } textattr (norm_info.normattr); ScreenClear (); /* to leave behind a clean screen */ + + /* Switch stdin back to TEXT mode. */ + if (isatty (fileno (stdin))) + setmode (fileno (stdin), O_TEXT); } void pc_begin_inverse ()