#include "asm.h"
#include <time.h>
-#ifndef __BORLANDC__
+#if !defined(__BORLANDC__) && !defined(_MSC_VER)
+#if 0 /* This should no longer be necessary. */
// This is a bit messy because we define link ourself
#define link NoLiNk
#include <unistd.h>
#undef link
#else
+
+#include <unistd.h>
+#endif
+#else
// No unistd.h in Borland C++
#endif
symbol *interrupts[256];
-void printIval (symbol *, link *, initList *, FILE *);
+void printIval (symbol *, sym_link *, initList *, FILE *);
set *publics = NULL; /* public variables */
set *externs = NULL; /* Varibles that are declared as extern */
if (IS_AGGREGATE (sym->type))
ival = initAggregates (sym, sym->ival, NULL);
else
- ival = newNode ('=', newAst (EX_VALUE, symbolVal (sym)),
+ ival = newNode ('=', newAst_VALUE(symbolVal (sym)),
decorateType (resolveSymbols (list2expr (sym->ival))));
codeOutFile = statsg->oFile;
allocInfo = 0;
/*-----------------------------------------------------------------*/
/* printIvalType - generates ival for int/char */
/*-----------------------------------------------------------------*/
-void printIvalType (link * type, initList * ilist, FILE * oFile)
+void printIvalType (sym_link * type, initList * ilist, FILE * oFile)
{
value *val;
/*-----------------------------------------------------------------*/
/* printIvalStruct - generates initial value for structures */
/*-----------------------------------------------------------------*/
-void printIvalStruct (symbol * sym,link * type,
+void printIvalStruct (symbol * sym,sym_link * type,
initList * ilist, FILE * oFile)
{
symbol *sflds;
/*-----------------------------------------------------------------*/
/* printIvalChar - generates initital value for character array */
/*-----------------------------------------------------------------*/
-int printIvalChar (link * type, initList * ilist, FILE * oFile, char *s)
+int printIvalChar (sym_link * type, initList * ilist, FILE * oFile, char *s)
{
value *val;
int remain;
/*-----------------------------------------------------------------*/
/* printIvalArray - generates code for array initialization */
/*-----------------------------------------------------------------*/
-void printIvalArray (symbol * sym, link * type, initList * ilist,
+void printIvalArray (symbol * sym, sym_link * type, initList * ilist,
FILE * oFile)
{
initList *iloop;
/*-----------------------------------------------------------------*/
/* printIvalFuncPtr - generate initial value for function pointers */
/*-----------------------------------------------------------------*/
-void printIvalFuncPtr (link * type, initList * ilist, FILE * oFile)
+void printIvalFuncPtr (sym_link * type, initList * ilist, FILE * oFile)
{
value *val;
int dLvl = 0;
/*-----------------------------------------------------------------*/
/* printIvalCharPtr - generates initial values for character pointers */
/*-----------------------------------------------------------------*/
-int printIvalCharPtr (symbol * sym, link * type, value * val, FILE * oFile)
+int printIvalCharPtr (symbol * sym, sym_link * type, value * val, FILE * oFile)
{
int size = 0;
/*-----------------------------------------------------------------*/
/* printIvalPtr - generates initial value for pointers */
/*-----------------------------------------------------------------*/
-void printIvalPtr (symbol * sym, link * type, initList * ilist, FILE * oFile)
+void printIvalPtr (symbol * sym, sym_link * type, initList * ilist, FILE * oFile)
{
value *val;
int size;
/*-----------------------------------------------------------------*/
/* printIval - generates code for initial value */
/*-----------------------------------------------------------------*/
-void printIval (symbol * sym, link * type, initList * ilist, FILE * oFile)
+void printIval (symbol * sym, sym_link * type, initList * ilist, FILE * oFile)
{
if (!ilist)
return;