version them.
* parser.h, dbgfmt.h, objfmt.h, listfmt.h, optimizer.h, preproc.h, arch.h:
Remove YASM_xxx_VERSION and version module structure member.
* (many) .c: Don't initialize version module structure member.
svn path=/trunk/yasm/; revision=1184
const char *keyword;
} yasm_arch_machine;
-/** Version number of #yasm_arch_module interface. Any functional change to
- * the #yasm_arch_module interface should simultaneously increment this number.
- * This version should be checked by #yasm_arch_module loaders (using
- * yasm_arch_module_get_version()) to verify that the expected version (the
- * version defined by its libyasm header files) matches the loaded module
- * version (the version defined by the module's libyasm header files). Doing
- * this will ensure that the module version's function definitions match the
- * module loader's function definitions. The version number must never be
- * decreased.
- */
-#define YASM_ARCH_VERSION 4
-
/** YASM architecture module interface.
* \note All "data" in parser-related functions (yasm_arch_parse_*) needs to
* start the parse initialized to 0 to make it okay for a parser-related
* called before on the same piece of data.
*/
typedef struct yasm_arch_module {
- /** Version (see #YASM_ARCH_VERSION). Should always be set to
- * #YASM_ARCH_VERSION by the module source and checked against
- * #YASM_ARCH_VERSION by the module loader.
- */
- unsigned int version;
-
/** One-line description of the architecture.
* Call yasm_arch_name() to get the name of a particular #yasm_arch.
*/
} yasm_dbgfmt_base;
#endif
-/** Version number of #yasm_dbgfmt_module interface. Any functional change to
- * the #yasm_dbgfmt_module interface should simultaneously increment this
- * number. This version should be checked by #yasm_dbgfmt loaders to verify
- * that the expected version (the version defined by its libyasm header files)
- * matches the loaded module version (the version defined by the module's
- * libyasm header files). Doing this will ensure that the module version's
- * function definitions match the module loader's function definitions. The
- * version number must never be decreased.
- */
-#define YASM_DBGFMT_VERSION 3
-
/** YASM debug format module interface. */
typedef struct yasm_dbgfmt_module {
- /** Version (see #YASM_DBGFMT_VERSION). Should always be set to
- * #YASM_DBGFMT_VERSION by the module source and checked against
- * #YASM_DBGFMT_VERSION by the module loader.
- */
- unsigned int version;
-
/** One-line description of the debug format. */
const char *name;
} yasm_listfmt_base;
#endif
-/** Version number of #yasm_listfmt_module interface. Any functional change
- * to the #yasm_listfmt_module interface should simultaneously increment this
- * number. This version should be checked by #yasm_listfmt loaders to verify
- * that the expected version (the version defined by its libyasm header files)
- * matches the loaded module version (the version defined by the module's
- * libyasm header files). Doing this will ensure that the module version's
- * function definitions match the module loader's function definitions. The
- * version number must never be decreased.
- */
-#define YASM_LISTFMT_VERSION 0
-
/** YASM list format module interface. */
typedef struct yasm_listfmt_module {
- /** Version (see #YASM_LISTFMT_VERSION). Should always be set to
- * #YASM_LISTFMT_VERSION by the module source and checked against
- * #YASM_LISTFMT_VERSION by the module loader.
- */
- unsigned int version;
-
/** One-line description of the list format. */
const char *name;
} yasm_objfmt_base;
#endif
-/** Version number of #yasm_objfmt_module interface. Any functional change to
- * the #yasm_objfmt_module interface should simultaneously increment this
- * number. This version should be checked by #yasm_objfmt loaders to verify
- * that the expected version (the version defined by its libyasm header files)
- * matches the loaded module version (the version defined by the module's
- * libyasm header files). Doing this will ensure that the module version's
- * function definitions match the module loader's function definitions. The
- * version number must never be decreased.
- */
-#define YASM_OBJFMT_VERSION 1
-
/** YASM object format module interface. */
typedef struct yasm_objfmt_module {
- /** Version (see #YASM_OBJFMT_VERSION). Should always be set to
- * #YASM_OBJFMT_VERSION by the module source and checked against
- * #YASM_OBJFMT_VERSION by the module loader.
- */
- unsigned int version;
-
/** One-line description of the object format. */
const char *name;
#ifndef YASM_OPTIMIZER_H
#define YASM_OPTIMIZER_H
-/** Version number of #yasm_optimizer_module interface. Any functional change
- * to the #yasm_optimizer_module interface should simultaneously increment this
- * number. This version should be checked by #yasm_optimizer loaders to verify
- * that the expected version (the version defined by its libyasm header files)
- * matches the loaded module version (the version defined by the module's
- * libyasm header files). Doing this will ensure that the module version's
- * function definitions match the module loader's function definitions. The
- * version number must never be decreased.
- */
-#define YASM_OPTIMIZER_VERSION 1
-
/** YASM optimizer module interface. */
typedef struct yasm_optimizer_module {
- /** Version (see #YASM_OPTIMIZER_VERSION). Should always be set to
- * #YASM_OPTIMIZER_VERSION by the module source and checked against
- * #YASM_OPTIMIZER_VERSION by the module loader.
- */
- unsigned int version;
-
/** One-line description of the optimizer */
const char *name;
#ifndef YASM_PARSER_H
#define YASM_PARSER_H
-/** Version number of #yasm_parser_module interface. Any functional change to
- * the #yasm_parser_module interface should simultaneously increment this
- * number. This version should be checked by #yasm_parser_module loaders to
- * verify that the expected version (the version defined by its libyasm header
- * files) matches the loaded module version (the version defined by the
- * module's libyasm header files). Doing this will ensure that the module
- * version's function definitions match the module loader's function
- * definitions. The version number must never be decreased.
- */
-#define YASM_PARSER_VERSION 1
-
/** YASM parser module interface. The "front end" of the assembler. */
typedef struct yasm_parser_module {
- /** Version (see #YASM_PARSER_VERSION). Should always be set to
- * #YASM_PARSER_VERSION by the module source and checked against
- * #YASM_PARSER_VERSION by the module loader.
- */
- unsigned int version;
-
/** One-line description of the parser */
const char *name;
} yasm_preproc_base;
#endif
-/** Version number of #yasm_preproc_module interface. Any functional change to
- * the #yasm_preproc_module interface should simultaneously increment this
- * number. This version should be checked by #yasm_preproc loaders to verify
- * that the expected version (the version defined by its libyasm header files)
- * matches the loaded module version (the version defined by the module's
- * libyasm header files). Doing this will ensure that the module version's
- * function definitions match the module loader's function definitions. The
- * version number must never be decreased.
- */
-#define YASM_PREPROC_VERSION 2
-
/** YASM preprocesor module interface. */
typedef struct yasm_preproc_module {
- /** Version (see #YASM_PREPROC_VERSION). Should always be set to
- * #YASM_PREPROC_VERSION by the module source and checked against
- * #YASM_PREPROC_VERSION by the module loader.
- */
- unsigned int version;
-
/** One-line description of the preprocessor. */
const char *name;
/* Define arch structure -- see arch.h for details */
yasm_arch_module yasm_lc3b_LTX_arch = {
- YASM_ARCH_VERSION,
"LC-3b",
"lc3b",
lc3b_create,
/* Define arch structure -- see arch.h for details */
yasm_arch_module yasm_x86_LTX_arch = {
- YASM_ARCH_VERSION,
"x86 (IA-32 and derivatives), AMD64",
"x86",
x86_create,
/* Define dbgfmt structure -- see dbgfmt.h for details */
yasm_dbgfmt_module yasm_null_LTX_dbgfmt = {
- YASM_DBGFMT_VERSION,
"No debugging info",
"null",
null_dbgfmt_create,
/* Define dbgfmt structure -- see dbgfmt.h for details */
yasm_dbgfmt_module yasm_stabs_LTX_dbgfmt = {
- YASM_DBGFMT_VERSION,
"Stabs debugging format",
"stabs",
stabs_dbgfmt_create,
/* Define listfmt structure -- see listfmt.h for details */
yasm_listfmt_module yasm_nasm_LTX_listfmt = {
- YASM_LISTFMT_VERSION,
"NASM-style list format",
"nasm",
nasm_listfmt_create,
/* Define objfmt structure -- see objfmt.h for details */
yasm_objfmt_module yasm_bin_LTX_objfmt = {
- YASM_OBJFMT_VERSION,
"Flat format binary",
"bin",
NULL,
/* Define objfmt structure -- see objfmt.h for details */
yasm_objfmt_module yasm_coff_LTX_objfmt = {
- YASM_OBJFMT_VERSION,
"COFF (DJGPP)",
"coff",
"o",
/* Define objfmt structure -- see objfmt.h for details */
yasm_objfmt_module yasm_win32_LTX_objfmt = {
- YASM_OBJFMT_VERSION,
"Win32",
"win32",
"obj",
/* Define objfmt structure -- see objfmt.h for details */
yasm_objfmt_module yasm_dbg_LTX_objfmt = {
- YASM_OBJFMT_VERSION,
"Trace of all info passed to object format module",
"dbg",
"dbg",
/* Define objfmt structure -- see objfmt.h for details */
yasm_objfmt_module yasm_elf_LTX_objfmt = {
- YASM_OBJFMT_VERSION,
"ELF",
"elf",
"o",
/* Define objfmt structure -- see objfmt.h for details */
yasm_objfmt_module yasm_xdf_LTX_objfmt = {
- YASM_OBJFMT_VERSION,
"Extended Dynamic Object",
"xdf",
"xdf",
/* Define optimizer structure -- see optimizer.h for details */
yasm_optimizer_module yasm_basic_LTX_optimizer = {
- YASM_OPTIMIZER_VERSION,
"Only the most basic optimizations",
"basic",
basic_optimize
/* Define parser structure -- see parser.h for details */
yasm_parser_module yasm_nasm_LTX_parser = {
- YASM_PARSER_VERSION,
"NASM-compatible parser",
"nasm",
nasm_parser_preproc_keywords,
/* Define preproc structure -- see preproc.h for details */
yasm_preproc_module yasm_nasm_LTX_preproc = {
- YASM_PREPROC_VERSION,
"Real NASM Preprocessor",
"nasm",
nasm_preproc_create,
/* Define preproc structure -- see preproc.h for details */
yasm_preproc_module yasm_raw_LTX_preproc = {
- YASM_PREPROC_VERSION,
"Disable preprocessing",
"raw",
raw_preproc_create,