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
* files which are fixed to work correctly with ANSI C and placed in a
......@@ -28,7 +28,6 @@
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/stropts.h>
#include <sys/wait.h>
#include <signal.h>
#include <stdio.h>
......@@ -36,8 +35,6 @@
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <stropts.h>
#include <poll.h>
#include <fcntl.h>
#include <ctype.h>
......@@ -138,7 +135,7 @@ main (argc, argv)
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);
}
......@@ -448,17 +445,18 @@ createFile (pzFile)
}
tSuccess
testTest (pTest)
testTest (pTest, pzFile)
tTestDesc *pTest;
char* pzFile;
{
char *pzRes;
tSuccess res = FAILURE;
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";
sprintf (zCmdBuf, zCmdFmt, pTest->pzTest);
sprintf (zCmdBuf, zCmdFmt, pzFile, pTest->pzTest);
pzRes = runShell (zCmdBuf);
if (*pzRes == 'T')
res = SUCCESS;
......@@ -643,7 +641,7 @@ process (pzDta, pzDir, pzFile)
* IF *any* of the shell tests fail,
* THEN do not process the fix.
*/
if (!SUCCESSFUL (testTest (pTD)))
if (!SUCCESSFUL (testTest (pTD, pzFile)))
goto nextFix;
break;
......
......@@ -2,7 +2,7 @@
#
# 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
# and the template file inclhack.tpl
#
......@@ -14,19 +14,19 @@
#
# 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
# GNU General Public License, as published by the Free Software
# 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
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# 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.,
# 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
......@@ -80,6 +80,7 @@ if test -z "${target_canonical}" ; then
target_canonical="`config.guess`" ; fi
test -z "${target_canonical}" && target_canonical=unknown
fi
export target_canonical
# # # # # # # # # # # # # # # # # # # # #
#
......@@ -108,7 +109,7 @@ case $LIB in
;;
esac
echo Building fixed headers in ${LIB}
echo Fixing headers into ${LIB} for ${target_canonical} target
# Determine whether this system has symbolic links.
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;
......@@ -991,9 +991,12 @@ fix = {
/*
* Remove the double-slash 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 = {
hackname = no_double_slash;
test = '-z "`echo ${f}|grep ++`"';
select = '//[^*]';
sed = '/\/\/[^*]/' "s|//\\(.*\\)$|/* \\1 */|";
};
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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