|
|
1.1 root 1: /*
2: * Standard I/O Library
3: * Get word (int)
4: */
5:
6: #include <stdio.h>
7:
8: int
9: fgetw(fp)
10: register FILE *fp;
11: {
12: register int c0, c1;
13:
14: if ((c0=getc(fp))==EOF)
15: return (EOF);
16: else if ((c1=getc(fp))==EOF) {
17: fp->_ff |= _FERR;
18: return (EOF);
19: } else
20: return (c1<<8|c0);
21: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.