All pastes #928168 Raw Edit

Mine

public text v1 · immutable
·published 2008-03-04 21:10 UTC
rendered paste body
typedef struct ST
{
        u32 len;
        char *type;
        char *buffer;
} ST;

void
InsertI32(EBUF *myebuf, i32 num)
{
        ST *foo;

        Neuro_AllocEBuf(myebuf, sizeof(ST*), sizeof(ST));
        foo = Neuro_GiveCurEBuf(myebuf);
        foo->len    = 0;
        foo->type   = "I32";
        foo->buffer = (i32)num;
}

void
InsertU32(EBUF *myebuf, u32 num)
{
        ST *foo;

        Neuro_AllocEBuf(myebuf, sizeof(ST*), sizeof(ST));
        foo = Neuro_GiveCurEBuf(myebuf);
        foo->len    = 0;
        foo->type   = "U32";
        foo->buffer = (u32)num;
}