char *simArgs[8];
int nsimArgs = 0;
+/* fake filename & lineno to make linker */
+char *filename=NULL;
+int lineno = 0;
+int fatalError = 0;
+
/* command table */
struct cmdtab
{
{ "q" , cmdQuit , NULL }
};
+/*-----------------------------------------------------------------*/
+/* gc_strdup - make a string duplicate garbage collector aware */
+/*-----------------------------------------------------------------*/
+char *gc_strdup(const char *s)
+{
+ char *ret;
+ ALLOC_ATOMIC(ret, strlen(s)+1);
+ strcpy(ret, s);
+ return ret;
+}
+
/*-----------------------------------------------------------------*/
/* alloccpy - allocate copy and return a new string */
/*-----------------------------------------------------------------*/
void **vptr;
if (array)
- vptr = GC_realloc(array,newSize*(sizeof(void **)));
+ vptr = realloc(array,newSize*(sizeof(void **)));
else
- vptr = GC_malloc(sizeof(void **));
+ vptr = calloc(1, sizeof(void **));
if (!vptr) {
fprintf(stderr,"sdcdb: out of memory \n");