xref: /original-bsd/old/vpr/vtools/vfw.c (revision fff8c27b)
1 /*
2  * Copyright (c) 1983 Regents of the University of California.
3  * All rights reserved.  The Berkeley software License Agreement
4  * specifies the terms and conditions for redistribution.
5  */
6 
7 #ifndef lint
8 static char sccsid[] = "@(#)vfw.c	5.1 (Berkeley) 05/15/85";
9 #endif not lint
10 
11 /*
12  * Quick hack to see the values in a troff width table.
13  */
14 
15 #include <stdio.h>
16 
main(argc,argv)17 main(argc,argv)
18 char **argv;
19 {
20 	FILE *f;
21 	int c;
22 	int i;
23 
24 	if (argc != 2) {
25 		printf("usage: vfw ftX\n");
26 		exit(1);
27 	}
28 	f = fopen(argv[1], "r");
29 	if (f == NULL) {
30 		printf("Can't open %s\n", argv[1]);
31 		exit(1);
32 	}
33 	fseek(f, 32L, 0);
34 	for (i=0; !feof(f); i++) {
35 		c = getc(f);
36 		printf("%d\t%d\n", i, c&255);
37 	}
38 	exit(0);
39 }
40