tools: Copy 16-bit font definitions to avoid including 16-bit headers.
diff --git a/tools/fnt2bdf.c b/tools/fnt2bdf.c
index f9f6647..5534ff9 100644
--- a/tools/fnt2bdf.c
+++ b/tools/fnt2bdf.c
@@ -39,7 +39,130 @@
# include <io.h>
#endif
-#include "fnt2bdf.h"
+#include "windef.h"
+#include "wingdi.h"
+
+enum data_types {dfChar, dfShort, dfLong, dfString};
+
+#define ERROR_DATA 1
+#define ERROR_VERSION 2
+#define ERROR_SIZE 3
+#define ERROR_MEMORY 4
+#define ERROR_FILE 5
+
+#include "pshpack1.h"
+
+typedef struct
+{
+ INT16 dfType;
+ INT16 dfPoints;
+ INT16 dfVertRes;
+ INT16 dfHorizRes;
+ INT16 dfAscent;
+ INT16 dfInternalLeading;
+ INT16 dfExternalLeading;
+ BYTE dfItalic;
+ BYTE dfUnderline;
+ BYTE dfStrikeOut;
+ INT16 dfWeight;
+ BYTE dfCharSet;
+ INT16 dfPixWidth;
+ INT16 dfPixHeight;
+ BYTE dfPitchAndFamily;
+ INT16 dfAvgWidth;
+ INT16 dfMaxWidth;
+ BYTE dfFirstChar;
+ BYTE dfLastChar;
+ BYTE dfDefaultChar;
+ BYTE dfBreakChar;
+ INT16 dfWidthBytes;
+ LONG dfDevice;
+ LONG dfFace;
+ LONG dfBitsPointer;
+ LONG dfBitsOffset;
+ BYTE dfReserved;
+ LONG dfFlags;
+ INT16 dfAspace;
+ INT16 dfBspace;
+ INT16 dfCspace;
+ LONG dfColorPointer;
+ LONG dfReserved1[4];
+} FONTINFO16;
+
+typedef struct
+{
+ WORD offset;
+ WORD length;
+ WORD flags;
+ WORD id;
+ WORD handle;
+ WORD usage;
+} NE_NAMEINFO;
+
+typedef struct
+{
+ WORD type_id;
+ WORD count;
+ DWORD resloader;
+} NE_TYPEINFO;
+
+#define NE_FFLAGS_SINGLEDATA 0x0001
+#define NE_FFLAGS_MULTIPLEDATA 0x0002
+#define NE_FFLAGS_WIN32 0x0010
+#define NE_FFLAGS_FRAMEBUF 0x0100
+#define NE_FFLAGS_CONSOLE 0x0200
+#define NE_FFLAGS_GUI 0x0300
+#define NE_FFLAGS_SELFLOAD 0x0800
+#define NE_FFLAGS_LINKERROR 0x2000
+#define NE_FFLAGS_CALLWEP 0x4000
+#define NE_FFLAGS_LIBMODULE 0x8000
+
+#define NE_OSFLAGS_WINDOWS 0x02
+
+#define NE_RSCTYPE_FONTDIR 0x8007
+#define NE_RSCTYPE_FONT 0x8008
+#define NE_RSCTYPE_SCALABLE_FONTPATH 0x80cc
+
+#define NE_SEGFLAGS_DATA 0x0001
+#define NE_SEGFLAGS_ALLOCATED 0x0002
+#define NE_SEGFLAGS_LOADED 0x0004
+#define NE_SEGFLAGS_ITERATED 0x0008
+#define NE_SEGFLAGS_MOVEABLE 0x0010
+#define NE_SEGFLAGS_SHAREABLE 0x0020
+#define NE_SEGFLAGS_PRELOAD 0x0040
+#define NE_SEGFLAGS_EXECUTEONLY 0x0080
+#define NE_SEGFLAGS_READONLY 0x0080
+#define NE_SEGFLAGS_RELOC_DATA 0x0100
+#define NE_SEGFLAGS_SELFLOAD 0x0800
+#define NE_SEGFLAGS_DISCARDABLE 0x1000
+#define NE_SEGFLAGS_32BIT 0x2000
+
+typedef struct tagFontHeader
+{
+ SHORT dfVersion; /* Version */
+ LONG dfSize; /* Total File Size */
+ char dfCopyright[60]; /* Copyright notice */
+ FONTINFO16 fi; /* FONTINFO structure */
+} fnt_hdrS;
+
+typedef struct WinCharStruct
+{
+ unsigned int charWidth;
+ long charOffset;
+} WinCharS;
+
+typedef struct fntFontStruct
+{
+ fnt_hdrS hdr;
+ WinCharS *dfCharTable;
+ unsigned char *dfDeviceP;
+ unsigned char *dfFaceP;
+ unsigned char *dfBitsPointerP;
+ unsigned char *dfBitsOffsetP;
+ short *dfColorTableP;
+} fnt_fontS;
+
+#include "poppack.h"
#define FILE_ERROR 0
#define FILE_DLL 1
diff --git a/tools/fnt2bdf.h b/tools/fnt2bdf.h
deleted file mode 100644
index 27eafe5..0000000
--- a/tools/fnt2bdf.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 1994-1996 Kevin Carothers and Alex Korobka
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include "wine/wingdi16.h"
-
-#include "pshpack1.h"
-
-enum data_types {dfChar, dfShort, dfLong, dfString};
-
-#define ERROR_DATA 1
-#define ERROR_VERSION 2
-#define ERROR_SIZE 3
-#define ERROR_MEMORY 4
-#define ERROR_FILE 5
-
-typedef struct tagFontHeader
-{
- SHORT dfVersion; /* Version */
- LONG dfSize; /* Total File Size */
- char dfCopyright[60]; /* Copyright notice */
- FONTINFO16 fi; /* FONTINFO structure */
-} fnt_hdrS;
-
-typedef struct WinCharStruct
-{
- unsigned int charWidth;
- long charOffset;
-} WinCharS;
-
-typedef struct fntFontStruct
-{
- fnt_hdrS hdr;
- WinCharS *dfCharTable;
- unsigned char *dfDeviceP;
- unsigned char *dfFaceP;
- unsigned char *dfBitsPointerP;
- unsigned char *dfBitsOffsetP;
- short *dfColorTableP;
-} fnt_fontS;
-
-#include "poppack.h"
diff --git a/tools/fnt2fon.c b/tools/fnt2fon.c
index aa7d72b..a292e50 100644
--- a/tools/fnt2fon.c
+++ b/tools/fnt2fon.c
@@ -34,10 +34,94 @@
# include <io.h>
#endif
-#include "wine/winbase16.h"
-#include "wine/wingdi16.h"
-
+#include "windef.h"
#include "pshpack1.h"
+
+typedef struct
+{
+ INT16 dfType;
+ INT16 dfPoints;
+ INT16 dfVertRes;
+ INT16 dfHorizRes;
+ INT16 dfAscent;
+ INT16 dfInternalLeading;
+ INT16 dfExternalLeading;
+ BYTE dfItalic;
+ BYTE dfUnderline;
+ BYTE dfStrikeOut;
+ INT16 dfWeight;
+ BYTE dfCharSet;
+ INT16 dfPixWidth;
+ INT16 dfPixHeight;
+ BYTE dfPitchAndFamily;
+ INT16 dfAvgWidth;
+ INT16 dfMaxWidth;
+ BYTE dfFirstChar;
+ BYTE dfLastChar;
+ BYTE dfDefaultChar;
+ BYTE dfBreakChar;
+ INT16 dfWidthBytes;
+ LONG dfDevice;
+ LONG dfFace;
+ LONG dfBitsPointer;
+ LONG dfBitsOffset;
+ BYTE dfReserved;
+ LONG dfFlags;
+ INT16 dfAspace;
+ INT16 dfBspace;
+ INT16 dfCspace;
+ LONG dfColorPointer;
+ LONG dfReserved1[4];
+} FONTINFO16;
+
+typedef struct
+{
+ WORD offset;
+ WORD length;
+ WORD flags;
+ WORD id;
+ WORD handle;
+ WORD usage;
+} NE_NAMEINFO;
+
+typedef struct
+{
+ WORD type_id;
+ WORD count;
+ DWORD resloader;
+} NE_TYPEINFO;
+
+#define NE_FFLAGS_SINGLEDATA 0x0001
+#define NE_FFLAGS_MULTIPLEDATA 0x0002
+#define NE_FFLAGS_WIN32 0x0010
+#define NE_FFLAGS_FRAMEBUF 0x0100
+#define NE_FFLAGS_CONSOLE 0x0200
+#define NE_FFLAGS_GUI 0x0300
+#define NE_FFLAGS_SELFLOAD 0x0800
+#define NE_FFLAGS_LINKERROR 0x2000
+#define NE_FFLAGS_CALLWEP 0x4000
+#define NE_FFLAGS_LIBMODULE 0x8000
+
+#define NE_OSFLAGS_WINDOWS 0x02
+
+#define NE_RSCTYPE_FONTDIR 0x8007
+#define NE_RSCTYPE_FONT 0x8008
+#define NE_RSCTYPE_SCALABLE_FONTPATH 0x80cc
+
+#define NE_SEGFLAGS_DATA 0x0001
+#define NE_SEGFLAGS_ALLOCATED 0x0002
+#define NE_SEGFLAGS_LOADED 0x0004
+#define NE_SEGFLAGS_ITERATED 0x0008
+#define NE_SEGFLAGS_MOVEABLE 0x0010
+#define NE_SEGFLAGS_SHAREABLE 0x0020
+#define NE_SEGFLAGS_PRELOAD 0x0040
+#define NE_SEGFLAGS_EXECUTEONLY 0x0080
+#define NE_SEGFLAGS_READONLY 0x0080
+#define NE_SEGFLAGS_RELOC_DATA 0x0100
+#define NE_SEGFLAGS_SELFLOAD 0x0800
+#define NE_SEGFLAGS_DISCARDABLE 0x1000
+#define NE_SEGFLAGS_32BIT 0x2000
+
struct _fnt_header
{
SHORT dfVersion;
diff --git a/tools/sfnt2fnt.c b/tools/sfnt2fnt.c
index de19d8f..3b6cafc 100644
--- a/tools/sfnt2fnt.c
+++ b/tools/sfnt2fnt.c
@@ -45,19 +45,103 @@
#endif
#include "wine/unicode.h"
-#include "wine/wingdi16.h"
#include "wingdi.h"
#include "pshpack1.h"
typedef struct
{
+ INT16 dfType;
+ INT16 dfPoints;
+ INT16 dfVertRes;
+ INT16 dfHorizRes;
+ INT16 dfAscent;
+ INT16 dfInternalLeading;
+ INT16 dfExternalLeading;
+ BYTE dfItalic;
+ BYTE dfUnderline;
+ BYTE dfStrikeOut;
+ INT16 dfWeight;
+ BYTE dfCharSet;
+ INT16 dfPixWidth;
+ INT16 dfPixHeight;
+ BYTE dfPitchAndFamily;
+ INT16 dfAvgWidth;
+ INT16 dfMaxWidth;
+ BYTE dfFirstChar;
+ BYTE dfLastChar;
+ BYTE dfDefaultChar;
+ BYTE dfBreakChar;
+ INT16 dfWidthBytes;
+ LONG dfDevice;
+ LONG dfFace;
+ LONG dfBitsPointer;
+ LONG dfBitsOffset;
+ BYTE dfReserved;
+ LONG dfFlags;
+ INT16 dfAspace;
+ INT16 dfBspace;
+ INT16 dfCspace;
+ LONG dfColorPointer;
+ LONG dfReserved1[4];
+} FONTINFO16;
+
+typedef struct
+{
WORD dfVersion;
DWORD dfSize;
char dfCopyright[60];
FONTINFO16 fi;
} FNT_HEADER;
+typedef struct
+{
+ WORD offset;
+ WORD length;
+ WORD flags;
+ WORD id;
+ WORD handle;
+ WORD usage;
+} NE_NAMEINFO;
+
+typedef struct
+{
+ WORD type_id;
+ WORD count;
+ DWORD resloader;
+} NE_TYPEINFO;
+
+#define NE_FFLAGS_SINGLEDATA 0x0001
+#define NE_FFLAGS_MULTIPLEDATA 0x0002
+#define NE_FFLAGS_WIN32 0x0010
+#define NE_FFLAGS_FRAMEBUF 0x0100
+#define NE_FFLAGS_CONSOLE 0x0200
+#define NE_FFLAGS_GUI 0x0300
+#define NE_FFLAGS_SELFLOAD 0x0800
+#define NE_FFLAGS_LINKERROR 0x2000
+#define NE_FFLAGS_CALLWEP 0x4000
+#define NE_FFLAGS_LIBMODULE 0x8000
+
+#define NE_OSFLAGS_WINDOWS 0x02
+
+#define NE_RSCTYPE_FONTDIR 0x8007
+#define NE_RSCTYPE_FONT 0x8008
+#define NE_RSCTYPE_SCALABLE_FONTPATH 0x80cc
+
+#define NE_SEGFLAGS_DATA 0x0001
+#define NE_SEGFLAGS_ALLOCATED 0x0002
+#define NE_SEGFLAGS_LOADED 0x0004
+#define NE_SEGFLAGS_ITERATED 0x0008
+#define NE_SEGFLAGS_MOVEABLE 0x0010
+#define NE_SEGFLAGS_SHAREABLE 0x0020
+#define NE_SEGFLAGS_PRELOAD 0x0040
+#define NE_SEGFLAGS_EXECUTEONLY 0x0080
+#define NE_SEGFLAGS_READONLY 0x0080
+#define NE_SEGFLAGS_RELOC_DATA 0x0100
+#define NE_SEGFLAGS_SELFLOAD 0x0800
+#define NE_SEGFLAGS_DISCARDABLE 0x1000
+#define NE_SEGFLAGS_32BIT 0x2000
+
typedef struct {
WORD width;
DWORD offset;