From 0f3e3e0c300988a7520b39b90d28517b84882190 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 9 May 1999 14:49:40 +0000 Subject: [PATCH] Misc. fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/generic.rsp | 12 ++++++++++++ distrib/msw/makefile.rsp | 2 ++ docs/changes.txt | 12 ++++++++++-- include/wx/string.h | 22 ++++------------------ include/wx/wxchar.h | 9 +++++++++ src/common/string.cpp | 28 ++++++++++++++++++++++++++++ src/makeprog.b32 | 2 +- src/msw/makefile.b32 | 19 ++++++++++++++++--- src/msw/makefile.vc | 14 ++++++++++++-- 9 files changed, 94 insertions(+), 26 deletions(-) diff --git a/distrib/msw/generic.rsp b/distrib/msw/generic.rsp index 7dacd802e9..bf429ec799 100644 --- a/distrib/msw/generic.rsp +++ b/distrib/msw/generic.rsp @@ -689,3 +689,15 @@ samples/dde/*.png samples/dde/*.ico samples/dde/*.txt +samples/scroll/*.cpp +samples/scroll/*.h +samples/scroll/makefile* +samples/scroll/*.rc +samples/scroll/*.def +samples/scroll/*.bmp +samples/scroll/*.xpm +samples/scroll/*.xbm +samples/scroll/*.png +samples/scroll/*.ico +samples/scroll/*.txt + diff --git a/distrib/msw/makefile.rsp b/distrib/msw/makefile.rsp index 68bb8fefe9..16cb39b624 100644 --- a/distrib/msw/makefile.rsp +++ b/distrib/msw/makefile.rsp @@ -74,6 +74,8 @@ samples/wxpoem/Makefile.in samples/wxpoem/Makefile samples/wxsocket/Makefile.in samples/wxsocket/Makefile +samples/scroll/Makefile.in +samples/scroll/Makefile src/Makefile.in src/Makefile utils/ogl/samples/ogledit/Makefile.in diff --git a/docs/changes.txt b/docs/changes.txt index 807a411a06..5453692236 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -1,22 +1,30 @@ wxWindows 2 Change Log ---------------------- -2.0.2, March ?? 1999 ---------------------- +2.1.0, b4, May 9th 1999 +----------------------- wxGTK: +- JPEG support added. +- Many fixes and changes not thought worth mentioning in this file :-) wxMSW: - wxNotebook changes: can add image only; wxNB_FIXEDWIDTH added; SetTabSize added. +- JPEG support added. +- Fixes for Cygwin compilation. +- Added wxGA_SMOOTH and wxFRAME_FLOAT_ON_PARENT styles. +- Many fixes people didn't tell this file about. wxMotif: General: +- Some changes for Unicode support, including wxchar.h/cpp. + 2.0.1 (release), March 1st 1999 ------------------------------- diff --git a/include/wx/string.h b/include/wx/string.h index 442cd0fee0..3e8567d18f 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -176,24 +176,9 @@ class WXDLLEXPORT wxMBConv public: virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) const; virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n) const; - const wxWCharBuffer cMB2WC(const char *psz) const - { - if (psz) { - size_t nLen = MB2WC((wchar_t *) NULL, psz, 0); - wxWCharBuffer buf(nLen); - MB2WC(WCSTRINGCAST buf, psz, nLen); - return buf; - } else return wxWCharBuffer((wchar_t *) NULL); - } - const wxCharBuffer cWC2MB(const wchar_t *psz) const - { - if (psz) { - size_t nLen = WC2MB((char *) NULL, psz, 0); - wxCharBuffer buf(nLen); - WC2MB(MBSTRINGCAST buf, psz, nLen); - return buf; - } else return wxCharBuffer((char *) NULL); - } + // No longer inline since BC++ complains. + const wxWCharBuffer cMB2WC(const char *psz) const; + const wxCharBuffer cWC2MB(const wchar_t *psz) const; #if wxUSE_UNICODE const wxWCharBuffer cMB2WX(const char *psz) const { return cMB2WC(psz); } const wxCharBuffer cWX2MB(const wchar_t *psz) const { return cWC2MB(psz); } @@ -264,6 +249,7 @@ WXDLLEXPORT_DATA(extern wxMBConv *) wxConvCurrent; #endif #else//!wxUSE_WCHAR_T class WXDLLEXPORT wxMBConv { +public: const char* cMB2WX(const char *psz) const { return psz; } const char* cWX2MB(const char *psz) const { return psz; } }; diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 48aeb4dc2f..96db64a224 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -449,7 +449,16 @@ size_t WXDLLEXPORT wxWC2MB(char *buf, const wchar_t *psz, size_t n); #define wxWC2WX wxWC2MB #define wxWX2WC wxMB2WC #endif +#else +// No wxUSE_WCHAR_T: we have to do something (JACS) +#define wxMB2WC wxStrncpy +#define wxWC2MB wxStrncpy +#define wxMB2WX wxStrncpy +#define wxWX2MB wxStrncpy +#define wxWC2WX wxWC2MB +#define wxWX2WC wxMB2WC #endif + bool WXDLLEXPORT wxOKlibc(); // for internal use // if libc versions are not available, use replacements defined in wxchar.cpp diff --git a/src/common/string.cpp b/src/common/string.cpp index 7ebd317729..f7ce5fafae 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -274,6 +274,7 @@ wxString::wxString(const char *psz, wxMBConv& conv, size_t nLength) #else +#if wxUSE_WCHAR_T // from wide string wxString::wxString(const wchar_t *pwz) { @@ -289,6 +290,7 @@ wxString::wxString(const wchar_t *pwz) Init(); } } +#endif #endif @@ -495,12 +497,14 @@ wxString& wxString::operator=(const unsigned char* psz) return *this; } +#if wxUSE_WCHAR_T wxString& wxString::operator=(const wchar_t *pwz) { wxString str(pwz); *this = str; return *this; } +#endif #endif @@ -2190,3 +2194,27 @@ size_t wxCSConv::WC2MB(char *buf, const wchar_t *psz, size_t n) const } #endif//wxUSE_WCHAR_T + +#if wxUSE_WCHAR_T +const wxWCharBuffer wxMBConv::cMB2WC(const char *psz) const + { + if (psz) { + size_t nLen = MB2WC((wchar_t *) NULL, psz, 0); + wxWCharBuffer buf(nLen); + MB2WC(WCSTRINGCAST buf, psz, nLen); + return buf; + } else return wxWCharBuffer((wchar_t *) NULL); + } + +const wxCharBuffer wxMBConv::cWC2MB(const wchar_t *psz) const + { + if (psz) { + size_t nLen = WC2MB((char *) NULL, psz, 0); + wxCharBuffer buf(nLen); + WC2MB(MBSTRINGCAST buf, psz, nLen); + return buf; + } else return wxCharBuffer((char *) NULL); + } + +#endif//wxUSE_WCHAR_T + diff --git a/src/makeprog.b32 b/src/makeprog.b32 index 77acee38f6..5f879ff864 100644 --- a/src/makeprog.b32 +++ b/src/makeprog.b32 @@ -13,7 +13,7 @@ WXDIR = $(WXWIN) !include $(WXDIR)\src\makeb32.env -LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 winpng zlib +LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 winpng zlib jpeg !if "$(FINAL)" == "0" LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib $(EXTRALINKFLAGS) diff --git a/src/msw/makefile.b32 b/src/msw/makefile.b32 index 45f59decce..8b3eb69fe5 100644 --- a/src/msw/makefile.b32 +++ b/src/msw/makefile.b32 @@ -50,9 +50,9 @@ PERIPH_TARGET=xpm $(PERIPH_TARGET) PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET) !endif -PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(PERIPH_LIBS) -PERIPH_TARGET=zlib png $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_zlib clean_png $(PERIPH_CLEAN_TARGET) +PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(PERIPH_LIBS) +PERIPH_TARGET=zlib png jpeg $(PERIPH_TARGET) +PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg $(PERIPH_CLEAN_TARGET) !if "$(DLL)" == "0" DUMMY=dummy @@ -112,6 +112,7 @@ COMMONOBJS = \ $(MSWDIR)\image.obj \ $(MSWDIR)\imagpng.obj \ $(MSWDIR)\imagjpeg.obj \ + $(MSWDIR)\imaggif.obj \ $(MSWDIR)\intl.obj \ $(MSWDIR)\ipcbase.obj \ $(MSWDIR)\log.obj \ @@ -512,6 +513,8 @@ $(MSWDIR)\imagpng.obj: $(COMMDIR)\imagpng.$(SRCSUFF) $(MSWDIR)\imagjpeg.obj: $(COMMDIR)\imagjpeg.$(SRCSUFF) +$(MSWDIR)\imaggif.obj: $(COMMDIR)\imaggif.$(SRCSUFF) + $(MSWDIR)\image.obj: $(COMMDIR)\image.$(SRCSUFF) $(MSWDIR)\intl.obj: $(COMMDIR)\intl.$(SRCSUFF) @@ -699,6 +702,16 @@ clean_zlib: make -f makefile.b32 clean cd $(WXDIR)\src\msw +jpeg: $(CFG) + cd $(WXDIR)\src\jpeg + make -f makefile.b32 + cd $(WXDIR)\src\msw + +clean_jpeg: + cd $(WXDIR)\src\jpeg + make -f makefile.b32 clean + cd $(WXDIR)\src\msw + $(CFG): makefile.b32 copy &&! -H=$(WXDIR)\src\msw\wx32.csm diff --git a/src/msw/makefile.vc b/src/msw/makefile.vc index fe713b0eaa..908bb54ae8 100644 --- a/src/msw/makefile.vc +++ b/src/msw/makefile.vc @@ -263,7 +263,7 @@ MSWOBJS = \ OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) # Normal, static library -all: dirs $(DUMMYOBJ) $(OBJECTS) $(PERIPH_TARGET) png zlib xpm $(LIBTARGET) +all: dirs $(DUMMYOBJ) $(OBJECTS) $(PERIPH_TARGET) png zlib xpm jpeg $(LIBTARGET) dirs: $(MSWDIR)\$D $(COMMDIR)\$D $(GENDIR)\$D $(OLEDIR)\$D @@ -412,6 +412,16 @@ clean_zlib: nmake -f makefile.vc clean cd $(WXDIR)\src\msw +jpeg: + cd $(WXDIR)\src\jpeg + nmake -f makefile.vc FINAL=$(FINAL) DLL=$(DLL) WXMAKINGDLL=$(WXMAKINGDLL) all + cd $(WXDIR)\src\msw + +clean_jpeg: + cd $(WXDIR)\src\jpeg + nmake -f makefile.vc clean + cd $(WXDIR)\src\msw + xpm: cd $(WXDIR)\src\xpm nmake -f makefile.vc FINAL=$(FINAL) DLL=$(DLL) WXMAKINGDLL=$(WXMAKINGDLL) @@ -427,7 +437,7 @@ rcparser: nmake -f makefile.vc FINAL=$(FINAL) cd $(WXDIR)\src\msw -clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_xpm +clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm -erase $(LIBTARGET) -erase $(WXDIR)\lib\$(WXLIBNAME).pdb -erase ..\..\lib\wx200.dll -- 2.45.2