From: Peter Johnson Date: Sat, 15 Sep 2001 07:16:59 +0000 (-0000) Subject: Rename outfmt to objfmt and related files and directories. "objfmt" is more X-Git-Tag: v0.1.0~357 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=074b748ece6fe9385842a94d08d824629bbfe34e;p=yasm Rename outfmt to objfmt and related files and directories. "objfmt" is more descriptive of what the module is actually used for ("output" is rather generic). svn path=/trunk/yasm/; revision=155 --- diff --git a/configure.ac b/configure.ac index cd8eec04..b42dbee9 100644 --- a/configure.ac +++ b/configure.ac @@ -55,4 +55,4 @@ case "$host" in ;; esac -AC_OUTPUT(Makefile intl/Makefile po/Makefile.in src/Makefile src/parsers/Makefile src/parsers/nasm/Makefile src/preprocs/Makefile src/preprocs/raw/Makefile src/outfmts/Makefile src/outfmts/dbg/Makefile) +AC_OUTPUT(Makefile intl/Makefile po/Makefile.in src/Makefile src/parsers/Makefile src/parsers/nasm/Makefile src/preprocs/Makefile src/preprocs/raw/Makefile src/objfmts/Makefile src/objfmts/dbg/Makefile) diff --git a/configure.in b/configure.in index cd8eec04..b42dbee9 100644 --- a/configure.in +++ b/configure.in @@ -55,4 +55,4 @@ case "$host" in ;; esac -AC_OUTPUT(Makefile intl/Makefile po/Makefile.in src/Makefile src/parsers/Makefile src/parsers/nasm/Makefile src/preprocs/Makefile src/preprocs/raw/Makefile src/outfmts/Makefile src/outfmts/dbg/Makefile) +AC_OUTPUT(Makefile intl/Makefile po/Makefile.in src/Makefile src/parsers/Makefile src/parsers/nasm/Makefile src/preprocs/Makefile src/preprocs/raw/Makefile src/objfmts/Makefile src/objfmts/dbg/Makefile) diff --git a/frontends/yasm/yasm.c b/frontends/yasm/yasm.c index b5c2f61c..0ecbe5b1 100644 --- a/frontends/yasm/yasm.c +++ b/frontends/yasm/yasm.c @@ -1,4 +1,4 @@ -/* $Id: yasm.c,v 1.10 2001/08/19 07:46:52 peter Exp $ +/* $Id: yasm.c,v 1.11 2001/09/15 07:16:59 peter Exp $ * Program entry point, command line parsing * * Copyright (C) 2001 Peter Johnson @@ -34,11 +34,11 @@ #include "bytecode.h" #include "section.h" -#include "outfmt.h" +#include "objfmt.h" #include "preproc.h" #include "parser.h" -RCSID("$Id: yasm.c,v 1.10 2001/08/19 07:46:52 peter Exp $"); +RCSID("$Id: yasm.c,v 1.11 2001/09/15 07:16:59 peter Exp $"); char *filename = (char *)NULL; unsigned int line_number = 1; @@ -61,7 +61,7 @@ main(int argc, char *argv[]) filename = strdup(""); } - nasm_parser.doparse(&raw_preproc, &dbg_outfmt, in); + nasm_parser.doparse(&raw_preproc, &dbg_objfmt, in); if (filename) free(filename); diff --git a/libyasm/objfmt.h b/libyasm/objfmt.h index 652276f3..652157c6 100644 --- a/libyasm/objfmt.h +++ b/libyasm/objfmt.h @@ -1,5 +1,5 @@ -/* $Id: objfmt.h,v 1.2 2001/08/19 03:52:58 peter Exp $ - * Output format module interface header file +/* $Id: objfmt.h,v 1.3 2001/09/15 07:16:59 peter Exp $ + * Object format module interface header file * * Copyright (C) 2001 Peter Johnson * @@ -19,11 +19,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef YASM_OUTFMT_H -#define YASM_OUTFMT_H +#ifndef YASM_OBJFMT_H +#define YASM_OBJFMT_H -/* Interface to the output format module(s) */ -typedef struct outfmt_s { +/* Interface to the object format module(s) */ +typedef struct objfmt_s { /* one-line description of the format */ char *name; @@ -31,7 +31,7 @@ typedef struct outfmt_s { char *keyword; /* NULL-terminated list of debugging formats that are valid to use with - * this output format. + * this object format. */ /* struct debugfmt_s **debugfmts;*/ @@ -39,9 +39,9 @@ typedef struct outfmt_s { * use) */ /* struct debugfmt_s *default_df;*/ -} outfmt; +} objfmt; -/* Available output formats */ -extern outfmt dbg_outfmt; +/* Available object formats */ +extern objfmt dbg_objfmt; #endif diff --git a/libyasm/parser.h b/libyasm/parser.h index f844643e..affff6fd 100644 --- a/libyasm/parser.h +++ b/libyasm/parser.h @@ -1,4 +1,4 @@ -/* $Id: parser.h,v 1.2 2001/08/19 03:52:58 peter Exp $ +/* $Id: parser.h,v 1.3 2001/09/15 07:16:59 peter Exp $ * Parser module interface header file * * Copyright (C) 2001 Peter Johnson @@ -41,7 +41,7 @@ typedef struct parser_s { /* Main entrance point for the parser. * - * The parser needs access to both the output format module (for format- + * The parser needs access to both the object format module (for format- * specific directives and segment names), and the selected preprocessor * (which should naturally be in the preprocs list above). * @@ -55,7 +55,7 @@ typedef struct parser_s { * Note that calling this has many side effects in the output format * module: sections and variables are declared, etc. */ - section *(*doparse) (preproc *pp, outfmt *of, FILE *f); + section *(*doparse) (preproc *pp, objfmt *of, FILE *f); } parser; /* Available parsers */ diff --git a/libyasm/preproc.h b/libyasm/preproc.h index 2e884fbd..9ee4d3d3 100644 --- a/libyasm/preproc.h +++ b/libyasm/preproc.h @@ -1,4 +1,4 @@ -/* $Id: preproc.h,v 1.2 2001/08/19 03:52:58 peter Exp $ +/* $Id: preproc.h,v 1.3 2001/09/15 07:16:59 peter Exp $ * Preprocessor module interface header file * * Copyright (C) 2001 Peter Johnson @@ -32,14 +32,14 @@ typedef struct preproc_s { /* Initializes preprocessor. * - * The preprocessor needs access to the output format module to find out + * The preprocessor needs access to the object format module to find out * any output format specific macros. * * This function also takes the FILE * to the initial starting file, but * not the filename (which is in a global variable and is not * preprocessor-specific). */ - void (*initialize) (outfmt *of, FILE *f); + void (*initialize) (objfmt *of, FILE *f); /* Gets more preprocessed source code (up to max_size bytes) into buf. * Note that more than a single line may be returned in buf. */ diff --git a/modules/objfmts/dbg/Makefile.am b/modules/objfmts/dbg/Makefile.am index 0ab845cb..206fe185 100644 --- a/modules/objfmts/dbg/Makefile.am +++ b/modules/objfmts/dbg/Makefile.am @@ -1,7 +1,7 @@ -noinst_LIBRARIES = liboutfmt.a +noinst_LIBRARIES = libobjfmt.a -liboutfmt_a_SOURCES = \ - outfmt.c +libobjfmt_a_SOURCES = \ + objfmt.c INCLUDES = \ -I$(top_srcdir)/src \ diff --git a/modules/objfmts/dbg/dbg-objfmt.c b/modules/objfmts/dbg/dbg-objfmt.c index eb41ca43..fb7b14fd 100644 --- a/modules/objfmts/dbg/dbg-objfmt.c +++ b/modules/objfmts/dbg/dbg-objfmt.c @@ -1,5 +1,5 @@ -/* $Id: dbg-objfmt.c,v 1.3 2001/08/19 07:46:52 peter Exp $ - * Debugging output format (used to debug output format module interface) +/* $Id: dbg-objfmt.c,v 1.4 2001/09/15 07:16:59 peter Exp $ + * Debugging object format (used to debug object format module interface) * * Copyright (C) 2001 Peter Johnson * @@ -25,12 +25,12 @@ #include "util.h" -#include "outfmt.h" +#include "objfmt.h" -RCSID("$Id: dbg-objfmt.c,v 1.3 2001/08/19 07:46:52 peter Exp $"); +RCSID("$Id: dbg-objfmt.c,v 1.4 2001/09/15 07:16:59 peter Exp $"); -/* Define outfmt structure -- see outfmt.h for details */ -outfmt dbg_outfmt = { - "Trace of all info passed to output format module", +/* Define objfmt structure -- see objfmt.h for details */ +objfmt dbg_objfmt = { + "Trace of all info passed to object format module", "dbg" }; diff --git a/modules/objfmts/dbg/objfmt.c b/modules/objfmts/dbg/objfmt.c index 74eef231..82c67358 100644 --- a/modules/objfmts/dbg/objfmt.c +++ b/modules/objfmts/dbg/objfmt.c @@ -1,5 +1,5 @@ -/* $Id: objfmt.c,v 1.3 2001/08/19 07:46:52 peter Exp $ - * Debugging output format (used to debug output format module interface) +/* $Id: objfmt.c,v 1.4 2001/09/15 07:16:59 peter Exp $ + * Debugging object format (used to debug object format module interface) * * Copyright (C) 2001 Peter Johnson * @@ -25,12 +25,12 @@ #include "util.h" -#include "outfmt.h" +#include "objfmt.h" -RCSID("$Id: objfmt.c,v 1.3 2001/08/19 07:46:52 peter Exp $"); +RCSID("$Id: objfmt.c,v 1.4 2001/09/15 07:16:59 peter Exp $"); -/* Define outfmt structure -- see outfmt.h for details */ -outfmt dbg_outfmt = { - "Trace of all info passed to output format module", +/* Define objfmt structure -- see objfmt.h for details */ +objfmt dbg_objfmt = { + "Trace of all info passed to object format module", "dbg" }; diff --git a/modules/objfmts/dbg/outfmt.c b/modules/objfmts/dbg/outfmt.c deleted file mode 100644 index ec5de2b5..00000000 --- a/modules/objfmts/dbg/outfmt.c +++ /dev/null @@ -1,36 +0,0 @@ -/* $Id: outfmt.c,v 1.3 2001/08/19 07:46:52 peter Exp $ - * Debugging output format (used to debug output format module interface) - * - * Copyright (C) 2001 Peter Johnson - * - * This file is part of YASM. - * - * YASM is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * YASM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "util.h" - -#include "outfmt.h" - -RCSID("$Id: outfmt.c,v 1.3 2001/08/19 07:46:52 peter Exp $"); - -/* Define outfmt structure -- see outfmt.h for details */ -outfmt dbg_outfmt = { - "Trace of all info passed to output format module", - "dbg" -}; diff --git a/modules/parsers/nasm/nasm-parser.c b/modules/parsers/nasm/nasm-parser.c index 87d05989..8f4c4370 100644 --- a/modules/parsers/nasm/nasm-parser.c +++ b/modules/parsers/nasm/nasm-parser.c @@ -1,4 +1,4 @@ -/* $Id: nasm-parser.c,v 1.6 2001/08/19 07:46:52 peter Exp $ +/* $Id: nasm-parser.c,v 1.7 2001/09/15 07:16:59 peter Exp $ * NASM-compatible parser * * Copyright (C) 2001 Peter Johnson @@ -29,11 +29,11 @@ #include "bytecode.h" #include "section.h" -#include "outfmt.h" +#include "objfmt.h" #include "preproc.h" #include "parser.h" -RCSID("$Id: nasm-parser.c,v 1.6 2001/08/19 07:46:52 peter Exp $"); +RCSID("$Id: nasm-parser.c,v 1.7 2001/09/15 07:16:59 peter Exp $"); extern FILE *nasm_parser_in; extern int nasm_parser_debug; @@ -43,7 +43,7 @@ extern int nasm_parser_parse(void); int (*nasm_parser_yyinput) (char *buf, int max_size); static section * -doparse(preproc *pp, outfmt *of, FILE *f) +doparse(preproc *pp, objfmt *of, FILE *f) { pp->initialize(of, f); nasm_parser_in = f; diff --git a/modules/parsers/nasm/parser.c b/modules/parsers/nasm/parser.c index 6ec060bd..23da8f2b 100644 --- a/modules/parsers/nasm/parser.c +++ b/modules/parsers/nasm/parser.c @@ -1,4 +1,4 @@ -/* $Id: parser.c,v 1.6 2001/08/19 07:46:52 peter Exp $ +/* $Id: parser.c,v 1.7 2001/09/15 07:16:59 peter Exp $ * NASM-compatible parser * * Copyright (C) 2001 Peter Johnson @@ -29,11 +29,11 @@ #include "bytecode.h" #include "section.h" -#include "outfmt.h" +#include "objfmt.h" #include "preproc.h" #include "parser.h" -RCSID("$Id: parser.c,v 1.6 2001/08/19 07:46:52 peter Exp $"); +RCSID("$Id: parser.c,v 1.7 2001/09/15 07:16:59 peter Exp $"); extern FILE *nasm_parser_in; extern int nasm_parser_debug; @@ -43,7 +43,7 @@ extern int nasm_parser_parse(void); int (*nasm_parser_yyinput) (char *buf, int max_size); static section * -doparse(preproc *pp, outfmt *of, FILE *f) +doparse(preproc *pp, objfmt *of, FILE *f) { pp->initialize(of, f); nasm_parser_in = f; diff --git a/modules/preprocs/raw/preproc.c b/modules/preprocs/raw/preproc.c index f93d3b3d..3cd780b4 100644 --- a/modules/preprocs/raw/preproc.c +++ b/modules/preprocs/raw/preproc.c @@ -1,4 +1,4 @@ -/* $Id: preproc.c,v 1.6 2001/08/30 03:45:26 peter Exp $ +/* $Id: preproc.c,v 1.7 2001/09/15 07:16:59 peter Exp $ * Raw preprocessor (preforms NO preprocessing) * * Copyright (C) 2001 Peter Johnson @@ -32,10 +32,10 @@ #include "errwarn.h" -#include "outfmt.h" +#include "objfmt.h" #include "preproc.h" -RCSID("$Id: preproc.c,v 1.6 2001/08/30 03:45:26 peter Exp $"); +RCSID("$Id: preproc.c,v 1.7 2001/09/15 07:16:59 peter Exp $"); static int is_interactive; static FILE *in; @@ -43,7 +43,7 @@ static FILE *in; int isatty(int); static void -initialize(outfmt *of, FILE *f) +initialize(objfmt *of, FILE *f) { in = f; is_interactive = f ? (isatty(fileno(f)) > 0) : 0; diff --git a/modules/preprocs/raw/raw-preproc.c b/modules/preprocs/raw/raw-preproc.c index 1bb5dc4c..bcc859bb 100644 --- a/modules/preprocs/raw/raw-preproc.c +++ b/modules/preprocs/raw/raw-preproc.c @@ -1,4 +1,4 @@ -/* $Id: raw-preproc.c,v 1.6 2001/08/30 03:45:26 peter Exp $ +/* $Id: raw-preproc.c,v 1.7 2001/09/15 07:16:59 peter Exp $ * Raw preprocessor (preforms NO preprocessing) * * Copyright (C) 2001 Peter Johnson @@ -32,10 +32,10 @@ #include "errwarn.h" -#include "outfmt.h" +#include "objfmt.h" #include "preproc.h" -RCSID("$Id: raw-preproc.c,v 1.6 2001/08/30 03:45:26 peter Exp $"); +RCSID("$Id: raw-preproc.c,v 1.7 2001/09/15 07:16:59 peter Exp $"); static int is_interactive; static FILE *in; @@ -43,7 +43,7 @@ static FILE *in; int isatty(int); static void -initialize(outfmt *of, FILE *f) +initialize(objfmt *of, FILE *f) { in = f; is_interactive = f ? (isatty(fileno(f)) > 0) : 0; diff --git a/src/Makefile.am b/src/Makefile.am index 91425586..004f162a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = parsers preprocs outfmts +SUBDIRS = parsers preprocs objfmts INCLUDES = -I$(top_srcdir)/intl @@ -17,14 +17,14 @@ yasm_SOURCES = \ globals.h \ util.h \ section.h \ - outfmt.h \ + objfmt.h \ preproc.h \ parser.h yasm_LDADD = \ parsers/nasm/libparser.a \ preprocs/raw/libpreproc.a \ - outfmts/dbg/liboutfmt.a \ + objfmts/dbg/libobjfmt.a \ $(INTLLIBS) if DEV diff --git a/src/main.c b/src/main.c index 17f52681..b333aa88 100644 --- a/src/main.c +++ b/src/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.10 2001/08/19 07:46:52 peter Exp $ +/* $Id: main.c,v 1.11 2001/09/15 07:16:59 peter Exp $ * Program entry point, command line parsing * * Copyright (C) 2001 Peter Johnson @@ -34,11 +34,11 @@ #include "bytecode.h" #include "section.h" -#include "outfmt.h" +#include "objfmt.h" #include "preproc.h" #include "parser.h" -RCSID("$Id: main.c,v 1.10 2001/08/19 07:46:52 peter Exp $"); +RCSID("$Id: main.c,v 1.11 2001/09/15 07:16:59 peter Exp $"); char *filename = (char *)NULL; unsigned int line_number = 1; @@ -61,7 +61,7 @@ main(int argc, char *argv[]) filename = strdup(""); } - nasm_parser.doparse(&raw_preproc, &dbg_outfmt, in); + nasm_parser.doparse(&raw_preproc, &dbg_objfmt, in); if (filename) free(filename); diff --git a/src/objfmt.h b/src/objfmt.h index 652276f3..652157c6 100644 --- a/src/objfmt.h +++ b/src/objfmt.h @@ -1,5 +1,5 @@ -/* $Id: objfmt.h,v 1.2 2001/08/19 03:52:58 peter Exp $ - * Output format module interface header file +/* $Id: objfmt.h,v 1.3 2001/09/15 07:16:59 peter Exp $ + * Object format module interface header file * * Copyright (C) 2001 Peter Johnson * @@ -19,11 +19,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef YASM_OUTFMT_H -#define YASM_OUTFMT_H +#ifndef YASM_OBJFMT_H +#define YASM_OBJFMT_H -/* Interface to the output format module(s) */ -typedef struct outfmt_s { +/* Interface to the object format module(s) */ +typedef struct objfmt_s { /* one-line description of the format */ char *name; @@ -31,7 +31,7 @@ typedef struct outfmt_s { char *keyword; /* NULL-terminated list of debugging formats that are valid to use with - * this output format. + * this object format. */ /* struct debugfmt_s **debugfmts;*/ @@ -39,9 +39,9 @@ typedef struct outfmt_s { * use) */ /* struct debugfmt_s *default_df;*/ -} outfmt; +} objfmt; -/* Available output formats */ -extern outfmt dbg_outfmt; +/* Available object formats */ +extern objfmt dbg_objfmt; #endif diff --git a/src/objfmts/dbg/Makefile.am b/src/objfmts/dbg/Makefile.am index 0ab845cb..206fe185 100644 --- a/src/objfmts/dbg/Makefile.am +++ b/src/objfmts/dbg/Makefile.am @@ -1,7 +1,7 @@ -noinst_LIBRARIES = liboutfmt.a +noinst_LIBRARIES = libobjfmt.a -liboutfmt_a_SOURCES = \ - outfmt.c +libobjfmt_a_SOURCES = \ + objfmt.c INCLUDES = \ -I$(top_srcdir)/src \ diff --git a/src/objfmts/dbg/dbg-objfmt.c b/src/objfmts/dbg/dbg-objfmt.c index eb41ca43..fb7b14fd 100644 --- a/src/objfmts/dbg/dbg-objfmt.c +++ b/src/objfmts/dbg/dbg-objfmt.c @@ -1,5 +1,5 @@ -/* $Id: dbg-objfmt.c,v 1.3 2001/08/19 07:46:52 peter Exp $ - * Debugging output format (used to debug output format module interface) +/* $Id: dbg-objfmt.c,v 1.4 2001/09/15 07:16:59 peter Exp $ + * Debugging object format (used to debug object format module interface) * * Copyright (C) 2001 Peter Johnson * @@ -25,12 +25,12 @@ #include "util.h" -#include "outfmt.h" +#include "objfmt.h" -RCSID("$Id: dbg-objfmt.c,v 1.3 2001/08/19 07:46:52 peter Exp $"); +RCSID("$Id: dbg-objfmt.c,v 1.4 2001/09/15 07:16:59 peter Exp $"); -/* Define outfmt structure -- see outfmt.h for details */ -outfmt dbg_outfmt = { - "Trace of all info passed to output format module", +/* Define objfmt structure -- see objfmt.h for details */ +objfmt dbg_objfmt = { + "Trace of all info passed to object format module", "dbg" }; diff --git a/src/objfmts/dbg/objfmt.c b/src/objfmts/dbg/objfmt.c index 74eef231..82c67358 100644 --- a/src/objfmts/dbg/objfmt.c +++ b/src/objfmts/dbg/objfmt.c @@ -1,5 +1,5 @@ -/* $Id: objfmt.c,v 1.3 2001/08/19 07:46:52 peter Exp $ - * Debugging output format (used to debug output format module interface) +/* $Id: objfmt.c,v 1.4 2001/09/15 07:16:59 peter Exp $ + * Debugging object format (used to debug object format module interface) * * Copyright (C) 2001 Peter Johnson * @@ -25,12 +25,12 @@ #include "util.h" -#include "outfmt.h" +#include "objfmt.h" -RCSID("$Id: objfmt.c,v 1.3 2001/08/19 07:46:52 peter Exp $"); +RCSID("$Id: objfmt.c,v 1.4 2001/09/15 07:16:59 peter Exp $"); -/* Define outfmt structure -- see outfmt.h for details */ -outfmt dbg_outfmt = { - "Trace of all info passed to output format module", +/* Define objfmt structure -- see objfmt.h for details */ +objfmt dbg_objfmt = { + "Trace of all info passed to object format module", "dbg" }; diff --git a/src/objfmts/dbg/outfmt.c b/src/objfmts/dbg/outfmt.c deleted file mode 100644 index ec5de2b5..00000000 --- a/src/objfmts/dbg/outfmt.c +++ /dev/null @@ -1,36 +0,0 @@ -/* $Id: outfmt.c,v 1.3 2001/08/19 07:46:52 peter Exp $ - * Debugging output format (used to debug output format module interface) - * - * Copyright (C) 2001 Peter Johnson - * - * This file is part of YASM. - * - * YASM is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * YASM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "util.h" - -#include "outfmt.h" - -RCSID("$Id: outfmt.c,v 1.3 2001/08/19 07:46:52 peter Exp $"); - -/* Define outfmt structure -- see outfmt.h for details */ -outfmt dbg_outfmt = { - "Trace of all info passed to output format module", - "dbg" -}; diff --git a/src/outfmt.h b/src/outfmt.h deleted file mode 100644 index bd090e75..00000000 --- a/src/outfmt.h +++ /dev/null @@ -1,47 +0,0 @@ -/* $Id: outfmt.h,v 1.2 2001/08/19 03:52:58 peter Exp $ - * Output format module interface header file - * - * Copyright (C) 2001 Peter Johnson - * - * This file is part of YASM. - * - * YASM is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * YASM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef YASM_OUTFMT_H -#define YASM_OUTFMT_H - -/* Interface to the output format module(s) */ -typedef struct outfmt_s { - /* one-line description of the format */ - char *name; - - /* keyword used to select format on the command line */ - char *keyword; - - /* NULL-terminated list of debugging formats that are valid to use with - * this output format. - */ -/* struct debugfmt_s **debugfmts;*/ - - /* Default debugging format (set even if there's only one available to - * use) - */ -/* struct debugfmt_s *default_df;*/ -} outfmt; - -/* Available output formats */ -extern outfmt dbg_outfmt; - -#endif diff --git a/src/parser.h b/src/parser.h index f844643e..affff6fd 100644 --- a/src/parser.h +++ b/src/parser.h @@ -1,4 +1,4 @@ -/* $Id: parser.h,v 1.2 2001/08/19 03:52:58 peter Exp $ +/* $Id: parser.h,v 1.3 2001/09/15 07:16:59 peter Exp $ * Parser module interface header file * * Copyright (C) 2001 Peter Johnson @@ -41,7 +41,7 @@ typedef struct parser_s { /* Main entrance point for the parser. * - * The parser needs access to both the output format module (for format- + * The parser needs access to both the object format module (for format- * specific directives and segment names), and the selected preprocessor * (which should naturally be in the preprocs list above). * @@ -55,7 +55,7 @@ typedef struct parser_s { * Note that calling this has many side effects in the output format * module: sections and variables are declared, etc. */ - section *(*doparse) (preproc *pp, outfmt *of, FILE *f); + section *(*doparse) (preproc *pp, objfmt *of, FILE *f); } parser; /* Available parsers */ diff --git a/src/parsers/nasm/nasm-parser.c b/src/parsers/nasm/nasm-parser.c index 87d05989..8f4c4370 100644 --- a/src/parsers/nasm/nasm-parser.c +++ b/src/parsers/nasm/nasm-parser.c @@ -1,4 +1,4 @@ -/* $Id: nasm-parser.c,v 1.6 2001/08/19 07:46:52 peter Exp $ +/* $Id: nasm-parser.c,v 1.7 2001/09/15 07:16:59 peter Exp $ * NASM-compatible parser * * Copyright (C) 2001 Peter Johnson @@ -29,11 +29,11 @@ #include "bytecode.h" #include "section.h" -#include "outfmt.h" +#include "objfmt.h" #include "preproc.h" #include "parser.h" -RCSID("$Id: nasm-parser.c,v 1.6 2001/08/19 07:46:52 peter Exp $"); +RCSID("$Id: nasm-parser.c,v 1.7 2001/09/15 07:16:59 peter Exp $"); extern FILE *nasm_parser_in; extern int nasm_parser_debug; @@ -43,7 +43,7 @@ extern int nasm_parser_parse(void); int (*nasm_parser_yyinput) (char *buf, int max_size); static section * -doparse(preproc *pp, outfmt *of, FILE *f) +doparse(preproc *pp, objfmt *of, FILE *f) { pp->initialize(of, f); nasm_parser_in = f; diff --git a/src/parsers/nasm/parser.c b/src/parsers/nasm/parser.c index 6ec060bd..23da8f2b 100644 --- a/src/parsers/nasm/parser.c +++ b/src/parsers/nasm/parser.c @@ -1,4 +1,4 @@ -/* $Id: parser.c,v 1.6 2001/08/19 07:46:52 peter Exp $ +/* $Id: parser.c,v 1.7 2001/09/15 07:16:59 peter Exp $ * NASM-compatible parser * * Copyright (C) 2001 Peter Johnson @@ -29,11 +29,11 @@ #include "bytecode.h" #include "section.h" -#include "outfmt.h" +#include "objfmt.h" #include "preproc.h" #include "parser.h" -RCSID("$Id: parser.c,v 1.6 2001/08/19 07:46:52 peter Exp $"); +RCSID("$Id: parser.c,v 1.7 2001/09/15 07:16:59 peter Exp $"); extern FILE *nasm_parser_in; extern int nasm_parser_debug; @@ -43,7 +43,7 @@ extern int nasm_parser_parse(void); int (*nasm_parser_yyinput) (char *buf, int max_size); static section * -doparse(preproc *pp, outfmt *of, FILE *f) +doparse(preproc *pp, objfmt *of, FILE *f) { pp->initialize(of, f); nasm_parser_in = f; diff --git a/src/preproc.h b/src/preproc.h index 2e884fbd..9ee4d3d3 100644 --- a/src/preproc.h +++ b/src/preproc.h @@ -1,4 +1,4 @@ -/* $Id: preproc.h,v 1.2 2001/08/19 03:52:58 peter Exp $ +/* $Id: preproc.h,v 1.3 2001/09/15 07:16:59 peter Exp $ * Preprocessor module interface header file * * Copyright (C) 2001 Peter Johnson @@ -32,14 +32,14 @@ typedef struct preproc_s { /* Initializes preprocessor. * - * The preprocessor needs access to the output format module to find out + * The preprocessor needs access to the object format module to find out * any output format specific macros. * * This function also takes the FILE * to the initial starting file, but * not the filename (which is in a global variable and is not * preprocessor-specific). */ - void (*initialize) (outfmt *of, FILE *f); + void (*initialize) (objfmt *of, FILE *f); /* Gets more preprocessed source code (up to max_size bytes) into buf. * Note that more than a single line may be returned in buf. */ diff --git a/src/preprocs/raw/preproc.c b/src/preprocs/raw/preproc.c index f93d3b3d..3cd780b4 100644 --- a/src/preprocs/raw/preproc.c +++ b/src/preprocs/raw/preproc.c @@ -1,4 +1,4 @@ -/* $Id: preproc.c,v 1.6 2001/08/30 03:45:26 peter Exp $ +/* $Id: preproc.c,v 1.7 2001/09/15 07:16:59 peter Exp $ * Raw preprocessor (preforms NO preprocessing) * * Copyright (C) 2001 Peter Johnson @@ -32,10 +32,10 @@ #include "errwarn.h" -#include "outfmt.h" +#include "objfmt.h" #include "preproc.h" -RCSID("$Id: preproc.c,v 1.6 2001/08/30 03:45:26 peter Exp $"); +RCSID("$Id: preproc.c,v 1.7 2001/09/15 07:16:59 peter Exp $"); static int is_interactive; static FILE *in; @@ -43,7 +43,7 @@ static FILE *in; int isatty(int); static void -initialize(outfmt *of, FILE *f) +initialize(objfmt *of, FILE *f) { in = f; is_interactive = f ? (isatty(fileno(f)) > 0) : 0; diff --git a/src/preprocs/raw/raw-preproc.c b/src/preprocs/raw/raw-preproc.c index 1bb5dc4c..bcc859bb 100644 --- a/src/preprocs/raw/raw-preproc.c +++ b/src/preprocs/raw/raw-preproc.c @@ -1,4 +1,4 @@ -/* $Id: raw-preproc.c,v 1.6 2001/08/30 03:45:26 peter Exp $ +/* $Id: raw-preproc.c,v 1.7 2001/09/15 07:16:59 peter Exp $ * Raw preprocessor (preforms NO preprocessing) * * Copyright (C) 2001 Peter Johnson @@ -32,10 +32,10 @@ #include "errwarn.h" -#include "outfmt.h" +#include "objfmt.h" #include "preproc.h" -RCSID("$Id: raw-preproc.c,v 1.6 2001/08/30 03:45:26 peter Exp $"); +RCSID("$Id: raw-preproc.c,v 1.7 2001/09/15 07:16:59 peter Exp $"); static int is_interactive; static FILE *in; @@ -43,7 +43,7 @@ static FILE *in; int isatty(int); static void -initialize(outfmt *of, FILE *f) +initialize(objfmt *of, FILE *f) { in = f; is_interactive = f ? (isatty(fileno(f)) > 0) : 0;