Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

free gnu

Name: Anonymous 2013-02-06 23:14

#define DA_GNU_99

#include <stdio.h>

int main(void)
{
    void **anus = &&troff;

    goto *anus;
    puts("DONKEY DOT COM");
troff:
    puts("WAHAY, YOU GOT ALL ONE HUNDRED NOTES FROM THIS WORLD");
    return 0;
}

Name: Anonymous 2013-02-07 16:52

Here's what the GNU coding style would have looked like if ricky stallman had eaten fewer donuts in his childhood:
#include <stdio.h>

char *strchr(const char *s, int c)
 { while (*s != '\0')
    { if (*s == (char) c)
       { return (char *) s; }
      s++; }
   return 0; }

size_t strlen(const char *s)
 { size_t n;
   for (n = 0; s[n] != '\0'; n++)
    {}
   return n; }

char *strcpy(char *to, const char *from)
 { char *base = to;
   while ((*to++ = *from++))
    {}
   return base; }

int main(void)
 { puts(strchr("get your anus", 't'));
   printf("%lu\n", (unsigned long int) strlen("get your anus"));
   return 0; }

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List