URL
https://opencores.org/ocsvn/sc2v/sc2v/trunk
[/] [sc2v/] [trunk/] [src/] [sc2v_step1.c] - Diff between revs 31 and 33
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 31 |
Rev 33 |
Line 73... |
Line 73... |
}
|
}
|
);
|
);
|
return NULL;
|
return NULL;
|
}
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|
|
StructNode *InsertStruct(StructNode *list, char *name, StructRegNode *reglist){
|
|
|
|
StructNode *sl;
|
|
|
|
sl=(StructNode *)malloc(sizeof(StructNode));
|
|
strcpy(sl->name,name);
|
|
sl->list=reglist;
|
|
SGLIB_LIST_ADD(StructNode,list,sl,next);
|
|
return(list);
|
|
|
|
}
|
|
|
|
StructRegNode *InsertStructReg(StructRegNode *list, char *name, int length){
|
|
|
|
StructRegNode *sl;
|
|
|
|
sl=(StructRegNode *)malloc(sizeof(StructRegNode));
|
|
strcpy(sl->name,name);
|
|
sl->length=length;
|
|
SGLIB_LIST_ADD(StructRegNode,list,sl,next);
|
|
return(list);
|
|
|
|
}
|
|
|
|
void
|
|
ShowStructs (StructNode * list)
|
|
{
|
|
StructNode *sll;
|
|
SGLIB_LIST_MAP_ON_ELEMENTS (StructNode, list, sll, next,
|
|
{
|
|
printf ("%s\n", sll->name);
|
|
StructRegNode *srll;
|
|
SGLIB_LIST_MAP_ON_ELEMENTS (StructRegNode,sll->list, srll,next,
|
|
{
|
|
printf ("\t%s %d\n",srll->name,srll->length);
|
|
);}
|
|
);
|
|
}
|
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.