aboutsummaryrefslogtreecommitdiff
path: root/src/stdio/getw.c
blob: 55d6bb482dba7dd938aed838de62909071795000 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#define _GNU_SOURCE
#include <stdio.h>

int getw(FILE *f)
{
	int x;
	return fread(&x, sizeof x, 1, f) ? x : EOF;
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif