fixed up the rest of the tests, added rudimentary makefile(s)

This commit is contained in:
mrdudz
2014-11-22 18:28:05 +01:00
parent 20072a379c
commit 6144063a6d
36 changed files with 272 additions and 16 deletions

View File

@@ -11,6 +11,9 @@
#define MAXWORDS 250
FILE *in;
#define getchar() fgetc(in)
struct node
{
int count; /* frequency count */
@@ -122,11 +125,17 @@ int main(void)
struct node *root;
char word[20];
in = fopen("wf1.in","rb");
if (in == NULL) {
return EXIT_FAILURE;
}
root = 0;
next = 0;
while (getword(word))
lookup(word, &root)->count++;
tprint(root);
fclose(in);
return 0;
}