[506] in Release_7.7_team

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

Addendum to XAPPLRESDIR message

daemon@ATHENA.MIT.EDU (Craig Fields)
Thu Apr 25 00:13:21 1996

Date: Thu, 25 Apr 96 00:13:08 -0400
From: Craig Fields <cfields@MIT.EDU>
To: f_l@MIT.EDU, release-team@MIT.EDU, bug-sipb@MIT.EDU
Cc: miki@MIT.EDU

> But you should be paranoid and test it anyway.

Good advice.

While using XUSERFILESEARCHPATH should work correctly on all
platforms, the actual sample code I supplied fails under Ultrix - in
both the C shell and Bourne shell.

Under C shell, the variable substitution for $XUSERFILESEARCHPATH
fails because XUSERFILESEARCHPATH is one character longer than the
maximum variable length the shell (actually "Athena tcsh")
understands. No. Really.

12:05am 86> echo $XUSERFILESEARCHPATH
Variable syntax.
12:05am 87> echo $XUSERFILESEARCHPAT 
XUSERFILESEARCHPAT: Undefined variable.

Imagine my surprise.

The Bourne shell under Ultrix doesn't understand the ${foo:+:}
construct. Not so surprising.

Work arounds? If all of the platforms execute the same script for you,
and you're using csh, then for the DECstation you may wish to just
continue using XAPPLRESDIR and conditionalize by machine.  For Bourne
shell, actually use the shell's if-then syntax. There might be
aesthetically happier ways to deal, but I need to go home now.

If you don't need to support Ultrix, then you can ignore this.

Have a nice day, and always test your code. Everywhere.

Craig


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