Fix portability issues in dwimg.c
Alex Cherepanov <[email protected]>
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Organization | Coscript Software |
| Message-ID | <[email protected]> |
Fix portability issues: add a portable header for sscanf() and use specific handle HDROP instead of generic HANDLE.
dwimg.c.diff
(text/plain, 1.4 KB)
Index: gs/src/dwimg.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/dwimg.c,v
retrieving revision 1.8
diff -b -u -r1.8 dwimg.c
--- gs/src/dwimg.c 2 Jan 2003 18:11:01 -0000 1.8
+++ gs/src/dwimg.c 12 Aug 2003 22:47:30 -0000
@@ -37,6 +37,7 @@
#define STRICT
#include <windows.h>
+#include "stdio_.h"
#include "iapi.h"
#include "dwmain.h"
@@ -1217,7 +1218,7 @@
const char *p;
const char *szDragPre = "\r(";
const char *szDragPost = ") run\r";
- HANDLE hdrop = (HANDLE)wParam;
+ HDROP hdrop = (HDROP)wParam;
cFiles = DragQueryFile(hdrop, (UINT)(-1), (LPSTR)NULL, 0);
for (i=0; i<cFiles; i++) {
DragQueryFile(hdrop, i, szFile, 80);
Index: gs/src/winint.mak
===================================================================
RCS file: /cvs/ghostscript/gs/src/winint.mak,v
retrieving revision 1.18
diff -b -u -r1.18 winint.mak
--- gs/src/winint.mak 12 Apr 2003 13:28:31 -0000 1.18
+++ gs/src/winint.mak 12 Aug 2003 22:47:30 -0000
@@ -160,7 +160,7 @@
$(PSCCWIN) $(COMPILE_FOR_EXE) $(PSO_)dwdll.obj $(C_) $(PSSRC)dwdll.c
$(GLOBJ)dwimg.obj: $(GLSRC)dwimg.c $(AK)\
- $(dwmain_h) $(dwdll_h) $(dwtext_h) $(dwimg_h) $(gdevdsp_h)\
+ $(dwmain_h) $(dwdll_h) $(dwtext_h) $(dwimg_h) $(gdevdsp_h) $(stdio__h) \
$(gscdefs_h) $(iapi_h) $(dwreg_h)
$(GLCPP) $(COMPILE_FOR_EXE) $(GLO_)dwimg.obj $(C_) $(GLSRC)dwimg.c