/*
 *	Print names of patches out of 4096-byte DX7 patch dump
 */
#include <stdio.h>

main(argc, argv)
char **argv;
{
	int i;

	for (i=1; i<argc; i++) {
		see(argv[i]);
	}
	exit(0);
}

see(file)
char *file;
{
	int fd;
	char buf[128];

	fd = open(file, 0);
	if (fd < 0) {
		perror(file);
		return;
	}

	printf("===== %s =====\n", file);

	while (read(fd, buf, sizeof(buf)) == sizeof(buf)) {
		printf("%10.10s\n", &buf[sizeof(buf)-10]);
	}

	(void) close(fd);
}
