From 9bdf34b338659c62dba600cae89796d98bbf9b08 Mon Sep 17 00:00:00 2001
From: Bertho Stultiens <bertho@panter.soci.aau.dk>
Date: Sat, 13 Mar 1999 17:07:56 +0000
Subject: [PATCH] Moved error codes to cderr.h.

---
 dlls/commdlg/colordlg.c |  1 +
 dlls/commdlg/filedlg.c  |  1 +
 dlls/commdlg/fontdlg.c  |  1 +
 dlls/commdlg/printdlg.c |  1 +
 include/cderr.h         | 53 +++++++++++++++++++++++++++++++++++++++++
 include/commdlg.h       | 30 -----------------------
 6 files changed, 57 insertions(+), 30 deletions(-)
 create mode 100644 include/cderr.h

diff --git a/dlls/commdlg/colordlg.c b/dlls/commdlg/colordlg.c
index c2de9cb2ad1..565e4e7621a 100644
--- a/dlls/commdlg/colordlg.c
+++ b/dlls/commdlg/colordlg.c
@@ -24,6 +24,7 @@
 #include "debug.h"
 #include "font.h"
 #include "winproc.h"
+#include "cderr.h"
 
 extern DWORD      CommDlgLastError;
 
diff --git a/dlls/commdlg/filedlg.c b/dlls/commdlg/filedlg.c
index d17bce40a6b..255deae4b6a 100644
--- a/dlls/commdlg/filedlg.c
+++ b/dlls/commdlg/filedlg.c
@@ -24,6 +24,7 @@
 #include "debug.h"
 #include "font.h"
 #include "winproc.h"
+#include "cderr.h"
 
 extern DWORD      CommDlgLastError;
 
diff --git a/dlls/commdlg/fontdlg.c b/dlls/commdlg/fontdlg.c
index 270b8bd7f23..c4a56df9398 100644
--- a/dlls/commdlg/fontdlg.c
+++ b/dlls/commdlg/fontdlg.c
@@ -24,6 +24,7 @@
 #include "debug.h"
 #include "font.h"
 #include "winproc.h"
+#include "cderr.h"
 
 extern DWORD      CommDlgLastError;
 
diff --git a/dlls/commdlg/printdlg.c b/dlls/commdlg/printdlg.c
index ca86015de05..3096009b227 100644
--- a/dlls/commdlg/printdlg.c
+++ b/dlls/commdlg/printdlg.c
@@ -24,6 +24,7 @@
 #include "debug.h"
 #include "font.h"
 #include "winproc.h"
+#include "cderr.h"
 
 DWORD CommDlgLastError = 0;
 
diff --git a/include/cderr.h b/include/cderr.h
new file mode 100644
index 00000000000..b74706a08d1
--- /dev/null
+++ b/include/cderr.h
@@ -0,0 +1,53 @@
+#ifndef __WINE_CDERR_H
+#define __WINE_CDERR_H
+
+/* General error codes */
+#define CDERR_DIALOGFAILURE	0xFFFF
+#define CDERR_GENERALCODES	0x0000
+#define CDERR_STRUCTSIZE	0x0001
+#define CDERR_INITIALIZATION	0x0002
+#define CDERR_NOTEMPLATE	0x0003
+#define CDERR_NOHINSTANCE	0x0004
+#define CDERR_LOADSTRFAILURE	0x0005
+#define CDERR_FINDRESFAILURE	0x0006
+#define CDERR_LOADRESFAILURE	0x0007
+#define CDERR_LOCKRESFAILURE	0x0008
+#define CDERR_MEMALLOCFAILURE	0x0009
+#define CDERR_MEMLOCKFAILURE	0x000A
+#define CDERR_NOHOOK		0x000B
+#define CDERR_REGISTERMSGFAIL	0x000C
+
+/* Printer dialog error codes */
+#define PDERR_PRINTERCODES	0x1000
+#define PDERR_SETUPFAILURE	0x1001
+#define PDERR_PARSEFAILURE	0x1002
+#define PDERR_RETDEFFAILURE	0x1003
+#define PDERR_LOADDRVFAILURE	0x1004
+#define PDERR_GETDEVMODEFAIL	0x1005
+#define PDERR_INITFAILURE	0x1006
+#define PDERR_NODEVICES		0x1007
+#define PDERR_NODEFAULTPRN	0x1008
+#define PDERR_DNDMMISMATCH	0x1009
+#define PDERR_CREATEICFAILURE	0x100A
+#define PDERR_PRINTERNOTFOUND	0x100B
+#define PDERR_DEFAULTDIFFERENT	0x100C
+
+/* Chose font error codes */
+#define CFERR_CHOOSEFONTCODES	0x2000
+#define CFERR_NOFONTS		0x2001
+#define CFERR_MAXLESSTHANMIN	0x2002
+
+/* File{Open,Save} error codes */
+#define FNERR_FILENAMECODES	0x3000
+#define FNERR_SUBCLASSFAILURE	0x3001
+#define FNERR_INVALIDFILENAME	0x3002
+#define FNERR_BUFFERTOOSMALL	0x3003
+
+/* Find/Replace error codes */
+#define FRERR_FINDREPLACECODES	0x4000
+#define FRERR_BUFFERLENGTHZERO	0x4001
+
+/* Choose color error codes */
+#define CCERR_CHOOSECOLORCODES	0x5000
+
+#endif
diff --git a/include/commdlg.h b/include/commdlg.h
index fc2846f20cf..6a89c7162d8 100644
--- a/include/commdlg.h
+++ b/include/commdlg.h
@@ -520,36 +520,6 @@ typedef DEVNAMES * LPDEVNAMES;
 
 #define DN_DEFAULTPRN      0x0001
 
-
-#define CDERR_DIALOGFAILURE   0xFFFF
-#define CDERR_GENERALCODES     0x0000
-#define CDERR_STRUCTSIZE       0x0001
-#define CDERR_INITIALIZATION   0x0002
-#define CDERR_NOTEMPLATE       0x0003
-#define CDERR_NOHINSTANCE      0x0004
-#define CDERR_LOADSTRFAILURE   0x0005
-#define CDERR_FINDRESFAILURE   0x0006
-#define CDERR_LOADRESFAILURE   0x0007
-#define CDERR_LOCKRESFAILURE   0x0008
-#define CDERR_MEMALLOCFAILURE  0x0009
-#define CDERR_MEMLOCKFAILURE   0x000A
-#define CDERR_NOHOOK           0x000B
-#define CDERR_REGISTERMSGFAIL  0x000C
-
-#define PDERR_PRINTERCODES     0x1000
-#define PDERR_SETUPFAILURE     0x1001
-#define PDERR_PARSEFAILURE     0x1002
-#define PDERR_RETDEFFAILURE    0x1003
-#define PDERR_LOADDRVFAILURE   0x1004
-#define PDERR_GETDEVMODEFAIL   0x1005
-#define PDERR_INITFAILURE      0x1006
-#define PDERR_NODEVICES        0x1007
-#define PDERR_NODEFAULTPRN     0x1008
-#define PDERR_DNDMMISMATCH     0x1009
-#define PDERR_CREATEICFAILURE  0x100A
-#define PDERR_PRINTERNOTFOUND  0x100B
-#define PDERR_DEFAULTDIFFERENT 0x100C
-
 /* PageSetupDlg stuff ... */
 #define WM_PSD_PAGESETUPDLG	(WM_USER  )
 #define WM_PSD_FULLPAGERECT	(WM_USER+1)
-- 
GitLab