[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

1476.0. "XtInitialize question" by ANNECY::SIRON () Fri Sep 22 1989 06:36

           Usually, when we want to give a data to an application,
           we put it in the command line :
              >
              > run application data
              >
           and we find it in the main's arguments :
              >
              > main(argc , argv)
              >   int argc;
              >   char *argv[];
              >

           I wonder if there will be a problem with the use of DECWindows,
           because 'argc' and 'argv' are used in the function 'XtInitialize'.

           If someone can explain me what is the aim of 'argc' and 'argv'
           in the 'XtInitialize' function, and how to give a specific data
           to the application ...

                               Beforehand, thanks.
                               Didier.

T.RTitleUserPersonal
Name
DateLines
1476.1SDSVAX::SWEENEYI was focused when focus wasnt coolFri Sep 22 1989 09:4512
    They are the one and the same.  The defined interface for obtaining
    command line arguments is the application "main" is called with argc
    and argv.  The defined interface for telling X run-time information
    passed from the command line which invoked the application is to pass
    the same argc and argv to "XtInitialize".

    By the way, XtInitialize is an R2 format convenience routine for the R3
    calls listed on page 2-130 of VMS DECwindows Toolkit Routines Reference
    Manual (VMS 5.1)  Not that I want to compel usage of the current
    routines, but you ought to know that "XtInitialize" is not a current
    routine.

1476.2Along the same linesEXLIB::DLUGOSZOpen foot, Insert MouthFri Sep 22 1989 11:338
    While your on the subject (sort of at least)...I noticed a chapter
    on the X Resource Manager in the V2 Programmers Update manual. Does
    this imply that command line argument passing will be supported
    at V2 on VMS (or is this wishful thinking)? I can't find any release
    notes (other than for VMS 5.3) or I would have checked there first.
    
    Ron

1476.3Just 'C' ??GSRC::WESTVariables don't, Constants aren'tFri Sep 22 1989 20:017
  Also,  Is this just for use with the C language ?  I toyed with it
once with Ada with zero success.

					-=> Jim <=-


1476.4C only (is there any other programming language? :-) )PSW::WINALSKICareful with that VAX, EugeneSat Sep 23 1989 14:0610
RE: .3

The main program for a C application is always a routine (C$MAIN, I think) in
the C RTL.  The C RTL routine uses LIB$GET_FOREIGN to obtain the command line
builds argv and argc from that information, then calls the user's routine
main().  If you are using Ada or any language other than C for your main
program, none of this takes place.

--PSW

1476.5QUARK::LIONELFree advice is worth every centMon Sep 25 1989 20:5812
Re: .0

I can't see how you can do that because DCL won't let you specify parameters
to the RUN command.

Re: .1

So I've heard, Pat, but I've not seen any clear documentation as to what
should be used instead.  And all of the examples use XTInitialize.

			Steve

1476.6DO-IT-YOURSELF args ...GSRC::WESTVariables don&#039;t, Constants aren&#039;tTue Sep 26 1989 17:4511

  It should be possible to use LIB$GET_FOREIGN to get the command line and
then parse it yourself to build the ARGC and ARGV variables.

  I haven't tried this approach yet, but I do not see any reason why it
should not work.

					-=> Jim <=-