Commit c16b55aa by Bruce Korb

Added exclusion of C++ files for double slash fix

From-SVN: r20117
parent 8a5b8e20
/* /*
* $Id: fixincl.c,v 1.1 1998/03/20 16:19:41 korbb Exp $ * $Id: fixincl.c,v 1.4 1998/08/05 10:20:11 korbb Exp $
* *
* Install modified versions of certain ANSI-incompatible system header * Install modified versions of certain ANSI-incompatible system header
* files which are fixed to work correctly with ANSI C and placed in a * files which are fixed to work correctly with ANSI C and placed in a
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <sys/param.h> #include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stropts.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <signal.h> #include <signal.h>
#include <stdio.h> #include <stdio.h>
...@@ -36,8 +35,6 @@ ...@@ -36,8 +35,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <stropts.h>
#include <poll.h>
#include <fcntl.h> #include <fcntl.h>
#include <ctype.h> #include <ctype.h>
...@@ -138,7 +135,7 @@ main (argc, argv) ...@@ -138,7 +135,7 @@ main (argc, argv)
if (strcmp (argv[1], "-v") == 0) if (strcmp (argv[1], "-v") == 0)
{ {
fputs ("$Id: fixincl.c,v 1.1 1998/03/20 16:19:41 korbb Exp $\n", stderr); fputs ("$Id: fixincl.c,v 1.3 1998/06/02 07:00:12 korbb Exp $\n", stderr);
exit (EXIT_SUCCESS); exit (EXIT_SUCCESS);
} }
...@@ -448,17 +445,18 @@ createFile (pzFile) ...@@ -448,17 +445,18 @@ createFile (pzFile)
} }
tSuccess tSuccess
testTest (pTest) testTest (pTest, pzFile)
tTestDesc *pTest; tTestDesc *pTest;
char* pzFile;
{ {
char *pzRes; char *pzRes;
tSuccess res = FAILURE; tSuccess res = FAILURE;
static char zCmdBuf[4096]; static char zCmdBuf[4096];
tSCC zCmdFmt[] = "if ( test %s ) > /dev/null 2>&1\n" tSCC zCmdFmt[] = "f=%s\nif ( test %s ) > /dev/null 2>&1\n"
"then echo TRUE\n" "else echo FALSE\n" "fi"; "then echo TRUE\n" "else echo FALSE\n" "fi";
sprintf (zCmdBuf, zCmdFmt, pTest->pzTest); sprintf (zCmdBuf, zCmdFmt, pzFile, pTest->pzTest);
pzRes = runShell (zCmdBuf); pzRes = runShell (zCmdBuf);
if (*pzRes == 'T') if (*pzRes == 'T')
res = SUCCESS; res = SUCCESS;
...@@ -643,7 +641,7 @@ process (pzDta, pzDir, pzFile) ...@@ -643,7 +641,7 @@ process (pzDta, pzDir, pzFile)
* IF *any* of the shell tests fail, * IF *any* of the shell tests fail,
* THEN do not process the fix. * THEN do not process the fix.
*/ */
if (!SUCCESSFUL (testTest (pTD))) if (!SUCCESSFUL (testTest (pTD, pzFile)))
goto nextFix; goto nextFix;
break; break;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# DO NOT EDIT THIS FILE (fixincl.sh) # DO NOT EDIT THIS FILE (fixincl.sh)
# #
# It has been autogen-ed Thursday March 19, 1998 at 08:37:00 AM PST # It has been autogen-ed Thursday May 28, 1998 at 08:21:16 AM PDT
# From the definitions inclhack.def # From the definitions inclhack.def
# and the template file inclhack.tpl # and the template file inclhack.tpl
# #
...@@ -14,19 +14,19 @@ ...@@ -14,19 +14,19 @@
# #
# See README-fixinc for more information. # See README-fixinc for more information.
# #
# inclhack is free software. # fixincludes is free software.
# #
# You may redistribute it and/or modify it under the terms of the # You may redistribute it and/or modify it under the terms of the
# GNU General Public License, as published by the Free Software # GNU General Public License, as published by the Free Software
# Foundation; either version 2, or (at your option) any later version. # Foundation; either version 2, or (at your option) any later version.
# #
# inclhack is distributed in the hope that it will be useful, # fixincludes is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details. # See the GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with inclhack. See the file "COPYING". If not, # along with fixincludes. See the file "COPYING". If not,
# write to: The Free Software Foundation, Inc., # write to: The Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, # 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA. # Boston, MA 02111-1307, USA.
...@@ -80,6 +80,7 @@ if test -z "${target_canonical}" ; then ...@@ -80,6 +80,7 @@ if test -z "${target_canonical}" ; then
target_canonical="`config.guess`" ; fi target_canonical="`config.guess`" ; fi
test -z "${target_canonical}" && target_canonical=unknown test -z "${target_canonical}" && target_canonical=unknown
fi fi
export target_canonical
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
...@@ -108,7 +109,7 @@ case $LIB in ...@@ -108,7 +109,7 @@ case $LIB in
;; ;;
esac esac
echo Building fixed headers in ${LIB} echo Fixing headers into ${LIB} for ${target_canonical} target
# Determine whether this system has symbolic links. # Determine whether this system has symbolic links.
if ln -s X $LIB/ShouldNotExist 2>/dev/null; then if ln -s X $LIB/ShouldNotExist 2>/dev/null; then
......
/* -*- Mode: C -*- $Id: inclhack.def,v 1.1 1998/03/20 16:19:41 korbb Exp $ */ /* -*- Mode: C -*- $Id: inclhack.def,v 1.6 1998/09/22 07:22:00 korbb Exp $ */
autogen definitions inclhack; autogen definitions inclhack;
...@@ -991,9 +991,12 @@ fix = { ...@@ -991,9 +991,12 @@ fix = {
/* /*
* Remove the double-slash comments * Remove the double-slash comments
* They *must* be removed so it will not create nested comments!! * They *must* be removed so it will not create nested comments!!
* However, they will *not* be removed if '++' is in any part of
* their file name.
*/ */
fix = { fix = {
hackname = no_double_slash; hackname = no_double_slash;
test = '-z "`echo ${f}|grep ++`"';
select = '//[^*]'; select = '//[^*]';
sed = '/\/\/[^*]/' "s|//\\(.*\\)$|/* \\1 */|"; sed = '/\/\/[^*]/' "s|//\\(.*\\)$|/* \\1 */|";
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment