Commit aa8b856aeb3e2aafd61486349fbb4f40899e682f

Authored by Georg Hopp
1 parent 5d97b206

some more fixes. Still some errors are left.

... ... @@ -15,4 +15,5 @@ s_block * blockPrev (s_block *);
15 15 s_stmtQueue * blockStmts (s_block *);
16 16 s_identList * blockIdl (s_block *);
17 17
  18 +s_identList * blockGetIdl (s_block *);
18 19 #endif /* _BLOCK_H_ */
... ...
  1 +#include <malloc.h>
  2 +
1 3 #include <identList.h>
2 4 #include <stmtQueue.h>
3 5
4   -typedef struct block s_block;
5   -
6 6 struct block /* a stack of used blocks. */
7 7 {
8 8 s_stmtQueue * stmts;
... ... @@ -12,6 +12,11 @@ struct block /* a stack of used blocks. */
12 12 };
13 13
14 14
  15 +s_identList *
  16 +blockGetIdl (s_block * block)
  17 +{
  18 + return block->idl;
  19 +}
15 20 s_block *
16 21 blockNew (s_stmtQueue * stmts)
17 22 {
... ... @@ -19,7 +24,8 @@ blockNew (s_stmtQueue * stmts)
19 24
20 25 new->stmts = stmts;
21 26 new->prev = NULL;
22   - new->idl = identListNew (new);
  27 + new->idl = identListNew (); /* !!!FIXME: i guess idl should know about
  28 + its block! (Give the block as arg) */
23 29
24 30 return new;
25 31 }
... ...
... ... @@ -284,7 +284,7 @@ stmtBlock (s_stmt * stmt, s_block * actBlock)
284 284 if (id == NULL)
285 285 exitError (0);
286 286
287   - blockSetNonLocalId (args, id);
  287 + blockSetNonLocalId (gBlock, id);
288 288 }
289 289 }
290 290
... ... @@ -309,7 +309,7 @@ stmtIf (s_stmt * stmt, s_block * actBlock)
309 309 _do = stmtQueueGet (args, 2);
310 310
311 311 if (_do != NULL)
312   - stmtDo (_do);
  312 + stmtDo (_do, actBlock);
313 313
314 314 return (u_stmtType) 0;
315 315 }
... ...
... ... @@ -116,7 +116,7 @@ stmtQueueDo (s_stmtQueue * sQueue)
116 116 return;
117 117
118 118 for (i = 0; i < sQueue->maxIdx; i++)
119   - stmtDo (sQueue->stmts[i]);
  119 + stmtDo (sQueue->stmts[i], NULL /* !!!FIXME: give me a sane value!!! */);
120 120 }
121 121
122 122 unsigned
... ...
Please register or login to post a comment