summaryrefslogtreecommitdiff
path: root/userspace/checker.c
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-21 11:44:55 +0200
committerMiguel <m.i@gmx.at>2018-09-21 11:44:55 +0200
commitf5281689c95758f17628f0286e0265ecf3385a8e (patch)
tree312b16fcbaf40b7e32c1b7e3fe783477e8d9674c /userspace/checker.c
parente68c8e3468076afa171ffff82b9bafa4cbc335bb (diff)
little div prog and cleaning userspace
Diffstat (limited to 'userspace/checker.c')
-rw-r--r--userspace/checker.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/userspace/checker.c b/userspace/checker.c
deleted file mode 100644
index ac0bcc9..0000000
--- a/userspace/checker.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <stdio.h>
-
-int main()
-
-{
-FILE *fp; /* The file handle for input data */
-fp=stdin;
-int ch; /* Each character read. */
-int checksum = 0; /* The checksum mod 2^16. */
-int count=0;
-
-printf("this will calc a simple checksum of the enered text\nPress Left Control + D to signify end of file \n",checksum,count);
-while ((ch = getc(fp)) != EOF) {
- checksum = (checksum >> 1) + ((checksum & 1) << 15);
- checksum +=(int) ch;
- checksum &= 0xffff; /* Keep it within bounds. */
- count++;
-}
-printf("checksum : 0x%08X for %i bytes\n",checksum,count);
-}