22-JAN-1998.

Xforms 0.88 OpenVMS port notes.


1. Many modules throw this:

extern int gettimeofday(struct timeval *tv, struct timezone *tz);
........................^
%CC-I-PROTOSCOPE, The type "struct timeval" has been declared with 
prototype scope.  This may not be what you intended.
at line number 45 in file PRGDISK:[SHARED.PROGRAMS.XFORMS.XFORMS_088.FORMS]LOCAL.H;1

  VMS version of local.h wasn't moving up to top directory, so it was 
  picking up the wrong extern, VMS version is just gettimeofday(); to
  suppress this.

2. Browser.c looks like it is missing an include, undeclared or implicit 
function on...

  It was a problem with not having version 0.88 of forms.h, got that from 
  Zhao and now it works.

3. SYMBOLS.C wants M_PI, that's an _XOPEN_SOURCE extension.  Changed the 
  build procedure to use MYCC2 instead of MYCC1.

Great, got all the way through the [.FORMS] subdirectory!  There used to be 
a warning about DATA vs. PROCEDURE in 0.86, it seems to have gone away.

4. MENUBAR.C
%LINK-W-NUDFSYMS, 3 undefined symbols:
%LINK-I-UDFSYM,         FL_ADD_MENUBAR
%LINK-I-UDFSYM,         FL_SET_MENUBAR
%LINK-I-UDFSYM,         FL_SET_MENUBAR_ENTRIES

  Not completed (Zhao).  Leave it out of the build.

5. NNN.C
      sleep(2);
......^
%CC-I-IMPLICITFUNC, In this statement, the identifier "sleep" is implicitly 
declared as a function.
at line number 46 in file PRGDISK:[SHARED.PROGRAMS.XFORMS.XFORMS_088.DEMOS]
NNN.C;1

  Odd, it does include signal.h.  Wrong compiler mode maybe?  Add an 
  include for unistd.h instead.  That did it.  Some odd business about
  headers in DEC C, change in DEC C between Xforms 0.86 and 0.88.

6. THUMB.C

    fl_add_thumbwheel(FL_FLAT_BOX, 30, 150, 20, 75,"test");
....^
%CC-I-IMPLICITFUNC, In this statement, the identifier "fl_add_thumbwheel" 
is implicitly declared as a function.
at line number 206 in file PRGDISK:[SHARED.PROGRAMS.XFORMS.XFORMS_088.DEMOS
]THUMB.C;1
%LINK-W-NUDFSYMS, 1 undefined symbol:
%LINK-I-UDFSYM,         FL_ADD_THUMBWHEEL

%LINK-W-USEUNDEF, undefined symbol FL_ADD_THUMBWHEEL referenced
        in psect $LINK$ offset %X00000100
        in module THUMB file PRGDISK:[SHARED.PROGRAMS.XFORMS.XFORMS_088.
DEMOS]THUMB.OBJ;1


  Not completed (Zhao).  Leave it out of the build.

7.  compiling UI_ATTRIB.C
%CC-F-OPENIN, error opening PRGDISK:[SHARED.PROGRAMS.XFORMS.XFORMS_088.
DESIGN]UI_ATTRIB.C; as input
-RMS-E-FNF, file not found

  It's in a subdirectory of that. Funny it couldn't find this one, but did 
  find UI_THEFORMS.C  Build the subdirectory versions.

  Ok, told it to compile that, but it can't find FD_LEFT,FD_HCENTER,
  FD_RIGHT and many others. They are all in fd_main.h, in the directory
  above.  Hmm, are these really needed?  Try leaving them out.


8. compiling XPMTOPS

    signal(SIGPIPE, SIG_IGN);
...........^
%CC-E-UNDECLARED, In this statement, "SIGPIPE" is not declared.
at line number 109 in file PRGDISK:[SHARED.PROGRAMS.XFORMS.XFORMS_088.FD2PS
]XPMTOPS.C;1

    if (!(fpw = popen(buf, "w")))
................^
%CC-I-IMPLICITFUNC, In this statement, the identifier "popen" is implicitly 
declared as a function.
at line number 111 in file PRGDISK:[SHARED.PROGRAMS.XFORMS.XFORMS_088.FD2PS
]XPMTOPS.C;1

    if (!(fpw = popen(buf, "w")))
..........^
%CC-W-CVTDIFTYPES, In this statement, "popen(...)" of type "int", is being 
converted to "pointer to pointer to struct _iobuf".
at line number 111 in file PRGDISK:[SHARED.PROGRAMS.XFORMS.XFORMS_088.FD2PS
]XPMTOPS.C;1

  Zhao said this is all messed up, just leave it out.

9.  The DEMO program will only run ONE, then it locks up.

  It is locking up at the line: 

  fl_exe_command(cmd, 1);

  which is in [.forms]cmd_br.c  

  There were a lot of changes going from .86->.88, and, oh rats!, it lost 
  all of the pieces having to do with wait() vs. waitpid(), waitpid() isn't 
  on  OpenVMS <7.0.  Hmm, I see it, he has a function waitpid() defined
  in terms of wait(),  doesn't seem to be working though.  Replaced a big 
  chunk of fl_exe_command with a simple call to a lib$spawn with NOWAIT set,
  which seems to work as well and is MUCH less complicated.
  Had to add a stub fl_end_all_command(void) to make WWWL happy.

10. When linking fd_main it says:

%LINK-I-UDFSYM,         EMIT_SCROLLBAR_CODE
%LINK-I-UDFSYM,         GET_SCROLLBAR_SPEC_FDFORM
%LINK-I-UDFSYM,         SAVE_SCROLLBAR_ATTRIB
%LINK-I-UDFSYM,         SCROLLBAR_SPEC_RESTORE
%LINK-I-UDFSYM,         SET_SCROLLBAR_ATTRIB

  Those come from SP_SCROLLBAR, which isn't built - so build it.
  Better.  The program though insists on adding an EXTRA .FD when it opens,
  Ie, I put a file test.fd in there, it shows up as
  TEST.FD in the menu, but when I select it, it tries to open it as
  TEST.FD.fd.  Saves fail too, probably for the same reason, if there is
  an .fd indicated.  Email to ZHAO, is there a bug in the main routine (
  hard to see how the Unix version wouldn't do the same thing.)

  Found it, bug in FD_FORMS.C where it compares for ".fd" without
  lowercasing first.  Second bug in the output routine, similar,
  but it takes off extension ONLY if it is .fd.  Changed so that
  it does "LAST" dot precedence on namesto take
  off extension no matter what, and a .fd is pasted on later
  (as was the case before).


  Ack!  FD_PRINTC.C contains:

          sprintf(buf, "%s.bak", s);
and
 
    fprintf(fn, "#include \"%s.h\"\n\n", fname);

  Which are produce foo.c.bak and foo.h.bak.  For OpenVMS we don't 
  really need these, since we have version numbers.

Ok, now test all of the demos.

ARROWBUTTON.EXE    ok
BORDERWIDTH.EXE    ok
BOXTYPE.EXE        ok
BROWSERALL.EXE     ok
BROWSEROP.EXE      ok
BUTTONALL.EXE      ok
BUTTTYPES.EXE      ok, a bit odd about when you get the "want to quit menu"
CANVAS.EXE         ok
CHARTALL.EXE       ok
CHARTSTRIP.EXE     ok
CHOICE.EXE         ok
COLBROWSER.EXE     ok
COLSEL.EXE         ? click on anything and it exits
COLSEL1.EXE        ok
COUNTER.EXE        ok
CURSOR.EXE         ok
DEMO.EXE           ok
DEMO05.EXE         ok
DEMO06.EXE         ok
DEMO27.EXE         ok
DEMO33.EXE         ok
FBROWSE.EXE        ok
FBROWSE1.EXE       ok
FDIAL.EXE          ok
FLCLOCK.EXE        ok
FOLDER.EXE         ok (really nice too!)
FONTS.EXE          ok
FREE1.EXE          ok
FREEDRAW.EXE       ok
FREEDRAW_LEAK.EXE  ok
GL.EXE             NOT tested
GLWIN.EXE          NOT tested
GOODIES.EXE        ok
GROUP.EXE          ok (maybe better get the Porsche insignia out - copyright problems)
ICONIFY.EXE        ok
INPUTALL.EXE       ok
INVSLIDER.EXE      ok
LALIGN.EXE         ok
LDIAL.EXE          ok
LL.EXE             ? empty labeled graph, is that right?
LONGLABEL.EXE      ok
MENU.EXE           ok
MINPUT.EXE         ok
MINPUT2.EXE        ok
MULTILABEL.EXE     ok
NDIAL.EXE          ok
NEWBUTTON.EXE      ok
NNN.EXE            ok
OBJINACTIVE.EXE    ok
OBJPOS.EXE         ok
OBJRETURN.EXE      ok
PMBROWSE.EXE       ok
POPUP.EXE          ok
POSITIONER.EXE     ok
PREEMPTIVE.EXE     ok
PUP.EXE            ok (exits on a lot of buttons though, correct?)
PUSHBUTTON.EXE     ok
PUSHME.EXE         ok
RESCALE.EXE        ok
SECRETINPUT.EXE    ok
SLDINACTIVE.EXE    ok
SLDSIZE.EXE        ok
SLD_RADIO.EXE      ok
SLIDERALL.EXE      ok
STRSIZE.EXE        ok
SYMBOLS.EXE        ok
TIMER.EXE          ok
TIMER2.EXE         ok
TIMERPREC.EXE      ok (slight inaccuracy on first one, all later ones accurate)
TOUCHBUTTON.EXE    ok
WWWL.EXE           ok (some of the URLs are a bit out of date)
XYPLOTACTIVE.EXE   ok
XYPLOTALL.EXE      ok
XYPLOTOVER.EXE     ok, postscript output ok too
YESNO.EXE          ok

11. Modified build procedure so that shared library for Xforms is upwardly 
    compatible with .86 version.  The method used will ONLY work with the
    automatically generated linker option files used here.  All 0.86 demo
    programs run, as does phylo_win.  XLDLAS doesn't, but it may be linked
    against an even older library.
