Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* metamail - fix?
@ 1997-05-09 16:54 Geling, Gary
  0 siblings, 0 replies; only message in thread
From: Geling, Gary @ 1997-05-09 16:54 UTC (permalink / raw)


Greetings,

   Regarding metamail 2.7-7 on AXP, RH4.1

   The current include files for RH4.1 do not handle 'old' stuff
very well.  metamail used the old termio structure and included termio.h.
This file quickly redirected this to termios.h and sys/ioctl.h probably
breaking the FAQ port error of confusing termio with termios.  The only
way to get termio actually defined was to define, before any system includes,
the variable _LOOSE_KERNEL_NAMES.  But this resulted in a NON-working 
metamail, (hung on multipart messages, trying to reset the terminal state).

   Easiest solution: convert all references to termio and TC---A- to
termios and TC---S- respectively.  Seems to work like a charm.

Included is the diff -u file.

TTFN
   Gary

-- 
--------------------------
Gary W. Geling
Pulsed-Doppler Radar Group (PDR)
Aerospace Radar and Navigation (ARN)
Defence Research Establishment Ottawa (DREO)
WWW: http://www.dreo.dnd.ca
e-mail: Gary.Geling@dreo.dnd.ca
613-998-2063 FAX 613-990-8906

--- metamail.c.orig	Fri May  9 12:27:14 1997
+++ metamail.c	Fri May  9 12:28:45 1997
@@ -48,7 +48,7 @@
 
 #ifndef AMIGA
 #ifdef SYSV
-#include <termio.h>
+#include <termios.h>
 #include <sys/ioctl.h>
 #include <unistd.h>
 #else /* SYSV */
@@ -2378,7 +2378,7 @@
 int HasSavedTtyState=0;
 #if !defined(AMIGA) && !defined(MSDOS)
 #ifdef SYSV
-static struct termio MyTtyStateIn, MyTtyStateOut;
+static struct termios MyTtyStateIn, MyTtyStateOut;
 #else
 static struct sgttyb MyTtyStateIn, MyTtyStateOut;
 #endif
@@ -2388,8 +2388,8 @@
     /* Bogus -- would like a good portable way to reset the terminal state here */
 #if !defined(AMIGA) && !defined(MSDOS)
 #ifdef SYSV
-    ioctl(fileno(stdin), TCGETA, &MyTtyStateIn);
-    ioctl(fileno(stdout), TCGETA, &MyTtyStateOut);
+    ioctl(fileno(stdin), TCGETS, &MyTtyStateIn);
+    ioctl(fileno(stdout), TCGETS, &MyTtyStateOut);
 #else
     gtty(fileno(stdin), &MyTtyStateIn);
     gtty(fileno(stdout), &MyTtyStateOut);
@@ -2402,8 +2402,8 @@
 #if !defined(AMIGA) && !defined(MSDOS)
 #ifdef SYSV
     if (HasSavedTtyState) {
-        ioctl(fileno(stdout), TCSETA, &MyTtyStateOut);
-        ioctl(fileno(stdin), TCSETA, &MyTtyStateIn);
+        ioctl(fileno(stdout), TCSETS, &MyTtyStateOut);
+        ioctl(fileno(stdin), TCSETS, &MyTtyStateIn);
     }
 #else
     if (HasSavedTtyState) {
@@ -2684,14 +2684,14 @@
 StartRawStdin() {
 #if !defined(AMIGA) && !defined(MSDOS)
 #ifdef SYSV
-    struct termio   orterm, fterm;
-    ioctl(0, TCGETA, &orterm);	/* get current (i.e. cooked) termio */
-    fterm = orterm;		/* get termio to modify */
+    struct termios   orterm, fterm;
+    ioctl(0, TCGETS, &orterm);	/* get current (i.e. cooked) termios */
+    fterm = orterm;		/* get termios to modify */
 
     fterm.c_lflag &= ~ICANON;	/* clear ICANON giving raw mode */
     fterm.c_cc[VMIN] = 1;	/* set MIN char count to 1 */
     fterm.c_cc[VTIME] = 0;	/* set NO time limit */
-    return ioctl(0, TCSETAW, &fterm);	/* modify termio for raw mode */
+    return ioctl(0, TCSETSW, &fterm);	/* modify termios for raw mode */
 #else
     struct sgttyb ts;
     gtty(fileno(stdin), &ts);

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-05-09 16:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-05-09 16:54 metamail - fix? Geling, Gary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox