0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-07-24 10:25:42 -04:00

4 Commits

Author SHA1 Message Date
H. Peter Anvin (Intel)
a227b43b8a nasmlib: add nasm_strappend()
nasm_strappend() is similar to nasm_strcat() for the case where the
first string isn't useful and should be freed.  Furthermore, one or
both of the arguments are allowed to be NULL.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2018-06-25 22:13:42 -07:00
H. Peter Anvin
740ec3572b malloc: simplify nasm_malloc code, add nasm_strcatn()
Simplify the nasm_malloc() code by moving the pointer check into a
common subroutine.

We can now issue a filename error even for failures like malloc().

Add support for the gcc sentinel attribute (verify that a list ends
with NULL).

Add a handful of safe_alloc attributes.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2018-05-30 11:40:42 -07:00
H. Peter Anvin
b20bc733c9 asm/*: Move directive processing to its own file, refactor error handling
Move directive processing to its own file, and move nasmlib/error.c to
asm/error.c (it was not used by the disassembler); remove some extern
declarations from .c files, and do some general code cleanups.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-03-07 19:31:04 -08:00
H. Peter Anvin
22538e2b67 nasmlib: break up nasmlib.c into logical components
nasmlib.c had basically turned into a garbage bin of various functions
with very little in common.  Break it up into logical components for
isolation and manageability.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2016-05-25 05:43:49 -07:00