Browse Source

some more fixes. Still some errors are left.

master
Georg Hopp 19 years ago
parent
commit
aa8b856aeb
  1. 1
      include/block.h
  2. 12
      src/block.c
  3. 4
      src/statement.c
  4. 2
      src/stmtQueue.c

1
include/block.h

@ -15,4 +15,5 @@ s_block * blockPrev (s_block *);
s_stmtQueue * blockStmts (s_block *);
s_identList * blockIdl (s_block *);
s_identList * blockGetIdl (s_block *);
#endif /* _BLOCK_H_ */

12
src/block.c

@ -1,8 +1,8 @@
#include <malloc.h>
#include <identList.h>
#include <stmtQueue.h>
typedef struct block s_block;
struct block /* a stack of used blocks. */
{
s_stmtQueue * stmts;
@ -12,6 +12,11 @@ struct block /* a stack of used blocks. */
};
s_identList *
blockGetIdl (s_block * block)
{
return block->idl;
}
s_block *
blockNew (s_stmtQueue * stmts)
{
@ -19,7 +24,8 @@ blockNew (s_stmtQueue * stmts)
new->stmts = stmts;
new->prev = NULL;
new->idl = identListNew (new);
new->idl = identListNew (); /* !!!FIXME: i guess idl should know about
its block! (Give the block as arg) */
return new;
}

4
src/statement.c

@ -284,7 +284,7 @@ stmtBlock (s_stmt * stmt, s_block * actBlock)
if (id == NULL)
exitError (0);
blockSetNonLocalId (args, id);
blockSetNonLocalId (gBlock, id);
}
}
@ -309,7 +309,7 @@ stmtIf (s_stmt * stmt, s_block * actBlock)
_do = stmtQueueGet (args, 2);
if (_do != NULL)
stmtDo (_do);
stmtDo (_do, actBlock);
return (u_stmtType) 0;
}

2
src/stmtQueue.c

@ -116,7 +116,7 @@ stmtQueueDo (s_stmtQueue * sQueue)
return;
for (i = 0; i < sQueue->maxIdx; i++)
stmtDo (sQueue->stmts[i]);
stmtDo (sQueue->stmts[i], NULL /* !!!FIXME: give me a sane value!!! */);
}
unsigned

Loading…
Cancel
Save