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

@@ -8,11 +8,16 @@
cf - print character frequencies
*/
#include "common.h"
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
FILE *in;
#define INFILE "cf.in"
#define GETCHAR() fgetc(in)
#ifndef NO_FLOATS
float f[0x100];
@@ -35,6 +40,11 @@ char *argv[];
signed cutoff;
#endif
in = fopen(INFILE, "rb");
if (in == NULL) {
return EXIT_FAILURE;
}
if (argc <= 1)
#ifndef NO_FLOATS
cutoff = 0.0;
@@ -176,6 +186,6 @@ char *argv[];
#endif
}
}
fclose(in);
return 0;
}