* doc/Makefile,
[fw/sdcc] / src / SDCCval.h
index 17c4ba4a3df5597857a05dca0383bdc2d0ede3c1..363b5e459ea6e4c7fbe0169caf17320820439a2f 100644 (file)
   You are forbidden to forbid anyone else to use, share and improve
   what you give them.   Help stamp out software-hoarding!  
 -------------------------------------------------------------------------*/
-#include "SDCCsymt.h"
 #ifndef SDCCVAL_H
 #define SDCCVAL_H
 
+#include "SDCCsymt.h"
+
 /* value wrapper */
 typedef struct value
   {
@@ -37,6 +38,14 @@ typedef struct value
   }
 value;
 
+typedef struct literalList
+{
+    double    literalValue;
+    unsigned  count;
+    struct literalList *next;
+} literalList;
+
+
 enum
   {
     INIT_NODE,
@@ -49,6 +58,7 @@ typedef struct initList
   {
     int type;
     int lineno;
+    char *filename;
     union
       {
        struct ast *node;
@@ -96,7 +106,7 @@ initList *copyIlist (initList *);
 double list2int (initList *);
 value *list2val (initList *);
 struct ast *list2expr (initList *);
-void resolveIvalSym (initList *);
+void resolveIvalSym (initList *, sym_link *);
 value *valFromType (sym_link *);
 value *constFloatVal (char *);
 int getNelements (sym_link *, initList *);
@@ -104,4 +114,6 @@ value *valForArray (struct ast *);
 value *valForStructElem (struct ast *, struct ast *);
 value *valForCastAggr (struct ast *, sym_link *, struct ast *, int);
 value *valForCastArr (struct ast * , sym_link *);
+bool convertIListToConstList(initList *src, literalList **lList);
+literalList *copyLiteralList(literalList *src);
 #endif