From 0b9ab0bd824b6b9c93849928d67de1ec71e7c167 Mon Sep 17 00:00:00 2001 From: Ron Lee Date: Wed, 19 Dec 2001 07:09:58 +0000 Subject: [PATCH] Added new dynamic loading classes. (which handle proper wxRTTI and wxModule initialisation and unloading) Removed serialisation code from wxObject and elsewhere. Added USER_EXPORTED hash and list macros. Added *_PLUGGABLE_CLASS defines for exporting dynamic wxObjects from dlls. ---------------------------------------------------------------------- Modified Files: Makefile.in configure configure.in setup.h.in debian/changelog distrib/msw/tmake/filelist.txt include/wx/defs.h include/wx/docview.h include/wx/dynlib.h include/wx/fileconf.h include/wx/hash.h include/wx/list.h include/wx/module.h include/wx/object.h include/wx/resource.h include/wx/stream.h include/wx/gtk/setup0.h include/wx/msw/setup0.h src/files.lst src/wxBase.dsp src/wxUniv.dsp src/wxWindows.dsp src/common/dynlib.cpp src/common/filename.cpp src/common/module.cpp src/common/object.cpp src/common/stream.cpp src/gtk/files.lst src/mac/files.lst src/mgl/files.lst src/mgl/makefile.wat src/motif/files.lst src/msw/dialup.cpp src/msw/files.lst src/msw/helpchm.cpp src/msw/makefile.b32 src/msw/makefile.bcc src/msw/makefile.dos src/msw/makefile.g95 src/msw/makefile.sc src/msw/makefile.vc src/msw/makefile.wat src/os2/files.lst src/univ/files.lst Added Files: include/wx/dynload.h src/common/dynload.cpp Removed Files: include/wx/objstrm.h include/wx/serbase.h src/common/objstrm.cpp src/common/serbase.cpp utils/serialize/.cvsignore utils/serialize/makefile.b32 utils/serialize/sercore.cpp utils/serialize/sercore.h utils/serialize/serctrl.cpp utils/serialize/serctrl.h utils/serialize/serext.cpp utils/serialize/serext.h utils/serialize/sergdi.cpp utils/serialize/sergdi.h utils/serialize/sermain.cpp utils/serialize/serwnd.cpp utils/serialize/serwnd.h ---------------------------------------------------------------------- git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- Makefile.in | 4 + configure | 620 +++++++++++++++++---------------- configure.in | 25 +- debian/changelog | 7 + distrib/msw/tmake/filelist.txt | 8 +- include/wx/defs.h | 17 + include/wx/docview.h | 5 - include/wx/dynlib.h | 13 +- include/wx/dynload.h | 207 +++++++++++ include/wx/fileconf.h | 1 + include/wx/gtk/setup0.h | 12 +- include/wx/gtk1/setup0.h | 12 +- include/wx/hash.h | 3 + include/wx/list.h | 8 + include/wx/module.h | 15 +- include/wx/msw/setup0.h | 9 +- include/wx/object.h | 444 ++++++++++++++--------- include/wx/objstrm.h | 90 ----- include/wx/resource.h | 4 +- include/wx/serbase.h | 67 ---- include/wx/stream.h | 6 - setup.h.in | 8 +- src/common/dynlib.cpp | 207 +++++------ src/common/dynload.cpp | 598 +++++++++++++++++++++++++++++++ src/common/filename.cpp | 42 +-- src/common/module.cpp | 5 + src/common/object.cpp | 334 +++++------------- src/common/objstrm.cpp | 326 ----------------- src/common/serbase.cpp | 126 ------- src/common/stream.cpp | 22 -- src/files.lst | 11 +- src/gtk/files.lst | 11 +- src/gtk1/files.lst | 11 +- src/mac/carbon/files.lst | 11 +- src/mac/files.lst | 11 +- src/mgl/files.lst | 11 +- src/mgl/makefile.wat | 14 +- src/motif/files.lst | 11 +- src/msw/dialup.cpp | 15 +- src/msw/files.lst | 11 +- src/msw/helpchm.cpp | 5 +- src/msw/makefile.b32 | 11 +- src/msw/makefile.bcc | 11 +- src/msw/makefile.dos | 20 +- src/msw/makefile.g95 | 7 +- src/msw/makefile.sc | 5 +- src/msw/makefile.vc | 5 +- src/msw/makefile.wat | 14 +- src/os2/files.lst | 21 +- src/univ/files.lst | 2 +- src/wxBase.dsp | 24 +- src/wxUniv.dsp | 24 +- src/wxWindows.dsp | 151 +++----- utils/serialize/.cvsignore | 3 - utils/serialize/makefile.b32 | 58 --- utils/serialize/sercore.cpp | 107 ------ utils/serialize/sercore.h | 24 -- utils/serialize/serctrl.cpp | 478 ------------------------- utils/serialize/serctrl.h | 52 --- utils/serialize/serext.cpp | 137 -------- utils/serialize/serext.h | 26 -- utils/serialize/sergdi.cpp | 334 ------------------ utils/serialize/sergdi.h | 37 -- utils/serialize/sermain.cpp | 27 -- utils/serialize/serwnd.cpp | 498 -------------------------- utils/serialize/serwnd.h | 57 --- 66 files changed, 1840 insertions(+), 3660 deletions(-) create mode 100644 include/wx/dynload.h delete mode 100644 include/wx/objstrm.h delete mode 100644 include/wx/serbase.h create mode 100644 src/common/dynload.cpp delete mode 100644 src/common/objstrm.cpp delete mode 100644 src/common/serbase.cpp delete mode 100644 utils/serialize/.cvsignore delete mode 100644 utils/serialize/makefile.b32 delete mode 100644 utils/serialize/sercore.cpp delete mode 100644 utils/serialize/sercore.h delete mode 100644 utils/serialize/serctrl.cpp delete mode 100644 utils/serialize/serctrl.h delete mode 100644 utils/serialize/serext.cpp delete mode 100644 utils/serialize/serext.h delete mode 100644 utils/serialize/sergdi.cpp delete mode 100644 utils/serialize/sergdi.h delete mode 100644 utils/serialize/sermain.cpp delete mode 100644 utils/serialize/serwnd.cpp delete mode 100644 utils/serialize/serwnd.h diff --git a/Makefile.in b/Makefile.in index 505275cb01..395dd25cb4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1311,6 +1311,7 @@ MANUAL_DIST: PYTHON_DIST: mkdir $(DISTDIR)/wxPython mkdir $(DISTDIR)/wxPython/contrib + mkdir $(DISTDIR)/wxPython/contrib/dllwidget mkdir $(DISTDIR)/wxPython/contrib/gizmos mkdir $(DISTDIR)/wxPython/contrib/glcanvas mkdir $(DISTDIR)/wxPython/contrib/glcanvas/gtk @@ -1325,6 +1326,7 @@ PYTHON_DIST: mkdir $(DISTDIR)/wxPython/src/gtk mkdir $(DISTDIR)/wxPython/wxPython mkdir $(DISTDIR)/wxPython/wxPython/lib + mkdir $(DISTDIR)/wxPython/wxPython/lib/PyCrust mkdir $(DISTDIR)/wxPython/wxPython/lib/editor mkdir $(DISTDIR)/wxPython/wxPython/lib/mixins @@ -1332,6 +1334,7 @@ PYTHON_DIST: cp $(WXDIR)/wxPython/*.py $(DISTDIR)/wxPython cp $(WXDIR)/wxPython/setup.cfg $(DISTDIR)/wxPython cp $(WXDIR)/wxPython/MANIFEST.in $(DISTDIR)/wxPython + cp $(WXDIR)/wxPython/contrib/dllwidget/*.{py,cpp,h,i} $(DISTDIR)/wxPython/contrib/dllwidget cp $(WXDIR)/wxPython/contrib/gizmos/*.{py,cpp,i} $(DISTDIR)/wxPython/contrib/gizmos -cp $(WXDIR)/wxPython/contrib/glcanvas/* $(DISTDIR)/wxPython/contrib/glcanvas cp $(WXDIR)/wxPython/contrib/glcanvas/gtk/glcanvas.* $(DISTDIR)/wxPython/contrib/glcanvas/gtk @@ -1346,6 +1349,7 @@ PYTHON_DIST: cp $(WXDIR)/wxPython/src/gtk/*.py $(DISTDIR)/wxPython/src/gtk cp $(WXDIR)/wxPython/src/gtk/*.cpp $(DISTDIR)/wxPython/src/gtk cp $(WXDIR)/wxPython/wxPython/lib/*.py $(DISTDIR)/wxPython/wxPython/lib + cp $(WXDIR)/wxPython/wxPython/lib/PyCrust/*.py $(DISTDIR)/wxPython/wxPython/lib/PyCrust cp $(WXDIR)/wxPython/wxPython/lib/editor/*.py $(DISTDIR)/wxPython/wxPython/lib/editor cp $(WXDIR)/wxPython/wxPython/lib/mixins/*.py $(DISTDIR)/wxPython/wxPython/lib/mixins diff --git a/configure b/configure index 6f8501d301..7626cd37a7 100755 --- a/configure +++ b/configure @@ -152,6 +152,8 @@ ac_help="$ac_help --enable-fraction use wxFraction class" ac_help="$ac_help --enable-dynlib use wxLibrary class for DLL loading" +ac_help="$ac_help + --enable-dynamicloader use (new) wxDynamicLibrary class" ac_help="$ac_help --enable-longlong use wxLongLong class" ac_help="$ac_help @@ -194,8 +196,6 @@ ac_help="$ac_help --enable-sysoptions use wxSystemOptions" ac_help="$ac_help --enable-threads use threads" -ac_help="$ac_help - --enable-serial use class serialization" ac_help="$ac_help --enable-docview use document view architecture" ac_help="$ac_help @@ -1463,9 +1463,9 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_STREAMS=no DEFAULT_wxUSE_SOCKETS=no DEFAULT_wxUSE_DIALUP_MANAGER=no - DEFAULT_wxUSE_SERIAL=no DEFAULT_wxUSE_JOYSTICK=no DEFAULT_wxUSE_DYNLIB_CLASS=no + DEFAULT_wxUSE_DYNAMIC_LOADER=no DEFAULT_wxUSE_LONGLONG=no DEFAULT_wxUSE_GEOMETRY=no @@ -1627,9 +1627,9 @@ else DEFAULT_wxUSE_STREAMS=yes DEFAULT_wxUSE_SOCKETS=yes DEFAULT_wxUSE_DIALUP_MANAGER=yes - DEFAULT_wxUSE_SERIAL=yes DEFAULT_wxUSE_JOYSTICK=yes - DEFAULT_wxUSE_DYNLIB_CLASS=yes + DEFAULT_wxUSE_DYNLIB_CLASS=no + DEFAULT_wxUSE_DYNAMIC_LOADER=yes DEFAULT_wxUSE_LONGLONG=yes DEFAULT_wxUSE_GEOMETRY=yes @@ -3535,8 +3535,47 @@ fi fi + echo $ac_n "checking for --enable-dynamicloader""... $ac_c" 1>&6 +echo "configure:3540: checking for --enable-dynamicloader" >&5 + no_cache=0 + # Check whether --enable-dynamicloader or --disable-dynamicloader was given. +if test "${enable_dynamicloader+set}" = set; then + enableval="$enable_dynamicloader" + + if test "$enableval" = yes; then + ac_cv_use_dynamicloader='wxUSE_DYNAMIC_LOADER=yes' + else + ac_cv_use_dynamicloader='wxUSE_DYNAMIC_LOADER=no' + fi + +else + + LINE=`grep "wxUSE_DYNAMIC_LOADER" ${wx_arg_cache_file}` + if test "x$LINE" != x ; then + eval "DEFAULT_$LINE" + else + no_cache=1 + fi + + ac_cv_use_dynamicloader='wxUSE_DYNAMIC_LOADER='$DEFAULT_wxUSE_DYNAMIC_LOADER + +fi + + + eval "$ac_cv_use_dynamicloader" + if test "$no_cache" != 1; then + echo $ac_cv_use_dynamicloader >> ${wx_arg_cache_file}.tmp + fi + + if test "$wxUSE_DYNAMIC_LOADER" = yes; then + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + echo $ac_n "checking for --enable-longlong""... $ac_c" 1>&6 -echo "configure:3540: checking for --enable-longlong" >&5 +echo "configure:3579: checking for --enable-longlong" >&5 no_cache=0 # Check whether --enable-longlong or --disable-longlong was given. if test "${enable_longlong+set}" = set; then @@ -3575,7 +3614,7 @@ fi echo $ac_n "checking for --enable-geometry""... $ac_c" 1>&6 -echo "configure:3579: checking for --enable-geometry" >&5 +echo "configure:3618: checking for --enable-geometry" >&5 no_cache=0 # Check whether --enable-geometry or --disable-geometry was given. if test "${enable_geometry+set}" = set; then @@ -3614,7 +3653,7 @@ fi echo $ac_n "checking for --enable-log""... $ac_c" 1>&6 -echo "configure:3618: checking for --enable-log" >&5 +echo "configure:3657: checking for --enable-log" >&5 no_cache=0 # Check whether --enable-log or --disable-log was given. if test "${enable_log+set}" = set; then @@ -3653,7 +3692,7 @@ fi echo $ac_n "checking for --enable-streams""... $ac_c" 1>&6 -echo "configure:3657: checking for --enable-streams" >&5 +echo "configure:3696: checking for --enable-streams" >&5 no_cache=0 # Check whether --enable-streams or --disable-streams was given. if test "${enable_streams+set}" = set; then @@ -3692,7 +3731,7 @@ fi echo $ac_n "checking for --enable-file""... $ac_c" 1>&6 -echo "configure:3696: checking for --enable-file" >&5 +echo "configure:3735: checking for --enable-file" >&5 no_cache=0 # Check whether --enable-file or --disable-file was given. if test "${enable_file+set}" = set; then @@ -3731,7 +3770,7 @@ fi echo $ac_n "checking for --enable-ffile""... $ac_c" 1>&6 -echo "configure:3735: checking for --enable-ffile" >&5 +echo "configure:3774: checking for --enable-ffile" >&5 no_cache=0 # Check whether --enable-ffile or --disable-ffile was given. if test "${enable_ffile+set}" = set; then @@ -3770,7 +3809,7 @@ fi echo $ac_n "checking for --enable-textbuf""... $ac_c" 1>&6 -echo "configure:3774: checking for --enable-textbuf" >&5 +echo "configure:3813: checking for --enable-textbuf" >&5 no_cache=0 # Check whether --enable-textbuf or --disable-textbuf was given. if test "${enable_textbuf+set}" = set; then @@ -3809,7 +3848,7 @@ fi echo $ac_n "checking for --enable-textfile""... $ac_c" 1>&6 -echo "configure:3813: checking for --enable-textfile" >&5 +echo "configure:3852: checking for --enable-textfile" >&5 no_cache=0 # Check whether --enable-textfile or --disable-textfile was given. if test "${enable_textfile+set}" = set; then @@ -3848,7 +3887,7 @@ fi echo $ac_n "checking for --enable-fontmap""... $ac_c" 1>&6 -echo "configure:3852: checking for --enable-fontmap" >&5 +echo "configure:3891: checking for --enable-fontmap" >&5 no_cache=0 # Check whether --enable-fontmap or --disable-fontmap was given. if test "${enable_fontmap+set}" = set; then @@ -3887,7 +3926,7 @@ fi echo $ac_n "checking for --enable-unicode""... $ac_c" 1>&6 -echo "configure:3891: checking for --enable-unicode" >&5 +echo "configure:3930: checking for --enable-unicode" >&5 no_cache=0 # Check whether --enable-unicode or --disable-unicode was given. if test "${enable_unicode+set}" = set; then @@ -3926,7 +3965,7 @@ fi echo $ac_n "checking for --enable-wxprintfv""... $ac_c" 1>&6 -echo "configure:3930: checking for --enable-wxprintfv" >&5 +echo "configure:3969: checking for --enable-wxprintfv" >&5 no_cache=0 # Check whether --enable-wxprintfv or --disable-wxprintfv was given. if test "${enable_wxprintfv+set}" = set; then @@ -3965,7 +4004,7 @@ fi echo $ac_n "checking for --enable-std_iostreams""... $ac_c" 1>&6 -echo "configure:3969: checking for --enable-std_iostreams" >&5 +echo "configure:4008: checking for --enable-std_iostreams" >&5 no_cache=0 # Check whether --enable-std_iostreams or --disable-std_iostreams was given. if test "${enable_std_iostreams+set}" = set; then @@ -4004,7 +4043,7 @@ fi echo $ac_n "checking for --enable-filesystem""... $ac_c" 1>&6 -echo "configure:4008: checking for --enable-filesystem" >&5 +echo "configure:4047: checking for --enable-filesystem" >&5 no_cache=0 # Check whether --enable-filesystem or --disable-filesystem was given. if test "${enable_filesystem+set}" = set; then @@ -4043,7 +4082,7 @@ fi echo $ac_n "checking for --enable-fs_inet""... $ac_c" 1>&6 -echo "configure:4047: checking for --enable-fs_inet" >&5 +echo "configure:4086: checking for --enable-fs_inet" >&5 no_cache=0 # Check whether --enable-fs_inet or --disable-fs_inet was given. if test "${enable_fs_inet+set}" = set; then @@ -4082,7 +4121,7 @@ fi echo $ac_n "checking for --enable-fs_zip""... $ac_c" 1>&6 -echo "configure:4086: checking for --enable-fs_zip" >&5 +echo "configure:4125: checking for --enable-fs_zip" >&5 no_cache=0 # Check whether --enable-fs_zip or --disable-fs_zip was given. if test "${enable_fs_zip+set}" = set; then @@ -4121,7 +4160,7 @@ fi echo $ac_n "checking for --enable-zipstream""... $ac_c" 1>&6 -echo "configure:4125: checking for --enable-zipstream" >&5 +echo "configure:4164: checking for --enable-zipstream" >&5 no_cache=0 # Check whether --enable-zipstream or --disable-zipstream was given. if test "${enable_zipstream+set}" = set; then @@ -4161,7 +4200,7 @@ fi echo $ac_n "checking for --enable-catch_segvs""... $ac_c" 1>&6 -echo "configure:4165: checking for --enable-catch_segvs" >&5 +echo "configure:4204: checking for --enable-catch_segvs" >&5 no_cache=0 # Check whether --enable-catch_segvs or --disable-catch_segvs was given. if test "${enable_catch_segvs+set}" = set; then @@ -4200,7 +4239,7 @@ fi echo $ac_n "checking for --enable-snglinst""... $ac_c" 1>&6 -echo "configure:4204: checking for --enable-snglinst" >&5 +echo "configure:4243: checking for --enable-snglinst" >&5 no_cache=0 # Check whether --enable-snglinst or --disable-snglinst was given. if test "${enable_snglinst+set}" = set; then @@ -4240,7 +4279,7 @@ fi echo $ac_n "checking for --enable-mimetype""... $ac_c" 1>&6 -echo "configure:4244: checking for --enable-mimetype" >&5 +echo "configure:4283: checking for --enable-mimetype" >&5 no_cache=0 # Check whether --enable-mimetype or --disable-mimetype was given. if test "${enable_mimetype+set}" = set; then @@ -4279,7 +4318,7 @@ fi echo $ac_n "checking for --enable-system_options""... $ac_c" 1>&6 -echo "configure:4283: checking for --enable-system_options" >&5 +echo "configure:4322: checking for --enable-system_options" >&5 no_cache=0 # Check whether --enable-system_options or --disable-system_options was given. if test "${enable_system_options+set}" = set; then @@ -4320,7 +4359,7 @@ fi echo $ac_n "checking for --enable-threads""... $ac_c" 1>&6 -echo "configure:4324: checking for --enable-threads" >&5 +echo "configure:4363: checking for --enable-threads" >&5 no_cache=0 # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then @@ -4358,45 +4397,6 @@ fi fi - echo $ac_n "checking for --enable-serial""... $ac_c" 1>&6 -echo "configure:4363: checking for --enable-serial" >&5 - no_cache=0 - # Check whether --enable-serial or --disable-serial was given. -if test "${enable_serial+set}" = set; then - enableval="$enable_serial" - - if test "$enableval" = yes; then - ac_cv_use_serial='wxUSE_SERIAL=yes' - else - ac_cv_use_serial='wxUSE_SERIAL=no' - fi - -else - - LINE=`grep "wxUSE_SERIAL" ${wx_arg_cache_file}` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - else - no_cache=1 - fi - - ac_cv_use_serial='wxUSE_SERIAL='$DEFAULT_wxUSE_SERIAL - -fi - - - eval "$ac_cv_use_serial" - if test "$no_cache" != 1; then - echo $ac_cv_use_serial >> ${wx_arg_cache_file}.tmp - fi - - if test "$wxUSE_SERIAL" = yes; then - echo "$ac_t""yes" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - if test "$wxUSE_GUI" = "yes"; then @@ -13525,6 +13525,7 @@ else #line 13526 "configure" #include "confdefs.h" #include +#include main() { FILE *f=fopen("conftestval", "w"); @@ -13533,7 +13534,7 @@ main() exit(0); } EOF -if { (eval echo configure:13537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_char=`cat conftestval` else @@ -13553,7 +13554,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:13557: checking size of short" >&5 +echo "configure:13558: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13561,9 +13562,10 @@ else ac_cv_sizeof_short=2 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -13572,7 +13574,7 @@ main() exit(0); } EOF -if { (eval echo configure:13576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -13592,7 +13594,7 @@ EOF echo $ac_n "checking size of int *""... $ac_c" 1>&6 -echo "configure:13596: checking size of int *" >&5 +echo "configure:13598: checking size of int *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13600,9 +13602,10 @@ else ac_cv_sizeof_int_p=4 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -13611,7 +13614,7 @@ main() exit(0); } EOF -if { (eval echo configure:13615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int_p=`cat conftestval` else @@ -13631,7 +13634,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:13635: checking size of int" >&5 +echo "configure:13638: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13639,9 +13642,10 @@ else ac_cv_sizeof_int=4 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -13650,7 +13654,7 @@ main() exit(0); } EOF -if { (eval echo configure:13654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -13670,7 +13674,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:13674: checking size of long" >&5 +echo "configure:13678: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13678,9 +13682,10 @@ else ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -13689,7 +13694,7 @@ main() exit(0); } EOF -if { (eval echo configure:13693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -13709,7 +13714,7 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:13713: checking size of long long" >&5 +echo "configure:13718: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13717,9 +13722,10 @@ else ac_cv_sizeof_long_long=0 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -13728,7 +13734,7 @@ main() exit(0); } EOF -if { (eval echo configure:13732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -13749,7 +13755,7 @@ EOF echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 -echo "configure:13753: checking size of wchar_t" >&5 +echo "configure:13759: checking size of wchar_t" >&5 if eval "test \"`echo '$''{'wx_cv_sizeof_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13759,7 +13765,7 @@ else else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then wx_cv_sizeof_wchar_t=`cat conftestval` else @@ -13804,14 +13810,14 @@ EOF echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:13808: checking whether byte ordering is bigendian" >&5 +echo "configure:13814: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -13822,11 +13828,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:13826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -13837,7 +13843,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:13841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -13857,7 +13863,7 @@ if test "$cross_compiling" = yes; then ac_cv_c_bigendian=unknown else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -13898,7 +13904,7 @@ fi echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:13902: checking how to run the C++ preprocessor" >&5 +echo "configure:13908: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13911,12 +13917,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -13960,17 +13966,17 @@ cross_compiling=$ac_cv_prog_cxx_cross do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:13964: checking for $ac_hdr" >&5 +echo "configure:13970: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -14018,7 +14024,7 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking if C++ compiler supports bool""... $ac_c" 1>&6 -echo "configure:14022: checking if C++ compiler supports bool" >&5 +echo "configure:14028: checking if C++ compiler supports bool" >&5 if eval "test \"`echo '$''{'wx_cv_cpp_bool'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14033,7 +14039,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_cpp_bool=yes @@ -14083,7 +14089,7 @@ EOF echo $ac_n "checking for wcslen in -lc""... $ac_c" 1>&6 -echo "configure:14087: checking for wcslen in -lc" >&5 +echo "configure:14093: checking for wcslen in -lc" >&5 ac_lib_var=`echo c'_'wcslen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14091,7 +14097,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14128,7 +14134,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for wcslen in -lw""... $ac_c" 1>&6 -echo "configure:14132: checking for wcslen in -lw" >&5 +echo "configure:14138: checking for wcslen in -lw" >&5 ac_lib_var=`echo w'_'wcslen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14136,7 +14142,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14173,7 +14179,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for wcslen in -lmsvcrt""... $ac_c" 1>&6 -echo "configure:14177: checking for wcslen in -lmsvcrt" >&5 +echo "configure:14183: checking for wcslen in -lmsvcrt" >&5 ac_lib_var=`echo msvcrt'_'wcslen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14181,7 +14187,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmsvcrt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14228,12 +14234,12 @@ fi for ac_func in wcsrtombs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14232: checking for $ac_func" >&5 +echo "configure:14238: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14282,12 +14288,12 @@ done echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:14286: checking for vprintf" >&5 +echo "configure:14292: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -14334,12 +14340,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:14338: checking for _doprnt" >&5 +echo "configure:14344: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -14392,13 +14398,13 @@ fi echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 -echo "configure:14396: checking for vsnprintf" >&5 +echo "configure:14402: checking for vsnprintf" >&5 if eval "test \"`echo '$''{'wx_cv_func_vsnprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -14423,7 +14429,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* wx_cv_func_vsnprintf=yes @@ -14434,7 +14440,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -14459,7 +14465,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* wx_cv_func_vsnprintf=yes @@ -14491,13 +14497,13 @@ else fi echo $ac_n "checking for vsscanf""... $ac_c" 1>&6 -echo "configure:14495: checking for vsscanf" >&5 +echo "configure:14501: checking for vsscanf" >&5 if eval "test \"`echo '$''{'wx_cv_func_vsscanf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -14520,7 +14526,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_vsscanf=yes @@ -14558,13 +14564,13 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking if iconv() takes char**""... $ac_c" 1>&6 -echo "configure:14562: checking if iconv() takes char**" >&5 +echo "configure:14568: checking if iconv() takes char**" >&5 if eval "test \"`echo '$''{'wx_cv_iconv_takes_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -14576,7 +14582,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_iconv_takes_char=yes else @@ -14609,12 +14615,12 @@ if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then for ac_func in sigaction do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14613: checking for $ac_func" >&5 +echo "configure:14619: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14678,13 +14684,13 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for sa_handler type""... $ac_c" 1>&6 -echo "configure:14682: checking for sa_handler type" >&5 +echo "configure:14688: checking for sa_handler type" >&5 if eval "test \"`echo '$''{'wx_cv_type_sa_handler'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -14696,7 +14702,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_sa_handler=int @@ -14733,12 +14739,12 @@ fi for ac_func in vfork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14737: checking for $ac_func" >&5 +echo "configure:14743: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14789,12 +14795,12 @@ done for ac_func in mkstemp mktemp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14793: checking for $ac_func" >&5 +echo "configure:14799: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14843,12 +14849,12 @@ done echo $ac_n "checking for statfs""... $ac_c" 1>&6 -echo "configure:14847: checking for statfs" >&5 +echo "configure:14853: checking for statfs" >&5 if eval "test \"`echo '$''{'wx_cv_func_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_statfs=yes @@ -14896,12 +14902,12 @@ EOF else echo $ac_n "checking for statvfs""... $ac_c" 1>&6 -echo "configure:14900: checking for statvfs" >&5 +echo "configure:14906: checking for statvfs" >&5 if eval "test \"`echo '$''{'wx_cv_func_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -14917,7 +14923,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_statvfs=yes @@ -14951,12 +14957,12 @@ if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then for ac_func in fcntl flock do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14955: checking for $ac_func" >&5 +echo "configure:14961: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15013,12 +15019,12 @@ fi for ac_func in timegm do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15017: checking for $ac_func" >&5 +echo "configure:15023: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15069,12 +15075,12 @@ done for ac_func in putenv setenv do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15073: checking for $ac_func" >&5 +echo "configure:15079: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15144,12 +15150,12 @@ if test "$HAVE_SOME_SLEEP_FUNC" != 1; then for ac_func in nanosleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15148: checking for $ac_func" >&5 +echo "configure:15154: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15197,7 +15203,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6 -echo "configure:15201: checking for nanosleep in -lposix4" >&5 +echo "configure:15207: checking for nanosleep in -lposix4" >&5 ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15205,7 +15211,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15244,12 +15250,12 @@ else for ac_func in usleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15248: checking for $ac_func" >&5 +echo "configure:15254: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15315,12 +15321,12 @@ fi for ac_func in uname gethostname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15319: checking for $ac_func" >&5 +echo "configure:15325: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15380,12 +15386,12 @@ cross_compiling=$ac_cv_prog_cxx_cross for ac_func in strtok_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15384: checking for $ac_func" >&5 +echo "configure:15390: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15448,12 +15454,12 @@ INET_LINK= for ac_func in inet_addr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15452: checking for $ac_func" >&5 +echo "configure:15458: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15501,7 +15507,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_addr in -lnsl""... $ac_c" 1>&6 -echo "configure:15505: checking for inet_addr in -lnsl" >&5 +echo "configure:15511: checking for inet_addr in -lnsl" >&5 ac_lib_var=`echo nsl'_'inet_addr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15509,7 +15515,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15539,7 +15545,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_addr in -lresolv""... $ac_c" 1>&6 -echo "configure:15543: checking for inet_addr in -lresolv" >&5 +echo "configure:15549: checking for inet_addr in -lresolv" >&5 ac_lib_var=`echo resolv'_'inet_addr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15547,7 +15553,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15591,12 +15597,12 @@ done for ac_func in inet_aton do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15595: checking for $ac_func" >&5 +echo "configure:15601: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15644,7 +15650,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_aton in -l$INET_LINK""... $ac_c" 1>&6 -echo "configure:15648: checking for inet_aton in -l$INET_LINK" >&5 +echo "configure:15654: checking for inet_aton in -l$INET_LINK" >&5 ac_lib_var=`echo $INET_LINK'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15652,7 +15658,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$INET_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15778,7 +15784,7 @@ if test "$TOOLKIT" != "MSW"; then fi echo $ac_n "checking for pthread_create in -l$THREADS_LIB""... $ac_c" 1>&6 -echo "configure:15782: checking for pthread_create in -l$THREADS_LIB" >&5 +echo "configure:15788: checking for pthread_create in -l$THREADS_LIB" >&5 ac_lib_var=`echo $THREADS_LIB'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15786,7 +15792,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LIB $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15820,7 +15826,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:15824: checking for pthread_create in -lc_r" >&5 +echo "configure:15830: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15828,7 +15834,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15863,17 +15869,17 @@ else ac_safe=`echo "sys/prctl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/prctl.h""... $ac_c" 1>&6 -echo "configure:15867: checking for sys/prctl.h" >&5 +echo "configure:15873: checking for sys/prctl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:15877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -15913,12 +15919,12 @@ fi for ac_func in thr_setconcurrency do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15917: checking for $ac_func" >&5 +echo "configure:15923: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15971,17 +15977,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:15975: checking for $ac_hdr" >&5 +echo "configure:15981: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:15985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -16009,7 +16015,7 @@ done echo $ac_n "checking for sched_yield in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:16013: checking for sched_yield in -l$THREADS_LINK" >&5 +echo "configure:16019: checking for sched_yield in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -16017,7 +16023,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -16050,7 +16056,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6 -echo "configure:16054: checking for sched_yield in -lposix4" >&5 +echo "configure:16060: checking for sched_yield in -lposix4" >&5 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -16058,7 +16064,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -16100,7 +16106,7 @@ fi HAVE_PRIOR_FUNCS=0 echo $ac_n "checking for pthread_attr_getschedpolicy in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:16104: checking for pthread_attr_getschedpolicy in -l$THREADS_LINK" >&5 +echo "configure:16110: checking for pthread_attr_getschedpolicy in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'pthread_attr_getschedpolicy | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -16108,7 +16114,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -16135,7 +16141,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for pthread_attr_setschedparam in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:16139: checking for pthread_attr_setschedparam in -l$THREADS_LINK" >&5 +echo "configure:16145: checking for pthread_attr_setschedparam in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'pthread_attr_setschedparam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -16143,7 +16149,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -16170,7 +16176,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for sched_get_priority_max in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:16174: checking for sched_get_priority_max in -l$THREADS_LINK" >&5 +echo "configure:16180: checking for sched_get_priority_max in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'sched_get_priority_max | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -16178,7 +16184,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -16208,7 +16214,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_get_priority_max in -lposix4""... $ac_c" 1>&6 -echo "configure:16212: checking for sched_get_priority_max in -lposix4" >&5 +echo "configure:16218: checking for sched_get_priority_max in -lposix4" >&5 ac_lib_var=`echo posix4'_'sched_get_priority_max | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -16216,7 +16222,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -16274,7 +16280,7 @@ EOF fi echo $ac_n "checking for pthread_cancel in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:16278: checking for pthread_cancel in -l$THREADS_LINK" >&5 +echo "configure:16284: checking for pthread_cancel in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'pthread_cancel | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -16282,7 +16288,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -16319,13 +16325,13 @@ fi echo $ac_n "checking for pthread_cleanup_push/pop""... $ac_c" 1>&6 -echo "configure:16323: checking for pthread_cleanup_push/pop" >&5 +echo "configure:16329: checking for pthread_cleanup_push/pop" >&5 if eval "test \"`echo '$''{'wx_cv_func_pthread_cleanup_push'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -16335,7 +16341,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:16339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_pthread_cleanup_push=yes @@ -16367,13 +16373,13 @@ EOF fi echo $ac_n "checking for pthread_mutexattr_t""... $ac_c" 1>&6 -echo "configure:16371: checking for pthread_mutexattr_t" >&5 +echo "configure:16377: checking for pthread_mutexattr_t" >&5 if eval "test \"`echo '$''{'wx_cv_type_pthread_mutexattr_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -16383,7 +16389,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:16387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_pthread_mutexattr_t=yes @@ -16410,13 +16416,13 @@ EOF else echo $ac_n "checking for PTHREAD_RECURSIVE_MUTEX_INITIALIZER""... $ac_c" 1>&6 -echo "configure:16414: checking for PTHREAD_RECURSIVE_MUTEX_INITIALIZER" >&5 +echo "configure:16420: checking for PTHREAD_RECURSIVE_MUTEX_INITIALIZER" >&5 if eval "test \"`echo '$''{'wx_cv_type_pthread_rec_mutex_init'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -16425,7 +16431,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:16429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_pthread_rec_mutex_init=yes @@ -16477,7 +16483,7 @@ EOF else if test "$ac_cv_func_strtok_r" = "yes"; then echo $ac_n "checking if -D_REENTRANT is needed""... $ac_c" 1>&6 -echo "configure:16481: checking if -D_REENTRANT is needed" >&5 +echo "configure:16487: checking if -D_REENTRANT is needed" >&5 if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D_REENTRANT" echo "$ac_t""yes" 1>&6 @@ -16857,12 +16863,12 @@ if test "$wxUSE_DATETIME" = "yes"; then for ac_func in strptime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16861: checking for $ac_func" >&5 +echo "configure:16867: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16911,13 +16917,13 @@ done echo $ac_n "checking for timezone variable in ""... $ac_c" 1>&6 -echo "configure:16915: checking for timezone variable in " >&5 +echo "configure:16921: checking for timezone variable in " >&5 if eval "test \"`echo '$''{'wx_cv_var_timezone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -16929,7 +16935,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:16933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=timezone @@ -16940,7 +16946,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -16952,7 +16958,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:16956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=_timezone @@ -16963,7 +16969,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -16975,7 +16981,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:16979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=__timezone @@ -17016,12 +17022,12 @@ EOF for ac_func in localtime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17020: checking for $ac_func" >&5 +echo "configure:17026: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17071,13 +17077,13 @@ done if test "$ac_cv_func_localtime" = "yes"; then echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:17075: checking for tm_gmtoff in struct tm" >&5 +echo "configure:17081: checking for tm_gmtoff in struct tm" >&5 if eval "test \"`echo '$''{'wx_cv_struct_tm_has_gmtoff'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -17089,7 +17095,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:17093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_struct_tm_has_gmtoff=yes @@ -17118,12 +17124,12 @@ EOF for ac_func in gettimeofday ftime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17122: checking for $ac_func" >&5 +echo "configure:17128: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17173,7 +17179,7 @@ done if test "$ac_cv_func_gettimeofday" = "yes"; then echo $ac_n "checking whether gettimeofday takes two arguments""... $ac_c" 1>&6 -echo "configure:17177: checking whether gettimeofday takes two arguments" >&5 +echo "configure:17183: checking whether gettimeofday takes two arguments" >&5 if eval "test \"`echo '$''{'wx_cv_func_gettimeofday_has_2_args'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -17188,7 +17194,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -17201,7 +17207,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:17205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_gettimeofday_has_2_args=yes else @@ -17209,7 +17215,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -17222,7 +17228,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:17226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_gettimeofday_has_2_args=no else @@ -17271,12 +17277,12 @@ if test "$TOOLKIT" != "MSW"; then if test "$wxUSE_SOCKETS" = "yes"; then echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:17275: checking for socket" >&5 +echo "configure:17281: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -17317,7 +17323,7 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:17321: checking for socket in -lsocket" >&5 +echo "configure:17327: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17325,7 +17331,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17369,7 +17375,7 @@ fi if test "$wxUSE_SOCKETS" = "yes" ; then echo $ac_n "checking what is the type of the third argument of getsockname""... $ac_c" 1>&6 -echo "configure:17373: checking what is the type of the third argument of getsockname" >&5 +echo "configure:17379: checking what is the type of the third argument of getsockname" >&5 if eval "test \"`echo '$''{'wx_cv_type_getsockname3'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -17384,7 +17390,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -17397,7 +17403,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:17401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=socklen_t else @@ -17405,7 +17411,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -17418,7 +17424,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:17422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=size_t else @@ -17426,7 +17432,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -17439,7 +17445,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:17443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=int else @@ -17507,17 +17513,17 @@ if test "$wxUSE_GUI" = "yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:17511: checking for $ac_hdr" >&5 +echo "configure:17517: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:17521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:17527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -17564,19 +17570,19 @@ if test "$TOOLKIT" != "MSW"; then HAVE_DL_FUNCS=0 HAVE_SHL_FUNCS=0 - if test "$wxUSE_DYNLIB_CLASS" = "yes"; then + if test "$wxUSE_DYNAMIC_LOADER" = "yes" -o "$wxUSE_DYNLIB_CLASS" = "yes" ; then if test "$USE_DARWIN" = 1; then HAVE_DL_FUNCS=1 else for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17575: checking for $ac_func" >&5 +echo "configure:17581: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17627,7 +17633,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:17631: checking for dlopen in -ldl" >&5 +echo "configure:17637: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17635,7 +17641,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17675,12 +17681,12 @@ else for ac_func in shl_load do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17679: checking for $ac_func" >&5 +echo "configure:17685: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17731,7 +17737,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld in -lshl_load""... $ac_c" 1>&6 -echo "configure:17735: checking for dld in -lshl_load" >&5 +echo "configure:17741: checking for dld in -lshl_load" >&5 ac_lib_var=`echo shl_load'_'dld | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17739,7 +17745,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lshl_load $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17789,12 +17795,12 @@ done for ac_func in dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17793: checking for $ac_func" >&5 +echo "configure:17799: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17842,7 +17848,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlerror in -ldl""... $ac_c" 1>&6 -echo "configure:17846: checking for dlerror in -ldl" >&5 +echo "configure:17852: checking for dlerror in -ldl" >&5 ac_lib_var=`echo dl'_'dlerror | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17850,7 +17856,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17894,6 +17900,7 @@ done if test "$HAVE_SHL_FUNCS" = 0; then if test "$USE_UNIX" = 1; then echo "configure: warning: Missing dynamic loading support, several features will be disabled" 1>&2 + wxUSE_DYNAMIC_LOADER=no wxUSE_DYNLIB_CLASS=no else echo "configure: warning: Assuming wxLibrary class works on this platform" 1>&2 @@ -17903,14 +17910,16 @@ done fi fi -if test "$wxUSE_DYNLIB_CLASS" = "yes" ; then +if test "$wxUSE_DYNAMIC_LOADER" = "yes" ; then + cat >> confdefs.h <<\EOF +#define wxUSE_DYNAMIC_LOADER 1 +EOF + +elif test "$wxUSE_DYNLIB_CLASS" = "yes" ; then cat >> confdefs.h <<\EOF #define wxUSE_DYNLIB_CLASS 1 EOF -else - wxUSE_ODBC=no - wxUSE_SERIAL=no fi @@ -17936,13 +17945,6 @@ EOF fi -if test "$wxUSE_SERIAL" = "yes" ; then - cat >> confdefs.h <<\EOF -#define wxUSE_SERIAL 1 -EOF - -fi - IODBC_C_SRC="" if test "$wxUSE_ODBC" = "yes" ; then @@ -18018,17 +18020,17 @@ EOF if test "$wxUSE_MS_HTML_HELP" = "yes"; then ac_safe=`echo "htmlhelp.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for htmlhelp.h""... $ac_c" 1>&6 -echo "configure:18022: checking for htmlhelp.h" >&5 +echo "configure:18024: checking for htmlhelp.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:18032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:18034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -18116,17 +18118,17 @@ if test "$wxUSE_MSW" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:18120: checking for $ac_hdr" >&5 +echo "configure:18122: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:18130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:18132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -19027,7 +19029,7 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:19031: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:19033: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 diff --git a/configure.in b/configure.in index 4ecba3ab6a..275dff74d6 100644 --- a/configure.in +++ b/configure.in @@ -699,9 +699,9 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_STREAMS=no DEFAULT_wxUSE_SOCKETS=no DEFAULT_wxUSE_DIALUP_MANAGER=no - DEFAULT_wxUSE_SERIAL=no DEFAULT_wxUSE_JOYSTICK=no DEFAULT_wxUSE_DYNLIB_CLASS=no + DEFAULT_wxUSE_DYNAMIC_LOADER=no DEFAULT_wxUSE_LONGLONG=no DEFAULT_wxUSE_GEOMETRY=no @@ -863,9 +863,9 @@ else DEFAULT_wxUSE_STREAMS=yes DEFAULT_wxUSE_SOCKETS=yes DEFAULT_wxUSE_DIALUP_MANAGER=yes - DEFAULT_wxUSE_SERIAL=yes DEFAULT_wxUSE_JOYSTICK=yes - DEFAULT_wxUSE_DYNLIB_CLASS=yes + DEFAULT_wxUSE_DYNLIB_CLASS=no + DEFAULT_wxUSE_DYNAMIC_LOADER=yes DEFAULT_wxUSE_LONGLONG=yes DEFAULT_wxUSE_GEOMETRY=yes @@ -1083,6 +1083,7 @@ WX_ARG_ENABLE(timer, [ --enable-timer use wxTimer class], wxUS WX_ARG_ENABLE(wave, [ --enable-wave use wxWave class], wxUSE_WAVE) WX_ARG_ENABLE(fraction, [ --enable-fraction use wxFraction class], wxUSE_FRACTION) WX_ARG_ENABLE(dynlib, [ --enable-dynlib use wxLibrary class for DLL loading], wxUSE_DYNLIB_CLASS) +WX_ARG_ENABLE(dynamicloader, [ --enable-dynamicloader use (new) wxDynamicLibrary class], wxUSE_DYNAMIC_LOADER) WX_ARG_ENABLE(longlong, [ --enable-longlong use wxLongLong class], wxUSE_LONGLONG) WX_ARG_ENABLE(geometry, [ --enable-geometry use geometry class], wxUSE_GEOMETRY) WX_ARG_ENABLE(log, [ --enable-log use logging system], wxUSE_LOG) @@ -1111,7 +1112,6 @@ dnl "big" options (i.e. those which change a lot of things throughout the librar dnl --------------------------------------------------------------------------- WX_ARG_ENABLE(threads, [ --enable-threads use threads], wxUSE_THREADS) -WX_ARG_ENABLE(serial, [ --enable-serial use class serialization], wxUSE_SERIAL) if test "$wxUSE_GUI" = "yes"; then @@ -4016,7 +4016,7 @@ if test "$TOOLKIT" != "MSW"; then HAVE_DL_FUNCS=0 HAVE_SHL_FUNCS=0 - if test "$wxUSE_DYNLIB_CLASS" = "yes"; then + if test "$wxUSE_DYNAMIC_LOADER" = "yes" -o "$wxUSE_DYNLIB_CLASS" = "yes" ; then if test "$USE_DARWIN" = 1; then dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X HAVE_DL_FUNCS=1 @@ -4064,6 +4064,7 @@ if test "$TOOLKIT" != "MSW"; then if test "$HAVE_SHL_FUNCS" = 0; then if test "$USE_UNIX" = 1; then AC_MSG_WARN([Missing dynamic loading support, several features will be disabled]) + wxUSE_DYNAMIC_LOADER=no wxUSE_DYNLIB_CLASS=no else AC_MSG_WARN([Assuming wxLibrary class works on this platform]) @@ -4073,11 +4074,10 @@ if test "$TOOLKIT" != "MSW"; then fi fi -if test "$wxUSE_DYNLIB_CLASS" = "yes" ; then +if test "$wxUSE_DYNAMIC_LOADER" = "yes" ; then + AC_DEFINE(wxUSE_DYNAMIC_LOADER) +elif test "$wxUSE_DYNLIB_CLASS" = "yes" ; then AC_DEFINE(wxUSE_DYNLIB_CLASS) -else - wxUSE_ODBC=no - wxUSE_SERIAL=no fi dnl --------------------------------------------------------------------------- @@ -4096,13 +4096,6 @@ if test "$wxUSE_wxUSE_EXPERIMENTAL_PRINTF" = "yes"; then AC_DEFINE(wxUSE_EXPERIMENTAL_PRINTF) fi -dnl ---------------------------------------------------------------- -dnl serialization support -dnl ---------------------------------------------------------------- - -if test "$wxUSE_SERIAL" = "yes" ; then - AC_DEFINE(wxUSE_SERIAL) -fi dnl ---------------------------------------------------------------- dnl iODBC support diff --git a/debian/changelog b/debian/changelog index 8cc9649263..c319e3a25c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,13 @@ wxwindows2.3 (2.3.0) unstable; urgency=low -- Ron Lee Sat, 27 Jan 2001 01:51:24 -0800 + wxwindows2.2 (2.2.8.5) unstable; urgency=low + + * Add wxSIZE_T_IS defines to setup.h + Add automate that to my TODO list. + + -- Ron Lee Tue, 27 Nov 2001 05:55:47 -0800 + wxwindows2.2 (2.2.8.4) unstable; urgency=low * Put the (modified) size_t == ulong kludge back into sndwav.cpp diff --git a/distrib/msw/tmake/filelist.txt b/distrib/msw/tmake/filelist.txt index e8da36e5d5..db17c291b5 100644 --- a/distrib/msw/tmake/filelist.txt +++ b/distrib/msw/tmake/filelist.txt @@ -139,6 +139,7 @@ docview.cpp Common dseldlg.cpp Common dynarray.cpp Common Base dynlib.cpp Common Base +dynload.cpp Common Base effects.cpp Common encconv.cpp Common Base event.cpp Common Base @@ -191,7 +192,6 @@ module.cpp Common Base mstream.cpp Common Base nbkbase.cpp Common object.cpp Common Base -objstrm.cpp Common Base odbc.cpp Common NotGTK,NotX,NotOS2 paper.cpp Common popupcmn.cpp Common @@ -206,7 +206,6 @@ sckaddr.cpp Common Socket,Base sckfile.cpp Common Socket,Base sckipc.cpp Common Socket,Base sckstrm.cpp Common Socket,Base -serbase.cpp Common Base sizer.cpp Common socket.cpp Common Socket,Base statbar.cpp Common @@ -723,6 +722,7 @@ confbase.h WXH Base config.h WXH Base containr.h WXH control.h WXH +cshelp.h WXH ctrlsub.h WXH cursor.h WXH dataobj.h WXH @@ -752,6 +752,7 @@ docview.h WXH dragimag.h WXH dynarray.h WXH Base dynlib.h WXH Base +dynload.h WXH Base encconv.h WXH Base event.h WXH Base expr.h WXH @@ -787,7 +788,6 @@ gsocket.h WXH Base hash.h WXH Base help.h WXH helpbase.h WXH -cshelp.h WXH helphtml.h WXH helpwin.h WXH icon.h WXH @@ -830,7 +830,6 @@ msgdlg.h WXH mstream.h WXH Base notebook.h WXH object.h WXH Base -objstrm.h WXH Base odbc.h WXH ownerdrw.h WXH palette.h WXH @@ -858,7 +857,6 @@ sckipc.h WXH Base sckstrm.h WXH Base scrolbar.h WXH scrolwin.h WXH -serbase.h WXH Base settings.h WXH sizer.h WXH slider.h WXH diff --git a/include/wx/defs.h b/include/wx/defs.h index 00c1edcfcb..1f8673a3a7 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -180,6 +180,23 @@ typedef short int WXTYPE; // because -1 is a valid (and largely used) value for window id. typedef int wxWindowID; +// ---------------------------------------------------------------------------- +// other feature tests +// ---------------------------------------------------------------------------- + + // Every ride down a slippery slope begins with a single step.. + // + // Yes, using nested classes is indeed against our coding standards in + // general, but there are places where you can use them to advantage + // without totally breaking ports that cannot use them. If you do, then + // wrap it in this guard, but such cases should still be relatively rare. + +#ifndef __WIN16__ +#define wxUSE_NESTED_CLASSES 1 +#else +#define wxUSE_NESTED_CLASSES 0 +#endif + // ---------------------------------------------------------------------------- // portable calling conventions macros // ---------------------------------------------------------------------------- diff --git a/include/wx/docview.h b/include/wx/docview.h index cc728d8e16..b564db1b67 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -96,11 +96,6 @@ public: virtual wxInputStream& LoadObject(wxInputStream& stream); #endif -#if wxUSE_SERIAL - // need this to keep from hiding the virtual from wxObject - virtual void LoadObject(wxObjectInputStream& stream) { wxObject::LoadObject(stream); }; -#endif - // Called by wxWindows virtual bool OnSaveDocument(const wxString& filename); virtual bool OnOpenDocument(const wxString& filename); diff --git a/include/wx/dynlib.h b/include/wx/dynlib.h index 90fb2f1dc7..d6ed0876bc 100644 --- a/include/wx/dynlib.h +++ b/include/wx/dynlib.h @@ -18,7 +18,11 @@ #include "wx/setup.h" -#if wxUSE_DYNLIB_CLASS +#if wxUSE_DYNAMIC_LOADER + +#include "wx/dynload.h" // Use the new (version of) wxDynamicLibrary instead + +#elif wxUSE_DYNLIB_CLASS #include "wx/string.h" #include "wx/list.h" @@ -85,7 +89,7 @@ public: if success pointer is not NULL, it will be filled with TRUE if everything went ok and FALSE otherwise */ - static wxDllType LoadLibrary(const wxString& libname, bool *success = NULL); + static wxDllType LoadLibrary(const wxString& libname, bool *success = 0); /* This function unloads the shared library previously loaded with @@ -109,14 +113,15 @@ public: Returns the pointer to the symbol or NULL on error. */ - static void * GetSymbol(wxDllType dllHandle, const wxString &name); + static void *GetSymbol(wxDllType dllHandle, const wxString &name, bool success = 0); // return the standard DLL extension (with leading dot) for this platform - static wxString GetDllExt(); + static const wxString &GetDllExt() { return ms_dllext; } private: // forbid construction of objects wxDllLoader(); + static const wxString ms_dllext; }; // ---------------------------------------------------------------------------- diff --git a/include/wx/dynload.h b/include/wx/dynload.h new file mode 100644 index 0000000000..fd813044a4 --- /dev/null +++ b/include/wx/dynload.h @@ -0,0 +1,207 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: dynload.h +// Purpose: Dynamic loading framework +// Author: Ron Lee, David Falkinder, Vadim Zeitlin and a cast of 1000's +// (derived in part from dynlib.cpp (c) 1998 Guilhem Lavaux) +// Modified by: +// Created: 03/12/01 +// RCS-ID: $Id$ +// Copyright: (c) 2001 Ron Lee +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DYNAMICLOADER_H__ +#define _WX_DYNAMICLOADER_H__ + +#ifdef __GNUG__ +#pragma interface "dynload.h" +#endif + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_DYNAMIC_LOADER + +#include "wx/hash.h" +#include "wx/module.h" + + +// Ugh, I'd much rather this was typesafe, but no time +// to rewrite wxHashTable right now.. + +typedef wxHashTable wxDLManifest; +typedef wxHashTable wxDLImports; + +// ---------------------------------------------------------------------------- +// conditional compilation +// ---------------------------------------------------------------------------- + + // Note: WXPM/EMX has to be tested first, since we want to use + // native version, even if configure detected presence of DLOPEN. + +#if defined(__WXPM__) || defined(__EMX__) +#define INCL_DOS +#include + typedef HMODULE wxDllType; +#elif defined(HAVE_DLOPEN) +#include + typedef void *wxDllType; +#elif defined(HAVE_SHL_LOAD) +#include + typedef shl_t wxDllType; +#elif defined(__WINDOWS__) +#include // needed to get HMODULE + typedef HMODULE wxDllType; +#elif defined(__DARWIN__) + typedef void *wxDllType; +#elif defined(__WXMAC__) + typedef CFragConnectionID wxDllType; +#else +#error "wxLibrary can't be compiled on this platform, sorry." +#endif + + // LoadLibrary is defined in windows.h as LoadLibraryA, but wxDllLoader + // method should be called LoadLibrary, not LoadLibraryA or LoadLibraryW! + +#if defined(__WIN32__) && defined(LoadLibrary) +# include "wx/msw/winundef.h" +#endif + + +// --------------------------------------------------------------------------- +// wxDllLoader +// --------------------------------------------------------------------------- + + // Cross platform wrapper for dlopen and friends. + // There are no instances of this class, it simply + // serves as a namespace for its static member functions. + +class WXDLLEXPORT wxDllLoader +{ +public: + + // libname may be either the full path to the file or just the filename + // in which case the library is searched for in all standard locations. + // The platform specific library extension is automatically appended. + + static wxDllType Load(const wxString& name); + + // The same as Load, except 'name' is searched for without modification. + + static wxDllType LoadLibrary(const wxString& name); + static void UnloadLibrary(wxDllType dll); + + // return a valid handle for the main program itself or NULL if + // back linking is not supported by the current platform (e.g. Win32) + + static wxDllType GetProgramHandle(); + + // resolve a symbol in a loaded DLL, such as a variable or function + // name. dllHandle is a handle previously returned by LoadLibrary(), + // symbol is the (possibly mangled) name of the symbol. + // (use extern "C" to export unmangled names) + // + // Since it is perfectly valid for the returned symbol to actually be + // NULL, that is not always indication of an error. Pass and test the + // parameter 'success' for a true indication of success or failure to + // load the symbol. + // + // Returns a pointer to the symbol on success. + + static void *GetSymbol(wxDllType dllHandle, const wxString &name, bool *success = 0); + + // return the platform standard DLL extension (with leading dot) + + static const wxString &GetDllExt() { return ms_dllext; } + +private: + + wxDllLoader(); // forbid construction of objects + static const wxString ms_dllext; // Platform specific shared lib suffix. +}; + + +// --------------------------------------------------------------------------- +// wxDynamicLibrary +// --------------------------------------------------------------------------- + +class wxDLManifestEntry +{ +public: + + static wxDLImports ms_classes; // Static hash of all imported classes. + + wxDLManifestEntry( const wxString &libname ); + ~wxDLManifestEntry(); + + wxDLManifestEntry *Ref() { ++m_count; return this; } + bool Unref() { return (m_count-- < 2) ? (delete this, TRUE) : FALSE; } + + bool IsLoaded() const { return m_count > 0; } + + wxDllType GetLinkHandle() const { return m_handle; } + wxDllType GetProgramHandle() const { return wxDllLoader::GetProgramHandle(); } + void *GetSymbol(const wxString &symbol, bool *success = 0) + { + return wxDllLoader::GetSymbol( m_handle, symbol, success ); + } + +private: + + // Order of these three *is* important, do not change it + + wxClassInfo *m_before; // sm_first before loading this lib + wxDllType m_handle; // Handle from dlopen. + wxClassInfo *m_after; // ..and after. + + size_t m_count; // Ref count of Link and Create calls. + wxModuleList m_wxmodules; // any wxModules that we initialised. + + void UpdateClassInfo(); // Update the wxClassInfo table + void RestoreClassInfo(); // Restore the original wxClassInfo state. + void RegisterModules(); // Init any wxModules in the lib. + void UnregisterModules(); // Cleanup any wxModules we installed. + +DECLARE_NO_COPY_CLASS(wxDLManifestEntry) +}; + + +class WXDLLEXPORT wxDynamicLibrary +{ +public: + + // Static accessors. + + static wxDLManifestEntry *Link(const wxString &libname); + static bool Unlink(const wxString &libname); + + // Instance methods. + + wxDynamicLibrary(const wxString &libname); + ~wxDynamicLibrary(); + + bool IsLoaded() const { return m_entry && m_entry->IsLoaded(); } + void *GetSymbol(const wxString &symbol, bool *success = 0) + { + return m_entry->GetSymbol( symbol, success ); + } + +private: + + static wxDLManifest ms_manifest; // Static hash of loaded libs. + wxDLManifestEntry *m_entry; // Cache our entry in the manifest. + + // We could allow this class to be copied if we really + // wanted to, but not without modification. + +DECLARE_NO_COPY_CLASS(wxDynamicLibrary) +}; + + +#endif // wxUSE_DYNAMIC_LOADER +#endif // _WX_DYNAMICLOADER_H__ + +// vi:sts=4:sw=4:et diff --git a/include/wx/fileconf.h b/include/wx/fileconf.h index 2e997b65d6..911c7bbd0a 100644 --- a/include/wx/fileconf.h +++ b/include/wx/fileconf.h @@ -95,6 +95,7 @@ class WXDLLEXPORT wxFileConfigGroup; class WXDLLEXPORT wxFileConfigEntry; class WXDLLEXPORT wxFileConfigLineList; +class WXDLLEXPORT wxInputStream; class WXDLLEXPORT wxFileConfig : public wxConfigBase { diff --git a/include/wx/gtk/setup0.h b/include/wx/gtk/setup0.h index cca48903c0..22f91e87fa 100644 --- a/include/wx/gtk/setup0.h +++ b/include/wx/gtk/setup0.h @@ -332,10 +332,6 @@ * Use streams */ #define wxUSE_STREAMS 1 -/* - * Use class serialization - */ -#define wxUSE_SERIAL 1 /* * Use sockets */ @@ -345,10 +341,6 @@ * streams implementation. */ #define wxUSE_STD_IOSTREAM 0 -/* - * wxLibrary class - */ -#define wxUSE_DYNLIB_CLASS 1 /* * Use font metric files in GetTextExtent for wxPostScriptDC @@ -418,9 +410,9 @@ */ #define wxUSE_SPLINES 1 /* - * Use wxLibrary class + * Use wxObjectLoader class */ -#define wxUSE_DYNLIB_CLASS 1 +#define wxUSE_DYNAMIC_LOADER 1 /* * Use the mdi architecture diff --git a/include/wx/gtk1/setup0.h b/include/wx/gtk1/setup0.h index cca48903c0..22f91e87fa 100644 --- a/include/wx/gtk1/setup0.h +++ b/include/wx/gtk1/setup0.h @@ -332,10 +332,6 @@ * Use streams */ #define wxUSE_STREAMS 1 -/* - * Use class serialization - */ -#define wxUSE_SERIAL 1 /* * Use sockets */ @@ -345,10 +341,6 @@ * streams implementation. */ #define wxUSE_STD_IOSTREAM 0 -/* - * wxLibrary class - */ -#define wxUSE_DYNLIB_CLASS 1 /* * Use font metric files in GetTextExtent for wxPostScriptDC @@ -418,9 +410,9 @@ */ #define wxUSE_SPLINES 1 /* - * Use wxLibrary class + * Use wxObjectLoader class */ -#define wxUSE_DYNLIB_CLASS 1 +#define wxUSE_DYNAMIC_LOADER 1 /* * Use the mdi architecture diff --git a/include/wx/hash.h b/include/wx/hash.h index 873536e139..5868ef8dff 100644 --- a/include/wx/hash.h +++ b/include/wx/hash.h @@ -297,5 +297,8 @@ private: #define WX_DECLARE_EXPORTED_HASH(el, list, hash) \ _WX_DECLARE_HASH(el, list, hash, class WXDLLEXPORT) +#define WX_DECLARE_USER_EXPORTED_HASH(el, list, hash, usergoo) \ + _WX_DECLARE_HASH(el, list, hash, class usergoo) + #endif // _WX_HASH_H__ diff --git a/include/wx/list.h b/include/wx/list.h index dd64fc5071..00d6126db2 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -461,10 +461,18 @@ private: typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \ WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class WXDLLEXPORT) +#define WX_DECLARE_USER_EXPORTED_LIST(elementtype, listname, usergoo) \ + typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \ + WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class usergoo) + // this macro must be inserted in your program after // #include #define WX_DEFINE_LIST(name) "don't forget to include listimpl.cpp!" +#define WX_DEFINE_EXPORTED_LIST(name) WX_DEFINE_LIST(name) +#define WX_DEFINE_USER_EXPORTED_LIST(name) WX_DEFINE_LIST(name) + + // ============================================================================= // now we can define classes 100% compatible with the old ones // ============================================================================= diff --git a/include/wx/module.h b/include/wx/module.h index 73e913ee1b..0c50363a6d 100644 --- a/include/wx/module.h +++ b/include/wx/module.h @@ -32,15 +32,20 @@ public: wxModule() {} virtual ~wxModule() {} - // if module init routine returns FALSE application will fail to startup + // if module init routine returns FALSE application + // will fail to startup + bool Init() { return OnInit(); } void Exit() { OnExit(); } - // Override both of these + // Override both of these // called on program startup + virtual bool OnInit() = 0; - // called just before program termination, but only if OnInit() + + // called just before program termination, but only if OnInit() // succeeded + virtual void OnExit() = 0; static void RegisterModule(wxModule* module); @@ -48,6 +53,10 @@ public: static bool InitializeModules(); static void CleanUpModules(); + // used by wxObjectLoader when unloading shared libs's + + static void UnregisterModule(wxModule* module); + protected: static wxModuleList m_modules; diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index efb848adfb..2a38bafe02 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -240,9 +240,6 @@ // Use standard C++ streams if 1. If 0, use wxWin streams implementation. #define wxUSE_STD_IOSTREAM 0 -// Use serialization (requires utils/serialize) -#define wxUSE_SERIAL 0 - // ---------------------------------------------------------------------------- // non GUI features selection // ---------------------------------------------------------------------------- @@ -345,14 +342,14 @@ // If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows // to connect/disconnect from the network and be notified whenever the dial-up -// network connection is established/terminated. Requires wxUSE_DYNLIB_CLASS. +// network connection is established/terminated. Requires wxUSE_DYNAMIC_LOADER. // // Default is 1. // // Recommended setting: 1 #define wxUSE_DIALUP_MANAGER 1 -// Compile in wxLibrary class for run-time DLL loading and function calling. +// Compile in classes for run-time DLL loading and function calling. // Required by wxUSE_DIALUP_MANAGER. // // This setting is for Win32 only @@ -360,7 +357,7 @@ // Default is 1. // // Recommended setting: 1 -#define wxUSE_DYNLIB_CLASS 1 +#define wxUSE_DYNAMIC_LOADER 1 // Set to 1 to use socket classes #define wxUSE_SOCKETS 1 diff --git a/include/wx/object.h b/include/wx/object.h index 69e3796842..3384b88562 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -2,10 +2,11 @@ // Name: object.h // Purpose: wxObject class, plus run-time type information macros // Author: Julian Smart -// Modified by: +// Modified by: Ron Lee // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem +// Copyright: (c) 1997 Julian Smart and Markus Holzem +// (c) 2001 Ron Lee // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -16,6 +17,10 @@ #pragma interface "object.h" #endif +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + #include "wx/defs.h" #include "wx/memory.h" @@ -23,135 +28,230 @@ class WXDLLEXPORT wxObject; #if wxUSE_DYNAMIC_CLASSES -// #ifdef __GNUWIN32__ +// ---------------------------------------------------------------------------- +// conditional compilation +// ---------------------------------------------------------------------------- + #ifdef GetClassName #undef GetClassName #endif #ifdef GetClassInfo #undef GetClassInfo #endif -// #endif class WXDLLEXPORT wxClassInfo; -class WXDLLEXPORT wxInputStream; -class WXDLLEXPORT wxOutputStream; -class WXDLLEXPORT wxObjectInputStream; -class WXDLLEXPORT wxObjectOutputStream; class WXDLLEXPORT wxHashTable; -class WXDLLEXPORT wxObject_Serialize; #if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT) - #include "wx/ioswrap.h" +#include "wx/ioswrap.h" #endif -/* - * Dynamic object system declarations - */ -typedef wxObject * (*wxObjectConstructorFn) (void); +// ---------------------------------------------------------------------------- +// wxClassInfo +// ---------------------------------------------------------------------------- + +typedef wxObject *(*wxObjectConstructorFn)(void); class WXDLLEXPORT wxClassInfo { public: - wxClassInfo(const wxChar *cName, - const wxChar *baseName1, - const wxChar *baseName2, - int sz, - wxObjectConstructorFn fn); - - wxObject *CreateObject(void); + wxClassInfo::wxClassInfo(const wxChar *className, + const wxChar *baseName1, + const wxChar *baseName2, + int size, + wxObjectConstructorFn ctor) + : m_className(className) + , m_baseClassName1(baseName1) + , m_baseClassName2(baseName2) + , m_objectSize(size) + , m_objectConstructor(ctor) + , m_baseInfo1(0) + , m_baseInfo2(0) + , m_next(sm_first) + { sm_first = this; } + + wxObject *CreateObject() { return m_objectConstructor ? (*m_objectConstructor)() : 0; } + + const wxChar *GetClassName() const { return m_className; } + const wxChar *GetBaseClassName1() const { return m_baseClassName1; } + const wxChar *GetBaseClassName2() const { return m_baseClassName2; } + const wxClassInfo *GetBaseClass1() const { return m_baseInfo1; } + const wxClassInfo *GetBaseClass2() const { return m_baseInfo2; } + int GetSize() const { return m_objectSize; } + + wxObjectConstructorFn GetConstructor() const { return m_objectConstructor; } + static const wxClassInfo *GetFirst() { return sm_first; } + const wxClassInfo *GetNext() const { return m_next; } + static wxClassInfo *FindClass(const wxChar *className); + + // Climb upwards through inheritance hierarchy. + // Dual inheritance is catered for. + + bool IsKindOf(const wxClassInfo *info) const + { + return info != 0 && + ( info == this || + ( m_baseInfo1 && m_baseInfo1->IsKindOf(info) ) || + ( m_baseInfo2 && m_baseInfo2->IsKindOf(info) ) ); + } - const wxChar *GetClassName() const { return m_className; } - const wxChar *GetBaseClassName1() const { return m_baseClassName1; } - const wxChar *GetBaseClassName2() const { return m_baseClassName2; } - const wxClassInfo* GetBaseClass1() const { return m_baseInfo1; } - const wxClassInfo* GetBaseClass2() const { return m_baseInfo2; } - int GetSize() const { return m_objectSize; } - wxObjectConstructorFn GetConstructor() const { return m_objectConstructor; } - static const wxClassInfo* GetFirst() { return sm_first; } - const wxClassInfo* GetNext() const { return m_next; } - bool IsKindOf(const wxClassInfo *info) const; + // Initializes parent pointers and hash table for fast searching. - static wxClassInfo *FindClass(const wxChar *c); + static void InitializeClasses(); - // Initializes parent pointers and hash table for fast searching. - static void InitializeClasses(); + // Cleans up hash table used for fast searching. - // Cleans up hash table used for fast searching. - static void CleanUpClasses(); + static void CleanUpClasses(); public: - const wxChar* m_className; - const wxChar* m_baseClassName1; - const wxChar* m_baseClassName2; - int m_objectSize; - wxObjectConstructorFn m_objectConstructor; - - // Pointers to base wxClassInfos: set in InitializeClasses - const wxClassInfo* m_baseInfo1; - const wxClassInfo* m_baseInfo2; - - // class info object live in a linked list: pointers to its head and the - // next element in it - static wxClassInfo* sm_first; - wxClassInfo* m_next; - - static wxHashTable* sm_classTable; + const wxChar *m_className; + const wxChar *m_baseClassName1; + const wxChar *m_baseClassName2; + int m_objectSize; + wxObjectConstructorFn m_objectConstructor; + + // Pointers to base wxClassInfos: set in InitializeClasses + + const wxClassInfo *m_baseInfo1; + const wxClassInfo *m_baseInfo2; + + // class info object live in a linked list: + // pointers to its head and the next element in it + + static wxClassInfo *sm_first; + wxClassInfo *m_next; + + static wxHashTable *sm_classTable; }; -WXDLLEXPORT wxObject* wxCreateDynamicObject(const wxChar *name); +WXDLLEXPORT wxObject *wxCreateDynamicObject(const wxChar *name); -#if wxUSE_SERIAL -WXDLLEXPORT wxObject* wxCreateStoredObject( wxInputStream& stream ); -#endif -#define DECLARE_DYNAMIC_CLASS(name) \ - public:\ - static wxClassInfo sm_class##name;\ - wxClassInfo *GetClassInfo() const \ +// ---------------------------------------------------------------------------- +// Dynamic class macros +// ---------------------------------------------------------------------------- + +#define DECLARE_DYNAMIC_CLASS(name) \ + public: \ + static wxClassInfo sm_class##name; \ + virtual wxClassInfo *GetClassInfo() const \ { return &name::sm_class##name; } #define DECLARE_ABSTRACT_CLASS(name) DECLARE_DYNAMIC_CLASS(name) #define DECLARE_CLASS(name) DECLARE_DYNAMIC_CLASS(name) -////// -////// for concrete classes -////// +// ----------------------------------- +// for concrete classes +// ----------------------------------- + + // Single inheritance with one base class -// Single inheritance with one base class -#define IMPLEMENT_DYNAMIC_CLASS(name, basename) \ -wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \ - { return new name; }\ - wxClassInfo name::sm_class##name((wxChar *) wxT(#name), (wxChar *) wxT(#basename), (wxChar *) NULL, (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name); +#define IMPLEMENT_DYNAMIC_CLASS(name, basename) \ + wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name() \ + { return new name; } \ + wxClassInfo name::sm_class##name(wxT(#name), wxT(#basename), \ + 0, (int) sizeof(name), \ + (wxObjectConstructorFn) wxConstructorFor##name); -// Multiple inheritance with two base classes -#define IMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) \ -wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \ - { return new name; }\ - wxClassInfo name::sm_class##name((wxChar *) wxT(#name), (wxChar *) wxT(#basename1), (wxChar *) wxT(#basename2), (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name); + // Multiple inheritance with two base classes -////// -////// for abstract classes -////// +#define IMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) \ + wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name() \ + { return new name; } \ + wxClassInfo name::sm_class##name(wxT(#name), wxT(#basename1), \ + wxT(#basename2), (int) sizeof(name), \ + (wxObjectConstructorFn) wxConstructorFor##name); -// Single inheritance with one base class -#define IMPLEMENT_ABSTRACT_CLASS(name, basename) \ - wxClassInfo name::sm_class##name((wxChar *) wxT(#name), (wxChar *) wxT(#basename), \ - (wxChar *) NULL, (int) sizeof(name), (wxObjectConstructorFn) NULL); +// ----------------------------------- +// for abstract classes +// ----------------------------------- -// Multiple inheritance with two base classes -#define IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) \ - wxClassInfo name::sm_class##name((wxChar *) wxT(#name), (wxChar *) wxT(#basename1), \ - (wxChar *) wxT(#basename2), (int) sizeof(name), (wxObjectConstructorFn) NULL); + // Single inheritance with one base class + +#define IMPLEMENT_ABSTRACT_CLASS(name, basename) \ + wxClassInfo name::sm_class##name(wxT(#name), wxT(#basename), \ + 0, (int) sizeof(name), (wxObjectConstructorFn) 0); + + // Multiple inheritance with two base classes + +#define IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) \ + wxClassInfo name::sm_class##name(wxT(#name), wxT(#basename1), \ + wxT(#basename2), (int) sizeof(name), \ + (wxObjectConstructorFn) 0); #define IMPLEMENT_CLASS IMPLEMENT_ABSTRACT_CLASS #define IMPLEMENT_CLASS2 IMPLEMENT_ABSTRACT_CLASS2 +// ----------------------------------- +// for pluggable classes +// ----------------------------------- + + // NOTE: this should probably be the very first statement + // in the class declaration so wxPluginSentinel is + // the first member initialised and the last destroyed. + +// _DECLARE_DL_SENTINEL(name) wxPluginSentinel m_pluginsentinel; + +#if wxUSE_NESTED_CLASSES + +#if 0 +#define _DECLARE_DL_SENTINEL(name) \ + wxPluginSentinel m_pluginsentinel; + +#else + +#define _DECLARE_DL_SENTINEL(name) \ +class name##PluginSentinel { \ +private: \ + static const wxString sm_className; \ +public: \ + name##PluginSentinel(); \ + ~##name##PluginSentinel(); \ +}; \ +name##PluginSentinel m_pluginsentinel; +#endif + +#define _IMPLEMENT_DL_SENTINEL(name) \ + const wxString name::name##PluginSentinel::sm_className(#name); \ + name::name##PluginSentinel::name##PluginSentinel() { \ + wxDLManifestEntry *e = (wxDLManifestEntry*) wxDLManifestEntry::ms_classes.Get(#name); \ + if( e != 0 ) { e->Ref(); } \ + } \ + name::name##PluginSentinel::~##name##PluginSentinel() { \ + wxDLManifestEntry *e = (wxDLManifestEntry*) wxDLManifestEntry::ms_classes.Get(#name); \ + if( e != 0 ) { wxCHECK_RET( !e->Unref(), _T("premature library unlinking") ); } \ + } +#else + +#define _DECLARE_DL_SENTINEL(name) +#define _IMPLEMENT_DL_SENTINEL(name) + +#endif // wxUSE_NESTED_CLASSES + +#define DECLARE_PLUGGABLE_CLASS(name) \ + DECLARE_DYNAMIC_CLASS(name) _DECLARE_DL_SENTINEL(name) + +#define DECLARE_ABSTRACT_PLUGGABLE_CLASS(name) \ + DECLARE_ABSTRACT_CLASS(name) _DECLARE_DL_SENTINEL(name) + +#define IMPLEMENT_PLUGGABLE_CLASS(name, basename) \ + IMPLEMENT_DYNAMIC_CLASS(name, basename) _IMPLEMENT_DL_SENTINEL(name) +#define IMPLEMENT_PLUGGABLE_CLASS2(name, basename1, basename2) \ + IMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) _IMPLEMENT_DL_SENTINEL(name) + +#define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS(name, basename) \ + IMPLEMENT_ABSTRACT_CLASS(name, basename) _IMPLEMENT_DL_SENTINEL(name) +#define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2) \ + IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) _IMPLEMENT_DL_SENTINEL(name) + + #define CLASSINFO(name) (&name::sm_class##name) #else // !wxUSE_DYNAMIC_CLASSES -// No dynamic class system: so stub out the macros + // No dynamic class system: so stub out the macros + #define DECLARE_DYNAMIC_CLASS(name) #define DECLARE_ABSTRACT_CLASS(name) #define DECLARE_CLASS(name) @@ -162,137 +262,144 @@ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \ #define IMPLEMENT_CLASS IMPLEMENT_ABSTRACT_CLASS #define IMPLEMENT_CLASS2 IMPLEMENT_ABSTRACT_CLASS2 -#endif // wxUSE_DYNAMIC_CLASSES/!wxUSE_DYNAMIC_CLASSES +#define DECLARE_PLUGGABLE_CLASS(name) +#define DECLARE_ABSTRACT_PLUGGABLE_CLASS(name) +#define IMPLEMENT_PLUGGABLE_CLASS(name, basename) +#define IMPLEMENT_PLUGGABLE_CLASS2(name, basename1, basename2) +#define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS(name, basename) +#define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2) + +#endif // wxUSE_DYNAMIC_CLASSES + #define wxIS_KIND_OF(obj, className) obj->IsKindOf(&className::sm_class##className) -// Just seems a bit nicer-looking (pretend it's not a macro) + // Just seems a bit nicer-looking (pretend it's not a macro) + #define wxIsKindOf(obj, className) obj->IsKindOf(&className::sm_class##className) -// to be replaced by dynamic_cast<> in the future + // to be replaced by dynamic_cast<> in the future + #define wxDynamicCast(obj, className) \ - (className *) wxCheckDynamicCast((wxObject*)(obj), &className::sm_class##className) + (className *) wxCheckDynamicCast((wxObject*)(obj), &className::sm_class##className) + + // The 'this' pointer is always true, so use this version + // to cast the this pointer and avoid compiler warnings. -// The 'this' pointer is always true, so use this version to cast the this -// pointer and avoid compiler warnings. #define wxDynamicCastThis(className) \ - (IsKindOf(&className::sm_class##className) \ - ? (className *)(this) \ - : (className *)0) + (IsKindOf(&className::sm_class##className) ? (className *)(this) : (className *)0) #define wxConstCast(obj, className) ((className *)(obj)) + #ifdef __WXDEBUG__ - inline void wxCheckCast(void *ptr) - { - wxASSERT_MSG( ptr, _T("wxStaticCast() used incorrectly") ); - } +inline void wxCheckCast(void *ptr) +{ + wxASSERT_MSG( ptr, _T("wxStaticCast() used incorrectly") ); +} +#define wxStaticCast(obj, className) \ + (wxCheckCast(wxDynamicCast(obj, className)), ((className *)(obj))) - #define wxStaticCast(obj, className) \ - (wxCheckCast(wxDynamicCast(obj, className)), ((className *)(obj))) +#else // !__WXDEBUG__ +#define wxStaticCast(obj, className) ((className *)(obj)) -#else // !Debug - #define wxStaticCast(obj, className) ((className *)(obj)) -#endif // Debug/!Debug +#endif // __WXDEBUG__ -// Unfortunately Borland seems to need this include. -#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT) -#ifdef __BORLANDC__ - #if wxUSE_IOSTREAMH - #include - #else - #include - #endif + + // Unfortunately Borland seems to need this include. + +#if wxUSE_STD_IOSTREAM \ + && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT) \ + && defined(__BORLANDC__) +#if wxUSE_IOSTREAMH +#include +#else +#include #endif #endif + +// ---------------------------------------------------------------------------- +// wxObject +// ---------------------------------------------------------------------------- + class WXDLLEXPORT wxObjectRefData; class WXDLLEXPORT wxObject { - public: - - // This is equivalent to using the macro DECLARE_ABSTRACT_CLASS - static wxClassInfo sm_classwxObject; - - wxObject(void); - virtual ~wxObject(void); +DECLARE_ABSTRACT_CLASS(wxObject) - virtual wxClassInfo *GetClassInfo(void) const { return &sm_classwxObject; } +public: + wxObject() : m_refData(0) {} + virtual ~wxObject() { UnRef(); } - bool IsKindOf(wxClassInfo *info) const; + bool IsKindOf(wxClassInfo *info) const; #if defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING - void * operator new (size_t size, wxChar * fileName = NULL, int lineNum = 0); -# if defined(__VISAGECPP__) -# if __DEBUG_ALLOC__ - void operator delete (void * buf,const char * _fname, size_t _line); -# endif //__DEBUG_ALLOC__ -# else // Everybody else + void *operator new (size_t size, wxChar *fileName = 0, int lineNum = 0); + +#ifndef __VISAGECPP__ void operator delete (void * buf); -# endif // end of VISAGECPP +#elif __DEBUG_ALLOC__ + void operator delete (void *buf, const char *_fname, size_t _line); +#endif -// VC++ 6.0 -# if defined(__VISUALC__) && (__VISUALC__ >= 1200) + // VC++ 6.0 + +#if defined(__VISUALC__) && (__VISUALC__ >= 1200) void operator delete(void *buf, wxChar*, int); -# endif +#endif // Causes problems for VC++ -# if wxUSE_ARRAY_MEMORY_OPERATORS && !defined(__VISUALC__) && !defined( __MWERKS__) - void * operator new[] (size_t size, wxChar * fileName = NULL, int lineNum = 0); - void operator delete[] (void * buf); -# endif -# ifdef __MWERKS__ - void * operator new[] (size_t size, wxChar * fileName , int lineNum = 0); - void * operator new[] (size_t size) { return operator new[] ( size , NULL , 0 ) ; } - void operator delete[] (void * buf); -# endif +#if wxUSE_ARRAY_MEMORY_OPERATORS && !defined(__VISUALC__) && !defined( __MWERKS__) + void *operator new[] (size_t size, wxChar *fileName = 0, int lineNum = 0); + void operator delete[] (void *buf); +#endif + +#ifdef __MWERKS__ + void *operator new[] (size_t size, wxChar *fileName , int lineNum = 0); + void *operator new[] (size_t size) { return operator new[] ( size, 0, 0 ) ; } + void operator delete[] (void *buf); +#endif #endif // Debug & memory tracing -#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT) - virtual void Dump(wxSTD ostream& str); -#endif -#if wxUSE_SERIAL - virtual void StoreObject( wxObjectOutputStream &stream ); - virtual void LoadObject( wxObjectInputStream &stream ); +#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT) + virtual void Dump(wxSTD ostream& str); #endif - // make a 'clone' of the object - void Ref(const wxObject& clone); + // make a 'clone' of the object + + void Ref(const wxObject& clone); - // destroy a reference - void UnRef(void); + // destroy a reference + + void UnRef(); - inline wxObjectRefData *GetRefData(void) const { return m_refData; } - inline void SetRefData(wxObjectRefData *data) { m_refData = data; } + inline wxObjectRefData *GetRefData() const { return m_refData; } + inline void SetRefData(wxObjectRefData *data) { m_refData = data; } protected: - wxObjectRefData* m_refData; -#if wxUSE_SERIAL - wxObject_Serialize* m_serialObj; -#endif + wxObjectRefData *m_refData; }; -/* - * wxObjectData - */ - -class WXDLLEXPORT wxObjectRefData { +class WXDLLEXPORT wxObjectRefData +{ friend class wxObject; public: - wxObjectRefData(void); - virtual ~wxObjectRefData(void); + wxObjectRefData() : m_count(1) {} + virtual ~wxObjectRefData() {} - inline int GetRefCount(void) const { return m_count; } + inline int GetRefCount() const { return m_count; } private: int m_count; }; + inline wxObject *wxCheckDynamicCast(wxObject *obj, wxClassInfo *classInfo) { return obj && obj->GetClassInfo()->IsKindOf(classInfo) ? obj : 0; @@ -306,15 +413,14 @@ inline wxObject *wxCheckDynamicCast(wxObject *obj, wxClassInfo *classInfo) #define WXDEBUG_NEW new #endif -// Redefine new to be the debugging version. This doesn't -// work with all compilers, in which case you need to -// use WXDEBUG_NEW explicitly if you wish to use the debugging version. + // Redefine new to be the debugging version. This doesn't + // work with all compilers, in which case you need to + // use WXDEBUG_NEW explicitly if you wish to use the debugging version. #if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS && wxUSE_DEBUG_NEW_ALWAYS #define new new(__TFILE__,__LINE__) #endif -#endif - // _WX_OBJECTH__ - +#endif // _WX_OBJECTH__ +// vi:sts=4:sw=4:et diff --git a/include/wx/objstrm.h b/include/wx/objstrm.h deleted file mode 100644 index 8d1970df1f..0000000000 --- a/include/wx/objstrm.h +++ /dev/null @@ -1,90 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: objstrm.h -// Purpose: wxObjectStream classes -// Author: Guilhem Lavaux -// Modified by: -// Created: 16/07/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// -#ifndef _WX_WXOBJSTRM_H__ -#define _WX_WXOBJSTRM_H__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" - -#if wxUSE_STREAMS && wxUSE_SERIAL - -#include "wx/object.h" -#include "wx/string.h" -#include "wx/stream.h" - -class wxObjectStreamInfo : public wxObject { - public: - wxString object_name; - int n_children, children_removed; - wxList children; - wxObjectStreamInfo *parent; - wxObject *object; - bool duplicate, recall; -}; - -class wxObjectOutputStream : public wxFilterOutputStream { - public: - wxObjectOutputStream(wxOutputStream& s); - - void AddChild(wxObject *obj); - bool SaveObject(wxObject& obj); - - bool FirstStage() const { return m_stage == 0; } - - wxString GetObjectName(wxObject *obj); - - protected: - void WriteObjectDef(wxObjectStreamInfo& info); - void ProcessObjectDef(wxObjectStreamInfo *info); - void ProcessObjectData(wxObjectStreamInfo *info); - - protected: - int m_stage; - bool m_saving; - wxObjectStreamInfo *m_current_info; - wxList m_saved_objs; -}; - -class wxObjectInputStream : public wxFilterInputStream { - public: - wxObjectInputStream(wxInputStream& s); - - bool SecondCall() const { return m_secondcall; } - void Recall(bool on = TRUE) { m_current_info->recall = on; } - - wxObject *GetChild(int no) const; - wxObject *GetChild(); - int NumberOfChildren() const { return m_current_info->n_children; } - void RemoveChildren(int nb); - wxObject *GetParent() const; - wxObject *LoadObject(); - - wxObject *SolveName(const wxString& objName) const; - - protected: - bool ReadObjectDef(wxObjectStreamInfo *info); - wxObjectStreamInfo *ProcessObjectDef(wxObjectStreamInfo *info); - void ProcessObjectData(wxObjectStreamInfo *info); - - protected: - bool m_secondcall; - wxObjectStreamInfo *m_current_info; - wxList m_solver; -}; - -#endif - // wxUSE_STREAMS && wxUSE_SERIAL - -#endif -// _WX_WXOBJSTRM_H__ diff --git a/include/wx/resource.h b/include/wx/resource.h index 34f282c777..8eec715169 100644 --- a/include/wx/resource.h +++ b/include/wx/resource.h @@ -52,6 +52,8 @@ #undef FindResource #endif +class WXDLLEXPORT wxInputStream; + /* * Internal format for control/panel item */ @@ -153,7 +155,7 @@ class WXDLLEXPORT wxResourceTable: public wxHashTable virtual bool DeleteResource(const wxString& name); virtual bool ParseResourceFile(const wxString& filename); - virtual bool ParseResourceFile( wxInputStream *is ) ; + virtual bool ParseResourceFile(wxInputStream *is); virtual bool ParseResourceData(const wxString& data); virtual bool SaveResource(const wxString& filename); diff --git a/include/wx/serbase.h b/include/wx/serbase.h deleted file mode 100644 index 1ec7b6a52d..0000000000 --- a/include/wx/serbase.h +++ /dev/null @@ -1,67 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serbase.h -// Purpose: Serialization plug-ins -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// -#ifndef _WX_WX_SERBASEH_H__ -#define _WX_WX_SERBASEH_H__ - -#include "wx/setup.h" -#include "wx/dynlib.h" - -#define WXSERIAL(classname) classname##_Serialize - -#if wxUSE_SERIAL -class wxObject_Serialize : public wxObject { - DECLARE_DYNAMIC_CLASS(wxObject_Serialize) - public: - wxObject_Serialize() {} - virtual ~wxObject_Serialize() {} - - void SetObject(wxObject *obj) { m_object = obj; } - wxObject *Object() { return m_object; } - - protected: - wxObject *m_object; -}; -#endif - // wxUSE_SERIAL - - -#define DECLARE_SERIAL_CLASS(classname, parent) \ -class WXSERIAL(classname) : public WXSERIAL(parent) { \ - DECLARE_DYNAMIC_CLASS(classname##_Serialize) \ - public: \ - WXSERIAL(classname)() { } \ - virtual ~WXSERIAL(classname)() { } \ -\ - virtual void StoreObject(wxObjectOutputStream& stream); \ - virtual void LoadObject(wxObjectInputStream& stream); \ -}; - -#define DECLARE_ALIAS_SERIAL_CLASS(classname, parent) \ -class WXSERIAL(classname) : public WXSERIAL(parent) { \ - DECLARE_DYNAMIC_CLASS(classname##_Serialize) \ - public: \ - WXSERIAL(classname)() { } \ - virtual ~WXSERIAL(classname)() { } \ -}; - -#define IMPLEMENT_SERIAL_CLASS(classname, parent) \ -IMPLEMENT_DYNAMIC_CLASS(classname##_Serialize, parent##_Serialize) - -#define IMPLEMENT_ALIAS_SERIAL_CLASS(classname, parent) \ -IMPLEMENT_DYNAMIC_CLASS(classname##_Serialize, parent##_Serialize) - -#if wxUSE_SERIAL -DECLARE_SERIAL_CLASS(wxList, wxObject) -DECLARE_SERIAL_CLASS(wxHashTable, wxObject) -#endif - // wxUSE_SERIAL - -#endif diff --git a/include/wx/stream.h b/include/wx/stream.h index 00bf592d09..d035bde1cf 100644 --- a/include/wx/stream.h +++ b/include/wx/stream.h @@ -122,9 +122,6 @@ public: // Operators wxInputStream& operator>>(wxOutputStream& out) { return Read(out); } -#if wxUSE_SERIAL - wxInputStream& operator>>(wxObject *& obj); -#endif wxInputStream& operator>>( __wxInputManip func) { return func(*this); } protected: @@ -161,9 +158,6 @@ public: virtual void Sync(); wxOutputStream& operator<<(wxInputStream& out) { return Write(out); } -#if wxUSE_SERIAL - wxOutputStream& operator<<(wxObject& obj); -#endif wxOutputStream& operator<<( __wxOutputManip func) { return func(*this); } protected: diff --git a/setup.h.in b/setup.h.in index 0921b8c429..3ba47ad8d1 100644 --- a/setup.h.in +++ b/setup.h.in @@ -554,10 +554,6 @@ * Use streams */ #define wxUSE_STREAMS 0 -/* - * Use class serialization - */ -#define wxUSE_SERIAL 0 /* * Use sockets */ @@ -575,6 +571,10 @@ * wxLibrary class */ #define wxUSE_DYNLIB_CLASS 0 +/* + * Use wxObjectLoader + */ +#define wxUSE_DYNAMIC_LOADER 0 /* * Use wxTimer diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index 3660cc21f8..025667914b 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -37,7 +37,6 @@ #include "wx/filefn.h" #include "wx/intl.h" #include "wx/log.h" -#include "wx/tokenzr.h" // ---------------------------------------------------------------------------- // conditional compilation @@ -68,14 +67,15 @@ # define wxDllOpen(lib) shl_load(lib.fn_str(), BIND_DEFERRED, 0) # define wxDllClose shl_unload - static inline void *wxDllGetSymbol(shl_t handle, const wxString& name) - { - void *sym; - if ( shl_findsym(&handle, name.mb_str(), TYPE_UNDEFINED, &sym) == 0 ) - return sym; - else - return (void *)0; - } +static inline void *wxDllGetSymbol(shl_t handle, const wxString& name) +{ + void *sym; + if ( shl_findsym(&handle, name.mb_str(), TYPE_UNDEFINED, &sym) == 0 ) + return sym; + else + return 0; +} + #elif defined(__DARWIN__) /* Porting notes: * The dlopen port is a port from dl_next.xs by Anno Siegel. @@ -174,7 +174,7 @@ void wxLibrary::PrepareClasses(wxClassInfo *first) { if (info->m_className) classTable.Put(info->m_className, (wxObject *)info); - info = (wxClassInfo *)info->GetNext(); + info = info->m_next; } // Set base pointers for each wxClassInfo @@ -198,27 +198,19 @@ void *wxLibrary::GetSymbol(const wxString& symbname) // wxDllLoader // --------------------------------------------------------------------------- -/* static */ -wxString wxDllLoader::GetDllExt() -{ - wxString ext; #if defined(__WINDOWS__) || defined(__WXPM__) || defined(__EMX__) - ext = _T(".dll"); +const wxString wxDllLoader::ms_dllext( _T(".dll") ); #elif defined(__UNIX__) -# if defined(__HPUX__) - ext = _T(".sl"); -# else //__HPUX__ - ext = _T(".so"); -# endif //__HPUX__ +#if defined(__HPUX__) +const wxString wxDllLoader::ms_dllext( _T(".sl") ); +#else +const wxString wxDllLoader::ms_dllext( _T(".so") ); +#endif #endif - - return ext; -} /* static */ -wxDllType -wxDllLoader::GetProgramHandle(void) +wxDllType wxDllLoader::GetProgramHandle() { #if defined( HAVE_DLOPEN ) && !defined(__EMX__) // optain handle for main program @@ -233,110 +225,124 @@ wxDllLoader::GetProgramHandle(void) } /* static */ -wxDllType -wxDllLoader::LoadLibrary(const wxString & libname, bool *success) +wxDllType wxDllLoader::LoadLibrary(const wxString & libname, bool *success) { - wxDllType handle; + wxDllType handle; + bool failed = FALSE; #if defined(__WXMAC__) && !defined(__UNIX__) - FSSpec myFSSpec ; - Ptr myMainAddr ; - Str255 myErrName ; - - wxMacFilename2FSSpec( libname , &myFSSpec ) ; - if (GetDiskFragment( &myFSSpec , 0 , kCFragGoesToEOF , "\p" , kPrivateCFragCopy , &handle , &myMainAddr , - myErrName ) != noErr ) + FSSpec myFSSpec; + Ptr myMainAddr; + Str255 myErrName; + + wxMacFilename2FSSpec( libname , &myFSSpec ); + + if( GetDiskFragment( &myFSSpec, + 0, + kCFragGoesToEOF, + "\p", + kPrivateCFragCopy, + &handle, + &myMainAddr, + myErrName ) != noErr ) { - p2cstr( myErrName ) ; - wxLogSysError( _("Failed to load shared library '%s' Error '%s'") , libname.c_str() , (char*)myErrName ) ; - handle = NULL ; + p2cstr( myErrName ); + wxLogSysError( _("Failed to load shared library '%s' Error '%s'"), + libname.c_str(), + (char*)myErrName ); + handle = 0; + failed = TRUE; } + #elif defined(__WXPM__) || defined(__EMX__) - char zError[256] = ""; + char zError[256] = ""; wxDllOpen(zError, libname, handle); -#else // !Mac + +#else handle = wxDllOpen(libname); -#endif // OS + +#endif if ( !handle ) { wxString msg(_("Failed to load shared library '%s'")); #ifdef HAVE_DLERROR - const char *errmsg = dlerror(); - if ( errmsg ) - { - // the error string format is "libname: ...", but we already have - // libname, so cut it off - const char *p = strchr(errmsg, ':'); - if ( p ) - { - if ( *++p == ' ' ) - p++; - } - else - { - p = errmsg; - } - - msg += _T(" (%s)"); - wxLogError(msg, libname.c_str(), p); - } - else -#endif // HAVE_DLERROR + wxChar *err = dlerror(); + if( err ) { - wxLogSysError(msg, libname.c_str()); + failed = TRUE; + wxLogError( msg, err ); } +#else + failed = TRUE; + wxLogSysError( msg, libname.c_str() ); +#endif } if ( success ) - { - *success = handle != 0; - } + *success = !failed; return handle; } /* static */ -void -wxDllLoader::UnloadLibrary(wxDllType handle) +void wxDllLoader::UnloadLibrary(wxDllType handle) { wxDllClose(handle); } /* static */ -void * -wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name) +void *wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name, bool *success) { - void *symbol = NULL; // return value + bool failed = FALSE; + void *symbol = 0; #if defined(__WXMAC__) && !defined(__UNIX__) - Ptr symAddress ; - CFragSymbolClass symClass ; - Str255 symName ; + Ptr symAddress; + CFragSymbolClass symClass; + Str255 symName; #if TARGET_CARBON - c2pstrcpy( (StringPtr) symName , name ) ; + c2pstrcpy( (StringPtr) symName, name ); #else - strcpy( (char *) symName , name ) ; - c2pstr( (char *) symName ) ; + strcpy( (char *) symName, name ); + c2pstr( (char *) symName ); #endif + if( FindSymbol( dllHandle, symName, &symAddress, &symClass ) == noErr ) + symbol = (void *)symAddress; - if ( FindSymbol( dllHandle , symName , &symAddress , &symClass ) == noErr ) - symbol = (void *)symAddress ; -#elif defined( __WXPM__ ) || defined(__EMX__) +#elif defined(__WXPM__) || defined(__EMX__) wxDllGetSymbol(dllHandle, symbol); + #else // mb_str() is necessary in Unicode build symbol = wxDllGetSymbol(dllHandle, name.mb_str()); + #endif if ( !symbol ) { + wxString msg(_("wxDllLoader failed to GetSymbol '%s'")); + +#ifdef HAVE_DLERROR + wxChar *err = dlerror(); + if( err ) + { + failed = TRUE; + wxLogError( msg, err ); + } +#else + failed = TRUE; wxLogSysError(_("Couldn't find symbol '%s' in a dynamic library"), name.c_str()); +#endif } + + if( success ) + *success = !failed; + return symbol; } @@ -362,59 +368,26 @@ wxLibraries::~wxLibraries() wxLibrary *wxLibraries::LoadLibrary(const wxString& name) { - wxNode *node; - wxLibrary *lib; + wxLibrary *lib; wxClassInfo *old_sm_first; + wxNode *node = m_loaded.Find(name.GetData()); -#if defined(__VISAGECPP__) - node = m_loaded.Find(name.GetData()); if (node != NULL) return ((wxLibrary *)node->Data()); -#else // !OS/2 - if ( (node = m_loaded.Find(name.GetData())) != NULL) - return ((wxLibrary *)node->Data()); -#endif + // If DLL shares data, this is necessary. old_sm_first = wxClassInfo::sm_first; wxClassInfo::sm_first = NULL; wxString libname = ConstructLibraryName(name); -/* - Unix automatically builds that library name, at least for dlopen() -*/ -#if 0 -#if defined(__UNIX__) - // found the first file in LD_LIBRARY_PATH with this name - wxString libPath("/lib:/usr/lib"); // system path first - const char *envLibPath = getenv("LD_LIBRARY_PATH"); - if ( envLibPath ) - libPath << wxT(':') << envLibPath; - wxStringTokenizer tokenizer(libPath, wxT(':')); - while ( tokenizer.HasMoreToken() ) - { - wxString fullname(tokenizer.NextToken()); - - fullname << wxT('/') << libname; - if ( wxFileExists(fullname) ) - { - libname = fullname; - - // found the library - break; - } - } - //else: not found in the path, leave the name as is (secutiry risk?) - -#endif // __UNIX__ -#endif - bool success = FALSE; wxDllType handle = wxDllLoader::LoadLibrary(libname, &success); if(success) { lib = new wxLibrary(handle); wxClassInfo::sm_first = old_sm_first; + m_loaded.Append(name.GetData(), lib); } else diff --git a/src/common/dynload.cpp b/src/common/dynload.cpp new file mode 100644 index 0000000000..e4d3887695 --- /dev/null +++ b/src/common/dynload.cpp @@ -0,0 +1,598 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: dynload.cpp +// Purpose: Dynamic loading framework +// Author: Ron Lee, David Falkinder, Vadim Zeitlin and a cast of 1000's +// (derived in part from dynlib.cpp (c) 1998 Guilhem Lavaux) +// Modified by: +// Created: 03/12/01 +// RCS-ID: $Id$ +// Copyright: (c) 2001 Ron Lee +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation "dynload.h" +#endif + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#if wxUSE_DYNAMIC_LOADER + +#ifdef __WINDOWS__ +#include "wx/msw/private.h" +#endif + +#ifndef WX_PRECOMP +#include "wx/log.h" +#include "wx/intl.h" +#endif + +#include "wx/dynload.h" + +// ---------------------------------------------------------------------------- +// conditional compilation +// ---------------------------------------------------------------------------- + +#if defined(__WXPM__) || defined(__EMX__) +#define INCL_DOS +#include +#define wxDllOpen(error, lib, handle) DosLoadModule(error, sizeof(error), lib, &handle) +#define wxDllGetSymbol(handle, modaddr) DosQueryProcAddr(handle, 1L, NULL, (PFN*)modaddr) +#define wxDllClose(handle) DosFreeModule(handle) + +#elif defined(HAVE_DLOPEN) + // note about dlopen() flags: we use RTLD_NOW to have more Windows-like + // behaviour (Win won't let you load a library with missing symbols) and + // RTLD_GLOBAL because it is needed sometimes and probably doesn't hurt + // otherwise. On True64-Unix RTLD_GLOBAL is not allowed and on VMS the + // second argument on dlopen is ignored. + +#ifdef __VMS +#define wxDllOpen(lib) dlopen(lib.fn_str(), 0) + +#elif defined( __osf__ ) +#define wxDllOpen(lib) dlopen(lib.fn_str(), RTLD_LAZY) + +#else +#define wxDllOpen(lib) dlopen(lib.fn_str(), RTLD_LAZY | RTLD_GLOBAL) +#endif // __VMS + +#define wxDllGetSymbol(handle, name) dlsym(handle, name) +#define wxDllClose dlclose + +#elif defined(HAVE_SHL_LOAD) +#define wxDllOpen(lib) shl_load(lib.fn_str(), BIND_DEFERRED, 0) +#define wxDllClose shl_unload + +static inline void *wxDllGetSymbol(shl_t handle, const wxString& name) +{ + void *sym; + return ( shl_findsym(&handle, name.mb_str(), TYPE_UNDEFINED, &sym) == 0 ) + ? sym : 0; +} + +#elif defined(__DARWIN__) + + // Porting notes: + // The dlopen port is a port from dl_next.xs by Anno Siegel. + // dl_next.xs is itself a port from dl_dlopen.xs by Paul Marquess. + // The method used here is just to supply the sun style dlopen etc. + // functions in terms of Darwin NS*. + +void *dlopen(const char *path, int mode); // mode is ignored +void *dlsym(void *handle, const char *symbol); +int dlclose(void *handle); +const char *dlerror(void); + +#define wxDllOpen(lib) dlopen(lib.fn_str(), 0) +#define wxDllGetSymbol(handle, name) dlsym(handle, name) +#define wxDllClose dlclose + +#elif defined(__WINDOWS__) + + // using LoadLibraryEx under Win32 to avoid name clash with LoadLibrary + +#ifdef __WIN32__ + +#ifdef _UNICODE +#define wxDllOpen(lib) ::LoadLibraryExW(lib, 0, 0) +#else +#define wxDllOpen(lib) ::LoadLibraryExA(lib, 0, 0) +#endif + +#else // Win16 +#define wxDllOpen(lib) ::LoadLibrary(lib) +#endif // Win32/16 +#define wxDllGetSymbol(handle, name) ::GetProcAddress(handle, name) +#define wxDllClose ::FreeLibrary + +#elif defined(__WXMAC__) +#define wxDllClose(handle) CloseConnection(&handle) +#else +#error "Don't know how to load shared libraries on this platform." +#endif + + +// ============================================================================ +// implementation +// ============================================================================ + +// --------------------------------------------------------------------------- +// wxDllLoader (all these methods are static) +// --------------------------------------------------------------------------- + + +#if defined(__WINDOWS__) || defined(__WXPM__) || defined(__EMX__) +const wxString wxDllLoader::ms_dllext( _T(".dll") ); +#elif defined(__UNIX__) +#if defined(__HPUX__) +const wxString wxDllLoader::ms_dllext( _T(".sl") ); +#else +const wxString wxDllLoader::ms_dllext( _T(".so") ); +#endif +#endif + +wxDllType wxDllLoader::GetProgramHandle() +{ +#if defined( HAVE_DLOPEN ) && !defined(__EMX__) + // obtain handle for main program + return dlopen(NULL, RTLD_NOW/*RTLD_LAZY*/); +#elif defined (HAVE_SHL_LOAD) + // shl_findsymbol with NULL handle looks up in main program + return 0; +#else + wxFAIL_MSG( wxT("This method is not implemented under Windows or OS/2")); + return 0; +#endif +} + +wxDllType wxDllLoader::LoadLibrary(const wxString &name) +{ + wxString libname( name + wxDllLoader::GetDllExt() ); + wxDllType handle; + +#if defined(__WXMAC__) && !defined(__UNIX__) + FSSpec myFSSpec; + Ptr myMainAddr; + Str255 myErrName; + + wxMacFilename2FSSpec( libname , &myFSSpec ); + + if( GetDiskFragment( &myFSSpec, + 0, + kCFragGoesToEOF, + "\p", + kPrivateCFragCopy, + &handle, + &myMainAddr, + myErrName ) != noErr ) + { + p2cstr( myErrName ); + wxLogSysError( _("Failed to load shared library '%s' Error '%s'"), + libname.c_str(), + (char*)myErrName ); + handle = 0; + } + +#elif defined(__WXPM__) || defined(__EMX__) + char zError[256] = ""; + wxDllOpen(zError, libname, handle); +#else + handle = wxDllOpen(libname); +#endif + if ( !handle ) + { + wxString msg(_("Failed to load shared library '%s'")); +#ifdef HAVE_DLERROR + wxChar *err = dlerror(); + if( err ) + wxLogError( msg, err ); +#else + wxLogSysError( msg, libname.c_str() ); +#endif + } + return handle; +} + +void wxDllLoader::UnloadLibrary(wxDllType handle) +{ + wxDllClose(handle); +} + +void *wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name, bool *success) +{ + bool failed = FALSE; + void *symbol = 0; + +#if defined(__WXMAC__) && !defined(__UNIX__) + Ptr symAddress; + CFragSymbolClass symClass; + Str255 symName; +#if TARGET_CARBON + c2pstrcpy( (StringPtr) symName, name ); +#else + strcpy( (char *) symName, name ); + c2pstr( (char *) symName ); +#endif + if( FindSymbol( dllHandle, symName, &symAddress, &symClass ) == noErr ) + symbol = (void *)symAddress; + +#elif defined(__WXPM__) || defined(__EMX__) + wxDllGetSymbol(dllHandle, symbol); +#else + + // mb_str() is necessary in Unicode build + symbol = wxDllGetSymbol(dllHandle, name.mb_str()); +#endif + + if ( !symbol ) + { + wxString msg(_("wxDllLoader failed to GetSymbol '%s'")); +#ifdef HAVE_DLERROR + wxChar *err = dlerror(); + if( err ) + { + failed = TRUE; + wxLogError( msg, err ); + } +#else + failed = TRUE; + wxLogSysError(_("Couldn't find symbol '%s' in a dynamic library"), + name.c_str()); +#endif + } + if( success ) + *success = !failed; + + return symbol; +} + + +// --------------------------------------------------------------------------- +// wxDLManifestEntry +// --------------------------------------------------------------------------- + + +wxDLImports wxDLManifestEntry::ms_classes(wxKEY_STRING); + +wxDLManifestEntry::wxDLManifestEntry( const wxString &libname ) + : m_before(wxClassInfo::sm_first) + , m_handle(wxDllLoader::LoadLibrary( libname )) + , m_after(wxClassInfo::sm_first) + , m_count(1) +{ + if( m_handle != 0 ) + { + UpdateClassInfo(); + RegisterModules(); + } + else + --m_count; // Flag us for deletion +} + +wxDLManifestEntry::~wxDLManifestEntry() +{ + UnregisterModules(); + RestoreClassInfo(); + + wxDllLoader::UnloadLibrary(m_handle); +} + + +// ------------------------ +// Private methods +// ------------------------ + +void wxDLManifestEntry::UpdateClassInfo() +{ + wxClassInfo *info; + wxHashTable *t = wxClassInfo::sm_classTable; + + // FIXME: Below is simply a cut and paste specialisation of + // wxClassInfo::InitializeClasses. Once this stabilises, + // the two should probably be merged. + // + // Actually it's becoming questionable whether we should merge + // this info with the main ClassInfo tables since we can nearly + // handle this completely internally now and it does expose + // certain (minimal % user_stupidy) risks. + + for(info = m_after; info != m_before; info = info->m_next) + { + if( info->m_className ) + { + if( t->Get(info->m_className) == 0 ) + t->Put(info->m_className, (wxObject *)info); + + // Hash all the class names into a local table too so + // we can quickly find the entry they correspond to. + + if( ms_classes.Get(info->m_className) == 0 ) + ms_classes.Put(info->m_className, (wxObject *) this); + } + } + + for(info = m_after; info != m_before; info = info->m_next) + { + if( info->m_baseClassName1 ) + info->m_baseInfo1 = (wxClassInfo *)t->Get(info->m_baseClassName1); + if( info->m_baseClassName2 ) + info->m_baseInfo2 = (wxClassInfo *)t->Get(info->m_baseClassName2); + } +} + +void wxDLManifestEntry::RestoreClassInfo() +{ + wxClassInfo *info; + + for(info = m_after; info != m_before; info = info->m_next) + { + wxClassInfo::sm_classTable->Delete(info->m_className); + ms_classes.Delete(info->m_className); + } + + if( wxClassInfo::sm_first == m_after ) + wxClassInfo::sm_first = m_before; + else + { + info = wxClassInfo::sm_first; + while( info->m_next && info->m_next != m_after ) info = info->m_next; + + wxASSERT_MSG( info, _T("ClassInfo from wxDynamicLibrary not found on purge")) + + info->m_next = m_before; + } +} + +void wxDLManifestEntry::RegisterModules() +{ + // Plugin libraries might have wxModules, Register and initialise them if + // they do. + // + // Note that these classes are NOT included in the reference counting since + // it's implicit that they will be unloaded if and when the last handle to + // the library is. We do have to keep a copy of the module's pointer + // though, as there is currently no way to Unregister it without it. + + wxASSERT_MSG( m_count == 1, + _T("RegisterModules should only be called for the first load") ); + + for(wxClassInfo *info = m_after; info != m_before; info = info->m_next) + { + if( info->IsKindOf(CLASSINFO(wxModule)) ) + { + wxModule *m = wxDynamicCast(info->CreateObject(), wxModule); + + wxASSERT_MSG( m, _T("wxDynamicCast of wxModule failed") ); + + m_wxmodules.Append(m); + wxModule::RegisterModule(m); + } + } + + // FIXME: Likewise this is (well was) very similar to InitializeModules() + + for(wxModuleList::Node *node = m_wxmodules.GetFirst(); node; node->GetNext()) + { + if( !node->GetData()->Init() ) + { + wxLogDebug(_T("wxModule::Init() failed for wxDynamicLibrary")); + + // XXX: Watch this, a different hash implementation might break it, + // a good hash implementation would let us fix it though. + + // The name of the game is to remove any uninitialised modules and + // let the dtor Exit the rest on shutdown, (which we'll initiate + // shortly). + + wxModuleList::Node *oldNode = 0; + do { + node = node->GetNext(); + delete oldNode; + wxModule::UnregisterModule( node->GetData() ); + oldNode = node; + } while( node ); + + --m_count; // Flag us for deletion + break; + } + } +} + +void wxDLManifestEntry::UnregisterModules() +{ + wxModuleList::Node *node; + + for(node = m_wxmodules.GetFirst(); node; node->GetNext()) + node->GetData()->Exit(); + + for(node = m_wxmodules.GetFirst(); node; node->GetNext()) + wxModule::UnregisterModule( node->GetData() ); + + m_wxmodules.DeleteContents(TRUE); +} + + +// --------------------------------------------------------------------------- +// wxDynamicLibrary +// --------------------------------------------------------------------------- + +wxDLManifest wxDynamicLibrary::ms_manifest(wxKEY_STRING); + +// ------------------------ +// Static accessors +// ------------------------ + +wxDLManifestEntry *wxDynamicLibrary::Link(const wxString &libname) +{ + wxDLManifestEntry *entry = (wxDLManifestEntry*) ms_manifest.Get(libname); + + if( entry ) + { + entry->Ref(); + } + else + { + entry = new wxDLManifestEntry( libname ); + + if( entry->IsLoaded() ) + { + ms_manifest.Put(libname, (wxObject*) entry); + } + else + { + wxCHECK_MSG( !entry->Unref(), 0, + _T("Currently linked library is, ..not loaded??") ); + entry = 0; + } + } + return entry; +} + +bool wxDynamicLibrary::Unlink(const wxString &libname) +{ + wxDLManifestEntry *entry = (wxDLManifestEntry*) ms_manifest.Get(libname); + + if( entry ) + return entry->Unref(); + + wxLogDebug(_T("Attempt to Unlink library '%s' (which is not linked)."), libname.c_str()); + return 0; +} + +// ------------------------ +// Class implementation +// ------------------------ + +wxDynamicLibrary::wxDynamicLibrary(const wxString &libname) +{ + m_entry = (wxDLManifestEntry*) ms_manifest.Get(libname); + + if( m_entry != 0 ) + { + m_entry->Ref(); + } + else + { + m_entry = new wxDLManifestEntry( libname ); + ms_manifest.Put(libname, (wxObject*) m_entry); + + wxASSERT_MSG( m_entry != 0, _T("Failed to create manifest entry") ); + } +} + +wxDynamicLibrary::~wxDynamicLibrary() +{ + wxNode *node; + ms_manifest.BeginFind(); + + // It's either this or store the name of the lib just to do this. + + for(node = ms_manifest.Next(); node; node = ms_manifest.Next()) + if( (wxDLManifestEntry*)node->GetData() == m_entry ) + break; + + if( m_entry && m_entry->Unref() ) + delete node; +} + + +#ifdef __DARWIN__ +// --------------------------------------------------------------------------- +// For Darwin/Mac OS X +// supply the sun style dlopen functions in terms of Darwin NS* +// --------------------------------------------------------------------------- + +extern "C" { +#import +}; + +enum dyldErrorSource +{ + OFImage, +}; + +static char dl_last_error[1024]; + +static +void TranslateError(const char *path, enum dyldErrorSource type, int number) +{ + unsigned int index; + static char *OFIErrorStrings[] = + { + "%s(%d): Object Image Load Failure\n", + "%s(%d): Object Image Load Success\n", + "%s(%d): Not an recognisable object file\n", + "%s(%d): No valid architecture\n", + "%s(%d): Object image has an invalid format\n", + "%s(%d): Invalid access (permissions?)\n", + "%s(%d): Unknown error code from NSCreateObjectFileImageFromFile\n", + }; +#define NUM_OFI_ERRORS (sizeof(OFIErrorStrings) / sizeof(OFIErrorStrings[0])) + + switch (type) + { + case OFImage: + index = number; + if (index > NUM_OFI_ERRORS - 1) { + index = NUM_OFI_ERRORS - 1; + } + sprintf(dl_last_error, OFIErrorStrings[index], path, number); + break; + + default: + sprintf(dl_last_error, "%s(%d): Totally unknown error type %d\n", + path, number, type); + break; + } +} + +const char *dlerror() +{ + return dl_last_error; +} +void *dlopen(const char *path, int mode /* mode is ignored */) +{ + int dyld_result; + NSObjectFileImage ofile; + NSModule handle = 0; + + dyld_result = NSCreateObjectFileImageFromFile(path, &ofile); + if(dyld_result != NSObjectFileImageSuccess) + { + TranslateError(path, OFImage, dyld_result); + } + else + { + // NSLinkModule will cause the run to abort on any link error's + // not very friendly but the error recovery functionality is limited. + handle = NSLinkModule(ofile, path, TRUE); + } + + return handle; +} + +int dlclose(void *handle) /* stub only */ +{ + return 0; +} + +void *dlsym(void *handle, const char *symbol) +{ + return NSIsSymbolNameDefined(symbol) + ? NSAddressOfSymbol( NSLookupAndBindSymbol(symbol) ) + : 0 ; +} + +#endif // __DARWIN__ +#endif // wxUSE_DYNAMIC_LOADER + +// vi:sts=4:sw=4:et diff --git a/src/common/filename.cpp b/src/common/filename.cpp index d5fcbb5495..df431a87a5 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -61,19 +61,20 @@ // ---------------------------------------------------------------------------- #ifdef __GNUG__ - #pragma implementation "filename.h" +#pragma implementation "filename.h" #endif // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ - #pragma hdrstop +#pragma hdrstop #endif #ifndef WX_PRECOMP - #include "wx/intl.h" - #include "wx/log.h" +#include "wx/intl.h" +#include "wx/log.h" +#include "wx/file.h" #endif #include "wx/filename.h" @@ -82,35 +83,34 @@ #include "wx/utils.h" #include "wx/file.h" -#if wxUSE_DYNLIB_CLASS - #include "wx/dynlib.h" +#if wxUSE_DYNAMIC_LOADER || wxUSE_DYNLIB_CLASS +#include "wx/dynlib.h" #endif // For GetShort/LongPathName #ifdef __WIN32__ - #include - - #include "wx/msw/winundef.h" +#include +#include "wx/msw/winundef.h" #endif // utime() is POSIX so should normally be available on all Unices #ifdef __UNIX_LIKE__ - #include - #include - #include - #include +#include +#include +#include +#include #endif #ifdef __MWERKS__ - #include - #include - #include +#include +#include +#include #endif #ifdef __WATCOMC__ - #include - #include - #include +#include +#include +#include #endif #ifdef __VISAGECPP__ @@ -1238,7 +1238,7 @@ wxString wxFileName::GetLongPath() const bool success = FALSE; // VZ: this code was disabled, why? -#if 0 // wxUSE_DYNLIB_CLASS +#if 0 // wxUSE_DYNAMIC_LOADER typedef DWORD (*GET_LONG_PATH_NAME)(const wxChar *, wxChar *, DWORD); static bool s_triedToLoad = FALSE; @@ -1286,7 +1286,7 @@ wxString wxFileName::GetLongPath() const } if (success) return pathOut; -#endif // wxUSE_DYNLIB_CLASS +#endif // wxUSE_DYNAMIC_LOADER if (!success) { diff --git a/src/common/module.cpp b/src/common/module.cpp index f1d0bebed7..0853642073 100644 --- a/src/common/module.cpp +++ b/src/common/module.cpp @@ -42,6 +42,11 @@ void wxModule::RegisterModule(wxModule* module) m_modules.Append(module); } +void wxModule::UnregisterModule(wxModule* module) +{ + m_modules.DeleteObject(module); +} + // Collect up all module-derived classes, create an instance of each, // and register them. void wxModule::RegisterModules() diff --git a/src/common/object.cpp b/src/common/object.cpp index 20e531a1f2..120d0afac5 100644 --- a/src/common/object.cpp +++ b/src/common/object.cpp @@ -2,10 +2,11 @@ // Name: object.cpp // Purpose: wxObject implementation // Author: Julian Smart -// Modified by: +// Modified by: Ron Lee // Created: 04/01/98 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem +// Copyright: (c) 1998 Julian Smart and Markus Holzem +// (c) 2001 Ron Lee // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// @@ -13,7 +14,8 @@ #pragma implementation "object.h" #endif -// For compilers that support precompilation, includes "wx.h". + // For compilers that support precompilation, includes "wx.h". + #include "wx/wxprec.h" #ifdef __BORLANDC__ @@ -21,20 +23,7 @@ #endif #ifndef WX_PRECOMP - #include "wx/hash.h" - #if wxUSE_SERIAL - #include "wx/objstrm.h" - #include "wx/serbase.h" - - // for error messages - #include "wx/log.h" - #include "wx/intl.h" - #endif // wxUSE_SERIAL -#endif // WX_PRECOMP - -#ifdef __VISAGECPP__ - #include "wx/objstrm.h" - #include "wx/serbase.h" +#include "wx/hash.h" #endif #include @@ -46,62 +35,39 @@ #if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT // for wxObject::Dump - #include "wx/ioswrap.h" - #if defined(__VISAGECPP__) - // help with VA debugging - #define DEBUG_PRINTF(NAME) { static int raz=0; \ - printf( #NAME " %i\n",raz); fflush(stdout); \ - raz++; \ - } - #else - #define DEBUG_PRINTF(NAME) - #endif -#endif +#include "wx/ioswrap.h" -wxClassInfo wxObject::sm_classwxObject((wxChar *) wxT("wxObject"), (wxChar *) NULL, (wxChar *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL); -wxClassInfo* wxClassInfo::sm_first = (wxClassInfo *) NULL; -wxHashTable* wxClassInfo::sm_classTable = (wxHashTable*) NULL; +#if defined(__VISAGECPP__) +#define DEBUG_PRINTF(NAME) { static int raz=0; \ + printf( #NAME " %i\n",raz); fflush(stdout); raz++; } +#else +#define DEBUG_PRINTF(NAME) +#endif -// These are here so we can avoid 'always true/false' warnings -// by referring to these instead of TRUE/FALSE -const bool wxTrue = TRUE; -const bool wxFalse = FALSE; +#endif -/* - * wxWindows root object. - */ + +wxClassInfo wxObject::sm_classwxObject( wxT("wxObject"), 0, 0, + (int) sizeof(wxObject), + (wxObjectConstructorFn) 0 ); +wxClassInfo* wxClassInfo::sm_first = 0; +wxHashTable* wxClassInfo::sm_classTable = 0; -wxObject::wxObject() -{ - m_refData = (wxObjectRefData *) NULL; -#if wxUSE_SERIAL - m_serialObj = (wxObject_Serialize *)NULL; -#endif -} + // These are here so we can avoid 'always true/false' warnings + // by referring to these instead of TRUE/FALSE -wxObject::~wxObject() -{ - UnRef(); -#if wxUSE_SERIAL - if (m_serialObj) - delete m_serialObj; -#endif -} +const bool wxTrue = TRUE; +const bool wxFalse = FALSE; -/* - * Is this object a kind of (a subclass of) 'info'? - * E.g. is wxWindow a kind of wxObject? - * Go from this class to superclass, taking into account - * two possible base classes. - */ + // Is this object a kind of (a subclass of) 'info'? + // E.g. is wxWindow a kind of wxObject? + // Go from this class to superclass, taking into account + // two possible base classes. bool wxObject::IsKindOf(wxClassInfo *info) const { wxClassInfo *thisInfo = GetClassInfo(); - if (thisInfo) - return thisInfo->IsKindOf(info); - else - return FALSE; + return (thisInfo) ? thisInfo->IsKindOf(info) : FALSE ; } #if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT) @@ -120,115 +86,64 @@ void wxObject::Dump(wxSTD ostream& str) #undef new #endif -void *wxObject::operator new (size_t size, wxChar * fileName, int lineNum) +void *wxObject::operator new (size_t size, wxChar *fileName, int lineNum) { return wxDebugAlloc(size, fileName, lineNum, TRUE); } -#if defined(__VISAGECPP__) -# if __DEBUG_ALLOC__ -void wxObject::operator delete (void * buf,const char * _fname, size_t _line) +#ifndef __VISAGECPP__ +void wxObject::operator delete (void *buf) { wxDebugFree(buf); } -# endif //__DEBUG_ALLOC__ -#else -void wxObject::operator delete (void * buf) +#elif __DEBUG_ALLOC__ +void wxObject::operator delete (void *buf, const char *_fname, size_t _line) { wxDebugFree(buf); } -#endif // __VISAGECPP__ +#endif + + // VC++ 6.0 -// VC++ 6.0 #if defined(__VISUALC__) && (__VISUALC__ >= 1200) -void wxObject::operator delete(void* pData, wxChar* /* fileName */, int /* lineNum */) +void wxObject::operator delete(void *pData, wxChar *WXUNUSED(fileName), int WXUNUSED(lineNum)) { ::operator delete(pData); } #endif -// Cause problems for VC++ - crashes + // Cause problems for VC++ - crashes + #if (!defined(__VISUALC__) && wxUSE_ARRAY_MEMORY_OPERATORS ) || defined(__MWERKS__) -void * wxObject::operator new[] (size_t size, wxChar * fileName, int lineNum) +void *wxObject::operator new[] (size_t size, wxChar *fileName, int lineNum) { return wxDebugAlloc(size, fileName, lineNum, TRUE, TRUE); } -void wxObject::operator delete[] (void * buf) +void wxObject::operator delete[] (void *buf) { wxDebugFree(buf, TRUE); } #endif -#endif - -/* - * Class info: provides run-time class type information. - */ - -wxClassInfo::wxClassInfo(const wxChar *cName, - const wxChar *baseName1, - const wxChar *baseName2, - int sz, - wxObjectConstructorFn constr) -{ - m_className = cName; - m_baseClassName1 = baseName1; - m_baseClassName2 = baseName2; - - m_objectSize = sz; - m_objectConstructor = constr; +#endif // __WXDEBUG__ && wxUSE_MEMORY_TRACING - m_next = sm_first; - sm_first = this; - m_baseInfo1 = (wxClassInfo *) NULL; - m_baseInfo2 = (wxClassInfo *) NULL; -} +// ---------------------------------------------------------------------------- +// wxClassInfo +// ---------------------------------------------------------------------------- -wxObject *wxClassInfo::CreateObject() +wxClassInfo *wxClassInfo::FindClass(const wxChar *className) { - if (m_objectConstructor) - return (wxObject *)(*m_objectConstructor)(); - else - return (wxObject *) NULL; -} - -wxClassInfo *wxClassInfo::FindClass(const wxChar *c) -{ - wxClassInfo *p = sm_first; - while (p) - { - if ( wxStrcmp(p->GetClassName(), c) == 0 ) - break; + for(wxClassInfo *info = sm_first; info ; info = info->m_next) + if( wxStrcmp(info->GetClassName(), className) == 0 ) + return info; - p = p->m_next; - } - - return p; + return 0; } -// Climb upwards through inheritance hierarchy. -// Dual inheritance is catered for. -bool wxClassInfo::IsKindOf(const wxClassInfo *info) const -{ - if (info == NULL) - return FALSE; - - if (this == info) - return TRUE; - - if (m_baseInfo1) - if (m_baseInfo1->IsKindOf(info)) - return TRUE; - - if (m_baseInfo2) - return m_baseInfo2->IsKindOf(info); + // Set pointers to base class(es) to speed up IsKindOf - return FALSE; -} - -// Set pointers to base class(es) to speed up IsKindOf void wxClassInfo::InitializeClasses() { // using IMPLEMENT_DYNAMIC_CLASS() macro twice (which may happen if you @@ -236,47 +151,45 @@ void wxClassInfo::InitializeClasses() // because it will enter an infinite loop and eventually die with "out of // memory" - as this is quite hard to detect if you're unaware of this, // try to do some checks here + #ifdef __WXDEBUG__ - // more classes than we'll ever have - static const size_t nMaxClasses = 10000; + static const size_t nMaxClasses = 10000; // more than we'll ever have size_t nClass = 0; -#endif // Debug +#endif wxClassInfo::sm_classTable = new wxHashTable(wxKEY_STRING); - // Index all class infos by their class name - wxClassInfo *info = sm_first; - while (info) + // Index all class infos by their class name + + wxClassInfo *info; + for(info = sm_first; info; info = info->m_next) { if (info->m_className) { wxASSERT_MSG( ++nClass < nMaxClasses, _T("an infinite loop detected - have you used IMPLEMENT_DYNAMIC_CLASS() twice (may be by linking some object module(s) twice)?") ); - sm_classTable->Put(info->m_className, (wxObject *)info); } - - info = info->m_next; } - // Set base pointers for each wxClassInfo - info = sm_first; - while (info) + // Set base pointers for each wxClassInfo + + for(info = sm_first; info; info = info->m_next) { if (info->GetBaseClassName1()) info->m_baseInfo1 = (wxClassInfo *)sm_classTable->Get(info->GetBaseClassName1()); if (info->GetBaseClassName2()) info->m_baseInfo2 = (wxClassInfo *)sm_classTable->Get(info->GetBaseClassName2()); - info = info->m_next; } } void wxClassInfo::CleanUpClasses() { delete wxClassInfo::sm_classTable; - wxClassInfo::sm_classTable = NULL; + wxClassInfo::sm_classTable = 0; } + wxObject *wxCreateDynamicObject(const wxChar *name) { #if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT @@ -286,104 +199,34 @@ wxObject *wxCreateDynamicObject(const wxChar *name) if (wxClassInfo::sm_classTable) { wxClassInfo *info = (wxClassInfo *)wxClassInfo::sm_classTable->Get(name); - if (!info) - return (wxObject *)NULL; - - return info->CreateObject(); + return info != 0 ? info->CreateObject() : 0; } else { - wxClassInfo *info = wxClassInfo::sm_first; - while (info) - { + for(wxClassInfo *info = wxClassInfo::sm_first; info; info = info->m_next) if (info->m_className && wxStrcmp(info->m_className, name) == 0) return info->CreateObject(); - info = info->m_next; - } - return (wxObject*) NULL; + return 0; } } -#if wxUSE_SERIAL - -#include "wx/serbase.h" -#include "wx/dynlib.h" -wxObject* wxCreateStoredObject( wxInputStream &stream ) -{ - wxObjectInputStream obj_s(stream); - return obj_s.LoadObject(); -}; - -void wxObject::StoreObject( wxObjectOutputStream& stream ) -{ -#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT - DEBUG_PRINTF(wxObject::StoreObject) -#endif - - wxString obj_name = wxString(GetClassInfo()->GetClassName()) + "_Serialize"; - wxLibrary *lib = wxTheLibraries.LoadLibrary("wxserial"); - - if (!lib) { - wxLogError(_("Can't load wxSerial dynamic library.")); - return; - } - if (!m_serialObj) { - m_serialObj = (WXSERIAL(wxObject) *)lib->CreateObject( obj_name ); - - if (!m_serialObj) { - wxLogError(_("Can't find the serialization object '%s' " - "for the object '%s'."), - obj_name.c_str(), - GetClassInfo()->GetClassName()); - return; - } - m_serialObj->SetObject(this); - } - - m_serialObj->StoreObject(stream); -} - -void wxObject::LoadObject( wxObjectInputStream& stream ) -{ -#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT - DEBUG_PRINTF(wxObject::LoadObject) -#endif - - wxString obj_name = wxString(GetClassInfo()->GetClassName()) + "_Serialize"; - wxLibrary *lib = wxTheLibraries.LoadLibrary("wxserial"); - - if (!m_serialObj) { - m_serialObj = (WXSERIAL(wxObject) *)lib->CreateObject( obj_name ); - - if (!m_serialObj) { - wxLogError(_("Can't find the serialization object '%s' " - "for the object '%s'."), - obj_name.c_str(), - GetClassInfo()->GetClassName()); - return; - } - m_serialObj->SetObject(this); - } - - m_serialObj->LoadObject(stream); -} - -#endif // wxUSE_SERIAL - -/* - * wxObject: cloning of objects - */ +// ---------------------------------------------------------------------------- +// wxClassInfo +// ---------------------------------------------------------------------------- void wxObject::Ref(const wxObject& clone) { #if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT DEBUG_PRINTF(wxObject::Ref) #endif - // delete reference to old data + + // delete reference to old data UnRef(); + // reference new data - if (clone.m_refData) { + if( clone.m_refData ) + { m_refData = clone.m_refData; ++(m_refData->m_count); } @@ -391,27 +234,16 @@ void wxObject::Ref(const wxObject& clone) void wxObject::UnRef() { - if ( m_refData ) + if( m_refData ) { wxASSERT_MSG( m_refData->m_count > 0, _T("invalid ref data count") ); if ( !--m_refData->m_count ) delete m_refData; - m_refData = (wxObjectRefData *) NULL; + m_refData = 0; } } -/* - * wxObjectData - */ - -wxObjectRefData::wxObjectRefData(void) : m_count(1) -{ -} - -wxObjectRefData::~wxObjectRefData() -{ -} #if defined(__DARWIN__) && defined(DYLIB_INIT) @@ -420,11 +252,11 @@ extern "C" { void wxWindowsDylibInit(void); }; -// Dynamic shared library (dylib) initialization routine -// required to initialize static C++ objects bacause of lazy dynamic linking -// http://developer.apple.com/techpubs/macosx/Essentials/ -// SystemOverview/Frameworks/Dynamic_Shared_Libraries.html -// + // Dynamic shared library (dylib) initialization routine + // required to initialize static C++ objects bacause of lazy dynamic linking + // http://developer.apple.com/techpubs/macosx/Essentials/ + // SystemOverview/Frameworks/Dynamic_Shared_Libraries.html + void wxWindowsDylibInit() { // The function __initialize_Cplusplus() must be called from the shared @@ -435,3 +267,5 @@ void wxWindowsDylibInit() } #endif + +// vi:sts=4:sw=4:et diff --git a/src/common/objstrm.cpp b/src/common/objstrm.cpp deleted file mode 100644 index e0156b200d..0000000000 --- a/src/common/objstrm.cpp +++ /dev/null @@ -1,326 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: objstrm.cpp -// Purpose: wxObjectStream classes -// Author: Guilhem Lavaux -// Modified by: -// Created: 16/07/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ - #pragma implementation "objstrm.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -#if wxUSE_SERIAL && wxUSE_STREAMS - -#include "wx/object.h" -#include "wx/objstrm.h" -#include "wx/datstrm.h" - -#define WXOBJ_BEGIN "OBEGIN" -#define WXOBJ_BEG_LEN 6 - -#define TAG_EMPTY_OBJECT "NULL" -#define TAG_DUPLICATE_OBJECT "DUPLIC" - -// ---------------------------------------------------------------------------- -// wxObjectOutputStream -// ---------------------------------------------------------------------------- - -wxObjectOutputStream::wxObjectOutputStream(wxOutputStream& s) - : wxFilterOutputStream(s) -{ - m_saving = FALSE; -} - -wxString wxObjectOutputStream::GetObjectName(wxObject *obj) -{ - wxString name; - - name.Printf(wxT("%x"), (unsigned long)obj); - return name; -} - -void wxObjectOutputStream::WriteObjectDef(wxObjectStreamInfo& info) -{ - wxDataOutputStream data_s(*this); - - Write(WXOBJ_BEGIN, WXOBJ_BEG_LEN); - - if (info.duplicate) { - data_s.WriteString(TAG_DUPLICATE_OBJECT); - data_s.WriteString(GetObjectName(info.object)); - wxPrintf(wxT("info.object (dup %s)\n"), info.object->GetClassInfo()->GetClassName()); - return; - } - - if (info.object) { - data_s.WriteString(info.object->GetClassInfo()->GetClassName()); - wxPrintf(wxT("info.object (%s)\n"), info.object->GetClassInfo()->GetClassName()); - } else { - data_s.WriteString(TAG_EMPTY_OBJECT); - wxPrintf(wxT("info.object (NULL)\n")); - return; - } - - data_s.WriteString(GetObjectName(info.object)); - - // I assume an object will not have millions of children - // Hmmm ... it could have (for example wxGrid) - data_s.Write32(info.children.Number()); -} - -void wxObjectOutputStream::AddChild(wxObject *obj) -{ - wxObjectStreamInfo *info; - - if (!FirstStage()) - return; - - info = new wxObjectStreamInfo; - - if (m_saved_objs.Member(obj) != NULL) { - info->duplicate = TRUE; - } else { - info->duplicate = FALSE; - m_saved_objs.Append(obj); - } - if (!obj) - info->duplicate = FALSE; - - info->n_children = 0; - info->object = obj; - info->parent = m_current_info; // Not useful here. - m_current_info->n_children++; - m_current_info->children.Append(info); -} - -void wxObjectOutputStream::ProcessObjectDef(wxObjectStreamInfo *info) -{ - wxNode *node; - - m_current_info = info; - // First stage: get children of obj - if (info->object && !info->duplicate) - info->object->StoreObject(*this); - - // Prepare and write the sub-entry about the child obj. - WriteObjectDef(*info); - - node = info->children.First(); - - while (node) { - ProcessObjectDef((wxObjectStreamInfo *)node->Data()); - node = node->Next(); - } -} - -void wxObjectOutputStream::ProcessObjectData(wxObjectStreamInfo *info) -{ - wxNode *node = info->children.First(); - - m_current_info = info; - - if (info->object && !info->duplicate) - info->object->StoreObject(*this); - - while (node) { - ProcessObjectData((wxObjectStreamInfo *)node->Data()); - node = node->Next(); - } -} - -bool wxObjectOutputStream::SaveObject(wxObject& obj) -{ - wxObjectStreamInfo info; - - if (m_saving) - return FALSE; - - m_saving = TRUE; - - // First stage - m_stage = 0; - info.object = &obj; - info.n_children = 0; - info.duplicate = FALSE; - ProcessObjectDef(&info); - - m_stage = 1; - ProcessObjectData(&info); - - info.children.Clear(); - m_saved_objs.Clear(); - - m_saving = FALSE; - - return TRUE; -} - -// ---------------------------------------------------------------------------- -// wxObjectInputStream -// ---------------------------------------------------------------------------- - -wxObjectInputStream::wxObjectInputStream(wxInputStream& s) - : wxFilterInputStream(s) -{ - m_secondcall = FALSE; -} - -wxObject *wxObjectInputStream::SolveName(const wxString& name) const -{ - wxNode *node = m_solver.First(); - wxObjectStreamInfo *info; - - while (node) { - info = (wxObjectStreamInfo *)node->Data(); - if (info->object_name == name) - return info->object; - - node = node->Next(); - } - return (wxObject *) NULL; -} - -wxObject *wxObjectInputStream::GetParent() const -{ - if (!m_current_info->parent) - return (wxObject *) NULL; - - return m_current_info->parent->object; -} - -wxObject *wxObjectInputStream::GetChild() -{ - wxObject *obj = GetChild(0); - - m_current_info->children_removed++; - - return obj; -} - -wxObject *wxObjectInputStream::GetChild(int no) const -{ - wxNode *node; - wxObjectStreamInfo *info; - - if (m_current_info->children_removed >= m_current_info->n_children) - return (wxObject *) NULL; - - node = m_current_info->children.Nth(m_current_info->children_removed+no); - - if (!node) - return (wxObject *) NULL; - - info = (wxObjectStreamInfo *)node->Data(); - - return info->object; -} - -void wxObjectInputStream::RemoveChildren(int nb) -{ - m_current_info->children_removed += nb; -} - -bool wxObjectInputStream::ReadObjectDef(wxObjectStreamInfo *info) -{ - wxDataInputStream data_s(*this); - char sig[WXOBJ_BEG_LEN+1]; - wxString class_name; - - Read(sig, WXOBJ_BEG_LEN); - sig[WXOBJ_BEG_LEN] = 0; - if (wxString(sig) != WXOBJ_BEGIN) - return FALSE; - - class_name = data_s.ReadString(); - info->children_removed = 0; - info->n_children = 0; - - if (class_name == TAG_EMPTY_OBJECT) - info->object = (wxObject *) NULL; - else if (class_name == TAG_DUPLICATE_OBJECT) { - info->object_name = data_s.ReadString(); - info->object = SolveName(info->object_name); - } else { - info->object_name = data_s.ReadString(); - info->object = wxCreateDynamicObject( WXSTRINGCAST class_name); - info->n_children = data_s.Read32(); - } - return TRUE; -} - -wxObjectStreamInfo *wxObjectInputStream::ProcessObjectDef(wxObjectStreamInfo *parent) -{ - wxObjectStreamInfo *info, *c_info; - int c; - - info = new wxObjectStreamInfo; - info->parent = parent; - info->children.DeleteContents(TRUE); - - m_solver.Append(info); - - if (!ReadObjectDef(info)) - return (wxObjectStreamInfo *) NULL; - - for (c=0;cn_children;c++) { - c_info = ProcessObjectDef(info); - if (!c_info) - return (wxObjectStreamInfo *) NULL; - info->children.Append(c_info); - } - - return info; -} - -void wxObjectInputStream::ProcessObjectData(wxObjectStreamInfo *info) -{ - wxNode *node = info->children.First(); - - m_current_info = info; - - if (info->object) - info->object->LoadObject(*this); - while (node) { - ProcessObjectData((wxObjectStreamInfo *)node->Data()); - node = node->Next(); - } - - m_current_info = info; - - if (info->recall) { - m_secondcall = TRUE; - info->object->LoadObject(*this); - m_secondcall = FALSE; - } -} - -wxObject *wxObjectInputStream::LoadObject() -{ - wxObjectStreamInfo *info; - wxObject *object; - - info = ProcessObjectDef((wxObjectStreamInfo *) NULL); - if (!info) - return (wxObject *) NULL; - ProcessObjectData(info); - - object = info->object; - - delete info; // It's magic ! The whole tree is destroyed. - - return object; -} - -#endif // wxUSE_SERIAL && wxUSE_STREAMS - diff --git a/src/common/serbase.cpp b/src/common/serbase.cpp deleted file mode 100644 index 6b89bea73d..0000000000 --- a/src/common/serbase.cpp +++ /dev/null @@ -1,126 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serbase.cpp -// Purpose: wxStream base classes -// Author: Robert Roebling -// Modified by: -// Created: 11/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Robert Roebling -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "serbase.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" -#if defined(__WINDOWS__) -#include "wx/msw/private.h" -#endif - -#include "wx/serbase.h" -#include "wx/datstrm.h" -#include "wx/objstrm.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#if wxUSE_SERIAL - -// ---------------------------------------------------------------------------- -// wxObject_Serialize -// ---------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxObject_Serialize,wxObject) - -IMPLEMENT_SERIAL_CLASS(wxList, wxObject) -IMPLEMENT_SERIAL_CLASS(wxHashTable, wxObject) - -void WXSERIAL(wxList)::StoreObject(wxObjectOutputStream& s) -{ - wxList *lst_object = (wxList *)Object(); - wxNode *node = lst_object->First(); - - if (s.FirstStage()) { - while (node) { - s.AddChild(node->Data()); - node = node->Next(); - } - return; - } - - wxDataOutputStream data_s(s); - - data_s.Write8(lst_object->GetDeleteContents()); - data_s.Write8(lst_object->GetKeyType()); - data_s.Write32( lst_object->Number() ); - - if (lst_object->GetKeyType() == wxKEY_INTEGER) { - while (node) { - data_s.Write32((size_t)node->GetKeyInteger()); - node = node->Next(); - } - } else { - while (node) { - data_s.WriteString(node->GetKeyString()); - node = node->Next(); - } - } -} - -void WXSERIAL(wxList)::LoadObject(wxObjectInputStream& s) -{ - wxDataInputStream data_s(s); - wxList *list = (wxList *)Object(); - int number, i; - - list->DeleteContents( data_s.Read8() != 0 ); - list->SetKeyType( (wxKeyType) data_s.Read8() ); - number = data_s.Read32(); - - if (list->GetKeyType() == wxKEY_INTEGER) { - for (i=0;iAppend( data_s.Read32(), s.GetChild() ); - } else { - for (i=0;iAppend( data_s.ReadString(), s.GetChild() ); - } -} - -// ---------------------------------------------------------------------------- - -void WXSERIAL(wxHashTable)::StoreObject(wxObjectOutputStream& s) -{ - wxHashTable *table = (wxHashTable *)Object(); - int i; - - if (s.FirstStage()) { - for (i=0;in;i++) - s.AddChild(table->hash_table[i]); - return; - } - - wxDataOutputStream data_s(s); - - data_s.Write8(table->key_type); - data_s.Write32(table->n); -} - -void WXSERIAL(wxHashTable)::LoadObject(wxObjectInputStream& s) -{ - wxHashTable *table = (wxHashTable *)Object(); - wxDataInputStream data_s(s); - int i, key, n; - - key = data_s.Read8(); - n = data_s.Read32(); - - table->Create(key, n); - - for (i=0;ihash_table[i] = (wxList *)s.GetChild(); -} - -#endif // wxUSE_SERIAL diff --git a/src/common/stream.cpp b/src/common/stream.cpp index a65c6154d8..048544a225 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -38,7 +38,6 @@ #include #include "wx/stream.h" #include "wx/datstrm.h" -#include "wx/objstrm.h" #include "wx/textfile.h" // ---------------------------------------------------------------------------- @@ -850,19 +849,6 @@ off_t wxInputStream::TellI() const return pos; } -// -------------------- -// Overloaded operators -// -------------------- - -#if wxUSE_SERIAL -wxInputStream& wxInputStream::operator>>(wxObject *& obj) -{ - wxObjectInputStream obj_s(*this); - obj = obj_s.LoadObject(); - return *this; -} -#endif // wxUSE_SERIAL - // ---------------------------------------------------------------------------- // wxOutputStream @@ -913,14 +899,6 @@ void wxOutputStream::Sync() { } -#if wxUSE_SERIAL -wxOutputStream& wxOutputStream::operator<<(wxObject& obj) -{ - wxObjectOutputStream obj_s(*this); - obj_s.SaveObject(obj); - return *this; -} -#endif // wxUSE_SERIAL // ---------------------------------------------------------------------------- // wxCountingOutputStream diff --git a/src/files.lst b/src/files.lst index 1c9f01c609..141958b90f 100644 --- a/src/files.lst +++ b/src/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 16:36, 2001/11/20 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BASE.T! ALL_SOURCES = \ common/init.cpp \ @@ -13,6 +13,7 @@ ALL_SOURCES = \ common/dircmn.cpp \ common/dynarray.cpp \ common/dynlib.cpp \ + common/dynload.cpp \ common/encconv.cpp \ common/event.cpp \ common/extended.c \ @@ -39,7 +40,6 @@ ALL_SOURCES = \ common/module.cpp \ common/mstream.cpp \ common/object.cpp \ - common/objstrm.cpp \ common/process.cpp \ common/protocol.cpp \ common/regex.cpp \ @@ -47,7 +47,6 @@ ALL_SOURCES = \ common/sckfile.cpp \ common/sckipc.cpp \ common/sckstrm.cpp \ - common/serbase.cpp \ common/socket.cpp \ common/strconv.cpp \ common/stream.cpp \ @@ -106,6 +105,7 @@ ALL_HEADERS = \ dir.h \ dynarray.h \ dynlib.h \ + dynload.h \ encconv.h \ event.h \ ffile.h \ @@ -135,14 +135,12 @@ ALL_HEADERS = \ module.h \ mstream.h \ object.h \ - objstrm.h \ platform.h \ process.h \ regex.h \ sckaddr.h \ sckipc.h \ sckstrm.h \ - serbase.h \ snglinst.h \ socket.h \ strconv.h \ @@ -189,6 +187,7 @@ BASE_OBJS = \ dircmn.o \ dynarray.o \ dynlib.o \ + dynload.o \ encconv.o \ event.o \ extended.o \ @@ -215,7 +214,6 @@ BASE_OBJS = \ module.o \ mstream.o \ object.o \ - objstrm.o \ process.o \ protocol.o \ regex.o \ @@ -223,7 +221,6 @@ BASE_OBJS = \ sckfile.o \ sckipc.o \ sckstrm.o \ - serbase.o \ socket.o \ strconv.o \ stream.o \ diff --git a/src/gtk/files.lst b/src/gtk/files.lst index 43b7446982..1003bfffef 100644 --- a/src/gtk/files.lst +++ b/src/gtk/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 16:36, 2001/11/20 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T! ALL_SOURCES = \ generic/accel.cpp \ @@ -75,6 +75,7 @@ ALL_SOURCES = \ common/dseldlg.cpp \ common/dynarray.cpp \ common/dynlib.cpp \ + common/dynload.cpp \ common/effects.cpp \ common/encconv.cpp \ common/event.cpp \ @@ -125,7 +126,6 @@ ALL_SOURCES = \ common/mstream.cpp \ common/nbkbase.cpp \ common/object.cpp \ - common/objstrm.cpp \ common/paper.cpp \ common/popupcmn.cpp \ common/prntbase.cpp \ @@ -139,7 +139,6 @@ ALL_SOURCES = \ common/sckfile.cpp \ common/sckipc.cpp \ common/sckstrm.cpp \ - common/serbase.cpp \ common/sizer.cpp \ common/socket.cpp \ common/statbar.cpp \ @@ -322,6 +321,7 @@ ALL_HEADERS = \ dragimag.h \ dynarray.h \ dynlib.h \ + dynload.h \ encconv.h \ event.h \ expr.h \ @@ -396,7 +396,6 @@ ALL_HEADERS = \ mstream.h \ notebook.h \ object.h \ - objstrm.h \ odbc.h \ ownerdrw.h \ palette.h \ @@ -424,7 +423,6 @@ ALL_HEADERS = \ sckstrm.h \ scrolbar.h \ scrolwin.h \ - serbase.h \ settings.h \ sizer.h \ slider.h \ @@ -642,6 +640,7 @@ COMMONOBJS = \ dseldlg.o \ dynarray.o \ dynlib.o \ + dynload.o \ effects.o \ encconv.o \ event.o \ @@ -692,7 +691,6 @@ COMMONOBJS = \ mstream.o \ nbkbase.o \ object.o \ - objstrm.o \ paper.o \ popupcmn.o \ prntbase.o \ @@ -706,7 +704,6 @@ COMMONOBJS = \ sckfile.o \ sckipc.o \ sckstrm.o \ - serbase.o \ sizer.o \ socket.o \ statbar.o \ diff --git a/src/gtk1/files.lst b/src/gtk1/files.lst index 43b7446982..1003bfffef 100644 --- a/src/gtk1/files.lst +++ b/src/gtk1/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 16:36, 2001/11/20 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T! ALL_SOURCES = \ generic/accel.cpp \ @@ -75,6 +75,7 @@ ALL_SOURCES = \ common/dseldlg.cpp \ common/dynarray.cpp \ common/dynlib.cpp \ + common/dynload.cpp \ common/effects.cpp \ common/encconv.cpp \ common/event.cpp \ @@ -125,7 +126,6 @@ ALL_SOURCES = \ common/mstream.cpp \ common/nbkbase.cpp \ common/object.cpp \ - common/objstrm.cpp \ common/paper.cpp \ common/popupcmn.cpp \ common/prntbase.cpp \ @@ -139,7 +139,6 @@ ALL_SOURCES = \ common/sckfile.cpp \ common/sckipc.cpp \ common/sckstrm.cpp \ - common/serbase.cpp \ common/sizer.cpp \ common/socket.cpp \ common/statbar.cpp \ @@ -322,6 +321,7 @@ ALL_HEADERS = \ dragimag.h \ dynarray.h \ dynlib.h \ + dynload.h \ encconv.h \ event.h \ expr.h \ @@ -396,7 +396,6 @@ ALL_HEADERS = \ mstream.h \ notebook.h \ object.h \ - objstrm.h \ odbc.h \ ownerdrw.h \ palette.h \ @@ -424,7 +423,6 @@ ALL_HEADERS = \ sckstrm.h \ scrolbar.h \ scrolwin.h \ - serbase.h \ settings.h \ sizer.h \ slider.h \ @@ -642,6 +640,7 @@ COMMONOBJS = \ dseldlg.o \ dynarray.o \ dynlib.o \ + dynload.o \ effects.o \ encconv.o \ event.o \ @@ -692,7 +691,6 @@ COMMONOBJS = \ mstream.o \ nbkbase.o \ object.o \ - objstrm.o \ paper.o \ popupcmn.o \ prntbase.o \ @@ -706,7 +704,6 @@ COMMONOBJS = \ sckfile.o \ sckipc.o \ sckstrm.o \ - serbase.o \ sizer.o \ socket.o \ statbar.o \ diff --git a/src/mac/carbon/files.lst b/src/mac/carbon/files.lst index 90b18fe90a..f286d8750c 100644 --- a/src/mac/carbon/files.lst +++ b/src/mac/carbon/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 16:36, 2001/11/20 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MAC.T! ALL_SOURCES = \ generic/busyinfo.cpp \ @@ -70,6 +70,7 @@ ALL_SOURCES = \ common/dseldlg.cpp \ common/dynarray.cpp \ common/dynlib.cpp \ + common/dynload.cpp \ common/effects.cpp \ common/encconv.cpp \ common/event.cpp \ @@ -120,7 +121,6 @@ ALL_SOURCES = \ common/mstream.cpp \ common/nbkbase.cpp \ common/object.cpp \ - common/objstrm.cpp \ common/odbc.cpp \ common/paper.cpp \ common/popupcmn.cpp \ @@ -134,7 +134,6 @@ ALL_SOURCES = \ common/sckfile.cpp \ common/sckipc.cpp \ common/sckstrm.cpp \ - common/serbase.cpp \ common/sizer.cpp \ common/socket.cpp \ common/statbar.cpp \ @@ -327,6 +326,7 @@ ALL_HEADERS = \ dragimag.h \ dynarray.h \ dynlib.h \ + dynload.h \ encconv.h \ event.h \ expr.h \ @@ -401,7 +401,6 @@ ALL_HEADERS = \ mstream.h \ notebook.h \ object.h \ - objstrm.h \ odbc.h \ ownerdrw.h \ palette.h \ @@ -429,7 +428,6 @@ ALL_HEADERS = \ sckstrm.h \ scrolbar.h \ scrolwin.h \ - serbase.h \ settings.h \ sizer.h \ slider.h \ @@ -665,6 +663,7 @@ COMMONOBJS = \ dseldlg.o \ dynarray.o \ dynlib.o \ + dynload.o \ effects.o \ encconv.o \ event.o \ @@ -715,7 +714,6 @@ COMMONOBJS = \ mstream.o \ nbkbase.o \ object.o \ - objstrm.o \ odbc.o \ paper.o \ popupcmn.o \ @@ -729,7 +727,6 @@ COMMONOBJS = \ sckfile.o \ sckipc.o \ sckstrm.o \ - serbase.o \ sizer.o \ socket.o \ statbar.o \ diff --git a/src/mac/files.lst b/src/mac/files.lst index 90b18fe90a..f286d8750c 100644 --- a/src/mac/files.lst +++ b/src/mac/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 16:36, 2001/11/20 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MAC.T! ALL_SOURCES = \ generic/busyinfo.cpp \ @@ -70,6 +70,7 @@ ALL_SOURCES = \ common/dseldlg.cpp \ common/dynarray.cpp \ common/dynlib.cpp \ + common/dynload.cpp \ common/effects.cpp \ common/encconv.cpp \ common/event.cpp \ @@ -120,7 +121,6 @@ ALL_SOURCES = \ common/mstream.cpp \ common/nbkbase.cpp \ common/object.cpp \ - common/objstrm.cpp \ common/odbc.cpp \ common/paper.cpp \ common/popupcmn.cpp \ @@ -134,7 +134,6 @@ ALL_SOURCES = \ common/sckfile.cpp \ common/sckipc.cpp \ common/sckstrm.cpp \ - common/serbase.cpp \ common/sizer.cpp \ common/socket.cpp \ common/statbar.cpp \ @@ -327,6 +326,7 @@ ALL_HEADERS = \ dragimag.h \ dynarray.h \ dynlib.h \ + dynload.h \ encconv.h \ event.h \ expr.h \ @@ -401,7 +401,6 @@ ALL_HEADERS = \ mstream.h \ notebook.h \ object.h \ - objstrm.h \ odbc.h \ ownerdrw.h \ palette.h \ @@ -429,7 +428,6 @@ ALL_HEADERS = \ sckstrm.h \ scrolbar.h \ scrolwin.h \ - serbase.h \ settings.h \ sizer.h \ slider.h \ @@ -665,6 +663,7 @@ COMMONOBJS = \ dseldlg.o \ dynarray.o \ dynlib.o \ + dynload.o \ effects.o \ encconv.o \ event.o \ @@ -715,7 +714,6 @@ COMMONOBJS = \ mstream.o \ nbkbase.o \ object.o \ - objstrm.o \ odbc.o \ paper.o \ popupcmn.o \ @@ -729,7 +727,6 @@ COMMONOBJS = \ sckfile.o \ sckipc.o \ sckstrm.o \ - serbase.o \ sizer.o \ socket.o \ statbar.o \ diff --git a/src/mgl/files.lst b/src/mgl/files.lst index 45e7a47780..a03d589568 100644 --- a/src/mgl/files.lst +++ b/src/mgl/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 20:44, 2001/12/09 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T! ALL_SOURCES = \ generic/accel.cpp \ @@ -73,6 +73,7 @@ ALL_SOURCES = \ common/dseldlg.cpp \ common/dynarray.cpp \ common/dynlib.cpp \ + common/dynload.cpp \ common/effects.cpp \ common/encconv.cpp \ common/event.cpp \ @@ -123,7 +124,6 @@ ALL_SOURCES = \ common/mstream.cpp \ common/nbkbase.cpp \ common/object.cpp \ - common/objstrm.cpp \ common/odbc.cpp \ common/paper.cpp \ common/popupcmn.cpp \ @@ -138,7 +138,6 @@ ALL_SOURCES = \ common/sckfile.cpp \ common/sckipc.cpp \ common/sckstrm.cpp \ - common/serbase.cpp \ common/sizer.cpp \ common/socket.cpp \ common/statbar.cpp \ @@ -283,6 +282,7 @@ ALL_HEADERS = \ dragimag.h \ dynarray.h \ dynlib.h \ + dynload.h \ encconv.h \ event.h \ expr.h \ @@ -357,7 +357,6 @@ ALL_HEADERS = \ mstream.h \ notebook.h \ object.h \ - objstrm.h \ odbc.h \ ownerdrw.h \ palette.h \ @@ -385,7 +384,6 @@ ALL_HEADERS = \ sckstrm.h \ scrolbar.h \ scrolwin.h \ - serbase.h \ settings.h \ sizer.h \ slider.h \ @@ -603,6 +601,7 @@ COMMONOBJS = \ dseldlg.o \ dynarray.o \ dynlib.o \ + dynload.o \ effects.o \ encconv.o \ event.o \ @@ -653,7 +652,6 @@ COMMONOBJS = \ mstream.o \ nbkbase.o \ object.o \ - objstrm.o \ odbc.o \ paper.o \ popupcmn.o \ @@ -668,7 +666,6 @@ COMMONOBJS = \ sckfile.o \ sckipc.o \ sckstrm.o \ - serbase.o \ sizer.o \ socket.o \ statbar.o \ diff --git a/src/mgl/makefile.wat b/src/mgl/makefile.wat index ef43abac92..1c6346aac2 100644 --- a/src/mgl/makefile.wat +++ b/src/mgl/makefile.wat @@ -1,6 +1,6 @@ #!/binb/wmake.exe -# This file was automatically generated by tmake at 20:44, 2001/12/09 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T! # @@ -115,6 +115,7 @@ COMMONOBJS = & dseldlg.obj & dynarray.obj & dynlib.obj & + dynload.obj & effects.obj & encconv.obj & event.obj & @@ -165,7 +166,6 @@ COMMONOBJS = & mstream.obj & nbkbase.obj & object.obj & - objstrm.obj & odbc.obj & paper.obj & popupcmn.obj & @@ -180,7 +180,6 @@ COMMONOBJS = & sckfile.obj & sckipc.obj & sckstrm.obj & - serbase.obj & sizer.obj & socket.obj & statbar.obj & @@ -593,6 +592,9 @@ dynarray.obj: $(COMMDIR)\dynarray.cpp dynlib.obj: $(COMMDIR)\dynlib.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< +dynload.obj: $(COMMDIR)\dynload.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + effects.obj: $(COMMDIR)\effects.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< @@ -743,9 +745,6 @@ nbkbase.obj: $(COMMDIR)\nbkbase.cpp object.obj: $(COMMDIR)\object.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< -objstrm.obj: $(COMMDIR)\objstrm.cpp - *$(CCC) $(CPPFLAGS) $(IFLAGS) $< - odbc.obj: $(COMMDIR)\odbc.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< @@ -788,9 +787,6 @@ sckipc.obj: $(COMMDIR)\sckipc.cpp sckstrm.obj: $(COMMDIR)\sckstrm.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< -serbase.obj: $(COMMDIR)\serbase.cpp - *$(CCC) $(CPPFLAGS) $(IFLAGS) $< - sizer.obj: $(COMMDIR)\sizer.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< diff --git a/src/motif/files.lst b/src/motif/files.lst index f01bfe0c04..3e5509e5bd 100644 --- a/src/motif/files.lst +++ b/src/motif/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 21:46, 2001/11/21 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MOTIF.T! ALL_SOURCES = \ generic/busyinfo.cpp \ @@ -74,6 +74,7 @@ ALL_SOURCES = \ common/dseldlg.cpp \ common/dynarray.cpp \ common/dynlib.cpp \ + common/dynload.cpp \ common/effects.cpp \ common/encconv.cpp \ common/event.cpp \ @@ -124,7 +125,6 @@ ALL_SOURCES = \ common/mstream.cpp \ common/nbkbase.cpp \ common/object.cpp \ - common/objstrm.cpp \ common/paper.cpp \ common/popupcmn.cpp \ common/prntbase.cpp \ @@ -138,7 +138,6 @@ ALL_SOURCES = \ common/sckfile.cpp \ common/sckipc.cpp \ common/sckstrm.cpp \ - common/serbase.cpp \ common/sizer.cpp \ common/socket.cpp \ common/statbar.cpp \ @@ -313,6 +312,7 @@ ALL_HEADERS = \ dragimag.h \ dynarray.h \ dynlib.h \ + dynload.h \ encconv.h \ event.h \ expr.h \ @@ -387,7 +387,6 @@ ALL_HEADERS = \ mstream.h \ notebook.h \ object.h \ - objstrm.h \ odbc.h \ ownerdrw.h \ palette.h \ @@ -415,7 +414,6 @@ ALL_HEADERS = \ sckstrm.h \ scrolbar.h \ scrolwin.h \ - serbase.h \ settings.h \ sizer.h \ slider.h \ @@ -629,6 +627,7 @@ COMMONOBJS = \ dseldlg.o \ dynarray.o \ dynlib.o \ + dynload.o \ effects.o \ encconv.o \ event.o \ @@ -679,7 +678,6 @@ COMMONOBJS = \ mstream.o \ nbkbase.o \ object.o \ - objstrm.o \ paper.o \ popupcmn.o \ prntbase.o \ @@ -693,7 +691,6 @@ COMMONOBJS = \ sckfile.o \ sckipc.o \ sckstrm.o \ - serbase.o \ sizer.o \ socket.o \ statbar.o \ diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index ff5cdfa3db..b3ac982fcf 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -44,11 +44,11 @@ #include "wx/msw/private.h" // must be before #include "dynlib.h" -#if !wxUSE_DYNLIB_CLASS - #error You need wxUSE_DYNLIB_CLASS to be 1 to compile dialup.cpp. -#endif - +#if wxUSE_DYNAMIC_LOADER || wxUSE_DYNLIB_CLASS #include "wx/dynlib.h" +#else +#error You need wxUSE_DYNAMIC_LOADER to be 1 to compile dialup.cpp. +#endif #include "wx/dialup.h" @@ -355,7 +355,7 @@ wxDialUpManagerMSW::wxDialUpManagerMSW() if ( !ms_nDllCount++ ) { // load the RAS library - ms_dllRas = wxDllLoader::LoadLibrary("RASAPI32"); + ms_dllRas = wxDllLoader::LoadLibrary(_T("RASAPI32")); if ( !ms_dllRas ) { wxLogError(_("Dial up functions are unavailable because the remote access service (RAS) is not installed on this machine. Please install it.")); @@ -964,9 +964,8 @@ bool wxDialUpManagerMSW::IsAlwaysOnline() const } // try to use WinInet function first - bool ok; - wxDllType hDll = wxDllLoader::LoadLibrary(_T("WININET"), &ok); - if ( ok ) + wxDllType hDll = wxDllLoader::LoadLibrary(_T("WININET")); + if ( hDll ) { typedef BOOL (WINAPI *INTERNETGETCONNECTEDSTATE)(LPDWORD, DWORD); INTERNETGETCONNECTEDSTATE pfnInternetGetConnectedState; diff --git a/src/msw/files.lst b/src/msw/files.lst index f4cb9ad31b..31f4e5e841 100644 --- a/src/msw/files.lst +++ b/src/msw/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 16:36, 2001/11/20 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MSW.T! ALL_SOURCES = \ generic/busyinfo.cpp \ @@ -58,6 +58,7 @@ ALL_SOURCES = \ common/dseldlg.cpp \ common/dynarray.cpp \ common/dynlib.cpp \ + common/dynload.cpp \ common/effects.cpp \ common/encconv.cpp \ common/event.cpp \ @@ -108,7 +109,6 @@ ALL_SOURCES = \ common/mstream.cpp \ common/nbkbase.cpp \ common/object.cpp \ - common/objstrm.cpp \ common/paper.cpp \ common/popupcmn.cpp \ common/prntbase.cpp \ @@ -122,7 +122,6 @@ ALL_SOURCES = \ common/sckfile.cpp \ common/sckipc.cpp \ common/sckstrm.cpp \ - common/serbase.cpp \ common/sizer.cpp \ common/socket.cpp \ common/statbar.cpp \ @@ -340,6 +339,7 @@ ALL_HEADERS = \ dragimag.h \ dynarray.h \ dynlib.h \ + dynload.h \ encconv.h \ event.h \ expr.h \ @@ -414,7 +414,6 @@ ALL_HEADERS = \ mstream.h \ notebook.h \ object.h \ - objstrm.h \ odbc.h \ ownerdrw.h \ palette.h \ @@ -442,7 +441,6 @@ ALL_HEADERS = \ sckstrm.h \ scrolbar.h \ scrolwin.h \ - serbase.h \ settings.h \ sizer.h \ slider.h \ @@ -699,6 +697,7 @@ COMMONOBJS = \ dseldlg.o \ dynarray.o \ dynlib.o \ + dynload.o \ effects.o \ encconv.o \ event.o \ @@ -749,7 +748,6 @@ COMMONOBJS = \ mstream.o \ nbkbase.o \ object.o \ - objstrm.o \ paper.o \ popupcmn.o \ prntbase.o \ @@ -763,7 +761,6 @@ COMMONOBJS = \ sckfile.o \ sckipc.o \ sckstrm.o \ - serbase.o \ sizer.o \ socket.o \ statbar.o \ diff --git a/src/msw/helpchm.cpp b/src/msw/helpchm.cpp index d8e5426f5a..37035ff455 100644 --- a/src/msw/helpchm.cpp +++ b/src/msw/helpchm.cpp @@ -28,8 +28,11 @@ #if wxUSE_HELP && wxUSE_MS_HTML_HELP && defined(__WIN95__) #include "wx/msw/helpchm.h" + +#if wxUSE_DYNAMIC_LOADER || wxUSE_DYNLIB_CLASS #include "wx/dynlib.h" - +#endif + #ifndef WX_PRECOMP #include #endif diff --git a/src/msw/makefile.b32 b/src/msw/makefile.b32 index d21dfab1f7..1f1764bde2 100644 --- a/src/msw/makefile.b32 +++ b/src/msw/makefile.b32 @@ -1,6 +1,6 @@ -# This file was automatically generated by tmake at 16:36, 2001/11/20 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T! # @@ -142,6 +142,7 @@ COMMONOBJS = \ $(MSWDIR)\dseldlg.obj \ $(MSWDIR)\dynarray.obj \ $(MSWDIR)\dynlib.obj \ + $(MSWDIR)\dynload.obj \ $(MSWDIR)\effects.obj \ $(MSWDIR)\encconv.obj \ $(MSWDIR)\event.obj \ @@ -192,7 +193,6 @@ COMMONOBJS = \ $(MSWDIR)\mstream.obj \ $(MSWDIR)\nbkbase.obj \ $(MSWDIR)\object.obj \ - $(MSWDIR)\objstrm.obj \ $(MSWDIR)\odbc.obj \ $(MSWDIR)\paper.obj \ $(MSWDIR)\popupcmn.obj \ @@ -207,7 +207,6 @@ COMMONOBJS = \ $(MSWDIR)\sckfile.obj \ $(MSWDIR)\sckipc.obj \ $(MSWDIR)\sckstrm.obj \ - $(MSWDIR)\serbase.obj \ $(MSWDIR)\sizer.obj \ $(MSWDIR)\socket.obj \ $(MSWDIR)\statbar.obj \ @@ -689,6 +688,8 @@ $(MSWDIR)\dynarray.obj: $(COMMDIR)\dynarray.$(SRCSUFF) $(MSWDIR)\dynlib.obj: $(COMMDIR)\dynlib.$(SRCSUFF) +$(MSWDIR)\dynload.obj: $(COMMDIR)\dynload.$(SRCSUFF) + $(MSWDIR)\effects.obj: $(COMMDIR)\effects.$(SRCSUFF) $(MSWDIR)\encconv.obj: $(COMMDIR)\encconv.$(SRCSUFF) @@ -789,8 +790,6 @@ $(MSWDIR)\nbkbase.obj: $(COMMDIR)\nbkbase.$(SRCSUFF) $(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF) -$(MSWDIR)\objstrm.obj: $(COMMDIR)\objstrm.$(SRCSUFF) - $(MSWDIR)\odbc.obj: $(COMMDIR)\odbc.$(SRCSUFF) $(MSWDIR)\paper.obj: $(COMMDIR)\paper.$(SRCSUFF) @@ -819,8 +818,6 @@ $(MSWDIR)\sckipc.obj: $(COMMDIR)\sckipc.$(SRCSUFF) $(MSWDIR)\sckstrm.obj: $(COMMDIR)\sckstrm.$(SRCSUFF) -$(MSWDIR)\serbase.obj: $(COMMDIR)\serbase.$(SRCSUFF) - $(MSWDIR)\sizer.obj: $(COMMDIR)\sizer.$(SRCSUFF) $(MSWDIR)\socket.obj: $(COMMDIR)\socket.$(SRCSUFF) diff --git a/src/msw/makefile.bcc b/src/msw/makefile.bcc index c57a10877a..89ef56d89b 100644 --- a/src/msw/makefile.bcc +++ b/src/msw/makefile.bcc @@ -1,6 +1,6 @@ -# This file was automatically generated by tmake at 16:36, 2001/11/20 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T! # @@ -129,6 +129,7 @@ COMMONOBJS = \ $(MSWDIR)\dseldlg.obj \ $(MSWDIR)\dynarray.obj \ $(MSWDIR)\dynlib.obj \ + $(MSWDIR)\dynload.obj \ $(MSWDIR)\effects.obj \ $(MSWDIR)\encconv.obj \ $(MSWDIR)\event.obj \ @@ -171,7 +172,6 @@ COMMONOBJS = \ $(MSWDIR)\mstream.obj \ $(MSWDIR)\nbkbase.obj \ $(MSWDIR)\object.obj \ - $(MSWDIR)\objstrm.obj \ $(MSWDIR)\paper.obj \ $(MSWDIR)\popupcmn.obj \ $(MSWDIR)\prntbase.obj \ @@ -179,7 +179,6 @@ COMMONOBJS = \ $(MSWDIR)\radiocmn.obj \ $(MSWDIR)\regex.obj \ $(MSWDIR)\resource.obj \ - $(MSWDIR)\serbase.obj \ $(MSWDIR)\sizer.obj \ $(MSWDIR)\statbar.obj \ $(MSWDIR)\strconv.obj \ @@ -551,6 +550,8 @@ $(MSWDIR)\dynarray.obj: $(COMMDIR)\dynarray.$(SRCSUFF) $(MSWDIR)\dynlib.obj: $(COMMDIR)\dynlib.$(SRCSUFF) +$(MSWDIR)\dynload.obj: $(COMMDIR)\dynload.$(SRCSUFF) + $(MSWDIR)\effects.obj: $(COMMDIR)\effects.$(SRCSUFF) $(MSWDIR)\encconv.obj: $(COMMDIR)\encconv.$(SRCSUFF) @@ -635,8 +636,6 @@ $(MSWDIR)\nbkbase.obj: $(COMMDIR)\nbkbase.$(SRCSUFF) $(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF) -$(MSWDIR)\objstrm.obj: $(COMMDIR)\objstrm.$(SRCSUFF) - $(MSWDIR)\paper.obj: $(COMMDIR)\paper.$(SRCSUFF) $(MSWDIR)\popupcmn.obj: $(COMMDIR)\popupcmn.$(SRCSUFF) @@ -651,8 +650,6 @@ $(MSWDIR)\regex.obj: $(COMMDIR)\regex.$(SRCSUFF) $(MSWDIR)\resource.obj: $(COMMDIR)\resource.$(SRCSUFF) -$(MSWDIR)\serbase.obj: $(COMMDIR)\serbase.$(SRCSUFF) - $(MSWDIR)\sizer.obj: $(COMMDIR)\sizer.$(SRCSUFF) $(MSWDIR)\statbar.obj: $(COMMDIR)\statbar.$(SRCSUFF) diff --git a/src/msw/makefile.dos b/src/msw/makefile.dos index 0a7dd00d0a..abeec3f4c6 100644 --- a/src/msw/makefile.dos +++ b/src/msw/makefile.dos @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 16:36, 2001/11/20 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T! # @@ -113,6 +113,7 @@ COMMONOBJS1 = \ $(COMMDIR)\dseldlg.obj \ $(COMMDIR)\dynarray.obj \ $(COMMDIR)\dynlib.obj \ + $(COMMDIR)\dynload.obj \ $(COMMDIR)\effects.obj \ $(COMMDIR)\encconv.obj \ $(COMMDIR)\event.obj \ @@ -155,7 +156,6 @@ COMMONOBJS1 = \ $(COMMDIR)\mstream.obj \ $(COMMDIR)\nbkbase.obj \ $(COMMDIR)\object.obj \ - $(COMMDIR)\objstrm.obj \ $(COMMDIR)\odbc.obj COMMONOBJS2 = \ @@ -166,7 +166,6 @@ COMMONOBJS2 = \ $(COMMDIR)\radiocmn.obj \ $(COMMDIR)\regex.obj \ $(COMMDIR)\resource.obj \ - $(COMMDIR)\serbase.obj \ $(COMMDIR)\sizer.obj \ $(COMMDIR)\statbar.obj \ $(COMMDIR)\strconv.obj \ @@ -900,6 +899,11 @@ $(COMMDIR)/dynlib.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << +$(COMMDIR)/dynload.obj: $*.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) +<< + $(COMMDIR)/effects.obj: $*.$(SRCSUFF) cl @<< $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) @@ -1110,11 +1114,6 @@ $(COMMDIR)/object.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << -$(COMMDIR)/objstrm.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - $(COMMDIR)/odbc.obj: $*.$(SRCSUFF) cl @<< $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) @@ -1155,11 +1154,6 @@ $(COMMDIR)/resource.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << -$(COMMDIR)/serbase.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - $(COMMDIR)/sizer.obj: $*.$(SRCSUFF) cl @<< $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) diff --git a/src/msw/makefile.g95 b/src/msw/makefile.g95 index 7a30787bbd..c815cf36a3 100644 --- a/src/msw/makefile.g95 +++ b/src/msw/makefile.g95 @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 16:36, 2001/11/20 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T! # @@ -129,6 +129,7 @@ COMMONOBJS = \ $(COMMDIR)/dseldlg.$(OBJSUFF) \ $(COMMDIR)/dynarray.$(OBJSUFF) \ $(COMMDIR)/dynlib.$(OBJSUFF) \ + $(COMMDIR)/dynload.$(OBJSUFF) \ $(COMMDIR)/effects.$(OBJSUFF) \ $(COMMDIR)/encconv.$(OBJSUFF) \ $(COMMDIR)/event.$(OBJSUFF) \ @@ -179,7 +180,6 @@ COMMONOBJS = \ $(COMMDIR)/mstream.$(OBJSUFF) \ $(COMMDIR)/nbkbase.$(OBJSUFF) \ $(COMMDIR)/object.$(OBJSUFF) \ - $(COMMDIR)/objstrm.$(OBJSUFF) \ $(COMMDIR)/paper.$(OBJSUFF) \ $(COMMDIR)/popupcmn.$(OBJSUFF) \ $(COMMDIR)/prntbase.$(OBJSUFF) \ @@ -193,7 +193,6 @@ COMMONOBJS = \ $(COMMDIR)/sckfile.$(OBJSUFF) \ $(COMMDIR)/sckipc.$(OBJSUFF) \ $(COMMDIR)/sckstrm.$(OBJSUFF) \ - $(COMMDIR)/serbase.$(OBJSUFF) \ $(COMMDIR)/sizer.$(OBJSUFF) \ $(COMMDIR)/socket.$(OBJSUFF) \ $(COMMDIR)/statbar.$(OBJSUFF) \ @@ -502,7 +501,7 @@ else endif #ARCHINCDIR=$(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/lib/msw$(INCEXT)) -ARCHINCDIR=$(WXDIR)/lib/msw$(INCEXT) +ARCHINCDIR=(WXDIR)/lib/msw$(INCEXT) SETUP_H=$(ARCHINCDIR)/wx/setup.h diff --git a/src/msw/makefile.sc b/src/msw/makefile.sc index cbef35cd65..652cec59a4 100644 --- a/src/msw/makefile.sc +++ b/src/msw/makefile.sc @@ -1,6 +1,6 @@ -# This file was automatically generated by tmake at 16:36, 2001/11/20 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T! # Symantec C++ makefile for the msw objects @@ -85,6 +85,7 @@ COMMONOBJS = \ $(COMMDIR)\dseldlg.obj \ $(COMMDIR)\dynarray.obj \ $(COMMDIR)\dynlib.obj \ + $(COMMDIR)\dynload.obj \ $(COMMDIR)\effects.obj \ $(COMMDIR)\encconv.obj \ $(COMMDIR)\event.obj \ @@ -135,7 +136,6 @@ COMMONOBJS = \ $(COMMDIR)\mstream.obj \ $(COMMDIR)\nbkbase.obj \ $(COMMDIR)\object.obj \ - $(COMMDIR)\objstrm.obj \ $(COMMDIR)\odbc.obj \ $(COMMDIR)\paper.obj \ $(COMMDIR)\popupcmn.obj \ @@ -150,7 +150,6 @@ COMMONOBJS = \ $(COMMDIR)\sckfile.obj \ $(COMMDIR)\sckipc.obj \ $(COMMDIR)\sckstrm.obj \ - $(COMMDIR)\serbase.obj \ $(COMMDIR)\sizer.obj \ $(COMMDIR)\socket.obj \ $(COMMDIR)\statbar.obj \ diff --git a/src/msw/makefile.vc b/src/msw/makefile.vc index 98e416cbf1..5b4066495b 100644 --- a/src/msw/makefile.vc +++ b/src/msw/makefile.vc @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 12:26, 2001/12/01 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE VC.T! # File: makefile.vc @@ -164,6 +164,7 @@ COMMONOBJS = \ $(COMMDIR)\$D\dseldlg.obj \ $(COMMDIR)\$D\dynarray.obj \ $(COMMDIR)\$D\dynlib.obj \ + $(COMMDIR)\$D\dynload.obj \ $(COMMDIR)\$D\effects.obj \ $(COMMDIR)\$D\encconv.obj \ $(COMMDIR)\$D\event.obj \ @@ -214,7 +215,6 @@ COMMONOBJS = \ $(COMMDIR)\$D\mstream.obj \ $(COMMDIR)\$D\nbkbase.obj \ $(COMMDIR)\$D\object.obj \ - $(COMMDIR)\$D\objstrm.obj \ $(COMMDIR)\$D\odbc.obj \ $(COMMDIR)\$D\paper.obj \ $(COMMDIR)\$D\popupcmn.obj \ @@ -229,7 +229,6 @@ COMMONOBJS = \ $(COMMDIR)\$D\sckfile.obj \ $(COMMDIR)\$D\sckipc.obj \ $(COMMDIR)\$D\sckstrm.obj \ - $(COMMDIR)\$D\serbase.obj \ $(COMMDIR)\$D\sizer.obj \ $(COMMDIR)\$D\socket.obj \ $(COMMDIR)\$D\statbar.obj \ diff --git a/src/msw/makefile.wat b/src/msw/makefile.wat index e7488870b2..3f4afd0c56 100644 --- a/src/msw/makefile.wat +++ b/src/msw/makefile.wat @@ -1,6 +1,6 @@ #!/binb/wmake.exe -# This file was automatically generated by tmake at 00:10, 2001/12/09 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T! # @@ -123,6 +123,7 @@ COMMONOBJS = & dseldlg.obj & dynarray.obj & dynlib.obj & + dynload.obj & effects.obj & encconv.obj & event.obj & @@ -173,7 +174,6 @@ COMMONOBJS = & mstream.obj & nbkbase.obj & object.obj & - objstrm.obj & odbc.obj & paper.obj & popupcmn.obj & @@ -188,7 +188,6 @@ COMMONOBJS = & sckfile.obj & sckipc.obj & sckstrm.obj & - serbase.obj & sizer.obj & socket.obj & statbar.obj & @@ -803,6 +802,9 @@ dynarray.obj: $(COMMDIR)\dynarray.cpp dynlib.obj: $(COMMDIR)\dynlib.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< +dynload.obj: $(COMMDIR)\dynload.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + effects.obj: $(COMMDIR)\effects.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< @@ -953,9 +955,6 @@ nbkbase.obj: $(COMMDIR)\nbkbase.cpp object.obj: $(COMMDIR)\object.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< -objstrm.obj: $(COMMDIR)\objstrm.cpp - *$(CCC) $(CPPFLAGS) $(IFLAGS) $< - odbc.obj: $(COMMDIR)\odbc.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< @@ -998,9 +997,6 @@ sckipc.obj: $(COMMDIR)\sckipc.cpp sckstrm.obj: $(COMMDIR)\sckstrm.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< -serbase.obj: $(COMMDIR)\serbase.cpp - *$(CCC) $(CPPFLAGS) $(IFLAGS) $< - sizer.obj: $(COMMDIR)\sizer.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< diff --git a/src/os2/files.lst b/src/os2/files.lst index 002aa38c92..b89e268c85 100644 --- a/src/os2/files.lst +++ b/src/os2/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 14:59, 2001/10/09 +# This file was automatically generated by tmake at 18:48, 2001/12/10 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE OS2.T! ALL_SOURCES = \ generic/busyinfo.cpp \ @@ -65,8 +65,10 @@ ALL_SOURCES = \ common/dobjcmn.cpp \ common/docmdi.cpp \ common/docview.cpp \ + common/dseldlg.cpp \ common/dynarray.cpp \ common/dynlib.cpp \ + common/dynload.cpp \ common/effects.cpp \ common/encconv.cpp \ common/event.cpp \ @@ -117,7 +119,6 @@ ALL_SOURCES = \ common/mstream.cpp \ common/nbkbase.cpp \ common/object.cpp \ - common/objstrm.cpp \ common/paper.cpp \ common/popupcmn.cpp \ common/prntbase.cpp \ @@ -131,14 +132,15 @@ ALL_SOURCES = \ common/sckfile.cpp \ common/sckipc.cpp \ common/sckstrm.cpp \ - common/serbase.cpp \ common/sizer.cpp \ common/socket.cpp \ + common/statbar.cpp \ common/strconv.cpp \ common/stream.cpp \ common/string.cpp \ common/sysopt.cpp \ common/tbarbase.cpp \ + common/textbuf.cpp \ common/textcmn.cpp \ common/textfile.cpp \ common/timercmn.cpp \ @@ -319,6 +321,7 @@ ALL_HEADERS = \ dragimag.h \ dynarray.h \ dynlib.h \ + dynload.h \ encconv.h \ event.h \ expr.h \ @@ -382,6 +385,7 @@ ALL_HEADERS = \ mdi.h \ memconf.h \ memory.h \ + memtext.h \ menu.h \ menuitem.h \ metafile.h \ @@ -392,13 +396,13 @@ ALL_HEADERS = \ mstream.h \ notebook.h \ object.h \ - objstrm.h \ odbc.h \ ownerdrw.h \ palette.h \ panel.h \ paper.h \ pen.h \ + platform.h \ popupwin.h \ print.h \ printdlg.h \ @@ -419,9 +423,7 @@ ALL_HEADERS = \ sckstrm.h \ scrolbar.h \ scrolwin.h \ - serbase.h \ settings.h \ - setup.h \ sizer.h \ slider.h \ snglinst.h \ @@ -445,6 +447,7 @@ ALL_HEADERS = \ taskbar.h \ tbarbase.h \ tbarsmpl.h \ + textbuf.h \ textctrl.h \ textdlg.h \ textfile.h \ @@ -639,8 +642,10 @@ COMMONOBJS = \ dobjcmn.o \ docmdi.o \ docview.o \ + dseldlg.o \ dynarray.o \ dynlib.o \ + dynload.o \ effects.o \ encconv.o \ event.o \ @@ -691,7 +696,6 @@ COMMONOBJS = \ mstream.o \ nbkbase.o \ object.o \ - objstrm.o \ paper.o \ popupcmn.o \ prntbase.o \ @@ -705,14 +709,15 @@ COMMONOBJS = \ sckfile.o \ sckipc.o \ sckstrm.o \ - serbase.o \ sizer.o \ socket.o \ + statbar.o \ strconv.o \ stream.o \ string.o \ sysopt.o \ tbarbase.o \ + textbuf.o \ textcmn.o \ textfile.o \ timercmn.o \ diff --git a/src/univ/files.lst b/src/univ/files.lst index c2f6dd09f7..c8b10beeaf 100644 --- a/src/univ/files.lst +++ b/src/univ/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 16:36, 2001/11/20 +# This file was automatically generated by tmake at 11:19, 2001/12/15 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNIV.T! UNIVOBJS = \ bmpbuttn.o \ diff --git a/src/wxBase.dsp b/src/wxBase.dsp index 2f3ff02cb6..fd167cf465 100644 --- a/src/wxBase.dsp +++ b/src/wxBase.dsp @@ -293,6 +293,10 @@ SOURCE=.\common\dynlib.cpp # End Source File # Begin Source File +SOURCE=.\common\dynload.cpp +# End Source File +# Begin Source File + SOURCE=.\common\encconv.cpp # End Source File # Begin Source File @@ -393,10 +397,6 @@ SOURCE=.\common\object.cpp # End Source File # Begin Source File -SOURCE=.\common\objstrm.cpp -# End Source File -# Begin Source File - SOURCE=.\common\process.cpp # End Source File # Begin Source File @@ -425,10 +425,6 @@ SOURCE=.\common\sckstrm.cpp # End Source File # Begin Source File -SOURCE=.\common\serbase.cpp -# End Source File -# Begin Source File - SOURCE=.\common\socket.cpp # End Source File # Begin Source File @@ -729,6 +725,10 @@ SOURCE=..\include\wx\dynlib.h # End Source File # Begin Source File +SOURCE=..\include\wx\dynload.h +# End Source File +# Begin Source File + SOURCE=..\include\wx\encconv.h # End Source File # Begin Source File @@ -841,10 +841,6 @@ SOURCE=..\include\wx\object.h # End Source File # Begin Source File -SOURCE=..\include\wx\objstrm.h -# End Source File -# Begin Source File - SOURCE=..\include\wx\platform.h # End Source File # Begin Source File @@ -869,10 +865,6 @@ SOURCE=..\include\wx\sckstrm.h # End Source File # Begin Source File -SOURCE=..\include\wx\serbase.h -# End Source File -# Begin Source File - SOURCE=..\include\wx\snglinst.h # End Source File # Begin Source File diff --git a/src/wxUniv.dsp b/src/wxUniv.dsp index 0f053a4f0d..9900f04e26 100644 --- a/src/wxUniv.dsp +++ b/src/wxUniv.dsp @@ -193,6 +193,10 @@ SOURCE=.\common\dynlib.cpp # End Source File # Begin Source File +SOURCE=.\common\dynload.cpp +# End Source File +# Begin Source File + SOURCE=.\common\effects.cpp # End Source File # Begin Source File @@ -389,10 +393,6 @@ SOURCE=.\common\object.cpp # End Source File # Begin Source File -SOURCE=.\common\objstrm.cpp -# End Source File -# Begin Source File - SOURCE=.\common\odbc.cpp # End Source File # Begin Source File @@ -449,10 +449,6 @@ SOURCE=.\common\sckstrm.cpp # End Source File # Begin Source File -SOURCE=.\common\serbase.cpp -# End Source File -# Begin Source File - SOURCE=.\common\sizer.cpp # End Source File # Begin Source File @@ -1434,6 +1430,10 @@ SOURCE=..\include\wx\dynlib.h # End Source File # Begin Source File +SOURCE=..\include\wx\dynload.h +# End Source File +# Begin Source File + SOURCE=..\include\wx\encconv.h # End Source File # Begin Source File @@ -1726,10 +1726,6 @@ SOURCE=..\include\wx\object.h # End Source File # Begin Source File -SOURCE=..\include\wx\objstrm.h -# End Source File -# Begin Source File - SOURCE=..\include\wx\odbc.h # End Source File # Begin Source File @@ -1838,10 +1834,6 @@ SOURCE=..\include\wx\scrolwin.h # End Source File # Begin Source File -SOURCE=..\include\wx\serbase.h -# End Source File -# Begin Source File - SOURCE=..\include\wx\settings.h # End Source File # Begin Source File diff --git a/src/wxWindows.dsp b/src/wxWindows.dsp index 8d6853f657..e2ae91032a 100644 --- a/src/wxWindows.dsp +++ b/src/wxWindows.dsp @@ -2,8 +2,8 @@ # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 # TARGTYPE "Win32 (x86) Static Library" 0x0104 +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=wxWindows - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, @@ -32,6 +32,8 @@ CFG=wxWindows - Win32 Debug # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe !IF "$(CFG)" == "wxWindows - Win32 Release Unicode DLL" @@ -46,13 +48,10 @@ CFG=wxWindows - Win32 Debug # PROP Intermediate_Dir "../ReleaseUnicodeDll" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -CPP=cl.exe # ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /c # ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswdllu" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c -MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /i "../include" /d "NDEBUG" BSC32=bscmake.exe @@ -75,21 +74,18 @@ LINK32=link.exe # PROP Intermediate_Dir "../DebugUnicodeDll" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -CPP=cl.exe # ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswdllud" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "_DEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c -MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /i "../include" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /out:"../lib/wxmsw232ud.dll" /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.3 /dll /debug /machine:I386 /out:"../lib/wxmsw232ud.dll" /pdbtype:sept +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw232ud.dll" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.3 /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw232ud.dll" !ELSEIF "$(CFG)" == "wxWindows - Win32 Release Unicode" @@ -103,10 +99,8 @@ LINK32=link.exe # PROP Output_Dir "../lib" # PROP Intermediate_Dir "../ReleaseUnicode" # PROP Target_Dir "" -CPP=cl.exe # ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswu" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c -RSC=rc.exe # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=bscmake.exe @@ -128,10 +122,8 @@ LIB32=link.exe -lib # PROP Output_Dir "../lib" # PROP Intermediate_Dir "../DebugUnicode" # PROP Target_Dir "" -CPP=cl.exe # ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswud" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "_DEBUG" /D "__WXDEBUG__" /D WINVER=0x0400 /D "STRICT" /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c -RSC=rc.exe # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=bscmake.exe @@ -154,13 +146,10 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "../ReleaseDll" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -CPP=cl.exe # ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /c # ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswdll" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /Yu"wx/wxprec.h" /FD /c -MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /i "../include" /d "NDEBUG" BSC32=bscmake.exe @@ -183,21 +172,18 @@ LINK32=link.exe # PROP Intermediate_Dir "../DebugDll" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -CPP=cl.exe # ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswdlld" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "_DEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /Yu"wx/wxprec.h" /FD /c -MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /i "../include" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /out:"../lib/wxmsw232d.dll" /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.3 /dll /debug /machine:I386 /out:"../lib/wxmsw232d.dll" /pdbtype:sept +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw232d.dll" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.3 /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw232d.dll" !ELSEIF "$(CFG)" == "wxWindows - Win32 Release" @@ -211,10 +197,8 @@ LINK32=link.exe # PROP Output_Dir "../lib" # PROP Intermediate_Dir "../Release" # PROP Target_Dir "" -CPP=cl.exe # ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MD /W4 /O2 /I "../lib/msw" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c -RSC=rc.exe # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=bscmake.exe @@ -236,10 +220,8 @@ LIB32=link.exe -lib # PROP Output_Dir "../lib" # PROP Intermediate_Dir "../Debug" # PROP Target_Dir "" -CPP=cl.exe # ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswd" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "_DEBUG" /D "__WXDEBUG__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c -RSC=rc.exe # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=bscmake.exe @@ -362,12 +344,6 @@ SOURCE=.\common\docview.cpp # End Source File # Begin Source File -SOURCE=.\common\dosyacc.c -# ADD CPP /W1 /D "USE_DEFINE" /D "IDE_INVOKED" -# SUBTRACT CPP /YX /Yc /Yu -# End Source File -# Begin Source File - SOURCE=.\common\dseldlg.cpp # End Source File # Begin Source File @@ -380,20 +356,19 @@ SOURCE=.\common\dynlib.cpp # End Source File # Begin Source File -SOURCE=.\common\effects.cpp +SOURCE=.\common\dynload.cpp # End Source File # Begin Source File -SOURCE=.\common\encconv.cpp +SOURCE=.\common\effects.cpp # End Source File # Begin Source File -SOURCE=.\common\event.cpp +SOURCE=.\common\encconv.cpp # End Source File # Begin Source File -SOURCE=.\common\extended.c -# SUBTRACT CPP /YX /Yc /Yu +SOURCE=.\common\event.cpp # End Source File # Begin Source File @@ -581,10 +556,6 @@ SOURCE=.\common\object.cpp # End Source File # Begin Source File -SOURCE=.\common\objstrm.cpp -# End Source File -# Begin Source File - SOURCE=.\common\odbc.cpp # End Source File # Begin Source File @@ -641,10 +612,6 @@ SOURCE=.\common\sckstrm.cpp # End Source File # Begin Source File -SOURCE=.\common\serbase.cpp -# End Source File -# Begin Source File - SOURCE=.\common\sizer.cpp # End Source File # Begin Source File @@ -709,11 +676,6 @@ SOURCE=.\common\txtstrm.cpp # End Source File # Begin Source File -SOURCE=.\common\unzip.c -# SUBTRACT CPP /YX /Yc /Yu -# End Source File -# Begin Source File - SOURCE=.\common\url.cpp # End Source File # Begin Source File @@ -764,6 +726,24 @@ SOURCE=.\common\zipstrm.cpp SOURCE=.\common\zstream.cpp # End Source File + +# Begin Source File + +SOURCE=.\common\extended.c +# SUBTRACT CPP /YX /Yc /Yu +# End Source File +# Begin Source File + +SOURCE=.\common\unzip.c +# SUBTRACT CPP /YX /Yc /Yu +# End Source File + +# Begin Source File + +SOURCE=.\common\dosyacc.c +# ADD CPP /W1 /D "USE_DEFINE" /D "IDE_INVOKED" +# SUBTRACT CPP /YX /Yc /Yu +# End Source File # End Group # Begin Group "Generic Files" @@ -888,6 +868,7 @@ SOURCE=.\generic\treelay.cpp SOURCE=.\generic\wizard.cpp # End Source File + # End Group # Begin Group "wxHTML Files" @@ -972,12 +953,18 @@ SOURCE=.\html\m_tables.cpp SOURCE=.\html\winpars.cpp # End Source File + # End Group # Begin Group "MSW Files" # PROP Default_Filter "" # Begin Source File +SOURCE=.\msw\dummy.cpp +# ADD CPP /Yc"wx/wxprec.h" +# End Source File +# Begin Source File + SOURCE=.\msw\accel.cpp # End Source File # Begin Source File @@ -1102,11 +1089,6 @@ SOURCE=.\msw\dragimag.cpp # End Source File # Begin Source File -SOURCE=.\msw\dummy.cpp -# ADD CPP /Yc"wx/wxprec.h" -# End Source File -# Begin Source File - SOURCE=.\msw\enhmeta.cpp # End Source File # Begin Source File @@ -1159,16 +1141,6 @@ SOURCE=.\msw\glcanvas.cpp # End Source File # Begin Source File -SOURCE=.\msw\gsocket.c -# SUBTRACT CPP /YX /Yc /Yu -# End Source File -# Begin Source File - -SOURCE=.\msw\gsockmsw.c -# SUBTRACT CPP /YX /Yc /Yu -# End Source File -# Begin Source File - SOURCE=.\msw\helpbest.cpp # End Source File # Begin Source File @@ -1189,10 +1161,6 @@ SOURCE=.\msw\imaglist.cpp # End Source File # Begin Source File -SOURCE=.\msw\iniconf.cpp -# End Source File -# Begin Source File - SOURCE=.\msw\joystick.cpp # End Source File # Begin Source File @@ -1387,6 +1355,18 @@ SOURCE=.\msw\wave.cpp SOURCE=.\msw\window.cpp # End Source File + +# Begin Source File + +SOURCE=.\msw\gsocket.c +# SUBTRACT CPP /YX /Yc /Yu +# End Source File +# Begin Source File + +SOURCE=.\msw\gsockmsw.c +# SUBTRACT CPP /YX /Yc /Yu +# End Source File + # End Group # Begin Group "OLE Files" @@ -1415,6 +1395,7 @@ SOURCE=.\msw\ole\oleutils.cpp SOURCE=.\msw\ole\uuid.cpp # End Source File + # End Group # Begin Group "Headers" @@ -1425,9 +1406,7 @@ SOURCE=.\msw\ole\uuid.cpp # Begin Source File SOURCE=..\include\wx\msw\setup.h - !IF "$(CFG)" == "wxWindows - Win32 Release Unicode DLL" - # Begin Custom Build - Creating $(TargetPath) from $(InputPath) InputPath=..\include\wx\msw\setup.h @@ -1435,9 +1414,7 @@ InputPath=..\include\wx\msw\setup.h copy $(InputPath) ..\lib\mswdllu\wx\setup.h # End Custom Build - !ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode DLL" - # Begin Custom Build - Creating $(TargetPath) from $(InputPath) InputPath=..\include\wx\msw\setup.h @@ -1445,9 +1422,7 @@ InputPath=..\include\wx\msw\setup.h copy $(InputPath) ..\lib\mswdllud\wx\setup.h # End Custom Build - !ELSEIF "$(CFG)" == "wxWindows - Win32 Release Unicode" - # Begin Custom Build - Creating $(TargetPath) from $(InputPath) InputPath=..\include\wx\msw\setup.h @@ -1455,9 +1430,7 @@ InputPath=..\include\wx\msw\setup.h copy $(InputPath) ..\lib\mswu\wx\setup.h # End Custom Build - !ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode" - # Begin Custom Build - Creating $(TargetPath) from $(InputPath) InputPath=..\include\wx\msw\setup.h @@ -1465,9 +1438,7 @@ InputPath=..\include\wx\msw\setup.h copy $(InputPath) ..\lib\mswud\wx\setup.h # End Custom Build - !ELSEIF "$(CFG)" == "wxWindows - Win32 Release DLL" - # Begin Custom Build - Creating $(TargetPath) from $(InputPath) InputPath=..\include\wx\msw\setup.h @@ -1475,9 +1446,7 @@ InputPath=..\include\wx\msw\setup.h copy $(InputPath) ..\lib\mswdll\wx\setup.h # End Custom Build - !ELSEIF "$(CFG)" == "wxWindows - Win32 Debug DLL" - # Begin Custom Build - Creating $(TargetPath) from $(InputPath) InputPath=..\include\wx\msw\setup.h @@ -1485,9 +1454,7 @@ InputPath=..\include\wx\msw\setup.h copy $(InputPath) ..\lib\mswdlld\wx\setup.h # End Custom Build - !ELSEIF "$(CFG)" == "wxWindows - Win32 Release" - # Begin Custom Build - Creating $(TargetPath) from $(InputPath) InputPath=..\include\wx\msw\setup.h @@ -1495,9 +1462,7 @@ InputPath=..\include\wx\msw\setup.h copy $(InputPath) ..\lib\msw\wx\setup.h # End Custom Build - !ELSEIF "$(CFG)" == "wxWindows - Win32 Debug" - # Begin Custom Build - Creating $(TargetPath) from $(InputPath) InputPath=..\include\wx\msw\setup.h @@ -1505,9 +1470,7 @@ InputPath=..\include\wx\msw\setup.h copy $(InputPath) ..\lib\mswd\wx\setup.h # End Custom Build - !ENDIF - # End Source File # End Group # Begin Group "Common" @@ -1747,6 +1710,10 @@ SOURCE=..\include\wx\dynlib.h # End Source File # Begin Source File +SOURCE=..\include\wx\dynload.h +# End Source File +# Begin Source File + SOURCE=..\include\wx\encconv.h # End Source File # Begin Source File @@ -2039,10 +2006,6 @@ SOURCE=..\include\wx\object.h # End Source File # Begin Source File -SOURCE=..\include\wx\objstrm.h -# End Source File -# Begin Source File - SOURCE=..\include\wx\odbc.h # End Source File # Begin Source File @@ -2151,10 +2114,6 @@ SOURCE=..\include\wx\scrolwin.h # End Source File # Begin Source File -SOURCE=..\include\wx\serbase.h -# End Source File -# Begin Source File - SOURCE=..\include\wx\settings.h # End Source File # Begin Source File @@ -2413,6 +2372,7 @@ SOURCE=..\include\wx\zipstrm.h SOURCE=..\include\wx\zstream.h # End Source File + # End Group # Begin Group "MSW" @@ -2789,6 +2749,7 @@ SOURCE=..\include\wx\msw\window.h SOURCE=..\include\wx\msw\winundef.h # End Source File + # End Group # Begin Group "Generic" @@ -2945,6 +2906,7 @@ SOURCE=..\include\wx\generic\treectlg.h SOURCE=..\include\wx\generic\wizard.h # End Source File + # End Group # Begin Group "HTML" @@ -3001,6 +2963,7 @@ SOURCE=..\include\wx\html\m_templ.h SOURCE=..\include\wx\html\winpars.h # End Source File + # End Group # End Group # End Target diff --git a/utils/serialize/.cvsignore b/utils/serialize/.cvsignore deleted file mode 100644 index 4646a42c35..0000000000 --- a/utils/serialize/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux diff --git a/utils/serialize/makefile.b32 b/utils/serialize/makefile.b32 deleted file mode 100644 index 7016450076..0000000000 --- a/utils/serialize/makefile.b32 +++ /dev/null @@ -1,58 +0,0 @@ -# -# File: makefile.b32 -# Author: Patrick Halke, modified by Guilhem Lavaux -# Created: 1997 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds 32bit wxstring library for Windows 3.1 -# and Borland C++ 4.x - -WXDIR = $(WXWIN) - -!if "$(DLL)" == "1" -WXBUILDDLL=1 -WXUSINGDLL=1 -!endif - -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -LIBS=$(WXLIB) cw32 import32 ole2w32 - -!ifndef DEBUG -DEBUG=0 -!endif - -LIBTARGET= $(WXLIBDIR)\wxserial.dll -CPPFLAGS= $(CPPFLAGS) -Od - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -OBJECTS = sermain.obj sercore.obj serwnd.obj serctrl.obj sergdi.obj serext.obj - -all: $(LIBTARGET) - -sermain.obj: sermain.$(SRCSUFF) - bcc32 $(CPPFLAGS) -P- -u- -c sermain.$(SRCSUFF) - -$(LIBTARGET): $(OBJECTS) - erase $(LIBTARGET) - tlink32 $(LINK_FLAGS) /v @&&! -c0d32.obj $(OBJECTS) -$(LIBTARGET) -nul -$(LIBS) -serial -! - -clean: - -erase *.obj - -erase $(LIBTARGET) - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws diff --git a/utils/serialize/sercore.cpp b/utils/serialize/sercore.cpp deleted file mode 100644 index 0fffba7f5b..0000000000 --- a/utils/serialize/sercore.cpp +++ /dev/null @@ -1,107 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: sercore.cpp -// Purpose: Serialization: core classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "sercore.h" -#endif -#include -#include -#include -#include -#include "sercore.h" - -IMPLEMENT_SERIAL_CLASS(wxList, wxObject) -IMPLEMENT_SERIAL_CLASS(wxHashTable, wxObject) - -void WXSERIAL(wxList)::StoreObject(wxObjectOutputStream& s) -{ - wxList *lst_object = (wxList *)Object(); - wxNode *node = lst_object->First(); - - if (s.FirstStage()) { - while (node) { - s.AddChild(node->Data()); - node = node->Next(); - } - return; - } - - wxDataOutputStream data_s(s); - - data_s.Write8(lst_object->destroy_data); - data_s.Write8(lst_object->key_type); - data_s.Write32( lst_object->Number() ); - - if (lst_object->key_type == wxKEY_INTEGER) { - while (node) { - data_s.Write32(node->key.integer); - node = node->Next(); - } - } else { - while (node) { - data_s.WriteString(node->key.string); - node = node->Next(); - } - } -} - -void WXSERIAL(wxList)::LoadObject(wxObjectInputStream& s) -{ - wxDataInputStream data_s(s); - wxList *list = (wxList *)Object(); - int number, i; - - list->DeleteContents( data_s.Read8() ); - list->key_type = data_s.Read8(); - number = data_s.Read32(); - - if (list->key_type == wxKEY_INTEGER) { - for (i=0;iAppend( data_s.Read32(), s.GetChild() ); - } else { - for (i=0;iAppend( data_s.ReadString(), s.GetChild() ); - } -} - -// ---------------------------------------------------------------------------- - -void WXSERIAL(wxHashTable)::StoreObject(wxObjectOutputStream& s) -{ - wxHashTable *table = (wxHashTable *)Object(); - int i; - - if (s.FirstStage()) { - for (i=0;in;i++) - s.AddChild(table->hash_table[i]); - return; - } - - wxDataOutputStream data_s(s); - - data_s.Write8(table->key_type); - data_s.Write32(table->n); -} - -void WXSERIAL(wxHashTable)::LoadObject(wxObjectInputStream& s) -{ - wxHashTable *table = (wxHashTable *)Object(); - wxDataInputStream data_s(s); - int i, key, n; - - key = data_s.Read8(); - n = data_s.Read32(); - - table->Create(key, n); - - for (i=0;ihash_table[i] = (wxList *)s.GetChild(); -} diff --git a/utils/serialize/sercore.h b/utils/serialize/sercore.h deleted file mode 100644 index 57651eab6d..0000000000 --- a/utils/serialize/sercore.h +++ /dev/null @@ -1,24 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: sercore.h -// Purpose: Serialization: core classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __SERCORE_H__ -#define __SERCORE_H__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include - -DECLARE_SERIAL_CLASS(wxList, wxObject) -DECLARE_SERIAL_CLASS(wxHashTable, wxObject) - -#endif diff --git a/utils/serialize/serctrl.cpp b/utils/serialize/serctrl.cpp deleted file mode 100644 index e9e0d56af4..0000000000 --- a/utils/serialize/serctrl.cpp +++ /dev/null @@ -1,478 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serctrl.cpp -// Purpose: Serialization: control classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "serctrl.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "serwnd.h" -#include "serctrl.h" - -IMPLEMENT_ALIAS_SERIAL_CLASS(wxControl, wxWindow) -#ifdef __WINDOWS__ -IMPLEMENT_SERIAL_CLASS(wxSlider95, wxControl) -IMPLEMENT_SERIAL_CLASS(wxGauge95, wxControl) -#else -IMPLEMENT_SERIAL_CLASS(wxSlider, wxControl) -IMPLEMENT_SERIAL_CLASS(wxGauge, wxControl) -#endif -IMPLEMENT_SERIAL_CLASS(wxCheckBox, wxControl) -IMPLEMENT_SERIAL_CLASS(wxChoice, wxControl) -IMPLEMENT_SERIAL_CLASS(wxComboBox, wxControl) -IMPLEMENT_SERIAL_CLASS(wxListBox, wxControl) -IMPLEMENT_SERIAL_CLASS(wxNotebook, wxControl) -IMPLEMENT_SERIAL_CLASS(wxRadioBox, wxControl) -IMPLEMENT_SERIAL_CLASS(wxRadioButton, wxControl) -IMPLEMENT_SERIAL_CLASS(wxButton, wxControl) -IMPLEMENT_SERIAL_CLASS(wxStaticText, wxControl) -IMPLEMENT_SERIAL_CLASS(wxStaticBox, wxControl) - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxButton)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); -} - -void WXSERIAL(wxButton)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxControl)::LoadObject(s); - - if (s.SecondCall()) - return; - - wxButton *button = (wxButton *)Object(); - - printf("label = %s\n", WXSTRINGCAST m_label); - button->Create(m_parent, m_id, m_label, wxPoint(m_x, m_y), wxSize(m_w, m_h), - m_style, *m_validator, m_name); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxCheckBox)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - data_s.Write8( ((wxCheckBox *)Object())->GetValue() ); -} - -void WXSERIAL(wxCheckBox)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxControl)::LoadObject(s); - - if (s.SecondCall()) - return; - - wxDataInputStream data_s(s); - wxCheckBox *chkbox = (wxCheckBox *)Object(); - - chkbox->Create(m_parent, m_id, m_label, wxPoint(m_x, m_y), wxSize(m_w, m_h), - m_style, *m_validator, m_name); - - chkbox->SetValue(data_s.Read8()); -} - -//----------------------------------------------------------------------------- - -#ifdef __WXMSW__ -void WXSERIAL(wxSlider95)::StoreObject(wxObjectOutputStream& s) -#else -void WXSERIAL(wxSlider)::StoreObject(wxObjectOutputStream& s) -#endif -{ - WXSERIAL(wxControl)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - wxSlider *slider = (wxSlider *)Object(); - - data_s.Write32( slider->GetMin() ); - data_s.Write32( slider->GetMax() ); - data_s.Write32( slider->GetValue() ); - data_s.Write32( slider->GetTickFreq() ); - data_s.Write32( slider->GetPageSize() ); - data_s.Write32( slider->GetLineSize() ); - data_s.Write32( slider->GetSelStart() ); - data_s.Write32( slider->GetSelEnd() ); - data_s.Write32( slider->GetThumbLength() ); -} - -#ifdef __WXMSW__ -void WXSERIAL(wxSlider95)::LoadObject(wxObjectInputStream& s) -#else -void WXSERIAL(wxSlider)::LoadObject(wxObjectInputStream& s) -#endif -{ - WXSERIAL(wxControl)::LoadObject(s); - - if (s.SecondCall()) - return; - - wxDataInputStream data_s(s); - wxSlider *slider = (wxSlider *)Object(); - int value, min, max; - - min = data_s.Read32(); - max = data_s.Read32(); - value = data_s.Read32(); - - slider->Create(m_parent, m_id, value, min, max, wxPoint(m_x, m_y), - wxSize(m_w, m_h), m_style, *m_validator, m_name); - - slider->SetTickFreq( 0, data_s.Read32() ); - slider->SetPageSize( data_s.Read32() ); - slider->SetLineSize( data_s.Read32() ); - min = data_s.Read32(); - max = data_s.Read32(); - slider->SetSelection(min, max); - slider->SetThumbLength( data_s.Read32() ); -} - -//----------------------------------------------------------------------------- - -#ifdef __WXMSW__ -void WXSERIAL(wxGauge95)::StoreObject(wxObjectOutputStream& s) -#else -void WXSERIAL(wxGauge)::StoreObject(wxObjectOutputStream& s) -#endif -{ - WXSERIAL(wxControl)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - wxGauge *gauge = (wxGauge *)Object(); - - data_s.Write32( gauge->GetRange() ); - data_s.Write8( gauge->GetShadowWidth() ); - data_s.Write8( gauge->GetBezelFace() ); - data_s.Write32( gauge->GetValue() ); -} - -#ifdef __WXMSW__ -void WXSERIAL(wxGauge95)::LoadObject(wxObjectInputStream& s) -#else -void WXSERIAL(wxGauge)::LoadObject(wxObjectInputStream& s) -#endif -{ - WXSERIAL(wxControl)::LoadObject(s); - - if (s.SecondCall()) - return; - - wxDataInputStream data_s(s); - wxGauge *gauge = (wxGauge *)Object(); - int range; - - range = data_s.Read32(); - gauge->Create(m_parent, m_id, range, wxPoint(m_x, m_y), wxSize(m_w, m_h), - m_style, *m_validator, m_name); - - gauge->SetShadowWidth( data_s.Read8() ); - gauge->SetBezelFace( data_s.Read8() ); - gauge->SetValue( data_s.Read32() ); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxChoice)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - wxChoice *choice = (wxChoice *)Object(); - int i, num = choice->Number(); - - data_s.Write32(num); - for (i=0;iGetString(i) ); -} - -void WXSERIAL(wxChoice)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxControl)::LoadObject(s); - - if (s.SecondCall()) - return; - - wxDataInputStream data_s(s); - wxChoice *choice = (wxChoice *)Object(); - int i,num = data_s.Read32(); - - choice->Create(m_parent, m_id, wxPoint(m_x, m_y), wxSize(m_w, m_h), 0, NULL, - m_style, *m_validator, m_name); - - for (i=0;iAppend( data_s.ReadString() ); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxListBox)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - wxListBox *listbox = (wxListBox *)Object(); - int i, num = listbox->Number(); - - data_s.Write32(num); - for (i=0;iGetString(i) ); -} - -void WXSERIAL(wxListBox)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxListBox)::LoadObject(s); - - if (s.SecondCall()) - return; - - wxDataInputStream data_s(s); - wxListBox *listbox = (wxListBox *)Object(); - int i, num = data_s.Read32(); - - for (i=0;iAppend( data_s.ReadString() ); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxNotebook)::StoreObject(wxObjectOutputStream& s) -{ - wxNotebook *notebook = (wxNotebook *)Object(); - wxImageList *imaglist = notebook->GetImageList(); - int i, pcount = notebook->GetPageCount(); - - WXSERIAL(wxControl)::StoreObject(s); - if (s.FirstStage()) { - s.AddChild(imaglist); - return; - } - - wxDataOutputStream data_s(s); - - data_s.Write8( pcount ); - - for (i=0;iGetPageText(i) ); -} - -void WXSERIAL(wxNotebook)::LoadObject(wxObjectInputStream& s) -{ - wxNotebook *notebook = (wxNotebook *)Object(); - int i; - wxImageList *imaglist; - - WXSERIAL(wxControl)::LoadObject(s); - - if (s.SecondCall()) { - for (i=0;iAddPage( (wxWindow *)s.GetChild(), m_stringlist[i] ); - return; - } - - imaglist = (wxImageList *)s.GetChild(); - - notebook->Create(m_parent, m_id, wxPoint(m_x, m_y), wxSize(m_w, m_h), - m_style, m_name); - - wxDataInputStream data_s(s); - - m_pcount = data_s.Read8(); - for (i=0;iNumber(); - - data_s.Write8( n_items ); - data_s.Write8( box->GetNumberOfRowsOrCols() ); - - for (i=0;iGetString(i) ); -} - -void WXSERIAL(wxRadioBox)::LoadObject(wxObjectInputStream& s) -{ - wxRadioBox *box = (wxRadioBox *)Object(); - - WXSERIAL(wxControl)::LoadObject(s); - - if (s.SecondCall()) - return; - - wxDataInputStream data_s(s); - int i, n_rows_cols, n_items; - wxString *items; - - n_items = data_s.Read8(); - n_rows_cols = data_s.Read8(); - - items = new wxString[n_items]; - for (i=0;iCreate(m_parent, m_id, m_title, wxPoint(m_x, m_y), wxSize(m_w, m_h), - n_items, items, 0, m_style, *m_validator, m_name); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxRadioButton)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - data_s.Write8( (char) ((wxRadioButton *)Object())->GetValue() ); -} - -void WXSERIAL(wxRadioButton)::LoadObject(wxObjectInputStream& s) -{ - wxDataInputStream data_s(s); - - WXSERIAL(wxControl)::LoadObject(s); - - if (s.SecondCall()) - return; - - ((wxRadioButton *)Object())->SetValue( (bool)data_s.Read8() ); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxComboBox)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - wxComboBox *box = (wxComboBox *)Object(); - int i, num = box->Number(); - - data_s.Write8( num ); - data_s.Write8( box->GetSelection() ); - for (i=0;iGetString(i) ); - - data_s.WriteString( box->GetValue() ); - - // TODO: Editable flag -} - -void WXSERIAL(wxComboBox)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxControl)::LoadObject(s); - - if (s.SecondCall()) - return; - - wxDataInputStream data_s(s); - wxComboBox *box = (wxComboBox *)Object(); - int i, num, selection; - - box->Create(m_parent, m_id, wxEmptyString, wxPoint(m_x, m_y), wxSize(m_w, m_h), - 0, NULL, m_style, *m_validator, m_name); - - num = data_s.Read8(); - selection = data_s.Read8(); - - for (i=0;iAppend( data_s.ReadString() ); - - box->SetSelection( selection ); - box->SetValue( data_s.ReadString() ); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxStaticText)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); -} - -void WXSERIAL(wxStaticText)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxControl)::LoadObject(s); - - if (s.SecondCall()) - return; - - ((wxStaticText *)Object())->Create(m_parent, m_id, m_label, wxPoint(m_x, m_y), - wxSize(m_w, m_h), m_style, m_name); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxStaticBox)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); -} - -void WXSERIAL(wxStaticBox)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxControl)::LoadObject(s); - - if (s.SecondCall()) - return; - - ((wxStaticBox *)Object())->Create(m_parent, m_id, m_label, wxPoint(m_x, m_y), - wxSize(m_w, m_h), m_style, m_name); -} diff --git a/utils/serialize/serctrl.h b/utils/serialize/serctrl.h deleted file mode 100644 index 8d7e89a8ff..0000000000 --- a/utils/serialize/serctrl.h +++ /dev/null @@ -1,52 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serctrl.h -// Purpose: Serialization: control classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __SERCTRL_H__ -#define __SERCTRL_H__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include -#include "serwnd.h" - -DECLARE_ALIAS_SERIAL_CLASS(wxControl, wxWindow) -DECLARE_SERIAL_CLASS(wxButton, wxControl) -#ifdef __WINDOWS__ -DECLARE_SERIAL_CLASS(wxSlider95, wxControl) -DECLARE_SERIAL_CLASS(wxGauge95, wxControl) -#else -DECLARE_SERIAL_CLASS(wxSlider, wxControl) -DECLARE_SERIAL_CLASS(wxGauge, wxControl) -#endif -DECLARE_SERIAL_CLASS(wxCheckBox, wxControl) -DECLARE_SERIAL_CLASS(wxChoice, wxControl) -DECLARE_SERIAL_CLASS(wxComboBox, wxControl) -DECLARE_SERIAL_CLASS(wxListBox, wxControl) -DECLARE_SERIAL_CLASS(wxRadioBox, wxControl) -DECLARE_SERIAL_CLASS(wxRadioButton, wxControl) -DECLARE_SERIAL_CLASS(wxStaticText, wxControl) -DECLARE_SERIAL_CLASS(wxStaticBox, wxControl) - - -class WXSERIAL(wxNotebook) : public WXSERIAL(wxControl) { - DECLARE_DYNAMIC_CLASS( wxNotebook_Serialize ) -public: - void StoreObject(wxObjectOutputStream& s); - void LoadObject(wxObjectInputStream& s); - -protected: - int m_pcount; - wxArrayString m_stringlist; -}; - -#endif diff --git a/utils/serialize/serext.cpp b/utils/serialize/serext.cpp deleted file mode 100644 index aaddb4066a..0000000000 --- a/utils/serialize/serext.cpp +++ /dev/null @@ -1,137 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serext.cpp -// Purpose: Serialization: Other classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "serext.h" -#endif - -#include "serext.h" -#include -#include -#include -#include -#include - -IMPLEMENT_SERIAL_CLASS(wxSplitterWindow, wxWindow) -IMPLEMENT_SERIAL_CLASS(wxGridCell, wxObject) -IMPLEMENT_SERIAL_CLASS(wxGrid, wxPanel) - -void WXSERIAL(wxSplitterWindow)::StoreObject(wxObjectOutputStream& s) -{ - wxSplitterWindow *splitter = (wxSplitterWindow *)Object(); - WXSERIAL(wxWindow)::StoreObject(s); - - if (s.FirstStage()) { - s.AddChild( splitter->GetWindow1() ); - s.AddChild( splitter->GetWindow2() ); - return; - } - - wxDataOutputStream data_s(s); - data_s.Write8( splitter->GetSplitMode() ); - data_s.Write32( splitter->GetSashSize() ); - data_s.Write8( splitter->GetBorderSize() ); - data_s.Write32( splitter->GetSashPosition() ); - data_s.Write32( splitter->GetMinimumPaneSize() ); -} - -void WXSERIAL(wxSplitterWindow)::LoadObject(wxObjectInputStream& s) -{ - wxSplitterWindow *splitter = (wxSplitterWindow *)Object(); - WXSERIAL(wxWindow)::LoadObject(s); - - wxDataInputStream data_s(s); - int split_mode, sash_size, border_size, sash_position, min_pane_size; - - split_mode = data_s.Read8(); - sash_size = data_s.Read32(); - border_size = data_s.Read8(); - sash_position = data_s.Read32(); - min_pane_size = data_s.Read32(); - - splitter->Create(m_parent, m_id, wxPoint(m_x, m_y), wxSize(m_w, m_h), m_style, - m_name); - - if (s.GetChild(1)) { - if (data_s.Read8() == wxSPLIT_VERTICAL) - splitter->SplitVertically((wxWindow *)s.GetChild(0), - (wxWindow *)s.GetChild(1), sash_position); - else - splitter->SplitHorizontally((wxWindow *)s.GetChild(0), - (wxWindow *)s.GetChild(1), sash_position); - } - - splitter->SetSashSize(sash_size); - splitter->SetBorderSize(border_size); - splitter->SetMinimumPaneSize(min_pane_size); -} - -void WXSERIAL(wxGridCell)::StoreObject(wxObjectOutputStream& s) -{ - wxGridCell *cell = (wxGridCell *)Object(); - wxDataOutputStream data_s(s); - - if (s.FirstStage()) { - s.AddChild( cell->GetFont() ); - s.AddChild( cell->GetBackgroundBrush() ); - s.AddChild( cell->GetCellBitmap() ); - s.AddChild( &(cell->GetTextColour()) ); - s.AddChild( &(cell->GetBackgroundColour()) ); - return; - } - - data_s.WriteString( cell->GetTextValue() ); - data_s.Write16( cell->GetAlignment() ); -} - -void WXSERIAL(wxGridCell)::LoadObject(wxObjectInputStream& s) -{ - wxGridCell *cell = (wxGridCell *)Object(); - wxDataInputStream data_s(s); - - cell->SetTextValue( data_s.ReadString() ); - cell->SetAlignment( data_s.Read16() ); - cell->SetFont( (wxFont *)s.GetChild() ); - cell->SetBackgroundBrush( (wxBrush *)s.GetChild() ); - cell->SetCellBitmap( (wxBitmap *)s.GetChild() ); - cell->SetTextColour( *((wxColour *)s.GetChild()) ); - cell->SetBackgroundColour( *((wxColour *)s.GetChild()) ); -} - -void WXSERIAL(wxGrid)::StoreObject(wxObjectOutputStream& s) -{ - wxDataOutputStream data_s(s); - wxGrid *grid = (wxGrid *)Object(); - int n_rows = grid->GetRows(), n_cols = grid->GetCols(); - int r, c; - - if (s.FirstStage()) { - for (r=0;rGetCell(r, c) ); - - s.AddChild( grid->GetDividerPen() ); - WXSERIAL(wxPanel)::StoreObject(s); - return; - } - - data_s.Write16( n_rows ); - data_s.Write16( n_cols ); - data_s.Write16( grid->GetCursorRow() ); - data_s.Write16( grid->GetCursorColumn() ); - - WXSERIAL(wxPanel)::StoreObject(s); -} - -void WXSERIAL(wxGrid)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxPanel)::LoadObject(s); -} diff --git a/utils/serialize/serext.h b/utils/serialize/serext.h deleted file mode 100644 index 540bb998b5..0000000000 --- a/utils/serialize/serext.h +++ /dev/null @@ -1,26 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serext.cpp -// Purpose: Serialization: Other classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __SEREXT_H__ -#define __SEREXT_H__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include -#include "serwnd.h" - -DECLARE_SERIAL_CLASS(wxSplitterWindow, wxWindow) -DECLARE_SERIAL_CLASS(wxGrid, wxPanel) -DECLARE_SERIAL_CLASS(wxGridCell, wxObject) - -#endif diff --git a/utils/serialize/sergdi.cpp b/utils/serialize/sergdi.cpp deleted file mode 100644 index e413a4627b..0000000000 --- a/utils/serialize/sergdi.cpp +++ /dev/null @@ -1,334 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: sergdi.cpp -// Purpose: Serialization: GDI classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "sergdi.h" -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "sergdi.h" - -IMPLEMENT_SERIAL_CLASS(wxBitmap, wxObject) -IMPLEMENT_SERIAL_CLASS(wxGDIObject, wxObject) -IMPLEMENT_SERIAL_CLASS(wxRegion, wxGDIObject) -IMPLEMENT_SERIAL_CLASS(wxColour, wxObject) -IMPLEMENT_SERIAL_CLASS(wxFont, wxGDIObject) -IMPLEMENT_SERIAL_CLASS(wxPen, wxGDIObject) -IMPLEMENT_SERIAL_CLASS(wxBrush, wxGDIObject) -IMPLEMENT_SERIAL_CLASS(wxImageList, wxObject) - -IMPLEMENT_ALIAS_SERIAL_CLASS(wxPenList, wxList) -IMPLEMENT_ALIAS_SERIAL_CLASS(wxBrushList, wxList) -IMPLEMENT_ALIAS_SERIAL_CLASS(wxFontList, wxList) -IMPLEMENT_ALIAS_SERIAL_CLASS(wxColourDatabase, wxList) -IMPLEMENT_ALIAS_SERIAL_CLASS(wxBitmapList, wxList) - -// ---------------------------------------------------------------------------- - -void WXSERIAL(wxBitmap)::StoreObject(wxObjectOutputStream& s) -{ - // TODO - // I implemented a basic image saving (maybe I'll need to improve wxWin API). - - int x, y, w, h; - wxDataOutputStream data_s(s); - wxBitmap *bitmap = (wxBitmap *)Object(); - wxColour col; - wxMemoryDC dc; - - w = bitmap->GetWidth(); - h = bitmap->GetHeight(); - - if (s.FirstStage()) { - s.AddChild(bitmap->GetMask()); - } - - dc.SelectObject(*bitmap); - - data_s.Write16(w); - data_s.Write16(h); - for (y=0;ySetWidth(w); - bitmap->SetHeight(h); - dc.SelectObject(*bitmap); - - for (y=0;yGetVisible(); - - wxDataOutputStream data_s(s); - data_s.Write8(visible); -} - -void WXSERIAL(wxGDIObject)::LoadObject(wxObjectInputStream& s) -{ - wxDataInputStream data_s(s); - - ((wxGDIObject *)Object())->SetVisible( data_s.Read8() ); -} - -// ---------------------------------------------------------------------------- - -void WXSERIAL(wxRegion)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxGDIObject)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - wxRect rect = ((wxRegion *)Object())->GetBox(); - - data_s.Write16( rect.GetX() ); - data_s.Write16( rect.GetY() ); - data_s.Write16( rect.GetWidth() ); - data_s.Write16( rect.GetHeight() ); -} - -void WXSERIAL(wxRegion)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxGDIObject)::LoadObject(s); - - wxDataInputStream data_s(s); - wxRegion *region = (wxRegion *)Object(); - wxRect rect; - - rect.SetX( data_s.Read16() ); - rect.SetY( data_s.Read16() ); - rect.SetWidth( data_s.Read16() ); - rect.SetHeight( data_s.Read16() ); - - *region = wxRegion(rect); -} - -// ---------------------------------------------------------------------------- - -void WXSERIAL(wxColour)::StoreObject(wxObjectOutputStream& s) -{ - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - wxColour *colour = (wxColour *)Object(); - - if (!colour->Ok()) { - data_s.Write8(0); - data_s.Write8(0); - data_s.Write8(0); - wxLogDebug("wxColour (0x%x) isn't ready.\n", colour); - return; - } - - data_s.Write8(colour->Red()); - data_s.Write8(colour->Green()); - data_s.Write8(colour->Blue()); -} - -void WXSERIAL(wxColour)::LoadObject(wxObjectInputStream& s) -{ - wxDataInputStream data_s(s); - wxColour *colour = (wxColour *)Object(); - int r, g, b; - - r = data_s.Read8(); - g = data_s.Read8(); - b = data_s.Read8(); - - colour->Set(r, g, b); -} - -// ---------------------------------------------------------------------------- - -void WXSERIAL(wxPen)::StoreObject(wxObjectOutputStream& s) -{ - wxPen *pen = (wxPen *)Object(); - WXSERIAL(wxGDIObject)::StoreObject(s); - - if (s.FirstStage()) { - s.AddChild(& (pen->GetColour()) ); - return; - } - - wxDataOutputStream data_s(s); - - data_s.Write8( pen->GetCap() ); - data_s.Write8( pen->GetJoin() ); - data_s.Write8( pen->GetStyle() ); - data_s.Write8( pen->GetWidth() ); -} - -void WXSERIAL(wxPen)::LoadObject(wxObjectInputStream& s) -{ - wxPen *pen = (wxPen *)Object(); - wxColour *col = (wxColour *) s.GetChild(); - - WXSERIAL(wxGDIObject)::LoadObject(s); - - wxDataInputStream data_s(s); - - pen->SetColour(*col); - pen->SetCap( data_s.Read8() ); - pen->SetJoin( data_s.Read8() ); - pen->SetStyle( data_s.Read8() ); - pen->SetWidth( data_s.Read8() ); -} - -// ---------------------------------------------------------------------------- -void WXSERIAL(wxBrush)::StoreObject(wxObjectOutputStream& s) -{ - wxBrush *brush = (wxBrush *)Object(); - WXSERIAL(wxGDIObject)::StoreObject(s); - - if (s.FirstStage()) { - s.AddChild( &(brush->GetColour()) ); - s.AddChild( brush->GetStipple() ); - return; - } - - wxDataOutputStream data_s(s); - data_s.Write8( brush->GetStyle() ); -} - -void WXSERIAL(wxBrush)::LoadObject(wxObjectInputStream& s) -{ - wxBrush *brush = (wxBrush *)Object(); - wxColour *col = (wxColour *)s.GetChild(); - wxBitmap *bmap = (wxBitmap *)s.GetChild(); - - WXSERIAL(wxGDIObject)::LoadObject(s); - - wxDataInputStream data_s(s); - if (bmap) - *brush = wxBrush(*col, data_s.Read8()); - else - *brush = wxBrush(bmap); -} - -// ---------------------------------------------------------------------------- -void WXSERIAL(wxFont)::StoreObject(wxObjectOutputStream& s) -{ - wxFont *font = (wxFont *)Object(); - - WXSERIAL(wxGDIObject)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - - data_s.Write8( font->GetPointSize() ); - data_s.WriteString( font->GetFaceName() ); - data_s.Write8( font->GetFamily() ); - data_s.Write8( font->GetStyle() ); - data_s.Write8( font->GetWeight() ); - data_s.Write8( font->GetUnderlined() ); -} - -void WXSERIAL(wxFont)::LoadObject(wxObjectInputStream& s) -{ - wxFont *font = (wxFont *)Object(); - - WXSERIAL(wxGDIObject)::LoadObject(s); - - wxDataInputStream data_s(s); - int psize, family, style, weight; - bool underlined; - wxString face_name; - - psize = data_s.Read8(); - face_name = data_s.ReadString(); - family = data_s.Read8(); - style = data_s.Read8(); - weight = data_s.Read8(); - underlined = data_s.Read8(); - - *font = wxFont(psize, face_name, family, style, weight, underlined); -} - -// ---------------------------------------------------------------------------- - -void WXSERIAL(wxImageList)::StoreObject(wxObjectOutputStream& s) -{ - wxImageList *list = (wxImageList *)Object(); - int i; - - if (s.FirstStage()) { -#ifdef __WXGTK__ - for (i=0;iGetImageCount();i++) - s.AddChild(list->GetBitmap(i)); -#endif - } - - wxDataOutputStream data_s(s); - - data_s.Write32(list->GetImageCount()); -} - -void WXSERIAL(wxImageList)::LoadObject(wxObjectInputStream& s) -{ - int i, count; - wxImageList *list = (wxImageList *)Object(); - wxDataInputStream data_s(s); - - count = data_s.Read32(); - for (i=0;iAdd(*((wxBitmap *)s.GetChild())); -} diff --git a/utils/serialize/sergdi.h b/utils/serialize/sergdi.h deleted file mode 100644 index 3a8d3d4b58..0000000000 --- a/utils/serialize/sergdi.h +++ /dev/null @@ -1,37 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: sergdi.h -// Purpose: Serialization: GDI classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __SERGDI_H__ -#define __SERGDI_H__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include -#include "sercore.h" - -DECLARE_SERIAL_CLASS(wxBitmap, wxObject) -DECLARE_SERIAL_CLASS(wxGDIObject, wxObject) -DECLARE_SERIAL_CLASS(wxRegion, wxGDIObject) -DECLARE_SERIAL_CLASS(wxColour, wxObject) -DECLARE_SERIAL_CLASS(wxFont, wxGDIObject) -DECLARE_SERIAL_CLASS(wxPen, wxGDIObject) -DECLARE_SERIAL_CLASS(wxBrush, wxGDIObject) -DECLARE_SERIAL_CLASS(wxImageList, wxObject) - -DECLARE_ALIAS_SERIAL_CLASS(wxPenList, wxList) -DECLARE_ALIAS_SERIAL_CLASS(wxBrushList, wxList) -DECLARE_ALIAS_SERIAL_CLASS(wxFontList, wxList) -DECLARE_ALIAS_SERIAL_CLASS(wxColourDatabase, wxList) -DECLARE_ALIAS_SERIAL_CLASS(wxBitmapList, wxList) - -#endif diff --git a/utils/serialize/sermain.cpp b/utils/serialize/sermain.cpp deleted file mode 100644 index 2983a8c495..0000000000 --- a/utils/serialize/sermain.cpp +++ /dev/null @@ -1,27 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: sermain.cpp -// Purpose: Serialization: main -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "serbase.h" -#endif - -#include -#include - -#include "sercore.h" -#include "serwnd.h" -#include "sergdi.h" -#include "serctrl.h" -#include "serext.h" - -IMPLEMENT_DYNAMIC_CLASS(wxObject_Serialize, wxObject) - -WXDLL_ENTRY_FUNCTION() diff --git a/utils/serialize/serwnd.cpp b/utils/serialize/serwnd.cpp deleted file mode 100644 index a7790942cc..0000000000 --- a/utils/serialize/serwnd.cpp +++ /dev/null @@ -1,498 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serwnd.cpp -// Purpose: Serialization: wxWindow classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "serwnd.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "wx/log.h" -#include "serwnd.h" - - -IMPLEMENT_SERIAL_CLASS(wxWindow, wxObject) -IMPLEMENT_SERIAL_CLASS(wxIndividualLayoutConstraint, wxObject) -IMPLEMENT_SERIAL_CLASS(wxLayoutConstraints, wxObject) -IMPLEMENT_ALIAS_SERIAL_CLASS(wxValidator, wxObject) -IMPLEMENT_SERIAL_CLASS(wxFrame, wxWindow) -IMPLEMENT_SERIAL_CLASS(wxPanel, wxWindow) -IMPLEMENT_SERIAL_CLASS(wxDialog, wxWindow) -IMPLEMENT_SERIAL_CLASS(wxMenuBar, wxWindow) -IMPLEMENT_SERIAL_CLASS(wxMenuItem, wxObject) -IMPLEMENT_SERIAL_CLASS(wxMenu, wxObject) - -IMPLEMENT_SERIAL_CLASS(wxMDIParentFrame, wxFrame) -IMPLEMENT_SERIAL_CLASS(wxMDIChildFrame, wxFrame) -IMPLEMENT_SERIAL_CLASS(wxMDIClientWindow, wxWindow) - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxWindow)::StoreObject(wxObjectOutputStream& s) -{ - wxWindow *win_object = (wxWindow *)Object(); - - if (s.FirstStage()) { - wxNode *node = win_object->GetChildren()->First(); - - s.AddChild(win_object->GetConstraints()); - s.AddChild(win_object->GetValidator()); - - // BAD HACK, but I don't have access to the internal variable of wxWindow. - m_bg_colour = win_object->GetBackgroundColour(); - m_fg_colour = win_object->GetForegroundColour(); - s.AddChild(&m_bg_colour); - s.AddChild(&m_fg_colour); - s.AddChild(win_object->GetFont()); - while (node) { - s.AddChild(node->Data()); - node = node->Next(); - } - return; - } - - wxDataOutputStream data(s); - int x,y,w,h; - - data.WriteString( win_object->GetName() ); - data.WriteString( win_object->GetLabel() ); - data.WriteString( win_object->GetTitle() ); - - data.Write8( win_object->GetAutoLayout() ); - data.Write8( win_object->IsShown() ); - data.Write32( win_object->GetWindowStyleFlag() ); - data.Write32( win_object->GetId() ); - wxLogDebug( "Number = %d", win_object->GetChildren()->Number() ); - data.Write8( win_object->GetChildren()->Number() ); - - win_object->GetSize(&w, &h); - win_object->GetPosition(&x, &y); - data.Write16(x); - data.Write16(y); - data.Write16(w); - data.Write16(h); -} - -void WXSERIAL(wxWindow)::LoadObject(wxObjectInputStream& s) -{ - wxDataInputStream data_s(s); - wxWindow *win_object = (wxWindow *)Object(); - wxColour *colour; - wxFont *font; - - if (s.SecondCall()) { - /* I assume we will never create raw wxWindow object */ - (void)s.GetChild(); // We pass wxLayoutConstraints. - (void)s.GetChild(); // We pass wxValidator. - - colour = (wxColour *)s.GetChild(); - if (colour) - win_object->SetBackgroundColour(*colour); - colour = (wxColour *)s.GetChild(); - if (colour) - win_object->SetForegroundColour(*colour); - font = (wxFont *)s.GetChild(); - if (font) - win_object->SetFont(*font); - s.RemoveChildren(m_number); - return; - } - - m_parent = (wxWindow *)s.GetParent(); - - m_name = data_s.ReadString(); - m_label = data_s.ReadString(); - m_title = data_s.ReadString(); - - m_auto_layout = data_s.Read8(); - m_shown = data_s.Read8(); - m_style = data_s.Read32(); - m_id = data_s.Read32(); - m_number = data_s.Read8(); - - m_x = data_s.Read16(); - m_y = data_s.Read16(); - m_w = data_s.Read16(); - m_h = data_s.Read16(); - - (void)s.GetChild(); // We pass wxLayoutConstraints. - - m_validator = (wxValidator *)s.GetChild(); - if (!m_validator) - m_validator = (wxValidator *)&wxDefaultValidator; - - s.RemoveChildren(m_number+3); - - s.Recall(); - - return; -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxIndividualLayoutConstraint)::StoreObject - (wxObjectOutputStream& s) -{ - wxIndividualLayoutConstraint *lay_object = - (wxIndividualLayoutConstraint *)Object(); - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - - data_s.WriteString(s.GetObjectName(lay_object->GetOtherWindow())); - data_s.Write8(lay_object->GetMyEdge()); - data_s.Write8(lay_object->GetRelationship()); - data_s.Write16(lay_object->GetMargin()); - data_s.Write16(lay_object->GetValue()); - data_s.Write8(lay_object->GetPercent()); - data_s.Write8(lay_object->GetOtherEdge()); -} - -void WXSERIAL(wxIndividualLayoutConstraint):: - LoadObject(wxObjectInputStream& s) -{ - wxIndividualLayoutConstraint *lay_object = - (wxIndividualLayoutConstraint *)Object(); - wxDataInputStream data_s(s); - wxString win_name; - - win_name = data_s.ReadString(); - lay_object->otherWin = (wxWindow *)s.SolveName(win_name); - lay_object->myEdge = (wxEdge)data_s.Read8(); - lay_object->relationship = (wxRelationship)data_s.Read8(); - lay_object->margin = data_s.Read16(); - lay_object->value = data_s.Read16(); - lay_object->percent = data_s.Read8(); - lay_object->otherEdge = (wxEdge)data_s.Read8(); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxLayoutConstraints)::StoreObject(wxObjectOutputStream& s) -{ - wxLayoutConstraints *lay_object = (wxLayoutConstraints *)Object(); - WXSERIAL(wxIndividualLayoutConstraint) c; - -#define STORE(obj) c.SetObject(&(lay_object->obj)); c.StoreObject(s); - - // I simplify the process for this object - STORE(left); - STORE(right); - STORE(bottom); - STORE(top); - - STORE(width); - STORE(height); - - STORE(centreX); - STORE(centreY); - -#undef STORE -} - -void WXSERIAL(wxLayoutConstraints)::LoadObject(wxObjectInputStream& s) -{ - wxLayoutConstraints *lay_object = (wxLayoutConstraints *)Object(); - WXSERIAL(wxIndividualLayoutConstraint) c; - -#define LOAD(obj) c.SetObject(&(lay_object->obj)); c.LoadObject(s); - - // I simplify the process for this object - LOAD(left); - LOAD(right); - LOAD(bottom); - LOAD(top); - - LOAD(width); - LOAD(height); - - LOAD(centreX); - LOAD(centreY); - -#undef LOAD - - // Initialize constraints - ((wxWindow *)s.GetParent())->SetConstraints(lay_object); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxFrame)::StoreObject(wxObjectOutputStream& s) -{ - wxFrame *frame = (wxFrame *)Object(); - - if (s.FirstStage()) { - s.AddChild(frame->GetMenuBar()); - WXSERIAL(wxWindow)::StoreObject(s); - return; - } - - WXSERIAL(wxWindow)::StoreObject(s); - - wxDataOutputStream data_s(s); - wxStatusBar *statbar = frame->GetStatusBar(); - - // AAARGH !! I absolutely need to be able to modify internal fields of - // wxFrame (wxToolBar and wxStatusBar) - - if (statbar) - data_s.Write8(statbar->GetFieldsCount()); - else - data_s.Write8(0); - // HOW CAN I ACCESS TO THIS FIELD ? - // for (...) { data_s.Write8(statbar->m_statusWidths[i]); } -} - -void WXSERIAL(wxFrame)::LoadObject(wxObjectInputStream& s) -{ - wxFrame *frame = (wxFrame *)Object(); - wxMenuBar *mbar = (wxMenuBar *)s.GetChild(); - - WXSERIAL(wxWindow)::LoadObject(s); - - if (s.SecondCall()) - return; - - wxDataInputStream data_s(s); - - if (frame->GetClassInfo() == CLASSINFO(wxFrame)) - frame->Create(m_parent, m_id, m_title, wxPoint(m_x, m_y), - wxSize(m_w, m_h), m_style, m_name); - frame->SetMenuBar(mbar); - - frame->CreateStatusBar(data_s.Read8()); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxMenuBar)::StoreObject(wxObjectOutputStream& s) -{ - wxMenuBar *mbar = (wxMenuBar *)Object(); - int i, mcount = mbar->GetMenuCount(); - - if (s.FirstStage()) { - for (i=0;iGetMenu(i) ); - WXSERIAL(wxWindow)::StoreObject(s); - return; - } - - wxDataOutputStream data_s(s); - data_s.Write8( mcount ); - - // It isn't necessary for this object. - // WXSERIAL(wxWindow)::StoreObject(s); -} - -void WXSERIAL(wxMenuBar)::LoadObject(wxObjectInputStream& s) -{ - wxMenuBar *mbar = (wxMenuBar *)Object(); - int i, mcount; - wxDataInputStream data_s(s); - - mcount = data_s.Read8(); - for (i=0;iAppend( menu, menu->GetTitle() ); - } - - // It isn't necessary for this object. - // WXSERIAL(wxWindow)::LoadObject(s); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxMenu)::StoreObject(wxObjectOutputStream& s) -{ - wxMenu *menu = (wxMenu *)Object(); - - if (s.FirstStage()) { - s.AddChild( &menu->GetItems() ); - return; - } - - wxDataOutputStream data_s(s); - data_s.WriteString( menu->GetTitle() ); -} - -void WXSERIAL(wxMenu)::LoadObject(wxObjectInputStream& s) -{ - wxMenu *menu = (wxMenu *)Object(); - wxList *items = (wxList *)s.GetChild(); - wxNode *node = items->First(); - - wxDataInputStream data_s(s); - - menu->SetTitle( data_s.ReadString() ); - - while (node) { -// NOT IMPLEMENTED in wxGTK -// menu->Append( (wxMenuItem *)node->Data() ); - node = node->Next(); - } -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxMenuItem)::StoreObject(wxObjectOutputStream& s) -{ - wxMenuItem *item = (wxMenuItem *)Object(); - - if (s.FirstStage()) { -#ifdef __WXGTK__ - s.AddChild(item->GetSubMenu()); -#endif - return; - } - - wxDataOutputStream data_s(s); - -#ifdef __WXGTK__ - data_s.Write8( item->GetId() ); - data_s.WriteString( item->GetText() ); - data_s.Write8( item->IsCheckable() ); - data_s.Write8( item->IsEnabled() ); - data_s.Write8( item->IsChecked() ); -#endif -} - -void WXSERIAL(wxMenuItem)::LoadObject(wxObjectInputStream& s) -{ - wxMenuItem *item = (wxMenuItem *)Object(); - wxDataInputStream data_s(s); - -#ifdef __WXGTK__ - item->SetId( data_s.Read8() ); - item->SetText( data_s.ReadString() ); - item->SetCheckable( data_s.Read8() ); - item->Enable( data_s.Read8() ); - item->Check( data_s.Read8() ); - item->SetSubMenu( (wxMenu *)s.GetChild() ); -#endif -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxPanel)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxWindow)::StoreObject(s); -} - -void WXSERIAL(wxPanel)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxWindow)::LoadObject(s); - - if (s.SecondCall()) - return; - - ((wxPanel *)Object())->Create(m_parent, m_id, wxPoint(m_x, m_y), - wxSize(m_w, m_h), m_style, m_name); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxDialog)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxWindow)::StoreObject(s); -} - -void WXSERIAL(wxDialog)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxWindow)::LoadObject(s); - - if (s.SecondCall()) - return; - - ((wxDialog *)Object())->Create(m_parent, m_id, m_title, wxPoint(m_x, m_y), - wxSize(m_w, m_h), m_style, m_name); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxMDIParentFrame)::StoreObject(wxObjectOutputStream& s) -{ - wxMDIParentFrame *frame = (wxMDIParentFrame *)Object(); - - if (s.FirstStage()) { - s.AddChild(frame->GetClientWindow()); - WXSERIAL(wxMDIParentFrame)::StoreObject(s); - return; - } - - WXSERIAL(wxMDIParentFrame)::StoreObject(s); -} - -void WXSERIAL(wxMDIParentFrame)::LoadObject(wxObjectInputStream& s) -{ - wxMDIParentFrame *frame = (wxMDIParentFrame *)Object(); - wxMDIClientWindow *client; - - if (s.SecondCall()) { - WXSERIAL(wxFrame)::LoadObject(s); - return; - } - - client = (wxMDIClientWindow *) s.GetChild(); - - frame->Create(m_parent, m_id, m_title, wxPoint(m_x, m_y), - wxSize(m_w, m_h), m_style, m_name); - - WXSERIAL(wxFrame)::LoadObject(s); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxMDIChildFrame)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxFrame)::StoreObject(s); -} - -void WXSERIAL(wxMDIChildFrame)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxFrame)::LoadObject(s); - - if (s.SecondCall()) - return; - - ((wxMDIChildFrame *)Object())->Create((wxMDIParentFrame *)m_parent, - m_id, m_title, - wxPoint(m_x, m_y), wxSize(m_w, m_h), - m_style, m_name); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxMDIClientWindow)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxWindow)::StoreObject(s); -} - -void WXSERIAL(wxMDIClientWindow)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxWindow)::LoadObject(s); - - if (s.SecondCall()) - return; - - ((wxMDIClientWindow *)Object())->CreateClient((wxMDIParentFrame *)m_parent, m_style); -} diff --git a/utils/serialize/serwnd.h b/utils/serialize/serwnd.h deleted file mode 100644 index 38cdb657c1..0000000000 --- a/utils/serialize/serwnd.h +++ /dev/null @@ -1,57 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serwnd.h -// Purpose: Serialization: wxWindow classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _SERIALIZE_SERWND_H_ -#define _SERIALIZE_SERWND_H_ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include -#include - -class WXSERIAL(wxWindow) : public WXSERIAL(wxObject) -{ - DECLARE_DYNAMIC_CLASS( wxWindow_Serialize ) - public: - WXSERIAL(wxWindow)() { } - virtual ~WXSERIAL(wxWindow)() { }; - - void StoreObject(wxObjectOutputStream& s); - void LoadObject(wxObjectInputStream& s); - - public: - int m_x, m_y, m_w, m_h; - bool m_shown, m_auto_layout; - wxWindowID m_id; - wxString m_name, m_title, m_label; - wxWindow *m_parent; - wxValidator *m_validator; - wxColour m_bg_colour, m_fg_colour; - long m_style; - int m_number; -}; - -DECLARE_SERIAL_CLASS(wxIndividualLayoutConstraint, wxObject) -DECLARE_SERIAL_CLASS(wxLayoutConstraints, wxObject) -DECLARE_ALIAS_SERIAL_CLASS(wxValidator, wxObject) -DECLARE_SERIAL_CLASS(wxFrame, wxWindow) -DECLARE_SERIAL_CLASS(wxPanel, wxWindow) -DECLARE_SERIAL_CLASS(wxDialog, wxWindow) -DECLARE_SERIAL_CLASS(wxMenuBar, wxWindow) -DECLARE_SERIAL_CLASS(wxMenuItem, wxObject) -DECLARE_SERIAL_CLASS(wxMenu, wxObject) -DECLARE_SERIAL_CLASS(wxMDIParentFrame, wxFrame) -DECLARE_SERIAL_CLASS(wxMDIChildFrame, wxFrame) -DECLARE_SERIAL_CLASS(wxMDIClientWindow, wxFrame) - -#endif -- 2.45.2