Missed merging [1463] (oops).
svn path=/branches/yasm-0.5.x/; revision=1473
diff --git a/Makefile.am b/Makefile.am
index 16a88f0..f1c46d6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -64,6 +64,10 @@
EXTRA_DIST += Mkfiles/vc/genmacro/run.bat
EXTRA_DIST += Mkfiles/vc/genmodule/genmodule.vcproj
EXTRA_DIST += Mkfiles/vc/genmodule/run.bat
+EXTRA_DIST += Mkfiles/vc/genstring/genstring.vcproj
+EXTRA_DIST += Mkfiles/vc/genstring/run.bat
+EXTRA_DIST += Mkfiles/vc/genversion/genversion.vcproj
+EXTRA_DIST += Mkfiles/vc/genversion/run.bat
EXTRA_DIST += Mkfiles/vc/libyasm/libyasm.vcproj
EXTRA_DIST += Mkfiles/vc/modules/modules.vcproj
EXTRA_DIST += Mkfiles/vc/re2c/re2c.vcproj
@@ -80,6 +84,10 @@
EXTRA_DIST += Mkfiles/vc8/genmacro/run.bat
EXTRA_DIST += Mkfiles/vc8/genmodule/genmodule.vcproj
EXTRA_DIST += Mkfiles/vc8/genmodule/run.bat
+EXTRA_DIST += Mkfiles/vc8/genstring/genstring.vcproj
+EXTRA_DIST += Mkfiles/vc8/genstring/run.bat
+EXTRA_DIST += Mkfiles/vc8/genversion/genversion.vcproj
+EXTRA_DIST += Mkfiles/vc8/genversion/run.bat
EXTRA_DIST += Mkfiles/vc8/libyasm/libyasm.vcproj
EXTRA_DIST += Mkfiles/vc8/modules/modules.vcproj
EXTRA_DIST += Mkfiles/vc8/re2c/re2c.vcproj
@@ -94,13 +102,6 @@
distclean-local:
-rm -rf results
-if HAVE_PYTHON
- -rm -rf build
-endif
-
-all-local: python-build
-install-hook: python-install
-uninstall-hook: python-uninstall
if BUILD_MAN
MAINTAINERCLEANFILES = $(dist_man_MANS)
diff --git a/Mkfiles/Makefile.dj b/Mkfiles/Makefile.dj
index 421bc69..17c2890 100644
--- a/Mkfiles/Makefile.dj
+++ b/Mkfiles/Makefile.dj
@@ -134,14 +134,28 @@
$(LIBYASM_OBJS) \
$(MODULES_OBJS)
+genstring: genstring.c
+ $(BUILDCC) -o $@ $<
+
+license.c: COPYING genstring
+ ./genstring license_msg $@ COPYING
+
+frontends/yasm/yasm.c: license.c
+
genmacro: modules/preprocs/nasm/genmacro.c
$(BUILDCC) -o $@ $<
-nasm-macros.c: modules/preprocs/nasm/standard.mac genmacro
- ./genmacro modules/preprocs/nasm/standard.mac
+nasm-macros.c: modules/preprocs/nasm/standard.mac version.mac genmacro
+ ./genmacro modules/preprocs/nasm/standard.mac version.mac
modules/preprocs/nasm/nasm-pp.c: nasm-macros.c
+genversion: modules/preprocs/nasm/genversion.c
+ $(BUILDCC) -IMkfiles/dj -o $@ $<
+
+version.mac: genversion
+ ./genversion $@
+
genmodule: libyasm/genmodule.c
$(BUILDCC) -o $@ $<
diff --git a/Mkfiles/Makefile.flat b/Mkfiles/Makefile.flat
index 7e34bd2..f7d97cd 100644
--- a/Mkfiles/Makefile.flat
+++ b/Mkfiles/Makefile.flat
@@ -137,14 +137,28 @@
$(LIBYASM_OBJS) \
$(MODULES_OBJS)
+genstring: genstring.c
+ $(BUILDCC) -o $@ $<
+
+license.c: COPYING genstring
+ ./genstring license_msg $@ COPYING
+
+frontends/yasm/yasm.c: license.c
+
genmacro: modules/preprocs/nasm/genmacro.c
$(BUILDCC) -o $@ $<
-nasm-macros.c: modules/preprocs/nasm/standard.mac genmacro
- ./genmacro modules/preprocs/nasm/standard.mac
+nasm-macros.c: modules/preprocs/nasm/standard.mac version.mac genmacro
+ ./genmacro modules/preprocs/nasm/standard.mac version.mac
modules/preprocs/nasm/nasm-pp.c: nasm-macros.c
+genversion: modules/preprocs/nasm/genversion.c
+ $(BUILDCC) -IMkfiles -o $@ $<
+
+version.mac: genversion
+ ./genversion $@
+
genmodule: libyasm/genmodule.c
$(BUILDCC) -o $@ $<
diff --git a/Mkfiles/dj/config.h b/Mkfiles/dj/config.h
index 2b03adc..27d3be9 100644
--- a/Mkfiles/dj/config.h
+++ b/Mkfiles/dj/config.h
@@ -10,79 +10,18 @@
/* Define if you have the `abort' function. */
#define HAVE_ABORT 1
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-/* #undef HAVE_ALLOCA_H */
-
-/* Define to 1 if you have the `argz_append' function. */
-/* #undef HAVE_ARGZ_APPEND */
-
-/* Define to 1 if you have the `argz_create_sep' function. */
-/* #undef HAVE_ARGZ_CREATE_SEP */
-
-/* Define if you have the <argz.h> header file. */
-/* #undef HAVE_ARGZ_H */
-
-/* Define to 1 if you have the `argz_insert' function. */
-/* #undef HAVE_ARGZ_INSERT */
-
-/* Define to 1 if you have the `argz_next' function. */
-/* #undef HAVE_ARGZ_NEXT */
-
-/* Define to 1 if you have the `argz_stringify' function. */
-/* #undef HAVE_ARGZ_STRINGIFY */
-
-/* Define to 1 if you have the <assert.h> header file. */
-/* #undef HAVE_ASSERT_H */
-
-/* Define to 1 if you have the `basename' function. */
-#define HAVE_BASENAME 1
-
-/* Define to 1 if you have the `bcopy' function. */
-/* #undef HAVE_BCOPY */
-
/* */
/* #undef HAVE_CATGETS */
-/* Define to 1 if you have the `closedir' function. */
-/* #undef HAVE_CLOSEDIR */
-
-/* Define to 1 if you have the <ctype.h> header file. */
-#define HAVE_CTYPE_H 1
-
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
/* #undef HAVE_DCGETTEXT */
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_DIRENT_H */
-
-/* Define if you have the GNU dld library. */
-/* #undef HAVE_DLD */
-
-/* Define to 1 if you have the <dld.h> header file. */
-/* #undef HAVE_DLD_H */
-
-/* Define to 1 if you have the `dlerror' function. */
-/* #undef HAVE_DLERROR */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
-
-/* Define to 1 if you have the <dl.h> header file. */
-/* #undef HAVE_DL_H */
-
/* Define if you don't have `vprintf' but do have `_doprnt'. */
/* #undef HAVE_DOPRNT */
-/* Define to 1 if you have the <errno.h> header file. */
-#define HAVE_ERRNO_H 1
-
-/* Define to 1 if the system has the type `error_t'. */
-/* #undef HAVE_ERROR_T */
-
-/* Define if you have the `fork' function. */
-/* #undef HAVE_FORK */
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
/* */
/* #undef HAVE_GETTEXT */
@@ -93,28 +32,18 @@
/* Define if you have the iconv() function. */
/* #undef HAVE_ICONV */
-/* Define to 1 if you have the `index' function. */
-/* #undef HAVE_INDEX */
-
/* Define if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */
/* */
/* #undef HAVE_LC_MESSAGES */
-/* Define if you have the libdl library or equivalent. */
-/* #undef HAVE_LIBDL */
+/* Define to 1 if you have the <libgen.h> header file. */
+/* #undef HAVE_LIBGEN_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
- to 0 otherwise. */
-#define HAVE_MALLOC 1
-
-/* Define if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
-
/* Define if you have the `memcpy' function. */
#define HAVE_MEMCPY 1
@@ -127,45 +56,9 @@
/* Define if you have the `mergesort function. */
/* #undef HAVE_MERGESORT */
-/* Define if you have the `msgctl' function. */
-/* #undef HAVE_MSGCTL */
-
-/* Define if you have the `msgget' function. */
-/* #undef HAVE_MSGGET */
-
-/* Define if you have the `msgrcv' function. */
-/* #undef HAVE_MSGRCV */
-
-/* Define if you have the `msgsnd' function. */
-/* #undef HAVE_MSGSND */
-
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-/* #undef HAVE_NDIR_H */
-
-/* Define to 1 if you have the `opendir' function. */
-/* #undef HAVE_OPENDIR */
-
-/* Define if libtool can extract symbol lists from object files. */
-/* #undef HAVE_PRELOADED_SYMBOLS */
-
-/* Define to 1 if you have the `readdir' function. */
-/* #undefine HAVE_READDIR */
-
-/* Define to 1 if you have the `rindex' function. */
-/* #undef HAVE_RINDEX */
-
-/* Define if you have the shl_load function. */
-/* #undef HAVE_SHL_LOAD */
-
-/* Define if you have the `snprintf' function. */
-/* #undef HAVE_SNPRINTF */
-
/* Define if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
-/* Define to 1 if you have the <stdio.h> header file. */
-#define HAVE_STDIO_H 1
-
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
@@ -175,18 +68,9 @@
/* Define if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
-/* Define if you have the `strchr' function. */
-#define HAVE_STRCHR 1
-
-/* Define to 1 if you have the `strcmp' function. */
-#define HAVE_STRCMP 1
-
/* Define if you have the `strcmpi' function. */
/* #undef HAVE_STRCMPI */
-/* Define if you have the `strerror' function. */
-#define HAVE_STRERROR 1
-
/* Define if you have the `stricmp' function. */
/* #undef HAVE_STRICMP */
@@ -205,32 +89,9 @@
/* Define if you have the `strsep' function. */
#define HAVE_STRSEP 1
-/* Define if you have the <sys/cdefs.h> header file. */
-#define HAVE_SYS_CDEFS_H 1
-
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_DIR_H */
-
-/* Define to 1 if you have the <sys/dl.h> header file. */
-/* #undef HAVE_SYS_DL_H */
-
-/* Define if you have the <sys/ipc.h> header file. */
-/* #undef HAVE_SYS_IPC_H */
-
-/* Define if you have the <sys/msg.h> header file. */
-/* #undef HAVE_SYS_MSG_H */
-
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_NDIR_H */
-
/* Define if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
-/* Define if you have the <sys/queue.h> header file. */
-/* #undef HAVE_SYS_QUEUE_H */
-
/* Define if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
@@ -246,107 +107,74 @@
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
-/* Define if you have the `vfork' function. */
-/* #undef HAVE_VFORK */
-
-/* Define if you have the <vfork.h> header file. */
-/* #undef HAVE_VFORK_H */
-
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
/* Define to 1 if you have the `vsnprintf' function. */
/* #undef HAVE_VSNPRINTF */
-/* Define if you have the `wait' function. */
-#define HAVE_WAIT 1
-
-/* Define if `fork' works. */
-/* #undef HAVE_WORKING_FORK */
-
-/* Define if `vfork' works. */
-/* #undef HAVE_WORKING_VFORK */
-
-/* Define if the OS needs help to load dependent libraries for dlopen(). */
-#define LTDL_DLOPEN_DEPLIBS 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LTDL_OBJDIR ".libs/"
-
-/* Define to the name of the environment variable that determines the dynamic
- library search path. */
-#define LTDL_SHLIBPATH_VAR "PATH"
-
-/* Define to the extension used for shared libraries, say, ".so". */
-#define LTDL_SHLIB_EXT ".dll"
-
-/* Define to the system default library search path. */
-#define LTDL_SYSSEARCHPATH "/lib:/usr/lib"
-
-/* Define if dlsym() requires a leading underscode in symbol names. */
-/* #undef NEED_USCORE */
-
/* Name of package */
#define PACKAGE "yasm"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "bug-yasm@tortall.net"
+/* Define to build version of this package. */
+#define PACKAGE_BUILD "BRANCH"
+
+/* Define to internal version of this package. */
+#define PACKAGE_INTVER "0.5.0"
+
/* Define to the full name of this package. */
#define PACKAGE_NAME "yasm"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "yasm HEAD"
+#define PACKAGE_STRING "yasm 0.5.x"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "yasm"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "HEAD"
+#define PACKAGE_VERSION "0.5.x"
/* Define if the C compiler supports function prototypes. */
#define PROTOTYPES 1
+/* The size of a `char', as computed by sizeof. */
+/* #undef SIZEOF_CHAR */
+
+/* The size of a `int', as computed by sizeof. */
+/* #undef SIZEOF_INT */
+
+/* The size of a `long', as computed by sizeof. */
+/* #undef SIZEOF_LONG */
+
+/* The size of a `short', as computed by sizeof. */
+/* #undef SIZEOF_SHORT */
+
+/* The size of a `void*', as computed by sizeof. */
+/* #undef SIZEOF_VOIDP */
+
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
-/* Combined test for fork/wait/msg* */
-/* #undef USE_FORKWAITMSG */
-
/* Version number of package */
-#define VERSION "HEAD"
+#define VERSION "0.5.x"
/* Define if using the dmalloc debugging malloc package */
/* #undef WITH_DMALLOC */
-/* Make sure we see all GNU extensions. */
-/* #undef _GNU_SOURCE */
-
-/* Make sure we see all SVID extensions. */
-/* #undef _SVID_SOURCE */
-
/* Define like PROTOTYPES; this can be used by system headers. */
#define __PROTOTYPES 1
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
-/* Define to a type to use for `error_t' if it is not otherwise available. */
-#define error_t int
-
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
if it is not supported. */
+#ifndef __cplusplus
/* #undef inline */
-
-/* Define to rpl_malloc if the replacement function should be used. */
-/* #undef malloc */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-/* #undef pid_t */
+#endif
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
-
-/* Define as `fork' if `vfork' does not work. */
-/* #undef vfork */
diff --git a/Mkfiles/vc/config.h b/Mkfiles/vc/config.h
index 17a387a..c7497e5 100644
--- a/Mkfiles/vc/config.h
+++ b/Mkfiles/vc/config.h
@@ -10,79 +10,18 @@
/* Define if you have the `abort' function. */
#define HAVE_ABORT 1
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-/* #undef HAVE_ALLOCA_H */
-
-/* Define to 1 if you have the `argz_append' function. */
-/* #undef HAVE_ARGZ_APPEND */
-
-/* Define to 1 if you have the `argz_create_sep' function. */
-/* #undef HAVE_ARGZ_CREATE_SEP */
-
-/* Define if you have the <argz.h> header file. */
-/* #undef HAVE_ARGZ_H */
-
-/* Define to 1 if you have the `argz_insert' function. */
-/* #undef HAVE_ARGZ_INSERT */
-
-/* Define to 1 if you have the `argz_next' function. */
-/* #undef HAVE_ARGZ_NEXT */
-
-/* Define to 1 if you have the `argz_stringify' function. */
-/* #undef HAVE_ARGZ_STRINGIFY */
-
-/* Define to 1 if you have the <assert.h> header file. */
-/* #undef HAVE_ASSERT_H */
-
-/* Define to 1 if you have the `basename' function. */
-#define HAVE_BASENAME 1
-
-/* Define to 1 if you have the `bcopy' function. */
-/* #undef HAVE_BCOPY */
-
/* */
/* #undef HAVE_CATGETS */
-/* Define to 1 if you have the `closedir' function. */
-/* #undef HAVE_CLOSEDIR */
-
-/* Define to 1 if you have the <ctype.h> header file. */
-#define HAVE_CTYPE_H 1
-
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
/* #undef HAVE_DCGETTEXT */
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_DIRENT_H */
-
-/* Define if you have the GNU dld library. */
-/* #undef HAVE_DLD */
-
-/* Define to 1 if you have the <dld.h> header file. */
-/* #undef HAVE_DLD_H */
-
-/* Define to 1 if you have the `dlerror' function. */
-/* #undef HAVE_DLERROR */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
-
-/* Define to 1 if you have the <dl.h> header file. */
-/* #undef HAVE_DL_H */
-
/* Define if you don't have `vprintf' but do have `_doprnt'. */
/* #undef HAVE_DOPRNT */
-/* Define to 1 if you have the <errno.h> header file. */
-#define HAVE_ERRNO_H 1
-
-/* Define to 1 if the system has the type `error_t'. */
-/* #undef HAVE_ERROR_T */
-
-/* Define if you have the `fork' function. */
-/* #undef HAVE_FORK */
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
/* */
/* #undef HAVE_GETTEXT */
@@ -93,28 +32,18 @@
/* Define if you have the iconv() function. */
/* #undef HAVE_ICONV */
-/* Define to 1 if you have the `index' function. */
-/* #undef HAVE_INDEX */
-
/* Define if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */
/* */
/* #undef HAVE_LC_MESSAGES */
-/* Define if you have the libdl library or equivalent. */
-/* #undef HAVE_LIBDL */
+/* Define to 1 if you have the <libgen.h> header file. */
+/* #undef HAVE_LIBGEN_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
- to 0 otherwise. */
-#define HAVE_MALLOC 1
-
-/* Define if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
-
/* Define if you have the `memcpy' function. */
#define HAVE_MEMCPY 1
@@ -127,46 +56,9 @@
/* Define if you have the `mergesort function. */
/* #undef HAVE_MERGESORT */
-/* Define if you have the `msgctl' function. */
-/* #undef HAVE_MSGCTL */
-
-/* Define if you have the `msgget' function. */
-/* #undef HAVE_MSGGET */
-
-/* Define if you have the `msgrcv' function. */
-/* #undef HAVE_MSGRCV */
-
-/* Define if you have the `msgsnd' function. */
-/* #undef HAVE_MSGSND */
-
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-/* #undef HAVE_NDIR_H */
-
-/* Define to 1 if you have the `opendir' function. */
-/* #undef HAVE_OPENDIR */
-
-/* Define if libtool can extract symbol lists from object files. */
-/* #undef HAVE_PRELOADED_SYMBOLS */
-
-/* Define to 1 if you have the `readdir' function. */
-/* #undefine HAVE_READDIR */
-
-/* Define to 1 if you have the `rindex' function. */
-/* #undef HAVE_RINDEX */
-
-/* Define if you have the shl_load function. */
-/* #undef HAVE_SHL_LOAD */
-
-/* Define if you have the `snprintf' function. */
-#define HAVE_SNPRINTF 1
-#define snprintf _snprintf
-
/* Define if you have the <stdint.h> header file. */
/* #undef HAVE_STDINT_H */
-/* Define to 1 if you have the <stdio.h> header file. */
-#define HAVE_STDIO_H 1
-
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
@@ -176,22 +68,11 @@
/* Define if you have the `strcasecmp' function. */
/* #undef HAVE_STRCASECMP */
-/* Define if you have the `strchr' function. */
-#define HAVE_STRCHR 1
-
-/* Define to 1 if you have the `strcmp' function. */
-#define HAVE_STRCMP 1
-
/* Define if you have the `strcmpi' function. */
-#define HAVE_STRCMPI 1
-#define strcmpi _strcmpi
-
-/* Define if you have the `strerror' function. */
-#define HAVE_STRERROR 1
+/* #undefine HAVE_STRCMPI */
/* Define if you have the `stricmp' function. */
-#define HAVE_STRICMP 1
-#define stricmp _stricmp
+#define HAVE__STRICMP 1
/* Define if you have the <strings.h> header file. */
/* #undef HAVE_STRINGS_H */
@@ -208,32 +89,9 @@
/* Define if you have the `strsep' function. */
/* #undef HAVE_STRSEP */
-/* Define if you have the <sys/cdefs.h> header file. */
-/* #undef HAVE_SYS_CDEFS_H */
-
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_DIR_H */
-
-/* Define to 1 if you have the <sys/dl.h> header file. */
-/* #undef HAVE_SYS_DL_H */
-
-/* Define if you have the <sys/ipc.h> header file. */
-/* #undef HAVE_SYS_IPC_H */
-
-/* Define if you have the <sys/msg.h> header file. */
-/* #undef HAVE_SYS_MSG_H */
-
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_NDIR_H */
-
/* Define if you have the <sys/param.h> header file. */
/* #undef HAVE_SYS_PARAM_H */
-/* Define if you have the <sys/queue.h> header file. */
-/* #undef HAVE_SYS_QUEUE_H */
-
/* Define if you have the <sys/stat.h> header file. */
/* #undef HAVE_SYS_STAT_H */
@@ -250,107 +108,74 @@
/* Define if you have the <unistd.h> header file. */
/* #undef HAVE_UNISTD_H */
-/* Define if you have the `vfork' function. */
-/* #undef HAVE_VFORK */
-
-/* Define if you have the <vfork.h> header file. */
-/* #undef HAVE_VFORK_H */
-
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
/* Define to 1 if you have the `vsnprintf' function. */
/* #undef HAVE_VSNPRINTF */
-/* Define if you have the `wait' function. */
-/* #undef HAVE_WAIT */
-
-/* Define if `fork' works. */
-/* #undef HAVE_WORKING_FORK */
-
-/* Define if `vfork' works. */
-/* #undef HAVE_WORKING_VFORK */
-
-/* Define if the OS needs help to load dependent libraries for dlopen(). */
-#define LTDL_DLOPEN_DEPLIBS 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LTDL_OBJDIR ".libs/"
-
-/* Define to the name of the environment variable that determines the dynamic
- library search path. */
-#define LTDL_SHLIBPATH_VAR "PATH"
-
-/* Define to the extension used for shared libraries, say, ".so". */
-#define LTDL_SHLIB_EXT ".dll"
-
-/* Define to the system default library search path. */
-#define LTDL_SYSSEARCHPATH "/lib:/usr/lib"
-
-/* Define if dlsym() requires a leading underscode in symbol names. */
-/* #undef NEED_USCORE */
-
/* Name of package */
#define PACKAGE "yasm"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "bug-yasm@tortall.net"
+/* Define to build version of this package. */
+#define PACKAGE_BUILD "BRANCH"
+
+/* Define to internal version of this package. */
+#define PACKAGE_INTVER "0.5.0"
+
/* Define to the full name of this package. */
#define PACKAGE_NAME "yasm"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "yasm HEAD"
+#define PACKAGE_STRING "yasm 0.5.x"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "yasm"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "HEAD"
+#define PACKAGE_VERSION "0.5.x"
/* Define if the C compiler supports function prototypes. */
#define PROTOTYPES 1
+/* The size of a `char', as computed by sizeof. */
+/* #undef SIZEOF_CHAR */
+
+/* The size of a `int', as computed by sizeof. */
+/* #undef SIZEOF_INT */
+
+/* The size of a `long', as computed by sizeof. */
+/* #undef SIZEOF_LONG */
+
+/* The size of a `short', as computed by sizeof. */
+/* #undef SIZEOF_SHORT */
+
+/* The size of a `void*', as computed by sizeof. */
+/* #undef SIZEOF_VOIDP */
+
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
-/* Combined test for fork/wait/msg* */
-/* #undef USE_FORKWAITMSG */
-
/* Version number of package */
-#define VERSION "HEAD"
+#define VERSION "0.5.x"
/* Define if using the dmalloc debugging malloc package */
/* #undef WITH_DMALLOC */
-/* Make sure we see all GNU extensions. */
-/* #undef _GNU_SOURCE */
-
-/* Make sure we see all SVID extensions. */
-/* #undef _SVID_SOURCE */
-
/* Define like PROTOTYPES; this can be used by system headers. */
#define __PROTOTYPES 1
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
-/* Define to a type to use for `error_t' if it is not otherwise available. */
-#define error_t int
-
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
if it is not supported. */
+#ifndef __cplusplus
/* #undef inline */
-
-/* Define to rpl_malloc if the replacement function should be used. */
-/* #undef malloc */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#define pid_t int
+#endif
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
-
-/* Define as `fork' if `vfork' does not work. */
-/* #undef vfork */
diff --git a/Mkfiles/vc/genmacro/run.bat b/Mkfiles/vc/genmacro/run.bat
index 83e80ab..f3323e7 100644
--- a/Mkfiles/vc/genmacro/run.bat
+++ b/Mkfiles/vc/genmacro/run.bat
@@ -1,2 +1,2 @@
cd ..\..\..
-%1 modules\preprocs\nasm\standard.mac
+%1 modules\preprocs\nasm\standard.mac version.mac
diff --git a/Mkfiles/vc/genstring/genstring.vcproj b/Mkfiles/vc/genstring/genstring.vcproj
new file mode 100644
index 0000000..cc1ba41
--- /dev/null
+++ b/Mkfiles/vc/genstring/genstring.vcproj
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="genstring"
+ ProjectGUID="{021CEB0A-F721-4F59-B349-9CEEAF244459}"
+ RootNamespace="genstring"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/genstring.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/genstring.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat "$(TargetPath)""/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="4"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/genstring.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat "$(TargetPath)""/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{28EBE11C-5BE8-4935-9381-F57696749E0C}">
+ <File
+ RelativePath="..\..\..\genstring.c">
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\run.bat">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Mkfiles/vc/genstring/run.bat b/Mkfiles/vc/genstring/run.bat
new file mode 100644
index 0000000..5864b1d
--- /dev/null
+++ b/Mkfiles/vc/genstring/run.bat
@@ -0,0 +1,2 @@
+cd ..\..\..
+%1 license_msg license.c COPYING
diff --git a/Mkfiles/vc/genversion/genversion.vcproj b/Mkfiles/vc/genversion/genversion.vcproj
new file mode 100644
index 0000000..62e252d
--- /dev/null
+++ b/Mkfiles/vc/genversion/genversion.vcproj
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="genversion"
+ ProjectGUID="{B545983B-8EE0-4A7B-A67A-E749EEAE62A2}"
+ RootNamespace="genversion"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\vc8"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/genversion.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/genversion.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat "$(TargetPath)""/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\vc8"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="4"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/genversion.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat "$(TargetPath)""/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{E67ED277-E4F2-4D79-8C9E-962BAC164F3F}">
+ <File
+ RelativePath="..\..\..\modules\preprocs\nasm\genversion.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl">
+ <File
+ RelativePath="..\config.h">
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\run.bat">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Mkfiles/vc/genversion/run.bat b/Mkfiles/vc/genversion/run.bat
new file mode 100644
index 0000000..30edf8f
--- /dev/null
+++ b/Mkfiles/vc/genversion/run.bat
@@ -0,0 +1,2 @@
+cd ..\..\..
+%1 version.mac
diff --git a/Mkfiles/vc/yasm.sln b/Mkfiles/vc/yasm.sln
index e496f2d..8921a59 100644
--- a/Mkfiles/vc/yasm.sln
+++ b/Mkfiles/vc/yasm.sln
@@ -16,10 +16,16 @@
ProjectSection(ProjectDependencies) = postProject
{29FE7874-1256-4AD6-B889-68E399DC9608} = {29FE7874-1256-4AD6-B889-68E399DC9608}
{D715A3D4-EFAA-442E-AD8B-5B4FF64E1DD6} = {D715A3D4-EFAA-442E-AD8B-5B4FF64E1DD6}
+ {021CEB0A-F721-4F59-B349-9CEEAF244459} = {021CEB0A-F721-4F59-B349-9CEEAF244459}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genmacro", "genmacro\genmacro.vcproj", "{225700A5-07B8-434E-AD61-555278BF6733}"
ProjectSection(ProjectDependencies) = postProject
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2} = {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genversion", "genversion\genversion.vcproj", "{B545983B-8EE0-4A7B-A67A-E749EEAE62A2}"
+ ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "re2c", "re2c\re2c.vcproj", "{3C58BE13-50A3-4583-984D-D8902B3D7713}"
@@ -34,6 +40,10 @@
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genstring", "genstring\genstring.vcproj", "{021CEB0A-F721-4F59-B349-9CEEAF244459}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
@@ -56,6 +66,10 @@
{225700A5-07B8-434E-AD61-555278BF6733}.Debug.Build.0 = Debug|Win32
{225700A5-07B8-434E-AD61-555278BF6733}.Release.ActiveCfg = Release|Win32
{225700A5-07B8-434E-AD61-555278BF6733}.Release.Build.0 = Release|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Debug.ActiveCfg = Debug|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Debug.Build.0 = Debug|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Release.ActiveCfg = Release|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Release.Build.0 = Release|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug.ActiveCfg = Debug|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug.Build.0 = Debug|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Release.ActiveCfg = Release|Win32
@@ -68,6 +82,10 @@
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Debug.Build.0 = Debug|Win32
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release.ActiveCfg = Release|Win32
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release.Build.0 = Release|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Debug.ActiveCfg = Debug|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Debug.Build.0 = Debug|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Release.ActiveCfg = Release|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
diff --git a/Mkfiles/vc8/config.h b/Mkfiles/vc8/config.h
index 37062dd..6588dc5 100644
--- a/Mkfiles/vc8/config.h
+++ b/Mkfiles/vc8/config.h
@@ -12,79 +12,18 @@
/* Define if you have the `abort' function. */
#define HAVE_ABORT 1
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-/* #undef HAVE_ALLOCA_H */
-
-/* Define to 1 if you have the `argz_append' function. */
-/* #undef HAVE_ARGZ_APPEND */
-
-/* Define to 1 if you have the `argz_create_sep' function. */
-/* #undef HAVE_ARGZ_CREATE_SEP */
-
-/* Define if you have the <argz.h> header file. */
-/* #undef HAVE_ARGZ_H */
-
-/* Define to 1 if you have the `argz_insert' function. */
-/* #undef HAVE_ARGZ_INSERT */
-
-/* Define to 1 if you have the `argz_next' function. */
-/* #undef HAVE_ARGZ_NEXT */
-
-/* Define to 1 if you have the `argz_stringify' function. */
-/* #undef HAVE_ARGZ_STRINGIFY */
-
-/* Define to 1 if you have the <assert.h> header file. */
-/* #undef HAVE_ASSERT_H */
-
-/* Define to 1 if you have the `basename' function. */
-#define HAVE_BASENAME 1
-
-/* Define to 1 if you have the `bcopy' function. */
-/* #undef HAVE_BCOPY */
-
/* */
/* #undef HAVE_CATGETS */
-/* Define to 1 if you have the `closedir' function. */
-/* #undef HAVE_CLOSEDIR */
-
-/* Define to 1 if you have the <ctype.h> header file. */
-#define HAVE_CTYPE_H 1
-
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
/* #undef HAVE_DCGETTEXT */
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_DIRENT_H */
-
-/* Define if you have the GNU dld library. */
-/* #undef HAVE_DLD */
-
-/* Define to 1 if you have the <dld.h> header file. */
-/* #undef HAVE_DLD_H */
-
-/* Define to 1 if you have the `dlerror' function. */
-/* #undef HAVE_DLERROR */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
-
-/* Define to 1 if you have the <dl.h> header file. */
-/* #undef HAVE_DL_H */
-
/* Define if you don't have `vprintf' but do have `_doprnt'. */
/* #undef HAVE_DOPRNT */
-/* Define to 1 if you have the <errno.h> header file. */
-#define HAVE_ERRNO_H 1
-
-/* Define to 1 if the system has the type `error_t'. */
-/* #undef HAVE_ERROR_T */
-
-/* Define if you have the `fork' function. */
-/* #undef HAVE_FORK */
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
/* */
/* #undef HAVE_GETTEXT */
@@ -95,28 +34,18 @@
/* Define if you have the iconv() function. */
/* #undef HAVE_ICONV */
-/* Define to 1 if you have the `index' function. */
-/* #undef HAVE_INDEX */
-
/* Define if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */
/* */
/* #undef HAVE_LC_MESSAGES */
-/* Define if you have the libdl library or equivalent. */
-/* #undef HAVE_LIBDL */
+/* Define to 1 if you have the <libgen.h> header file. */
+/* #undef HAVE_LIBGEN_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
- to 0 otherwise. */
-#define HAVE_MALLOC 1
-
-/* Define if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
-
/* Define if you have the `memcpy' function. */
#define HAVE_MEMCPY 1
@@ -129,46 +58,9 @@
/* Define if you have the `mergesort function. */
/* #undef HAVE_MERGESORT */
-/* Define if you have the `msgctl' function. */
-/* #undef HAVE_MSGCTL */
-
-/* Define if you have the `msgget' function. */
-/* #undef HAVE_MSGGET */
-
-/* Define if you have the `msgrcv' function. */
-/* #undef HAVE_MSGRCV */
-
-/* Define if you have the `msgsnd' function. */
-/* #undef HAVE_MSGSND */
-
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-/* #undef HAVE_NDIR_H */
-
-/* Define to 1 if you have the `opendir' function. */
-/* #undef HAVE_OPENDIR */
-
-/* Define if libtool can extract symbol lists from object files. */
-/* #undef HAVE_PRELOADED_SYMBOLS */
-
-/* Define to 1 if you have the `readdir' function. */
-/* #undefine HAVE_READDIR */
-
-/* Define to 1 if you have the `rindex' function. */
-/* #undef HAVE_RINDEX */
-
-/* Define if you have the shl_load function. */
-/* #undef HAVE_SHL_LOAD */
-
-/* Define if you have the `snprintf' function. */
-#define HAVE_SNPRINTF 1
-#define snprintf _snprintf
-
/* Define if you have the <stdint.h> header file. */
/* #undef HAVE_STDINT_H */
-/* Define to 1 if you have the <stdio.h> header file. */
-#define HAVE_STDIO_H 1
-
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
@@ -178,18 +70,9 @@
/* Define if you have the `strcasecmp' function. */
/* #undef HAVE_STRCASECMP */
-/* Define if you have the `strchr' function. */
-#define HAVE_STRCHR 1
-
-/* Define to 1 if you have the `strcmp' function. */
-#define HAVE_STRCMP 1
-
/* Define if you have the `strcmpi' function. */
/* #undef HAVE_STRCMPI */
-/* Define if you have the `strerror' function. */
-#define HAVE_STRERROR 1
-
/* Define if you have the `stricmp' function. */
#define HAVE__STRICMP 1
@@ -208,32 +91,9 @@
/* Define if you have the `strsep' function. */
/* #undef HAVE_STRSEP */
-/* Define if you have the <sys/cdefs.h> header file. */
-/* #undef HAVE_SYS_CDEFS_H */
-
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_DIR_H */
-
-/* Define to 1 if you have the <sys/dl.h> header file. */
-/* #undef HAVE_SYS_DL_H */
-
-/* Define if you have the <sys/ipc.h> header file. */
-/* #undef HAVE_SYS_IPC_H */
-
-/* Define if you have the <sys/msg.h> header file. */
-/* #undef HAVE_SYS_MSG_H */
-
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_NDIR_H */
-
/* Define if you have the <sys/param.h> header file. */
/* #undef HAVE_SYS_PARAM_H */
-/* Define if you have the <sys/queue.h> header file. */
-/* #undef HAVE_SYS_QUEUE_H */
-
/* Define if you have the <sys/stat.h> header file. */
/* #undef HAVE_SYS_STAT_H */
@@ -250,107 +110,74 @@
/* Define if you have the <unistd.h> header file. */
/* #undef HAVE_UNISTD_H */
-/* Define if you have the `vfork' function. */
-/* #undef HAVE_VFORK */
-
-/* Define if you have the <vfork.h> header file. */
-/* #undef HAVE_VFORK_H */
-
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
/* Define to 1 if you have the `vsnprintf' function. */
/* #undef HAVE_VSNPRINTF */
-/* Define if you have the `wait' function. */
-/* #undef HAVE_WAIT */
-
-/* Define if `fork' works. */
-/* #undef HAVE_WORKING_FORK */
-
-/* Define if `vfork' works. */
-/* #undef HAVE_WORKING_VFORK */
-
-/* Define if the OS needs help to load dependent libraries for dlopen(). */
-#define LTDL_DLOPEN_DEPLIBS 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LTDL_OBJDIR ".libs/"
-
-/* Define to the name of the environment variable that determines the dynamic
- library search path. */
-#define LTDL_SHLIBPATH_VAR "PATH"
-
-/* Define to the extension used for shared libraries, say, ".so". */
-#define LTDL_SHLIB_EXT ".dll"
-
-/* Define to the system default library search path. */
-#define LTDL_SYSSEARCHPATH "/lib:/usr/lib"
-
-/* Define if dlsym() requires a leading underscode in symbol names. */
-/* #undef NEED_USCORE */
-
/* Name of package */
#define PACKAGE "yasm"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "bug-yasm@tortall.net"
+/* Define to build version of this package. */
+#define PACKAGE_BUILD "BRANCH"
+
+/* Define to internal version of this package. */
+#define PACKAGE_INTVER "0.5.0"
+
/* Define to the full name of this package. */
#define PACKAGE_NAME "yasm"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "yasm HEAD"
+#define PACKAGE_STRING "yasm 0.5.x"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "yasm"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "HEAD"
+#define PACKAGE_VERSION "0.5.x"
/* Define if the C compiler supports function prototypes. */
#define PROTOTYPES 1
+/* The size of a `char', as computed by sizeof. */
+/* #undef SIZEOF_CHAR */
+
+/* The size of a `int', as computed by sizeof. */
+/* #undef SIZEOF_INT */
+
+/* The size of a `long', as computed by sizeof. */
+/* #undef SIZEOF_LONG */
+
+/* The size of a `short', as computed by sizeof. */
+/* #undef SIZEOF_SHORT */
+
+/* The size of a `void*', as computed by sizeof. */
+/* #undef SIZEOF_VOIDP */
+
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
-/* Combined test for fork/wait/msg* */
-/* #undef USE_FORKWAITMSG */
-
/* Version number of package */
-#define VERSION "HEAD"
+#define VERSION "0.5.x"
/* Define if using the dmalloc debugging malloc package */
/* #undef WITH_DMALLOC */
-/* Make sure we see all GNU extensions. */
-/* #undef _GNU_SOURCE */
-
-/* Make sure we see all SVID extensions. */
-/* #undef _SVID_SOURCE */
-
/* Define like PROTOTYPES; this can be used by system headers. */
#define __PROTOTYPES 1
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
-/* Define to a type to use for `error_t' if it is not otherwise available. */
-#define error_t int
-
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
if it is not supported. */
+#ifndef __cplusplus
/* #undef inline */
-
-/* Define to rpl_malloc if the replacement function should be used. */
-/* #undef malloc */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#define pid_t int
+#endif
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
-
-/* Define as `fork' if `vfork' does not work. */
-/* #undef vfork */
diff --git a/Mkfiles/vc8/genmacro/run.bat b/Mkfiles/vc8/genmacro/run.bat
index 83e80ab..f3323e7 100644
--- a/Mkfiles/vc8/genmacro/run.bat
+++ b/Mkfiles/vc8/genmacro/run.bat
@@ -1,2 +1,2 @@
cd ..\..\..
-%1 modules\preprocs\nasm\standard.mac
+%1 modules\preprocs\nasm\standard.mac version.mac
diff --git a/Mkfiles/vc8/genstring/genstring.vcproj b/Mkfiles/vc8/genstring/genstring.vcproj
new file mode 100644
index 0000000..7722dfd
--- /dev/null
+++ b/Mkfiles/vc8/genstring/genstring.vcproj
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="genstring"
+ ProjectGUID="{021CEB0A-F721-4F59-B349-9CEEAF244459}"
+ RootNamespace="genstring"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\genstring.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat "$(TargetPath)""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/genstring.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat "$(TargetPath)""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{28EBE11C-5BE8-4935-9381-F57696749E0C}"
+ >
+ <File
+ RelativePath="..\..\..\genstring.c"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\run.bat"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Mkfiles/vc8/genstring/run.bat b/Mkfiles/vc8/genstring/run.bat
new file mode 100644
index 0000000..5864b1d
--- /dev/null
+++ b/Mkfiles/vc8/genstring/run.bat
@@ -0,0 +1,2 @@
+cd ..\..\..
+%1 license_msg license.c COPYING
diff --git a/Mkfiles/vc8/genversion/genversion.vcproj b/Mkfiles/vc8/genversion/genversion.vcproj
new file mode 100644
index 0000000..5d73495
--- /dev/null
+++ b/Mkfiles/vc8/genversion/genversion.vcproj
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="genversion"
+ ProjectGUID="{B545983B-8EE0-4A7B-A67A-E749EEAE62A2}"
+ RootNamespace="genversion"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\vc8"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\genversion.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat "$(TargetPath)""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ AdditionalIncludeDirectories="..\..\vc8"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/genversion.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat "$(TargetPath)""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{E67ED277-E4F2-4D79-8C9E-962BAC164F3F}"
+ >
+ <File
+ RelativePath="..\..\..\modules\preprocs\nasm\genversion.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\config.h"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\run.bat"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Mkfiles/vc8/genversion/run.bat b/Mkfiles/vc8/genversion/run.bat
new file mode 100644
index 0000000..30edf8f
--- /dev/null
+++ b/Mkfiles/vc8/genversion/run.bat
@@ -0,0 +1,2 @@
+cd ..\..\..
+%1 version.mac
diff --git a/Mkfiles/vc8/yasm.sln b/Mkfiles/vc8/yasm.sln
index 274cf5b..3d14dcd 100644
--- a/Mkfiles/vc8/yasm.sln
+++ b/Mkfiles/vc8/yasm.sln
@@ -17,9 +17,15 @@
ProjectSection(ProjectDependencies) = postProject
{29FE7874-1256-4AD6-B889-68E399DC9608} = {29FE7874-1256-4AD6-B889-68E399DC9608}
{D715A3D4-EFAA-442E-AD8B-5B4FF64E1DD6} = {D715A3D4-EFAA-442E-AD8B-5B4FF64E1DD6}
+ {021CEB0A-F721-4F59-B349-9CEEAF244459} = {021CEB0A-F721-4F59-B349-9CEEAF244459}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genmacro", "genmacro\genmacro.vcproj", "{225700A5-07B8-434E-AD61-555278BF6733}"
+ ProjectSection(ProjectDependencies) = postProject
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2} = {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genversion", "genversion\genversion.vcproj", "{B545983B-8EE0-4A7B-A67A-E749EEAE62A2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "re2c", "re2c\re2c.vcproj", "{3C58BE13-50A3-4583-984D-D8902B3D7713}"
EndProject
@@ -27,6 +33,8 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genmodule", "genmodule\genmodule.vcproj", "{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genstring", "genstring\genstring.vcproj", "{021CEB0A-F721-4F59-B349-9CEEAF244459}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{825AC694-358C-4D8D-92DE-33A2691978CE}"
ProjectSection(SolutionItems) = preProject
readme.vc8.txt = readme.vc8.txt
@@ -72,6 +80,14 @@
{225700A5-07B8-434E-AD61-555278BF6733}.Release|Win32.Build.0 = Release|Win32
{225700A5-07B8-434E-AD61-555278BF6733}.Release|x64.ActiveCfg = Release|Win32
{225700A5-07B8-434E-AD61-555278BF6733}.Release|x64.Build.0 = Release|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Debug|Win32.Build.0 = Debug|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Debug|x64.ActiveCfg = Debug|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Debug|x64.Build.0 = Debug|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Release|Win32.ActiveCfg = Release|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Release|Win32.Build.0 = Release|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Release|x64.ActiveCfg = Release|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Release|x64.Build.0 = Release|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug|Win32.ActiveCfg = Debug|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug|Win32.Build.0 = Debug|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug|x64.ActiveCfg = Debug|Win32
@@ -96,6 +112,14 @@
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release|Win32.Build.0 = Release|Win32
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release|x64.ActiveCfg = Release|Win32
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release|x64.Build.0 = Release|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Debug|Win32.ActiveCfg = Debug|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Debug|Win32.Build.0 = Debug|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Debug|x64.ActiveCfg = Debug|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Debug|x64.Build.0 = Debug|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Release|Win32.ActiveCfg = Release|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Release|Win32.Build.0 = Release|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Release|x64.ActiveCfg = Release|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Release|x64.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/configure.ac b/configure.ac
index 387384f..6217a2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,9 +10,13 @@
AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER([config.h])
-AM_INIT_AUTOMAKE(yasm, [HEAD])
+AM_INIT_AUTOMAKE(yasm, [0.5.x])
AM_MAINTAINER_MODE
+AC_DEFINE(PACKAGE_INTVER, ["0.5.0"],
+ [Define to internal version of this package.])
+AC_DEFINE(PACKAGE_BUILD, ["BRANCH"], [Define to build version of this package.])
+
#
# autoconf command-line options
#
@@ -49,14 +53,6 @@
*) AC_MSG_ERROR([bad value ${enableval} for --enable-gcov]) ;;
esac])
-AC_ARG_ENABLE(python,
-AC_HELP_STRING([--enable-python],[Build Python bindings]),
-[case "${enableval}" in
- yes) enable_python="yes" ;;
- no) enable_python="no" ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-python]) ;;
-esac], enable_python="auto")
-
#
# Checks for programs.
#
@@ -156,7 +152,6 @@
# Force x86 architecture only for now.
ARCH=x86
AC_SUBST([ARCH])
-AC_SUBST([GCC])
# Require things for --enable-maintainer-mode option.
if test "$USE_MAINTAINER_MODE" = "yes"; then
@@ -253,41 +248,6 @@
HOST_CC="$CC_FOR_BUILD"
AC_SUBST(HOST_CC)
-# Detect if we can build Python bindings
-# (needs Python, Python headers, and Pyrex)
-if test x$enable_python = xno; then
- have_python=no
-else
- AC_MSG_NOTICE([Checking to see if we can build Python bindings])
- have_python=no
- AM_PATH_PYTHON(2.4)
-
- if test -z "$PYTHON" ; then
- AC_MSG_WARN([Python not found])
- else
- AC_MSG_CHECKING([for Pyrex >= 0.9.3])
- PYREX_CHECK_VERSION(0.9.3, [AC_MSG_RESULT(yes)
- have_pyrex=yes],
- [AC_MSG_RESULT(no)
- have_pyrex=no])
-
- AM_CHECK_PYTHON_HEADERS(have_python_headers=yes,have_python_headers=no)
-
- if test x$have_pyrex = xyes -a x$have_python_headers = xyes ; then
- have_python=yes
- fi
- fi
-
- if test x$have_python = xno ; then
- if test x$enable_python = xyes ; then
- AC_MSG_ERROR([Building Python explicitly requested, but can't build Python bindings because either Pyrex, Python headers or a suitable Python version was not found])
- else
- AC_MSG_WARN([Couldn't find either Pyrex, the Python headers or a suitable version of Python, not building Python bindings])
- fi
- fi
-fi
-
-AM_CONDITIONAL(HAVE_PYTHON, test x$have_python = xyes)
AC_CONFIG_FILES([Makefile
po/Makefile.in
diff --git a/frontends/yasm/yasm.c b/frontends/yasm/yasm.c
index 1d28b33..b7bc7e4 100644
--- a/frontends/yasm/yasm.c
+++ b/frontends/yasm/yasm.c
@@ -173,7 +173,7 @@
/* version message */
/*@observer@*/ static const char *version_msg[] = {
- PACKAGE_STRING,
+ PACKAGE_NAME " " PACKAGE_INTVER "." PACKAGE_BUILD,
"Compiled on " __DATE__ ".",
"Copyright (c) 2001-2006 Peter Johnson and other Yasm developers.",
"Run yasm --license for licensing overview and summary."
diff --git a/libyasm/coretype.h b/libyasm/coretype.h
index 234421d..14ebc43 100644
--- a/libyasm/coretype.h
+++ b/libyasm/coretype.h
@@ -253,7 +253,7 @@
typedef int (*yasm_output_value_func)
(yasm_value *value, /*@out@*/ unsigned char *buf, size_t destsize,
size_t valsize, int shift, unsigned long offset, yasm_bytecode *bc,
- int warn, /*@null@*/ void *d);
+ int warn, /*@null@*/ void *d) /*@uses *ep@*/;
/** Convert a symbol reference to its byte representation. Usually implemented
* by object formats and debug formats to keep track of relocations generated
diff --git a/libyasm/xstrdup.c b/libyasm/xstrdup.c
index 3e1ebb5..c52c12c 100644
--- a/libyasm/xstrdup.c
+++ b/libyasm/xstrdup.c
@@ -39,16 +39,6 @@
#endif /* LIBC_SCCS and not lint */
-#ifndef STDC_HEADERS
-size_t strlen(const char *);
-# ifndef HAVE_MEMCPY
-void bcopy(const void *, void *, size_t);
-# define memcpy(d, s, n) bcopy((s), (d), (n))
-# else
-void memcpy(void *, const void *, size_t);
-# endif
-#endif
-
#ifdef WITH_DMALLOC
#undef yasm__xstrdup
#endif
diff --git a/m4/Makefile.inc b/m4/Makefile.inc
index 4dac7a1..6cd2152 100644
--- a/m4/Makefile.inc
+++ b/m4/Makefile.inc
@@ -26,5 +26,3 @@
EXTRA_DIST += m4/progtest.m4
EXTRA_DIST += m4/stdint_h.m4
EXTRA_DIST += m4/uintmax_t.m4
-EXTRA_DIST += m4/pythonhead.m4
-EXTRA_DIST += m4/pyrex.m4
diff --git a/m4/pyrex.m4 b/m4/pyrex.m4
deleted file mode 100644
index b7610c2..0000000
--- a/m4/pyrex.m4
+++ /dev/null
@@ -1,17 +0,0 @@
-dnl a macro to check for the installed Pyrex version; note PYTHON needs to
-dnl be set before this function is called.
-dnl PYREX_CHECK_VERSION([MIN-VERSION], [ACTION-IF-TRUE], [ACTION-IF-FALSE])
-AC_DEFUN([PYREX_CHECK_VERSION],
- [prog="import sys
-from Pyrex.Compiler.Version import version
-# split strings by '.' and convert to numeric. Append some zeros
-# because we need at least 4 digits for the hex conversion.
-pyrexver = map(int, version.split('.')) + [[0, 0, 0]]
-pyrexverhex = 0
-for i in xrange(0, 4): pyrexverhex = (pyrexverhex << 8) + pyrexver[[i]]
-minver = map(int, '$1'.split('.')) + [[0, 0, 0]]
-minverhex = 0
-for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
-sys.exit(pyrexverhex < minverhex)"
- AS_IF([AM_RUN_LOG([$PYTHON -c "$prog"])], [$2], [$3])])
-
diff --git a/m4/pythonhead.m4 b/m4/pythonhead.m4
deleted file mode 100644
index 1e0f2b6..0000000
--- a/m4/pythonhead.m4
+++ /dev/null
@@ -1,24 +0,0 @@
-dnl a macro to check for ability to create python extensions
-dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
-dnl function also defines PYTHON_INCLUDES
-AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
-[AC_REQUIRE([AM_PATH_PYTHON])
-AC_MSG_CHECKING(for headers required to compile python extensions)
-dnl deduce PYTHON_INCLUDES
-py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
-py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
-PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
-if test "$py_prefix" != "$py_exec_prefix"; then
- PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
-fi
-AC_SUBST(PYTHON_INCLUDES)
-dnl check if the headers exist:
-save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
-AC_TRY_CPP([#include <Python.h>],dnl
-[AC_MSG_RESULT(found)
-$1],dnl
-[AC_MSG_RESULT(not found)
-$2])
-CPPFLAGS="$save_CPPFLAGS"
-])
diff --git a/modules/dbgfmts/codeview/cv-symline.c b/modules/dbgfmts/codeview/cv-symline.c
index 1640a47..323e6f6 100644
--- a/modules/dbgfmts/codeview/cv-symline.c
+++ b/modules/dbgfmts/codeview/cv-symline.c
@@ -508,6 +508,7 @@
cv_generate_line_section(yasm_section *sect, /*@null@*/ void *d)
{
cv_line_info *info = (cv_line_info *)d;
+ yasm_dbgfmt_cv *dbgfmt_cv = info->dbgfmt_cv;
if (!yasm_section_is_code(sect))
return 0; /* not code, so no line data for this section */
@@ -631,7 +632,8 @@
cv8_add_sym_objname(dbgfmt_cv, info.debug_symline,
yasm__abspath(yasm_object_get_object_fn(dbgfmt_cv->object)));
cv8_add_sym_compile(dbgfmt_cv, info.debug_symline,
- yasm__xstrdup(PACKAGE_STRING));
+ yasm__xstrdup(PACKAGE_NAME " " PACKAGE_INTVER "."
+ PACKAGE_BUILD));
/* then iterate through symbol table */
yasm_symtab_traverse(dbgfmt_cv->symtab, &info, cv_generate_sym);
cv8_set_symhead_end(head, yasm_section_bcs_last(info.debug_symline));
@@ -1057,9 +1059,8 @@
buf += 4;
break;
case 'Y':
- cv_out_sym((yasm_symrec *)cvs->args[arg++].p,
- (unsigned long)(buf-(*bufp)), bc, &buf, d,
- output_value);
+ cv_out_sym((yasm_symrec *)cvs->args[arg++].p, buf-(*bufp), bc,
+ &buf, d, output_value);
break;
case 'T':
yasm_intnum_set_uint(cval, cvs->args[arg++].i);
diff --git a/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c b/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c
index a9a48b7..ea21be6 100644
--- a/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c
+++ b/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c
@@ -237,6 +237,7 @@
static void
dwarf2_head_bc_destroy(void *contents)
{
+ dwarf2_head *head = (dwarf2_head *)contents;
yasm_xfree(contents);
}
diff --git a/modules/preprocs/nasm/Makefile.inc b/modules/preprocs/nasm/Makefile.inc
index 07b957f..a91eb91 100644
--- a/modules/preprocs/nasm/Makefile.inc
+++ b/modules/preprocs/nasm/Makefile.inc
@@ -11,10 +11,10 @@
YASM_MODULES += preproc_nasm
-$(top_modulesdir)/src/preprocs/nasm/nasm-pp.c: nasm-macros.c
+$(top_srcdir)/src/preprocs/nasm/nasm-pp.c: nasm-macros.c
-nasm-macros.c: $(top_srcdir)/modules/preprocs/nasm/standard.mac genmacro$(EXEEXT)
- $(top_builddir)/genmacro$(EXEEXT) $(top_srcdir)/modules/preprocs/nasm/standard.mac
+nasm-macros.c: $(top_srcdir)/modules/preprocs/nasm/standard.mac version.mac genmacro$(EXEEXT)
+ $(top_builddir)/genmacro$(EXEEXT) $(top_srcdir)/modules/preprocs/nasm/standard.mac version.mac
BUILT_SOURCES += nasm-macros.c
CLEANFILES += nasm-macros.c
@@ -29,6 +29,22 @@
genmacro.$(OBJEXT): modules/preprocs/nasm/genmacro.c
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f modules/preprocs/nasm/genmacro.c || echo '$(srcdir)/'`modules/preprocs/nasm/genmacro.c
+version.mac: genversion$(EXEEXT)
+ $(top_builddir)/genversion$(EXEEXT) $@
+
+BUILT_SOURCES += version.mac
+CLEANFILES += version.mac
+
+noinst_PROGRAMS += genversion
+
+genversion_SOURCES =
+EXTRA_DIST += modules/preprocs/nasm/genversion.c
+genversion_LDADD = genversion.$(OBJEXT)
+genversion_LINK = $(CCLD_FOR_BUILD) -o $@
+
+genversion.$(OBJEXT): modules/preprocs/nasm/genversion.c
+ $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f modules/preprocs/nasm/genversion.c || echo '$(srcdir)/'`modules/preprocs/nasm/genversion.c
+
EXTRA_DIST += modules/preprocs/nasm/standard.mac
EXTRA_DIST += modules/preprocs/nasm/tests/Makefile.inc
diff --git a/modules/preprocs/nasm/genversion.c b/modules/preprocs/nasm/genversion.c
new file mode 100644
index 0000000..db28def
--- /dev/null
+++ b/modules/preprocs/nasm/genversion.c
@@ -0,0 +1,79 @@
+/* $Id$
+ *
+ * Generate version.mac
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "config.h" /* for PACKAGE_VERSION */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int
+main(int argc, char *argv[])
+{
+ FILE *out;
+ int major, minor, subminor;
+
+ if (argc != 2) {
+ fprintf(stderr, "Usage: %s <outfile>\n", argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ out = fopen(argv[1], "wt");
+
+ if (!out) {
+ fprintf(stderr, "Could not open `%s'.\n", argv[1]);
+ return EXIT_FAILURE;
+ }
+
+ fprintf(out, "; This file auto-generated by genversion.c"
+ " - don't edit it\n");
+
+ if (sscanf(PACKAGE_INTVER, "%d.%d.%d", &major, &minor, &subminor) != 3) {
+ fprintf(stderr, "Version tokenizing error\n");
+ fclose(out);
+ remove(argv[1]);
+ return EXIT_FAILURE;
+ }
+
+ fprintf(out, "%%define __YASM_MAJOR__ %d\n", major);
+ fprintf(out, "%%define __YASM_MINOR__ %d\n", minor);
+ fprintf(out, "%%define __YASM_SUBMINOR__ %d\n", subminor);
+ if (!isdigit(PACKAGE_BUILD[0]))
+ fprintf(out, "%%define __YASM_BUILD__ 0\n");
+ else
+ fprintf(out, "%%define __YASM_BUILD__ %d\n", atoi(PACKAGE_BUILD));
+
+ /* Version id (hex number) */
+ fprintf(out, "%%define __YASM_VERSION_ID__ 0%02x%02x%02x00h\n", major,
+ minor, subminor);
+
+ /* Version string - version sans build */
+ fprintf(out, "%%define __YASM_VER__ \"%s\"\n", PACKAGE_INTVER);
+ fclose(out);
+
+ return EXIT_SUCCESS;
+}
diff --git a/modules/preprocs/nasm/nasm-pp.c b/modules/preprocs/nasm/nasm-pp.c
index f19315d..21d119e 100644
--- a/modules/preprocs/nasm/nasm-pp.c
+++ b/modules/preprocs/nasm/nasm-pp.c
@@ -1287,6 +1287,7 @@
inc_fopen(char *file, char **newname)
{
FILE *fp;
+ const char *prefix = "";
char *combine = NULL;
fp = yasm__fopen_include(file, nasm_src_get_fname(), (const char **)ipaths,
diff --git a/tools/Makefile.inc b/tools/Makefile.inc
index 56a4697..264b8e1 100644
--- a/tools/Makefile.inc
+++ b/tools/Makefile.inc
@@ -2,8 +2,6 @@
EXTRA_DIST += tools/re2c/Makefile.inc
EXTRA_DIST += tools/gap/Makefile.inc
-EXTRA_DIST += tools/python-yasm/Makefile.inc
include tools/re2c/Makefile.inc
include tools/gap/Makefile.inc
-include tools/python-yasm/Makefile.inc
diff --git a/tools/python-yasm/Makefile.inc b/tools/python-yasm/Makefile.inc
deleted file mode 100644
index 2d7c877..0000000
--- a/tools/python-yasm/Makefile.inc
+++ /dev/null
@@ -1,51 +0,0 @@
-# $Id$
-if HAVE_PYTHON
-
-PYBINDING_DEPS = tools/python-yasm/bytecode.pxi
-PYBINDING_DEPS += tools/python-yasm/coretype.pxi
-PYBINDING_DEPS += tools/python-yasm/expr.pxi
-PYBINDING_DEPS += tools/python-yasm/floatnum.pxi
-PYBINDING_DEPS += tools/python-yasm/intnum.pxi
-PYBINDING_DEPS += tools/python-yasm/symrec.pxi
-PYBINDING_DEPS += tools/python-yasm/value.pxi
-
-EXTRA_DIST += tools/python-yasm/setup.py
-EXTRA_DIST += tools/python-yasm/yasm.pyx
-EXTRA_DIST += $(PYBINDING_DEPS)
-
-yasm_python.c: $(srcdir)/tools/python-yasm/yasm.pyx $(PYBINDING_DEPS)
- $(PYTHON) -c "from Pyrex.Compiler.Main import main; main(command_line=1)" \
- -o $@ `test -f tools/python-yasm/yasm.pyx || echo '$(srcdir)/'`tools/python-yasm/yasm.pyx
-
-CLEANFILES += yasm_python.c
-
-# Now the Python build magic...
-python-setup.txt: Makefile
- echo "includes=${DEFAULT_INCLUDES} ${INCLUDES} ${DEFS}" > python-setup.txt
- echo "sources=${libyasm_a_SOURCES}" >> python-setup.txt
- echo "srcdir=${srcdir}" >> python-setup.txt
- echo "gcc=${GCC}" >> python-setup.txt
-
-CLEANFILES += python-setup.txt
-
-.python-build: python-setup.txt yasm_python.c
- -rm -rf build
- $(PYTHON) `test -f tools/python-yasm/setup.py || echo '$(srcdir)/'`tools/python-yasm/setup.py build
- touch .python-build
-python-build: .python-build
-
-CLEANFILES += .python-build
-
-python-install: .python-build
- $(PYTHON) `test -f tools/python-yasm/setup.py || echo '$(srcdir)/'`tools/python-yasm/setup.py install "--install-lib=$(pythondir)"
-
-python-uninstall:
- rm -f `$(PYTHON) -c "import sys;sys.path.insert(0, '${pythondir}'); import yasm; print yasm.__file__"`
-
-else
-
-python-build:
-python-install:
-python-uninstall:
-
-endif
diff --git a/tools/python-yasm/bytecode.pxi b/tools/python-yasm/bytecode.pxi
deleted file mode 100644
index a74e3ff..0000000
--- a/tools/python-yasm/bytecode.pxi
+++ /dev/null
@@ -1,149 +0,0 @@
-# Python bindings for Yasm: Pyrex input file for bytecode.h
-#
-# Copyright (C) 2006 Michael Urman, Peter Johnson
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cdef extern from "libyasm/bytecode.h":
- cdef struct yasm_effaddr
-
- cdef struct yasm_effaddr_callback:
- void (*destroy) (yasm_effaddr *ea)
- void (*c_print "print") (yasm_effaddr *ea, FILE *f, int indent_level)
-
- cdef struct yasm_effaddr:
- yasm_effaddr_callback *callback
- yasm_value disp
- unsigned long segreg
- unsigned int disp_len
- unsigned int need_disp
- unsigned int nosplit
- unsigned int strong
-
- cdef struct yasm_immval:
- yasm_value val
- unsigned int len
- unsigned int sign
-
- cdef struct yasm_dataval
- cdef struct yasm_datavalhead
-
- cdef enum yasm_bc_resolve_flags:
- YASM_BC_RESOLVE_NONE
- YASM_BC_RESOLVE_ERROR
- YASM_BC_RESOLVE_MIN_LEN
- YASM_BC_RESOLVE_UNKNOWN_LEN
-
- cdef yasm_immval* yasm_imm_create_expr(yasm_expr *e)
- cdef yasm_expr* yasm_ea_get_disp(yasm_effaddr *ea)
- cdef void yasm_ea_set_len(yasm_effaddr *ea, unsigned int len)
- cdef void yasm_ea_set_nosplit(yasm_effaddr *ea, unsigned int nosplit)
- cdef void yasm_ea_set_strong(yasm_effaddr *ea, unsigned int strong)
- cdef void yasm_ea_set_segreg(yasm_effaddr *ea, unsigned long segreg,
- unsigned long line)
- cdef void yasm_ea_destroy(yasm_effaddr *ea)
- cdef void yasm_ea_print(yasm_effaddr *ea, FILE *f, int indent_level)
-
- cdef void yasm_bc_set_multiple(yasm_bytecode *bc, yasm_expr *e)
- cdef yasm_bytecode* yasm_bc_create_data(yasm_datavalhead *datahead,
- unsigned int size, int append_zero, unsigned long line)
- cdef yasm_bytecode* yasm_bc_create_leb128(yasm_datavalhead *datahead,
- int sign, unsigned long line)
- cdef yasm_bytecode* yasm_bc_create_reserve(yasm_expr *numitems,
- unsigned int itemsize, unsigned long line)
- cdef yasm_bytecode* yasm_bc_create_incbin(char *filename,
- yasm_expr *start, yasm_expr *maxlen, unsigned long line)
- cdef yasm_bytecode* yasm_bc_create_align(yasm_expr *boundary,
- yasm_expr *fill, yasm_expr *maxskip,
- unsigned char **code_fill, unsigned long line)
- cdef yasm_bytecode* yasm_bc_create_org(unsigned long start,
- unsigned long line)
- cdef yasm_bytecode* yasm_bc_create_insn(yasm_arch *arch,
- unsigned long insn_data[4], int num_operands,
- yasm_insn_operands *operands, unsigned long line)
- cdef yasm_bytecode* yasm_bc_create_empty_insn(yasm_arch *arch,
- unsigned long insn_data[4], int num_operands,
- yasm_insn_operands *operands, unsigned long line)
- cdef void yasm_bc_insn_add_prefix(yasm_bytecode *bc,
- unsigned long prefix_data[4])
- cdef void yasm_bc_insn_add_seg_prefix(yasm_bytecode *bc,
- unsigned long segreg)
- cdef yasm_section* yasm_bc_get_section(yasm_bytecode *bc)
- cdef void yasm_bc__add_symrec(yasm_bytecode *bc, yasm_symrec *sym)
- cdef void yasm_bc_destroy(yasm_bytecode *bc)
- cdef void yasm_bc_print(yasm_bytecode *bc, FILE *f, int indent_level)
- cdef void yasm_bc_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc)
- cdef yasm_intnum *yasm_common_calc_bc_dist(yasm_bytecode *precbc1,
- yasm_bytecode *precbc2)
- cdef yasm_bc_resolve_flags yasm_bc_resolve(yasm_bytecode *bc, int save,
- yasm_calc_bc_dist_func calc_bc_dist)
- cdef unsigned char* yasm_bc_tobytes(yasm_bytecode *bc,
- unsigned char *buf, unsigned long *bufsize,
- unsigned long *multiple, int *gap, void *d,
- yasm_output_value_func output_value,
- yasm_output_reloc_func output_reloc)
-
- cdef yasm_dataval* yasm_dv_create_expr(yasm_expr *expn)
- cdef yasm_dataval* yasm_dv_create_string(char *contents, size_t len)
-
- cdef void yasm_dvs_initialize(yasm_datavalhead *headp)
- cdef void yasm_dvs_destroy(yasm_datavalhead *headp)
- cdef yasm_dataval* yasm_dvs_append(yasm_datavalhead *headp,
- yasm_dataval *dv)
- cdef void yasm_dvs_print(yasm_datavalhead *headp, FILE *f,
- int indent_level)
-
-cdef extern from "libyasm/bc-int.h":
- cdef struct yasm_bytecode_callback:
- void (*destroy) (void *contents)
- void (*c_print "print") (void *contents, FILE *f, int indent_level)
- void (*finalize) (yasm_bytecode *bc, yasm_bytecode *prev_bc)
- yasm_bc_resolve_flags (*resolve) (yasm_bytecode *bc, int save,
- yasm_calc_bc_dist_func calc_bc_dist)
- int (*tobytes) (yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_value_func output_value,
- yasm_output_reloc_func output_reloc)
-
- cdef struct yasm_bytecode:
- yasm_bytecode_callback *callback
- yasm_section *section
- yasm_expr *multiple
- unsigned long len
- unsigned long line
- unsigned long offset
- unsigned long opt_flags
- yasm_symrec **symrecs
- void *contents
-
- cdef yasm_bytecode *yasm_bc_create_common(yasm_bytecode_callback *callback,
- void *contents, unsigned long line)
-
- cdef void yasm_bc_transform(yasm_bytecode *bc,
- yasm_bytecode_callback *callback, void *contents)
-
- cdef void yasm_bc_finalize_common(yasm_bytecode *bc, yasm_bytecode *prev_bc)
-
- cdef yasm_bytecode *yasm_bc__next(yasm_bytecode *bc)
-
-cdef class Bytecode:
- cdef yasm_bytecode *bc
-
diff --git a/tools/python-yasm/coretype.pxi b/tools/python-yasm/coretype.pxi
deleted file mode 100644
index e79324d..0000000
--- a/tools/python-yasm/coretype.pxi
+++ /dev/null
@@ -1,114 +0,0 @@
-# Python bindings for Yasm: Pyrex input file for coretype.h
-#
-# Copyright (C) 2006 Michael Urman, Peter Johnson
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cdef extern struct FILE:
- int fileno
-
-ctypedef unsigned long size_t
-
-cdef extern from "libyasm/coretype.h":
- cdef struct yasm_arch
- cdef struct yasm_preproc
- cdef struct yasm_parser
- cdef struct yasm_optimizer
- cdef struct yasm_objfmt
- cdef struct yasm_dbgfmt
- cdef struct yasm_listfmt
-
- cdef struct yasm_assoc_data_callback:
- void (*destroy) (void *data)
- void (*c_print "print") (void *data, FILE *f, int indent_level)
-
- cdef struct yasm_bytecode
- cdef struct yasm_object
- cdef struct yasm_section
- cdef struct yasm_symtab
- cdef struct yasm_symrec
- cdef struct yasm_expr
- cdef struct yasm_intnum
- cdef struct yasm_floatnum
-
- cdef struct yasm_value:
- yasm_expr *abs
- yasm_symrec *rel
- yasm_symrec *wrt
- unsigned int seg_of
- unsigned int rshift
- unsigned int curpos_rel
- unsigned int ip_rel
- unsigned int section_rel
-
- cdef struct yasm_linemap
- cdef struct yasm_valparam
- cdef struct yasm_valparamhead
- cdef struct yasm_insn_operands
-
- ctypedef enum yasm_expr_op:
- YASM_EXPR_IDENT
- YASM_EXPR_ADD
- YASM_EXPR_SUB
- YASM_EXPR_MUL
- YASM_EXPR_DIV
- YASM_EXPR_SIGNDIV
- YASM_EXPR_MOD
- YASM_EXPR_SIGNMOD
- YASM_EXPR_NEG
- YASM_EXPR_NOT
- YASM_EXPR_OR
- YASM_EXPR_AND
- YASM_EXPR_XOR
- YASM_EXPR_NOR
- YASM_EXPR_SHL
- YASM_EXPR_SHR
- YASM_EXPR_LOR
- YASM_EXPR_LAND
- YASM_EXPR_LNOT
- YASM_EXPR_LT
- YASM_EXPR_GT
- YASM_EXPR_EQ
- YASM_EXPR_LE
- YASM_EXPR_GE
- YASM_EXPR_NE
- YASM_EXPR_NONNUM
- YASM_EXPR_SEG
- YASM_EXPR_WRT
- YASM_EXPR_SEGOFF
-
- ctypedef enum yasm_sym_vis:
- YASM_SYM_LOCAL
- YASM_SYM_GLOBAL
- YASM_SYM_COMMON
- YASM_SYM_EXTERN
- YASM_SYM_DLOCAL
-
- ctypedef yasm_intnum*(*yasm_calc_bc_dist_func)(yasm_bytecode *precbc1,
- yasm_bytecode *precbc2)
- ctypedef int*(*yasm_output_value_func)(yasm_value *value, unsigned char
- *buf, size_t destsize, size_t valsize, int shift, unsigned
- long offset, yasm_bytecode *bc, int warn, void *d)
- ctypedef int(*yasm_output_reloc_func)(yasm_symrec *sym,
- yasm_bytecode *bc, unsigned char *buf, size_t destsize,
- size_t valsize, int warn, void *d)
-
diff --git a/tools/python-yasm/expr.pxi b/tools/python-yasm/expr.pxi
deleted file mode 100644
index c767b6d..0000000
--- a/tools/python-yasm/expr.pxi
+++ /dev/null
@@ -1,219 +0,0 @@
-# Python bindings for Yasm: Pyrex input file for expr.h
-#
-# Copyright (C) 2006 Michael Urman, Peter Johnson
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cdef extern from "libyasm/expr.h":
- cdef struct yasm_expr__item
-
- cdef yasm_expr *yasm_expr_create(yasm_expr_op op, yasm_expr__item *a,
- yasm_expr__item *b, unsigned long line)
- cdef yasm_expr__item *yasm_expr_sym(yasm_symrec *sym)
- cdef yasm_expr__item *yasm_expr_expr(yasm_expr *e)
- cdef yasm_expr__item *yasm_expr_int(yasm_intnum *intn)
- cdef yasm_expr__item *yasm_expr_float(yasm_floatnum *flt)
- cdef yasm_expr__item *yasm_expr_reg(unsigned long reg)
- cdef yasm_expr *yasm_expr_create_tree(yasm_expr *l, yasm_expr_op op,
- yasm_expr *r, unsigned long line)
- cdef yasm_expr *yasm_expr_create_branch(yasm_expr_op op,
- yasm_expr *r, unsigned long line)
- cdef yasm_expr *yasm_expr_create_ident(yasm_expr *r, unsigned long line)
- cdef yasm_expr *yasm_expr_copy(yasm_expr *e)
- cdef void yasm_expr_destroy(yasm_expr *e)
- cdef int yasm_expr_is_op(yasm_expr *e, yasm_expr_op op)
- ctypedef yasm_expr * (*yasm_expr_xform_func) (yasm_expr *e, void *d)
-
- cdef struct yasm__exprhead
- cdef yasm_expr *yasm_expr__level_tree(yasm_expr *e, int fold_const,
- int simplify_ident, int simplify_reg_mul,
- yasm_calc_bc_dist_func calc_bc_dist,
- yasm_expr_xform_func expr_xform_extra,
- void *expr_xform_extra_data, yasm__exprhead *eh, int *error)
- cdef yasm_expr *yasm_expr_simplify(yasm_expr *e, yasm_calc_bc_dist_func cbd)
- cdef yasm_expr *yasm_expr_extract_segoff(yasm_expr **ep)
- cdef yasm_expr *yasm_expr_extract_wrt(yasm_expr **ep)
- cdef yasm_intnum *yasm_expr_get_intnum(yasm_expr **ep,
- yasm_calc_bc_dist_func calc_bc_dist)
- cdef yasm_symrec *yasm_expr_get_symrec(yasm_expr **ep, int simplify)
- cdef unsigned long *yasm_expr_get_reg(yasm_expr **ep, int simplify)
- cdef void yasm_expr_print(yasm_expr *e, FILE *f)
-
-cdef extern from "libyasm/expr-int.h":
- cdef enum yasm_expr__type:
- YASM_EXPR_NONE
- YASM_EXPR_REG
- YASM_EXPR_INT
- YASM_EXPR_FLOAT
- YASM_EXPR_SYM
- YASM_EXPR_SYMEXP
- YASM_EXPR_EXPR
-
- cdef union yasm_expr__type_data:
- yasm_symrec *sym
- yasm_expr *expn
- yasm_intnum *intn
- yasm_floatnum *flt
- unsigned long reg
-
- cdef struct yasm_expr__item:
- yasm_expr__type type
- yasm_expr__type_data data
-
- cdef struct yasm_expr:
- yasm_expr_op op
- unsigned long line
- int numterms
- yasm_expr__item terms[2]
-
- cdef int yasm_expr__traverse_leaves_in_const(yasm_expr *e,
- void *d, int (*func) (yasm_expr__item *ei, void *d))
- cdef int yasm_expr__traverse_leaves_in(yasm_expr *e, void *d,
- int (*func) (yasm_expr__item *ei, void *d))
-
- cdef void yasm_expr__order_terms(yasm_expr *e)
-
- cdef yasm_expr *yasm_expr__copy_except(yasm_expr *e, int excpt)
-
- cdef int yasm_expr__contains(yasm_expr *e, yasm_expr__type t)
-
-import operator
-__op = {
- operator.__add__ : YASM_EXPR_ADD,
- operator.add : YASM_EXPR_ADD,
- operator.__and__ : YASM_EXPR_AND,
- operator.and_ : YASM_EXPR_AND,
- operator.__div__ : YASM_EXPR_SIGNDIV,
- operator.__floordiv__: YASM_EXPR_SIGNDIV,
- operator.div : YASM_EXPR_SIGNDIV,
- operator.floordiv: YASM_EXPR_SIGNDIV,
- operator.__ge__: YASM_EXPR_GE,
- operator.ge: YASM_EXPR_GE,
- operator.__gt__: YASM_EXPR_GT,
- operator.gt: YASM_EXPR_GT,
- operator.__inv__: YASM_EXPR_NOT,
- operator.__invert__: YASM_EXPR_NOT,
- operator.inv: YASM_EXPR_NOT,
- operator.invert: YASM_EXPR_NOT,
- operator.__le__: YASM_EXPR_LE,
- operator.le: YASM_EXPR_LE,
- operator.__lt__: YASM_EXPR_LT,
- operator.lt: YASM_EXPR_LT,
- operator.__mod__: YASM_EXPR_SIGNMOD,
- operator.mod: YASM_EXPR_SIGNMOD,
- operator.__mul__: YASM_EXPR_MUL,
- operator.mul: YASM_EXPR_MUL,
- operator.__neg__: YASM_EXPR_NEG,
- operator.neg: YASM_EXPR_NEG,
- operator.__not__: YASM_EXPR_LNOT,
- operator.not_: YASM_EXPR_LNOT,
- operator.__or__: YASM_EXPR_OR,
- operator.or_: YASM_EXPR_OR,
- operator.__sub__: YASM_EXPR_SUB,
- operator.sub: YASM_EXPR_SUB,
- operator.__xor__: YASM_EXPR_XOR,
- operator.xor: YASM_EXPR_XOR,
-}
-del operator
-
-cdef class Expression
-cdef object __make_expression(yasm_expr *expr):
- return Expression(PyCObject_FromVoidPtr(expr, NULL))
-
-cdef class Expression:
- cdef yasm_expr *expr
-
- def __new__(self, op, *args, **kwargs):
- self.expr = NULL
-
- if isinstance(op, Expression):
- self.expr = yasm_expr_copy((<Expression>op).expr)
- return
- if PyCObject_Check(op): # should check Desc
- self.expr = <yasm_expr *>PyCObject_AsVoidPtr(op)
- return
-
- cdef size_t numargs
- cdef unsigned long line
-
- op = __op.get(op, op)
- numargs = len(args)
- line = kwargs.get('line', 0)
-
- if numargs == 0 or numargs > 2:
- raise NotImplementedError
- elif numargs == 2:
- self.expr = yasm_expr_create(op, self.__new_item(args[0]),
- self.__new_item(args[1]), line)
- else:
- self.expr = yasm_expr_create(op, self.__new_item(args[0]), NULL,
- line)
-
- cdef yasm_expr__item* __new_item(self, value) except NULL:
- cdef yasm_expr__item *retval
- if isinstance(value, Expression):
- return yasm_expr_expr(yasm_expr_copy((<Expression>value).expr))
- #elif isinstance(value, Symbol):
- # return yasm_expr_sym((<Symbol>value).sym)
- #elif isinstance(value, Register):
- # return yasm_expr_reg((<Register>value).reg)
- elif isinstance(value, FloatNum):
- return yasm_expr_float(yasm_floatnum_copy((<FloatNum>value).flt))
- elif isinstance(value, IntNum):
- return yasm_expr_int(yasm_intnum_copy((<IntNum>value).intn))
- else:
- try:
- intnum = IntNum(value)
- except:
- raise ValueError("Invalid item value type '%s'" % type(value))
- else:
- retval = yasm_expr_int((<IntNum>intnum).intn)
- (<IntNum>intnum).intn = NULL
- return retval
-
- def __dealloc__(self):
- if self.expr != NULL: yasm_expr_destroy(self.expr)
-
- def simplify(self):
- self.expr = yasm_expr_simplify(self.expr, NULL) # TODO: cbd
-
- def extract_segoff(self):
- cdef yasm_expr *retval
- retval = yasm_expr_extract_segoff(&self.expr)
- if retval == NULL:
- raise ValueError("not a SEG:OFF expression")
- return __make_expression(retval)
-
- def extract_wrt(self):
- cdef yasm_expr *retval
- retval = yasm_expr_extract_wrt(&self.expr)
- if retval == NULL:
- raise ValueError("not a WRT expression")
- return __make_expression(retval)
-
- def get_intnum(self):
- cdef yasm_intnum *retval
- retval = yasm_expr_get_intnum(&self.expr, NULL) # TODO: cbd
- if retval == NULL:
- raise ValueError("not an intnum expression")
- return __make_intnum(yasm_intnum_copy(retval))
-
diff --git a/tools/python-yasm/floatnum.pxi b/tools/python-yasm/floatnum.pxi
deleted file mode 100644
index a6ac6f8..0000000
--- a/tools/python-yasm/floatnum.pxi
+++ /dev/null
@@ -1,82 +0,0 @@
-# Python bindings for Yasm: Pyrex input file for floatnum.h
-#
-# Copyright (C) 2006 Michael Urman, Peter Johnson
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cdef extern from "libyasm/floatnum.h":
- cdef void yasm_floatnum_initialize()
- cdef void yasm_floatnum_cleanup()
- cdef yasm_floatnum* yasm_floatnum_create(char *str)
- cdef yasm_floatnum* yasm_floatnum_copy(yasm_floatnum *flt)
- cdef void yasm_floatnum_destroy(yasm_floatnum *flt)
- cdef void yasm_floatnum_calc(yasm_floatnum *acc, yasm_expr_op op,
- yasm_floatnum *operand, size_t line)
- cdef int yasm_floatnum_get_int(yasm_floatnum *flt, size_t *ret_val)
- cdef int yasm_floatnum_get_sized(yasm_floatnum *flt, unsigned char *ptr,
- size_t destsize, size_t valsize, size_t shift, int
- bigendian, int warn, size_t line)
- cdef int yasm_floatnum_check_size(yasm_floatnum *flt, size_t size)
- cdef void yasm_floatnum_print(yasm_floatnum *flt, FILE *f)
-
-cdef class FloatNum:
- cdef yasm_floatnum *flt
- def __new__(self, value):
- self.flt = NULL
- if isinstance(value, FloatNum):
- self.flt = yasm_floatnum_copy((<FloatNum>value).flt)
- return
- if PyCObject_Check(value): # should check Desc
- self.flt = <yasm_floatnum *>PyCObject_AsVoidPtr(value)
- return
-
- if isinstance(value, float): string = str(float)
- else: string = value
- self.flt = yasm_floatnum_create(string)
-
- def __dealloc__(self):
- if self.flt != NULL: yasm_floatnum_destroy(self.flt)
-
- def __op(self, op, o):
- if isinstance(o, FloatNum): rhs = o
- else: rhs = FloatNum(o)
- lhs = FloatNum(self)
- yasm_floatnum_calc((<FloatNum>lhs).flt, op, (<FloatNum>rhs).flt, 0)
- return lhs
-
- def __add__(FloatNum self, o): return self.__op(YASM_EXPR_ADD, o)
- def __sub__(FloatNum self, o): return self.__op(YASM_EXPR_SUB, o)
- def __mul__(FloatNum self, o): return self.__op(YASM_EXPR_MUL, o)
- def __div__(FloatNum self, o): return self.__op(YASM_EXPR_SIGNDIV, o)
- def __floordiv__(FloatNum self, o): return self.__op(YASM_EXPR_SIGNDIV, o)
- def __mod__(FloatNum self, o): return self.__op(YASM_EXPR_SIGNMOD, o)
- def __neg__(FloatNum self): return self.__op(YASM_EXPR_NEG, o)
- def __pos__(FloatNum self): return self
- #def __abs__(FloatNum self): return self
- #def __nonzero__(FloatNum self): return not yasm_floatnum_is_zero(self.intn)
- def __invert__(FloatNum self): return self.__op(YASM_EXPR_NOT, o)
- #def __lshift__(FloatNum self, o)
- #def __rshift__(FloatNum self, o)
- def __and__(FloatNum self, o): return self.__op(YASM_EXPR_AND, o)
- def __or__(FloatNum self, o): return self.__op(YASM_EXPR_OR, o)
- def __xor__(FloatNum self, o): return self.__op(YASM_EXPR_XOR, o)
-
diff --git a/tools/python-yasm/intnum.pxi b/tools/python-yasm/intnum.pxi
deleted file mode 100644
index 5a8433d..0000000
--- a/tools/python-yasm/intnum.pxi
+++ /dev/null
@@ -1,137 +0,0 @@
-# Python bindings for Yasm: Pyrex input file for intnum.h
-#
-# Copyright (C) 2006 Michael Urman, Peter Johnson
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cdef extern from "libyasm/intnum.h":
- cdef void yasm_intnum_initialize()
- cdef void yasm_intnum_cleanup()
- cdef yasm_intnum *yasm_intnum_create_dec(char *str, unsigned long line)
- cdef yasm_intnum *yasm_intnum_create_bin(char *str, unsigned long line)
- cdef yasm_intnum *yasm_intnum_create_oct(char *str, unsigned long line)
- cdef yasm_intnum *yasm_intnum_create_hex(char *str, unsigned long line)
- cdef yasm_intnum *yasm_intnum_create_charconst_nasm(char *str,
- unsigned long line)
- cdef yasm_intnum *yasm_intnum_create_uint(unsigned long i)
- cdef yasm_intnum *yasm_intnum_create_int(long i)
- cdef yasm_intnum *yasm_intnum_create_leb128(unsigned char *ptr,
- int sign, unsigned long *size, unsigned long line)
- cdef yasm_intnum *yasm_intnum_copy(yasm_intnum *intn)
- cdef void yasm_intnum_destroy(yasm_intnum *intn)
- cdef void yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op,
- yasm_intnum *operand, unsigned long line)
- cdef void yasm_intnum_zero(yasm_intnum *intn)
- cdef void yasm_intnum_set_uint(yasm_intnum *intn, unsigned long val)
- cdef int yasm_intnum_is_zero(yasm_intnum *acc)
- cdef int yasm_intnum_is_pos1(yasm_intnum *acc)
- cdef int yasm_intnum_is_neg1(yasm_intnum *acc)
- cdef int yasm_intnum_sign(yasm_intnum *acc)
- cdef unsigned long yasm_intnum_get_uint(yasm_intnum *intn)
- cdef long yasm_intnum_get_int(yasm_intnum *intn)
- cdef void yasm_intnum_get_sized(yasm_intnum *intn, unsigned char *ptr,
- size_t destsize, size_t valsize, int shift, int bigendian, int warn,
- unsigned long line)
- cdef int yasm_intnum_check_size(yasm_intnum *intn, size_t size,
- size_t rshift, int rangetype)
- cdef unsigned long yasm_intnum_get_leb128(yasm_intnum *intn,
- unsigned char *ptr, int sign)
- cdef unsigned long yasm_intnum_size_leb128(yasm_intnum *intn,
- int sign)
- cdef unsigned long yasm_get_sleb128(long v, unsigned char *ptr)
- cdef unsigned long yasm_size_sleb128(long v)
- cdef unsigned long yasm_get_uleb128(unsigned long v, unsigned char *ptr)
- cdef unsigned long yasm_size_uleb128(unsigned long v)
- cdef void yasm_intnum_print(yasm_intnum *intn, FILE *f)
-
-# TODO: rework __new__ / __int__ / __long__ to support > int values
-cdef class IntNum:
- cdef yasm_intnum *intn
-
- def __new__(self, value, base=None):
- self.intn = NULL
-
- if isinstance(value, IntNum):
- self.intn = yasm_intnum_copy((<IntNum>value).intn)
- return
- if PyCObject_Check(value): # should check Desc
- self.intn = <yasm_intnum *>PyCObject_AsVoidPtr(value)
- return
-
- val = None
- if isinstance(value, str):
- val = int(value, base)
- elif isinstance(value, (int, long)):
- val = value
-
- if val is None:
- raise ValueError
-
- if val < 0:
- self.intn = yasm_intnum_create_int(val)
- else:
- self.intn = yasm_intnum_create_uint(val)
-
- def __dealloc__(self):
- if self.intn != NULL: yasm_intnum_destroy(self.intn)
-
- def __int__(self):
- if yasm_intnum_sign(self.intn) < 0:
- return yasm_intnum_get_int(self.intn)
- else:
- return yasm_intnum_get_uint(self.intn)
-
- def __repr__(self):
- return str(int(self))
-
- def __op(self, op, o=None):
- lhs = IntNum(self)
- if o is None:
- yasm_intnum_calc((<IntNum>lhs).intn, op, NULL, 0)
- else:
- if isinstance(o, IntNum): rhs = o
- else: rhs = IntNum(o)
- yasm_intnum_calc((<IntNum>lhs).intn, op, (<IntNum>rhs).intn, 0)
- return lhs
-
- def __add__(IntNum self, o): return self.__op(YASM_EXPR_ADD, o)
- def __sub__(IntNum self, o): return self.__op(YASM_EXPR_SUB, o)
- def __mul__(IntNum self, o): return self.__op(YASM_EXPR_MUL, o)
- def __div__(IntNum self, o): return self.__op(YASM_EXPR_SIGNDIV, o)
- def __floordiv__(IntNum self, o): return self.__op(YASM_EXPR_SIGNDIV, o)
- def __mod__(IntNum self, o): return self.__op(YASM_EXPR_SIGNMOD, o)
- def __neg__(IntNum self): return self.__op(YASM_EXPR_NEG)
- def __pos__(IntNum self): return self
- def __abs__(IntNum self):
- if yasm_intnum_sign(self.intn) >= 0: return self
- else: return self.__op(YASM_EXPR_NEG)
- def __nonzero__(IntNum self): return not yasm_intnum_is_zero(self.intn)
- def __invert__(IntNum self): return self.__op(YASM_EXPR_NOT)
- #def __lshift__(IntNum self, o)
- #def __rshift__(IntNum self, o)
- def __and__(IntNum self, o): return self.__op(YASM_EXPR_AND, o)
- def __or__(IntNum self, o): return self.__op(YASM_EXPR_OR, o)
- def __xor__(IntNum self, o): return self.__op(YASM_EXPR_XOR, o)
-
-cdef object __make_intnum(yasm_intnum *intn):
- return IntNum(PyCObject_FromVoidPtr(intn, NULL))
-
diff --git a/tools/python-yasm/setup.py b/tools/python-yasm/setup.py
deleted file mode 100644
index ffc0e0c..0000000
--- a/tools/python-yasm/setup.py
+++ /dev/null
@@ -1,89 +0,0 @@
-#! /usr/bin/env python
-# Build Python extension with configuration file input
-#
-# Copyright (C) 2006 Peter Johnson
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-from distutils.core import setup
-from distutils.extension import Extension
-from Pyrex.Distutils import build_ext
-from os.path import basename, join, exists
-
-def ReadSetup(filename):
- """ReadSetup goes through filename and parses out the values stored
- in the file. Values need to be stored in a
- \"key=value format\""""
- return dict(line.split('=', 1) for line in open(filename))
-
-def ParseCPPFlags(flags):
- """parse the CPPFlags macro"""
- incl_dir = [x[2:] for x in flags.split() if x.startswith("-I")]
- cppflags = [x for x in flags.split() if not x.startswith("-I")]
- return (incl_dir, cppflags)
-
-def ParseSources(src, srcdir):
- """parse the Sources macro"""
- # do the dance of detecting if the source file is in the current
- # directory, and if it's not, prepend srcdir
- sources = []
- for tok in src.split():
- if tok.endswith(".c"):
- fn = tok
- elif tok.endswith(".y"):
- fn = basename(tok)[:-2] + ".c"
- else:
- continue
- if not exists(fn):
- fn = join(srcdir, fn)
- sources.append(fn)
-
- return sources
-
-def RunSetup(incldir, cppflags, sources):
- setup(
- name='yasm',
- version='0.0',
- description='Python bindings for Yasm',
- author='Michael Urman, Peter Johnson',
- url='http://www.tortall.net/projects/yasm',
- ext_modules=[
- Extension('yasm',
- sources=sources,
- extra_compile_args=cppflags,
- include_dirs=incldir,
- library_dirs=['.'],
- libraries=['yasm'],
- ),
- ],
- cmdclass = dict(build_ext=build_ext),
- )
-
-if __name__ == "__main__":
- opts = ReadSetup("python-setup.txt")
- incldir, cppflags = ParseCPPFlags(opts["includes"])
- sources = ParseSources(opts["sources"], opts["srcdir"].strip())
- sources.append('yasm_python.c')
- if opts["gcc"].strip() == "yes":
- cppflags.append('-w')
- RunSetup(incldir, cppflags, sources)
-
diff --git a/tools/python-yasm/symrec.pxi b/tools/python-yasm/symrec.pxi
deleted file mode 100644
index 4ba76f6..0000000
--- a/tools/python-yasm/symrec.pxi
+++ /dev/null
@@ -1,136 +0,0 @@
-# Python bindings for Yasm: Pyrex input file for symrec.h
-#
-# Copyright (C) 2006 Michael Urman, Peter Johnson
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cdef extern from "libyasm/symrec.h":
- cdef yasm_symtab* yasm_symtab_create()
- cdef void yasm_symtab_destroy(yasm_symtab *symtab)
- cdef yasm_symrec* yasm_symtab_use(yasm_symtab *symtab, char *name,
- unsigned long line)
- cdef yasm_symrec* yasm_symtab_get(yasm_symtab *symtab, char *name)
- cdef yasm_symrec* yasm_symtab_define_equ(yasm_symtab *symtab,
- char *name, yasm_expr *e, unsigned long line)
- cdef yasm_symrec* yasm_symtab_define_label(yasm_symtab *symtab,
- char *name, yasm_bytecode *precbc, int in_table, unsigned long line)
- cdef yasm_symrec* yasm_symtab_define_curpos(yasm_symtab *symtab, char *name,
- yasm_bytecode *precbc, unsigned long line)
- cdef yasm_symrec* yasm_symtab_define_special(yasm_symtab *symtab,
- char *name, yasm_sym_vis vis)
- cdef yasm_symrec* yasm_symtab_declare(yasm_symtab *symtab,
- char *name, yasm_sym_vis vis, unsigned long line)
- cdef void yasm_symrec_declare(yasm_symrec *symrec, yasm_sym_vis vis,
- unsigned long line)
-
- ctypedef int (*yasm_symtab_traverse_callback)(yasm_symrec *sym, void *d)
-
- cdef int yasm_symtab_traverse(yasm_symtab *symtab, void *d,
- yasm_symtab_traverse_callback func)
- cdef void yasm_symtab_parser_finalize(yasm_symtab *symtab,
- int undef_extern, yasm_objfmt *objfmt)
- cdef void yasm_symtab_print(yasm_symtab *symtab, FILE *f, int indent_level)
- cdef char* yasm_symrec_get_name(yasm_symrec *sym)
- cdef yasm_sym_vis yasm_symrec_get_visibility(yasm_symrec *sym)
- cdef yasm_expr* yasm_symrec_get_equ(yasm_symrec *sym)
-
- ctypedef yasm_bytecode *yasm_symrec_get_label_bytecodep
-
- cdef int yasm_symrec_get_label(yasm_symrec *sym,
- yasm_symrec_get_label_bytecodep *precbc)
- cdef int yasm_symrec_is_special(yasm_symrec *sym)
- cdef void* yasm_symrec_get_data(yasm_symrec *sym,
- yasm_assoc_data_callback *callback)
- cdef void yasm_symrec_add_data(yasm_symrec *sym,
- yasm_assoc_data_callback *callback, void *data)
- cdef void yasm_symrec_print(yasm_symrec *sym, FILE *f, int indent_level)
-
-cdef class Symbol:
- cdef yasm_symrec *sym
-
- def __new__(self, symrec):
- self.sym = NULL
- if PyCObject_Check(symrec): # should check Desc
- self.sym = <yasm_symrec *>PyCObject_AsVoidPtr(symrec)
- else:
- raise NotImplementedError
-
- # no deref or destroy necessary
-
- def get_name(self): return yasm_symrec_get_name(self.sym)
- def get_visibility(self): return yasm_symrec_get_visibility(self.sym)
- def get_equ(self):
- return __make_expression(yasm_expr_copy(yasm_symrec_get_equ(self.sym)))
- def get_label(self):
- cdef yasm_symrec_get_label_bytecodep bc
- if yasm_symrec_get_label(self.sym, &bc): pass # TODO
- #return Bytecode(bc)
- else: raise TypeError("Symbol '%s' is not a label" % self.get_name())
-
- def get_is_special(self):
- return yasm_symrec_is_special(self.sym)
-
- def get_data(self): pass # TODO
- #return <object>(yasm_symrec_get_data(self.sym, PyYasmAssocData))
-
- def set_data(self, data): pass # TODO
- #yasm_symrec_set_data(self.sym, PyYasmAssocData, data)
-
-cdef object __make_symbol(yasm_symrec *symrec):
- return Symbol(PyCObject_FromVoidPtr(symrec, NULL))
-
-cdef class Bytecode
-
-cdef class SymbolTable:
- cdef yasm_symtab *symtab
- def __new__(self):
- self.symtab = yasm_symtab_create()
-
- def __dealloc__(self):
- if self.symtab != NULL: yasm_symtab_destroy(self.symtab)
-
- def use(self, name, line):
- return __make_symbol(yasm_symtab_use(self.symtab, name, line))
-
- def define_equ(self, name, expr, line):
- return __make_symbol(yasm_symtab_define_equ(self.symtab, name,
- (<Expression>expr).expr, line))
-
- def define_label(self, name, precbc, in_table, line):
- return __make_symbol(yasm_symtab_define_label(self.symtab, name,
- (<Bytecode>precbc).bc, in_table, line))
-
- def define_special(self, name, vis):
- return __make_symbol(yasm_symtab_define_special(self.symtab, name, vis))
-
- def declare(self, name, vis, line):
- return __make_symbol(yasm_symtab_declare(self.symtab, name, vis, line))
-
- #def traverse(self, func, *args, **kw):
- # return yasm_symtab_traverse(self.symtab, (args, kw), func)
-
- #def parser_finalize(self, undef_extern, objfmt):
- # yasm_symtab_parser_finalize(self.symtab, undef_extern,
- # (<ObjectFormat>objfmt).objfmt)
- #
-
-
diff --git a/tools/python-yasm/value.pxi b/tools/python-yasm/value.pxi
deleted file mode 100644
index 41461c3..0000000
--- a/tools/python-yasm/value.pxi
+++ /dev/null
@@ -1,56 +0,0 @@
-# Python bindings for Yasm: Pyrex input file for value.h
-#
-# Copyright (C) 2006 Michael Urman, Peter Johnson
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cdef extern from "libyasm/value.h":
- cdef void yasm_value_initialize(yasm_value *value, yasm_expr *e)
- cdef void yasm_value_init_sym(yasm_value *value, yasm_symrec *sym)
- cdef void yasm_value_delete(yasm_value *value)
- cdef int yasm_value_finalize(yasm_value *value)
- cdef int yasm_value_finalize_expr(yasm_value *value, yasm_expr *e)
- cdef int yasm_value_output_basic(yasm_value *value, unsigned char *buf,
- size_t destsize, size_t valsize, int shift, yasm_bytecode *bc,
- int warn, yasm_arch *arch, yasm_calc_bc_dist_func calc_bc_dist)
- cdef void yasm_value_print(yasm_value *value, FILE *f, int indent_level)
-
-cdef class Value:
- cdef yasm_value value
- def __new__(self, value=None):
- yasm_value_initialize(&self.value, NULL)
- if value is None:
- pass
- elif isinstance(value, Expression):
- yasm_value_initialize(&self.value,
- yasm_expr_copy((<Expression>value).expr))
- elif isinstance(value, Symbol):
- yasm_value_init_sym(&self.value, (<Symbol>value).sym)
- else:
- raise ValueError("Invalid value type '%s'" % type(value))
-
- def __dealloc__(self):
- yasm_value_delete(&self.value)
-
- def finalize(self):
- return yasm_value_finalize(&self.value)
-
diff --git a/tools/python-yasm/yasm.pyx b/tools/python-yasm/yasm.pyx
deleted file mode 100644
index a92e980..0000000
--- a/tools/python-yasm/yasm.pyx
+++ /dev/null
@@ -1,70 +0,0 @@
-# Python bindings for Yasm: Main Pyrex input file
-#
-# Copyright (C) 2006 Michael Urman, Peter Johnson
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-cdef extern from "Python.h":
- cdef object PyCObject_FromVoidPtr(void *cobj, void (*destr)(void *))
- cdef object PyCObject_FromVoidPtrAndDesc(void *cobj, void *desc,
- void (*destr)(void *, void *))
- cdef int PyCObject_Check(object)
- cdef void *PyCObject_AsVoidPtr(object)
- cdef void *PyCObject_GetDesc(object)
-
-cdef extern from "libyasm/compat-queue.h":
- pass
-
-cdef class Register:
- cdef unsigned long reg
- def __new__(self, reg):
- self.reg = reg
-
-include "coretype.pxi"
-
-include "intnum.pxi"
-include "floatnum.pxi"
-include "expr.pxi"
-include "symrec.pxi"
-include "value.pxi"
-
-include "bytecode.pxi"
-
-
-cdef extern from "libyasm/bitvect.h":
- cdef void BitVector_Boot()
- cdef void BitVector_Shutdown()
-
-def __initialize():
- BitVector_Boot()
- yasm_intnum_initialize()
- yasm_floatnum_initialize()
-
-def __cleanup():
- yasm_floatnum_cleanup()
- yasm_intnum_cleanup()
- BitVector_Shutdown()
-
-__initialize()
-import atexit
-atexit.register(__cleanup)
-