diff --git a/distrib/msw/msw.rsp b/distrib/msw/msw.rsp
index db1209cb7b..38721864cd 100644
--- a/distrib/msw/msw.rsp
+++ b/distrib/msw/msw.rsp
@@ -16,7 +16,8 @@ src/makewat.env
src/makeprog.wat
src/makesc.env
src/makeg95.env
-src/makem95.env
+src/makesl.env
+src/makeprog.sl
src/ntwxwin.mak
src/makefile.bcc
src/makefile.dos
diff --git a/docs/html/faq.htm b/docs/html/faq.htm
new file mode 100644
index 0000000000..1dd0c056c3
--- /dev/null
+++ b/docs/html/faq.htm
@@ -0,0 +1,43 @@
+
+
+
+wxWindows 2 FAQ
+
+
+
+
+
+
+
+
+
+
+wxWindows 2 FAQ
+
+ |
+
+
+
+
+
+Welcome to the wxWindows FAQ. Please select a category:
+
+
+
+
+
+For further information, please see the wxWindows Web site,
+plus install.txt (per port), todo.txt (per port), and bugs.txt (all ports).
+
+
+
+
+
+
+
diff --git a/docs/html/faqgen.htm b/docs/html/faqgen.htm
new file mode 100644
index 0000000000..2e059f5675
--- /dev/null
+++ b/docs/html/faqgen.htm
@@ -0,0 +1,68 @@
+
+
+
+wxWindows 2 FAQ: General
+
+
+
+
+
+
+
+
+
+
+wxWindows 2 FAQ: General
+
+ |
+
+
+
+
+
+See also top-level FAQ page.
+
+
+
+
+wxWindows is a class library that allows you to compile graphical C++ programs on a range of
+different platforms. wxWindows defines a common API across platforms, but uses the native graphical user interface (GUI) on each platform,
+so your program will take on the native 'look and feel' that users are familiar with.
+
+Although GUI applications are mostly built programmatically, there is a dialog editor to help
+build attractive dialogs and panels.
+
+You don't have to use C++ to use wxWindows: wxWindows 1 has been interfaced to several interpreted languages,
+such as CLIPS, Python, Scheme, XLisp and Perl, and there is a Python interface for wxWindows 2.
+
+
+
Can I use wxWindows 2 for both proprietary (commercial) projects, and GPL'ed projects?
+
+Yes. Please see the licence for details, but basically
+you can distribute proprietary binaries without distributing any source code, and neither will wxWindows
+conflict with GPL code you may be using or developing with it.
+
+The conditions for using wxWindows 2 are the same whether you are a personal, academic
+or commercial developer.
+
+
+
Is there support?
+
+No official support, but the mailing list is very helpful and some people say that
+wxWindows support is better than for much commercial software. The developers are
+keen to fix bugs as soon as possible, though obviously there are no guarantees.
+
+
+
+
+Many organisations - commercial, government, and academic - across the
+world. It's impossible to estimate the true number of users, since
+wxWindows is obtained by many different means, and we cannot monitor
+distribution. The mailing list contains around 300-400 entries which is
+quite large for a list of this type.
+
+
+
+
+
+
diff --git a/docs/html/faqgtk.htm b/docs/html/faqgtk.htm
new file mode 100644
index 0000000000..1fe2c3586f
--- /dev/null
+++ b/docs/html/faqgtk.htm
@@ -0,0 +1,47 @@
+
+
+
+wxWindows 2 for GTK FAQ
+
+
+
+
+
+
+
+
+
+
+wxWindows 2 for GTK FAQ
+
+ |
+
+
+
+
+
+See also top-level FAQ page.
+
+
+What is wxWindows 2 for GTK?
+
+wxWindows 2 for GTK is a port of wxWindows to the GTK+ toolkit,
+which is freely available for most flavours of Unix with X. wxWindows 2 for GTK is
+often abbreviated to wxGTK. wxGTK has a separate home page here.
+
+
+
Does wxGTK have GNOME support?
+
+Currently wxGTK does not have any features that would involve dependence on any desktop
+environment's libraries, so it can work on GNOME, KDE and with other window managers
+without installation hassles. Some GNOME and KDE integration features are file based, and
+so may be added without dependence on libraries. Other features may be supported in the
+future, probably as a separate library.
+
+
+
+
+
+
+
+
diff --git a/docs/html/faqmac.htm b/docs/html/faqmac.htm
new file mode 100644
index 0000000000..c88ce2f418
--- /dev/null
+++ b/docs/html/faqmac.htm
@@ -0,0 +1,37 @@
+
+
+
+wxWindows 2 for Mac FAQ
+
+
+
+
+
+
+
+
+
+
+wxWindows 2 for Mac FAQ
+
+ |
+
+
+
+
+
+See also top-level FAQ page.
+
+
+When is wxMac 2 due to be released?
+
+There is a preview available.
+A beta release can be expected by early Q2 1999. The author of this port
+is Stefan Csomor (csomor@advancedconcepts.ch).
+
+
+
+
+
+
+
diff --git a/docs/html/faqmot.htm b/docs/html/faqmot.htm
new file mode 100644
index 0000000000..ed76c94145
--- /dev/null
+++ b/docs/html/faqmot.htm
@@ -0,0 +1,96 @@
+
+
+
+wxWindows 2 for Motif FAQ
+
+
+
+
+
+
+
+
+
+
+wxWindows 2 for Motif FAQ
+
+ |
+
+
+
+
+
+See also top-level FAQ page.
+
+
+What version of Motif do I need?
+
+You will need version 1.2 or above. Version 2 should also be fine. Some people
+have had a positive experience with Lesstif,
+a free Motif clone. (Note from Julian Smart - I use the Linux version of MetroLink Motif).
+
+
+
+
What features are missing or partially implemented?
+
+The following classes are not yet implemented: wxSpinButton, wxCheckListBox, wxJoyStick,
+wxGLCanvas.
+
+The following classes are not likely to be implemented because there is no sensible
+equivalent on Motif: wxMiniFrame, wxTaskBar.
+
+wxNotebook works for smaller dialogs (see notebook sample) but has some problems
+with a more complex situation (see the controls sample: initial resizing is very apparent).
+
+
+These features are not yet implemented:
+
+
+- Clipboard and drag and drop support are currently under development. Motif clipboard support
+should work, but currently for text only.
+
- Support for selection of specific visuals.
+
- Wide character support (but when Unicode is supported under Windows, this support will
+be relatively easy to add).
+
- Configurable colour/font settings (they are currently hard-wired in wxSystemSettings).
+
- OnEraseBackground.
+
- OnPaint optimization and backing pixmap.
+
- A help system (please use wxHelpController and Netscape instead).
+
+
+
+
+
Does Dialog Editor work with wxWindows for Motif?
+
+Suport for Dialog Editor is almost there, but there are some wrinkles to iron
+out. You may find it's useful though: compile it and see.
+
+
+
How do I switch between debugging and release compilation modes?
+
+Unfortunately the makefile system doesn't currently allow you to compile
+for both simultaneously: you need
+to recompile wxWindows and your application having adjusted make.env. However,
+you could rename the binary and release library archives, and adjust your makefiles
+to use the appropriate one (or change a symbolic link).
+
+
+
Why are windows are not refreshed properly until I resize them?
+
+Very occasionally you can experience this glitch, probably because sometimes the
+window tries to resize and repaint itself before the final size is known. The workaround
+is to add code like this after window creation and initialization:
+
+
+#ifdef __WXMOTIF__
+ wxNoOptimize noOptimize;
+ window->SetSize(-1, -1, w, h);
+#endif
+
+
+
+
+
+
+
+
+
diff --git a/docs/html/faqmsw.htm b/docs/html/faqmsw.htm
new file mode 100644
index 0000000000..e187e48325
--- /dev/null
+++ b/docs/html/faqmsw.htm
@@ -0,0 +1,99 @@
+
+
+
+wxWindows 2 for Windows FAQ
+
+
+
+
+
+
+
+
+
+
+wxWindows 2 for Windows FAQ
+
+ |
+
+
+
+
+
+See also top-level FAQ page.
+
+
+Is Windows 3.1 supported?
+
+Yes! Unlike Microsoft, we have not forgotten users of 16-bit Windows. Most features
+work under Windows 3.1, including wxTreeCtrl and wxListCtrl using the generic implementation.
+However, don't expect Windows 95-specific classes to work, such as wxTaskBar. The wxRegConfig
+class doesn't work either because the Windows 3.1 registry is very simplistic. Check out the 16-bit
+makefiles to see what other files have been left out.
+
+16-bit compilation is supported under Visual C++ 1.5, and Borland BC++ 4 to 5.
+
+
+
What compilers are supported?
+
+Please see the wxWindows 2 for Windows install.txt file for up-to-date information, but
+currently the following are known to work:
+
+
+- Visual C++ 1.5, 4.0, 5.0, 6.0
+
- Borland C++ 4.5, 5.0
+
- Borland C++Builder 1.0, 3.0
+
- Watcom C++ 10.6 (WIN32)
+
- Cygwin b20
+
- Mingw32
+
- MetroWerks CodeWarrior 4
+
+
+
+There is a linking problem with Symantec C++ which I hope someone can help solve.
+
+
+
Which is the best compiler to use with wxWindows 2?
+
+It's partly a matter of taste, but I (JACS) prefer Visual C++ since the debugger is very
+good, it's very stable, the documentation is extensive, and it generates small executables.
+Since project files are plain text, it's easy for me to generate appropriate project files
+for wxWindows samples.
+
+Borland C++ is fine - and very fast - but it's hard (impossible?) to use the debugger without using project files, and
+the debugger is nowhere near up to VC++'s quality. The IDE isn't great.
+
+C++Builder's power isn't really used with wxWindows since it needs integration with its
+own class library (VCL). For wxWindows, I've only used it with makefiles, in which case
+it's almost identical to BC++ 5.0 (the same makefiles can be used).
+
+You can't beat Cygwin's price (free), and you can debug adequately using gdb. However, it's
+quite slow to compile since it does not use precompiled headers.
+
+CodeWarrior is cross-platform - you can debug and generate Windows executables from a Mac, but not
+the other way around I think - but the IDE is, to my mind, a bit primitive.
+
+Watcom C++ is a little slow and the debugger is not really up to today's standards.
+
+
Is Unicode supported?
+
+No, although there are other internationalisation features.
+
+However, the issues surrounding Unicode support have been looked into so we know
+what we need to do, and have some header files ready to use containing appropriate
+type definitions. Just about every file in wxWindows will need changes, due to the
+pervasive nature of characters and character arrays. Unicode support is needed
+for the port to Windows CE (see below).
+
+
What about Windows CE?
+
+This is under consideration, though we need to get wxWindows Unicode-aware first.
+There are other interesting issues, such as how to combine the menubar and toolbar APIs
+as Windows CE requires.
+
+
+
+
+
+
+
diff --git a/docs/html/index.htm b/docs/html/index.htm
index b913d9a099..3e684fb1fb 100644
--- a/docs/html/index.htm
+++ b/docs/html/index.htm
@@ -45,6 +45,14 @@ from the wxWindows Web site.
Documentation Licence,
L-GPL,
GPL
+
FAQ:
+
ToDo: General ToDo,
wxGTK,
wxMotif,
diff --git a/docs/latex/wx/time.tex b/docs/latex/wx/time.tex
index 8ace4d25f2..caeb336b76 100644
--- a/docs/latex/wx/time.tex
+++ b/docs/latex/wx/time.tex
@@ -1,17 +1,239 @@
\section{\class{wxTime}}\label{wxtime}
-A class for manipulating times.
-
-TODO.
+Representation of time and date.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
+\wxheading{Data structures}
+
+{\small \begin{verbatim}
+typedef unsigned short hourTy;
+\end{verbatim}}
+
+{\small \begin{verbatim}
+typedef unsigned short minuteTy;
+\end{verbatim}}
+
+{\small \begin{verbatim}
+typedef unsigned short secondTy;
+\end{verbatim}}
+
+{\small \begin{verbatim}
+typedef unsigned long clockTy;
+\end{verbatim}}
+
+{\small \begin{verbatim}
+enum tFormat { wx12h, wx24h };
+\end{verbatim}}
+
+{\small \begin{verbatim}
+enum tPrecision { wxStdMinSec, wxStdMin };
+\end{verbatim}}
+
\wxheading{See also}
\helpref{wxDate}{wxDate}
\latexignore{\rtfignore{\wxheading{Members}}}
+\membersection{wxTime::wxTime}\label{wxtimewxtime}
+
+\func{}{wxTime}{\void}
+
+Initialize the object using the current time.
+
+\func{}{wxTime}{\param{clockTy }{s}}
+
+Initialize the object using the number of seconds that have elapsed since ???.
+
+\func{}{wxTime}{\param{const wxTime\&}{ time}}
+
+Copy constructor.
+
+\func{}{wxTime}{\param{hourTy }{h}, \param{minuteTy }{m}, \param{secondTy }{s = 0}, \param{bool }{dst = FALSE}}
+
+Initialize using hours, minutes, seconds, and whether DST time.
+
+\membersection{wxTime::wxTime}\label{wxtimewxtime}
+
+\func{}{wxTime}{\param{const wxDate\&}{ date}, \param{hourTy }{h = 0}, \param{minuteTy }{m = 0}, \param{secondTy }{s = 0}, \param{bool }{dst = FALSE}}
+
+Initialize using a \helpref{wxDate}{wxdate} object, hours, minutes, seconds, and whether DST time.
+
+\membersection{wxTime::GetDay}\label{wxtimegetday}
+
+\constfunc{int}{GetDay}{\void}
+
+Returns the day of the month.
+
+\membersection{wxTime::GetDayOfWeek}\label{wxtimegetdatofweek}
+
+\constfunc{int}{GetDayOfWeek}{\void}
+
+Returns the day of the week, a number from 0 to 6 where 0 is Sunday and 6 is Saturday.
+
+\membersection{wxTime::GetHour}\label{wxtimegethour}
+
+\constfunc{hourTy}{GetHour}{\void}
+
+Returns the hour in local time.
+
+\membersection{wxTime::GetHourGMT}\label{wxtimegethourgmt}
+
+\constfunc{hourTy}{GetHourGMT}{\void}
+
+Returns the hour in GMT.
+
+\membersection{wxTime::GetMinute}\label{wxtimegetminute}
+
+\constfunc{minuteTy}{GetMinute}{\void}
+
+Returns the minute in local time.
+
+\membersection{wxTime::GetMinuteGMT}\label{wxtimegetminutegmt}
+
+\constfunc{minuteTy}{GetMinuteGMT}{\void}
+
+Returns the minute in GMT.
+
+\membersection{wxTime::GetMonth}\label{wxtimegetmonth}
+
+\constfunc{int}{GetMonth}{\void}
+
+Returns the month.
+
+\membersection{wxTime::GetSecond}\label{wxtimegetsecond}
+
+\constfunc{secondTy}{GetSecond}{\void}
+
+Returns the second in local time or GMT.
+
+\membersection{wxTime::GetSecondGMT}\label{wxtimegetsecondgmt}
+
+\constfunc{secondTy}{GetSecondGMT}{\void}
+
+Returns the second in GMT.
+
+\membersection{wxTime::GetSeconds}\label{wxtimegetseconds}
+
+\constfunc{clockTy}{GetSeconds}{\void}
+
+Returns the number of seconds since ???.
+
+\membersection{wxTime::GetYear}\label{wxtimegetyear}
+
+\constfunc{int}{GetYear}{\void}
+
+Returns the year.
+
+\membersection{wxTime::FormatTime}\label{wxtimeformattime}
+
+\constfunc{char*}{FormatTime}{\void}
+
+Formats the time according to the current formatting options: see \helpref{wxTime::SetFormat}{wxtimesetformat}.
+
+\membersection{wxTime::IsBetween}\label{wxtimeisbetween}
+
+\constfunc{bool}{IsBetween}{\param{const wxTime\& }{a}, \param{const wxTime\& }{b}}
+
+Returns TRUE if this time is between the two given times.
+
+\membersection{wxTime::Max}\label{wxtimemax}
+
+\constfunc{wxTime}{Max}{\param{const wxTime\& }{time}}
+
+Returns the maximum of the two times.
+
+\membersection{wxTime::Min}\label{wxtimemin}
+
+\constfunc{wxTime}{Min}{\param{const wxTime\& }{time}}
+
+Returns the minimum of the two times.
+
+\membersection{wxTime::SetFormat}\label{wxtimesetformat}
+
+\func{static void}{SetFormat}{\param{const tFormat}{ format = wx12h},
+ \param{const tPrecision}{ precision = wxStdMinSec}}
+
+Sets the format and precision.
+
+\membersection{wxTime::operator char*}\label{wxtimestring}
+
+\func{operator}{char*}{\void}
+
+Returns a pointer to a static char* containing the formatted time.
+
+\membersection{wxTime::operator wxDate}\label{wxtimewxdate}
+
+\constfunc{operator}{wxDate}{\void}
+
+Converts the wxTime into a wxDate.
+
+\membersection{wxTime::operator $=$}\label{wxtimeoperator}
+
+\func{void}{operator $=$}{\param{const wxTime\& }{t}}
+
+Assignment operator.
+
+\membersection{wxTime::operator $<$}\label{wxtimeoperatorle}
+
+\constfunc{bool}{operator $<$}{\param{const wxTime\& }{t}}
+
+Less than operator.
+
+\membersection{wxTime::operator $<=$}\label{wxtimeoperatorleq}
+
+\constfunc{bool}{operator $<=$}{\param{const wxTime\& }{t}}
+
+Less than or equal to operator.
+
+\membersection{wxTime::operator $>$}\label{wxtimeoperatorge}
+
+\constfunc{bool}{operator $>$}{\param{const wxTime\& }{t}}
+
+Greater than operator.
+
+\membersection{wxTime::operator $>=$}\label{wxtimeoperatorgeq}
+
+\constfunc{bool}{operator $>=$}{\param{const wxTime\& }{t}}
+
+Greater than or equal to operator.
+
+\membersection{wxTime::operator $==$}\label{wxtimeoperatoreq}
+
+\constfunc{bool}{operator $==$}{\param{const wxTime\& }{t}}
+
+Equality operator.
+
+\membersection{wxTime::operator $!=$}\label{wxtimeoperatorneq}
+
+\constfunc{bool}{operator $!=$}{\param{const wxTime\& }{t}}
+
+Inequality operator.
+
+\membersection{wxTime::operator $+$}\label{wxtimeoperatorplus}
+
+\constfunc{bool}{operator $+$}{\param{long }{sec}}
+
+Addition operator.
+
+\membersection{wxTime::operator $-$}\label{wxtimeoperatorminus}
+
+\constfunc{bool}{operator $-$}{\param{long }{sec}}
+
+Subtraction operator.
+
+\membersection{wxTime::operator $+=$}\label{wxtimeoperatorpluseq}
+
+\constfunc{bool}{operator $+=$}{\param{long }{sec}}
+
+Increment operator.
+
+\membersection{wxTime::operator $-=$}\label{wxtimeoperatorminuseq}
+
+\constfunc{bool}{operator $-=$}{\param{long }{sec}}
+
+Decrement operator.
diff --git a/docs/msw/install.txt b/docs/msw/install.txt
index b73681831b..abe454e918 100644
--- a/docs/msw/install.txt
+++ b/docs/msw/install.txt
@@ -136,6 +136,25 @@ Some functionality is missing using this compiler (see makefile).
Add -D__WIN95__ if your SC++ has Windows 95 support, and ignore
Step (2). 16-bit compilation is left as an excercise for the user!
+Salford C++ compilation
+-----------------------
+
+1. Make sure your WXWIN variable is set, and uses the FAT (short
+ name) form.
+2. Edit SALFORDDIR and RESOURCEDIR in src/makesl.env as per
+ notes.
+3. Change directory to wx\src\msw. Type 'mk32 -f makefile.sl all' to
+ make the wxWindows core library.
+4. Change directory to wx\samples\minimal and type 'mk32 -f makefile.sl'
+ to make this sample.
+
+Unfortunately, Salford C++ seems to have problems with its code generation for
+operations on objects, as seen in wxFrame::OnMenuHighlight
+(minimal sample) or wxWindow::SetValidator (mdi sample). Also the
+the debugging version of the library is 90MB, with samples coming in
+at 40MB :-) However, wxWindows at least makes a good test suite for
+improving the compiler.
+
Gnu-Win32 b19/b20/Mingw32 compilation
-------------------------------------
diff --git a/docs/msw/todo.txt b/docs/msw/todo.txt
index 88bb3dcf0b..87c9fcdcd6 100644
--- a/docs/msw/todo.txt
+++ b/docs/msw/todo.txt
@@ -8,14 +8,12 @@ HIGH PRIORITY
Add further controls and properties to Dialog Editor.
Update manual.
- wxTempFile
wxMsgCatalog etc.
wxRegKey
wxStatusBar95 and wxFrame status bar functions
wxListBox changes (for ownerdraw functionality)
wxThread DONE (except for topic overview)
wxString PARTLY DONE
- Drag and drop (change API if required, e.g. const).
wxBaseArray, other arrays
(wxOwnerDrawn)
Document the include file for each class
diff --git a/include/wx/date.h b/include/wx/date.h
index 2954266d27..ea1b894c69 100644
--- a/include/wx/date.h
+++ b/include/wx/date.h
@@ -52,7 +52,10 @@ class WXDLLEXPORT wxDate: public wxObject
wxDate (const wxString& dat);
wxDate (const wxDate &dt);
+#ifndef __SALFORDC__
operator wxString (void);
+#endif
+
void operator = (const wxDate& date);
void operator = (const wxString& date);
diff --git a/include/wx/defs.h b/include/wx/defs.h
index a332d31490..eb288dc3d6 100644
--- a/include/wx/defs.h
+++ b/include/wx/defs.h
@@ -133,7 +133,7 @@
typedef unsigned char bool;
#endif
-#if ( defined(_MSC_VER) && (_MSC_VER <= 800) ) || defined(__GNUWIN32__) || (defined(__BORLANDC__) && defined(__WIN16__)) || defined(__SC__)
+#if ( defined(_MSC_VER) && (_MSC_VER <= 800) ) || defined(__GNUWIN32__) || (defined(__BORLANDC__) && defined(__WIN16__)) || defined(__SC__) || defined(__SALFORDC__)
#define byte unsigned char
#endif
diff --git a/include/wx/dirdlg.h b/include/wx/dirdlg.h
index 2c84771ea5..f2d1dbbdf2 100644
--- a/include/wx/dirdlg.h
+++ b/include/wx/dirdlg.h
@@ -2,7 +2,7 @@
#define _WX_DIRDLG_H_BASE_
#if defined(__WXMSW__)
-#if defined(__WIN16__) || defined(__GNUWIN32__)
+#if defined(__WIN16__) || defined(__GNUWIN32__) || defined(__SALFORDC__)
#include "wx/generic/dirdlgg.h"
#else
#include "wx/msw/dirdlg.h"
diff --git a/include/wx/image.h b/include/wx/image.h
index efd5feb55b..b22b46cd07 100644
--- a/include/wx/image.h
+++ b/include/wx/image.h
@@ -159,7 +159,11 @@ public:
bool HasMask() const;
inline wxImage& operator = (const wxImage& image)
- { if (*this == image) return (*this); Ref(image); return *this; }
+ { if ((*this) == image)
+ return (*this);
+ Ref(image);
+ return *this; }
+
inline bool operator == (const wxImage& image)
{ return m_refData == image.m_refData; }
inline bool operator != (const wxImage& image)
diff --git a/include/wx/list.h b/include/wx/list.h
index 5f762e1625..b578982866 100644
--- a/include/wx/list.h
+++ b/include/wx/list.h
@@ -322,15 +322,15 @@ private:
// declare a list type named 'name' and containing elements of type 'T *'
// (as a by product of macro expansion you also get wx##name##Node
-// wxNode-dervied type)
+// wxNode-derived type)
//
// implementation details:
-// 1. we define _WX_LIST_ITEM_TYPE_##name typedef to save in it the item type
+// 1. We define _WX_LIST_ITEM_TYPE_##name typedef to save in it the item type
// for the list of given type - this allows us to pass only the list name
// to WX_DEFINE_LIST() even if it needs both the name and the type
//
-// 2. We redefine all not type-safe wxList functions withtype-safe versions
-// which don't take any place (everything is inline), but bring compile
+// 2. We redefine all non-type-safe wxList functions with type-safe versions
+// which don't take any space (everything is inline), but bring compile
// time error checking.
#define WX_DECLARE_LIST_2(T, name, nodetype) \
diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h
index 46c1c5b951..ba8dc5ade1 100644
--- a/include/wx/msw/bitmap.h
+++ b/include/wx/msw/bitmap.h
@@ -169,6 +169,7 @@ public:
void SetMask(wxMask *mask) ;
inline wxBitmap& operator = (const wxBitmap& bitmap) { if (*this == bitmap) return (*this); Ref(bitmap); return *this; }
+
inline bool operator == (const wxBitmap& bitmap) { return m_refData == bitmap.m_refData; }
inline bool operator != (const wxBitmap& bitmap) { return m_refData != bitmap.m_refData; }
@@ -208,5 +209,6 @@ public:
wxBitmap GetBitmapForDC(wxDC& dc) const;
};
+
#endif
// _WX_BITMAP_H_
diff --git a/include/wx/msw/setup.h b/include/wx/msw/setup.h
index a80f9d6243..3c75cb1d7e 100644
--- a/include/wx/msw/setup.h
+++ b/include/wx/msw/setup.h
@@ -257,6 +257,15 @@
#undef wxUSE_DEBUG_NEW_ALWAYS
#define wxUSE_DEBUG_NEW_ALWAYS 0
+
+#undef wxUSE_THREADS
+#define wxUSE_THREADS 0
+
+#undef wxUSE_DBWIN32
+#define wxUSE_DBWIN32 0
+
+#undef wxUSE_OWNER_DRAWN
+#define wxUSE_OWNER_DRAWN 0
#endif
// Minimal setup e.g. for compiling small utilities
diff --git a/include/wx/msw/wx.rc b/include/wx/msw/wx.rc
index a118da0480..23c577ae53 100644
--- a/include/wx/msw/wx.rc
+++ b/include/wx/msw/wx.rc
@@ -77,6 +77,21 @@ END
// Standard wxWindows Cursors
//
+#ifdef __SALFORDC__
+WXCURSOR_HAND CURSOR DISCARDABLE WXINCDIR"wx/msw/hand.cur"
+WXCURSOR_BULLSEYE CURSOR DISCARDABLE WXINCDIR"wx/msw/bullseye.cur"
+WXCURSOR_PENCIL CURSOR DISCARDABLE WXINCDIR"wx/msw/pencil.cur"
+WXCURSOR_MAGNIFIER CURSOR DISCARDABLE WXINCDIR"wx/msw/magnif1.cur"
+WXCURSOR_NO_ENTRY CURSOR DISCARDABLE WXINCDIR"wx/msw/noentry.cur"
+WXCURSOR_SIZING CURSOR DISCARDABLE WXINCDIR"wx/msw/size.cur"
+WXCURSOR_ROLLER CURSOR DISCARDABLE WXINCDIR"wx/msw/roller.cur"
+WXCURSOR_WATCH CURSOR DISCARDABLE WXINCDIR"wx/msw/watch1.cur"
+WXCURSOR_PBRUSH CURSOR DISCARDABLE WXINCDIR"wx/msw/pbrush.cur"
+WXCURSOR_PLEFT CURSOR DISCARDABLE WXINCDIR"wx/msw/pntleft.cur"
+WXCURSOR_PRIGHT CURSOR DISCARDABLE WXINCDIR"wx/msw/pntright.cur"
+WXCURSOR_QARROW CURSOR DISCARDABLE WXINCDIR"wx/msw/query.cur"
+WXCURSOR_BLANK CURSOR DISCARDABLE WXINCDIR"wx/msw/blank.cur"
+#else
WXCURSOR_HAND CURSOR DISCARDABLE "wx/msw/hand.cur"
WXCURSOR_BULLSEYE CURSOR DISCARDABLE "wx/msw/bullseye.cur"
WXCURSOR_PENCIL CURSOR DISCARDABLE "wx/msw/pencil.cur"
@@ -90,6 +105,7 @@ WXCURSOR_PLEFT CURSOR DISCARDABLE "wx/msw/pntleft.cur"
WXCURSOR_PRIGHT CURSOR DISCARDABLE "wx/msw/pntright.cur"
WXCURSOR_QARROW CURSOR DISCARDABLE "wx/msw/query.cur"
WXCURSOR_BLANK CURSOR DISCARDABLE "wx/msw/blank.cur"
+#endif
//////////////////////////////////////////////////////////////////////////////
//
@@ -105,6 +121,9 @@ WXCURSOR_BLANK CURSOR DISCARDABLE "wx/msw/blank.cur"
// Bitmaps
//
+#ifdef __SALFORDC__
+wxDISABLE_BUTTON_BITMAP BITMAP WXINCDIR"wx/msw/disable.bmp"
+#else
wxDISABLE_BUTTON_BITMAP BITMAP "wx/msw/disable.bmp"
-
+#endif
diff --git a/include/wx/ownerdrw.h b/include/wx/ownerdrw.h
index ee4c465030..5a742f3dda 100644
--- a/include/wx/ownerdrw.h
+++ b/include/wx/ownerdrw.h
@@ -16,8 +16,6 @@
#pragma interface "ownerdrw.h"
#endif
-typedef wxColour wxColor;
-
// No, don't do this: BC++ 5 complains that size_t already been defined.
// typedef unsigned int size_t;
#include
@@ -126,7 +124,7 @@ private:
m_bOwnerDrawn; // true if something is non standard
wxFont m_font; // font to use for drawing
- wxColor m_colText, // color ----"---"---"----
+ wxColour m_colText, // color ----"---"---"----
m_colBack; // background color
wxBitmap m_bmpChecked, // bitmap to put near the item
m_bmpUnchecked; // (checked is used also for 'uncheckable' items)
diff --git a/include/wx/protocol/protocol.h b/include/wx/protocol/protocol.h
index b672953690..608c8f1f06 100644
--- a/include/wx/protocol/protocol.h
+++ b/include/wx/protocol/protocol.h
@@ -69,7 +69,7 @@ public:
virtual bool Abort() = 0;
virtual wxInputStream *GetInputStream(const wxString& path) = 0;
virtual wxProtocolError GetError() = 0;
- virtual wxString GetContentType() { return (char *)NULL; }
+ virtual wxString GetContentType() { return wxEmptyString; }
virtual void SetUser(const wxString& WXUNUSED(user)) {}
virtual void SetPassword(const wxString& WXUNUSED(passwd) ) {}
};
diff --git a/include/wx/resource.h b/include/wx/resource.h
index 347386024c..74fa153f01 100644
--- a/include/wx/resource.h
+++ b/include/wx/resource.h
@@ -42,6 +42,10 @@
#define wxDLG_POINT(x, y, parent, useDlgUnits) (useDlgUnits ? parent->ConvertDialogToPixel(wxPoint(x, y)) : wxPoint(x, y))
#define wxDLG_SIZE(x, y, parent, useDlgUnits) (useDlgUnits ? parent->ConvertDialogToPixel(wxSize(x, y)) : wxSize(x, y))
+#ifdef FindResource
+#undef FindResource
+#endif
+
/*
* Internal format for control/panel item
*/
diff --git a/include/wx/socket.h b/include/wx/socket.h
index 99422550b4..ebd5a5ecd6 100644
--- a/include/wx/socket.h
+++ b/include/wx/socket.h
@@ -211,7 +211,15 @@ protected:
friend class wxSocketServer;
friend class wxSocketHandler;
+#ifdef __SALFORDC__
+public:
+#endif
+
wxSocketBase(wxSockFlags flags, wxSockType type);
+
+#ifdef __SALFORDC__
+protected:
+#endif
bool _Wait(long seconds, long microseconds, int type);
diff --git a/include/wx/time.h b/include/wx/time.h
index 45d51a6752..a0137da932 100644
--- a/include/wx/time.h
+++ b/include/wx/time.h
@@ -55,8 +55,11 @@ public:
wxTime(const wxDate&, hourTy h =0, minuteTy m =0, secondTy s=0, bool dst =FALSE);
// Convert to string
+#ifndef __SALFORDC__
operator char * (void);
operator wxDate() const;
+#endif
+
bool operator<(const wxTime& t) const { return sec < t.sec; }
bool operator<=(const wxTime& t) const { return sec <= t.sec; }
bool operator>(const wxTime& t) const { return sec > t.sec; }
diff --git a/include/wx/wxprec.h b/include/wx/wxprec.h
index b7c00c4f70..0643443e9d 100644
--- a/include/wx/wxprec.h
+++ b/include/wx/wxprec.h
@@ -27,7 +27,7 @@
// Comment this out if you don't mind slower compilation of the wxWindows
// library
-#ifndef __WXMAC__
+#if !defined(__WXMAC__) && !defined(__SALFORDC__)
#include
#endif
diff --git a/samples/tab/test.cpp b/samples/tab/test.cpp
index 5c9fd419e3..be7797a5c3 100644
--- a/samples/tab/test.cpp
+++ b/samples/tab/test.cpp
@@ -24,7 +24,7 @@
#include "test.h"
// If 1, use a dialog. Otherwise use a frame.
-#define USE_TABBED_DIALOG 0
+#define USE_TABBED_DIALOG 1
MyDialog* dialog = (MyDialog *) NULL;
MyFrame* frame = (MyFrame *) NULL;
diff --git a/src/common/date.cpp b/src/common/date.cpp
index 3aaf3d2f47..5bc7dbd22a 100644
--- a/src/common/date.cpp
+++ b/src/common/date.cpp
@@ -159,10 +159,12 @@ void wxDate::operator = (const wxString& dat)
// Conversion operations
//////////////////////////////////////////////////////////////
+#ifndef __SALFORDC__
wxDate::operator wxString( void )
{
return FormatDate();
}
+#endif
//////////////////////////////////////////////////////////////
// Date Arithmetic
diff --git a/src/common/doslex.c b/src/common/doslex.c
index 67e789afba..08572e333c 100644
--- a/src/common/doslex.c
+++ b/src/common/doslex.c
@@ -21,7 +21,19 @@
#ifdef __cplusplus
#include
+
+#ifdef __SALFORDC__
+#include
+#include
+#else
#include
+#endif
+
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
/* use prototypes in function declarations */
#define YY_USE_PROTOS
@@ -520,7 +532,7 @@ do_action: /* this label is used only to access EOF actions */
case 1:
# line 60 "lexer.l"
-{yylval.s = strdup(yytext); Return(INTEGER);}
+{yylval.s = strdup((const char*) yytext); Return(INTEGER);}
YY_BREAK
case 2:
# line 62 "lexer.l"
@@ -528,18 +540,18 @@ Return(EXP);
YY_BREAK
case 3:
# line 64 "lexer.l"
-{yylval.s = strdup(yytext); Return(WORD);}
+{yylval.s = strdup((const char*) yytext); Return(WORD);}
YY_BREAK
case 4:
# line 66 "lexer.l"
-{int len = strlen(yytext);
+{int len = strlen((const char*) yytext);
yytext[len-1] = 0;
- yylval.s = strdup(yytext+1);
+ yylval.s = strdup((const char*) (yytext+1));
Return(WORD);}
YY_BREAK
case 5:
# line 71 "lexer.l"
-{yylval.s = strdup(yytext); Return(STRING);}
+{yylval.s = strdup((const char*) yytext); Return(STRING);}
YY_BREAK
case 6:
# line 73 "lexer.l"
@@ -1180,7 +1192,7 @@ void LexFromString(char *buffer)
{
lex_read_from_string = 1;
lex_buffer = buffer;
- lex_buffer_length = strlen(buffer);
+ lex_buffer_length = strlen((const char*) buffer);
lex_string_ptr = 0;
/* Don't know why this is necessary, but otherwise
* lex only works _once_!
diff --git a/src/common/http.cpp b/src/common/http.cpp
index c8f8b79a04..80c8bf09e8 100644
--- a/src/common/http.cpp
+++ b/src/common/http.cpp
@@ -88,7 +88,7 @@ wxString wxHTTP::GetHeader(const wxString& header)
{
wxNode *node = m_headers.Find(header);
if (!node)
- return (char *)NULL;
+ return wxEmptyString;
return *((wxString *)node->Data());
}
diff --git a/src/common/image.cpp b/src/common/image.cpp
index a4f18c0975..853182a888 100644
--- a/src/common/image.cpp
+++ b/src/common/image.cpp
@@ -401,7 +401,7 @@ wxImageHandler *wxImage::FindHandler( const wxString& name )
while (node)
{
wxImageHandler *handler = (wxImageHandler*)node->Data();
- if (handler->GetName() == name) return handler;
+ if (handler->GetName().Cmp(name) == 0) return handler;
node = node->Next();
}
@@ -414,7 +414,7 @@ wxImageHandler *wxImage::FindHandler( const wxString& extension, long bitmapType
while (node)
{
wxImageHandler *handler = (wxImageHandler*)node->Data();
- if ( handler->GetExtension() == extension &&
+ if ( (handler->GetExtension().Cmp(extension) == 0) &&
(bitmapType == -1 || handler->GetType() == bitmapType) )
return handler;
node = node->Next();
diff --git a/src/common/log.cpp b/src/common/log.cpp
index 35add23be2..e83c4bc1e1 100644
--- a/src/common/log.cpp
+++ b/src/common/log.cpp
@@ -330,8 +330,8 @@ void wxLog::DoLog(wxLogLevel level, const char *szString)
break;
case wxLOG_Info:
- if ( GetVerbose() )
case wxLOG_Message:
+ if ( GetVerbose() )
DoLogString(str + szString);
// fall through
@@ -481,8 +481,8 @@ void wxLogGui::DoLog(wxLogLevel level, const char *szString)
{
switch ( level ) {
case wxLOG_Info:
- if ( GetVerbose() )
case wxLOG_Message:
+ if ( GetVerbose() )
if ( !m_bErrors ) {
m_aMessages.Add(szString);
m_bHasMessages = TRUE;
diff --git a/src/common/memory.cpp b/src/common/memory.cpp
index e89bd8835c..81245b504f 100644
--- a/src/common/memory.cpp
+++ b/src/common/memory.cpp
@@ -49,7 +49,7 @@
# endif
#endif
-#if !defined(__WATCOMC__) && !defined(__VMS__) && !defined( __MWERKS__ )
+#if !defined(__WATCOMC__) && !defined(__VMS__) && !defined( __MWERKS__ ) && !defined(__SALFORDC__)
#include
#endif
diff --git a/src/common/module.cpp b/src/common/module.cpp
index 5a65c70b94..f1d0bebed7 100644
--- a/src/common/module.cpp
+++ b/src/common/module.cpp
@@ -24,7 +24,14 @@
#include "wx/hash.h"
#include "wx/listimpl.cpp"
+#ifdef __SALFORDC__
+void wxwxModuleListNode::DeleteData()
+{
+ delete (_WX_LIST_ITEM_TYPE_wxModuleList *)GetData();
+}
+#else
WX_DEFINE_LIST(wxModuleList);
+#endif
IMPLEMENT_CLASS(wxModule, wxObject)
diff --git a/src/common/sckaddr.cpp b/src/common/sckaddr.cpp
index b61afc01a4..9fa736fdd5 100644
--- a/src/common/sckaddr.cpp
+++ b/src/common/sckaddr.cpp
@@ -26,7 +26,8 @@
#include
#include
#include
-#ifndef __MWERKS__
+
+#if !defined(__MWERKS__) && !defined(__SALFORDC__)
#include
#endif
@@ -114,14 +115,14 @@ const wxSockAddress& wxIPV4address::operator =(const wxSockAddress& addr)
bool wxIPV4address::Hostname(const wxString& name)
{
- struct hostent *hostent;
+ struct hostent *theHostent;
struct in_addr *addr;
if (name.IsNull())
return FALSE;
if (!name.IsNumber()) {
- if ((hostent = gethostbyname(name.GetData())) == 0) {
+ if ((theHostent = gethostbyname(name.GetData())) == 0) {
return FALSE;
}
} else {
@@ -136,7 +137,7 @@ bool wxIPV4address::Hostname(const wxString& name)
return TRUE;
}
- addr = (struct in_addr *) *(hostent->h_addr_list);
+ addr = (struct in_addr *) *(theHostent->h_addr_list);
m_addr->sin_addr.s_addr = addr[0].s_addr;
return TRUE;
@@ -150,22 +151,22 @@ bool wxIPV4address::Hostname(unsigned long addr)
bool wxIPV4address::Service(const wxString& name)
{
- struct servent *servent;
+ struct servent *theServent;
if (name.IsNull())
return FALSE;
if (!name.IsNumber()) {
- if ((servent = getservbyname(name, "tcp")) == 0)
+ if ((theServent = getservbyname(name, "tcp")) == 0)
return FALSE;
} else {
- if ((servent = getservbyport(atoi(name), "tcp")) == 0) {
+ if ((theServent = getservbyport(atoi(name), "tcp")) == 0) {
m_addr->sin_port = htons(atoi(name));
return TRUE;
}
}
- m_addr->sin_port = servent->s_port;
+ m_addr->sin_port = theServent->s_port;
return TRUE;
}
@@ -254,7 +255,7 @@ const wxSockAddress& wxIPV6address::operator =(const wxSockAddress& addr)
bool wxIPV6address::Hostname(const wxString& name)
{
- struct hostent *hostent;
+ struct hostent *theHostent;
struct in_addr *addr;
if (name.IsNull())
@@ -262,14 +263,14 @@ bool wxIPV6address::Hostname(const wxString& name)
if (!name.IsNumber()) {
hostent = gethostbyname2((char*) name, AF_INET6);
- if (!hostent)
+ if (!theHostent)
return FALSE;
} else {
// Don't how to do
return FALSE;
}
- addr = (struct in6_addr *) *(hostent->h_addr_list);
+ addr = (struct in6_addr *) *(theHostent->h_addr_list);
m_addr->sin6_addr.s6_addr = addr[0].s6_addr;
return TRUE;
@@ -283,22 +284,22 @@ bool wxIPV6address::Hostname(unsigned char addr[16])
bool wxIPV6address::Service(const char *name)
{
- struct servent *servent;
+ struct servent *theServent;
if (!name || !strlen(name))
return FALSE;
if (!isdigit(*name)) {
- if ((servent = getservbyname((char*) name, "tcp")) == 0)
+ if ((theServent = getservbyname((char*) name, "tcp")) == 0)
return FALSE;
} else {
- if ((servent = getservbyport(atoi(name), "tcp")) == 0) {
+ if ((theServent = getservbyport(atoi(name), "tcp")) == 0) {
m_addr->sin_port = htons(atoi(name));
return TRUE;
}
}
- m_addr->sin_port = servent->s_port;
+ m_addr->sin_port = theServent->s_port;
return TRUE;
}
diff --git a/src/common/socket.cpp b/src/common/socket.cpp
index ef8e6fd1e9..6b1d1992a2 100644
--- a/src/common/socket.cpp
+++ b/src/common/socket.cpp
@@ -185,6 +185,10 @@ int PASCAL FAR __WSAFDIsSet(SOCKET fd, fd_set FAR *set)
// Some patch ///// END
/////////////////////////////////////////////////////////////////////////////
+#ifdef GetClassInfo
+#undef GetClassInfo
+#endif
+
// --------------------------------------------------------------
// Module
// --------------------------------------------------------------
diff --git a/src/common/string.cpp b/src/common/string.cpp
index de7834e389..d9937efe17 100644
--- a/src/common/string.cpp
+++ b/src/common/string.cpp
@@ -41,6 +41,10 @@
#include
#include
+#ifdef __SALFORDC__
+#include
+#endif
+
#if wxUSE_WCSRTOMBS
#include // for wcsrtombs(), see comments where it's used
#endif // GNU
@@ -871,7 +875,7 @@ wxString& wxString::Trim(bool bFromRight)
psz++;
// fix up data and length
- int nDataLength = GetStringData()->nDataLength - (psz - m_pchData);
+ int nDataLength = GetStringData()->nDataLength - (psz - (const char*) m_pchData);
memmove(m_pchData, psz, (nDataLength + 1)*sizeof(char));
GetStringData()->nDataLength = nDataLength;
}
@@ -919,7 +923,7 @@ int wxString::Find(char ch, bool bFromEnd) const
{
const char *psz = bFromEnd ? strrchr(m_pchData, ch) : strchr(m_pchData, ch);
- return (psz == NULL) ? wxNOT_FOUND : psz - m_pchData;
+ return (psz == NULL) ? wxNOT_FOUND : psz - (const char*) m_pchData;
}
// find a sub-string (like strstr)
@@ -927,7 +931,7 @@ int wxString::Find(const char *pszSub) const
{
const char *psz = strstr(m_pchData, pszSub);
- return (psz == NULL) ? wxNOT_FOUND : psz - m_pchData;
+ return (psz == NULL) ? wxNOT_FOUND : psz - (const char*) m_pchData;
}
// ---------------------------------------------------------------------------
diff --git a/src/common/time.cpp b/src/common/time.cpp
index 3d458c4e6d..3b9ce52b58 100644
--- a/src/common/time.cpp
+++ b/src/common/time.cpp
@@ -104,7 +104,11 @@ wxTime::wxTime()
wxTimeInitialized = TRUE;
}
sec = wxGetCurrentTime();
+#ifdef __SALFORDC__
+ sec += (unsigned long) 2177452800; /* seconds from 1/1/01 to 1/1/70 */
+#else
sec += 2177452800UL; /* seconds from 1/1/01 to 1/1/70 */
+#endif
}
wxTime::wxTime(hourTy h, minuteTy m, secondTy s, bool dst)
@@ -152,6 +156,7 @@ wxTime::wxTime(const wxDate& date, hourTy h, minuteTy m, secondTy s, bool dst)
sec += TIME_ZONE; // adjust to GMT
}
+#ifndef __SALFORDC__
wxTime::operator wxDate() const
/*
Convert a wxTime to a local wxDate
@@ -164,6 +169,7 @@ wxTime::operator wxDate() const
date += daycount;
return date;
}
+#endif
bool wxTime::IsBetween(const wxTime& a, const wxTime& b) const
{
@@ -315,10 +321,12 @@ wxTime wxTime::Min(const wxTime& t) const
return t;
}
+#ifndef __SALFORDC__
wxTime::operator char *(void)
{
return FormatTime();
}
+#endif
void wxTime::SetFormat(const wxTime::tFormat lFormat,
const wxTime::tPrecision lPrecision) {
diff --git a/src/common/timercmn.cpp b/src/common/timercmn.cpp
index ca30cb5be1..369b3b73d2 100644
--- a/src/common/timercmn.cpp
+++ b/src/common/timercmn.cpp
@@ -33,6 +33,7 @@
#endif
#include
+
#ifndef __WXMAC__
#include
#endif
@@ -42,7 +43,8 @@
#endif
#if defined(__linux__) || defined(__SVR4__) || defined(__SYSV__) || defined(__SGI__) || \
- defined(__ALPHA__) || defined(__GNUWIN32__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ defined(__ALPHA__) || defined(__GNUWIN32__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
+ defined(__SALFORDC__)
#include
#endif
@@ -147,11 +149,15 @@ bool wxGetLocalTime(long *timeZone, int *dstObserved)
*dstObserved = tp->tm_isdst;
#else
-#if (((defined(__SYSV__) && !defined(__HPUX__)) || defined(__MSDOS__) || defined(__WXMSW__)) && !defined(__GNUWIN32__) && !defined(__MWERKS__))
-#ifdef __BORLANDC__
+#if (((defined(__SYSV__) && !defined(__HPUX__)) || defined(__MSDOS__) || defined(__WXMSW__))\
+ && !defined(__GNUWIN32__) && !defined(__MWERKS__) )
+#if defined(__BORLANDC__)
/* Borland uses underscores */
*timeZone = _timezone;
*dstObserved = _daylight;
+#elif defined(__SALFORDC__)
+ *timeZone = _timezone;
+ *dstObserved = daylight;
#else
*timeZone = timezone;
*dstObserved = daylight;
diff --git a/src/common/tokenzr.cpp b/src/common/tokenzr.cpp
index 9fb4a54380..34079c0f66 100644
--- a/src/common/tokenzr.cpp
+++ b/src/common/tokenzr.cpp
@@ -93,7 +93,7 @@ wxString wxStringTokenizer::NextToken()
pos = FindDelims(m_string, m_delims);
if (pos == -1) {
r_string = m_string;
- m_string = (char *)NULL;
+ m_string = wxEmptyString;
return r_string;
}
diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp
index 2b2e7d65ac..fc82bca82c 100644
--- a/src/common/utilscmn.cpp
+++ b/src/common/utilscmn.cpp
@@ -56,6 +56,10 @@
#include
#endif
+#ifdef __SALFORDC__
+#include
+#endif
+
// Pattern matching code.
// Yes, this path is deliberate (for Borland compilation)
#ifdef wx_mac /* MATTHEW: [5] Mac doesn't like paths with "/" */
diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp
index 299ef6042a..c3139ccfb6 100644
--- a/src/common/valtext.cpp
+++ b/src/common/valtext.cpp
@@ -34,6 +34,10 @@
#include
#include
+#ifdef __SALFORDC__
+#include
+#endif
+
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxTextValidator, wxValidator)
diff --git a/src/generic/prop.cpp b/src/generic/prop.cpp
index 44843a918e..fa9b47d096 100644
--- a/src/generic/prop.cpp
+++ b/src/generic/prop.cpp
@@ -808,7 +808,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxProperty, wxObject)
wxProperty::wxProperty(void)
{
- m_propertyRole = (char *)NULL;
+ m_propertyRole = wxEmptyString;
m_propertyValidator = NULL;
m_propertyWindow = NULL;
m_enabled = TRUE;
diff --git a/src/makeprog.wat b/src/makeprog.wat
index c36dce6abf..7814ef4947 100644
--- a/src/makeprog.wat
+++ b/src/makeprog.wat
@@ -32,7 +32,7 @@ clean: .SYMBOLIC
-erase *.err
-erase *.pch
-erase *.lib
- -erase *.lnk
+ -erase $(LNK)
-erase *.res
-erase *.exe
-erase *.lbc
diff --git a/src/msw/app.cpp b/src/msw/app.cpp
index 8913359f9b..a1b24b0f1a 100644
--- a/src/msw/app.cpp
+++ b/src/msw/app.cpp
@@ -59,9 +59,10 @@
// if you don't do the same for the Ole calls further down.
// Also, OLE is used not just for drag and drop (it's used by automatn.cpp).
// #if wxUSE_DRAG_AND_DROP
-#if !defined(__GNUWIN32__) && !defined(__SC__)
+#if !defined(__GNUWIN32__) && !defined(__SC__) && !defined(__SALFORDC__)
#include
#endif
+
// #endif
#include
@@ -207,7 +208,7 @@ bool wxApp::Initialize()
}
*/
-#if !defined(__GNUWIN32__) && !defined(__SC__)
+#if !defined(__GNUWIN32__) && !defined(__SC__) && !defined(__SALFORDC__)
// we need to initialize OLE library
if ( FAILED(::OleInitialize(NULL)) )
wxFatalError(_("Cannot initialize OLE"));
@@ -524,7 +525,7 @@ void wxApp::CleanUp()
if ( wxDisableButtonBrush )
::DeleteObject( wxDisableButtonBrush ) ;
-#if !defined(__GNUWIN32__) && !defined(__SC__)
+#if !defined(__GNUWIN32__) && !defined(__SC__) && !defined(__SALFORDC__)
::OleUninitialize();
#endif
diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp
index f51174c5b3..4372ee26a4 100644
--- a/src/msw/bitmap.cpp
+++ b/src/msw/bitmap.cpp
@@ -338,7 +338,7 @@ wxBitmapHandler *wxBitmap::FindHandler(const wxString& name)
while ( node )
{
wxBitmapHandler *handler = (wxBitmapHandler *)node->Data();
- if ( handler->GetName() == name )
+ if ( (handler->GetName().Cmp(name) == 0) )
return handler;
node = node->Next();
}
@@ -351,8 +351,8 @@ wxBitmapHandler *wxBitmap::FindHandler(const wxString& extension, long bitmapTyp
while ( node )
{
wxBitmapHandler *handler = (wxBitmapHandler *)node->Data();
- if ( handler->GetExtension() == extension &&
- (bitmapType == -1 || handler->GetType() == bitmapType) )
+ if ( (handler->GetExtension().Cmp(extension) == 0) &&
+ (bitmapType == -1 || (handler->GetType() == bitmapType)) )
return handler;
node = node->Next();
}
diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp
index f21e4ff954..ef88967086 100644
--- a/src/msw/bmpbuttn.cpp
+++ b/src/msw/bmpbuttn.cpp
@@ -253,9 +253,17 @@ void wxBitmapButton::DrawButtonDisable( WXHDC dc, int left, int top, int right,
if ( with_marg )
::PatBlt( (HDC) dc, left + m_marginX, top + m_marginY,
right - 2 * m_marginX, bottom - 2 * m_marginY,
- 0xfa0089ul ) ;
- else ::PatBlt( (HDC) dc, left, top, right, bottom, 0xfa0089ul ) ;
-
+#ifdef __SALFORDC__
+ 0xfa0089L ) ;
+#else
+ 0xfa0089UL ) ;
+#endif
+ else ::PatBlt( (HDC) dc, left, top, right, bottom,
+#ifdef __SALFORDC__
+ 0xfa0089L ) ;
+#else
+ 0xfa0089UL ) ;
+#endif
::SelectObject( (HDC) dc, old ) ;
}
diff --git a/src/msw/button.cpp b/src/msw/button.cpp
index 6b88286368..fce544bd25 100644
--- a/src/msw/button.cpp
+++ b/src/msw/button.cpp
@@ -118,7 +118,8 @@ void wxButton::SetSize(int x, int y, int width, int height, int sizeFlags)
int cyf;
char buf[300];
GetWindowText((HWND) GetHWND(), buf, 300);
- GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL,& GetFont());
+ GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL,
+ & this->GetFont());
// If we're prepared to use the existing width, then...
if (width == -1 && ((sizeFlags & wxSIZE_AUTO_WIDTH) != wxSIZE_AUTO_WIDTH))
@@ -127,7 +128,7 @@ void wxButton::SetSize(int x, int y, int width, int height, int sizeFlags)
{
int cx;
int cy;
- wxGetCharSize(GetHWND(), &cx, &cy,& GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, & this->GetFont());
actualWidth = (int)(current_width + 3*cx) ;
}
diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp
index 0fe5de314e..1461cf6f4f 100644
--- a/src/msw/checkbox.cpp
+++ b/src/msw/checkbox.cpp
@@ -144,7 +144,7 @@ void wxCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags)
if ( !str.IsEmpty() )
{
- GetTextExtent(str, ¤t_width, &cyf, NULL, NULL, & GetFont());
+ GetTextExtent(str, ¤t_width, &cyf, NULL, NULL, & this->GetFont());
if (w1 < 0)
w1 = (int)(current_width + RADIO_SIZE);
if (h1 < 0)
diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp
index d36ce7fe08..26b67c9d36 100644
--- a/src/msw/choice.cpp
+++ b/src/msw/choice.cpp
@@ -205,7 +205,7 @@ void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags)
int cx; // button font dimensions
int cy;
- wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, & this->GetFont());
int control_width, control_height;
@@ -233,7 +233,7 @@ void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags)
for (i = 0; i < m_noStrings; i++)
{
wxString str(GetString(i));
- GetTextExtent(str, &len, &ht, NULL, NULL, & GetFont());
+ GetTextExtent(str, &len, &ht, NULL, NULL, & this->GetFont());
if ( len > longest)
longest = len;
}
diff --git a/src/msw/colordlg.cpp b/src/msw/colordlg.cpp
index 3bc03e6099..d9cbc6a244 100644
--- a/src/msw/colordlg.cpp
+++ b/src/msw/colordlg.cpp
@@ -36,7 +36,7 @@
#include
-#ifndef __WIN32__
+#if !defined(__WIN32__) || defined(__SALFORDC__)
#include
#endif
diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp
index ed29152759..7e5d0959de 100644
--- a/src/msw/dib.cpp
+++ b/src/msw/dib.cpp
@@ -41,7 +41,8 @@
#include
#include
#include
-#ifndef __MWERKS__
+
+#if !defined(__MWERKS__) && !defined(__SALFORDC__)
#include
#endif
diff --git a/src/msw/dibutils.cpp b/src/msw/dibutils.cpp
index f592823605..6921a92472 100644
--- a/src/msw/dibutils.cpp
+++ b/src/msw/dibutils.cpp
@@ -32,7 +32,7 @@
#include
#if defined(__WIN32__)
-#ifndef __MWERKS__
+#if !defined(__MWERKS__) && !defined(__SALFORDC__)
#include // for _fmemcpy()
#endif
#define _huge
@@ -133,7 +133,7 @@ int DibWriteFile(LPSTR szFile, LPBITMAPINFOHEADER lpbi)
bmf.bfReserved1 = 0;
bmf.bfReserved2 = 0;
bmf.bfOffBits = sizeof(bmf) + (char far*)(DibPtr(lpbi)) - (char far*)lpbi;
-#if defined( __WATCOMC__) || defined(_MSC_VER) || defined(__SC__)
+#if defined( __WATCOMC__) || defined(_MSC_VER) || defined(__SC__) || defined(__SALFORDC__)
if (_hwrite(fh, (LPCSTR)(&bmf), sizeof(bmf))<0 ||
_hwrite(fh, (LPCSTR)lpbi, size)<0) {
_lclose(fh);
diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp
index 4a97a16e14..30d397bf4f 100644
--- a/src/msw/filedlg.cpp
+++ b/src/msw/filedlg.cpp
@@ -32,7 +32,7 @@
#include
-#ifndef __WIN32__
+#if !defined(__WIN32__) || defined(__SALFORDC__)
#include
#endif
diff --git a/src/msw/fontdlg.cpp b/src/msw/fontdlg.cpp
index d2c23a9d41..69a1daa467 100644
--- a/src/msw/fontdlg.cpp
+++ b/src/msw/fontdlg.cpp
@@ -31,7 +31,7 @@
#include
-#ifndef __WIN32__
+#if !defined(__WIN32__) || defined(__SALFORDC__)
#include
#endif
diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp
index 6382aba2f9..090bf260e2 100644
--- a/src/msw/frame.cpp
+++ b/src/msw/frame.cpp
@@ -648,7 +648,7 @@ bool wxFrame::MSWOnPaint(void)
HDC cdc = BeginPaint((HWND) GetHWND(), &ps);
// Erase background before painting or we get white background
- this->MSWDefWindowProc(WM_ICONERASEBKGND,(WORD)ps.hdc,0L);
+ this->MSWDefWindowProc(WM_ICONERASEBKGND,(WORD)(LONG) ps.hdc,0L);
if (the_icon)
{
@@ -894,9 +894,14 @@ void wxFrame::OnMenuHighlight(wxMenuEvent& event)
wxMenuBar *menuBar = GetMenuBar();
if (menuBar)
{
- wxString helpString(menuBar->GetHelpString(event.GetMenuId()));
+// #ifndef __SALFORDC__
+ int menuId = event.GetMenuId();
+ wxString helpString;
+ // This causes a spurious access violation with Salford C++
+ helpString = menuBar->GetHelpString(menuId);
if (helpString != "")
- SetStatusText(helpString);
+ SetStatusText(helpString);
+// #endif
}
}
}
diff --git a/src/msw/gaugemsw.cpp b/src/msw/gaugemsw.cpp
index f2d9d22743..515dbe7b5d 100644
--- a/src/msw/gaugemsw.cpp
+++ b/src/msw/gaugemsw.cpp
@@ -655,7 +655,7 @@ void FAR PASCAL Draw3DLine(HDC hdc, WORD x, WORD y, WORD nLen,
/* get the includes we need */
-#ifndef __GNUWIN32__
+#if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
#include
#endif
#include
diff --git a/src/msw/imaglist.cpp b/src/msw/imaglist.cpp
index 4d969b52ab..7cdad3e830 100644
--- a/src/msw/imaglist.cpp
+++ b/src/msw/imaglist.cpp
@@ -29,6 +29,9 @@
#include "wx/dcclient.h"
#endif
+#include "wx/log.h"
+#include "wx/intl.h"
+
#include "wx/msw/imaglist.h"
#include "wx/msw/private.h"
diff --git a/src/msw/iniconf.cpp b/src/msw/iniconf.cpp
index 6676582e63..cc60785181 100644
--- a/src/msw/iniconf.cpp
+++ b/src/msw/iniconf.cpp
@@ -154,7 +154,7 @@ const wxString& wxIniConfig::GetPath() const
// always return abs path
s_str = wxCONFIG_PATH_SEPARATOR;
- if ( m_strGroup == (const char*) PATH_SEP_REPLACE ) {
+ if ( m_strGroup == wxString(PATH_SEP_REPLACE) ) {
// we're at the root level, nothing to do
}
else {
diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp
index d5348816b6..2b973f90d2 100644
--- a/src/msw/listbox.cpp
+++ b/src/msw/listbox.cpp
@@ -498,7 +498,7 @@ void wxListBox::SetSize(int x, int y, int width, int height, int sizeFlags)
int cx; // button font dimensions
int cy;
- wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, & this->GetFont());
float control_width, control_height, control_x, control_y;
diff --git a/src/msw/makefile.sl b/src/msw/makefile.sl
index 0bf8a3c46a..0259a517a5 100644
--- a/src/msw/makefile.sl
+++ b/src/msw/makefile.sl
@@ -5,75 +5,19 @@
#
# Makefile : Builds wxWindows library for Salford C++, WIN32
-# include $(WXDIR)\src\makesl.env
-
-FINAL=0
-SALFORDDIR=i:\salfordc
-
-.SUFFIXES:
-.SUFFIXES: .exe .obj .c .cc .cpp .res .rc .def .lib
-
-#WXDIR = d:\wx2\wxwind~1
-WXDIR = $(WXWIN)
-WXINC = $(WXDIR)\include
-
-# Suffixes
-OBJSUFF=obj
-SRCSUFF=cpp
-
-DEBUGFLAGS = /DEFINE __WXDEBUG__
-
-RC = src
-
-CCC = scc
-CC = scc
-MODEL =
-# If you use win95, assumptions will be made about Win95 icon format etc.
-# so nt_win is probably better for simultaneous Win32s/Win95/NT operation.
-LINKOPTION = nt_win # win95
-BINDCOMMAND = wrc
-WATLIBDIR = $(WATCOMDIR)\lib386\nt
-MINDATA =
-MAXDATA =
-STACK =
-# EXTRALIBS = $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\png.lib $(WXDIR)\lib\xpm.lib &
-# $(WATLIBDIR)\odbc32.lib $(WATLIBDIR)\comctl32.lib $(WATLIBDIR)\comdlg32.lib &
-# $(WATLIBDIR)\ole32.lib $(WATLIBDIR)\oleaut32.lib $(WATLIBDIR)\uuid.lib
-IFLAGS = /INCLUDE $(WXINC) /INCLUDE $(SALFORDDIR)\include
-#RESFLAGS1 = -r -bt=nt /i$(WXDIR)\include
-#RESFLAGS2 = -R $(name) /i$(WXDIR)\include
-
-OPTFLAGS=
-
-# /d1 for line numbers only: anything else produces an enormous wx32.lib
-CPPFLAGS = /WINDOWS /ERROR_NUMBERS /DELETE_OBJ_ON_ERROR /DEFINE WIN32 /DEFINE __WIN32__ /DEFINE __WIN95__ /DEFINE __WINDOWS__ /DEFINE __WXMSW__ /DEFINE __SALFORDC__ $(OPTFLAGS) $(DEBUGFLAGS) $(EXTRACPPFLAGS)
-
-#.cpp.obj:
-# echo Compiling!
-# $(CCC) $(CPPFLAGS) $(IFLAGS) $@ $*.cpp
-
-#.c.obj: # $< # .AUTODEPEND
-# $(CC) $(CPPFLAGS) $(IFLAGS) $@ $*.cpp
-
-
-
-WXLIB = $(WXDIR)\lib
+include ..\makesl.env
LIBTARGET = $(WXLIB)\wx.lib
-DUMMY=dummydll
-# ODBCLIB = ..\..\contrib\odbc\odbc32.lib
-
-EXTRATARGETS = xpm png zlib
-EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib
+EXTRATARGETS = # xpm png zlib
+EXTRATARGETSCLEAN = # clean_xpm clean_png clean_zlib
GENDIR=$(WXDIR)\src\generic
COMMDIR=$(WXDIR)\src\common
XPMDIR=$(WXDIR)\src\xpm
OLEDIR=ole
MSWDIR=$(WXDIR)\src\msw
-DOCDIR = $(WXDIR)\docs
-
GENERICOBJS= choicdgg.obj \
+ dirdlgg.obj \
gridg.obj \
laywin.obj \
panelg.obj \
@@ -116,7 +60,6 @@ COMMONOBJS = cmndata.obj \
layout.obj \
log.obj \
memory.obj \
- mimetype.obj \
module.obj \
object.obj \
prntbase.obj \
@@ -156,6 +99,7 @@ COMMONOBJS = cmndata.obj \
wincmn.obj
# Can't compile these yet under Salford C++
+# mimetype.obj \
# odbc.obj \
# db.obj \
# dbtable.obj \
@@ -187,7 +131,6 @@ MSWOBJS = \
dialog.obj \
dib.obj \
dibutils.obj \
- dirdlg.obj \
filedlg.obj \
font.obj \
fontdlg.obj \
@@ -242,10 +185,12 @@ MSWOBJS = \
utils.obj \
utilsexc.obj \
wave.obj \
- window.obj \
- xpmhand.obj
+ window.obj
+# No OLE functions for wxDirDialog: use generic one instead
+# dirdlg.obj \
# pnghand.obj \
+# xpmhand.obj \
OLEOBJS = \
droptgt.obj \
@@ -256,23 +201,18 @@ OLEOBJS = \
automtn.obj
# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
-OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(OLEOBJS)
+OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) # $(OLEOBJS)
all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS)
$(LIBTARGET) : $(OBJECTS)
- %create tmp.lnk
- @%append tmp.lnk archive $(LIBTARGET)
- @for %i in ( $(OBJECTS) ) do @%append tmp.lnk addobj %i
- @%append file
- slink @tmp.lnk
+ slink $$salford.lnk
clean: $(EXTRATARGETSCLEAN)
-erase *.obj
-erase $(LIBTARGET)
-erase *.pch
-erase *.err
- -erase *.lnk
cleanall: clean
@@ -383,12 +323,18 @@ gaugemsw.obj: $(MSWDIR)\gaugemsw.cpp
gdiobj.obj: $(MSWDIR)\gdiobj.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\gdiobj.cpp /BINARY gdiobj.obj
+helpwin.obj: $(MSWDIR)\helpwin.cpp
+ $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\helpwin.cpp /BINARY helpwin.obj
+
icon.obj: $(MSWDIR)\icon.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\icon.cpp /BINARY icon.obj
imaglist.obj: $(MSWDIR)\imaglist.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\imaglist.cpp /BINARY imaglist.obj
+iniconf.obj: $(MSWDIR)\iniconf.cpp
+ $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\iniconf.cpp /BINARY iniconf.obj
+
joystick.obj: $(MSWDIR)\joystick.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\joystick.cpp /BINARY joystick.obj
@@ -417,7 +363,7 @@ minifram.obj: $(MSWDIR)\minifram.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\minifram.cpp /BINARY minifram.obj
msgdlg.obj: $(MSWDIR)\msgdlg.cpp
- $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\msgdlg.cpp /BINARY mdgdlg.obj
+ $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\msgdlg.cpp /BINARY msgdlg.obj
nativdlg.obj: $(MSWDIR)\nativdlg.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\nativdlg.cpp /BINARY nativdlg.obj
@@ -471,7 +417,7 @@ slidrmsw.obj: $(MSWDIR)\slidrmsw.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\slidrmsw.cpp /BINARY slidrmsw.obj
slider95.obj: $(MSWDIR)\slider95.cpp
- $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\slider95.cpp /BINARY slider.obj
+ $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\slider95.cpp /BINARY slider95.obj
spinbutt.obj: $(MSWDIR)\spinbutt.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\spinbutt.cpp /BINARY spinbutt.obj
@@ -683,7 +629,7 @@ sckipc.obj: $(COMMDIR)\sckipc.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\sckipc.cpp /BINARY sckipc.obj
sckstrm.obj: $(COMMDIR)\sckstrm.cpp
- $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\sckstrm.cpp /BINARY sockstrm.obj
+ $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\sckstrm.cpp /BINARY sckstrm.obj
url.obj: $(COMMDIR)\url.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\url.cpp /BINARY url.obj
@@ -701,7 +647,7 @@ matrix.obj: $(COMMDIR)\matrix.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\matrix.cpp /BINARY matrix.obj
time.obj: $(COMMDIR)\time.cpp
- $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\time.cpp /BINARY timer.obj
+ $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\time.cpp /BINARY time.obj
stream.obj: $(COMMDIR)\stream.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\stream.cpp /BINARY stream.obj
@@ -743,6 +689,9 @@ choicdgg.obj: $(GENDIR)\choicdgg.cpp
colrdlgg.obj: $(GENDIR)\colrdgg.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\colrdgg.cpp /BINARY colordgg.obj
+dirdlgg.obj: $(GENDIR)\dirdlgg.cpp
+ $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\dirdlgg.cpp /BINARY dirdlgg.obj
+
fontdlgg.obj: $(GENDIR)\fontdlgg.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\fontdlgg.cpp /BINARY fontdlgg.obj
@@ -911,9 +860,7 @@ zutil.obj: zutil.c zutil.h zlib.h zconf.h
y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
- $(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
-
-# *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
+ $(CC) /ANSI_C $(CPPFLAGS) $(IFLAGS) /DEFINE USE_DEFINE $(COMMDIR)\y_tab.c /BINARY y_tab.obj
$(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
@@ -921,32 +868,32 @@ $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
$(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
-xpm: .SYMBOLIC
+xpm:
cd $(WXDIR)\src\xpm
wmake -f makefile.wat all
cd $(WXDIR)\src\msw
-clean_xpm: .SYMBOLIC
+clean_xpm:
cd $(WXDIR)\src\xpm
wmake -f makefile.wat clean
cd $(WXDIR)\src\msw
-png: .SYMBOLIC
+png:
cd $(WXDIR)\src\png
wmake -f makefile.wat all
cd $(WXDIR)\src\msw
-clean_png: .SYMBOLIC
+clean_png:
cd $(WXDIR)\src\png
wmake -f makefile.wat clean
cd $(WXDIR)\src\msw
-zlib: .SYMBOLIC
+zlib:
cd $(WXDIR)\src\zlib
wmake -f makefile.wat all
cd $(WXDIR)\src\msw
-clean_zlib: .SYMBOLIC
+clean_zlib:
cd $(WXDIR)\src\zlib
wmake -f makefile.wat clean
cd $(WXDIR)\src\msw
diff --git a/src/msw/makefile.wat b/src/msw/makefile.wat
index af97828765..a125464921 100644
--- a/src/msw/makefile.wat
+++ b/src/msw/makefile.wat
@@ -335,12 +335,18 @@ gaugemsw.obj: $(MSWDIR)\gaugemsw.cpp
gdiobj.obj: $(MSWDIR)\gdiobj.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+helpwin.obj: $(MSWDIR)\helpwin.cpp
+ *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
icon.obj: $(MSWDIR)\icon.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
imaglist.obj: $(MSWDIR)\imaglist.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+iniconf.obj: $(MSWDIR)\iniconf.cpp
+ *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
joystick.obj: $(MSWDIR)\joystick.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp
index 6809100b60..2278e11d3f 100644
--- a/src/msw/menu.cpp
+++ b/src/msw/menu.cpp
@@ -486,8 +486,10 @@ void wxMenu::SetHelpString(int itemId, const wxString& helpString)
wxString wxMenu::GetHelpString (int itemId) const
{
wxMenuItem *item = FindItemForId (itemId);
- wxString str("");
- return (item == NULL) ? str : item->GetHelp();
+ if (item)
+ return item->GetHelp();
+ else
+ return wxEmptyString;
}
void wxMenu::ProcessCommand(wxCommandEvent & event)
diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp
index e56a02e039..916819d272 100644
--- a/src/msw/menuitem.cpp
+++ b/src/msw/menuitem.cpp
@@ -33,6 +33,14 @@
#include
+#ifdef GetClassInfo
+#undef GetClassInfo
+#endif
+
+#ifdef GetClassName
+#undef GetClassName
+#endif
+
// ============================================================================
// implementation
// ============================================================================
diff --git a/src/msw/metafile.cpp b/src/msw/metafile.cpp
index 921cac0ab5..d750762bb6 100644
--- a/src/msw/metafile.cpp
+++ b/src/msw/metafile.cpp
@@ -72,7 +72,7 @@ wxMetafile::wxMetafile(const wxString& file)
M_METAFILEDATA->m_windowsMappingMode = MM_ANISOTROPIC;
M_METAFILEDATA->m_metafile = 0;
- if (!file.IsNull() && file == "")
+ if (!file.IsNull() && (file.Cmp("") == 0))
M_METAFILEDATA->m_metafile = (WXHANDLE) GetMetaFile(file);
}
diff --git a/src/msw/minifram.cpp b/src/msw/minifram.cpp
index 8192f20092..cabb6e5ede 100644
--- a/src/msw/minifram.cpp
+++ b/src/msw/minifram.cpp
@@ -89,7 +89,7 @@ wxMiniFrame::~wxMiniFrame(void)
#include
-#if !defined( __WATCOMC__ ) && !defined( __MWERKS__ )
+#if !defined( __WATCOMC__ ) && !defined( __MWERKS__ ) && !defined(__SALFORDC__)
#include
#endif
diff --git a/src/msw/printwin.cpp b/src/msw/printwin.cpp
index 31cf9641ce..f66d48fde2 100644
--- a/src/msw/printwin.cpp
+++ b/src/msw/printwin.cpp
@@ -172,7 +172,7 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt
wxWindow *win = CreateAbortWindow(parent, printout);
wxYield();
-#if defined(__BORLANDC__) || defined(__GNUWIN32__) || !defined(__WIN32__)
+#if defined(__BORLANDC__) || defined(__GNUWIN32__) || defined(__SALFORDC__) || !defined(__WIN32__)
::SetAbortProc((HDC) dc->GetHDC(), (FARPROC) m_lpAbortProc);
#else
::SetAbortProc((HDC) dc->GetHDC(), (int (_stdcall *)
diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp
index dd9e9421fa..87a1f95af0 100644
--- a/src/msw/radiobox.cpp
+++ b/src/msw/radiobox.cpp
@@ -409,7 +409,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
int current_width, cyf;
int cx1,cy1 ;
- wxGetCharSize(m_hWnd, &cx1, &cy1, & GetFont());
+ wxGetCharSize(m_hWnd, &cx1, &cy1, & this->GetFont());
// Attempt to have a look coherent with other platforms:
// We compute the biggest toggle dim, then we align all
// items according this value.
@@ -425,7 +425,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
{
// It's a labelled toggle
GetWindowText((HWND) m_radioButtons[i], buf, 300);
- GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL, & GetFont());
+ GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL, & this->GetFont());
eachWidth = (int)(current_width + RADIO_SIZE);
eachHeight = (int)((3*cyf)/2);
}
@@ -505,7 +505,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
{
// It's a labeled item
GetWindowText((HWND) m_radioButtons[i], buf, 300);
- GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL, & GetFont());
+ GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL, & this->GetFont());
// How do we find out radio button bitmap size!!
// By adjusting them carefully, manually :-)
diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp
index be2195e2bc..eb067a09a3 100644
--- a/src/msw/radiobut.cpp
+++ b/src/msw/radiobut.cpp
@@ -115,7 +115,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
if (label != "")
{
int label_width, label_height;
- GetTextExtent(label, &label_width, &label_height, NULL, NULL, & GetFont());
+ GetTextExtent(label, &label_width, &label_height, NULL, NULL, & this->GetFont());
if (width < 0)
width = (int)(label_width + RADIO_SIZE);
if (height<0)
diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp
index 9047d9bd7c..f572ef6eeb 100644
--- a/src/msw/slider95.cpp
+++ b/src/msw/slider95.cpp
@@ -370,7 +370,7 @@ void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags)
int cy;
int cyf;
- wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, & this->GetFont());
if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL)
{
@@ -379,12 +379,12 @@ void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags)
int min_len = 0;
GetWindowText((HWND) m_staticMin, buf, 300);
- GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & GetFont());
+ GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & this->GetFont());
int max_len = 0;
GetWindowText((HWND) m_staticMax, buf, 300);
- GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & GetFont());
+ GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & this->GetFont());
if (m_staticValue)
{
int new_width = (int)(wxMax(min_len, max_len));
@@ -440,11 +440,11 @@ void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags)
{
int min_len;
GetWindowText((HWND) m_staticMin, buf, 300);
- GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & GetFont());
+ GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & this->GetFont());
int max_len;
GetWindowText((HWND) m_staticMax, buf, 300);
- GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & GetFont());
+ GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & this->GetFont());
if (m_staticValue)
{
diff --git a/src/msw/slidrmsw.cpp b/src/msw/slidrmsw.cpp
index 452f520fa6..3ce6a0b075 100644
--- a/src/msw/slidrmsw.cpp
+++ b/src/msw/slidrmsw.cpp
@@ -342,7 +342,7 @@ void wxSliderMSW::SetSize(int x, int y, int width, int height, int sizeFlags)
int cy;
int cyf;
- wxGetCharSize(GetHWND(), &cx, &cy,& GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy,& this->GetFont());
if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL)
{
@@ -351,12 +351,12 @@ void wxSliderMSW::SetSize(int x, int y, int width, int height, int sizeFlags)
int min_len = 0;
GetWindowText((HWND) m_staticMin, buf, 300);
- GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & GetFont());
+ GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & this->GetFont());
int max_len = 0;
GetWindowText((HWND) m_staticMax, buf, 300);
- GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & GetFont());
+ GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & this->GetFont());
if (m_staticValue)
{
int new_width = (int)(wxMax(min_len, max_len));
@@ -402,11 +402,11 @@ void wxSliderMSW::SetSize(int x, int y, int width, int height, int sizeFlags)
{
int min_len;
GetWindowText((HWND) m_staticMin, buf, 300);
- GetTextExtent(buf, &min_len, &cyf,NULL,NULL,& GetFont());
+ GetTextExtent(buf, &min_len, &cyf,NULL,NULL,& this->GetFont());
int max_len;
GetWindowText((HWND) m_staticMax, buf, 300);
- GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & GetFont());
+ GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & this->GetFont());
if (m_staticValue)
{
diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp
index eb82270972..0be462b295 100644
--- a/src/msw/statbox.cpp
+++ b/src/msw/statbox.cpp
@@ -131,10 +131,10 @@ void wxStaticBox::SetSize(int x, int y, int width, int height, int sizeFlags)
int cy;
int cyf;
- wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, & this->GetFont());
GetTextExtent(wxGetWindowText(m_hWnd), ¤t_width, &cyf,
- NULL,NULL, & GetFont());
+ NULL,NULL, & this->GetFont());
if ( w1 < 0 )
w1 = current_width + 3*cx;
if ( h1 < 0 )
diff --git a/src/msw/statbr95.cpp b/src/msw/statbr95.cpp
index 5f98b77180..1499d2463e 100644
--- a/src/msw/statbr95.cpp
+++ b/src/msw/statbr95.cpp
@@ -30,7 +30,6 @@
#ifdef __WIN95__
#include "wx/log.h"
-
#include "wx/generic/statusbr.h"
#include "wx/msw/statbr95.h"
@@ -41,6 +40,14 @@
#include
#endif
+#ifdef GetClassInfo
+#undef GetClassInfo
+#endif
+
+#ifdef GetClassName
+#undef GetClassName
+#endif
+
#if wxUSE_NATIVE_STATUSBAR
#if !USE_SHARED_LIBRARY
diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp
index 5c9a0cfea5..47638caa1b 100644
--- a/src/msw/stattext.cpp
+++ b/src/msw/stattext.cpp
@@ -116,7 +116,7 @@ void wxStaticText::SetSize(int x, int y, int width, int height, int sizeFlags)
int cyf;
::GetWindowText((HWND) GetHWND(), buf, 300);
- GetTextExtent(buf, ¤t_width, &cyf, NULL, NULL, & GetFont());
+ GetTextExtent(buf, ¤t_width, &cyf, NULL, NULL, & this->GetFont());
int ww, hh;
GetSize(&ww, &hh);
@@ -128,7 +128,7 @@ void wxStaticText::SetSize(int x, int y, int width, int height, int sizeFlags)
{
int cx;
int cy;
- wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, & this->GetFont());
actualWidth = (int)(current_width + cx) ;
}
@@ -161,7 +161,7 @@ void wxStaticText::SetLabel(const wxString& label)
::ScreenToClient((HWND) parent->GetHWND(), &point);
}
- GetTextExtent(label, &w, &h, NULL, NULL, & GetFont());
+ GetTextExtent(label, &w, &h, NULL, NULL, & this->GetFont());
MoveWindow((HWND) GetHWND(), point.x, point.y, (int)(w + 10), (int)h,
TRUE);
SetWindowText((HWND) GetHWND(), (const char *)label);
diff --git a/src/msw/tabctrl.cpp b/src/msw/tabctrl.cpp
index 0a83802f7b..6f0a4dd47f 100644
--- a/src/msw/tabctrl.cpp
+++ b/src/msw/tabctrl.cpp
@@ -26,7 +26,7 @@
#if defined(__WIN95__)
-#ifndef __GNUWIN32__
+#if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
#include "malloc.h"
#endif
diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp
index 68c7ac60aa..809c2b7af8 100644
--- a/src/msw/taskbar.cpp
+++ b/src/msw/taskbar.cpp
@@ -39,6 +39,10 @@
#include
#endif
+#ifdef __SALFORDC__
+#include
+#endif
+
LRESULT APIENTRY _EXPORT wxTaskBarIconWindowProc( HWND hWnd, unsigned msg,
UINT wParam, LONG lParam );
diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp
index 83347ece08..fbf1a2848a 100644
--- a/src/msw/tbar95.cpp
+++ b/src/msw/tbar95.cpp
@@ -26,7 +26,7 @@
#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR && defined(__WIN95__)
-#ifndef __GNUWIN32__
+#if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
#include "malloc.h"
#endif
diff --git a/src/msw/tbarmsw.cpp b/src/msw/tbarmsw.cpp
index cfbe78c95d..625cfafd02 100644
--- a/src/msw/tbarmsw.cpp
+++ b/src/msw/tbarmsw.cpp
@@ -26,13 +26,14 @@
#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR
-#ifndef __GNUWIN32__
+#if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
#include "malloc.h"
#endif
-#ifndef __MWERKS__
+#if !defined(__MWERKS__) && !defined(__SALFORDC__)
#include
#endif
+
#include
#include "wx/tbarmsw.h"
diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp
index 614be2e193..0d1a52dc6f 100644
--- a/src/msw/textctrl.cpp
+++ b/src/msw/textctrl.cpp
@@ -56,7 +56,7 @@
#if defined(__BORLANDC__) && !defined(__WIN32__)
#include
#else
-#ifndef __GNUWIN32__
+#if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
#include
#endif
#define farmalloc malloc
@@ -335,7 +335,7 @@ void wxTextCtrl::SetSize(int x, int y, int width, int height, int sizeFlags)
int cx; // button font dimensions
int cy;
- wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, & this->GetFont());
int control_width, control_height, control_x, control_y;
@@ -535,9 +535,16 @@ bool wxTextCtrl::LoadFile(const wxString& file)
// positions as signed shorts. Now load in one chunk...
// Note use of 'farmalloc' as in Borland 3.1 'size_t' is 16-bits...
+#ifdef __SALFORDC__
+ struct _stat stat_buf;
+ if (stat((char*) (const char*) file, &stat_buf) < 0)
+ return FALSE;
+#else
struct stat stat_buf;
if (stat(file, &stat_buf) < 0)
return FALSE;
+#endif
+
// char *tmp_buffer = (char*)farmalloc(stat_buf.st_size+1);
// This may need to be a bigger buffer than the file size suggests,
// if it's a UNIX file. Give it an extra 1000 just in case.
diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp
index 07b86000b9..f33b099016 100644
--- a/src/msw/treectrl.cpp
+++ b/src/msw/treectrl.cpp
@@ -34,7 +34,9 @@
#if defined(__WIN95__)
#include "wx/log.h"
+#include "wx/dynarray.h"
#include "wx/imaglist.h"
+#include "wx/msw/treectrl.h"
#include "wx/msw/private.h"
@@ -58,8 +60,6 @@
#undef GetClassInfo
#endif
-#include "wx/msw/treectrl.h"
-
// Bug in headers, sometimes
#ifndef TVIS_FOCUSED
#define TVIS_FOCUSED 0x0001
diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp
index 877a9b4aca..c12877f753 100644
--- a/src/msw/utils.cpp
+++ b/src/msw/utils.cpp
@@ -34,8 +34,9 @@
#include
-#ifndef __GNUWIN32__
+#if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
#include
+
#ifndef __MWERKS__
#include
#endif
@@ -981,7 +982,7 @@ To download dbwin32, see e.g.:
http://ftp.digital.com/pub/micro/NT/WinSite/programr/dbwin32.zip
*/
-#ifndef __MWERKS__
+#if !defined(__MWERKS__) && !defined(__SALFORDC__)
#include
#endif
@@ -1060,7 +1061,7 @@ void OutputDebugStringW95(const char* lpOutputString, ...)
WaitForSingleObject(heventDBWIN, INFINITE);
/* write it to the shared memory */
-#if defined( __BORLANDC__ ) || defined( __MWERKS__ )
+#if defined( __BORLANDC__ ) || defined( __MWERKS__ ) || defined(__SALFORDC__)
*((LPDWORD)lpszSharedMem) = getpid();
#else
*((LPDWORD)lpszSharedMem) = _getpid();
diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp
index 25edebce1d..4cf07e8861 100644
--- a/src/msw/utilsexc.cpp
+++ b/src/msw/utilsexc.cpp
@@ -33,7 +33,7 @@
#include
-#ifndef __GNUWIN32__
+#if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
#include
#ifndef __MWERKS__
#include
diff --git a/src/msw/window.cpp b/src/msw/window.cpp
index 9d1f5e24e1..45ca481c75 100644
--- a/src/msw/window.cpp
+++ b/src/msw/window.cpp
@@ -125,7 +125,7 @@ wxWindow *wxWindow::FindItem(int id) const
if (childWin->IsKindOf(CLASSINFO(wxControl)))
{
wxControl *item = (wxControl *)childWin;
- if (item->m_windowId == id)
+ if (item->GetId() == id)
return item;
else
{
@@ -3102,10 +3102,14 @@ bool wxWindow::MSWOnEraseBkgnd (WXHDC pDC)
void wxWindow::OnEraseBackground(wxEraseEvent& event)
{
+ if (!GetHWND())
+ return;
+
RECT rect;
::GetClientRect((HWND) GetHWND(), &rect);
- HBRUSH hBrush = ::CreateSolidBrush(PALETTERGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue()));
+ COLORREF ref = PALETTERGB(m_backgroundColour.Red(), m_backgroundColour.Green(), m_backgroundColour.Blue()) ;
+ HBRUSH hBrush = ::CreateSolidBrush(ref);
int mode = ::SetMapMode((HDC) event.GetDC()->GetHDC(), MM_TEXT);
// ::GetClipBox((HDC) event.GetDC()->GetHDC(), &rect);