aboutsummaryrefslogtreecommitdiff
path: root/util.h
AgeCommit message (Collapse)Author
2011-08-19Remove $Id$ and RCSID() usage.Peter Johnson
These are useless now that we're using git.
2010-01-13gas-preproc.c: Use sprintf instead of snprintf.Peter Johnson
It's impossible for a decimal long string to be longer than 64 chars. Also remove workaround for MSVC added in r2267. svn path=/trunk/yasm/; revision=2273
2010-01-051. Add gas preprocessor build on WindowsBrian Gladman
2. Add snprintf -> _snprintf define for VC++ build svn path=/trunk/yasm/; revision=2267
2008-05-23Enable DLL/plugin builds with cmake on Windows.Peter Johnson
Add proper declspec dllimport/dllexport to all libyasm functions. Use macros to make these do nothing on non-cmake and Unix builds. svn path=/trunk/yasm/; revision=2101
2008-05-22Make util.h more robust against use without config.h by moving thePeter Johnson
toascii redefinition to the only file that uses it, errwarn.c. svn path=/trunk/yasm/; revision=2097
2007-07-13Clean up a number of obsolete autoconf-detected standard C things.Peter Johnson
svn path=/trunk/yasm/; revision=1892
2007-04-22Update all copyright dates.Peter Johnson
svn path=/trunk/yasm/; revision=1827
2007-04-22Bite the bullet and convert tabs to spaces. Previously yasm's source hasPeter Johnson
been using a mix of tabs and 4 spaces to indent; this looks horrible if tab size is ever not 8. While I debated converting to tab-only indentation that would have been a far higher impact to the source. svn path=/trunk/yasm/; revision=1825
2007-02-24Move libyasm-stdint.h include out of util.h, as util.h is included fromPeter Johnson
build platform files. While here, fix a few warnings by pushing uintptr_t to a few more register usages. Noticed by: rugxulo@gmail.com svn path=/trunk/yasm/; revision=1786
2007-02-18Fix build (hopefully) on Win64 by using uintptr_t more widely; Win64 is aPeter Johnson
LLP64 platform so it's unsafe to cast pointers to unsigned long. Reported by: Chris Tophe <cohika@gmail.com> svn path=/trunk/yasm/; revision=1774
2007-02-15Try to cut down on DJGPP build warnings.Peter Johnson
svn path=/trunk/yasm/; revision=1769
2006-11-11Make life a little easier by adding an is_exp2() macro.Peter Johnson
svn path=/trunk/yasm/; revision=1682
2006-10-08util.h: Use same workarounds for mingw32 as for the GNU C library.Peter Johnson
svn path=/trunk/yasm/; revision=1645
2006-01-11Build cleanups (mostly for warnings) for VC8.Peter Johnson
* Mkfiles/vc8/config.h: Define _CRT_SECURE_NO_DEPRECATE to avoid most warnings about *_s functions. Also use _stricmp directly instead of stricmp to avoid warnings. * libyasm/strcasecmp.c: Support _stricmp usage. * util.h: Likewise. * tools/re2c/actions.c: Include ctype.h to define toupper/tolower. * Mkfiles/vc8/modules/modules.vcproj: Don't include nasm-macros.c directly; this file is included into another file and has no public variables. * Mkfiles/vc8/yasm.sln: Allow x64 cross-builds from Win32 by building genmacro, genmodule, and re2c for Win32 target. svn path=/trunk/yasm/; revision=1328
2004-09-25* util.h (BitCount): Change bit-counting algorithm; the old one miscountedPeter Johnson
4096 (0x1000) as having 257 bits; almost certainly other values were broken as well. svn path=/trunk/yasm/; revision=1148
2004-09-04* On most files: re-enable $IdPath$ as $Id$, and enable Id keyword expansion.Peter Johnson
svn path=/trunk/yasm/; revision=1137
2003-07-12Avoid warnings in strsep due to glibc's bits/string2.h string inlining byPeter Johnson
defining __NO_STRING_INLINES in strsep.c. Due to string.h inclusion in util.h, extra level of indirection is needed (NO_STRING_INLINES->__NO_STRING_INLINES). svn path=/trunk/yasm/; revision=1004
2003-06-07Simplify RCSID() definition.Peter Johnson
svn path=/trunk/yasm/; revision=971
2003-06-04Be a bit friendlier to those compiling without HAVE_CONFIG_H by alwaysPeter Johnson
including the "standard C" headers. svn path=/trunk/yasm/; revision=965
2003-06-04Only include config.h if HAVE_CONFIG_H is defined.Peter Johnson
svn path=/trunk/yasm/; revision=964
2003-05-10Pre-include libyasm/coretype.h to avoid #defining functions such asPeter Johnson
yasm__strsep() (here) before their prototypes are declared (in coretype.h). Header protections keep coretype.h from being included again (from libyasm.h). svn path=/trunk/yasm/; revision=948
2003-05-05Clean up and simplify libyasm.h options and symbol visibility:Peter Johnson
- Move config.h and util.h from libyasm (and installed libyasm) to top level. - Move yasm_* functions from util.h to coretype.h. - Remove a number of autoconf-related YASM_*_INTERNAL options from libyasm.h. - Rename YASM_INTERNAL to YASM_LIB_INTERNAL; it now actually means what the comment describes: enables definitions that violate the yasm_* namespace. While we're at it, no longer define YASM_LIB_INTERNAL from yasm frontend, so it's closer to what a real typical libyasm-using application would look like. svn path=/trunk/yasm/; revision=944
2003-05-04Comment for Doxygen documentation generation. Comment-only changes.Peter Johnson
svn path=/trunk/yasm/; revision=939
2003-05-03Undefine __STRICT__ANSI__ when compiling with gcc -ansi and glibc to avoid manyPeter Johnson
spurious compiler warnings. svn path=/trunk/yasm/; revision=924
2003-03-26Use system includes instead of local includes. This allows replacement ofPeter Johnson
key headers in certain situations (config.h when compiling with Visual C++ for one), and is also more correct in general. svn path=/trunk/yasm/; revision=887
2003-03-16Don't redefine NDEBUG if it's already defined.Peter Johnson
svn path=/trunk/yasm/; revision=862
2003-03-15Make libyasm a "real" library, including installing header files.Peter Johnson
Start separating modules and frontends from libyasm internals. svn path=/trunk/yasm/; revision=849
2003-03-12The Great Renaming (prefixing with yasm_), Part 2: allocation functions.Peter Johnson
svn path=/trunk/yasm/; revision=843
2003-03-10Unmodularize errwarn, while making key errwarn functions replaceable.Peter Johnson
Also removes dependency of libyasm on libintl (gettext), so it can be linked -no-undefined now! svn path=/trunk/yasm/; revision=842
2003-03-08The Great Renaming, Part 2: prefix strcasecmp and strncasecmp with yasm__.Peter Johnson
svn path=/trunk/yasm/; revision=841
2003-02-21Relicense under 2-clause BSD license.Peter Johnson
svn path=/trunk/yasm/; revision=835
2002-11-04Add va_list versions of error and warning errwarn functions.Peter Johnson
Required adding stdarg to util.h. svn path=/trunk/yasm/; revision=798
2002-11-01Modularize errwarn. gettext()-ize in errwarn, not in every module, eliminatingPeter Johnson
libintl dependency in modules. Also standardize initialize() and cleanup() functions. Move replace_extension() from file.c to main.c. Clean up some extern variable declarations in various places (particularly nasm-compatible parser). svn path=/trunk/yasm/; revision=792
2002-10-22Relicense under 3-clause BSD license.Peter Johnson
svn path=/trunk/yasm/; revision=781
2002-10-22Use automake's standard macro for dmalloc instead of rolling our own.Peter Johnson
svn path=/trunk/yasm/; revision=777
2002-10-22Assume all sys/queue.h implementations are broken, and always use our localPeter Johnson
one (more implementations are broken than not broken). svn path=/trunk/yasm/; revision=776
2002-10-13Remove obsolete references to HAVE_GNU_C_LIBRARY which were causing buildPeter Johnson
breakage on some Linux platforms. svn path=/trunk/yasm/; revision=762
2002-08-07Move strndup() declaration outside !DMALLOC #ifdef, as it's not defined byPeter Johnson
the dmalloc library. svn path=/trunk/yasm/; revision=661
2002-06-20Add xstrndup() to easily create a 0-terminated duplicate of aPeter Johnson
non-zero-terminated source string. svn path=/trunk/yasm/; revision=649
2002-04-22Splint cleanups on memory allocation routines.Peter Johnson
svn path=/trunk/yasm/; revision=593
2002-04-21Create global macro NELEMS to replace countof macro defined just in main.c.Peter Johnson
svn path=/trunk/yasm/; revision=592
2002-03-23When using Splint, don't try to use gettext().Peter Johnson
svn path=/trunk/yasm/; revision=547
2002-03-10Move BitCount() macro from hamt.c to util.h.Peter Johnson
svn path=/trunk/yasm/; revision=488
2001-12-24Fix build problem on Linux with toascii() define.Peter Johnson
svn path=/trunk/yasm/; revision=393
2001-12-03Move assert.h include to util.hPeter Johnson
In util.h, define NDEBUG if not running lint. svn path=/trunk/yasm/; revision=385
2001-12-02Fix typo in HAVE_STRCMPI strncasecmp() #define.Peter Johnson
svn path=/trunk/yasm/; revision=373
2001-12-02Do intl more correctly. nointl/libintl.h is unnecessary; it can be detectedPeter Johnson
in util.h by the ENABLE_NLS define. Fix Mkfiles to reflect. Actually enable if available in main(). svn path=/trunk/yasm/; revision=372
2001-11-18Add valparam data structure.Peter Johnson
svn path=/trunk/yasm/; revision=340
2001-11-17Modify so that almost everything passes LCLint with the options in lclint.sh.Peter Johnson
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
2001-11-16lclint-ize gettext().Peter Johnson
svn path=/trunk/yasm/; revision=331