]> git.sur5r.net Git - cc65/blobdiff - src/cc65/compile.c
When using GetQualifier, pass correct params :-)
[cc65] / src / cc65 / compile.c
index c51191885b665e8bc14b3eebad2bfc487f16b1de..6429e09f7eeab8da46e28c01acd4f965ed6c86af 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000-2009 Ullrich von Bassewitz                                       */
-/*               Roemerstrasse 52                                            */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 2000-2009, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -141,8 +141,8 @@ static void Parse (void)
              * specified as static. This means that "extern int i" will not
              * get storage allocated.
              */
-           if ((Decl.StorageClass & SC_FUNC) == 0      &&
-                (Decl.StorageClass & SC_TYPEDEF) == 0   &&
+           if ((Decl.StorageClass & SC_FUNC) != SC_FUNC          &&
+                (Decl.StorageClass & SC_TYPEDEF) != SC_TYPEDEF    &&
                 ((Spec.Flags & DS_DEF_STORAGE) != 0  ||
                  (Decl.StorageClass & (SC_STATIC | SC_EXTERN)) == SC_STATIC)) {
 
@@ -300,7 +300,7 @@ void Compile (const char* FileName)
     };
 
     /* Add macros that are always defined */
-    DefineNumericMacro ("__CC65__", VERSION);
+    DefineNumericMacro ("__CC65__", GetVersionAsNumber ());
 
     /* Language standard that is supported */
     DefineNumericMacro ("__CC65_STD_C89__", STD_C89);
@@ -356,7 +356,7 @@ void Compile (const char* FileName)
         /* Preprocess each line and write it to the output file */
         while (NextLine ()) {
             Preprocess ();
-            WriteOutput ("%.*s\n", SB_GetLen (Line), SB_GetConstBuf (Line));
+            WriteOutput ("%.*s\n", (int) SB_GetLen (Line), SB_GetConstBuf (Line));
         }
 
         /* Close the output file */