newer version, safety commit

This commit is contained in:
ceriel
1986-03-26 17:53:13 +00:00
parent e8505e4434
commit 4a91a6bf4b
13 changed files with 163 additions and 27 deletions

View File

@@ -5,6 +5,7 @@ static char *RcsId = "$Header$";
#include <assert.h>
#include <alloc.h>
#include "scope.h"
#include "debug.h"
static int maxscope; /* maximum assigned scope number */
@@ -27,6 +28,7 @@ open_scope(scopetype, scopenr)
sc->sc_scope = scopenr == 0 ? ++maxscope : scopenr;
assert(scopetype == OPENSCOPE || scopetype == CLOSEDSCOPE);
DO_DEBUG(debug(1, "Opening a %s scope", scopetype == OPENSCOPE ? "open" : "closed"));
sc1 = CurrentScope;
if (scopetype == CLOSEDSCOPE) {
sc1 = new_scope();
@@ -42,6 +44,7 @@ close_scope()
register struct scope *sc = CurrentScope;
assert(sc != 0);
DO_DEBUG(debug(1, "Closing a scope"));
if (sc->next && (sc->next->sc_scope == 0)) {
struct scope *sc1 = sc;