Misc. fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-05-09 14:49:40 +00:00
parent ea64e17a22
commit 0f3e3e0c30
9 changed files with 94 additions and 26 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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
-------------------------------

View File

@@ -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; }
};

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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