* src/pic16/devices.inc,
[fw/sdcc] / src / SDCCglobl.h
index b60bc26d2c086a37cfe411fcf1bb7f670a2257ff..11761f6de805ba140a4964afc652777b0d5ea9c0 100644 (file)
 
 #define UNIX_DIR_SEPARATOR_CHAR    '/'
 
-#ifdef _WIN32       /* WIN32 native */
-
-#  define NATIVE_WIN32          1
-#  ifdef __MINGW32__  /* GCC MINGW32 depends on configure */
-#    include "sdccconf.h"
-#  else
-#    include "sdcc_vc.h"
-#    define PATH_MAX  _MAX_PATH
-#  endif
-
-#else               /* Assume Un*x style system */
-#  include "sdccconf.h"
+#ifdef WIN32
+# define NATIVE_WIN32          1
+# ifndef __MINGW32__
+#   define  PATH_MAX  _MAX_PATH
+# endif
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#elif defined(_WIN32) && !defined(__MINGW32__)
+# include "sdcc_vc.h"
+#else
+# include "sdccconf.h"
 #endif
 
 #include "SDCCerr.h"
@@ -146,18 +147,18 @@ typedef int bool;
  */
 struct optimize
   {
-    unsigned global_cse;
-    unsigned ptrArithmetic;
-    unsigned label1;
-    unsigned label2;
-    unsigned label3;
-    unsigned label4;
-    unsigned loopInvariant;
-    unsigned loopInduction;
-    unsigned noJTabBoundary;
-    unsigned noLoopReverse;
-    unsigned codeSpeed;
-    unsigned codeSize;
+    int global_cse;
+    int ptrArithmetic;
+    int label1;
+    int label2;
+    int label3;
+    int label4;
+    int loopInvariant;
+    int loopInduction;
+    int noJTabBoundary;
+    int noLoopReverse;
+    int codeSpeed;
+    int codeSize;
   };
 
 /** Build model.
@@ -171,7 +172,8 @@ enum
     MODEL_MEDIUM = 4,
     MODEL_LARGE = 8,
     MODEL_FLAT24 = 16,
-    MODEL_PAGE0 = 32 /* for the xa51 port */
+    MODEL_PAGE0 = 32, /* for the xa51 port */
+    MODEL_HUGE = 64 /* for banked support */
   };
 
 /* overlay segment name and the functions
@@ -250,7 +252,12 @@ struct options
     int printSearchDirs;        /* display the directories in the compiler's search path */
     int vc_err_style;           /* errors and warnings are compatible with Micro$oft visual studio */
     int use_stdout;             /* send errors to stdout instead of stderr */
-    int no_std_crt0;            /*For the z80/gbz80 do not link default crt0.o*/
+    int no_std_crt0;            /* for the z80/gbz80 do not link default crt0.o*/
+    int std_c99;                /* enable C99 keywords/constructs */
+    int std_sdcc;               /* enable SDCC extensions to C */
+    int dollars_in_ident;       /* zero means dollar signs are punctuation */
+    const char *code_seg;       /* segment name to use instead of CSEG */
+    const char *const_seg;      /* segment name to use instead of CONST */
     /* sets */
     set *calleeSavesSet;        /* list of functions using callee save */
     set *excludeRegsSet;        /* registers excluded from saving */
@@ -258,7 +265,7 @@ struct options
   };
 
 /* forward definition for variables accessed globally */
-extern int noAssemble;         /* no assembly, stop after code generation */
+extern int noAssemble;          /* no assembly, stop after code generation */
 extern char *yytext;
 extern char *currFname;
 extern char *fullSrcFileName;   /* full name for the source file; */
@@ -271,8 +278,6 @@ extern char *dstPath;           /* path for the output files; */
 extern char *moduleName;        /* module name is source file without path and extension */
                                 /* can be NULL while linking without compiling */
 extern int seqPointNo;          /* current sequence point */
-extern int currLineno;          /* current line number    */
-extern int mylineno;            /* line number of the current file SDCC.lex */
 extern FILE *yyin;              /* */
 extern FILE *asmFile;           /* assembly output file */
 extern FILE *cdbFile;           /* debugger symbol file */
@@ -283,6 +288,7 @@ extern int reentrant;           /* /X flag has been sent     SDCC.y */
 extern char buffer[PATH_MAX * 2];/* general buffer           SDCCmain.c   */
 extern int currRegBank;         /* register bank being used  SDCCgens.c   */
 extern int RegBankUsed[4];      /* JCF: register banks used  SDCCmain.c   */
+extern int BitBankUsed;         /* MB: overlayable bit bank  SDCCmain.c   */
 extern struct symbol *currFunc; /* current function    SDCCgens.c */
 extern int cNestLevel;          /* block nest level  SDCCval.c      */
 extern int currBlockno;         /* sequentail block number */
@@ -298,19 +304,7 @@ extern set *libFilesSet;
 extern set *libPathsSet;
 extern set *libDirsSet;         /* list of lib search directories */
 
-void setParseWithComma (set **, char *);
-
-/** Creates a temporary file a'la tmpfile which avoids the bugs
-    in cygwin wrt c:\tmp.
-    Scans, in order: TMP, TEMP, TMPDIR, else uses tmpfile().
-*/
-FILE *tempfile (void);
-
-/** Creates a temporary file name a'la tmpnam which avoids the bugs
-    in cygwin wrt c:\tmp.
-    Scans, in order: TMP, TEMP, TMPDIR, else uses tmpfile().
-*/
-char *tempfilename (void);
+void setParseWithComma (set **, const char *);
 
 /** An assert() macro that will go out through sdcc's error
     system.