summaryrefslogtreecommitdiff
path: root/src/stdio/getw.c
blob: 73d2c0d5c6c0914322903e0c30e3f93c0f9336cc (plain)
1
2
3
4
5
6
7
8
#define _GNU_SOURCE
#include <stdio.h>

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