[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

560.0. "Arguments" by HGOVC::KENBERKUN (People that melt) Sun Apr 09 1989 07:55

    Stupid question time (again):
    
    What does my application have to do accept command line arguments
    (under Ultrix) to do things like change displays, colors, etc.?
    
    I looked at DECburger and set up things exactly the same, but when
    I try it I die with a segmentation fault.
    
    For instance: decburger -fg red    works but for my app I die.
          
    The same is true when I specify -display, although my application
    seems to work if I setenv DISPLAY (I say seems to work, because
    I don't have two workstations to test it on and must send it back
    to my own display, sigh...)
    
    Some code:
    
    unsigned int main( argc, argv)
        unsigned int   argc;
        char    *argv[];
    
    	.
    	.
    	.
    
        toplevel = XtInitialize(    "myappx",
                                    "TopLevel",
                                    NULL,
                                    0,
                                    &argc,
                                    &argv );
    
                                           
    
    This is SDC Ultrix 3.0 RISC
    
    Is there anything else I need to do (not do)?
    
    Thanks in advance,
    
    Ken B.

T.RTitleUserPersonal
Name
DateLines
560.1No & in front of argvMIPSBX::thomasThe Code WarriorSun Apr 09 1989 14:203
    topLevel = XtInitialize(NULL, "XNotes", optionList, XtNumber(optionList),
		&argc, argv);

560.2OopsHGOVC::KENBERKUNPeople that meltSun Apr 09 1989 23:044
    Thanks very much,  that did the job.
    
    Ken B.