8539f0b
diff -Naur cdsclient-3.78.orig/abibcode cdsclient-3.78.new/abibcode
8539f0b
--- cdsclient-3.78.orig/abibcode	2015-01-25 14:50:09.196503545 +0100
8539f0b
+++ cdsclient-3.78.new/abibcode	2015-01-25 15:19:56.046725512 +0100
8539f0b
@@ -15,6 +15,8 @@
8539f0b
 #----------------
8539f0b
 set D_BIN = `dirname $0`
8539f0b
 
8539f0b
+set AWKSCRIPT = '/usr/share/cdsclient/abibcode.awk'
8539f0b
+
8539f0b
 ## Examine the installation
8539f0b
 set AWK = `which gawk`
8539f0b
 if ($#AWK != 1) set AWK = `which nawk`
8539f0b
@@ -41,9 +43,9 @@
8539f0b
 #\bibitem	bibcode_19	free_bibcode
8539f0b
 #rm -rf $tt.*
8539f0b
 set file = $1
8539f0b
-trim $file | sed 's/, */ /g' | $AWK -f $0.awk > $tt.3
8539f0b
+#trim $file | sed 's/, */ /g' | $AWK -f $AWKSCRIPT > $tt.3
8539f0b
 #cat $tt.3
8539f0b
-#tr -d , < $1 | $AWK -f $0.awk > $tt.3
8539f0b
+tr -d , < $file | $AWK -f $AWKSCRIPT > $tt.3
8539f0b
 
8539f0b
 # Interrogate SIMBAD from 3rd column of $tt.3, and generates
8539f0b
 #             2-column table with input SIMBAD_output
8539f0b
@@ -101,7 +103,7 @@
8539f0b
 #cat $tt.fin | acut -i"#" -c1-
8539f0b
 
8539f0b
 # Final: merge the original text with the appopriate macro
8539f0b
-trim $file | $AWK -v f3=$tt.fin '\
8539f0b
+tr -d , < $file | $AWK -v f3=$tt.fin '\
8539f0b
   /^ *\\bibitem[[{]/{ if (ref!="") print "\t" ref; print; \
8539f0b
 	getline result < f3 ; nr = split(result, c, "\t")\
8539f0b
 	if (c[3] != "") ref = "\\simOK{" c[3] "}";  \