summaryrefslogtreecommitdiff
path: root/userspace/checker.c
diff options
context:
space:
mode:
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);
-}