]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_tail.c
removed some junk
[16.git] / src / lib / 16_tail.c
index d8f18b9483fa429b79bab5705ae0e653e9b438af..9cb0e76997507b1c8dbbb1eb3d7503c98a4877ee 100755 (executable)
@@ -792,101 +792,3 @@ void turboXT(byte bakapee)
        }\r
 }\r
 #endif\r
-\r
-//from https://stackoverflow.com/questions/18327439/printing-binary-representation-of-a-char-in-c\r
-const char *word_to_binary(int x)\r
-{\r
-       static char b[17];\r
-       int z;\r
-\r
-       b[0] = '\0';\r
-       for (z = 256; z > 0; z >>= 1)\r
-       {\r
-///            printf("                z=%u    b=%u    x=%u\n", z, b, x);\r
-               strcat(b, ((x & z) == z) ? "1" : "0");\r
-       }\r
-       return b;\r
-}\r
-\r
-const char *byte_to_binary(int x)\r
-{\r
-       static char b[9];\r
-       int z;\r
-\r
-       b[0] = '\0';\r
-       for (z = 128; z > 0; z >>= 1)\r
-       {\r
-               strcat(b, ((x & z) == z) ? "1" : "0");\r
-       }\r
-       return b;\r
-}\r
-\r
-const char *nibble_to_binary(int x)\r
-{\r
-       static char b[9];\r
-       int z;\r
-\r
-       b[0] = '\0';\r
-       for (z = 8; z > 0; z >>= 1)\r
-       {\r
-               strcat(b, ((x & z) == z) ? "1" : "0");\r
-       }\r
-       return b;\r
-}\r
-\r
-const char *boolean_to_binary(int x)\r
-{\r
-       static char b[3];\r
-       int z;\r
-\r
-       b[0] = '\0';\r
-       for (z = 1; z > 0; z >>= 1)\r
-       {\r
-               strcat(b, ((x & z) == z) ? "1" : "0");\r
-       }\r
-       return b;\r
-}\r
-\r
-void wordtest()\r
-{\r
-       word pee;\r
-       printf("wordtest\n");\r
-       /* word to binary string */\r
-       for(pee=0;pee<280;pee++)\r
-               printf("        %u      %s\n", pee, word_to_binary(pee));\r
-       printf("        sizeof(word)=%s\n", word_to_binary(sizeof(word)));\r
-       printf("end of word test\n");\r
-}\r
-\r
-void bytetest()\r
-{\r
-       byte pee;\r
-       printf("bytetest\n");\r
-       /* byte to binary string */\r
-       for(pee=0;pee<18;pee++)\r
-               printf("        %u      %s\n", pee, byte_to_binary(pee));\r
-       printf("        sizeof(byte)=%s\n", byte_to_binary(sizeof(byte)));\r
-       printf("end of byte test\n");\r
-}\r
-\r
-void nibbletest()\r
-{\r
-       nibble pee;\r
-       printf("nibbletest\n");\r
-       /* nibble to binary string */\r
-       for(pee=0;pee<18;pee++)\r
-               printf("        %u      %s\n", pee, nibble_to_binary(pee));\r
-       printf("        sizeof(nibble)=%s\n", nibble_to_binary(sizeof(nibble)));\r
-       printf("end of nibble test\n");\r
-}\r
-\r
-void booleantest()\r
-{\r
-       boolean pee;\r
-       printf("booleantest\n");\r
-       /* boolean to binary string */\r
-       for(pee=0;pee<4;pee++)\r
-               printf("        %u      %s\n", pee, boolean_to_binary(pee));\r
-       printf("        sizeof(boolean)=%s\n", boolean_to_binary(sizeof(boolean)));\r
-       printf("end of boolean test\n");\r
-}\r