summaryrefslogtreecommitdiff
path: root/labels.c
diff options
context:
space:
mode:
authorCharles Crayne <chuck@thor.crayne.org>2008-03-12 22:39:03 -0700
committerCharles Crayne <chuck@thor.crayne.org>2008-03-12 22:39:03 -0700
commitd60059ef41829dc9c26241541f9889e9ef7f212d (patch)
tree59b47a11b050be3fe534440ce74ec9c08f4ddb2f /labels.c
parentaed5cfea58eaa66417e21fdbe49e891ced374ed9 (diff)
downloadnasm-d60059ef41829dc9c26241541f9889e9ef7f212d.tar.gz
Display fully qualified local label in "not defined" message
Add new function "local_scope" to label subsystem to return the previous non-local label for a given local label, and invoke this funcion in eval.c to display the fully qualified name in the "not defined" error message.
Diffstat (limited to 'labels.c')
-rw-r--r--labels.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/labels.c b/labels.c
index e5412e04..4057d998 100644
--- a/labels.c
+++ b/labels.c
@@ -443,6 +443,11 @@ static char *perm_copy(const char *string)
return p;
}
+char *local_scope(char *label)
+{
+ return islocal(label) ? prevlabel : "";
+}
+
/*
* Notes regarding bug involving redefinition of external segments.
*