1 : '$Id: do_resolve,v 1.2 1994/06/23 13:46:48 ceriel Exp $'
3 : Resolve name clashes in the files on the argument list. If these
4 : files reside in another directory, a copy is made in the current
5 : directory. If not, it is overwritten. Never do this in a source
6 : directory! A list of the new files is produced on standard output.
8 UTIL_BIN=$UTIL_HOME/bin
10 trap "rm -f tmp$$ a.out nmclash.* longnames clashes" 0 1 2 3 15
12 : first find out if we have to resolve problems with identifier significance.
14 cat > nmclash.c <<'EOF'
15 /* Accepted if many characters of long names are significant */
16 abcdefghijklmnopr() { }
17 abcdefghijklmnopq() { }
21 then : no identifier significance problem
27 $UTIL_BIN/prid -l7 $* > longnames
29 : remove code generating routines from the clashes list.
30 : code generating routine names start with C_.
31 : also remove names starting with flt_.
33 sed '/^C_/d' < longnames | sed '/^flt_/d' > tmp$$
34 $UTIL_BIN/cclash -c -l7 tmp$$ > clashes
37 $UTIL_BIN/cid -Fclashes < $i > tmp$$