Created
October 13, 2014 10:15
-
-
Save dcat/39978db634b02f0a0a3a to your computer and use it in GitHub Desktop.
dcat's horrorcode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* dcat's horrorcode, compile with; `cc -std=c99 -o echo echo.c` */ | |
extern char write (unsigned, register const char *, unsigned); | |
static const char C[2] = { ' ', '\n' }; | |
static mprint (char *x) { | |
register char *s,c; | |
for (s = x; *s; ++s); | |
c = write(1, &*x, s-x); | |
return ! c == s - x; | |
} | |
main (int c, char **a) { | |
--c; | |
for (register char i=1; i<=c; i++) | |
mprint(i[a]) || write(1,&(!!(i == c))[C], 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment