a687e69458b686a6ca04ecd3c520a9fc7e3338fc
[mmh] / 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 }