The following prevents genextern from generating empty declarations after every external variable. Mark *** genextern.sh.001 Fri Apr 4 10:26:20 1997 --- genextern.sh Wed Apr 2 11:04:18 1997 *************** *** 5,11 **** ( cat $* | egrep '^X(add|dir|def|ndef)? *\(') |\ sed -e '{ ! s/^X *(\(.*\))/extern \1;/ s/^Xadd *(\(.*\))/\1/ s/^Xdir *(\(.*\))/#\1/ s/^Xdef *(\([^,]*\), *\(.*\))[ ]*$/#if defined(\1)\ --- 5,11 ---- ( cat $* | egrep '^X(add|dir|def|ndef)? *\(') |\ sed -e '{ ! s/^X *(\(.*\)).*/extern \1;/ s/^Xadd *(\(.*\))/\1/ s/^Xdir *(\(.*\))/#\1/ s/^Xdef *(\([^,]*\), *\(.*\))[ ]*$/#if defined(\1)\ -- Mark Andrews, CSIRO Mathematical and Information Sciences Locked Bag 17, North Ryde, NSW 2113, Australia. PHONE: +61 2 9325 3148 INTERNET: Mark.Andrews@cmis.csiro.au MOBIL: +61 41 442 9884 UUCP: ....!uunet!cmis.csiro.au!mark.andrews