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
23 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
23 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
23 years ago
Peter Johnson
dc1c3c70f5
Get rid of all the extra filename strdup()'s. (Bug #14 ).
...
svn path=/trunk/yasm/; revision=300
23 years ago
Peter Johnson
7a6eaf8c03
Make InternalError() a bit easier to call. Also, reverse its file and line
...
parameters to match the *At() functions.
svn path=/trunk/yasm/; revision=299
23 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
23 years ago
Peter Johnson
adf5a95e89
Add option for malloc debugging using dmalloc library ( http://dmalloc.com/ ).
...
Remove unnecessary stdlib includes (because we use xmalloc instead of malloc).
svn path=/trunk/yasm/; revision=297
23 years ago
Peter Johnson
21c598f9f8
Put in temporary implementations of ErrorAt() and WarningAt().
...
svn path=/trunk/yasm/; revision=296
23 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
23 years ago
Peter Johnson
98e25fc1f6
Add some (optional through configure) additional warning flags. Add options
...
to configure to enable profiling and enable -Werror. Make changes to ensure
everything builds with all additional warnings and -Werror enabled. Most of
these changes consist of adding "const" modifiers for functions that get
constant literal strings.
svn path=/trunk/yasm/; revision=252
23 years ago
Peter Johnson
fb48401cc0
Add *Now and *At error and warning functions. *At functions still need to
...
be implemented. Consider a rename of these functions at some point?
svn path=/trunk/yasm/; revision=248
23 years ago
Peter Johnson
197f8857e4
Change error/warning framework to store a list of errors and warnings instead
...
of just one at a time. This is the groundwork for printing undefined symbol
messages, which can't be determined until after parsing has been completed
(and should be in the same line order with the other errors).
svn path=/trunk/yasm/; revision=223
23 years ago
Peter Johnson
b2890b8f9d
$Id$ -> $IdPath$.
...
svn path=/trunk/yasm/; revision=174
24 years ago
Peter Johnson
fa6e459ce5
Use abort() instead of exit() if it's available for InternalError() and
...
Fatal().
svn path=/trunk/yasm/; revision=158
24 years ago
Peter Johnson
45df22d110
Convert to using gettext instead of the ugly errwarn constant strings.
...
NOTE: gettextize now needs to be run before building.
svn path=/trunk/yasm/; revision=153
24 years ago
Peter Johnson
86f7268ea8
Add RCSID().
...
svn path=/trunk/yasm/; revision=151
24 years ago
Peter Johnson
77fc6dd491
Standardize order of include statements as well as autoconf'ing those source
...
files that weren't yet.
svn path=/trunk/yasm/; revision=150
24 years ago
Peter Johnson
edf74fe9ea
Run through GNU indent using indent profile. Manually fix some changes
...
(particularly functions such as BuildBC_Insn() which have large numbers
of arguments).
svn path=/trunk/yasm/; revision=141
24 years ago
Peter Johnson
b3a5266c00
Add "error when reading from file" error.
...
svn path=/trunk/yasm/; revision=131
24 years ago
Peter Johnson
50cd4f238f
Add global filename variable and handling for a filename passed on the
...
command line (no real command-line parsing yet).
svn path=/trunk/yasm/; revision=130
24 years ago
Peter Johnson
1fa31332b6
Add lexing, parsing, and internal format for strings and character constants.
...
Completely handle data declarations (db/dw/etc) and reserve space declarations
(resb/resw/etc).
svn path=/trunk/yasm/; revision=129
24 years ago
Peter Johnson
bb595a8f02
Formatting changes and starting to comment more heavily.
...
svn path=/trunk/yasm/; revision=128
24 years ago
Peter Johnson
fa5c9d5ea9
First attempt at supporting relative jump instructions. A few hacks, but
...
seems to work well.
A few other minor fixes/changes as well (noticed when coding).
svn path=/trunk/yasm/; revision=119
24 years ago
Peter Johnson
91bc4ab5dc
Use %1 and %2 instead of %s and %d for "duplicate definition" error message
...
(allows message to be arbitarily changed, including reversing order of %1 and
%2 without having to change every location it's called from).
svn path=/trunk/yasm/; revision=88
24 years ago
Peter Johnson
619381bdb9
Change mem (other sized memory reference) to cause operand size mismatch error
...
if a size is specified.
svn path=/trunk/yasm/; revision=87
24 years ago
Peter Johnson
82fba53e7f
Use toascii() again (now implemented in util.h if not present on system).
...
svn path=/trunk/yasm/; revision=68
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
aee5071769
isascii -> implementation. This is ANSI C, but some headers don't believe it.
...
svn path=/trunk/yasm/; revision=55
24 years ago
Michael Urman
88bb350e0c
Added appropriate header for y_strdup. (oops)
...
svn path=/trunk/yasm/; revision=54
24 years ago
Michael Urman
18e368c82e
Added error for duplicate definitions of labels.
...
Changed strdup to y_strdup (ANSI compatibility).
svn path=/trunk/yasm/; revision=53
24 years ago
Peter Johnson
26e001cc18
toascii -> &= 0x7F for ANSI C compatibility.
...
svn path=/trunk/yasm/; revision=52
24 years ago
Michael Urman
a6ef33c04c
Added handling of labels including:
...
better symbol table functions
calling them from yacc rather than lex
a new warning for .label before normal_label
locallabel_base now a symrec* instead of a strdup'd string.
Still needs some more error checking (to not allow multiple copies of
the same label, etc.)
Also includes move to y_strdup for bison.y.in (ANSI compatibility)
svn path=/trunk/yasm/; revision=51
24 years ago
Peter Johnson
c3137f3db3
Add multiple segment override/prefix warnings.
...
svn path=/trunk/yasm/; revision=42
24 years ago
Peter Johnson
7f9f858b98
Split error and warning handlers into notify and output functions.
...
Paired with changes in bison.y.in, this will make sure only one error
and/or warning is output for each line.
svn path=/trunk/yasm/; revision=35
24 years ago
Peter Johnson
a750e39454
Added warning for "value exceeds bounds".
...
svn path=/trunk/yasm/; revision=21
24 years ago
Peter Johnson
7ae09b88b7
Implemented dynamic argument types for error and warning messages.
...
svn path=/trunk/yasm/; revision=19
24 years ago
Peter Johnson
19688f76f7
Initial check-in. Still need to implement dynamic argument typing.
...
svn path=/trunk/yasm/; revision=13
24 years ago