]> git.sur5r.net Git - cc65/blobdiff - src/cc65/codeseg.h
Renamed ExprDesc.Val to ExprDesc.IVal. Added an FVal field for a floating
[cc65] / src / cc65 / codeseg.h
index 3ddf24ada5ffd0396edd0169c888a3d4b942a108..cde8c4ff1c4fc53550dfd003805c7ea94e3e7903 100644 (file)
@@ -6,9 +6,9 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2001-2002 Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
+/* (C) 2001-2004 Ullrich von Bassewitz                                       */
+/*               Römerstrasse 52                                             */
+/*               D-70794 Filderstadt                                         */
 /* EMail:        uz@cc65.org                                                 */
 /*                                                                           */
 /*                                                                           */
@@ -161,7 +161,7 @@ INLINE struct CodeEntry* CS_GetEntry (CodeSeg* S, unsigned Index)
     return CollAt (&S->Entries, Index);
 }
 #else
-#  define CS_GetEntry(S, Index)        CollAt(&(S)->Entries, (Index))
+#  define CS_GetEntry(S, Index)        ((struct CodeEntry*) CollAt(&(S)->Entries, (Index)))
 #endif
 
 struct CodeEntry* CS_GetPrevEntry (CodeSeg* S, unsigned Index);
@@ -189,6 +189,18 @@ int CS_RangeHasLabel (CodeSeg* S, unsigned Start, unsigned Count);
  * possible span instead.
  */
 
+#if defined(HAVE_INLINE)
+INLINE int CS_HavePendingLabel (const CodeSeg* S)
+/* Return true if there are open labels that will get attached to the next
+ * instruction that is added.
+ */
+{
+    return (CollCount (&S->Labels) > 0);
+}
+#else
+#  define CS_HavePendingLabel(S)        (CollCount (&(S)->Labels) > 0)
+#endif
+
 CodeLabel* CS_AddLabel (CodeSeg* S, const char* Name);
 /* Add a code label for the next instruction to follow */
 
@@ -263,7 +275,7 @@ void CS_OutputEpilogue (const CodeSeg* S, FILE* F);
  * assembler epilogue into the file. That is: Close the local function scope.
  */
 
-void CS_Output (const CodeSeg* S, FILE* F);
+void CS_Output (CodeSeg* S, FILE* F);
 /* Output the code segment data to a file */
 
 void CS_FreeRegInfo (CodeSeg* S);