31-MAR-1997.

Xforms 0.86 OpenVMS port notes.  Port is based on port of 0.81, slight modifications to the 
build procedures so that all VMS specific pieces start out in [.vms]
directory.

1.  Put these files in [.vms]
    readdir.c         } from Pat Rankin, needed for OpenVMS <7.0
    dirent.h          }
    xpmp.h            } fix fd_open problem
    forms.h           } static on OpenVMS, generated by Make on Unix
   
2.  Zillion warnings like this:

compiling ALIGN.C

extern int gettimeofday(struct timeval *tv, struct timezone *tz);
........................^
The type "struct timeval" has been declared with prototype scope.  This may 
not be what you intended. at line number 43 in file
SEQAXP$DKB400:[SHARED.PROGRAMS.XFORMS.XFORMS_086.FORMS]LOCAL.H;1

Fixed it by slightly modifying LOCAL.H to use only this prototype:

extern int gettimeofday();

3.   compiling CMD_BR.C

    if ((pid = fork()) < 0)
...............^
In this statement, the identifier "fork" is implicitly declared as a 
function. at line number 141 in file
SEQAXP$DKB400:[SHARED.PROGRAMS.XFORMS.XFORMS_086.FORMS]CMD_BR.C;1

        pid = waitpid(cur->pid, &pstat, 0);
..............^
In this statement, the identifier "waitpid" is implicitly declared as a function.
at line number 204 in file
SEQAXP$DKB400:[SHARED.PROGRAMS.XFORMS.XFORMS_086.FORMS]CMD_BR.C;1 

BARF! It uses fork(), see if there is some workaround, or have to use vfork.
Or use code from XLDLAS (from perl).

First pass, use vfork() for fork(), wait() for waitpid(), changed execl
to just run the cmd.  This will likely screw up royally if anybody tries
to queue more than one command...

4.   compiling LISTDIR.C

        return getcwd(dir ? dir : ldir, FL_PATH_MAX - 2);
...............^
In this statement, "getcwd" expects 2 arguments, but 3 are supplied. at line
number 403 in file
SEQAXP$DKB400:[SHARED.PROGRAMS.XFORMS.XFORMS_086.FORMS]LISTDIR.C;1 

Problem is that XOPEN interferes with the third option, needed to
set the "Unix file syntax" variable to 0.  Use different CC options for
this module.

        return getcwd((dir ? dir : ldir), FL_PATH_MAX - 2);


                *p = toupper(*p);
.....................^
In this statement, the identifier "toupper" is implicitly declared as a function.
at line number 512 in file
SEQAXP$DKB400:[SHARED.PROGRAMS.XFORMS.XFORMS_086.FORM S]LISTDIR.C;1 

Needed to include <ctype.h>.

5.   compiling SYSDEP.C

gettimeofday(struct timeval *tv, timezone * tz)
.................................^
Ill-formed parameter type list. at line number 84 in file
SEQAXP$DKB400:[SHARED.PROGRAMS.XFORMS.XFORMS_086.FORMS]SYSDEP.C;1 

Put a "struct" in before timezone.

    timeb_t tmp_time;
............^
Missing ";".
at line number 86 in file SEQAXP$DKB400:[SHARED.PROGRAMS.XFORMS.XFORMS_086.FORMS
]SYSDEP.C;1

Modified usleep region of code to use lib$wait.

6.  Building shared.  XPM went ok (no changes since last version.)  
XFORMS_SHR had problems at the link/share stage:

Universal psect FL_DEFAULT_CURNAME was not contributed by any object module
        deleted from Global Symbol Table
1 undefined symbol:
        FTIME
Undefined symbol FTIME referenced
        in psect $LINK$ offset %X00000060
        in module SYSDEP file SEQAXP$DKB400:[SHARED.PROGRAMS.XFORMS.XFORMS_086]XFORMS.OLB;1


Ok, the first part is because FL_DEFAULT_CURNAME was moved from global.h 
and extern.h where it was an int (in the last version) to be solely in 
cursor.c (in this version.)  So the symbol doesn't need to be in 
global_psects.h.

FTIME is missing because the build didn't declare /prefix=all.

Ok, with those fixes the shared built without warning or error.

7.  Demos.

CURSOR.C, two errors like:

     bitmapcur = fl_create_bitmap_cursor(bm1_bits, bm2_bits,
.................^
In this statement, the referenced type of the pointer value "bm1_bits" is
"unsigned char", which is not compatible with "const char".
at line number 27 in file SEQAXP$DKB400:[SHARED.PROGRAMS.XFORMS.XFORMS_086.DEMO

Bug in original, reported it.

DEMO.C

        putenv(strcat(strcat(strcpy(buf, "PATH="), p), ":."));
........^

Unix specific piece. Print a warning instead.


NNN.C
      sleep(2);
......^
In this statement, the identifier "sleep" is implicitly declared as a 
function. at line number 40 in file SEQAXP$DKB400:[SHARED.PROGRAMS.XFORMS.XFORMS_086.DEMOS]NNN.C;1

needed to #include <signal.h>

Test all demos. All work except WWWL, which smacks into problems with the
new fl_exe_command.  Problem is that it passes the command as:

  mosaic http://whatever/

but only MOSAIC is the image, the rest is a series of args.


8. Design

FD_MAIN

        if (strcasecmp(s, convertor[i].lang_name) == 0 ||
............^
In this statement, the identifier "strcasecmp" is implicitly declared as a 
function.
at line number 411 in file SEQAXP$DKB400:[SHARED.PROGRAMS.XFORMS.XFORMS_086.DESIGN]FD_MAIN.C;1

That's an xopen extension.  Odd, it seems to be in the library, even though
it is only supposed to show up after 7.0.  Ok, ifdef for vms_ver <7.0
to just define a prototype.  Seems to work. Strange.

Builds ok after that.
