From: SMTP%"tihor@acf3.NYU.EDU" 10-APR-1991 23:03:35.80 To: tihor@acf3.NYU.EDU CC: Subj: Re: TGIF VMS port Received: from acf3.NYU.EDU by ACF1.NYU.EDU with SMTP; Wed, 10 Apr 1991 23:03:27 EDT Received: by acf3.NYU.EDU (5.61/1.34) id AA16296; Wed, 10 Apr 91 23:03:29 -0400 Date: Wed, 10 Apr 91 23:03:29 -0400 From: tihor@acf3.NYU.EDU (Stephen Tihor) Message-Id: <9104110303.AA16296@acf3.NYU.EDU> To: tihor@acf3.NYU.EDU Subject: Re: TGIF VMS port Newsgroups: vmsnet.sources.d,comp.os.vms,comp.windows.x In-Reply-To: article <1991Apr10.085553.1@idicl1.idi.battelle.org> of 10 Apr 91 09:55 EDT /* acf3:comp.os.vms / grywalski@idicl1.idi.battelle.org / 9:55 am Apr 10, 1991 */ In article <1991Apr9.170208.13589@sol.UVic.CA>, zapantis@uvphys.phys.uvic.ca (Nik Zapantis) writes: > We are trying to configure TGIF (v2.4) to run under VMS DECWINDOWS. We have > applied the VMS specific > changes, and the program runs ok. But, we have not been able to get it to save > files or print. Does anyone know what other changes ( other than the ones > posted in TGIF.SHARE), have to be made in order to have a fully functional TGIF > / VMS? I have Tgif 2.4 *working* on VMS with the Motif window manager. The following diff shows the changes I made to get Tgif to come up and to be able to open and save .obj files. ************ File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]SETUP.C;5 271 #ifdef VMS 272 if (getcwd (bootDir, MAXPATHLENGTH+2, 0) == NULL) strcpy (bootDir, "."); 273 #else 274 if (getcwd (bootDir, MAXPATHLENGTH+2) == NULL) strcpy (bootDir, "."); 275 #endif 276 ****** File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]SETUP.C;1 271 if (getcwd (bootDir, MAXPATHLENGTH+2) == NULL) strcpy (bootDir, "."); 272 ************ ************ File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]SETUP.C;5 456 #ifdef VMS 457 wmhints.flags = InputHint; 458 #else 459 wmhints.flags = InputHint | IconWindowHint; 460 #endif 461 wmhints.input = True; 462 #ifndef VMS 463 wmhints.icon_window = iconBaseWindow; 464 #endif 465 XSetWMHints (mainDisplay, mainWindow, &wmhints); ****** File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]SETUP.C;1 452 wmhints.flags = InputHint | IconWindowHint; 453 wmhints.input = True; 454 wmhints.icon_window = iconBaseWindow; 455 XSetWMHints (mainDisplay, mainWindow, &wmhints); ************ Number of difference sections found: 2 Number of difference records found: 14 The following changes where put in to save postscript files and to print postscript files directly from the program. I don't claim this is the *best* way to fix this stuff, but it works for me. ************ File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]FILE.C;2 1236 #ifdef VMS 1237 strcpy (tmp_file, "SYS$LOGIN:TgifXXXXXX"); 1238 #else 1239 strcpy (tmp_file, "/tmp/TgifXXXXXX"); 1240 #endif 1241 mktemp (tmp_file); ****** File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]FILE.C;1 1236 strcpy (tmp_file, "/tmp/TgifXXXXXX"); 1237 mktemp (tmp_file); ************ ************ File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]FILE.C;2 1334 #ifdef VMS 1335 system(cmd); 1336 #endif 1337 break; ****** File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]FILE.C;1 1330 break; ************ ************ File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]FILE.C;2 1360 #ifdef VMS 1361 rename(tmp_file, ps_file); 1362 #else 1363 sprintf (cmd, "cat %s 1> %s 2>&1; chmod %s %s", tmp_file, ps_file, 1364 PSFILE_MOD, ps_file); 1365 #endif 1366 break; ****** File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]FILE.C;1 1353 sprintf (cmd, "cat %s 1> %s 2>&1; chmod %s %s", tmp_file, ps_file, 1354 PSFILE_MOD, ps_file); 1355 break; ************ ************ File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]FILE.C;2 1390 #ifdef VMS 1391 rename(tmp_file, ps_file); 1392 #else 1393 sprintf (cmd, "cat %s 1> %s 2>&1; chmod %s %s", tmp_file, ps_file, 1394 PSFILE_MOD, ps_file); 1395 #endif 1396 break; ****** File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]FILE.C;1 1379 sprintf (cmd, "cat %s 1> %s 2>&1; chmod %s %s", tmp_file, ps_file, 1380 PSFILE_MOD, ps_file); 1381 break; ************ ************ File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]FILE.C;2 1399 #ifndef VMS 1400 if ((fp = popen (cmd, "r")) == NULL) ****** File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]FILE.C;1 1384 if ((fp = popen (cmd, "r")) == NULL) ************ ************ File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]FILE.C;2 1421 #endif 1422 switch (whereToPrint) ****** File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]FILE.C;1 1405 switch (whereToPrint) ************ ************ File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]FILE.C;2 1455 #ifndef VMS 1456 pclose (fp); 1457 unlink (tmp_file); 1458 #endif 1459 if (!PRTGIF) ShowCursor (); ****** File BIDIAD$DKA300:[BASISDM.GRYWALSKI.TGIF24]FILE.C;1 1438 pclose (fp); 1439 unlink (tmp_file); 1440 if (!PRTGIF) ShowCursor (); ************ Number of difference sections found: 7 Number of difference records found: 26 Besides these changes, I also created an LPR symbol that does what it takes to print a postscript file on our system. (We have Alisa Share and Apple LaserWriters) 'LPR SYS$LOGIN:filename' is passed to VMS when you select Print from the File menu. -- * Roger Grywalski - Software Developer | GRYWALSKI@IDICL1.IDI.BATTELLE.ORG * Information Dimensions Inc. | * 655 Metro Place South | * Dublin, Ohio 43017 | /* ---------- */