From: David Webster Date: Thu, 18 Nov 1999 23:31:51 +0000 (+0000) Subject: Some minor modifications for VA 4.0 support X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2ce0a6e2d67c73ef32534345a422c2782f7dc091 Some minor modifications for VA 4.0 support git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/expr.h b/include/wx/expr.h index 4555550dce..0b25cddace 100644 --- a/include/wx/expr.h +++ b/include/wx/expr.h @@ -79,8 +79,11 @@ #define yy_scan_bytes PROIO_scan_bytes #define yy_flex_debug PROIO_flex_debug #define yy_flush_buffer PROIO_flush_buffer +#if !defined(__VISAGECPP__) +// multiply defined??? #define yyleng PROIO_yyleng #define yytext PROIO_yytext +#endif #ifdef __cplusplus extern "C" { diff --git a/include/wx/os2/setup.h b/include/wx/os2/setup.h index 802b4b91da..4cadb335d5 100644 --- a/include/wx/os2/setup.h +++ b/include/wx/os2/setup.h @@ -19,29 +19,25 @@ // define this to 0 when building wxBase library #define wxUSE_GUI 1 -#define WXWIN_COMPATIBILITY 0 - // Compatibility with 1.68 API. - // Level 0: no backward compatibility, all new features - // Level 1: Some compatibility. In fact - // the compatibility code is now very minimal so there - // is little advantage to setting it to 1. - // ---------------------------------------------------------------------------- // General features // ---------------------------------------------------------------------------- -#define wxUSE_NET_API 0 // Utilize OS/2's UPM netapi's +#define wxUSE_PCX 1 // Utilize PCX images + +#define wxUSE_PNM 1 // Utilize PNM images + +#define wxUSE_GIF 1 // Utilize GIF images + +#if defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ) +#define wxUSE_LONG_LONG 1 +#endif + +#define wxUSE_NET_API 1 // Utilize OS/2's UPM netapi's #define wxUSE_CONFIG 1 // Use wxConfig, with CreateConfig in wxApp -#define WXWIN_COMPATIBILITY 0 - // Compatibility with 1.68 API. - // Level 0: no backward compatibility, all new features - // Level 1: Some compatibility. In fact - // the compatibility code is now very minimal so there - // is little advantage to setting it to 1. - #define wxUSE_POSTSCRIPT 1 // 0 for no PostScript device context #define wxUSE_AFM_FOR_POSTSCRIPT 1 @@ -70,8 +66,6 @@ #define wxUSE_DRAG_AND_DROP 1 // 0 for no drag and drop -#define wxUSE_TOOLBAR 1 - // Define 1 to use toolbar classes #define wxUSE_BUTTONBAR 1 // Define 1 to use buttonbar classes (enhanced toolbar // for MS Windows) @@ -107,9 +101,6 @@ #define wxUSE_CHECKLISTBOX 1 // Define 1 to compile check listbox -#define wxUSE_CHOICE 1 - // Define 1 to compile choice - #define wxUSE_CARET 1 // Define 1 to use wxCaret class #define wxUSE_XPM_IN_OS2 1 @@ -173,7 +164,7 @@ // Some databases/ODBC drivers only allow forward scrolling cursors. // Unless you specifically want to use backward scrolling // cursors, and you know that all of the databases/ODBC drivers - // that you will use these odbc classes with allow backward + // that you will use these odbc classes with allow backward // scrolling cursors, this setting should remain set to 1 // for maximum database/driver compatibilty @@ -286,8 +277,6 @@ // complains about deallocating // arrays of wxPoints if wxPoint is a class. -#define wxUSE_DRAG_AND_DROP 1 - #define wxUSE_PORTABLE_FONTS_IN_OS2 0 // Define 1 to use new portable font scheme in Windows // (used by default under X) diff --git a/include/wx/os2/setup0.h b/include/wx/os2/setup0.h index 802b4b91da..f7afa63a33 100644 --- a/include/wx/os2/setup0.h +++ b/include/wx/os2/setup0.h @@ -19,29 +19,25 @@ // define this to 0 when building wxBase library #define wxUSE_GUI 1 -#define WXWIN_COMPATIBILITY 0 - // Compatibility with 1.68 API. - // Level 0: no backward compatibility, all new features - // Level 1: Some compatibility. In fact - // the compatibility code is now very minimal so there - // is little advantage to setting it to 1. - // ---------------------------------------------------------------------------- // General features // ---------------------------------------------------------------------------- -#define wxUSE_NET_API 0 // Utilize OS/2's UPM netapi's +#define wxUSE_PCX 1 // Utilize PCX images + +#define wxUSE_PNM 1 // Utilize PNM images + +#define wxUSE_GIF 1 // Utilize GIF images + +#if defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ) +#define wxUSE_LONG_LONG 1 +#endif + +#define wxUSE_NET_API 1 // Utilize OS/2's UPM netapi's #define wxUSE_CONFIG 1 // Use wxConfig, with CreateConfig in wxApp -#define WXWIN_COMPATIBILITY 0 - // Compatibility with 1.68 API. - // Level 0: no backward compatibility, all new features - // Level 1: Some compatibility. In fact - // the compatibility code is now very minimal so there - // is little advantage to setting it to 1. - #define wxUSE_POSTSCRIPT 1 // 0 for no PostScript device context #define wxUSE_AFM_FOR_POSTSCRIPT 1 @@ -70,8 +66,6 @@ #define wxUSE_DRAG_AND_DROP 1 // 0 for no drag and drop -#define wxUSE_TOOLBAR 1 - // Define 1 to use toolbar classes #define wxUSE_BUTTONBAR 1 // Define 1 to use buttonbar classes (enhanced toolbar // for MS Windows) @@ -106,10 +100,6 @@ #define wxUSE_CHECKLISTBOX 1 // Define 1 to compile check listbox - -#define wxUSE_CHOICE 1 - // Define 1 to compile choice - #define wxUSE_CARET 1 // Define 1 to use wxCaret class #define wxUSE_XPM_IN_OS2 1 @@ -286,8 +276,6 @@ // complains about deallocating // arrays of wxPoints if wxPoint is a class. -#define wxUSE_DRAG_AND_DROP 1 - #define wxUSE_PORTABLE_FONTS_IN_OS2 0 // Define 1 to use new portable font scheme in Windows // (used by default under X) diff --git a/src/common/doslex.c b/src/common/doslex.c index 3dbdde99ed..bbf61f0eac 100644 --- a/src/common/doslex.c +++ b/src/common/doslex.c @@ -252,7 +252,9 @@ static int my_unput(char); if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \ YY_FATAL_ERROR( "read() in flex scanner failed" ); #else -# undef unput +# ifndef unput +# undef unput +# endif # define unput(_c) my_unput(_c) #endif diff --git a/src/common/gifdecod.cpp b/src/common/gifdecod.cpp index e8fcdc7514..1ca8c471ce 100644 --- a/src/common/gifdecod.cpp +++ b/src/common/gifdecod.cpp @@ -3,7 +3,7 @@ // Purpose: wxGIFDecoder, GIF reader for wxImage and wxAnimation // Author: Guillermo Rodriguez Garcia // Version: 3.03 -// RCS-ID: +// RCS-ID: // Copyright: (c) Guillermo Rodriguez Garcia // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -28,7 +28,7 @@ #include #include #include "wx/gifdecod.h" - + //--------------------------------------------------------------------------- // wxGIFDecoder constructor and destructor @@ -131,7 +131,7 @@ bool wxGIFDecoder::ConvertToImage(wxImage *image) const return TRUE; } - + //--------------------------------------------------------------------------- // Data accessors //--------------------------------------------------------------------------- @@ -202,7 +202,7 @@ bool wxGIFDecoder::GoNextFrame(bool cyclic) } else return FALSE; -} +} bool wxGIFDecoder::GoPrevFrame(bool cyclic) { @@ -293,7 +293,7 @@ int wxGIFDecoder::getcode(int bits, int ab_fin) /* adjust total number of bits extracted from the buffer */ m_restbits = m_restbits + 8; } - + /* find number of bits remaining for next code */ m_restbits = (m_restbits - bits); @@ -509,7 +509,13 @@ int wxGIFDecoder::ReadGIF() pprev = NULL; pimg = NULL; +#if defined(__VISAGECPP__) +// VA just can't stand while(1) + bool bOs2var = TRUE; + while(bOs2var) +#else while (1) +#endif { type = (unsigned char)m_f->GetC(); @@ -537,7 +543,7 @@ int wxGIFDecoder::ReadGIF() } else /* other extension, skip */ - { + { while ((i = (unsigned char)m_f->GetC()) != 0) { /* This line should not be neccessary! diff --git a/src/common/http.cpp b/src/common/http.cpp index 9f7e3adabc..bd5f2cad8f 100644 --- a/src/common/http.cpp +++ b/src/common/http.cpp @@ -96,7 +96,7 @@ wxString wxHTTP::GetHeader(const wxString& header) wxString upper_header; upper_header = header.Upper(); - + node = m_headers.Find(upper_header); if (!node) return wxEmptyString; @@ -130,7 +130,13 @@ bool wxHTTP::ParseHeaders() m_headers.Clear(); m_read = TRUE; - while (1) { +#if defined(__VISAGECPP__) +// VA just can't stand while(1) + bool bOs2var = TRUE; + while(bOs2var) { +#else + while (1) { +#endif m_perr = GetLine(this, line); if (m_perr != wxPROTO_NOERR) return FALSE; @@ -197,7 +203,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req) // If there is no User-Agent defined, define it. if (GetHeader(wxT("User-Agent")).IsNull()) - SetHeader(wxT("User-Agent"), wxT("wxWindows 2.x")); + SetHeader(wxT("User-Agent"), wxT("wxWindows 2.x")); switch (req) { case wxHTTP_GET: diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 42e9ff74d4..295cd6783a 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -310,7 +310,7 @@ bool wxMsgCatalog::Load(const wxChar *szDirPrefix, const wxChar *szName0) wxString szName = szName0; if(szName.Find('.') != -1) // contains a dot szName = szName.Left(szName.Find('.')); - + // FIXME VZ: I forgot the exact meaning of LC_PATH - anyone to remind me? // KB: search path where to find the mo files, probably : delimited #if 0 @@ -418,7 +418,13 @@ const char *wxMsgCatalog::GetString(const char *szOrig) const size_t32 nIncr = 1 + (nHashVal % (m_nHashSize - 2)); - while ( TRUE ) { +#if defined(__VISAGECPP__) +// VA just can't stand while(1) or while(TRUE) + bool bOs2var = TRUE; + while(bOs2var) { +#else + while (1) { +#endif size_t32 nStr = Swap(m_pHashTable[nIndex]); if ( nStr == 0 ) return NULL; diff --git a/src/os2/makefile.va b/src/os2/makefile.va index aee9ec8309..d599b860fb 100644 --- a/src/os2/makefile.va +++ b/src/os2/makefile.va @@ -226,7 +226,6 @@ COMMONOBJS = \ ..\common\$D\mstream.obj \ ..\common\$D\object.obj \ ..\common\$D\objstrm.obj \ - ..\common\$D\odbc.obj \ ..\common\$D\paper.obj \ ..\common\$D\prntbase.obj \ ..\common\$D\process.obj \ @@ -326,7 +325,6 @@ COMLIBOBJS2 = \ mstream.obj \ object.obj \ objstrm.obj \ - odbc.obj \ paper.obj \ prntbase.obj \ process.obj \ @@ -354,10 +352,10 @@ COMLIBOBJS2 = \ url.obj \ utilscmn.obj \ valgen.obj \ - validate.obj + validate.obj \ + valtext.obj COMLIBOBJS3 = \ - valtext.obj \ variant.obj \ wfstream.obj \ wincmn.obj \ @@ -630,7 +628,6 @@ $(COMLIBOBJS2): copy ..\common\$D\mstream.obj copy ..\common\$D\object.obj copy ..\common\$D\objstrm.obj - copy ..\common\$D\odbc.obj copy ..\common\$D\paper.obj copy ..\common\$D\prntbase.obj copy ..\common\$D\process.obj @@ -659,9 +656,9 @@ $(COMLIBOBJS2): copy ..\common\$D\utilscmn.obj copy ..\common\$D\valgen.obj copy ..\common\$D\validate.obj + copy ..\common\$D\valtext.obj $(COMLIBOBJS3): - copy ..\common\$D\valtext.obj copy ..\common\$D\variant.obj copy ..\common\$D\wfstream.obj copy ..\common\$D\wincmn.obj