/* */
/* */
/* */
-/* (C) 1998-2004 Ullrich von Bassewitz */
-/* Römerstrasse 52 */
+/* (C) 1998-2008 Ullrich von Bassewitz */
+/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
+int TokIsFuncSpec (const Token* T)
+/* Return true if the token is a function specifier */
+{
+ return (T->Tok == TOK_INLINE) || (T->Tok == TOK_FASTCALL) ||
+ (T->Tok == TOK_NEAR) || (T->Tok == TOK_FAR);
+}
+
+
+
void SymName (char* S)
/* Read a symbol from the input stream. The first character must have been
* checked before calling this function. The buffer is expected to be at
{
unsigned Base; /* Temporary number base */
unsigned Prefix; /* Base according to prefix */
- StrBuf S;
+ StrBuf S = STATIC_STRBUF_INITIALIZER;
int IsFloat;
char C;
unsigned DigitVal;
* before converting it, so we can determine if it's a float or an
* integer.
*/
- InitStrBuf (&S);
while (IsXDigit (CurC) && HexVal (CurC) < Base) {
SB_AppendChar (&S, CurC);
NextChar ();
}
/* We don't need the string buffer any longer */
- DoneStrBuf (&S);
+ SB_Done (&S);
/* Distinguish between integer and floating point constants */
if (!IsFloat) {
if (CurC == '-') {
Sign = -1;
NextChar ();
+ } else if (CurC == '+') {
+ NextChar ();
}
/* Read exponent digits. Since we support only 32 bit floats