]> diplodocus.org Git - nmh/blob - sbr/peekc.c
Fix stupid accidental dependence on a bash quirk in previous
[nmh] / sbr / peekc.c
1
2 /*
3 * peekc.c -- peek at the next character in a stream
4 *
5 * $Id$
6 *
7 * This code is Copyright (c) 2002, by the authors of nmh. See the
8 * COPYRIGHT file in the root directory of the nmh distribution for
9 * complete copyright information.
10 */
11
12 #include <h/mh.h>
13
14
15 int
16 peekc(FILE *fp)
17 {
18 register int c;
19
20 c = getc(fp);
21 ungetc(c, fp);
22 return c;
23 }