1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232
|
### SPAR <http://www.cpan.org/scripts/>
### 1 644 1329052295 1329052295 is_relevant.pl
have_cc
### 11 755 1164319503 1342866383 makepp_test_script.pl
makepp;
my $correct=9;
my $count=0;
n_files 0, sub { $count++ if /File\s+warn_header/ };
c_echo '-ox2', $count == $correct ?
'OK' :
"Warning \"File warn_header ...\" occured $count/$correct times, see C.pm";
1;
### 23 644 1079144736 1186282528 Makeppfile
_OBJ_SUFFIX := $(filter %cl %cl.exe %bcc32 %bcc32.exe, $(CC))
ifdef _OBJ_SUFFIX
_OBJ_SUFFIX := .obj
else
_OBJ_SUFFIX := .o
endif
$(phony default): main1 main2
perl { Mpp::Cmds::c_cp 'answers/x1' unless -e 'x1' }
perl { Mpp::Cmds::c_cp 'answers/x3' unless -e 'x3' }
%$(_OBJ_SUFFIX): %.c
:smartscan
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(input) -o $(output)
b.h:
&echo "NOK" -o x1
wrong.h:
&echo "INCLUDE WRONG FILE" -o x2
wrong_header:
&echo "INCLUDE WRONG FILE" -o x3
### 4 644 1079140748 1079140593 a1.h
#if 0
# include "b.h"
#endif
#define A 1
### 62 644 1079140748 1079140593 a2.h
#define FUNNY(x2) x2
#if FUNNY(1)
#include "warn_header" //1
#elif FUNNY(2)
#include "warn_header" //2
#else
#include "warn_header" //3
#endif
#if 1
#include "corr.h"
#elif FUNNY(3)
#include "wrong.h"
#else
#include "wrong.h"
#endif
#if 0
#include "wrong.h"
#elif FUNNY(4)
#include "warn_header" //4
#else
#include "warn_header" //5
#endif
#if FUNNY(5)
#include "warn_header" //6
#elif 1
#include "warn_header" //7
#else
#include "wrong.h"
#endif
#if FUNNY(6)
#include "warn_header" //8
#elif 0
#include "wrong.h"
#else
#include "warn_header" //9
#endif
#if 1
#define C1 1
#elif 0
#include "wrong.h"
#else
#include "wrong.h"
#endif
#if 0
#include "wrong.h"
#elif 1
#define C2 1
#else
#include "wrong.h"
#endif
#if 0
#include "wrong.h"
#elif 0
#include "wrong.h"
#else
#define C3 1
#endif
#if C1 && C2 && C3
#include "corr.h"
#else
#include "wrong.h"
#endif
### 2 644 1079140748 1079140593 corr.h
#define FALSE 0
#define TRUE 1
### 1 644 1079140748 1079140593 warn_header
#define C 1
### 47 644 1079140748 1079140593 gcc_header.h
#define C1 1 /* comment */
#define /* comment */ C2 1
#define C3 /* comment */ 1
#define C4 /*
*/ 1
// #include "wrong_header"
/*
/* #include "wrong_header" */
/*
// #include "wrong_header" */
/*
#include "wrong_header"
*/
/* //some/comment */
#define C5/**/1
/* */#define C6 1/**/
#define /*
*/C7/*
*/1
#define C8 \
1 /*
*/
/*
// */#define C9 1
// This comment continues on the next line, \
so don't be a fool and undef C9 \
#undef C9
#define C10 \ /* Not a continuation line */
#define C11 1
#if C1 && C2 && C3 && C4 && C5 && C6 && C7 && C8 && C9 && defined(C10) & C11
#include "corr3.h"
#else
#include "wrong_header"
#endif
#if 1 \
&& 1 \
&& A
#include "wrong_header"
#endif
#ifndef C1 /* */
#include "wrong_header"
#endif
#ifndef C3
#include "wrong_header"
#endif
/*
#include "wrong_header" //comm */
### 39 644 1079140748 1079140593 cc_header.h
#define C1 1 /* comment */
#define /* comment */ C2 1
#define C3 /* comment */ 1
#define C4 /*
*/ 1
/*
#include "wrong_header" */
/*
#include "wrong_header"
*/
/* //some/comment */
#define C5/*comm*/1
/* comm*/#define C6 1/*comm*/
#define /*
*/C7/*
*/1
#define C8 \
1 /*
*/
/*
*/#define C9 1
#if C1 && C2 && C3 && C4 && C5 && C6 && C7 && C8 && C9
#include "corr3.h"
#else
#include "wrong_header"
#endif
#if 1 \
&& 1 \
&& A
#include "wrong_header"
#endif
#ifndef C1 /* */
#include "wrong_header"
#endif
#ifndef C3
#include "wrong_header"
#endif
/*
#include "wrong_header" //comm */
### 1 644 1079140748 1079140593 corr3.h
#define A 0
### 8 644 1079140745 1079140626 main1.c
#include "a1.h"
int main() {
#if A
return 0;
#endif
return 1;
}
### 4 644 1079140745 1079140626 main2.c
#include "a2.h"
int main() {
return 0;
}
### 8 644 1079140745 1079140626 main3.c
#ifdef __GNUC__
#include "gcc_header.h"
#else
#include "cc_header.h"
#endif
int main() {
return 0;
}
### D 755 1079144793 1079144618 answers
### 1 644 1079144618 1079144618 answers/x1
OK
### 1 644 1079144618 1079144618 answers/x2
OK
### 1 644 1079144618 1079144618 answers/x3
OK
|