From:    stefan.hammes@urz.uni-heidelberg.de (Stefan Hammes)
Subject: VMS port, changes and bugfixes for wxwin 1.61b

Dear Julian,                                  16-Apr-1995

I have ftp-ed wxwin 1.61b and have worked hard on it:

- Ported to VMS. All graphical stuff works. Timer works. Most other
  things work. The port was much easier than that of wxwin 1.50k.
  Thank you very much for integrating some of my suggestions for wxwin 1.50k
  into wxwin 1.61b.
  I congratulate you to this fine piece of software.
  The toolbar works fine. All(!) samples (except the IPC one) work.
  Things which do not work: IPC (not yet because I don't have sockets),
  PROLOGIO and most other utilities (I'm working on this) and the contrib stuff.
  
- Found and fixed some ERRORS both in the MSW and Motif version.

- Done some extensions both in the MSW and Motif version.

- Added a new, very powerful string-class which is based on the GNU string 
  class and the GNU regular expression class. With these classes we have full
  string and regular expression support.
  I have put it in \contrib\wxstring as discussed with you some weeks ago.
  This brings about 5000 lines of good GNU code into wxwin.

I have made changes to some files and added some new files. 

The following files are added for the VMS port or for the new string class.
They are contained in the 'steveadd.zip' archive (names in 'steveadd.txt'):

D:\WXW161\MAKEFILE.VMS
D:\WXW161\READVMS.TXT (you are reading this one)
D:\WXW161\CONTRIB\XMGAUGE\MAKEFILE.VMS
D:\WXW161\SAMPLES\ANIMATE\MAKEFILE.VMS
D:\WXW161\SAMPLES\FORM\MAKEFILE.VMS
D:\WXW161\SAMPLES\FRACTAL\MAKEFILE.VMS
D:\WXW161\SAMPLES\HELLO\MAKEFILE.VMS
D:\WXW161\SAMPLES\MDI\MAKEFILE.VMS
D:\WXW161\SAMPLES\MINIMAL\MAKEFILE.VMS
D:\WXW161\SRC\MAKEVMS.ENV
D:\WXW161\SRC\MOTIF.OPT
D:\WXW161\SRC\X\MAKEFILE.VMS
D:\WXW161\INCLUDE\BASE\WX_SETUP.VMS (this version should be used for VMS)
D:\WXW161\UTILS\IMAGE\SRC\MAKEFILE.VMS
D:\WXW161\UTILS\TOOLBAR\SRC\MAKEFILE.VMS
D:\WXW161\CONTRIB\WXSTRING\*.* (all files)

I have made changes to the following files (each one is discussed below
in detail). 
They are contained in the 'stevemod.zip' archive (names in 'stevemod.txt'):

D:\WXW161\INCLUDE\BASE\WX.H
D:\WXW161\INCLUDE\BASE\WX_LIST.H
D:\WXW161\INCLUDE\BASE\WX_SETUP.H
D:\WXW161\INCLUDE\BASE\WXSTRING.H
D:\WXW161\INCLUDE\MSW\WX_MAIN.H
D:\WXW161\INCLUDE\X\WX_MAIN.H
D:\WXW161\SAMPLES\ANIMATE\TOOL3D.CC
D:\WXW161\SAMPLES\FRACTAL\FRACTAL.CC
D:\WXW161\SAMPLES\HELLO\HELLO.CC
D:\WXW161\SRC\BASE\MAKEFILE.DOS
D:\WXW161\SRC\BASE\MAKEFILE.UNX
D:\WXW161\SRC\BASE\WB_LIST.CC
D:\WXW161\SRC\BASE\WB_PS.CC
D:\WXW161\SRC\BASE\WB_UTILS.CC
D:\WXW161\SRC\BASE\WX_ENHDG.CC
D:\WXW161\SRC\BASE\XFSPLINE.CC
D:\WXW161\SRC\MSW\MAKEFILE.DOS
D:\WXW161\SRC\MSW\WX_DC.CC
D:\WXW161\SRC\MSW\WX_MAIN.CC
D:\WXW161\SRC\MSW\WX_MF.CC
D:\WXW161\SRC\X\MAKEFILE.UNX
D:\WXW161\SRC\X\WX_FRAME.CC
D:\WXW161\SRC\X\WX_GDI.CC
D:\WXW161\SRC\X\WX_MAIN.CC
D:\WXW161\SRC\X\WX_PANEL.CC
D:\WXW161\SRC\X\WX_UTILS.CC
D:\WXW161\UTILS\BUTTNBAR\SRC\WX_BBAR.CC
D:\WXW161\UTILS\BUTTNBAR\SRC\WX_BBAR.H
D:\WXW161\UTILS\IMAGE\SRC\WX_IMAGE.CC
D:\WXW161\UTILS\IMAGE\SRC\WX_IMG.CC
D:\WXW161\UTILS\IMAGE\SRC\WX_IMGX.H

All changes which were done to the OLD files by me are marked as follows:

+++start steve161(09.04.1995): <comment>
<changes>
---end steve161(09.04.1995)

So you can easily locate them in the files. Below I will list the
files which are changed, together with the line numbers of the
+++ --- comments. I would suggest that you use two edit windows
and paste my changes into your original code (after looking at them :-).
After the filename I give a short statement about the change.
For details please look into the files.

Below I discuss the following topics:
  - Installing on VMS
  - Porting to VMS
  - wxString class
  - Extensions/Addition
  - Bugfixes

I wish you success with the integration of my changes into wxwin and
hope that you will integrate all of them. So I can look forward to
the new version 1.62 or whatever which then will also be useable by
VMS people.

Stefan Hammes






//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
Installing on VMS
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////

General
-------
This port of wxWindows 1.61b is for the DEC C++ compiler on VMS 
for ALPHA and VAX. I'm using an ALPHA, so I cannot guarantee for 
no problems on a VAX, but if there are problems, they will be 
minor ones (mostly with include files etc.).

This port is not a complete one, but all graphical features work.
Timer works. Most other things work. 
The toolbar works fine. All(!) samples (except the IPC one) work.
Things which do not work: IPC (not yet because I don't have sockets),
PROLOGIO and most other utilities (I'm working on this) and the 
contrib stuff.

Most problems occur because of the directory structure and
filenaming of VMS. Beside this, some system dependent headerfiles
of UNIX are not present under VMS.

The directory structure is the same as under UNIX.

Be warned: The DEC C++ compiler is very slow. On a VAXstation 3100 the
compilation time is about 24 hours (!!!). It also needs much much 
memory (surely you have to raise your pagefile size ;-).

Environment
-----------
Under all circumstances you should make the following definition
in your 'login.com' file:

$ make == "mms/descrip=makefile.vms/macro=(ALPHA=1,WXDIR=[hammes.wxw161)"

Without this, nothing works :-)
Instead of ALPHA=1 you can use VAX=1 if you are on a VAX.
The WXDIR should point to the directory of wxWindows and you MUST omit the
trailing ']' !!! Replace the string 'hammes.wxw161' with the correct one
for your system.

In $(WXDIR).src] we have the two files 'makevms.env' and 'motif.opt'. 
They define options and locations of directories and libraries. 
Edit them for your system. For the first try no editing is necessary.
'makevms.env' will be included in the makefiles so you need to
define the things only once.

!!!! IMPORTANT !!!!
Now you should delete the file 

'$(WXDIR).include.base]wxstring.h' 

and copy the file 

'$(WXDIR).include.base]wx_setup.vms' to '$(WXDIR).include.base]wx_setup.h'
!!!! IMPORTANT !!!!

Makefiles
---------
I have included makefiles with the name 'makefile.vms' in several directories. 
If you have defined the above symbol 'make' and have 'mms' installed on
your system you need only to type 'make' as in UNIX.

N.b.: Instead of having makefiles in [.src.x] AND [.src.base] we only have
      one makefile in [.src.x] which makes the whole library.

You can look at the makefiles and build similar ones for other libraries and
for executables.

Compiling
---------
If everything goes right, you have only to type 'make' in the 
top wxWindows directory and then go to sleep or something else. 
This global make-command will build the wxWindows library, 
the toolbar library, the wxstring library and all sample programs.

As stated above this will take a lot of time (1-2 days :-() for
compiling all components). On an ALPHA it will be somewhat
faster.

VMS port was done by Stefan Hammes (stefan.hammes@urz.uni-heidelberg.de).
In the source code I have marked my changes and additions with 'steve'
for the old changes and 'steve161' for the newest changes.

If you have problems, please send an E-mail to me. I wish you success,

Stefan Hammes

//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
Porting to VMS
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////

The following changes are made to be compileable under VMS.
Most changes are necessary in the *_util.cc files. Especially the
filehandling poses problems and only a minimal support has been
implemented by me for VMS. I'm working on this.    

---------- D:\WXW161\UTILS\IMAGE\SRC\WX_IMG.CC
...The image class compiles correctly but produces
...runtime errors.
[1002]// +++start steve161(09.04.1995): the original code doesn't work under VMS
[1013]// ---end steve161(09.04.1995)

---------- D:\WXW161\UTILS\IMAGE\SRC\WX_IMAGE.CC
[660]// +++start steve161(09.04.1995): the VMS compiler wants it :-)
[666]// ---end steve161(09.04.1995)

---------- D:\WXW161\UTILS\IMAGE\SRC\WX_IMGX.H
[39]// +++start steve161(09.04.1995): added
[46]// ---end steve161(09.04.1995)
[57]// +++start steve161(09.04.1995): added '!defined(VMS)'
[59]// ---end steve161(09.04.1995)
[64]// +++start steve161(09.04.1995): added '!defined(VMS)'
[67]// ---end steve161(09.04.1995)

---------- D:\WXW161\SAMPLES\ANIMATE\TOOL3D.CC
[18]// +++start steve161(09.04.1995): added #ifdef because VMS doesn't have malloc.h
[22]// ---end steve161(09.04.1995)

---------- D:\WXW161\SRC\BASE\WB_UTILS.CC
[50]// +++start steve161(09.04.1995): added
[95]// ---end steve161(09.04.1995)
[403]// +++start steve161(09.04.1995): added 'defined(VMS)' because VMS is also case independent
[405]// ---end steve161(09.04.1995)
[455]// +++start steve161(09.04.1995): added '(char *)' for casting (necessary under VMS)
[457]// ---end steve161(09.04.1995)
[468]// +++start steve161(09.04.1995): added VMS filename characters
[472]// ---end steve161(09.04.1995)
[778]// +++start steve161(09.04.1995): added VMS filename characters
[780]// ---end steve161(09.04.1995)

---------- D:\WXW161\SRC\X\WX_UTILS.CC
[66]// +++start steve161(09.04.1995): added 'defined(VMS)'
[68]// ---end steve161(09.04.1995)
[210]  // +++start steve161(09.04.1995): added
[212]  // ---end steve161(09.04.1995)
[223]// +++start steve161(09.04.1995): added
[225]// ---end steve161(09.04.1995)
[233]  // +++start steve161(09.04.1995): added
[235]  // ---end steve161(09.04.1995)
[246]// +++start steve161(09.04.1995): added
[248]// ---end steve161(09.04.1995)
[261]// +++start steve161(09.04.1995): added
[265]// ---end steve161(09.04.1995)
[316]// +++start steve161(09.04.1995): added
[318]// ---end steve161(09.04.1995)
[325]// +++start steve161(09.04.1995): added
[329]// ---end steve161(09.04.1995)
[347]// +++start steve161(09.04.1995): added
[349]// ---end steve161(09.04.1995)
[358]// +++start steve161(09.04.1995): added
[362]// ---end steve161(09.04.1995)
[388]// +++start steve161(09.04.1995): added
[390]// ---end steve161(09.04.1995)
[478]// +++start steve161(09.04.1995): added
[484]// ---end steve161(09.04.1995)
[488]// +++start steve161(09.04.1995): added
[490]// ---end steve161(09.04.1995)
[553]// +++start steve161(09.04.1995): added
[555]// ---end steve161(09.04.1995)
[561]// +++start steve161(09.04.1995): added
[563]// ---end steve161(09.04.1995)
[614]// +++start steve161(09.04.1995): added
[616]// ---end steve161(09.04.1995)
[647]// +++start steve161(09.04.1995): added 'defined(VMS)' and modified __sgi
[649]// ---end steve161(09.04.1995)
[1194]// +++start steve161(09.04.1995): added
[1198]// ---end steve161(09.04.1995)
[1201]// +++start steve161(09.04.1995): added
[1203]// ---end steve161(09.04.1995)
[1212]// +++start steve161(09.04.1995): added
[1216]// ---end steve161(09.04.1995)
[1236]// +++start steve161(09.04.1995): added
[1238]// ---end steve161(09.04.1995)

//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
wxString class
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////

Because it contains GNU code, it is placed in \contrib\wxstring.
For details about the functionality see the readme.txt file
in this directory. Here I will only discuss the integration aspects.

I have modified the MSW and UNIX makefiles to use the new wxString class
as a peripheral component.

The file \src\base\wxstring.cc should be deleted and the NEW headerfile
\include\base\wxstring.h should be used (it replaces the old one).

---------- D:\WXW161\INCLUDE\BASE\WX_SETUP.H
...added the definition of USE_WXSTRING to control inclusion of wxstring.h
[66]// +++start steve161(09.04.1995): added
[69]// ---end steve161(09.04.1995)

---------- D:\WXW161\INCLUDE\BASE\WX.H 
...added the inclusion of wxstring.h if this is desired
[55]// +++start steve161(09.04.1995): added
[61]// ---end steve161(09.04.1995)

---------- D:\WXW161\SRC\BASE\MAKEFILE.DOS
...commented out wxstring.obj because we now use a peripheral lib
[89]# +++start steve161(09.04.1995): commented out from above line because wxString is
[92]# ---end steve161(09.04.1995)
[195]# +++start steve161(09.04.1995): commented out (see comment above)
[200]# ---end steve161(09.04.1995)

---------- D:\WXW161\SRC\MSW\MAKEFILE.DOS
...commented out wxstring.obj because we now use a peripheral lib
...added things for a new peripheral lib
[37]# +++start steve161(09.04.1995): added for wxString in \contrib
[39]# ---end steve161(09.04.1995)
[84]# +++start steve161(09.04.1995): added for wxString in \contrib
[89]# ---end steve161(09.04.1995)
[222]# +++start steve161(09.04.1995): commented out of above line, because it is now in \contrib\wxstring
[224]# ---end steve161(09.04.1995)
[429]# +++start steve161(09.04.1995): added for wxString in \contrib
[434]# ---end steve161(09.04.1995)

---------- D:\WXW161\SRC\BASE\MAKEFILE.UNX
---------- D:\WXW161\SRC\X\MAKEFILE.UNX
...done the same changes for wxString as in the MSW version.


!!!!! For VMS I use another approach !!!!!!
Because the inclusion mechanism is not very smart, we have to
extend the inclusion directory search list by the wxString directory.
This is done in \src\x\makefile.vms and \src\makevms.env.


//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
Extensions / Additions
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////

I have done some extensions and additions to the functionality,
which I think can be useful for other people and should therefore
be integrated into wxwin.

---------- D:\WXW161\INCLUDE\BASE\WX_LIST.H
...I have added a sorting member function to the wxList class.
...It can sort arbitrary lists (like 'qsort'). This function is
...very general and can be useful to many people. Therefore I
...hope you can integrate it.
[62]// +++start steve161(09.04.1995): added
[65]// ---end steve161(09.04.1995)
[124]// +++start steve161(09.04.1995): added
[128]// ---end steve161(09.04.1995)

---------- D:\WXW161\SRC\BASE\WB_LIST.CC
...see above.
[362]// +++start steve161(09.04.1995): added
[416]// ---end steve161(09.04.1995)

---------- D:\WXW161\INCLUDE\MSW\WX_MAIN.H
...In the current version, a program cannot analyze the MSW show-code
...e.g. if the program should be started as an icon. Therefore I suggest
...to store the show-code in an additional member variable (see also
...the change to wx_main.cc below
[34]// +++start steve161(09.04.1995): added
[38]// ---end steve161(09.04.1995)

---------- D:\WXW161\SRC\MSW\WX_MAIN.CC
...we check now for the show-mode and show the main frame only,
...if we should do this.
[454]// +++start steve161(09.04.1995): added
[459]// ---end steve161(09.04.1995)
[466]// +++start steve161(09.04.1995): modified
[471]// ---end steve161(09.04.1995)

---------- D:\WXW161\SRC\MSW\WX_MF.CC
...For metafiles it is better to use ANISOTROPIC because the resulting metafiles
...can be better imported in other programs.
[66]// +++start steve161(09.04.1995): modified, because ANISOTROPIC makes the metafile
[72]// ---end steve161(09.04.1995)

---------- D:\WXW161\SRC\MSW\WX_DC.CC
...I have added code for the GetPixel function
[343]// +++start steve161(09.04.1995): added
[386]// ---end steve161(09.04.1995)

---------- D:\WXW161\INCLUDE\X\WX_MAIN.H
...There is a problem with some compilers, namely the VMS one:
...If you delete a frame from a menu-bar function this leads
...to a crash. Therefore I have developed a wxPostDelete function,
...which does the deletion after the menu-bar function has returned.
...Instead of 'delete this' we can now use 'wxPostDelete(this)'.
[58]// +++start steve161(09.04.1995): added
[63]// ---end steve161(09.04.1995)

---------- D:\WXW161\SRC\X\WX_MAIN.CC
...see above for the wxPostDeleteFunction.
...Besides this, the linking with the 'main.c' module doesn't
...work under VMS. Therefore we include(!) it here.
...Besides this, some errors are fixed in this module
[41]// +++start steve161(09.04.1995): added the #if
[45]// ---end steve161(09.04.1995)
[68]// +++start steve161(09.04.1995): added
[77]// ---end steve161(09.04.1995)
[155]// +++start steve161(09.04.1995): added the #if
[159]// ---end steve161(09.04.1995)
[184]// +++start steve161(09.04.1995): added
[227]// ---end steve161(09.04.1995)
[262]// +++start steve161(09.04.1995): added
[265]// ---end steve161(09.04.1995)

//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
Bugfixes
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////

A general note: In most of the MSW sample and util makefiles you should add
                /SEG:256 to the linker parameters, otherwise the
                linker will report an overflow error!

There are some serious bugs which I discovered and fixed:

---------- D:\WXW161\SRC\X\WX_FRAME.CC
...Here the wrong Widget was used.
[441]// +++start steve161(09.04.1995): use frameShell for position (see GetSize)
[445]// ---end steve161(09.04.1995)

---------- D:\WXW161\SRC\X\WX_PANEL.CC
...Here you had forgotten the call to the 'wxCanvas'
[586]// +++start steve161(09.04.1995): added the USE_PANEL_CANVAS_IN_X case.
[592]// ---end steve161(09.04.1995)

---------- D:\WXW161\UTILS\BUTTNBAR\SRC\WX_BBAR.CC
...The handling of the disabling of buttons has an error. Even if a button
...is disabled, it can be pressed or toggled. I have inserted some
...'enable' testings to avoid this.
...Besides this, a toolbutton is NOT repainted, when it is disabled/enabled.
...But, of course, this should be done. I have added code (see also wx_bbar.h)
[123]// +++start steve161(09.04.1995): comment
[127]// ---end steve161(09.04.1995)
[136]// +++start steve161(09.04.1995): added 'enabled'
[138]// ---end steve161(09.04.1995)
[157]// +++start steve161(09.04.1995): added 'enabled'
[159]// ---end steve161(09.04.1995)
[186]// +++start steve161(09.04.1995): added 'enabled'
[188]// ---end steve161(09.04.1995)
[205]// +++start steve161(09.04.1995): added 'enabled'
[207]// ---end steve161(09.04.1995)
[256]// +++start steve161(09.04.1995): added 'enabled'
[258]// ---end steve161(09.04.1995)
[267]// +++start steve161(09.04.1995): added
[289]// ---end steve161(09.04.1995)

---------- D:\WXW161\UTILS\BUTTNBAR\SRC\WX_BBAR.H
...added enable/disable-drawing function.
[85]// +++start steve161(09.04.1995): added, see wx_bbar.cc for details
[89]// ---end steve161(09.04.1995)

---------- D:\WXW161\SRC\BASE\WB_PS.CC
...the code was bad placed.
[129]// +++start steve161(09.04.1995): has to be moved out of the above #ifdef!
[139]// ---end steve161(09.04.1995)
[1425]// +++start steve161(09.04.1995): added the #if
[1429]// ---end steve161(09.04.1995)

---------- D:\WXW161\SAMPLES\FRACTAL\FRACTAL.CC
[33]// +++start steve161(09.04.1995): added #ifdef
[37]// ---end steve161(09.04.1995)
[158]// +++start steve161(09.04.1995): modified
[177]// ---end steve161(09.04.1995)


The following are mostly compilation issues:


---------- D:\WXW161\SRC\BASE\WX_ENHDG.CC
[35]// +++start steve161(09.04.1995): added, because it was missing
[37]// ---end steve161(09.04.1995)

---------- D:\WXW161\SRC\BASE\XFSPLINE.CC
[23]// +++start steve161(09.04.1995): otherwise the compiler complains about redefinition
[27]// ---end steve161(09.04.1995)

---------- D:\WXW161\SRC\X\WX_GDI.CC
[25]// +++start steve161(09.04.1995): added
[29]// ---end steve161(09.04.1995)
[34]// +++start steve161(09.04.1995): added
[39]// ---end steve161(09.04.1995)
[582]// +++start steve161(09.04.1995): added
[586]// ---end steve161(09.04.1995)
[1708]// +++start steve161(09.04.1995): added 'defined(wx_msw)'
[1710]// ---end steve161(09.04.1995)

---------- D:\WXW161\SAMPLES\HELLO\HELLO.CC
[23]// +++start steve161(09.04.1995): added #ifdef
[27]// ---end steve161(09.04.1995)

### end of file ###





