Commit 35dfe415 by Bruce Korb Committed by Bruce Korb

Added support for "make check" and the "format" c_fix

From-SVN: r33843
parent e54d500c
2000-05-11 Bruce Korb <bkorb@gnu.org>
* fixinc/fixfixes.c(double_slash_fix): obsolete
(else_endif_label_fix): obsolete
(format_fix): new, unused as yet
(main): obsolete
* fixinc/fixlib.h: added fix description struct for use by format_fix
* fixinc/fixincl.c: removed the struct & test for SIGIOT befure using
* fixinc/Makefile.in: compile fixfixes.c and fixtests.c as separate
modules. Removed the vestiges of the script version.
Added support for "make check".
* fixinc/check.tpl: quiet the fixup output
* fixinc/fixtests.c(main): obsolete
* fixinc/fixincl.sh: don't bother copying fixincl to ..
* fixinc/fixincl.tpl: provide for arguments to c_fix routines
Thu May 11 11:57:02 MET DST 2000 Jan Hubicka <jh@suse.cz> Thu May 11 11:57:02 MET DST 2000 Jan Hubicka <jh@suse.cz>
* toplev.c (rest_of_compilation): Remove dead code after * toplev.c (rest_of_compilation): Remove dead code after
......
...@@ -35,13 +35,15 @@ subdir = fixinc ...@@ -35,13 +35,15 @@ subdir = fixinc
# End of variables for you to override. # End of variables for you to override.
default : gen default : all
# Now figure out from those variables how to compile and link. # Now figure out from those variables how to compile and link.
# Specify the directories to be searched for header files. # Specify the directories to be searched for header files.
# Both . and srcdir are used, in that order. # Both . and srcdir are used, in that order.
INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config -I$(srcdir)/../../include #
INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. \
-I$(srcdir)/../config -I$(srcdir)/../../include
# Always use -I$(srcdir)/config when compiling. # Always use -I$(srcdir)/config when compiling.
.c.o: .c.o:
...@@ -60,86 +62,64 @@ INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config -I$(srcdir) ...@@ -60,86 +62,64 @@ INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config -I$(srcdir)
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
LIBERTY = ../../libiberty/libiberty.a LIBERTY = ../../libiberty/libiberty.a
LIBOBJ = gnu-regex.o fixlib.o $(LIBERTY) OBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
FIOBJ = fixincl.o server.o procopen.o $(LIBOBJ) gnu-regex.o fixlib.o
HDR = server.h gnu-regex.h fixlib.h machname.h HDR = server.h gnu-regex.h fixlib.h machname.h
BIN_TARGET = fixincl fixfixes fixtests TARGETS = fixincl
TARGETS = $(BIN_TARGET)
all : $(TARGETS) all : $(TARGETS)
gen : fixincl.x gen : fixincl.x
$(FIOBJ): $(HDR) fixincl: $(OBJ) $(LIBERTY)
$(CC) $(FIXINC_DEFS) -o $@ $(OBJ) $(LIBERTY)
fixincl: $(FIOBJ)
@echo $(CC) $(FIXINC_DEFS) -o $@ $(FIOBJ) ; \
if $(CC) $(FIXINC_DEFS) -o $@ $(FIOBJ) ; then : ; else \
rm -f $@ ; (echo "#! /bin/sh" ; echo exit 1 ) > $@ ; \
chmod 777 $@ ; fi
fixfixes: fixfixes.c $(LIBOBJ)
$(CC) -o $@ $(FIXINC_DEFS) -DMAIN \
$(srcdir)/fixfixes.c $(LIBOBJ) $(LIB)
fixtests: fixtests.c $(LIBOBJ)
$(CC) -o $@ $(FIXINC_DEFS) -DMAIN \
$(srcdir)/fixtests.c $(LIBOBJ) $(LIB)
fixincl.o : fixincl.x fixincl.c fixfixes.c fixtests.c $(OBJ) : $(HDR)
server.o : server.c server.h fixincl.o : fixincl.x fixincl.c
procopen.o : procopen.c server.h fixtests.o : fixtests.c
fixlib.o: machname.h fixfixes.o : fixfixes.c
server.o : server.c
procopen.o : procopen.c
gnu-regex.o : gnu-regex.c
fixlib.o : fixlib.c
fixincl.x: fixincl.tpl inclhack.def # 'machname.h' is built in the build directory.
cd $(srcdir) ; $(SHELL) ./genfixes $@ # 'fixincl.x' in the source dir.
## inclhack.sh: inclhack.def inclhack.tpl hackshell.tpl
## cd $(srcdir) ; $(SHELL) ./genfixes $@
##
## # fixinc.sh, unlike the other two, has _no_ dependency on the .def file.
## fixincl.sh: inclhack.tpl
## cd $(srcdir) ; $(SHELL) ./genfixes $@
# This invocation of genfixes is done from the build dir,
# not the source dir (as above)
# #
machname.h: ../specs machname.h: ../specs
$(SHELL) $(srcdir)/genfixes $@ $(SHELL) $(srcdir)/genfixes $@
fixincl.x: fixincl.tpl inclhack.def
cd $(srcdir) ; $(SHELL) ./genfixes $@
clean: clean:
rm -f *.o $(TARGETS) fixincl.x machname.h rm -f *.o $(TARGETS) fixincl.x machname.h *~
# Ensure all the targets are built. If the program "fixincl" # Build the executable and copy up into gcc dir.
# failed to compile, link or load, then we install the # We still copy the script because we still have alternative scripts.
# "inclhack.sh" script. Otherwise, we install that program
# plus the wrapper script, "fixincl.sh".
# #
install-bin: fixincl fixincl.sh install-bin : fixincl
@if [ -f ../fixincl ] ; then rm -f ../fixincl || \
mv -f ../fixincl ../fixincl.$$ || exit 1 ; fi
@if [ -f ../fixinc.sh ] ; then rm -f ../fixinc.sh || \
mv -f ../fixinc.sh ../fixinc.sh.$$ || exit 1 ; fi
./fixincl -v ./fixincl -v
cp fixincl ..
cp $(srcdir)/fixincl.sh ../fixinc.sh
chmod 755 ../fixinc.sh ../fixincl
install-sh: fixfixes fixtests inclhack.sh
@if [ -f ../fixinc.sh ] ; then rm -f ../fixinc.sh || \ @if [ -f ../fixinc.sh ] ; then rm -f ../fixinc.sh || \
mv -f ../fixinc.sh ../fixinc.sh.$$ || exit 1 ; fi mv -f ../fixinc.sh ../fixinc.sh.$$ || exit 1 ; fi
echo Could not install binary fixincludes. ; \ @if [ -f ./fixincl.sh ] ; \
echo Installing shell script instead. then echo cp ./fixincl.sh ../fixinc.sh ; \
@if [ -f ./inclhack.sh ] ; \ cp ./fixincl.sh ../fixinc.sh ; \
then echo cp ./inclhack.sh ../fixinc.sh ; \ else echo cp $(srcdir)/fixincl.sh ../fixinc.sh ; \
cp ./inclhack.sh ../fixinc.sh ; \ cp $(srcdir)/fixincl.sh ../fixinc.sh ; fi
else echo cp $(srcdir)/inclhack.sh ../fixinc.sh ; \
cp $(srcdir)/inclhack.sh ../fixinc.sh ; fi
chmod 755 ../fixinc.sh chmod 755 ../fixinc.sh
Makefile: Makefile.in ../config.status Makefile: Makefile.in ../config.status
cd .. \ cd .. \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
$(SHELL) ./config.status $(SHELL) ./config.status
check : fixincl
autogen4 -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
$(SHELL) ./check.sh
@echo ; echo "diff of diffs:"
@if diff testdir/NEWDIFF $(srcdir)/check.diff ; \
then rm -rf ./testdir ./check.sh ; \
else echo ; echo "Results do not match expectations" ; echo ; \
exit 1 ; fi
...@@ -14,8 +14,9 @@ TARGET_MACHINE='*' ...@@ -14,8 +14,9 @@ TARGET_MACHINE='*'
DESTDIR=`pwd`/res DESTDIR=`pwd`/res
SRCDIR=`pwd`/inc SRCDIR=`pwd`/inc
FIND_BASE='.' FIND_BASE='.'
VERBOSE=1
export TARGET_MACHINE DESTDIR SRCDIR FIND_BASE export TARGET_MACHINE DESTDIR SRCDIR FIND_BASE VERBOSE
mkdir ${DESTDIR} ${SRCDIR} mkdir ${DESTDIR} ${SRCDIR}
...@@ -39,7 +40,6 @@ cat >> inc/[= ...@@ -39,7 +40,6 @@ cat >> inc/[=
#ifndef [=hackname _up=]_CHECK #ifndef [=hackname _up=]_CHECK
#define [=hackname _up=]_CHECK
[=test_text "\t" _prefix=] [=test_text "\t" _prefix=]
#endif /* [=hackname _up=]_CHECK */ #endif /* [=hackname _up=]_CHECK */
_HACK_EOF_ _HACK_EOF_
...@@ -50,11 +50,21 @@ _HACK_EOF_ ...@@ -50,11 +50,21 @@ _HACK_EOF_
=] =]
cd inc cd inc
find . -type f | ../../fixincl find . -type f | sed 's;\./;;' | sort > ../LIST
../../fixincl < ../LIST
cd .. cd ..
diff -cr inc res | \
sed -e 's;^\(\*\*\* inc/[^ ]*\) .*$;\1;' \ while read f
-e 's;^\(--- res/[^ ]*\) .*$;\1;' > NEWDIFF do
if [ ! -f res/$f ]
then
echo "Only in inc: inc/$f"
else
diff -c inc/$f res/$f | \
sed -e '1,2s; .*;;'
fi
done > NEWDIFF < LIST
echo echo
echo Test output check: echo Test output check:
[= [=
...@@ -63,7 +73,7 @@ _FOR fix =][= ...@@ -63,7 +73,7 @@ _FOR fix =][=
_IF test_text _exist =] _IF test_text _exist =]
fgrep [=hackname _up=]_CHECK NEWDIFF > /dev/null 2>&1 || \ fgrep [=hackname _up=]_CHECK NEWDIFF > /dev/null 2>&1 || \
echo "[=_eval hackname _get "#%32s test failed. See inc/" echo "[=_eval hackname _get "#%32s test failed. See testdir/inc/"
_printf =][= _printf =][=
_IF files _exist =][= _IF files _exist =][=
files[0] =][= files[0] =][=
......
...@@ -38,61 +38,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -38,61 +38,6 @@ Boston, MA 02111-1307, USA. */
static const char program_id[] = "fixincl version 1.1"; static const char program_id[] = "fixincl version 1.1";
/* Test Descriptor
Each fix may have associated tests that determine
whether the fix needs to be applied or not.
Each test has a type (from the te_test_type enumeration);
associated test text; and, if the test is TT_EGREP or
the negated form TT_NEGREP, a pointer to the compiled
version of the text string.
*/
typedef enum
{
TT_TEST, TT_EGREP, TT_NEGREP, TT_FUNCTION
} te_test_type;
typedef struct test_desc tTestDesc;
struct test_desc
{
te_test_type type;
const char *pz_test_text;
regex_t *p_test_regex;
};
typedef struct patch_desc tPatchDesc;
/* Fix Descriptor
Everything you ever wanted to know about how to apply
a particular fix (which files, how to qualify them,
how to actually make the fix, etc...)
NB: the FD_ defines are BIT FLAGS
*/
#define FD_MACH_ONLY 0x0000
#define FD_MACH_IFNOT 0x0001
#define FD_SHELL_SCRIPT 0x0002
#define FD_SUBROUTINE 0x0004
#define FD_REPLACEMENT 0x0008
#define FD_SKIP_TEST 0x8000
typedef struct fix_desc tFixDesc;
struct fix_desc
{
const char* fix_name; /* Name of the fix */
const char* file_list; /* List of files it applies to */
const char** papz_machs; /* List of machine/os-es it applies to */
regex_t* unused;
int test_ct;
int fd_flags;
tTestDesc* p_test_desc;
const char** patch_args;
};
/* Working environment strings. Essentially, invocation 'options'. */ /* Working environment strings. Essentially, invocation 'options'. */
char *pz_dest_dir = NULL; char *pz_dest_dir = NULL;
char *pz_src_dir = NULL; char *pz_src_dir = NULL;
...@@ -145,14 +90,12 @@ void do_version (); ...@@ -145,14 +90,12 @@ void do_version ();
char *load_file _P_((const char *)); char *load_file _P_((const char *));
void process _P_((char *, const char *)); void process _P_((char *, const char *));
void run_compiles (); void run_compiles ();
void initialize (); void initialize _P_((int argc,char** argv));
void process (); void process ();
/* External Source Code */ /* External Source Code */
#include "fixincl.x" #include "fixincl.x"
#include "fixtests.c"
#include "fixfixes.c"
/* * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * *
* *
...@@ -165,28 +108,7 @@ main (argc, argv) ...@@ -165,28 +108,7 @@ main (argc, argv)
{ {
char *file_name_buf; char *file_name_buf;
switch (argc) initialize ( argc, argv );
{
case 1:
break;
case 2:
if (strcmp (argv[1], "-v") == 0)
do_version ();
if (freopen (argv[1], "r", stdin) == (FILE*)NULL)
{
fprintf (stderr, "Error %d (%s) reopening %s as stdin\n",
errno, xstrerror (errno), argv[1] );
exit (EXIT_FAILURE);
}
break;
default:
fputs ("fixincl ERROR: too many command line arguments\n", stderr);
exit (EXIT_FAILURE);
}
initialize ();
have_tty = isatty (fileno (stderr)); have_tty = isatty (fileno (stderr));
...@@ -264,8 +186,8 @@ do_version () ...@@ -264,8 +186,8 @@ do_version ()
/* The 'version' option is really used to test that: /* The 'version' option is really used to test that:
1. The program loads correctly (no missing libraries) 1. The program loads correctly (no missing libraries)
2. we can correctly run our server shell process 2. that we can compile all the regular expressions.
3. that we can compile all the regular expressions. 3. we can correctly run our server shell process
*/ */
run_compiles (); run_compiles ();
sprintf (zBuf, zFmt, program_id); sprintf (zBuf, zFmt, program_id);
...@@ -276,12 +198,35 @@ do_version () ...@@ -276,12 +198,35 @@ do_version ()
/* * * * * * * * * * * * */ /* * * * * * * * * * * * */
void void
initialize () initialize ( argc, argv )
int argc;
char** argv;
{ {
static const char var_not_found[] = static const char var_not_found[] =
"fixincl ERROR: %s environment variable not defined\n\ "fixincl ERROR: %s environment variable not defined\n\
\tTARGET_MACHINE, DESTDIR, SRCDIR and FIND_BASE are required\n"; \tTARGET_MACHINE, DESTDIR, SRCDIR and FIND_BASE are required\n";
switch (argc)
{
case 1:
break;
case 2:
if (strcmp (argv[1], "-v") == 0)
do_version ();
if (freopen (argv[1], "r", stdin) == (FILE*)NULL)
{
fprintf (stderr, "Error %d (%s) reopening %s as stdin\n",
errno, xstrerror (errno), argv[1] );
exit (EXIT_FAILURE);
}
break;
default:
fputs ("fixincl ERROR: too many command line arguments\n", stderr);
exit (EXIT_FAILURE);
}
{ {
static const char var[] = "TARGET_MACHINE"; static const char var[] = "TARGET_MACHINE";
pz_machine = getenv (var); pz_machine = getenv (var);
...@@ -368,7 +313,9 @@ initialize () ...@@ -368,7 +313,9 @@ initialize ()
run_compiles (); run_compiles ();
signal (SIGQUIT, SIG_IGN); signal (SIGQUIT, SIG_IGN);
#ifdef SIGIOT
signal (SIGIOT, SIG_IGN); signal (SIGIOT, SIG_IGN);
#endif
signal (SIGPIPE, SIG_IGN); signal (SIGPIPE, SIG_IGN);
signal (SIGALRM, SIG_IGN); signal (SIGALRM, SIG_IGN);
signal (SIGTERM, SIG_IGN); signal (SIGTERM, SIG_IGN);
...@@ -438,7 +385,6 @@ run_compiles () ...@@ -438,7 +385,6 @@ run_compiles ()
int fix_ct = FIX_COUNT; int fix_ct = FIX_COUNT;
tTestDesc *p_test; tTestDesc *p_test;
int test_ct; int test_ct;
int re_ct = REGEX_COUNT;
const char *pz_err; const char *pz_err;
regex_t *p_re = (regex_t *) malloc (REGEX_COUNT * sizeof (regex_t)); regex_t *p_re = (regex_t *) malloc (REGEX_COUNT * sizeof (regex_t));
...@@ -457,6 +403,11 @@ run_compiles () ...@@ -457,6 +403,11 @@ run_compiles ()
compile_re (incl_quote_pat, &incl_quote_re, 1, compile_re (incl_quote_pat, &incl_quote_re, 1,
"quoted include", "run_compiles"); "quoted include", "run_compiles");
/* Allow machine name tests to be ignored (testing, mainly) */
if ((*pz_machine == '\0') || (*pz_machine == '*'))
pz_machine = (char*)NULL;
/* FOR every fixup, ... */ /* FOR every fixup, ... */
do do
{ {
...@@ -544,16 +495,17 @@ run_compiles () ...@@ -544,16 +495,17 @@ run_compiles ()
{ {
case TT_EGREP: case TT_EGREP:
case TT_NEGREP: case TT_NEGREP:
/* You might consider putting the following under #ifdef. #ifdef DEBUG
The number of re's used is computed by autogen. {
So, it is static and known at compile time. */ static int re_ct = REGEX_COUNT;
if (--re_ct < 0) if (--re_ct < 0)
{ {
fputs ("out of RE's\n", stderr); fputs ("out of RE's\n", stderr);
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
}
#endif
p_test->p_test_regex = p_re++; p_test->p_test_regex = p_re++;
compile_re (p_test->pz_test_text, p_test->p_test_regex, 0, compile_re (p_test->pz_test_text, p_test->p_test_regex, 0,
"select test", p_fixd->fix_name); "select test", p_fixd->fix_name);
...@@ -890,10 +842,8 @@ internal_fix (read_fd, p_fixd) ...@@ -890,10 +842,8 @@ internal_fix (read_fd, p_fixd)
*/ */
fcntl (fd[1], F_DUPFD, STDOUT_FILENO); fcntl (fd[1], F_DUPFD, STDOUT_FILENO);
fcntl (read_fd, F_DUPFD, STDIN_FILENO); fcntl (read_fd, F_DUPFD, STDIN_FILENO);
fdopen (STDIN_FILENO, "r");
fdopen (STDOUT_FILENO, "w");
apply_fix (p_fixd->patch_args[0], pz_curr_file); apply_fix (p_fixd, pz_curr_file);
exit (0); exit (0);
} }
......
...@@ -95,7 +95,7 @@ esac ...@@ -95,7 +95,7 @@ esac
# Original directory. # Original directory.
ORIGDIR=`${PWDCMD}` ORIGDIR=`${PWDCMD}`
FIXINCL=${ORIGDIR}/fixincl FIXINCL=${ORIGDIR}/fixinc/fixincl
export FIXINCL export FIXINCL
# Make LIB absolute only if needed to avoid problems with the amd. # Make LIB absolute only if needed to avoid problems with the amd.
......
...@@ -158,7 +158,13 @@ const char* apz[=hackname _cap=]Patch[] = {[= ...@@ -158,7 +158,13 @@ const char* apz[=hackname _cap=]Patch[] = {[=
_ELIF shell _exist =] "sh", "-c", _ELIF shell _exist =] "sh", "-c",
[=shell _krstr=],[= [=shell _krstr=],[=
_ELIF c_fix _exist =]"[=c_fix=]",[= _ELIF c_fix _exist =]
[=
c_fix _krstr=],[=
_FOR c_fix_arg =]
[=c_fix_arg _krstr=],[=
/c_fix_arg =][=
_ELIF replace _len =] _ELIF replace _len =]
[=replace _krstr=],[= [=replace _krstr=],[=
...@@ -184,7 +190,7 @@ tFixDesc fixDescList[ FIX_COUNT ] = {[= ...@@ -184,7 +190,7 @@ tFixDesc fixDescList[ FIX_COUNT ] = {[=
_FOR fix ",\n" =] _FOR fix ",\n" =]
{ z[=hackname _cap=]Name, z[=hackname _cap=]List, { z[=hackname _cap=]Name, z[=hackname _cap=]List,
apz[=hackname _cap=]Machs, (regex_t*)NULL, apz[=hackname _cap=]Machs,
[=hackname _up=]_TEST_CT, [= [=hackname _up=]_TEST_CT, [=
_IF not_machine _exist =]FD_MACH_IFNOT[= _IF not_machine _exist =]FD_MACH_IFNOT[=
_ELSE =]FD_MACH_ONLY[= _ELSE =]FD_MACH_ONLY[=
......
...@@ -93,6 +93,61 @@ typedef int apply_fix_p_t; /* Apply Fix Predicate Type */ ...@@ -93,6 +93,61 @@ typedef int apply_fix_p_t; /* Apply Fix Predicate Type */
#define _P_(p) () #define _P_(p) ()
#endif #endif
/* Test Descriptor
Each fix may have associated tests that determine
whether the fix needs to be applied or not.
Each test has a type (from the te_test_type enumeration);
associated test text; and, if the test is TT_EGREP or
the negated form TT_NEGREP, a pointer to the compiled
version of the text string.
*/
typedef enum
{
TT_TEST, TT_EGREP, TT_NEGREP, TT_FUNCTION
} te_test_type;
typedef struct test_desc tTestDesc;
struct test_desc
{
te_test_type type;
const char *pz_test_text;
regex_t *p_test_regex;
};
typedef struct patch_desc tPatchDesc;
/* Fix Descriptor
Everything you ever wanted to know about how to apply
a particular fix (which files, how to qualify them,
how to actually make the fix, etc...)
NB: the FD_ defines are BIT FLAGS
*/
#define FD_MACH_ONLY 0x0000
#define FD_MACH_IFNOT 0x0001
#define FD_SHELL_SCRIPT 0x0002
#define FD_SUBROUTINE 0x0004
#define FD_REPLACEMENT 0x0008
#define FD_SKIP_TEST 0x8000
typedef struct fix_desc tFixDesc;
struct fix_desc
{
const char* fix_name; /* Name of the fix */
const char* file_list; /* List of files it applies to */
const char** papz_machs; /* List of machine/os-es it applies to */
int test_ct;
int fd_flags;
tTestDesc* p_test_desc;
const char** patch_args;
long unused;
};
/* /*
* Exported procedures * Exported procedures
*/ */
...@@ -100,6 +155,10 @@ char * load_file_data _P_(( FILE* fp )); ...@@ -100,6 +155,10 @@ char * load_file_data _P_(( FILE* fp ));
t_bool is_cxx_header _P_(( tCC* filename, tCC* filetext )); t_bool is_cxx_header _P_(( tCC* filename, tCC* filetext ));
void compile_re _P_(( tCC* pat, regex_t* re, int match, void compile_re _P_(( tCC* pat, regex_t* re, int match,
tCC *e1, tCC *e2 )); tCC *e1, tCC *e2 ));
void apply_fix _P_(( tFixDesc* p_fixd, tCC* filname ));
apply_fix_p_t run_test _P_((tCC* t_name, tCC* f_name, tCC* text ));
#ifdef MN_NAME_PAT #ifdef MN_NAME_PAT
void mn_get_regexps _P_(( regex_t** label_re, regex_t** name_re, void mn_get_regexps _P_(( regex_t** label_re, regex_t** name_re,
tCC *who )); tCC *who ));
......
...@@ -73,7 +73,7 @@ static apply_fix_p_t test ( fname, text ) \ ...@@ -73,7 +73,7 @@ static apply_fix_p_t test ( fname, text ) \
* a backslash. Especially a backslash followed by octal digits. * a backslash. Especially a backslash followed by octal digits.
* We are not doing a correctness syntax check here. * We are not doing a correctness syntax check here.
*/ */
tSCC* static tSCC*
skip_quote( q, text ) skip_quote( q, text )
char q; char q;
char* text; char* text;
...@@ -351,36 +351,3 @@ run_test( tname, fname, text ) ...@@ -351,36 +351,3 @@ run_test( tname, fname, text )
tname ); tname );
exit( 3 ); exit( 3 );
} }
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
MAIN ROUTINE
This file is both included in fixincl.c and compiled as a separate
program for use by the inclhack.sh script.
*/
#ifdef MAIN
int
main( argc, argv )
int argc;
char** argv;
{
char* fname = *++argv;
char* tname = *++argv;
char* buf;
if (argc != 3)
return run_test( "No test name provided", NULL, NULL, 0 );
fclose( stdin );
fclose( stdout );
buf = load_file_data (fopen (fname, "r"));
return run_test( tname, fname, buf );
}
#endif
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