]> granicus.if.org Git - yasm/commitdiff
Standardize order of include statements as well as autoconf'ing those source
authorPeter Johnson <peter@tortall.net>
Sun, 19 Aug 2001 07:33:47 +0000 (07:33 -0000)
committerPeter Johnson <peter@tortall.net>
Sun, 19 Aug 2001 07:33:47 +0000 (07:33 -0000)
files that weren't yet.

svn path=/trunk/yasm/; revision=150

38 files changed:
frontends/yasm/yasm.c
libyasm/bytecode.c
libyasm/errwarn.c
libyasm/expr.c
libyasm/symrec.c
libyasm/xstrdup.c
modules/arch/x86/expr.c
modules/arch/x86/x86expr.c
modules/objfmts/dbg/dbg-objfmt.c
modules/objfmts/dbg/objfmt.c
modules/objfmts/dbg/outfmt.c
modules/parsers/nasm/bison.y.in
modules/parsers/nasm/nasm-bison.y
modules/parsers/nasm/nasm-parser.c
modules/parsers/nasm/parser.c
modules/parsers/nasm/token.l.in
modules/preprocs/raw/preproc.c
modules/preprocs/raw/raw-preproc.c
src/arch/x86/expr.c
src/arch/x86/x86expr.c
src/bytecode.c
src/errwarn.c
src/expr.c
src/main.c
src/objfmts/dbg/dbg-objfmt.c
src/objfmts/dbg/objfmt.c
src/objfmts/dbg/outfmt.c
src/parsers/nasm/bison.y.in
src/parsers/nasm/nasm-bison.y
src/parsers/nasm/nasm-parser.c
src/parsers/nasm/parser.c
src/parsers/nasm/token.l.in
src/preprocs/raw/preproc.c
src/preprocs/raw/raw-preproc.c
src/strdup.c
src/strtoul.c
src/symrec.c
src/xstrdup.c

index 54eba8f4739b6188ec5e047dc1e6a1a7662420ea..05f79741c93088ea3fb066318f468fa96f17c648 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include "util.h"
+
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#endif
+
 #include "bytecode.h"
 #include "section.h"
 #include "outfmt.h"
index 22612e8de9e891f89c45fa16f6f9b56bad51d4d0..d902da2ee3bbefd6d104cefd82d1aba76f787ecc 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include "util.h"
+
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#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;
index 30cddbd2492803d1b0784363a66ee2e7e52daa1c..45ad973e246c729bed1f33c032e2b3892f3eeb17 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
+#include "util.h"
+
 #include <stdio.h>
+#include <ctype.h>
 
 #ifdef STDC_HEADERS
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
+# include <stdlib.h>
+# include <stdarg.h>
+# include <string.h>
 #endif
 
-#include <ctype.h>
-
-#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. */
index 1b0248f7aad360451bdb74a1b18bc14edd304267..cc4656db394bb85ea1f7301eea8ea7127c16cb8c 100644 (file)
@@ -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
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <stdlib.h>
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "util.h"
+
 #include <stdio.h>
-#include "expr.h"
-#include "symrec.h"
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#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 */
index 445fc19d382299e971b8996b94473656cabf3ab0..7ef929824a2700dbc7020e0f64855531635145ed 100644 (file)
@@ -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
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <stdlib.h>
-#include <string.h>
-#include "symrec.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "util.h"
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#endif
+
 #include "globals.h"
 #include "errwarn.h"
+#include "symrec.h"
 
 /* private functions */
 static symtab *symtab_get(char *);
index 4c17de1ebace52f8a474e2c5290ecb52bd001477..42a42707afa30e0b04d786477a63a036835b3d39 100644 (file)
@@ -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 <stddef.h>
 # include <stdlib.h>
@@ -52,8 +54,6 @@ void memcpy(void *, const void *, size_t);
 # endif
 #endif
 
-#include "util.h"
-
 char *
 strdup(const char *str)
 {
index 1b0248f7aad360451bdb74a1b18bc14edd304267..cc4656db394bb85ea1f7301eea8ea7127c16cb8c 100644 (file)
@@ -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
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <stdlib.h>
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "util.h"
+
 #include <stdio.h>
-#include "expr.h"
-#include "symrec.h"
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#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 */
index 69213d1f40f379ebf402127d3f9e4448c7ae7741..27502b3b0ce1f0a8cefcf3df36d63cfdd6c55ffe 100644 (file)
@@ -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
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <stdlib.h>
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "util.h"
+
 #include <stdio.h>
-#include "expr.h"
-#include "symrec.h"
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#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 */
index 179c233ef131966b7f5000c7b83bf4d35a4ec451..1d8c00a52fb875ad418d95ce2bbfefe2d17de2bb 100644 (file)
@@ -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
  *  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 */
index 870f6e954aa3126b251918715e280b8a6c7a80ca..af4014396bda07e76d856f2c3e7364766ba4d5b9 100644 (file)
@@ -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
  *  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 */
index 900d148afad8e77b731cf79670f8f51f5e6db625..6b818134dd0f6332bcb0eb4743e946025954fcb7 100644 (file)
@@ -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
  *  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 */
index 206d3aaa58f0849f4852bb28caf31de3a29092a0..48b8a74c720eb7e17520ac8cac487be821c9c037 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#include <math.h>
-#include <stdlib.h>
 #include "util.h"
-#include "symrec.h"
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <math.h>
+#endif
+
 #include "globals.h"
-#include "bytecode.h"
 #include "errwarn.h"
 #include "expr.h"
+#include "symrec.h"
+
+#include "bytecode.h"
 
 #define YYDEBUG 1
 
index 93e13fbd18b141012b09c609c6dc955de4909261..2b73d99645b41be2c1b9af2c3edd829b4657df67 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#include <math.h>
-#include <stdlib.h>
 #include "util.h"
-#include "symrec.h"
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <math.h>
+#endif
+
 #include "globals.h"
-#include "bytecode.h"
 #include "errwarn.h"
 #include "expr.h"
+#include "symrec.h"
+
+#include "bytecode.h"
 
 #define YYDEBUG 1
 
index 92a2df1870a0812436c73c163d9c085f8a94e53f..4d02b6ec79421e56c6bb2dbb438e29ce723fe9f3 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#include <stdio.h>
 #include "util.h"
+
+#include <stdio.h>
+
 #include "bytecode.h"
 #include "section.h"
 #include "outfmt.h"
index feaddd1d879f7b1b667d43d70b9fabc963441267..bac3b17a8440dd25ee4de98c404bd0c5cfa02876 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#include <stdio.h>
 #include "util.h"
+
+#include <stdio.h>
+
 #include "bytecode.h"
 #include "section.h"
 #include "outfmt.h"
index bbcb144981592e15b9a511d060af56a6cc518534..46771ede801bd8084ed26c067eec5cb749092673 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
+#include "util.h"
+
 #ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <string.h>
 #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
index 5f163894630ffae0e06e5d899ec067bd31a5e908..a4fb57766e39609a5a4ef0a6addd6c682bbb6406 100644 (file)
@@ -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
  *  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 <stdio.h>
+
+#include "errwarn.h"
+
 #include "outfmt.h"
 #include "preproc.h"
-#include "errwarn.h"
 
 static int is_interactive;
 static FILE *in;
index ce70e2b4187051fba1c96579afc7e4c3558b1890..d188283fdb6fd63e84a4e8dcc0c844efeac4fe34 100644 (file)
@@ -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
  *  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 <stdio.h>
+
+#include "errwarn.h"
+
 #include "outfmt.h"
 #include "preproc.h"
-#include "errwarn.h"
 
 static int is_interactive;
 static FILE *in;
index 1b0248f7aad360451bdb74a1b18bc14edd304267..cc4656db394bb85ea1f7301eea8ea7127c16cb8c 100644 (file)
@@ -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
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <stdlib.h>
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "util.h"
+
 #include <stdio.h>
-#include "expr.h"
-#include "symrec.h"
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#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 */
index 69213d1f40f379ebf402127d3f9e4448c7ae7741..27502b3b0ce1f0a8cefcf3df36d63cfdd6c55ffe 100644 (file)
@@ -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
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <stdlib.h>
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "util.h"
+
 #include <stdio.h>
-#include "expr.h"
-#include "symrec.h"
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#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 */
index 22612e8de9e891f89c45fa16f6f9b56bad51d4d0..d902da2ee3bbefd6d104cefd82d1aba76f787ecc 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include "util.h"
+
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#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;
index 30cddbd2492803d1b0784363a66ee2e7e52daa1c..45ad973e246c729bed1f33c032e2b3892f3eeb17 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
+#include "util.h"
+
 #include <stdio.h>
+#include <ctype.h>
 
 #ifdef STDC_HEADERS
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
+# include <stdlib.h>
+# include <stdarg.h>
+# include <string.h>
 #endif
 
-#include <ctype.h>
-
-#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. */
index 1b0248f7aad360451bdb74a1b18bc14edd304267..cc4656db394bb85ea1f7301eea8ea7127c16cb8c 100644 (file)
@@ -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
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <stdlib.h>
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "util.h"
+
 #include <stdio.h>
-#include "expr.h"
-#include "symrec.h"
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#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 */
index 53c288bcb3f59574cfef5ec1f3b0da7eb088fd7a..ca917c064b10e37fc8675cd6c69ad84b09f25617 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include "util.h"
+
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#endif
+
 #include "bytecode.h"
 #include "section.h"
 #include "outfmt.h"
index 179c233ef131966b7f5000c7b83bf4d35a4ec451..1d8c00a52fb875ad418d95ce2bbfefe2d17de2bb 100644 (file)
@@ -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
  *  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 */
index 870f6e954aa3126b251918715e280b8a6c7a80ca..af4014396bda07e76d856f2c3e7364766ba4d5b9 100644 (file)
@@ -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
  *  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 */
index 900d148afad8e77b731cf79670f8f51f5e6db625..6b818134dd0f6332bcb0eb4743e946025954fcb7 100644 (file)
@@ -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
  *  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 */
index 206d3aaa58f0849f4852bb28caf31de3a29092a0..48b8a74c720eb7e17520ac8cac487be821c9c037 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#include <math.h>
-#include <stdlib.h>
 #include "util.h"
-#include "symrec.h"
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <math.h>
+#endif
+
 #include "globals.h"
-#include "bytecode.h"
 #include "errwarn.h"
 #include "expr.h"
+#include "symrec.h"
+
+#include "bytecode.h"
 
 #define YYDEBUG 1
 
index 93e13fbd18b141012b09c609c6dc955de4909261..2b73d99645b41be2c1b9af2c3edd829b4657df67 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#include <math.h>
-#include <stdlib.h>
 #include "util.h"
-#include "symrec.h"
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <math.h>
+#endif
+
 #include "globals.h"
-#include "bytecode.h"
 #include "errwarn.h"
 #include "expr.h"
+#include "symrec.h"
+
+#include "bytecode.h"
 
 #define YYDEBUG 1
 
index 92a2df1870a0812436c73c163d9c085f8a94e53f..4d02b6ec79421e56c6bb2dbb438e29ce723fe9f3 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#include <stdio.h>
 #include "util.h"
+
+#include <stdio.h>
+
 #include "bytecode.h"
 #include "section.h"
 #include "outfmt.h"
index feaddd1d879f7b1b667d43d70b9fabc963441267..bac3b17a8440dd25ee4de98c404bd0c5cfa02876 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#include <stdio.h>
 #include "util.h"
+
+#include <stdio.h>
+
 #include "bytecode.h"
 #include "section.h"
 #include "outfmt.h"
index bbcb144981592e15b9a511d060af56a6cc518534..46771ede801bd8084ed26c067eec5cb749092673 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
+#include "util.h"
+
 #ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <string.h>
 #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
index 5f163894630ffae0e06e5d899ec067bd31a5e908..a4fb57766e39609a5a4ef0a6addd6c682bbb6406 100644 (file)
@@ -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
  *  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 <stdio.h>
+
+#include "errwarn.h"
+
 #include "outfmt.h"
 #include "preproc.h"
-#include "errwarn.h"
 
 static int is_interactive;
 static FILE *in;
index ce70e2b4187051fba1c96579afc7e4c3558b1890..d188283fdb6fd63e84a4e8dcc0c844efeac4fe34 100644 (file)
@@ -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
  *  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 <stdio.h>
+
+#include "errwarn.h"
+
 #include "outfmt.h"
 #include "preproc.h"
-#include "errwarn.h"
 
 static int is_interactive;
 static FILE *in;
index 161d1f3c22de4bb22630949fcf2564bce41287d1..f92f3c2358b971a27be7c3c92769b9eeee155e42 100644 (file)
@@ -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 <stddef.h>
 # include <stdlib.h>
@@ -52,8 +54,6 @@ void memcpy(void *, const void *, size_t);
 # endif
 #endif
 
-#include "util.h"
-
 char *
 strdup(const char *str)
 {
index 80b65106df071756c42f7f70cb69f6c41043e3e5..a51bac643c96ef954249a6c67953189e62f526a4 100644 (file)
@@ -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 <limits.h>
+#include "util.h"
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
 #include <ctype.h>
 #include <errno.h>
+
 #ifdef STDC_HEADERS
 # include <stdlib.h>
 #endif
 
-#include "util.h"
-
 /*
  * Convert a string to an unsigned long integer.
  *
index 445fc19d382299e971b8996b94473656cabf3ab0..7ef929824a2700dbc7020e0f64855531635145ed 100644 (file)
@@ -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
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <stdlib.h>
-#include <string.h>
-#include "symrec.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "util.h"
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#endif
+
 #include "globals.h"
 #include "errwarn.h"
+#include "symrec.h"
 
 /* private functions */
 static symtab *symtab_get(char *);
index 4c17de1ebace52f8a474e2c5290ecb52bd001477..42a42707afa30e0b04d786477a63a036835b3d39 100644 (file)
@@ -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 <stddef.h>
 # include <stdlib.h>
@@ -52,8 +54,6 @@ void memcpy(void *, const void *, size_t);
 # endif
 #endif
 
-#include "util.h"
-
 char *
 strdup(const char *str)
 {