/
driver3.2@242/autoconf/
driver3.2@242/doc/LPC/
driver3.2@242/hosts/
driver3.2@242/hosts/amiga/NetIncl/
driver3.2@242/hosts/amiga/NetIncl/netinet/
driver3.2@242/hosts/amiga/NetIncl/sys/
driver3.2@242/hosts/atari/
driver3.2@242/hosts/fcrypt/
driver3.2@242/mudlib/
driver3.2@242/mudlib/sys/
driver3.2@242/util/
driver3.2@242/util/indent/hosts/next/
driver3.2@242/util/make_docs/
#!/bin/sh
#works with the original sh as well as with bash .
#This script fixes all #include statements with doublequoted argument that
#  end in a semicolon.
#Replace the directory name 'mudlib' below if your name differs.
#
#This script has been developed using the SLS linux distribution.
#
#Note: Trailing whitespace is removed.
#      The substitution is not anchored to the start of the line.
#      Double quotes inside the #include filename will cause the substitution
#        to fail, or maybe even remove a ; (and possibly whitespace) from the
#        filename.
#      Mixing /* with // comments will cause the substitution to fail.
find mudlib -type f -name "*.[hc]" \! -name "*[^ 	'\"]*" -print |
 xargs egrep -l "^#include[ 	]*\"[^\"]*\"[ 	]*;" |
  xargs -n1 -i sh -c "(echo '1,\$s/\\(#include[ 	]*\"[^\"]*\"\\)[ 	]*;[ 	]*\$/\\1/';echo '1,\$s/\\(#include[ 	]*\"[^\"]*\"[ 	]*\\);\\([ 	]*\\/\\*.*\\*\\/\\)[ 	]*\$/\\1 \\2/';echo '1,\$s/\\(#include[ 	]*\"[^\"]*\"[ 	]*\\);\\([ 	]*\\/\\/.*\\)\$/\\1 \\2/';echo w;echo q) | ed {}"