+Tue Aug 17 01:40:54 1999 Loren Rittle <ljrittle@acm.org>
+
+ * fixinc/inclhack.def (no_double_slash): Do not trash single-line
+ C-style comments. Do not lose the character before double slash.
+
Mon Aug 16 18:08:22 EDT 1999 Andrew MacLeod <amacleod@cygnus.com>
* basic-block.h (struct edge_list): Stucture to maintain a vector
# files which are fixed to work correctly with ANSI C and placed in a
# directory that GNU C will search.
#
-# This script contains 105 fixup scripts.
+# This script contains 106 fixup scripts.
#
# See README-fixinc for more information.
#
*/
const char* apzNo_Double_SlashPatch[] = { "sed",
"-e", "s,^//.*$,,",
- "-e", "s,[^:]//[^\"].*$,,",
+ "-e", "s,\\(/\\*.*\\)//\\(.*\\*/\\),\\1/ /\\2,g",
+ "-e", "s,\\([^:]\\)//[^\"].*$,\\1,",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
/*
* Test that the file-to-fix does not from a C++ directory
* Also, only accept double slashes that are not part of URL's
+ * and do not appear to be within a single-line C-style comment
* and are not the end of a quoted string.
*/
test = ' -z "`echo ${file} | egrep \'(CC|cxx|\+\+)/\'`"';
select = '(^|[^:])//[^"*]';
sed = 's,^//.*$,,';
- sed = 's,[^:]//[^"].*$,,';
+ sed = 's,\(/\*.*\)//\(.*\*/\),\1/ /\2,g';
+ sed = 's,\([^:]\)//[^"].*$,\1,';
};
else infile=${DESTFILE} ; fi
sed -e 's,^//.*$,,' \
- -e 's,[^:]//[^"].*$,,' \
+ -e 's,\(/\*.*\)//\(.*\*/\),\1/ /\2,g' \
+ -e 's,\([^:]\)//[^"].*$,\1,' \
< $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}