From: David Levine Date: Wed, 26 Dec 2012 01:25:43 +0000 (-0600) Subject: Remove discard() total X-Git-Tag: mmh-0.2-RC1~31^2~1 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=33516e5b74bb4bb5c626d4ee42bd3a7a9faaabef;p=mmh Remove discard() total discard() isn't needed in mmh anymore. --- diff --git a/configure.ac b/configure.ac index 2cda6e0..372f0e0 100644 --- a/configure.ac +++ b/configure.ac @@ -318,15 +318,6 @@ AC_CHECK_HEADERS(fcntl.h crypt.h termcap.h \ langinfo.h wchar.h wctype.h iconv.h \ sys/param.h sys/time.h sys/stream.h ) -dnl -dnl Checks for _IO_write_ptr. A Linuxism used by nmh on linux. We -dnl really use a whole set of them, but this check should be -dnl sufficient. -dnl -AC_CHECK_HEADER(libio.h, [ - AC_EGREP_HEADER(_IO_write_ptr, libio.h, [ - AC_DEFINE(LINUX_STDIO,1,[Use the Linux _IO_*_ptr defines from .]) ]) ]) - AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM,1, [Define to 1 if `struct winsize' requires .]),, [[#if HAVE_SYS_STREAM_H diff --git a/h/prototypes.h b/h/prototypes.h index 3512ef7..848115f 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -38,7 +38,6 @@ void context_save(void); void cpydata(int, int, char *, char *); void cpydgst(int, int, char *, char *); int decode_rfc2047(char *, char *, size_t); -void discard(FILE *); int default_done(int); int execprog(char *, char **); int execprogl(char *, char *, ...); diff --git a/sbr/Makefile.in b/sbr/Makefile.in index e5d8ffd..61fc96c 100644 --- a/sbr/Makefile.in +++ b/sbr/Makefile.in @@ -50,7 +50,7 @@ SRCS = addrsbr.c ambigsw.c brkstring.c \ context_find.c context_read.c \ context_replace.c context_save.c \ cpydata.c cpydgst.c crawl_folders.c \ - discard.c dtime.c dtimep.c \ + dtime.c dtimep.c \ error.c execprog.c ext_hook.c folder_addmsg.c folder_delmsgs.c \ folder_free.c folder_read.c \ folder_realloc.c gans.c getans.c getanswer.c \ diff --git a/sbr/discard.c b/sbr/discard.c deleted file mode 100644 index d3eabd0..0000000 --- a/sbr/discard.c +++ /dev/null @@ -1,31 +0,0 @@ -/* -** discard.c -- discard output on a file pointer -** -** This code is Copyright (c) 2002, by the authors of nmh. See the -** COPYRIGHT file in the root directory of the nmh distribution for -** complete copyright information. -*/ - -#include -#include - - -void -discard(FILE *io) -{ - if (io == NULL) - return; - - tcflush(fileno(io), TCOFLUSH); - -#if defined(_FSTDIO) || defined(__DragonFly__) - fpurge(io); -#else -# ifdef LINUX_STDIO - io->_IO_write_ptr = io->_IO_write_base; -# else - if ((io->_ptr = io->_base)) - io->_cnt = 0; -# endif -#endif -}