Hey Guys,
I need your help where I have a C structure and I want it to be converted into corresponding function.
Example:
typedef struct
{
unsigned long LineNum; //1025-4032
unsigned short KeyNum; /*tbd*/
char Key; /*between 1-3*/
char Choice ; /*1 if just changed*/
}MY_KEY_STATE;
...needs to be converted into function below:
void export_MY_KEY_STATE(cOBJ *OutStr, MY_KEY_STATE a)
{
AddULongToObject(OutStr, "LineNum", a.LineNum ); //1025-4032
AddUShortToObject(OutStr, "KeyNum", a.KeyNum ); /*tbd*/
AddCharToObject(OutStr, "Key", a.Key ); /*between 1-3*/
AddCharToObject(OutStr, "Choice", a.Choice); /*1 if just changed*/
}
So, can we do the above conversion using shell script on Linux/Unix?
Note: The comments in the struct as intact in the function.
Thanks!
skyOS