]> diplodocus.org Git - nmh/commitdiff
Remove sbr/peekc.c containing unused peekc().
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 30 Oct 2016 15:04:38 +0000 (15:04 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 30 Oct 2016 15:17:28 +0000 (15:17 +0000)
gcov showed it wasn't getting any;  we've all been there.
It didn't check for EOF, nor that the ungetc(3) succeeded.

Makefile.am
h/prototypes.h
sbr/peekc.c [deleted file]

index 8aecc8b23e10a6eeb22654bc9cac5de4fa42c322..4b6e4f5f63ad7e04b351191b5b1045b69a922692 100644 (file)
@@ -602,7 +602,7 @@ sbr_libmh_a_SOURCES = sbr/addrsbr.c sbr/ambigsw.c sbr/atooi.c sbr/arglist.c \
                      sbr/makedir.c sbr/md5.c sbr/message_id.c \
                      sbr/mime_type.c sbr/mts.c sbr/netsec.c \
                      sbr/norm_charmap.c sbr/path.c \
                      sbr/makedir.c sbr/md5.c sbr/message_id.c \
                      sbr/mime_type.c sbr/mts.c sbr/netsec.c \
                      sbr/norm_charmap.c sbr/path.c \
-                     sbr/peekc.c sbr/pidwait.c sbr/pidstatus.c \
+                     sbr/pidwait.c sbr/pidstatus.c \
                      sbr/print_help.c sbr/print_sw.c sbr/print_version.c \
                      sbr/push.c sbr/putenv.c sbr/refile.c sbr/remdir.c \
                      sbr/r1bindex.c sbr/readconfig.c sbr/ruserpass.c \
                      sbr/print_help.c sbr/print_sw.c sbr/print_version.c \
                      sbr/push.c sbr/putenv.c sbr/refile.c sbr/remdir.c \
                      sbr/r1bindex.c sbr/readconfig.c sbr/ruserpass.c \
index a17d12f9cbad6d2a7109e9f3f03535a65ec926c2..6c4fdcfbf3c39a3bee48dcd7ac8fd83b9c7117b7 100644 (file)
@@ -312,7 +312,6 @@ void nmh_clear_screen(void);
 char *nmh_getpass(const char *);
 char *new_fs (char *, char *, char *);
 char *path(char *, int);
 char *nmh_getpass(const char *);
 char *new_fs (char *, char *, char *);
 char *path(char *, int);
-int peekc(FILE *ib);
 int pidwait (pid_t, int);
 int pidstatus (int, FILE *, char *);
 char *pluspath(char *);
 int pidwait (pid_t, int);
 int pidstatus (int, FILE *, char *);
 char *pluspath(char *);
diff --git a/sbr/peekc.c b/sbr/peekc.c
deleted file mode 100644 (file)
index 3bfe42a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-
-/*
- * peekc.c -- peek at the next character in a stream
- *
- * 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 <h/mh.h>
-
-
-int
-peekc(FILE *fp)
-{
-    int c;
-
-    c = getc(fp);
-    ungetc(c, fp);
-    return c;
-}