From: Peter Johnson Date: Sun, 19 Aug 2001 07:33:47 +0000 (-0000) Subject: Standardize order of include statements as well as autoconf'ing those source X-Git-Tag: v0.1.0~361 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=77fc6dd4914b1dbce42baa6e24478d51305ef18a;p=yasm Standardize order of include statements as well as autoconf'ing those source files that weren't yet. svn path=/trunk/yasm/; revision=150 --- diff --git a/frontends/yasm/yasm.c b/frontends/yasm/yasm.c index 54eba8f4..05f79741 100644 --- a/frontends/yasm/yasm.c +++ b/frontends/yasm/yasm.c @@ -1,4 +1,4 @@ -/* $Id: yasm.c,v 1.8 2001/08/19 05:41:01 peter Exp $ +/* $Id: yasm.c,v 1.9 2001/08/19 07:33:47 peter Exp $ * Program entry point, command line parsing * * Copyright (C) 2001 Peter Johnson @@ -23,10 +23,15 @@ # include "config.h" #endif -#include -#include -#include #include "util.h" + +#include + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "bytecode.h" #include "section.h" #include "outfmt.h" diff --git a/libyasm/bytecode.c b/libyasm/bytecode.c index 22612e8d..d902da2e 100644 --- a/libyasm/bytecode.c +++ b/libyasm/bytecode.c @@ -1,4 +1,4 @@ -/* $Id: bytecode.c,v 1.17 2001/08/19 05:41:01 peter Exp $ +/* $Id: bytecode.c,v 1.18 2001/08/19 07:33:47 peter Exp $ * Bytecode utility functions * * Copyright (C) 2001 Peter Johnson @@ -23,15 +23,21 @@ # include "config.h" #endif -#include -#include -#include #include "util.h" + +#include + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "globals.h" -#include "bytecode.h" #include "errwarn.h" #include "expr.h" +#include "bytecode.h" + /* Static structures for when NULL is passed to conversion functions. */ /* for Convert*ToEA() */ static effaddr eff_static; diff --git a/libyasm/errwarn.c b/libyasm/errwarn.c index 30cddbd2..45ad973e 100644 --- a/libyasm/errwarn.c +++ b/libyasm/errwarn.c @@ -1,4 +1,4 @@ -/* $Id: errwarn.c,v 1.20 2001/08/19 03:52:58 peter Exp $ +/* $Id: errwarn.c,v 1.21 2001/08/19 07:33:47 peter Exp $ * Error and warning reporting and related functions. * * Copyright (C) 2001 Peter Johnson @@ -23,20 +23,19 @@ # include "config.h" #endif +#include "util.h" + #include +#include #ifdef STDC_HEADERS -#include -#include -#include +# include +# include +# include #endif -#include - -#include "util.h" - -#include "errwarn.h" #include "globals.h" +#include "errwarn.h" /* Total error count for entire assembler run. * Assembler should exit with EXIT_FAILURE if this is >= 0 on finish. */ diff --git a/libyasm/expr.c b/libyasm/expr.c index 1b0248f7..cc4656db 100644 --- a/libyasm/expr.c +++ b/libyasm/expr.c @@ -1,4 +1,4 @@ -/* $Id: expr.c,v 1.5 2001/08/19 03:52:58 peter Exp $ +/* $Id: expr.c,v 1.6 2001/08/19 07:33:47 peter Exp $ * Expression handling * * Copyright (C) 2001 Michael Urman @@ -19,13 +19,23 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "util.h" + #include -#include "expr.h" -#include "symrec.h" + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "globals.h" #include "errwarn.h" +#include "expr.h" +#include "symrec.h" /* allocate a new expression node, with children as defined. * If it's a unary operator, put the element on the right */ diff --git a/libyasm/symrec.c b/libyasm/symrec.c index 445fc19d..7ef92982 100644 --- a/libyasm/symrec.c +++ b/libyasm/symrec.c @@ -1,4 +1,4 @@ -/* $Id: symrec.c,v 1.6 2001/08/19 03:52:58 peter Exp $ +/* $Id: symrec.c,v 1.7 2001/08/19 07:33:47 peter Exp $ * Symbol table handling * * Copyright (C) 2001 Michael Urman @@ -19,11 +19,20 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include -#include "symrec.h" +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "util.h" + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "globals.h" #include "errwarn.h" +#include "symrec.h" /* private functions */ static symtab *symtab_get(char *); diff --git a/libyasm/xstrdup.c b/libyasm/xstrdup.c index 4c17de1e..42a42707 100644 --- a/libyasm/xstrdup.c +++ b/libyasm/xstrdup.c @@ -1,4 +1,4 @@ -/* $Id: xstrdup.c,v 1.2 2001/06/28 22:21:17 peter Exp $ +/* $Id: xstrdup.c,v 1.3 2001/08/19 07:33:47 peter Exp $ * strdup() implementation for systems that don't have it. * * Copyright (c) 1988, 1993 @@ -37,6 +37,8 @@ static char sccsid[] = "@(#)strdup.c 8.1 (Berkeley) 6/4/93"; # include "config.h" #endif +#include "util.h" + #ifdef STDC_HEADERS # include # include @@ -52,8 +54,6 @@ void memcpy(void *, const void *, size_t); # endif #endif -#include "util.h" - char * strdup(const char *str) { diff --git a/modules/arch/x86/expr.c b/modules/arch/x86/expr.c index 1b0248f7..cc4656db 100644 --- a/modules/arch/x86/expr.c +++ b/modules/arch/x86/expr.c @@ -1,4 +1,4 @@ -/* $Id: expr.c,v 1.5 2001/08/19 03:52:58 peter Exp $ +/* $Id: expr.c,v 1.6 2001/08/19 07:33:47 peter Exp $ * Expression handling * * Copyright (C) 2001 Michael Urman @@ -19,13 +19,23 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "util.h" + #include -#include "expr.h" -#include "symrec.h" + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "globals.h" #include "errwarn.h" +#include "expr.h" +#include "symrec.h" /* allocate a new expression node, with children as defined. * If it's a unary operator, put the element on the right */ diff --git a/modules/arch/x86/x86expr.c b/modules/arch/x86/x86expr.c index 69213d1f..27502b3b 100644 --- a/modules/arch/x86/x86expr.c +++ b/modules/arch/x86/x86expr.c @@ -1,4 +1,4 @@ -/* $Id: x86expr.c,v 1.5 2001/08/19 03:52:58 peter Exp $ +/* $Id: x86expr.c,v 1.6 2001/08/19 07:33:47 peter Exp $ * Expression handling * * Copyright (C) 2001 Michael Urman @@ -19,13 +19,23 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "util.h" + #include -#include "expr.h" -#include "symrec.h" + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "globals.h" #include "errwarn.h" +#include "expr.h" +#include "symrec.h" /* allocate a new expression node, with children as defined. * If it's a unary operator, put the element on the right */ diff --git a/modules/objfmts/dbg/dbg-objfmt.c b/modules/objfmts/dbg/dbg-objfmt.c index 179c233e..1d8c00a5 100644 --- a/modules/objfmts/dbg/dbg-objfmt.c +++ b/modules/objfmts/dbg/dbg-objfmt.c @@ -1,4 +1,4 @@ -/* $Id: dbg-objfmt.c,v 1.1 2001/08/19 02:15:18 peter Exp $ +/* $Id: dbg-objfmt.c,v 1.2 2001/08/19 07:33:47 peter Exp $ * Debugging output format (used to debug output format module interface) * * Copyright (C) 2001 Peter Johnson @@ -19,6 +19,12 @@ * 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" /* Define outfmt structure -- see outfmt.h for details */ diff --git a/modules/objfmts/dbg/objfmt.c b/modules/objfmts/dbg/objfmt.c index 870f6e95..af401439 100644 --- a/modules/objfmts/dbg/objfmt.c +++ b/modules/objfmts/dbg/objfmt.c @@ -1,4 +1,4 @@ -/* $Id: objfmt.c,v 1.1 2001/08/19 02:15:18 peter Exp $ +/* $Id: objfmt.c,v 1.2 2001/08/19 07:33:47 peter Exp $ * Debugging output format (used to debug output format module interface) * * Copyright (C) 2001 Peter Johnson @@ -19,6 +19,12 @@ * 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" /* Define outfmt structure -- see outfmt.h for details */ diff --git a/modules/objfmts/dbg/outfmt.c b/modules/objfmts/dbg/outfmt.c index 900d148a..6b818134 100644 --- a/modules/objfmts/dbg/outfmt.c +++ b/modules/objfmts/dbg/outfmt.c @@ -1,4 +1,4 @@ -/* $Id: outfmt.c,v 1.1 2001/08/19 02:15:18 peter Exp $ +/* $Id: outfmt.c,v 1.2 2001/08/19 07:33:47 peter Exp $ * Debugging output format (used to debug output format module interface) * * Copyright (C) 2001 Peter Johnson @@ -19,6 +19,12 @@ * 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" /* Define outfmt structure -- see outfmt.h for details */ diff --git a/modules/parsers/nasm/bison.y.in b/modules/parsers/nasm/bison.y.in index 206d3aaa..48b8a74c 100644 --- a/modules/parsers/nasm/bison.y.in +++ b/modules/parsers/nasm/bison.y.in @@ -1,4 +1,4 @@ -/* $Id: bison.y.in,v 1.25 2001/08/19 05:44:53 peter Exp $ +/* $Id: bison.y.in,v 1.26 2001/08/19 07:33:47 peter Exp $ * Main bison parser * * Copyright (C) 2001 Peter Johnson, Michael Urman @@ -24,14 +24,19 @@ # include "config.h" #endif -#include -#include #include "util.h" -#include "symrec.h" + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "globals.h" -#include "bytecode.h" #include "errwarn.h" #include "expr.h" +#include "symrec.h" + +#include "bytecode.h" #define YYDEBUG 1 diff --git a/modules/parsers/nasm/nasm-bison.y b/modules/parsers/nasm/nasm-bison.y index 93e13fbd..2b73d996 100644 --- a/modules/parsers/nasm/nasm-bison.y +++ b/modules/parsers/nasm/nasm-bison.y @@ -1,4 +1,4 @@ -/* $Id: nasm-bison.y,v 1.25 2001/08/19 05:44:53 peter Exp $ +/* $Id: nasm-bison.y,v 1.26 2001/08/19 07:33:47 peter Exp $ * Main bison parser * * Copyright (C) 2001 Peter Johnson, Michael Urman @@ -24,14 +24,19 @@ # include "config.h" #endif -#include -#include #include "util.h" -#include "symrec.h" + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "globals.h" -#include "bytecode.h" #include "errwarn.h" #include "expr.h" +#include "symrec.h" + +#include "bytecode.h" #define YYDEBUG 1 diff --git a/modules/parsers/nasm/nasm-parser.c b/modules/parsers/nasm/nasm-parser.c index 92a2df18..4d02b6ec 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.4 2001/08/19 05:41:01 peter Exp $ +/* $Id: nasm-parser.c,v 1.5 2001/08/19 07:33:47 peter Exp $ * NASM-compatible parser * * Copyright (C) 2001 Peter Johnson @@ -23,8 +23,10 @@ # include "config.h" #endif -#include #include "util.h" + +#include + #include "bytecode.h" #include "section.h" #include "outfmt.h" diff --git a/modules/parsers/nasm/parser.c b/modules/parsers/nasm/parser.c index feaddd1d..bac3b17a 100644 --- a/modules/parsers/nasm/parser.c +++ b/modules/parsers/nasm/parser.c @@ -1,4 +1,4 @@ -/* $Id: parser.c,v 1.4 2001/08/19 05:41:01 peter Exp $ +/* $Id: parser.c,v 1.5 2001/08/19 07:33:47 peter Exp $ * NASM-compatible parser * * Copyright (C) 2001 Peter Johnson @@ -23,8 +23,10 @@ # include "config.h" #endif -#include #include "util.h" + +#include + #include "bytecode.h" #include "section.h" #include "outfmt.h" diff --git a/modules/parsers/nasm/token.l.in b/modules/parsers/nasm/token.l.in index bbcb1449..46771ede 100644 --- a/modules/parsers/nasm/token.l.in +++ b/modules/parsers/nasm/token.l.in @@ -1,4 +1,4 @@ -/* $Id: token.l.in,v 1.13 2001/08/19 02:15:18 peter Exp $ +/* $Id: token.l.in,v 1.14 2001/08/19 07:33:47 peter Exp $ * Main lexer * * Copyright (C) 2001 Peter Johnson @@ -24,17 +24,19 @@ # include "config.h" #endif +#include "util.h" + #ifdef STDC_HEADERS # include # include #endif -#include "util.h" - -#include "symrec.h" -#include "bytecode.h" #include "errwarn.h" #include "expr.h" +#include "symrec.h" + +#include "bytecode.h" + #include "bison.h" #define yylval nasm_parser_lval diff --git a/modules/preprocs/raw/preproc.c b/modules/preprocs/raw/preproc.c index 5f163894..a4fb5776 100644 --- a/modules/preprocs/raw/preproc.c +++ b/modules/preprocs/raw/preproc.c @@ -1,4 +1,4 @@ -/* $Id: preproc.c,v 1.3 2001/08/19 03:52:58 peter Exp $ +/* $Id: preproc.c,v 1.4 2001/08/19 07:33:47 peter Exp $ * Raw preprocessor (preforms NO preprocessing) * * Copyright (C) 2001 Peter Johnson @@ -19,10 +19,16 @@ * 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 + +#include "errwarn.h" + #include "outfmt.h" #include "preproc.h" -#include "errwarn.h" static int is_interactive; static FILE *in; diff --git a/modules/preprocs/raw/raw-preproc.c b/modules/preprocs/raw/raw-preproc.c index ce70e2b4..d188283f 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.3 2001/08/19 03:52:58 peter Exp $ +/* $Id: raw-preproc.c,v 1.4 2001/08/19 07:33:47 peter Exp $ * Raw preprocessor (preforms NO preprocessing) * * Copyright (C) 2001 Peter Johnson @@ -19,10 +19,16 @@ * 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 + +#include "errwarn.h" + #include "outfmt.h" #include "preproc.h" -#include "errwarn.h" static int is_interactive; static FILE *in; diff --git a/src/arch/x86/expr.c b/src/arch/x86/expr.c index 1b0248f7..cc4656db 100644 --- a/src/arch/x86/expr.c +++ b/src/arch/x86/expr.c @@ -1,4 +1,4 @@ -/* $Id: expr.c,v 1.5 2001/08/19 03:52:58 peter Exp $ +/* $Id: expr.c,v 1.6 2001/08/19 07:33:47 peter Exp $ * Expression handling * * Copyright (C) 2001 Michael Urman @@ -19,13 +19,23 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "util.h" + #include -#include "expr.h" -#include "symrec.h" + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "globals.h" #include "errwarn.h" +#include "expr.h" +#include "symrec.h" /* allocate a new expression node, with children as defined. * If it's a unary operator, put the element on the right */ diff --git a/src/arch/x86/x86expr.c b/src/arch/x86/x86expr.c index 69213d1f..27502b3b 100644 --- a/src/arch/x86/x86expr.c +++ b/src/arch/x86/x86expr.c @@ -1,4 +1,4 @@ -/* $Id: x86expr.c,v 1.5 2001/08/19 03:52:58 peter Exp $ +/* $Id: x86expr.c,v 1.6 2001/08/19 07:33:47 peter Exp $ * Expression handling * * Copyright (C) 2001 Michael Urman @@ -19,13 +19,23 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "util.h" + #include -#include "expr.h" -#include "symrec.h" + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "globals.h" #include "errwarn.h" +#include "expr.h" +#include "symrec.h" /* allocate a new expression node, with children as defined. * If it's a unary operator, put the element on the right */ diff --git a/src/bytecode.c b/src/bytecode.c index 22612e8d..d902da2e 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -1,4 +1,4 @@ -/* $Id: bytecode.c,v 1.17 2001/08/19 05:41:01 peter Exp $ +/* $Id: bytecode.c,v 1.18 2001/08/19 07:33:47 peter Exp $ * Bytecode utility functions * * Copyright (C) 2001 Peter Johnson @@ -23,15 +23,21 @@ # include "config.h" #endif -#include -#include -#include #include "util.h" + +#include + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "globals.h" -#include "bytecode.h" #include "errwarn.h" #include "expr.h" +#include "bytecode.h" + /* Static structures for when NULL is passed to conversion functions. */ /* for Convert*ToEA() */ static effaddr eff_static; diff --git a/src/errwarn.c b/src/errwarn.c index 30cddbd2..45ad973e 100644 --- a/src/errwarn.c +++ b/src/errwarn.c @@ -1,4 +1,4 @@ -/* $Id: errwarn.c,v 1.20 2001/08/19 03:52:58 peter Exp $ +/* $Id: errwarn.c,v 1.21 2001/08/19 07:33:47 peter Exp $ * Error and warning reporting and related functions. * * Copyright (C) 2001 Peter Johnson @@ -23,20 +23,19 @@ # include "config.h" #endif +#include "util.h" + #include +#include #ifdef STDC_HEADERS -#include -#include -#include +# include +# include +# include #endif -#include - -#include "util.h" - -#include "errwarn.h" #include "globals.h" +#include "errwarn.h" /* Total error count for entire assembler run. * Assembler should exit with EXIT_FAILURE if this is >= 0 on finish. */ diff --git a/src/expr.c b/src/expr.c index 1b0248f7..cc4656db 100644 --- a/src/expr.c +++ b/src/expr.c @@ -1,4 +1,4 @@ -/* $Id: expr.c,v 1.5 2001/08/19 03:52:58 peter Exp $ +/* $Id: expr.c,v 1.6 2001/08/19 07:33:47 peter Exp $ * Expression handling * * Copyright (C) 2001 Michael Urman @@ -19,13 +19,23 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "util.h" + #include -#include "expr.h" -#include "symrec.h" + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "globals.h" #include "errwarn.h" +#include "expr.h" +#include "symrec.h" /* allocate a new expression node, with children as defined. * If it's a unary operator, put the element on the right */ diff --git a/src/main.c b/src/main.c index 53c288bc..ca917c06 100644 --- a/src/main.c +++ b/src/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.8 2001/08/19 05:41:01 peter Exp $ +/* $Id: main.c,v 1.9 2001/08/19 07:33:47 peter Exp $ * Program entry point, command line parsing * * Copyright (C) 2001 Peter Johnson @@ -23,10 +23,15 @@ # include "config.h" #endif -#include -#include -#include #include "util.h" + +#include + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "bytecode.h" #include "section.h" #include "outfmt.h" diff --git a/src/objfmts/dbg/dbg-objfmt.c b/src/objfmts/dbg/dbg-objfmt.c index 179c233e..1d8c00a5 100644 --- a/src/objfmts/dbg/dbg-objfmt.c +++ b/src/objfmts/dbg/dbg-objfmt.c @@ -1,4 +1,4 @@ -/* $Id: dbg-objfmt.c,v 1.1 2001/08/19 02:15:18 peter Exp $ +/* $Id: dbg-objfmt.c,v 1.2 2001/08/19 07:33:47 peter Exp $ * Debugging output format (used to debug output format module interface) * * Copyright (C) 2001 Peter Johnson @@ -19,6 +19,12 @@ * 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" /* Define outfmt structure -- see outfmt.h for details */ diff --git a/src/objfmts/dbg/objfmt.c b/src/objfmts/dbg/objfmt.c index 870f6e95..af401439 100644 --- a/src/objfmts/dbg/objfmt.c +++ b/src/objfmts/dbg/objfmt.c @@ -1,4 +1,4 @@ -/* $Id: objfmt.c,v 1.1 2001/08/19 02:15:18 peter Exp $ +/* $Id: objfmt.c,v 1.2 2001/08/19 07:33:47 peter Exp $ * Debugging output format (used to debug output format module interface) * * Copyright (C) 2001 Peter Johnson @@ -19,6 +19,12 @@ * 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" /* Define outfmt structure -- see outfmt.h for details */ diff --git a/src/objfmts/dbg/outfmt.c b/src/objfmts/dbg/outfmt.c index 900d148a..6b818134 100644 --- a/src/objfmts/dbg/outfmt.c +++ b/src/objfmts/dbg/outfmt.c @@ -1,4 +1,4 @@ -/* $Id: outfmt.c,v 1.1 2001/08/19 02:15:18 peter Exp $ +/* $Id: outfmt.c,v 1.2 2001/08/19 07:33:47 peter Exp $ * Debugging output format (used to debug output format module interface) * * Copyright (C) 2001 Peter Johnson @@ -19,6 +19,12 @@ * 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" /* Define outfmt structure -- see outfmt.h for details */ diff --git a/src/parsers/nasm/bison.y.in b/src/parsers/nasm/bison.y.in index 206d3aaa..48b8a74c 100644 --- a/src/parsers/nasm/bison.y.in +++ b/src/parsers/nasm/bison.y.in @@ -1,4 +1,4 @@ -/* $Id: bison.y.in,v 1.25 2001/08/19 05:44:53 peter Exp $ +/* $Id: bison.y.in,v 1.26 2001/08/19 07:33:47 peter Exp $ * Main bison parser * * Copyright (C) 2001 Peter Johnson, Michael Urman @@ -24,14 +24,19 @@ # include "config.h" #endif -#include -#include #include "util.h" -#include "symrec.h" + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "globals.h" -#include "bytecode.h" #include "errwarn.h" #include "expr.h" +#include "symrec.h" + +#include "bytecode.h" #define YYDEBUG 1 diff --git a/src/parsers/nasm/nasm-bison.y b/src/parsers/nasm/nasm-bison.y index 93e13fbd..2b73d996 100644 --- a/src/parsers/nasm/nasm-bison.y +++ b/src/parsers/nasm/nasm-bison.y @@ -1,4 +1,4 @@ -/* $Id: nasm-bison.y,v 1.25 2001/08/19 05:44:53 peter Exp $ +/* $Id: nasm-bison.y,v 1.26 2001/08/19 07:33:47 peter Exp $ * Main bison parser * * Copyright (C) 2001 Peter Johnson, Michael Urman @@ -24,14 +24,19 @@ # include "config.h" #endif -#include -#include #include "util.h" -#include "symrec.h" + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "globals.h" -#include "bytecode.h" #include "errwarn.h" #include "expr.h" +#include "symrec.h" + +#include "bytecode.h" #define YYDEBUG 1 diff --git a/src/parsers/nasm/nasm-parser.c b/src/parsers/nasm/nasm-parser.c index 92a2df18..4d02b6ec 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.4 2001/08/19 05:41:01 peter Exp $ +/* $Id: nasm-parser.c,v 1.5 2001/08/19 07:33:47 peter Exp $ * NASM-compatible parser * * Copyright (C) 2001 Peter Johnson @@ -23,8 +23,10 @@ # include "config.h" #endif -#include #include "util.h" + +#include + #include "bytecode.h" #include "section.h" #include "outfmt.h" diff --git a/src/parsers/nasm/parser.c b/src/parsers/nasm/parser.c index feaddd1d..bac3b17a 100644 --- a/src/parsers/nasm/parser.c +++ b/src/parsers/nasm/parser.c @@ -1,4 +1,4 @@ -/* $Id: parser.c,v 1.4 2001/08/19 05:41:01 peter Exp $ +/* $Id: parser.c,v 1.5 2001/08/19 07:33:47 peter Exp $ * NASM-compatible parser * * Copyright (C) 2001 Peter Johnson @@ -23,8 +23,10 @@ # include "config.h" #endif -#include #include "util.h" + +#include + #include "bytecode.h" #include "section.h" #include "outfmt.h" diff --git a/src/parsers/nasm/token.l.in b/src/parsers/nasm/token.l.in index bbcb1449..46771ede 100644 --- a/src/parsers/nasm/token.l.in +++ b/src/parsers/nasm/token.l.in @@ -1,4 +1,4 @@ -/* $Id: token.l.in,v 1.13 2001/08/19 02:15:18 peter Exp $ +/* $Id: token.l.in,v 1.14 2001/08/19 07:33:47 peter Exp $ * Main lexer * * Copyright (C) 2001 Peter Johnson @@ -24,17 +24,19 @@ # include "config.h" #endif +#include "util.h" + #ifdef STDC_HEADERS # include # include #endif -#include "util.h" - -#include "symrec.h" -#include "bytecode.h" #include "errwarn.h" #include "expr.h" +#include "symrec.h" + +#include "bytecode.h" + #include "bison.h" #define yylval nasm_parser_lval diff --git a/src/preprocs/raw/preproc.c b/src/preprocs/raw/preproc.c index 5f163894..a4fb5776 100644 --- a/src/preprocs/raw/preproc.c +++ b/src/preprocs/raw/preproc.c @@ -1,4 +1,4 @@ -/* $Id: preproc.c,v 1.3 2001/08/19 03:52:58 peter Exp $ +/* $Id: preproc.c,v 1.4 2001/08/19 07:33:47 peter Exp $ * Raw preprocessor (preforms NO preprocessing) * * Copyright (C) 2001 Peter Johnson @@ -19,10 +19,16 @@ * 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 + +#include "errwarn.h" + #include "outfmt.h" #include "preproc.h" -#include "errwarn.h" static int is_interactive; static FILE *in; diff --git a/src/preprocs/raw/raw-preproc.c b/src/preprocs/raw/raw-preproc.c index ce70e2b4..d188283f 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.3 2001/08/19 03:52:58 peter Exp $ +/* $Id: raw-preproc.c,v 1.4 2001/08/19 07:33:47 peter Exp $ * Raw preprocessor (preforms NO preprocessing) * * Copyright (C) 2001 Peter Johnson @@ -19,10 +19,16 @@ * 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 + +#include "errwarn.h" + #include "outfmt.h" #include "preproc.h" -#include "errwarn.h" static int is_interactive; static FILE *in; diff --git a/src/strdup.c b/src/strdup.c index 161d1f3c..f92f3c23 100644 --- a/src/strdup.c +++ b/src/strdup.c @@ -1,4 +1,4 @@ -/* $Id: strdup.c,v 1.2 2001/06/28 22:21:17 peter Exp $ +/* $Id: strdup.c,v 1.3 2001/08/19 07:33:47 peter Exp $ * strdup() implementation for systems that don't have it. * * Copyright (c) 1988, 1993 @@ -37,6 +37,8 @@ static char sccsid[] = "@(#)strdup.c 8.1 (Berkeley) 6/4/93"; # include "config.h" #endif +#include "util.h" + #ifdef STDC_HEADERS # include # include @@ -52,8 +54,6 @@ void memcpy(void *, const void *, size_t); # endif #endif -#include "util.h" - char * strdup(const char *str) { diff --git a/src/strtoul.c b/src/strtoul.c index 80b65106..a51bac64 100644 --- a/src/strtoul.c +++ b/src/strtoul.c @@ -1,4 +1,4 @@ -/* $Id: strtoul.c,v 1.1 2001/06/29 02:06:55 peter Exp $ +/* $Id: strtoul.c,v 1.2 2001/08/19 07:33:47 peter Exp $ * strtoul() implementation for systems that don't have it. * * Copyright (c) 1990, 1993 @@ -37,15 +37,18 @@ static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93"; # include "config.h" #endif -#include +#include "util.h" + +#ifdef HAVE_LIMITS_H +# include +#endif #include #include + #ifdef STDC_HEADERS # include #endif -#include "util.h" - /* * Convert a string to an unsigned long integer. * diff --git a/src/symrec.c b/src/symrec.c index 445fc19d..7ef92982 100644 --- a/src/symrec.c +++ b/src/symrec.c @@ -1,4 +1,4 @@ -/* $Id: symrec.c,v 1.6 2001/08/19 03:52:58 peter Exp $ +/* $Id: symrec.c,v 1.7 2001/08/19 07:33:47 peter Exp $ * Symbol table handling * * Copyright (C) 2001 Michael Urman @@ -19,11 +19,20 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include -#include "symrec.h" +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "util.h" + +#ifdef STDC_HEADERS +# include +# include +#endif + #include "globals.h" #include "errwarn.h" +#include "symrec.h" /* private functions */ static symtab *symtab_get(char *); diff --git a/src/xstrdup.c b/src/xstrdup.c index 4c17de1e..42a42707 100644 --- a/src/xstrdup.c +++ b/src/xstrdup.c @@ -1,4 +1,4 @@ -/* $Id: xstrdup.c,v 1.2 2001/06/28 22:21:17 peter Exp $ +/* $Id: xstrdup.c,v 1.3 2001/08/19 07:33:47 peter Exp $ * strdup() implementation for systems that don't have it. * * Copyright (c) 1988, 1993 @@ -37,6 +37,8 @@ static char sccsid[] = "@(#)strdup.c 8.1 (Berkeley) 6/4/93"; # include "config.h" #endif +#include "util.h" + #ifdef STDC_HEADERS # include # include @@ -52,8 +54,6 @@ void memcpy(void *, const void *, size_t); # endif #endif -#include "util.h" - char * strdup(const char *str) {