Skip to content

Instantly share code, notes, and snippets.

@kendfrey
Created August 29, 2013 13:18
Show Gist options
  • Save kendfrey/6377973 to your computer and use it in GitHub Desktop.
Save kendfrey/6377973 to your computer and use it in GitHub Desktop.
IOCCC
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <fcntl.h>
#define lOOO char*
#define O0Ol(s) setmode(fileno(s),O_BINARY)
#define\
l010(i)((\
lOOO )&\
l011 )[((\
lOOO )&\
lO11 )[i]]
lOOO
Oll0 ;uint32_t
ll1l ;
lOOO
OO0l ;uint32_t
l011 =044;uint32_t
l0ll ;uint32_t
lO11 =50462976;int main(int
O00O ,
lOOO
l11l []){
O0Ol(stdin);
O0Ol (stdout);if(
O00O <2||strcmp(
l11l [1],"/d"))goto
Ol10 ;goto
l1O0 ;
llll :if(
l011 ++<80)goto
l1O0 ;putchar(
l0ll );
l1O0 :if(EOF-(
l0ll =getchar()))goto
llll ;return
0000 ;
Ol10 :
Oll0 =malloc(
ll1l=1024);if(
Oll0 !=NULL)goto
O0O0 ;return
0001 ;
O0O0 :goto
l10O ;
O0l1 :
Oll0 [
l011 ++-36]=
l0ll ;if(
l011 -
ll1l )goto
l10O ;
OO0l =realloc(
Oll0 ,
ll1l *=4);if(
OO0l!=NULL)goto
lOO1 ;free(
Oll0 );return
0001 ;
lOO1 :
Oll0 =
OO0l ;
l10O :if(EOF-(
l0ll =getchar()))goto
O0l1 ;if(
0001 );{char
lOlO [44]={82,73,70,70,
l010 (0),
l010 (1),
l010 (2),
l010 (3),87,
0101,86,69,102,109,116,32,16,0,
0000 ,0,1,0,1,0,(
l011 -=36,
l010 (0)),
l010 (1),
l010 (2),
l010 (3),
l010 (0),
l010 (1),
l010 (2),
l010 (3),1,0,8,0,100,97,116,97,
l010 (0),
l010 (1),
l010 (2),
l010 (3)};
l0ll =0;goto
OOlO;
O111 :putchar(
lOlO [
l0ll ++]);
OOlO :if(
l0ll <44)goto
O111 ;
l0ll =0;goto
O1ll ;
l00l :putchar(
Oll0 [
l0ll ++]);
O1ll :if(
l0ll <
l011 )goto
l00l ;}free(
Oll0);return
0000 ;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment