[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nmh-commits] [SCM] The nmh Mail Handling System branch, posix, updated.
From: |
Lyndon Nerenberg |
Subject: |
[Nmh-commits] [SCM] The nmh Mail Handling System branch, posix, updated. 335e8e2f9351507ec5a7f4dcd123cfa0f72dc54c |
Date: |
Sun, 25 Dec 2011 00:16:21 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The nmh Mail Handling System".
The branch, posix has been updated
via 335e8e2f9351507ec5a7f4dcd123cfa0f72dc54c (commit)
via d9b5bc58cf9b27fa5f09ae075e8efde5f6df0cc9 (commit)
from 15fb51211311e200cfe87497eb9e2407c56462ab (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=335e8e2f9351507ec5a7f4dcd123cfa0f72dc54c
commit 335e8e2f9351507ec5a7f4dcd123cfa0f72dc54c
Author: Lyndon Nerenberg <address@hidden>
Date: Sat Dec 24 16:15:22 2011 -0800
Collapse termio/termios/sgtty terminal interface code down to
the Posix termios interface.
diff --git a/sbr/discard.c b/sbr/discard.c
index dbc865c..dbe309d 100644
--- a/sbr/discard.c
+++ b/sbr/discard.c
@@ -9,15 +9,7 @@
#include <h/mh.h>
-#ifdef HAVE_TERMIOS_H
-# include <termios.h>
-#else
-# ifdef HAVE_TERMIO_H
-# include <termio.h>
-# else
-# include <sgtty.h>
-# endif
-#endif
+#include <termios.h>
#ifdef SCO_5_STDIO
# define _ptr __ptr
@@ -30,28 +22,10 @@
void
discard (FILE *io)
{
-#ifndef HAVE_TERMIOS_H
-# ifdef HAVE_TERMIO_H
- struct termio tio;
-# else
- struct sgttyb tio;
-# endif
-#endif
-
if (io == NULL)
return;
-#ifdef HAVE_TERMIOS_H
tcflush (fileno(io), TCOFLUSH);
-#else
-# ifdef HAVE_TERMIO_H
- if (ioctl (fileno(io), TCGETA, &tio) != -1)
- ioctl (fileno(io), TCSETA, &tio);
-# else
- if (ioctl (fileno(io), TIOCGETP, (char *) &tio) != -1)
- ioctl (fileno(io), TIOCSETP, (char *) &tio);
-# endif
-#endif
#if defined(_FSTDIO) || defined(__DragonFly__)
fpurge (io);
diff --git a/uip/msh.c b/uip/msh.c
index c2d4e1a..9e56ddd 100644
--- a/uip/msh.c
+++ b/uip/msh.c
@@ -22,15 +22,7 @@
#include <h/mts.h>
#include <h/utils.h>
-#ifdef HAVE_TERMIOS_H
-# include <termios.h>
-#else
-# ifdef HAVE_TERMIO_H
-# include <termio.h>
-# else
-# include <sgtty.h>
-# endif
-#endif
+#include <termios.h>
#include <pwd.h>
#include <setjmp.h>
diff --git a/uip/prompter.c b/uip/prompter.c
index 7c28aec..459fa97 100644
--- a/uip/prompter.c
+++ b/uip/prompter.c
@@ -14,15 +14,7 @@
#include <signal.h>
#include <setjmp.h>
-#ifdef HAVE_TERMIOS_H
-# include <termios.h>
-#else
-# ifdef HAVE_TERMIO_H
-# include <termio.h>
-# else
-# include <sgtty.h>
-# endif
-#endif
+#include <termios.h>
#define QUOTE '\\'
@@ -63,25 +55,10 @@ static struct swit switches[] = {
};
-#ifdef HAVE_TERMIOS_H
static struct termios tio;
-# define ERASE tio.c_cc[VERASE]
-# define KILL tio.c_cc[VKILL]
-# define INTR tio.c_cc[VINTR]
-#else
-# ifdef HAVE_TERMIO_H
-static struct termio tio;
-# define ERASE tio.c_cc[VERASE]
-# define KILL tio.c_cc[VKILL]
-# define INTR tio.c_cc[VINTR]
-# else
-static struct sgttyb tio;
-static struct tchars tc;
-# define ERASE tio.sg_erase
-# define KILL tio.sg_kill
-# define INTR tc.t_intrc
-# endif
-#endif
+#define ERASE tio.c_cc[VERASE]
+#define KILL tio.c_cc[VKILL]
+#define INTR tio.c_cc[VINTR]
static int wtuser = 0;
static int sigint = 0;
@@ -193,23 +170,10 @@ main (int argc, char **argv)
* Are we changing the kill or erase character?
*/
if (killp || erasep) {
-#ifdef HAVE_TERMIOS_H
cc_t save_erase, save_kill;
-#else
- int save_erase, save_kill;
-#endif
/* get the current terminal attributes */
-#ifdef HAVE_TERMIOS_H
tcgetattr(0, &tio);
-#else
-# ifdef HAVE_TERMIO_H
- ioctl(0, TCGETA, &tio);
-# else
- ioctl (0, TIOCGETP, (char *) &tio);
- ioctl (0, TIOCGETC, (char *) &tc);
-# endif
-#endif
/* save original kill, erase character for later */
save_kill = KILL;
@@ -220,15 +184,7 @@ main (int argc, char **argv)
ERASE = erasep ? chrcnv (erasep) : save_erase;
/* set the new terminal attributes */
-#ifdef HAVE_TERMIOS_H
tcsetattr(0, TCSADRAIN, &tio);
-#else
-# ifdef HAVE_TERMIO_H
- ioctl(0, TCSETAW, &tio);
-# else
- ioctl (0, TIOCSETN, (char *) &tio);
-# endif
-#endif
/* print out new kill erase characters */
chrdsp ("erase", ERASE);
@@ -283,15 +239,7 @@ main (int argc, char **argv)
if (i == -1) {
abort:
if (killp || erasep) {
-#ifdef HAVE_TERMIOS_H
tcsetattr(0, TCSADRAIN, &tio);
-#else
-# ifdef HAVE_TERMIO
- ioctl (0, TCSETA, &tio);
-# else
- ioctl (0, TIOCSETN, (char *) &tio);
-# endif
-#endif
}
unlink (tmpfil);
done (1);
@@ -378,15 +326,7 @@ no_body:
SIGNAL (SIGINT, SIG_IGN);
if (killp || erasep) {
-#ifdef HAVE_TERMIOS_H
tcsetattr(0, TCSADRAIN, &tio);
-#else
-# ifdef HAVE_TERMIO_H
- ioctl (0, TCSETAW, &tio);
-# else
- ioctl (0, TIOCSETN, (char *) &tio);
-# endif
-#endif
}
if ((fdi = open (tmpfil, O_RDONLY)) == NOTOK)
diff --git a/uip/termsbr.c b/uip/termsbr.c
index 740d021..92f7a0e 100644
--- a/uip/termsbr.c
+++ b/uip/termsbr.c
@@ -9,15 +9,7 @@
#include <h/mh.h>
-#ifdef HAVE_TERMIOS_H
-# include <termios.h>
-#else
-# ifdef HAVE_TERMIO_H
-# include <termio.h>
-# else
-# include <sgtty.h>
-# endif
-#endif
+#include <termios.h>
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
@@ -81,16 +73,7 @@ read_termcap(void)
char termbuf[TXTSIZ];
#endif
-#ifdef HAVE_TERMIOS_H
struct termios tio;
-#else
-# ifdef HAVE_TERMIO_H
- struct termio tio;
-# else
- struct sgttyb tio;
-# endif
-#endif
-
static int inited = 0;
if (inited++)
@@ -110,15 +93,7 @@ read_termcap(void)
return;
#endif
-#ifdef HAVE_TERMIOS_H
speedcode = cfgetospeed(&tio);
-#else
-# ifdef HAVE_TERMIO_H
- speedcode = ioctl(fileno(stdout), TCGETA, &tio) != NOTOK ? tio.c_cflag &
CBAUD : 0;
-# else
- speedcode = ioctl(fileno(stdout), TIOCGETP, (char *) &tio) != NOTOK ?
tio.sg_ospeed : 0;
-# endif
-#endif
HC = tgetflag ("hc");
diff --git a/uip/wmh.c b/uip/wmh.c
index e5ff490..c73bc09 100644
--- a/uip/wmh.c
+++ b/uip/wmh.c
@@ -102,26 +102,10 @@ WINDOW *windows[NWIN + 1];
WINDOW *WINnew ();
-#ifdef HAVE_TERMIOS_H
static struct termios tio;
-# define ERASE tio.c_cc[VERASE]
-# define KILL tio.c_cc[VKILL]
-# define INTR tio.c_cc[VINTR]
-#else
-# ifdef HAVE_TERMIO_H
-static struct termio tio;
-# define ERASE tio.c_cc[VERASE]
-# define KILL tio.c_cc[VKILL]
-# define INTR tio.c_cc[VINTR]
-# else
-static struct sgttyb tio;
-static struct tchars tc;
-# define ERASE tio.sg_erase
-# define KILL tio.sg_kill
-# define INTR tc.t_intrc
-# define EOFC tc.t_eofc
-# endif
-#endif
+#define ERASE tio.c_cc[VERASE]
+#define KILL tio.c_cc[VKILL]
+#define INTR tio.c_cc[VINTR]
#define WERASC ltc.t_werasc
static struct ltchars ltc;
http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=d9b5bc58cf9b27fa5f09ae075e8efde5f6df0cc9
commit d9b5bc58cf9b27fa5f09ae075e8efde5f6df0cc9
Author: Lyndon Nerenberg <address@hidden>
Date: Sat Dec 24 16:14:28 2011 -0800
Tag Makefiles as POSIX and remove explicit CC macros.
diff --git a/Makefile b/Makefile
index f278d0d..90f2c40 100644
--- a/Makefile
+++ b/Makefile
@@ -49,7 +49,6 @@ default_editor = /usr/bin/vi
# default pager
default_pager = /usr/bin/more
-CC = gcc
CPPFLAGS =
CFLAGS = -Wall -Wno-pointer-sign -O2
LDFLAGS =
diff --git a/mts/Makefile b/mts/Makefile
index 35c0c7a..530d14e 100644
--- a/mts/Makefile
+++ b/mts/Makefile
@@ -1,3 +1,4 @@
+.POSIX:
#
# Makefile for mts subdirectory
#
diff --git a/sbr/Makefile b/sbr/Makefile
index e77984f..5586c22 100644
--- a/sbr/Makefile
+++ b/sbr/Makefile
@@ -1,3 +1,4 @@
+.POSIX:
#
# Makefile for sbr subdirectory
#
@@ -14,7 +15,6 @@ bindir = ${exec_prefix}/bin
libdir = ${exec_prefix}/lib
etcdir = ${prefix}/etc
-CC = gcc
CFLAGS = -Wall -Wno-pointer-sign -O2
CONFIGDEFS = -DNMHETCDIR='"$(etcdir)"' -DMAILSPOOL='"$(mailspool)"'
-DSENDMAILPATH='"$(sendmailpath)"'
INCLUDES = -I.. -I. -I$(top_srcdir)
diff --git a/uip/Makefile b/uip/Makefile
index 9e0e057..d89b3e2 100644
--- a/uip/Makefile
+++ b/uip/Makefile
@@ -1,3 +1,4 @@
+.POSIX:
#
# Makefile for uip subdirectory
#
@@ -14,7 +15,6 @@ bindir = ${exec_prefix}/bin
libdir = ${exec_prefix}/lib
etcdir = ${prefix}/etc
-CC = gcc
CFLAGS = -Wall -Wno-pointer-sign -O2
INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)
LDFLAGS =
-----------------------------------------------------------------------
Summary of changes:
Makefile | 1 -
mts/Makefile | 1 +
sbr/Makefile | 2 +-
sbr/discard.c | 28 +----------------------
uip/Makefile | 2 +-
uip/msh.c | 10 +-------
uip/prompter.c | 68 +++----------------------------------------------------
uip/termsbr.c | 27 +---------------------
uip/wmh.c | 22 ++---------------
9 files changed, 13 insertions(+), 148 deletions(-)
hooks/post-receive
--
The nmh Mail Handling System
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nmh-commits] [SCM] The nmh Mail Handling System branch, posix, updated. 335e8e2f9351507ec5a7f4dcd123cfa0f72dc54c,
Lyndon Nerenberg <=