From: ceriel Date: Fri, 15 Nov 1991 12:50:13 +0000 (+0000) Subject: Also preprocess when user explicitly askes for it through -c.i X-Git-Tag: release-5-5~629 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=1af5c80b1b5727ab6de6422df3b8f5239bb569f0;p=ack.git Also preprocess when user explicitly askes for it through -c.i --- diff --git a/util/ack/ack.1.X b/util/ack/ack.1.X index 441f12bb7..efbb31acf 100644 --- a/util/ack/ack.1.X +++ b/util/ack/ack.1.X @@ -314,8 +314,8 @@ other arguments as far as possible. .IP \-g Instruct the front-end and back-end to produce symbolic debugger information for \fIgrind\fP(1). This is currently supported by the following front-ends: -ANSI-C, Pascal, Modula-2, and the following back-ends: Motorola M68020, -Sparc, Vax. +C, ANSI-C, Pascal, Modula-2, and the following back-ends: Motorola M68020, +Sparc, Vax, Intel 80386. .PP All arguments without a suffix or with an unrecognized suffix are passed to the loaders, as for flags. diff --git a/util/ack/main.c b/util/ack/main.c index c60b79ef0..c8c19cedc 100644 --- a/util/ack/main.c +++ b/util/ack/main.c @@ -325,21 +325,31 @@ int startrf(first) trf *first ; { phase=first ; for(;;) { + int do_preprocess = 0; + int only_prep = 0; + switch ( phase->t_prep ) { /* BEWARE, sign extension */ + case NO : break ; default : if ( !mayprep() ) break ; - case YES: if ( !transform(cpp_trafo) ) { + case YES: do_preprocess = 1; + break; + } + if ( cpp_trafo && stopsuffix && + strcmp(cpp_trafo->t_out,stopsuffix)==0 ) { + /* user explicitly asked for preprocessing */ + do_preprocess = 1; + only_prep = 1; + } + + if (do_preprocess && !transform(cpp_trafo) ) { n_error++ ; #ifdef DEBUG vprint("Pre-processor failed\n") ; #endif return 0 ; - } - case NO : - break ; } - if ( cpp_trafo && stopsuffix && - strcmp(cpp_trafo->t_out,stopsuffix)==0 ) { + if ( only_prep ) { break ; } if ( !transform(phase) ) {