/* Define a symbol with a fixed numeric value in the current scope */
{
ExprNode* Expr;
+ SymEntry* Sym;
/* Convert the name to a string buffer */
StrBuf SymBuf = STATIC_STRBUF_INITIALIZER;
SB_CopyStr (&SymBuf, SymName);
/* Search for the symbol, allocate a new one if it doesn't exist */
- SymEntry* Sym = SymFind (CurrentScope, &SymBuf, SYM_ALLOC_NEW);
+ Sym = SymFind (CurrentScope, &SymBuf, SYM_ALLOC_NEW);
/* Check if have already a symbol with this name */
if (SymIsDef (Sym)) {
InvDef (Def);
}
P = Def;
-
+
/* Copy the symbol, checking the rest */
I = 0;
while (IsIdChar (*P)) {
/* Name must follow */
if (Tok != TOK_STRCON) {
ErrorSkip ("String constant expected");
- } else {
+ } else {
SB_Terminate (&SVal);
NewInputFile (SB_GetConstBuf (&SVal));
}
if (Tok != TOK_STRCON) {
ErrorSkip ("String constant expected");
} else {
+ cpu_t CPU;
+
/* Try to find the CPU */
SB_Terminate (&SVal);
- cpu_t CPU = FindCPU (SB_GetConstBuf (&SVal));
+ CPU = FindCPU (SB_GetConstBuf (&SVal));
/* Switch to the new CPU */
SetCPU (CPU);
* return TOK_NONE if not found.
*/
{
- struct DotKeyword K = { SB_GetConstBuf (&SVal), 0 };
+ struct DotKeyword K;
struct DotKeyword* R;
+ /* Initialize K */
+ K.Key = SB_GetConstBuf (&SVal);
+ K.Tok = 0;
+
/* If we aren't in ignore case mode, we have to uppercase the keyword */
if (!IgnoreCase) {
UpcaseSVal ();
* by the caller for error messages or similar.
*/
{
+ SymTable* Scope;
+
/* Clear both passed string buffers */
SB_Clear (Name);
SB_Clear (FullName);
/* Get the starting table */
- SymTable* Scope;
if (Tok == TOK_NAMESPACE) {
/* Start from the root scope */
return GetStrBuf (S->Name);
}
#else
-# define GetSymName(S) GetString ((S)->Name)
+# define GetSymName(S) GetStrBuf ((S)->Name)
#endif
#if defined(HAVE_INLINE)
+