summaryrefslogtreecommitdiff
path: root/C/HF/chap4/cryptic/ecat.c
blob: 52661169adce663e0efee34f44de15224526e2ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#include "encrypt.h"

int main(int argc, char **argv)
{
	FILE *fd;
	char buf[80];

	if (argc != 2)
		return 1;

	fd = fopen(argv[1], "r");

	while (fgets(buf, 80, fd)) {
		encrypt(buf);
		printf("%s", buf);
	}

	printf("\n");
	fclose(fd);

	return 0;
}