]> git.sur5r.net Git - cc65/blobdiff - src/ca65/condasm.c
Renamed some stuff. Write out the segment size as var, not 32 bit.
[cc65] / src / ca65 / condasm.c
index fc0e0ba773e0038a3850eaa1e953c47a787abbd8..a14bbc2f6b0e3fb12a5d68bf719ee6c2c45246a4 100644 (file)
@@ -175,7 +175,7 @@ static IfDesc* AllocIf (const char* Directive, int NeedTerm)
         ID->Flags |= ifParentCond;
     }
     ID->LineInfos = EmptyCollection;
-    GetFullLineInfo (&ID->LineInfos, 0);
+    GetFullLineInfo (&ID->LineInfos);
     ID->Name = Directive;
 
     /* One more slot allocated */
@@ -198,6 +198,7 @@ static void FreeIf (void)
            Done = 1;
                } else {
                    Done = (ID->Flags & ifNeedTerm) != 0;
+            ReleaseFullLineInfo (&ID->LineInfos);
             DoneCollection (&ID->LineInfos);
             --IfCount;
                }
@@ -229,7 +230,8 @@ void DoConditionals (void)
 
                 /* Remember the data for the .ELSE */
                 if (D) {
-                    GetFullLineInfo (&D->LineInfos, 0);
+                    ReleaseFullLineInfo (&D->LineInfos);
+                    GetFullLineInfo (&D->LineInfos);
                     D->Name = ".ELSE";
                 }
 
@@ -487,7 +489,7 @@ void CheckOpenIfs (void)
        }
 
         LI = CollConstAt (&D->LineInfos, 0);
-       if (LI->Pos.Name != CurTok.Pos.Name) {
+               if (GetSourcePos (LI)->Name != CurTok.Pos.Name) {
            /* The .if is from another file, bail out */
            break;
        }