Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!linac!att!ucbvax!ANDREW.CMU.EDU!gk5g+ From: gk5g+@ANDREW.CMU.EDU (Gary Keim) Newsgroups: comp.soft-sys.andrew Subject: Re: Want messages.FwdHeaders preference Message-ID: Date: 16 Apr 91 20:42:46 GMT References: Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 41 Excerpts from misc: 14-Apr-91 Re: Want messages.FwdHeader.. Todd Inglett@rchland.ibm (866+0) > I declared an extern char *ProgramName in reply.c and printed it out and > got a null string. Who sets the program name? (This is getting rather > interesting...) The program name is set at the end of the main routine in andrew/atk/apps/runapp.c. Here is the code: if(application_GetName(app)==NULL){ application_SetName(app,leaf(*argv)); /* just make sure */ im_SetProgramName(leaf(*argv)); } else im_SetProgramName(application_GetName(app)); if(application_ParseArgs(app,argc,argv)){ application_ReadInitFile(app); if(application_Start(app)){ exitCode=application_Run(app); application_Stop(app); } } exit(exitCode); I'm not sure, but at the point you are calling getprofile, I'll assume that you've already gone into application_Run. Correct? I think the problem may be that when you fire up an application via: % runapp -d msgsa -d the application name is set to "runapp". You can test this by adding a preference: runapp.FwdHeaders: "To:From:Date" Gary Keim ATK Group