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

Pages: 1-

Funny C

Name: Anonymous 2007-07-12 0:25 ID:W2JxwKkL

I was looking at the source code for libffi, which is part of the GCC source, and came across this:

// Return stack to previous state and call the function
        add esp, 8
// FIXME: Align the stack to a 128-bit boundary to avoid
// potential performance hits.
        call [ebp + 28]

Oh god I lol'd.
Post your funny C code

Name: Anonymous 2007-07-12 0:30 ID:AOe00VDX

>>1
OKAY YOU FUQIN ANGERED AN EXPERT PROGRAMMER
GODFUCKIGNDAMN
FIRST OF ALL, YOU DONT FUQIN KNOW WHAT A MAN PAGE IS
SECONDLY, THIS IS
/prog/ DO NOT DEMAND USEFUL ANSWERS THE WAY YOU WANT THEM TO BE
THIRDLY PROGRAMMING IS ALL ABOUT PHILOSOPHY AND ``ABSTRACT BULLSHITE'' THAT YOU WILL NEVER COMPREHEND
AND FUQIN LASTLY, FUCK OFF WITH YOUR BULLSHYT
EVERYTHING HAS ALREADY BEEN ANSWERED IN
>>3,4,10

Name: Anonymous 2007-07-12 0:33 ID:W2JxwKkL

>>2
What? Wrong thread I guess...

Name: Anonymous 2007-07-12 1:45 ID:Heaven

YOU MUST BE NEW HERE

Name: Anonymous 2007-07-12 2:28 ID:Heaven

from glibc-2.5/stdlib/getenv.c


#if __BYTE_ORDER == __LITTLE_ENDIAN || !_STRING_ARCH_unaligned
      name_start = ('=' << 8) | *(const unsigned char *) name;
#else
# if __BYTE_ORDER == __BIG_ENDIAN
      name_start = '=' | ((*(const unsigned char *) name) << 8);
# else
 #error "Funny byte order." /* lol wut */
# endif
#endif

Name: Anonymous 2007-07-12 12:35 ID:Bb5GfBi7

/* woo. i'm actually going to comment this function. isn't that fun. make sure to follow along, kids */
void serv_got_im(struct gaim_connection *gc, char *name, char *message, int away, time_t mtime)
{
    char *buffy;
    char *angel;
    int plugin_return;

    struct conversation *cnv;
    int new_conv = 0;

    /* we should update the conversation window buttons and menu, if it exists. */
    cnv = find_conversation(name);
    if (cnv)
        set_convo_gc(cnv, gc);
    /* we do the new_conv check here in case any plugins decide to create it */
    else
        new_conv = 1;

    /* plugin stuff. we pass a char ** but we don't want to pass what's been given us
     * by the prpls. so we create temp holders and pass those instead. it's basically
     * just to avoid segfaults. */
    buffy = g_strdup(message);
    angel = g_strdup(name);
    plugin_return = plugin_event(event_im_recv, gc, &angel, &buffy, 0);

    if (!buffy || !angel || plugin_return) {
        if (buffy)
            g_free(buffy);
        if (angel)
            g_free(angel);
        return;
    }
    g_snprintf(message, strlen(message) + 1, "%s", buffy);
    g_free(buffy);
    g_snprintf(name, strlen(name) + 1, "%s", angel);
    g_free(angel);


ONE WORD: THE FORCED USE OF RANDOM VARIABLE NAMES DUE TO PRIMMITIVE LANGUAGE


also Buffy rocks<3

Name: Anonymous 2007-07-12 13:02 ID:m4zk5JhP

"make sure to follow along, kids"

it's condescending comments like this that make me want to punch faces

Name: Anonymous 2007-07-12 13:11 ID:UJHkoKRx

>>7
One word, the facepunching of Moses.  Thread over.

Name: Anonymous 2007-07-12 14:40 ID:5gbnNc8W

>>6

RETARDED

Name: Anonymous 2007-07-12 15:48 ID:wfw4TUms

>>7
yeah its as if he thinks he knows what he's doing which he doesn't

Name: Anonymous 2007-07-12 16:59 ID:EK+tPAEd

ONE WROD tdwtf

Name: Anonymous 2007-07-12 17:35 ID:8rc8FJyr

>>6
He could've just called them message_copy and name_copy or similar.

Name: Anonymous 2007-07-12 18:41 ID:Bb5GfBi7

lol I am the developer of xchat ;_;

Name: Anonymous 2007-07-12 21:55 ID:Heaven

>>13
Your code is utter shit, kill yourself.
No, I mean it. The whole xchat core is a mess of garbage spaghetti code.

Name: Anonymous 2007-07-12 23:50 ID:Heaven

compare=cflag?&strstr:&strcasestr;

Name: Anonymous 2007-07-12 23:56 ID:LMmKVv6a

>>15
actually, this is even better:
if(sflag) for(compare=cflag?&strstr:&strcasestr;;){

Name: Anonymous 2007-07-13 5:07 ID:5tVau5kt

>>15
One word, the omitted recommended whitespace.

>>16
One word, what the fuck was that.

Name: Anonymous 2007-07-13 5:09 ID:AbTCWRKc

>>16
You're like one of those guys that begins to tell a joke, leaves out the punchline and walks away. Fuck you.

Name: Anonymous 2007-07-13 5:09 ID:qRCAsQ2i

>>17

Equivalent to:


if (sflag)
{
   for (;;)
   {
      if (cflag)
      {
         compare = &strstr;
      }
      else
      {
         compare = &strcasestr;
...


Name: Anonymous 2007-07-13 5:46 ID:Heaven

Name: Anonymous 2010-12-27 15:01


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