summaryrefslogtreecommitdiffstats
path: root/doc/l-paper/cat.l
blob: 4fcaf88e2d8eb5431e307f78efdc4783d652b87e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
typedef string FILE;

main(int ac, string av[])
{
	int	i;
	FILE	fd;

	if (ac == 1) {
		puts("-nonewline", read("stdin"));
	} else {
		for (i = 1; defined(av[i]); i++) {
			fd = open(av[i], "r");
			puts("-nonewline", read(fd));
		}
	}
}