[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

741.0. "On porting X->DECW" by PCINT::MERRILL (Brad Merrill DECtp SWE) Mon May 08 1989 22:14

       This is an attempt to chronicle the steps of converting an X-windows
application to DECwindows.  Xconq was a particularly well written program
with system specific calls surrounded by conditional compilation.  Additionally
all the X routine calls were contained in one module.  I don't know how much
this experience may help anyone else, doing a similar port.

       The entire port was done over a 2 week period, of completely off hours
work.  Suffice to say, a full time port could have been done in less time.

========================================================================

COPY DECWRL::"/pub/X11.contrib/Xconq5.tar.Z" XCONQ5.Z

LZDCMP -B xconq5.z xconq5.tar

TARREAD XZ xconq5.tar

Convert MAKEFILE. to XCONQ.MMS

modify CONFIG.H
	Used "xconq" & "xconq-standard" for font names,
	used "-DEC-Terminal..." for textfont.

modify X11.C
	Replaced "#include <X11/" with "#include <DECW$INCLUDE/".
	Found all "#ifdef UNIX", and provided compatible code with
	"#ifdef VMS" around it.

	Changed "getenv("DISPLAY")" to "getenv("DECW$DISPLAY")".

Additional DECwindows specific changes were found:
    Modified the font size calculations for VMS.  It seems that the author
    was adding MAX_BOUNDS.ASCENT + MIN_BOUNDS.DESCENT.  The min_bounds
    number is negative, and actually ended up truncating the line height.
    Is this perculiar to DECwindows?

    Modified the open_font call to prefix undefined fontnames with "xconq-"
    on the next try.  Perhaps there should be some naming conventions for
    user defined fonts.

    Removed complaining when available color was not exactly default color.
    I don't know why this was here, and it was annoying.

    Added new select style SELECT3.  This is to add a compatible multiplexer
    that is similar to the SELECT call on UNIX.

modify .BDF files to use vms style naming
	Changed FONT name "/usr/..." to "xconq-*"

Compile fonts:
	FONT XCONQ.BDF/OUT=XCONQ.DECW$FONT
	FONT STANDARD.BDF/OUT=XCONQ-STANDARD.DECW$FONT
	COPY *.DECW$FONT SYS$COMMON:[SYSFONT.DECW.USER_75DPI]

Restart the DECwindows server
	@SYS$MANAGER:DECW$STARTUP "RESTART"

Define logical names
	$ DEF XCONQ$LIBRARY ==> directory containing predefined
				maps/scenarios/periods/fonts
compiling
	$ MMS/DESCRIPTION=XCONQ X11CONQ

create symbol
	$ XCONQ :== $disk:[dir]x11conq.exe

execution
	$ XCONQ

modified .B files
	Replaced ending "0x0000, }" with "0x0000}".  For some reason
	the read bitmap routines didn't like the former.

converted NROFF documentation to LaTex
	I don't use Document.

converted XCONQ.6 to XCONQ.HLP
	I have now tested the multi-player capabilities locally.



T.RTitleUserPersonal
Name
DateLines
741.1Don' change #includesVINO::WITHROWRobert WithrowTue May 09 1989 17:039
> modify X11.C
> Replaced "#include <X11/" with "#include <DECW$INCLUDE/".
> Found all "#ifdef UNIX", and provided compatible code with
> "#ifdef VMS" around it.

Recommend not doing this as it just builds in another incompatability.
Rather, $define x11 decw$include.  Even if included in a #ifdef it is
unnecessary noise.

741.2It is not quite obvious...WHAT IS DECWINDOWS?!32956::grahamRude Movements.....Thu May 11 1989 23:0717
Should this note have a title like..

"Porting UNIX/X11"  code to DECwindows/VMS" or something similar?
[The xconq will run under Ultrix without a single line change.]

Based on the premise that DECwindows is supported under DOS, Ultrix and
VMS.

Flame:

This kind of noting is very rampant in this conference!

Flame off:

Kris..

741.3Can a novice port X -> VMS DECwindows?TALLIS::INGRAHAMFri Feb 23 1990 19:4622
This is a novice question.  I've only looked into this notesfile a little;
hope I'm not boring you with yet-another-novice-question, or you're-in-
the-wrong-notesfile, or something to that effect.

I have a program, that was written to optionally use the X windowing
system.  And now, due to a VMS upgrade, I find myself with a workstation
in front of me that is capable of running DECwindows, only a reboot away. 
DECwindows is based on X, right?  So it might be possible to make this
application work under DECwindows (he says, naively).

So the question is:  Can I make the application "play" DECwindows?  How?
How difficult is that likely to be, in general?  I know zilch about X or
DECwindows; I hack around a bit with programming; my real interest for now
is kind of a "midnight hack" to see how the program runs and looks.  (The
program has bugs anyway.)

Is this something a novice can just pick up and do, or should I not even
try?  Is one better off investing a few weeks/months and a course or some
books to really learn DECwindows?  I wasn't intending to become fluent in
X or DECwindows programming, just get this one to work.

Andy
741.4CVG::PETTENGILLmulpSat Feb 24 1990 00:1312
If it were simply a matter of the program being written for X rather than for
Unix, then it would be a simple matter of compiling it and fixing minor bugs.
Instead you will find that you need to both convert from Unix to VMS and
make up for some unsupported X usage that is typical and an occasional
incompatibility caused by the different baselevels of X used for each
release.

However, many people have hacked existing X programs in a very short time;
sometimes as short as an hour.  Sometimes they just compile and run.

I suggest you check out the ELKTRA::DW_EXAMPLES conference; many of the
things there are the result of similar efforts.
741.5PSW::WINALSKICareful with that VAX, EugeneSat Feb 24 1990 02:0610
RE: .3

DECwindows *is* X Windows, so, as .4 said, aside from some possible minor
version skew differences, the X calls themselves should require no modification
at all.  A lot of the X Windows freeware that's floating around was developed
for Unix, and so the Unix-isms tend to be the real problem.  I've ported
several of these little programs to VMS DECwindows, and I never found the X
calls to be a problem.  What work I had to do involved Unix-isms.

--PSW