summaryrefslogtreecommitdiff
path: root/labels.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-10-11 00:05:31 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-10-11 00:05:57 -0700
commit70055964fc24699c07c515dd9a603196ba06a654 (patch)
tree10deb40fda3517be5d7b21b191429bcfd220d15a /labels.h
parent54901e1785dcc7e8aec3198f58f580165856672f (diff)
downloadnasm-70055964fc24699c07c515dd9a603196ba06a654.tar.gz
nasm-70055964fc24699c07c515dd9a603196ba06a654.tar.bz2
nasm-70055964fc24699c07c515dd9a603196ba06a654.zip
Additional uses of bool and enum
Proper use of bool and enum makes code easier to debug. Do more of it. In particular, we really should stomp out any residual uses of magic constants that aren't enums or, in some cases, even #defines.
Diffstat (limited to 'labels.h')
-rw-r--r--labels.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/labels.h b/labels.h
index 91232dd..327fb0f 100644
--- a/labels.h
+++ b/labels.h
@@ -6,19 +6,24 @@
* distributed in the NASM archive.
*/
+#ifndef LABELS_H
+#define LABELS_H
+
extern char lprefix[PREFIX_MAX];
extern char lpostfix[PREFIX_MAX];
-int lookup_label(char *label, int32_t *segment, int32_t *offset);
-int is_extern(char *label);
+bool lookup_label(char *label, int32_t *segment, int32_t *offset);
+bool is_extern(char *label);
void define_label(char *label, int32_t segment, int32_t offset, char *special,
- int is_norm, int isextrn, struct ofmt *ofmt,
+ bool is_norm, bool isextrn, struct ofmt *ofmt,
efunc error);
void redefine_label(char *label, int32_t segment, int32_t offset, char *special,
- int is_norm, int isextrn, struct ofmt *ofmt,
+ bool is_norm, bool isextrn, struct ofmt *ofmt,
efunc error);
void define_common(char *label, int32_t segment, int32_t size, char *special,
struct ofmt *ofmt, efunc error);
void declare_as_global(char *label, char *special, efunc error);
int init_labels(void);
void cleanup_labels(void);
+
+#endif /* LABELS_H */