/* */
/* */
/* */
-/* (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 */
/* */
/* */
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);
* 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 */
* 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);