#!/usr/bin/env perl
# This script allows the compilation of legacy f77 code with g77 by tossing
# the g77 compiler a -fugly-logint flag to tell it to allow legacy logic
# statements instead of the proper EQV version.
# Initialize
$command = "g77 -fugly-logint ";
for ($i=0; $i<=$#ARGV; $i++)
{
$arg = $ARGV[$i];
$command .= " $arg";
}
`$command`;
exit; Archive for July 19th, 2007
Annoyance: Xterm Tektronix emulation broken on MacOS
Astronomical Software, MacOS X, MacOS X Annoyances, MacPorts, X11 No Comments »Another piece of a fundamental *nix installation that is broken in MacOS X Tiger is xterm. Specifically, the Tektronix 4014 emulation in xterm on the Mac generates ‘empty boxes’ instead of actual characters for text as shown below:
I found that this problem had been reported on Apple’s X11-users mailing list here, but no solution had been determined. I spent a bit of time looking for “missing” fonts as suggested in the posting, then decided this had to be a problem with the xterm executable and tried my previous solution of installing the program from MacPorts via
sudo port install xterm
Since that doesn’t over-ride the default xterm, I then over-rode the default installed xterm using
sudo mv /usr/X11R6/bin/xterm /usr/X11R6/bin/xterm.disabled sudo ln -s /opt/local/bin/xterm /usr/X11R6/bin/xterm
Now Tektronix emulation works and I get a screen like the one below:
Annoyance: ksh doesn’t work on MacOS X Tiger
Command Line Tricks, MacOS X, MacOS X Annoyances, MacPorts No Comments »After several days of trying to get the Hectospec folk’s data reduction packages working on my Mac, I realized one of the major problems was that ksh on the Macintosh had a major problem. Normally, in ksh (korn shell), you can set up a loop to read through a list of objects via a read command within a while..do loop. For example, to echo a list of files your ksh script could contain
#!/bin/ksh ls -1 . | while read fname; do echo $fname done
where the read filename bit reads a line from the piped input and assigns the first block of text (before a space) to the variable fname. Try this script on MacOS X and it produces no output. “read” fails. This has been documented elsewhere at least twice that I have been able to find with Google, here and here. So clearly, there is a serious bug in the installed version of ksh on MacOS X. I fixed it by updating my ksh using MacPorts, a simple
sudo port install ksh93
followed by changes in the Hectospec scripts to point to/opt/local/bin/ksh instead of /bin/ksh and I was done.










