[3087] in Release_Engineering

home help back first fref pref prev next nref lref last post

Patch for xdsc.c

daemon@ATHENA.MIT.EDU (sao@Athena.MIT.EDU)
Tue Jul 13 14:52:37 1993

From: sao@Athena.MIT.EDU
Date: Tue, 13 Jul 93 14:52:33 -0400
To: rel-eng@Athena.MIT.EDU
Cc: sao@Athena.MIT.EDU

*** xdsc.c	Tue Jul 13 14:29:03 1993
--- /source/athena/athena.bin/xdsc/xdsc.c	Sun Nov  8 23:12:05 1992
***************
*** 170,176 ****
--- 170,192 ----
          { "replybutton", "newbutton", NULL },
          { "writebutton", "mailbutton", NULL }};
  
+ typedef struct{
+ 	Boolean logging_on;
+ 	String	log_file;
+ } defaults;
  
+ static defaults	defs;
+ 
+ static XtResource app_resources[] = {
+ 	{ "loggingOn", "LoggingOn",
+ 		XtRBoolean, sizeof (Boolean), XtOffset (defaults *, logging_on),
+ 		XtRString, "true" },
+ 	{ "logfile", "Logfile",
+ 		XtRString, sizeof (String), XtOffset (defaults *, log_file),
+ 		XtRString, "/afs/athena.mit.edu/user/s/sao/scores/xdsc.log"},
+ };
+ 
+ 
  EntryRec        toplevelbuttons[2][MAX_BUTTONS];
  
  void
***************
*** 276,281 ****
--- 292,310 ----
  
  
  	myfree (newpath);
+ 
+ 	XtGetApplicationResources(	topW, (XtPointer) &defs,
+ 					app_resources, XtNumber (app_resources),
+ 					NULL, 0);
+ 
+ 	if (defs.logging_on) {
+ 		sprintf (commandline, "machtype >> %s", defs.log_file);
+ 		system (commandline);
+ 
+ 		sprintf (commandline, "date >> %s", defs.log_file);
+ 		system (commandline);
+ 	}
+ 
  
  	BuildUserInterface();
  	XtRealizeWidget(topW);

home help back first fref pref prev next nref lref last post