├── README.md ├── evilc.c └── evillerc.c /README.md: -------------------------------------------------------------------------------- 1 | # evilc 2 | 3 | make your code in c unreadable :3 4 | 5 | what does evilc do? 6 | - combines all of your code into a single line 7 | - removes all notes (// and /**/) 8 | - makes your code pain to edit :3 9 | see for yourself in "evillerc.c" 10 | 11 | how to use: 12 | 1. compile using your favorite compilator 13 | 2. run "./evilc < sourcecode.c > newsourcecode.c" (on unix, on windows probably same but idc) 14 | 3. ??? 15 | 4. profit 16 | 17 | i don't know how to edit text in this pls help so it doesn't look this bad c: 18 | -------------------------------------------------------------------------------- /evilc.c: -------------------------------------------------------------------------------- 1 | #include 2 | //kdo vi :D 3 | int main() 4 | { 5 | int r = 0, x = 0, y = 0; 6 | char c = 10; 7 | while (1) 8 | { 9 | if (r == EOF) 10 | { 11 | break; 12 | } 13 | r = scanf("%c", &c); 14 | while (c == ' ') 15 | { 16 | scanf("%c", &c); 17 | x = x + 1; 18 | } 19 | if (c == '/') 20 | { 21 | scanf("%c", &c); 22 | if (c == '/') 23 | { 24 | while (c != 10) 25 | { 26 | scanf("%c", &c); 27 | } 28 | } 29 | else if (c == '*') 30 | { 31 | scanf("%c", &c); 32 | while (c != '*') 33 | { 34 | scanf("%c", &c); 35 | } 36 | while (c != '/') 37 | { 38 | scanf("%c", &c); 39 | } 40 | scanf("%c", &c); 41 | } 42 | else 43 | { 44 | printf("/"); 45 | } 46 | } 47 | if (x == 1) 48 | { 49 | printf(" "); 50 | } 51 | x = 0; 52 | if (y == 0) 53 | { 54 | if (c == '>') 55 | { 56 | printf(">\n"); 57 | } 58 | else if (c == ';') 59 | { 60 | printf("; "); 61 | } 62 | else if (c != 10 && c != 32) 63 | { 64 | printf("%c", c); 65 | } 66 | if (c == 39 || c == 34) 67 | { 68 | y = 1; 69 | } 70 | } 71 | else if (y == 1) 72 | { 73 | printf("%c", c); 74 | if (c == 39 || c == 34) 75 | { 76 | y = 0; 77 | } 78 | } 79 | } 80 | return 0; 81 | } 82 | -------------------------------------------------------------------------------- /evillerc.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main(){int r = 0, x = 0, y = 0; char c = 10; while (1){if (r == EOF){break; }r = scanf("%c", &c); while (c == ' '){scanf("%c", &c); x = x + 1; }if (c == '/'){scanf("%c", &c); if (c == '/'){while (c != 10){scanf("%c", &c); }}else if (c == '*'){scanf("%c", &c); while (c != '*'){scanf("%c", &c); }while (c != '/'){scanf("%c", &c); }scanf("%c", &c); }else{printf("/"); }}if (x == 1){printf(" "); }x = 0; if (y == 0){if (c == '>'){printf(">\n"); }else if (c == ';'){printf("; "); }else if (c != 10 && c != 32){printf("%c", c); }if (c == 39 || c == 34){y = 1; }}else if (y == 1){printf("%c", c); if (c == 39 || c == 34){y = 0; }}}return 0; } 3 | --------------------------------------------------------------------------------