All pastes #269112 Raw Edit

Something

public text v1 · immutable
·published 2006-12-06 07:58 UTC
rendered paste body
#include <stdio.h>

enum command_indices {
        IMPLNOOP,
#define COMMAND(name, description)             ##name,
#include "commands.def"
#undef COMMAND
        COMMAND_COUNT
};


char *cmddesc[] = {
        "No Operation Command",
#define COMMAND(name, description)              description,
#include "commands.def"
#undef COMMAND
   NULL
};

int main()
{
     int i;
    printf("%d",COMMAND_COUNT);
        for(i=0;i<COMMAND_COUNT;i++)
    if( IMPLCALL == i ) {
        printf("%s",cmddesc[IMPLCALL]);
    }
}