summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-07-02 14:18:04 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-07-02 14:18:04 +0000
commitec22b69d36a5c2efaaf68b803ff8eaa6d950eb38 (patch)
tree62cff8a7f900a7613a0f742aaf5462da5b55c60d
parent09b4b412a3fcdfee5bc8414b559f0396c66d14a3 (diff)
xdvik: Include "xdvi-config.h" first in all compilable source files but not in headers,
as claimed in a comment at the top of xdvi-config.h git-svn-id: svn://tug.org/texlive/trunk@31070 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/xdvik/ChangeLog6
-rw-r--r--Build/source/texk/xdvik/alloc-debug.h7
-rw-r--r--Build/source/texk/xdvik/dl_list.c1
-rw-r--r--Build/source/texk/xdvik/dl_list.h1
-rw-r--r--Build/source/texk/xdvik/dvi-draw.h1
-rw-r--r--Build/source/texk/xdvik/dvi-init.h1
-rw-r--r--Build/source/texk/xdvik/dvisel.c2
-rw-r--r--Build/source/texk/xdvik/encodings.h1
-rw-r--r--Build/source/texk/xdvik/filehist.c3
-rw-r--r--Build/source/texk/xdvik/gui/mag.c2
-rw-r--r--Build/source/texk/xdvik/gui/menu.h1
-rw-r--r--Build/source/texk/xdvik/gui/message-window.c4
-rw-r--r--Build/source/texk/xdvik/gui/print-dialog.c2
-rw-r--r--Build/source/texk/xdvik/gui/print-log.c2
-rw-r--r--Build/source/texk/xdvik/gui/search-dialog.h1
-rw-r--r--Build/source/texk/xdvik/gui/selection.h1
-rw-r--r--Build/source/texk/xdvik/gui/sfDir.h2
-rw-r--r--Build/source/texk/xdvik/gui/sfDraw.h2
-rw-r--r--Build/source/texk/xdvik/gui/sfPath.h2
-rw-r--r--Build/source/texk/xdvik/gui/topic-window.h1
-rw-r--r--Build/source/texk/xdvik/gui/xlwradio.h2
-rw-r--r--Build/source/texk/xdvik/gui/xlwradioP.h2
-rw-r--r--Build/source/texk/xdvik/gui/xm_prefsP.h1
-rw-r--r--Build/source/texk/xdvik/hypertex.c6
-rw-r--r--Build/source/texk/xdvik/image-magick.c3
-rw-r--r--Build/source/texk/xdvik/image-magick.h1
-rw-r--r--Build/source/texk/xdvik/my-snprintf.c3
-rw-r--r--Build/source/texk/xdvik/my-vsnprintf.c4
-rw-r--r--Build/source/texk/xdvik/my-vsnprintf.h1
-rw-r--r--Build/source/texk/xdvik/psdps.c10
-rw-r--r--Build/source/texk/xdvik/psgs.c8
-rw-r--r--Build/source/texk/xdvik/psnews.c12
-rw-r--r--Build/source/texk/xdvik/search-internal.h1
-rw-r--r--Build/source/texk/xdvik/special.c4
-rw-r--r--Build/source/texk/xdvik/special.h1
-rw-r--r--Build/source/texk/xdvik/string-utils.c9
-rw-r--r--Build/source/texk/xdvik/string-utils.h1
-rw-r--r--Build/source/texk/xdvik/string_list.c8
-rw-r--r--Build/source/texk/xdvik/tests/run_tests.c6
-rw-r--r--Build/source/texk/xdvik/util.h1
-rw-r--r--Build/source/texk/xdvik/xdvi-debug.h1
-rw-r--r--Build/source/texk/xdvik/xdvi.h2
-rw-r--r--Build/source/texk/xdvik/xserver-info.c1
43 files changed, 59 insertions, 72 deletions
diff --git a/Build/source/texk/xdvik/ChangeLog b/Build/source/texk/xdvik/ChangeLog
index e652c0b35ce..574be1ef09d 100644
--- a/Build/source/texk/xdvik/ChangeLog
+++ b/Build/source/texk/xdvik/ChangeLog
@@ -1,3 +1,9 @@
+2013-07-02 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * *.[ch], gui/*.[ch], tests/*.[ch]: Include "xdvi-config.h"
+ first in all compilable source files but not in headers, as
+ claimed in a comment at the top of xdvi-config.h.
+
2013-07-01 Peter Breitenlohner <peb@mppmu.mpg.de>
* font-open.c, psdps.c, xdvi.h: Replace bcopy(f, t, l) =>
diff --git a/Build/source/texk/xdvik/alloc-debug.h b/Build/source/texk/xdvik/alloc-debug.h
index 0ef270cff11..f729ce82fa1 100644
--- a/Build/source/texk/xdvik/alloc-debug.h
+++ b/Build/source/texk/xdvik/alloc-debug.h
@@ -1,10 +1,9 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include "xdvi-config.h" /* for xmalloc etc. */
-
#ifndef ALLOC_DEBUG_H__
#define ALLOC_DEBUG_H__
+#include <stdio.h>
+#include <stdlib.h>
+
/*
* Simplistic macros to help finding `hot spots'/bugs in memory handling.
diff --git a/Build/source/texk/xdvik/dl_list.c b/Build/source/texk/xdvik/dl_list.c
index 76eeabc1297..7d8787ecc47 100644
--- a/Build/source/texk/xdvik/dl_list.c
+++ b/Build/source/texk/xdvik/dl_list.c
@@ -1,3 +1,4 @@
+#include "xdvi-config.h"
#include "dl_list.h"
size_t dl_list_len(struct dl_list *list)
diff --git a/Build/source/texk/xdvik/dl_list.h b/Build/source/texk/xdvik/dl_list.h
index 50ef7deee0c..0c246cc328e 100644
--- a/Build/source/texk/xdvik/dl_list.h
+++ b/Build/source/texk/xdvik/dl_list.h
@@ -1,5 +1,4 @@
#include <stdio.h>
-#include "xdvi-config.h"
#include "xdvi.h"
#include "version.h"
#include "kpathsea/c-stat.h"
diff --git a/Build/source/texk/xdvik/dvi-draw.h b/Build/source/texk/xdvik/dvi-draw.h
index f79667b2f23..c8e74e1f2a4 100644
--- a/Build/source/texk/xdvik/dvi-draw.h
+++ b/Build/source/texk/xdvik/dvi-draw.h
@@ -24,7 +24,6 @@
#ifndef DVI_DRAW_H_
#define DVI_DRAW_H_
-#include "xdvi-config.h"
#include "xdvi.h"
diff --git a/Build/source/texk/xdvik/dvi-init.h b/Build/source/texk/xdvik/dvi-init.h
index c762382c3fe..ad478fa9cbd 100644
--- a/Build/source/texk/xdvik/dvi-init.h
+++ b/Build/source/texk/xdvik/dvi-init.h
@@ -24,7 +24,6 @@
#ifndef DVI_INIT_H_
#define DVI_INIT_H_
-#include "xdvi-config.h"
#include "xdvi.h"
#if FREETYPE
diff --git a/Build/source/texk/xdvik/dvisel.c b/Build/source/texk/xdvik/dvisel.c
index e924b90c0c4..1e52dc5453d 100644
--- a/Build/source/texk/xdvik/dvisel.c
+++ b/Build/source/texk/xdvik/dvisel.c
@@ -25,6 +25,8 @@
* SOFTWARE.
*/
+#include "xdvi-config.h"
+
#include <string.h>
#include <ctype.h>
diff --git a/Build/source/texk/xdvik/encodings.h b/Build/source/texk/xdvik/encodings.h
index e4b3741a96d..06fef2a4dca 100644
--- a/Build/source/texk/xdvik/encodings.h
+++ b/Build/source/texk/xdvik/encodings.h
@@ -23,7 +23,6 @@
#ifndef ENCODINGS_H_
#define ENCODINGS_H_
-#include "xdvi-config.h"
#include "xdvi.h"
struct adobe2unicode {
diff --git a/Build/source/texk/xdvik/filehist.c b/Build/source/texk/xdvik/filehist.c
index f6974f0bff8..d669ad7a358 100644
--- a/Build/source/texk/xdvik/filehist.c
+++ b/Build/source/texk/xdvik/filehist.c
@@ -25,9 +25,10 @@
fileHistory and displayed in `File -> Open Recent' menu.
*/
+#include "xdvi-config.h"
+
#include <ctype.h>
-#include "xdvi-config.h"
#include "xdvi.h"
#include "util.h"
#include "dl_list.h"
diff --git a/Build/source/texk/xdvik/gui/mag.c b/Build/source/texk/xdvik/gui/mag.c
index 2bf87904a0f..ea494f32519 100644
--- a/Build/source/texk/xdvik/gui/mag.c
+++ b/Build/source/texk/xdvik/gui/mag.c
@@ -28,9 +28,9 @@
* Implementation of the magnifier window.
*/
+#include "xdvi-config.h"
#include <math.h>
-#include "xdvi-config.h"
/* one of the following should define OPEN_MAX: */
#include <limits.h>
#include "c-openmx.h"
diff --git a/Build/source/texk/xdvik/gui/menu.h b/Build/source/texk/xdvik/gui/menu.h
index 3c5f4487f1f..97c38cccb0d 100644
--- a/Build/source/texk/xdvik/gui/menu.h
+++ b/Build/source/texk/xdvik/gui/menu.h
@@ -27,7 +27,6 @@
#ifndef MENU_H_
#define MENU_H_
-#include "xdvi-config.h"
#include "events.h"
#include "xdvi.h"
diff --git a/Build/source/texk/xdvik/gui/message-window.c b/Build/source/texk/xdvik/gui/message-window.c
index 093ee33548c..d6d23c2a78d 100644
--- a/Build/source/texk/xdvik/gui/message-window.c
+++ b/Build/source/texk/xdvik/gui/message-window.c
@@ -49,12 +49,12 @@ by the user (as a rough guide: a delay of more than half a second)
*/
-#include <ctype.h>
-
#include "xdvi-config.h"
#include "xdvi.h"
#include "string-utils.h"
+#include <ctype.h>
+
/* Xaw specific stuff */
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
diff --git a/Build/source/texk/xdvik/gui/print-dialog.c b/Build/source/texk/xdvik/gui/print-dialog.c
index 79c2b34c887..b06338b41ec 100644
--- a/Build/source/texk/xdvik/gui/print-dialog.c
+++ b/Build/source/texk/xdvik/gui/print-dialog.c
@@ -24,8 +24,8 @@
SU: Adapted from non-k xdvi's popups.c and added saving functionality.
*/
-#include <string.h>
#include "xdvi-config.h"
+#include <string.h>
#include "xdvi.h"
#include "my-vsnprintf.h"
#include <ctype.h>
diff --git a/Build/source/texk/xdvik/gui/print-log.c b/Build/source/texk/xdvik/gui/print-log.c
index 264a3eacf47..73d9df3bdac 100644
--- a/Build/source/texk/xdvik/gui/print-log.c
+++ b/Build/source/texk/xdvik/gui/print-log.c
@@ -31,8 +31,8 @@
http://xdvi.sourceforge.net/gui.html#file-logs
*/
-#include <string.h>
#include "xdvi-config.h"
+#include <string.h>
#include "xdvi.h"
#include "xdvi-debug.h"
diff --git a/Build/source/texk/xdvik/gui/search-dialog.h b/Build/source/texk/xdvik/gui/search-dialog.h
index 6c9f2ec5287..c0b8cf07afa 100644
--- a/Build/source/texk/xdvik/gui/search-dialog.h
+++ b/Build/source/texk/xdvik/gui/search-dialog.h
@@ -23,7 +23,6 @@
#ifndef SEARCH_DIALOG_H_
#define SEARCH_DIALOG_H_
-#include "xdvi-config.h"
#include "xdvi.h"
typedef enum { SEARCH_UP = 0, SEARCH_DOWN, SEARCH_UNINITIALIZED } searchDirectionT;
diff --git a/Build/source/texk/xdvik/gui/selection.h b/Build/source/texk/xdvik/gui/selection.h
index 1dcb8416cbb..6617338dbc6 100644
--- a/Build/source/texk/xdvik/gui/selection.h
+++ b/Build/source/texk/xdvik/gui/selection.h
@@ -23,7 +23,6 @@
#ifndef SELECTION_H_
#define SELECTION_H_
-#include "xdvi-config.h"
#include "xdvi.h"
Boolean set_selection(const char *text, Widget w);
diff --git a/Build/source/texk/xdvik/gui/sfDir.h b/Build/source/texk/xdvik/gui/sfDir.h
index 0207ec4f1a0..dfc6797f86f 100644
--- a/Build/source/texk/xdvik/gui/sfDir.h
+++ b/Build/source/texk/xdvik/gui/sfDir.h
@@ -24,8 +24,6 @@
#ifndef SFDIR_H_
#define SFDIR_H_
-#include "xdvi-config.h"
-
#include "kpathsea/c-auto.h"
#include "kpathsea/config.h"
#include "kpathsea/c-dir.h"
diff --git a/Build/source/texk/xdvik/gui/sfDraw.h b/Build/source/texk/xdvik/gui/sfDraw.h
index e9199793df8..a7bc1a8cfbe 100644
--- a/Build/source/texk/xdvik/gui/sfDraw.h
+++ b/Build/source/texk/xdvik/gui/sfDraw.h
@@ -24,8 +24,6 @@
#ifndef SFDRAW_H_
#define SFDRAW_H_
-#include "xdvi-config.h"
-
#if !defined(MOTIF) /* for xdvik */
#include <stdio.h>
diff --git a/Build/source/texk/xdvik/gui/sfPath.h b/Build/source/texk/xdvik/gui/sfPath.h
index 3014adf6748..2feba57aeff 100644
--- a/Build/source/texk/xdvik/gui/sfPath.h
+++ b/Build/source/texk/xdvik/gui/sfPath.h
@@ -24,8 +24,6 @@
#ifndef SFPATH_H_
#define SFPATH_H_
-#include "xdvi-config.h"
-
#ifndef MOTIF
extern int SFchdir(const char *path);
diff --git a/Build/source/texk/xdvik/gui/topic-window.h b/Build/source/texk/xdvik/gui/topic-window.h
index b9df8f14db7..a7166b029a8 100644
--- a/Build/source/texk/xdvik/gui/topic-window.h
+++ b/Build/source/texk/xdvik/gui/topic-window.h
@@ -24,7 +24,6 @@
#ifndef TOPIC_WINDOW_H_
#define TOPIC_WINDOW_H_
-#include "xdvi-config.h"
#include "xdvi.h"
#include "version.h"
diff --git a/Build/source/texk/xdvik/gui/xlwradio.h b/Build/source/texk/xdvik/gui/xlwradio.h
index 728c97fcbee..cd63fbd7621 100644
--- a/Build/source/texk/xdvik/gui/xlwradio.h
+++ b/Build/source/texk/xdvik/gui/xlwradio.h
@@ -37,8 +37,6 @@ Boston, MA 02111-1307, USA. */
#ifndef _XawRadio_h
#define _XawRadio_h
-#include "xdvi-config.h"
-
#ifndef MOTIF /* entire file */
/***********************************************************************
diff --git a/Build/source/texk/xdvik/gui/xlwradioP.h b/Build/source/texk/xdvik/gui/xlwradioP.h
index 0cc72f1976b..6c9da32f59e 100644
--- a/Build/source/texk/xdvik/gui/xlwradioP.h
+++ b/Build/source/texk/xdvik/gui/xlwradioP.h
@@ -36,8 +36,6 @@ Boston, MA 02111-1307, USA. */
#ifndef _XawRadioP_h
#define _XawRadioP_h
-#include "xdvi-config.h"
-
#include "xlwradio.h"
#ifndef MOTIF
diff --git a/Build/source/texk/xdvik/gui/xm_prefsP.h b/Build/source/texk/xdvik/gui/xm_prefsP.h
index 530373af241..5c57cb5bf84 100644
--- a/Build/source/texk/xdvik/gui/xm_prefsP.h
+++ b/Build/source/texk/xdvik/gui/xm_prefsP.h
@@ -29,7 +29,6 @@
#define XM_PREFS_P_H_
#include "xdvi.h"
-#include "xdvi-config.h"
#ifdef MOTIF
/*
diff --git a/Build/source/texk/xdvik/hypertex.c b/Build/source/texk/xdvik/hypertex.c
index 3684a25b698..51101667438 100644
--- a/Build/source/texk/xdvik/hypertex.c
+++ b/Build/source/texk/xdvik/hypertex.c
@@ -60,14 +60,14 @@ http://xdvi.sourceforge.net/gui.html#navigation-openLinks
#define COPY_TMP_FILE 0 /* see comments below */
+#include "xdvi-config.h"
+#include "xdvi.h"
+
/* #define DEBUG */
/* #define DEBUG_MEMORY_HANDLING */
#include "alloc-debug.h"
-#include "xdvi-config.h"
-#include "xdvi.h"
-
#include <string.h>
#include <ctype.h>
diff --git a/Build/source/texk/xdvik/image-magick.c b/Build/source/texk/xdvik/image-magick.c
index d86c64e9e9e..c83f52f87f5 100644
--- a/Build/source/texk/xdvik/image-magick.c
+++ b/Build/source/texk/xdvik/image-magick.c
@@ -47,9 +47,10 @@
6. There's also work to do to respond to window events in
load_image() and display_image() functions.
*/
+#include "xdvi-config.h"
+
#include <ctype.h>
-#include "xdvi-config.h"
#include "xdvi.h"
#include "dvi-init.h"
#include "events.h"
diff --git a/Build/source/texk/xdvik/image-magick.h b/Build/source/texk/xdvik/image-magick.h
index dee730a5b70..bad1aa0ad11 100644
--- a/Build/source/texk/xdvik/image-magick.h
+++ b/Build/source/texk/xdvik/image-magick.h
@@ -23,7 +23,6 @@
#ifndef IMAGE_MAGICK_H_
#define IMAGE_MAGICK_H_
-#include "xdvi-config.h"
#include "xdvi.h"
#ifdef MAGICK
diff --git a/Build/source/texk/xdvik/my-snprintf.c b/Build/source/texk/xdvik/my-snprintf.c
index 5fa9ac96798..6bf2e5a3f30 100644
--- a/Build/source/texk/xdvik/my-snprintf.c
+++ b/Build/source/texk/xdvik/my-snprintf.c
@@ -19,10 +19,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
------------------------------------------------------------*/
+#include "xdvi-config.h"
+
#include <string.h>
#include <stdio.h>
-#include "xdvi-config.h"
#include "xdvi.h"
#include "my-vsnprintf.h"
#include "my-snprintf.h"
diff --git a/Build/source/texk/xdvik/my-vsnprintf.c b/Build/source/texk/xdvik/my-vsnprintf.c
index b5db0dfb83e..44bf6d9255f 100644
--- a/Build/source/texk/xdvik/my-vsnprintf.c
+++ b/Build/source/texk/xdvik/my-vsnprintf.c
@@ -21,9 +21,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
------------------------------------------------------------*/
+#include "xdvi-config.h"
+
#include <string.h>
#include <stdio.h>
-#include "xdvi-config.h"
+
#include "xdvi.h"
#include "my-vsnprintf.h"
diff --git a/Build/source/texk/xdvik/my-vsnprintf.h b/Build/source/texk/xdvik/my-vsnprintf.h
index f25b277c0bf..a5e6d3c39f3 100644
--- a/Build/source/texk/xdvik/my-vsnprintf.h
+++ b/Build/source/texk/xdvik/my-vsnprintf.h
@@ -24,7 +24,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef MY_VSNPRINTF_H__
#define MY_VSNPRINTF_H__
-#include "xdvi-config.h"
#include "xdvi.h"
#if HAVE_VSNPRINTF && HAVE_GOOD_VSNPRINTF
diff --git a/Build/source/texk/xdvik/psdps.c b/Build/source/texk/xdvik/psdps.c
index 466eb59bce0..ca9cd042cc3 100644
--- a/Build/source/texk/xdvik/psdps.c
+++ b/Build/source/texk/xdvik/psdps.c
@@ -32,6 +32,11 @@ package by Dirk Grunwald (grunwald@colorado.edu).
#ifdef PS_DPS /* entire file */
+#include "xdvi-config.h"
+#include "special.h"
+#include "util.h"
+#include "xdvi.h"
+
#include <setjmp.h>
#include <signal.h>
#include <X11/X.h>
@@ -41,11 +46,6 @@ package by Dirk Grunwald (grunwald@colorado.edu).
#include <DPS/dpsexcept.h>
#include <DPS/dpsclient.h>
-#include "xdvi-config.h"
-#include "special.h"
-#include "util.h"
-#include "xdvi.h"
-
#ifdef X_NOT_STDC_ENV
extern int errno;
#endif
diff --git a/Build/source/texk/xdvik/psgs.c b/Build/source/texk/xdvik/psgs.c
index a5d22776e2d..8a5689377a7 100644
--- a/Build/source/texk/xdvik/psgs.c
+++ b/Build/source/texk/xdvik/psgs.c
@@ -25,6 +25,10 @@ OTHER DEALINGS IN THE SOFTWARE.
#ifdef PS_GS /* entire file */
+#include "xdvi-config.h"
+#include "xdvi.h"
+#include "psgs.h"
+
#include <setjmp.h>
#include <X11/Xatom.h>
#include <sys/time.h> /* for timeval */
@@ -35,10 +39,6 @@ OTHER DEALINGS IN THE SOFTWARE.
#include <errno.h>
#include <strings.h>
-#include "xdvi-config.h"
-#include "xdvi.h"
-#include "psgs.h"
-
#include "kpathsea/c-pathmx.h"
#include "dvi-init.h"
#include "dvi-draw.h"
diff --git a/Build/source/texk/xdvik/psnews.c b/Build/source/texk/xdvik/psnews.c
index 9fb9c2a2300..44b26d6b26e 100644
--- a/Build/source/texk/xdvik/psnews.c
+++ b/Build/source/texk/xdvik/psnews.c
@@ -38,6 +38,12 @@ package by Dirk Grunwald (grunwald@colorado.edu).
#ifdef PS_NEWS /* whole file */
+#include "xdvi-config.h"
+#include "xdvi.h"
+#include "events.h"
+#include "dvi-init.h"
+#include "dvi-draw.h"
+
#include <signal.h>
#include <sys/file.h> /* this defines FASYNC */
#include <X11/X.h>
@@ -50,12 +56,6 @@ package by Dirk Grunwald (grunwald@colorado.edu).
#include <errno.h>
#include <setjmp.h>
-#include "xdvi-config.h"
-#include "xdvi.h"
-#include "events.h"
-#include "dvi-init.h"
-#include "dvi-draw.h"
-
/* if POSIX O_NONBLOCK is not available, use O_NDELAY */
#if !defined(O_NONBLOCK) && defined(O_NDELAY)
#define O_NONBLOCK O_NDELAY
diff --git a/Build/source/texk/xdvik/search-internal.h b/Build/source/texk/xdvik/search-internal.h
index 6f7f864f74c..725a2754f70 100644
--- a/Build/source/texk/xdvik/search-internal.h
+++ b/Build/source/texk/xdvik/search-internal.h
@@ -23,7 +23,6 @@
#ifndef DVI_SEARCH_H_
#define DVI_SEARCH_H_
-#include "xdvi-config.h"
#include "xdvi.h"
#include "search-dialog.h"
diff --git a/Build/source/texk/xdvik/special.c b/Build/source/texk/xdvik/special.c
index 9d8cf893fdd..3cf55298ec8 100644
--- a/Build/source/texk/xdvik/special.c
+++ b/Build/source/texk/xdvik/special.c
@@ -55,11 +55,11 @@ This module is based on prior work as noted below.
*/
-#include <setjmp.h>
-
#include "xdvi-config.h"
#include "xdvi.h"
+#include <setjmp.h>
+
#include <ctype.h>
#include "kpathsea/c-fopen.h"
diff --git a/Build/source/texk/xdvik/special.h b/Build/source/texk/xdvik/special.h
index 8b41d313c04..efcd3b7deb5 100644
--- a/Build/source/texk/xdvik/special.h
+++ b/Build/source/texk/xdvik/special.h
@@ -23,7 +23,6 @@
#ifndef SPECIAL_H_
#define SPECIAL_H_
-#include "xdvi-config.h"
#include "xdvi.h"
#include "events.h"
diff --git a/Build/source/texk/xdvik/string-utils.c b/Build/source/texk/xdvik/string-utils.c
index 3ee4bb2d8da..1e9bd5e8ef7 100644
--- a/Build/source/texk/xdvik/string-utils.c
+++ b/Build/source/texk/xdvik/string-utils.c
@@ -24,15 +24,16 @@
/* #define MYDEBUG 1 */
-#include <string.h>
-#include <stdio.h>
-#include <locale.h>
-#include <ctype.h>
#include "xdvi-config.h"
#include "xdvi.h"
#include "string-utils.h"
#include "util.h"
+#include <string.h>
+#include <stdio.h>
+#include <locale.h>
+#include <ctype.h>
+
/*------------------------------------------------------------
* str_is_prefix
*
diff --git a/Build/source/texk/xdvik/string-utils.h b/Build/source/texk/xdvik/string-utils.h
index 7ef7f3e1784..96213e00d59 100644
--- a/Build/source/texk/xdvik/string-utils.h
+++ b/Build/source/texk/xdvik/string-utils.h
@@ -1,7 +1,6 @@
#ifndef STRING_UTILS_H_
#define STRING_UTILS_H_
-#include "xdvi-config.h"
#include <stdarg.h>
#include "my-vsnprintf.h"
diff --git a/Build/source/texk/xdvik/string_list.c b/Build/source/texk/xdvik/string_list.c
index 7138c2a7b2f..df2bdab7596 100644
--- a/Build/source/texk/xdvik/string_list.c
+++ b/Build/source/texk/xdvik/string_list.c
@@ -1,12 +1,12 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include "xdvi-config.h"
#include "xdvi.h"
#include "util.h"
#include "string_list.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
/*
* Helper functions for string lists
diff --git a/Build/source/texk/xdvik/tests/run_tests.c b/Build/source/texk/xdvik/tests/run_tests.c
index f4d672aa0bc..1087af810b3 100644
--- a/Build/source/texk/xdvik/tests/run_tests.c
+++ b/Build/source/texk/xdvik/tests/run_tests.c
@@ -1,10 +1,10 @@
+#include "run_tests.h"
+#include "util.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include "run_tests.h"
-#include "util.h"
-
/* helper routines */
Boolean test_str_equality(int verbosity, const char *str1, const char *str2)
{
diff --git a/Build/source/texk/xdvik/util.h b/Build/source/texk/xdvik/util.h
index d82d8d94581..4ce8164caa8 100644
--- a/Build/source/texk/xdvik/util.h
+++ b/Build/source/texk/xdvik/util.h
@@ -24,7 +24,6 @@
#define UTIL_H_
#include <stdio.h>
-#include "xdvi-config.h"
#include "version.h"
#include "kpathsea/c-stat.h"
#include "kpathsea/hash.h"
diff --git a/Build/source/texk/xdvik/xdvi-debug.h b/Build/source/texk/xdvik/xdvi-debug.h
index 506f785f0bc..4924f567c51 100644
--- a/Build/source/texk/xdvik/xdvi-debug.h
+++ b/Build/source/texk/xdvik/xdvi-debug.h
@@ -26,7 +26,6 @@
/* debugging flags and macros */
-#include "xdvi-config.h"
#include "xdvi.h"
#include "version.h"
diff --git a/Build/source/texk/xdvik/xdvi.h b/Build/source/texk/xdvik/xdvi.h
index 3112655a1e1..668e5fbd906 100644
--- a/Build/source/texk/xdvik/xdvi.h
+++ b/Build/source/texk/xdvik/xdvi.h
@@ -33,8 +33,6 @@ in xdvi.c.
#ifndef XDVI_H_
#define XDVI_H_
-#include "xdvi-config.h"
-
/* headers used by all modules */
#include "xdvi-debug.h"
#include "c-auto.h"
diff --git a/Build/source/texk/xdvik/xserver-info.c b/Build/source/texk/xdvik/xserver-info.c
index a8417584177..3a47c0ef1b2 100644
--- a/Build/source/texk/xdvik/xserver-info.c
+++ b/Build/source/texk/xdvik/xserver-info.c
@@ -28,6 +28,7 @@
* Author: Jim Fulton, MIT X Consortium
*/
+#include "xdvi-config.h"
#include "xdvi.h"
#include "xserver-info.h"