/* */
/* */
/* */
-/* (C) 2005 Ullrich von Bassewitz */
-/* Römerstrasse 52 */
+/* (C) 2005-2008 Ullrich von Bassewitz */
+/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* da65 */
#include "asminc.h"
-#include "attrtab.h"
+#include "comments.h"
#include "error.h"
+#include "labels.h"
/*****************************************************************************/
-/* Code */
+/* Code */
/*****************************************************************************/
char* L;
const char* Comment;
unsigned Line;
- unsigned Len;
+ unsigned Len;
long Val;
unsigned DVal;
int Sign;
++L;
}
- /* Remove trailing whitespace */
- Len = strlen (L);
- while (Len > 0 && IsSpace (L[Len-1])) {
- --Len;
- }
- L[Len] = '\0';
+ /* Remove trailing whitespace */
+ Len = strlen (L);
+ while (Len > 0 && IsSpace (L[Len-1])) {
+ --Len;
+ }
+ L[Len] = '\0';
/* If the line is empty or starts with a comment char, ignore it */
if (*L == '\0' || *L == CommentStart) {
} else if (*L == ':' && *++L == '=') {
++L;
} else {
- if (!IgnoreUnknown) {
- Error ("%s(%u): Missing `='", Filename, Line);
- }
- continue;
- }
+ if (!IgnoreUnknown) {
+ Error ("%s(%u): Missing `='", Filename, Line);
+ }
+ continue;
+ }
/* Allow white space once again */
L = SkipWhitespace (L);
/* Apply the sign */
Val *= Sign;
- /* Define the symbol */
- AddExtLabel (Val, SB_GetConstBuf (&Ident), Comment);
+ /* Define the symbol and the comment */
+ AddExtLabel (Val, SB_GetConstBuf (&Ident));
+ SetComment (Val, Comment);
}
/* Delete the string buffer contents */
- DoneStrBuf (&Ident);
+ SB_Done (&Ident);
/* Close the include file ignoring errors (we were just reading). */
(void) fclose (F);
}
-
-
-