mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
limits: revamp the limit processor, change params limit to dynamic
Revamp the limit processor to allow a limit to have an absolute maximum other than LIMIT_MAX_VAL. Use LIMIT_MAX as a final enum parameter == parameter count == final actual value + 1, which is the more usual construct and doesn't need manual updating. Allow setting a limit to the default value by setting it to "0" or "default". Accept "max" or "maximum" instead of "unlimited", specifically to better handle the case of a fixed maximum < LIMIT_MAX_VAL. Change the mmacro limit parameter to a dynamic limit, in case someone needs it. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
parent
e856c2e1dd
commit
a8d44ce956
3 changed files with 119 additions and 55 deletions
|
|
@ -959,11 +959,13 @@ enum nasm_limit {
|
|||
LIMIT_MMACROS,
|
||||
LIMIT_REP,
|
||||
LIMIT_EVAL,
|
||||
LIMIT_LINES
|
||||
LIMIT_LINES,
|
||||
LIMIT_PARAMS,
|
||||
LIMIT_MAX /* Must be at end */
|
||||
};
|
||||
#define LIMIT_MAX LIMIT_LINES
|
||||
extern int64_t nasm_limit[LIMIT_MAX+1];
|
||||
extern enum directive_result nasm_set_limit(const char *, const char *);
|
||||
|
||||
extern int64_t nasm_limit[LIMIT_MAX];
|
||||
extern enum directive_result nasm_set_limit(const char *, const char *);
|
||||
|
||||
/*
|
||||
* The data structure defining an output format driver, and the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue