First of all, the declaration of the struct.
Code:
typedef struct instruction{
char opcode, rt, rs, rd, sa;
short int immed;
unsigned int target;
char* label;
char text[40];
}
inst;
Declaration for ada
Note that ada is statically initialized in the header, not in a method.
The process method just has a bunch of statements like the following (more than I'd care to list)
Code:
void process (char ** text){
strcpy(*text, "blah blah");
strcat(*text, "some value");
strcat(*text, "more value");
}
Hope that helps.