Peter Johnson
1b6ca83117
Splint cleanups on memory allocation routines.
...
svn path=/trunk/yasm/; revision=593
23 years ago
Peter Johnson
b9541920f1
Create global macro NELEMS to replace countof macro defined just in main.c.
...
svn path=/trunk/yasm/; revision=592
23 years ago
Peter Johnson
bccc5e7ec7
When using Splint, don't try to use gettext().
...
svn path=/trunk/yasm/; revision=547
23 years ago
Peter Johnson
ba2c819e71
Move BitCount() macro from hamt.c to util.h.
...
svn path=/trunk/yasm/; revision=488
23 years ago
Peter Johnson
855891dac2
Fix build problem on Linux with toascii() define.
...
svn path=/trunk/yasm/; revision=393
24 years ago
Peter Johnson
b3cb8c0292
Move assert.h include to util.h
...
In util.h, define NDEBUG if not running lint.
svn path=/trunk/yasm/; revision=385
24 years ago
Peter Johnson
a64ee74f8f
Fix typo in HAVE_STRCMPI strncasecmp() #define.
...
svn path=/trunk/yasm/; revision=373
24 years ago
Peter Johnson
3b496cdde7
Do intl more correctly. nointl/libintl.h is unnecessary; it can be detected
...
in util.h by the ENABLE_NLS define. Fix Mkfiles to reflect. Actually enable
if available in main().
svn path=/trunk/yasm/; revision=372
24 years ago
Peter Johnson
5cd0858637
Add valparam data structure.
...
svn path=/trunk/yasm/; revision=340
24 years ago
Peter Johnson
8178f883a5
Modify so that almost everything passes LCLint with the options in lclint.sh.
...
This is actually worthwhile; I found and fixed a few bugs/edge cases while
doing this.
For more information on LCLint, see <http://lclint.cs.virginia.edu/ >.
svn path=/trunk/yasm/; revision=335
24 years ago
Peter Johnson
4df0191de8
lclint-ize gettext().
...
svn path=/trunk/yasm/; revision=331
24 years ago
Peter Johnson
21eb7c7fe2
Add some lclint annotations.
...
svn path=/trunk/yasm/; revision=329
24 years ago
Peter Johnson
a7ac50c918
Add coretype.h, make util.h do a lot more, use util.h to simplify include
...
sections of C files. Also remove IdPath from top comment in files where
RCSID() is used. Move RCSID() to immediately after util.h include.
svn path=/trunk/yasm/; revision=313
24 years ago
Peter Johnson
665eddf5d7
Conditional x* prototypes on !DMALLOC (as they're defined by dmalloc.h if
...
DMALLOC is enabled).
svn path=/trunk/yasm/; revision=311
24 years ago
Peter Johnson
6f708e3034
Add xfree() to replace calls to free().
...
This also fixes the build breakage caused by removing stdlib includes.
svn path=/trunk/yasm/; revision=298
24 years ago
Peter Johnson
0a98a74163
Add mergesort() replacement from BSD sources.
...
svn path=/trunk/yasm/; revision=292
24 years ago
Peter Johnson
cdcf358af1
RCSID() breaks under DJGPP because of "__unused". Removing __unused shouldn't
...
cause any problems, really, so just removed it.
svn path=/trunk/yasm/; revision=291
24 years ago
Peter Johnson
193392dcb6
Fix LOTS of little nits. Primary changes:
...
- New intnum module to replace using just unsigned long (for >32 bit values).
Read values using BitVector instead of strtoul().
- Brought both floatnum and intnum into expr (still need to integrate calc for
floatnum).
- Add traversal function to ternary tree (for use by symrec_foreach).
- Change floatnum output interface from single/double/extended to byte size.
- Try to make floatnum/intnum interfaces very similar. Still needs work.
- Add/fix *_print functions, including interating ones for sections/bytecodes.
- Fix handling of $ and $$. Both now are properly parsed and bytecode'd.
- Print out all sections and symbol table in main() in preparation for work
on "cleanup" functionality between parser and optimizer stages (really part
of the parser stage).
svn path=/trunk/yasm/; revision=270
24 years ago
Peter Johnson
b13f4e4f87
malloc->xmalloc, strdup->xstrdup, and calloc->xcalloc. The x* family performs
...
error checking. Remove check for strdup() from configure, as we don't need it.
svn path=/trunk/yasm/; revision=253
24 years ago
Peter Johnson
df62b73779
Add check and BSD replacement for strsep(3).
...
svn path=/trunk/yasm/; revision=218
24 years ago
Peter Johnson
f173e9e042
Include stddef.h for size_t.
...
svn path=/trunk/yasm/; revision=206
24 years ago
Peter Johnson
91f41e241b
Try to fix configure and automake files so everything builds a bit cleaner.
...
Also try to fix the warnings on the GNU C Library.
Still a lot of work and testing to be done here, but making progress.
svn path=/trunk/yasm/; revision=204
24 years ago
Peter Johnson
1284d8d8af
Pull in GCC and ELF alternatives for RCSID() if available.
...
Idea from: sys/cdefs.h on FreeBSD.
svn path=/trunk/yasm/; revision=197
24 years ago
Michael Urman
caba67b7d6
Fixed two ansi C errors (empty file and extra semicolon)
...
svn path=/trunk/yasm/; revision=183
24 years ago
Peter Johnson
b2890b8f9d
$Id$ -> $IdPath$.
...
svn path=/trunk/yasm/; revision=174
24 years ago
Peter Johnson
303bc90f72
Add prototypes for strcasecmp and strncasecmp if we use our own implementation.
...
svn path=/trunk/yasm/; revision=160
24 years ago
Peter Johnson
c09f4addc8
Check for case-insensitive string comparisons. Use strcasecmp and strncasecmp
...
in the source: if stricmp or strcmpi is available, they're mapped to
strcasecmp.
svn path=/trunk/yasm/; revision=159
24 years ago
Peter Johnson
bcd6236091
Add RCSID() function.
...
Indent some of the preprocessor directives a bit nicer.
svn path=/trunk/yasm/; revision=149
24 years ago
Peter Johnson
28940100d4
Add <sys/queue.h> to util.h and pull in compatible, portable version from
...
OpenSSH-portable.
svn path=/trunk/yasm/; revision=143
24 years ago
Peter Johnson
bfd5122925
Add toascii() implementation.
...
svn path=/trunk/yasm/; revision=67
24 years ago
Peter Johnson
616bd61994
Use ANSI C compliant #ifndef wrappers (_A_H_ -> YASM_A_H).
...
svn path=/trunk/yasm/; revision=64
24 years ago
Peter Johnson
6b93227482
Use autoconf to determine when to include our implementation of strdup, so
...
remove util.c and create strdup.c. Make util.h, strdup.c, and several source
files use config.h defines.
svn path=/trunk/yasm/; revision=61
24 years ago
Peter Johnson
2141d4f43d
Initial check-in of utility functions.
...
svn path=/trunk/yasm/; revision=49
24 years ago
Peter Johnson
d3a51f5835
Initial check-in.
...
svn path=/trunk/yasm/; revision=7
24 years ago