[comp.windows.x] DecWindows Under VMS

mellon@eris.berkeley.edu (Ted Lemon) (04/14/89)

I'm a Unix Wizard, not a VMS Wizard, so forgive me if this seems a little
obtuse:   I have a MicroVax II running VMS 5.1 with DECwindows.   I'm
also running Emacs.   I can't seem to get emacs to recognize the meta
key, or DECterm to pass it.   I've tried the obvious things, like
SET TERMINAL/EIGHTBIT, and (setq meta-flag t).

I can imagine two possible solutions to this problem (well, three, if you
count ignoring it, which I am loath to do).   The first is if someone knows
some neat way of making DECterm do what I want.   The second is if the
source code to DECterm or some other terminal program is available for
VMS.   I don't have any idea what MIT's policies are in this regard, or
for that matter whether the VMS software was developed at Athena or at
DEC.   Any information, rumours, or historical fiction would be much
appreciated.   I can be reached as follows:

mellon@eris.berkeley.edu
...!apple!nli!mellon
...!mordor!nli!mellon
...!uunet!nli!mellon

Thanx!

				_MelloN_

hart@UV4.EGLIN.AF.MIL (09/28/89)

E G L I N   A F B
                   I N T E R O F F I C E   M E M O R A N D U M

                                        Date:      27-Sep-1989 11:12am CDT
                                        From:      DENNIS L HART 
                                                   HART 
                                        Dept:      
                                        Tel No:    904-882-3154

TO:  _WINS%                               ( _DDN[XPERT@EXPO.LCS.MIT.EDU] )


Subject: DECwindows under VMS

This is addressed to any persons who find themselves in a situation
similar to myself. I am using DECwindows v5.1 employing the User Interface
Language (UIL) to define initial interface state and the Toolkit and
Xlib routines to drive the application during execution. Furthermore,
I am using Fortran [SAVE THE FLAMES]; it the language of preference
at our installation. I am interested in any discoveries, solutions,
complaints, or bugs that others in similar circumstances have found.
While I am developing an application for a specific task, I am 
investigating all levels of the DECwindow programming environment for
suitability to future efforts and I will be interested in correspondence 
on this topic.

Right now I am in need of help with getting the background and
foreground colors from specific widgets. I believe this requires
retrieving resource values but I have been unable to translate the
examples from the manual which are written in C. What I want to do is
this: I have a working zoom window, thanks to some code I got thru email,
but I cannot figure the VMS/Fortran equivalent code to query for the
background and foreground colors and then compare these "known" colors
against the results obtained from X$GET_PIXEL. I have tried the method
from the zoom/magnification example I have but I have not hit on the
correct solution to date. I have made the zoom work by determining my 
foreground color by direct observation of the pixel values but it is 
not very portable and if I try to zoom on a multicolor image I will be
sunk. Any help would be appreciated.


P.S. for reference the program I got the zoom from is Xmag - simple
     magnification application. 

meo@stiatl.UUCP (Miles O'Neal) (09/29/89)

In article <8909271630.AA05007@expo.lcs.mit.edu> hart@UV4.EGLIN.AF.MIL writes:
(of needing to access Xt widget resources from FORTRAN code under VMS).

This will work for VMS, and any other systems with something like the
DEC Procedure Calling Standard. You just need a C routine that
return()s the value you want. Then you can call the routine from FORTRAN
just as if it were a FORTRAN routine.

If this doesn't sound right, then perhaps I missed something in your
posting. But it should be straightforward...


-Miles O'Neal
{yr fave backbone here}!gatech!stiatl!meo

JONESD@kcgl1.eng.ohio-state.edu (David Jones) (09/29/89)

In article <7098@stiatl.UUCP meo@stiatl.UUCP (Miles O'Neal) writes:
> This will work for VMS, and any other systems with something like the
> DEC Procedure Calling Standard. You just need a C routine that
> return()s the value you want. Then you can call the routine from FORTRAN
> just as if it were a FORTRAN routine.

Yes, it will work, but in lots of cases the argument types required by the
C language binding (e.g. zero terminated ascii strings) are cumbersome to use
in other languages.  DEC therefore made an alternate binding for all the
xlib and toolbox routines, converting the names to VMS convention
(XCapitalizedRoutineName -> X$CAPITALIZED_ROUTINE_NAME) and the arguments
to their Runtime Library conventions (strings by descriptor, others by
reference).

Before I purchased the DECWindows programming documentation, the only
way to figure out how to use the VAX/VMS bindings was to read description
in the Ultrix documention and compare it with the synopsis of the
equivalent routine in the include file sys$library:decw$xlib.for or
sys$library:decw$dwtlibdef.for.  Lots of times you'd have to make some
shrewed guesses as to how the arguments mapped in order to get that
method to work though.

David L. Jones               |      Phone:    (614) 292-6929
Ohio State Unviversity       |      Internet:
1971 Neil Ave. Rm. 406       |               jonesd@kcgl1.eng.ohio-state.edu
Columbus, OH 43210           |               jones-d@eng.ohio-state.edu

Disclaimer: A repudiation of a claim.

yurkon@CYCVAX.NSCL.MSU.EDU (04/28/91)

Could anyone tell me where put, and what to name, the resource files under
VMS?  That is where would .xdefaults go and name.xdefaults?  Does DecWindows
look for the environment variables XENVIRONMENT and HOME?

Since C under VMS returns not only the program but the directory, does that
affect how I should define the variables?

	John			Yurkon@msunscl.bitnet

andreess@mrlaxd.mrl.uiuc.edu (Marc Andreessen) (04/28/91)

In article <1991Apr28.022858.14554@msuinfo.cl.msu.edu> yurkon@CYCVAX.NSCL.MSU.EDU writes:
>Could anyone tell me where put, and what to name, the resource files under
>VMS?  That is where would .xdefaults go and name.xdefaults?  Does DecWindows
>look for the environment variables XENVIRONMENT and HOME?

The name of the file is SYS$LOGIN:DECW$XDEFAULTS.DAT.  (The corresponding
equivalent to .mwmrc is SYS$LOGIN:DECW$MWMRC.DAT.)  (SYS$LOGIN is the
VMS logical corresponding to the Unix HOME environment variable.)

Marc

-- 
Marc Andreessen___________University of Illinois Materials Research Laboratory
Internet: andreessen@uimrl7.mrl.uiuc.edu____________Bitnet: andreessen@uiucmrl

rankin@eql.caltech.edu (Pat Rankin) (04/29/91)

In newsgroup comp.windows.x, article <1991Apr28.034619.20193@ux1.cso.uiuc.edu>,\
 andreess@mrlaxd.mrl.uiuc.edu (Marc Andreessen) writes...
>In article <1991Apr28.022858.14554@msuinfo.cl.msu.edu> yurkon@CYCVAX.NSCL.MSU.EDU writes:
>>Could anyone tell me where put, and what to name, the resource files under
>>VMS?  That is where would .xdefaults go and name.xdefaults?  Does DecWindows
>>look for the environment variables XENVIRONMENT and HOME?
> 
> The name of the file is SYS$LOGIN:DECW$XDEFAULTS.DAT.  (The corresponding
> equivalent to .mwmrc is SYS$LOGIN:DECW$MWMRC.DAT.)  (SYS$LOGIN is the
> VMS logical corresponding to the Unix HOME environment variable.)

     Not quite.  The location is actually ``DECW$USER_DEFAULTS:'', and
the default definition for _that_ is ``SYS$LOGIN:''.  It's possible to
redefine decw$user_defaults to point somewhere else.

		Pat Rankin, rankin@eql.caltech.edu

tp@mccall.com (Terry Poot) (05/01/91)

In article <28APR91170437@eql.caltech.edu>, rankin@eql.caltech.edu (Pat
Rankin) writes:
>In newsgroup comp.windows.x, article
><1991Apr28.034619.20193@ux1.cso.uiuc.edu>,\
> andreess@mrlaxd.mrl.uiuc.edu (Marc Andreessen) writes...
>>In article <1991Apr28.022858.14554@msuinfo.cl.msu.edu>
>yurkon@CYCVAX.NSCL.MSU.EDU writes:
>>>Could anyone tell me where put, and what to name, the resource files
>under
>>>VMS?  That is where would .xdefaults go and name.xdefaults?  Does
>DecWindows
>>>look for the environment variables XENVIRONMENT and HOME?
>> 
>> The name of the file is SYS$LOGIN:DECW$XDEFAULTS.DAT.  (The
>corresponding
>> equivalent to .mwmrc is SYS$LOGIN:DECW$MWMRC.DAT.)  (SYS$LOGIN is
>the
>> VMS logical corresponding to the Unix HOME environment variable.)
>
>     Not quite.  The location is actually ``DECW$USER_DEFAULTS:'', and
>the default definition for _that_ is ``SYS$LOGIN:''.  It's possible to
>redefine decw$user_defaults to point somewhere else.

One final wrinkle. You need to define that in decw$login.com, not your
normal login.com. However, that's too late for some resource files. The 
Session Manager and Window Manager resource files will still be in your
login directory. If anyone knows a way around that, I'm interested. 

BTW, don't feel bad, none of this stuff is documented, or not much.
--
Terry Poot <tp@mccall.com>                   The McCall Pattern Company
(uucp: ...!rutgers!ksuvax1!deimos!mccall!tp) 615 McCall Road
(800)255-2762, in KS (913)776-4041           Manhattan, KS 66502, USA

marra@samuel.enet.dec.com (Dave Marra) (05/01/91)

--
>One final wrinkle. You need to define that in decw$login.com, not your
>normal login.com. However, that's too late for some resource files. The 
>Session Manager and Window Manager resource files will still be in your
>login directory. If anyone knows a way around that, I'm interested. 
>
>BTW, don't feel bad, none of this stuff is documented, or not much.

The only way around it is to redefine it when the system boots in the
system logical
name table. If your the only user *EVER* then this should be ok,
otherwise it
could be 'yucky'.

						.dave.

+---------------------------------------------------------------------+
+ Dave Marra                        | TMF Engineering                 +
+ Software Validation Suites        | 37 Carlene Drive                +
+ X Windows / Motif / VMS           | Nashua, NH 03062                +
+---------------------------------------------------------------------+

marbru@auto-trol.com (Martin Brunecky) (05/02/91)

In article <1991Apr30.140123@mccall.com> tp@mccall.com (Terry Poot) writes:
commenting on placement of X resource files in VMS/DECwindows:

>BTW, don't feel bad, none of this stuff is documented, or not much.

  There used to be a "good reason" for that: you are not supposed to even
  *know* about X resource files: "they are cryptic and dangerous to use"
  That's why DEC invented UIL -(.

  So with DECwindows you get their customization interface (if exists),
  and if you can't do what you want, you are *supposed* to be out of luck.


-- 
=*= Opinions presented here are solely of my own and not those of Auto-trol =*=
Martin Brunecky                      marbru%auto-trol@sunpeaks.central.sun.com
(303) 252-2499                       (better avoid:  marbru@auto-trol.COM )
Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404