diff options
author | zakk <zakk@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-08-26 17:39:27 +0000 |
---|---|---|
committer | zakk <zakk@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-08-26 17:39:27 +0000 |
commit | 6bf20c78f5b69d40bcc4931df93d29198435ab67 (patch) | |
tree | e3eda937a05d7db42de725b7013bd0344b987f34 /lcc/tst/cf.c | |
parent | 872d4d7f55af706737ffb361bb76ad13e7496770 (diff) | |
download | ioquake3-aero-6bf20c78f5b69d40bcc4931df93d29198435ab67.tar.gz ioquake3-aero-6bf20c78f5b69d40bcc4931df93d29198435ab67.zip |
newlines fixed
git-svn-id: svn://svn.icculus.org/quake3/trunk@6 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'lcc/tst/cf.c')
-rwxr-xr-x | lcc/tst/cf.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/lcc/tst/cf.c b/lcc/tst/cf.c index 1c9226a..28efab7 100755 --- a/lcc/tst/cf.c +++ b/lcc/tst/cf.c @@ -1,32 +1,32 @@ -/* cf - print character frequencies */
-float f[128];
-
-main(argc, argv)
-int argc;
-char *argv[];
-{
- int i, c, nc;
- float cutoff, atof();
-
- if (argc <= 1)
- cutoff = 0.0;
- else
- cutoff = atof(argv[1])/100;
- for (i = 0; i <= 127; )
- f[i++] = 0.0;
- nc = 0;
- while ((c = getchar()) != -1) {
- f[c] += 1;
- nc++;
- }
- printf("char\tfreq\n");
- for (i = 0; i <= 127; ++i)
- if (f[i] && f[i]/nc >= cutoff) {
- if (i <= ' ')
- printf("%03o", i);
- else
- printf("%c", i);
- printf("\t%.1f\n", 100*f[i]/nc);
- }
- return 0;
-}
+/* cf - print character frequencies */ +float f[128]; + +main(argc, argv) +int argc; +char *argv[]; +{ + int i, c, nc; + float cutoff, atof(); + + if (argc <= 1) + cutoff = 0.0; + else + cutoff = atof(argv[1])/100; + for (i = 0; i <= 127; ) + f[i++] = 0.0; + nc = 0; + while ((c = getchar()) != -1) { + f[c] += 1; + nc++; + } + printf("char\tfreq\n"); + for (i = 0; i <= 127; ++i) + if (f[i] && f[i]/nc >= cutoff) { + if (i <= ' ') + printf("%03o", i); + else + printf("%c", i); + printf("\t%.1f\n", 100*f[i]/nc); + } + return 0; +} |