[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
| 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 06: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.R | Title | User | Personal Name
 | Date | Lines | 
|---|
| 560.1 | No & in front of argv | MIPSBX::thomas | The Code Warrior | Sun Apr 09 1989 13:20 | 3 | 
|  |     topLevel = XtInitialize(NULL, "XNotes", optionList, XtNumber(optionList),
		&argc, argv);
 | 
| 560.2 | Oops | HGOVC::KENBERKUN | People that melt | Sun Apr 09 1989 22:04 | 4 | 
|  |     Thanks very much,  that did the job.
    
    Ken B.
 |