From:	SMTP%"dgm@cronus.colorado.edu" 11-JUN-1994 08:15:42.93
To:	EVERHART
CC:	
Subj:	Re: XtResolvePathname, VMS format for path?

X-Newsgroups: comp.os.vms
Subject: Re: XtResolvePathname, VMS format for path?
Message-Id: <1994Jun9.164726.1551@buckie.hsc.colorado.edu>
From: dgm@cronus.colorado.edu (Dom Maddalone)
Date: 9 Jun 94 16:47:26 MST
Reply-To: dgm@cronus.colorado.edu
Distribution: world
Organization: University Physicians, Inc., Denver, Colorado
Nntp-Posting-Host: athena.hsc.colorado.edu
Lines: 64
To: Info-VAX@CRVAX.SRI.COM
X-Gateway-Source-Info: USENET

In article <9JUN199410511180@seqvax.caltech.edu>, mathog@seqvax.caltech.edu (David Mathog) writes:

>What is the correct syntax for the "path" variable in:
>
>    fn = XtResolvePathname(XtDisplay(toplevelWid),
>                           "app-defaults",     /* type */
>                           "ted",              /* file name */
>                           ".help",            /* suffix */
>                           NULL,                path */
>                           NULL, (Cardinal)0,  /* substitutions */
>                           NULL                /* file predicate */
>                          );
>
>
>I've tried the obvious suspects (logicals, VMS directory specifications,
>VMS directory specifications written like Unix paths) with no luck. When
>the program invokes this function it claims that it can't find the file,
>note that it says this even when the program is run from the directory
>where ted.help is located! 
>
>What I would prefer is the form where an external logical points to the
>location of the ted.help file. 

    How about this here:

$ DIRECTORY SYS$LOGIN:TED.HELP

Directory DISKF:[MADDALONE]

TED.HELP;1

Total of 1 file.
$
$ TYPE RESOLVE_PATHNAME.C
#include <stdio.h>
#include <x11/Xm.h>
#include <X11/Xlib.h>

main(int argc, char *argv[])
{
    Widget         toplevel;
    XtAppContext   ctx;
    String         filename;

    toplevel = XtAppInitialize(&ctx,"Ted",NULL,0,&argc,argv,NULL,NULL,0);

    filename = XtResolvePathname(XtDisplay(toplevel),NULL,"TED",
            ".HELP","SYS$LOGIN%:%N%S",NULL,0,NULL);

    if (filename)  {
        printf("Filename: %s\n",filename);
        XtFree(filename);
    } else {
        printf("Filename not found\n");
    }

    exit(0);
}
$
$ RUN RESOLVE_PATHNAME
Filename: SYS$LOGIN:TED.HELP

  Dom Maddalone, dgm@cronus.colorado.edu
  System Administrator, University Physicians, Inc., Denver

