🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.sources.d
Article #118

Re: TGIF VMS port

#118
From: grywalski
Date: Wed, 10 Apr 1991 13:55
144 lines
5824 bytes
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                    |
Technical Details
Message-ID: <1991Apr10.085553.1@idicl1.idi.battelle.org>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!ohstpy!b61512.im.battelle.org!idiws1.idi.battelle.org!idicl1.idi.battelle.org!grywalski
References: <1991Apr9.170208.13589@sol.UVic.CA>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!ohstpy!b61512.im.battelle.org!idiws1.idi.battelle.org!idicl1.idi.battelle.org!grywalski
From: grywalski@idicl1.idi.battelle.org
Newsgroups: vmsnet.sources.d,comp.os.vms,comp.windows.x
Subject: Re: TGIF VMS port
Message-ID: <1991Apr10.085553.1@idicl1.idi.battelle.org>
Date: 10 Apr 91 13:55:53 GMT
References: <1991Apr9.170208.13589@sol.UVic.CA>
Organization: IDI-Dublin
Lines: 144
Nntp-Posting-Host: bidiao
Nntp-Posting-User: raudabaugh