Lines 1163-1173
Process(int scrno, Bool doScreen, Bool execute)
Link Here
|
1163 |
fclose(input); |
1163 |
fclose(input); |
1164 |
(void) mktemp(tmpname3); |
1164 |
(void) mktemp(tmpname3); |
1165 |
if((cmd = (char *) |
1165 |
if((cmd = (char *) |
1166 |
malloc(strlen(cpp_program) + strlen(includes.val) + |
1166 |
malloc(strlen(cpp_program) + 3 + strlen(includes.val) + |
1167 |
1 + strlen(tmpname2) + 3 + strlen(tmpname3) + 1)) == |
1167 |
1 + strlen(tmpname2) + 3 + strlen(tmpname3) + 1)) == |
1168 |
NULL) |
1168 |
NULL) |
1169 |
fatal("%s: Out of memory\n", ProgramName); |
1169 |
fatal("%s: Out of memory\n", ProgramName); |
1170 |
sprintf(cmd, "%s%s %s > %s", cpp_program, includes.val, |
1170 |
sprintf(cmd, "%s -P%s %s > %s", cpp_program, includes.val, |
1171 |
tmpname2, tmpname3); |
1171 |
tmpname2, tmpname3); |
1172 |
if (system(cmd) < 0) |
1172 |
if (system(cmd) < 0) |
1173 |
fatal("%s: cannot run '%s'\n", ProgramName, cmd); |
1173 |
fatal("%s: cannot run '%s'\n", ProgramName, cmd); |
Lines 1182-1191
Process(int scrno, Bool doScreen, Bool execute)
Link Here
|
1182 |
fflush(stdin); |
1182 |
fflush(stdin); |
1183 |
fseek(stdin, 0, 0); |
1183 |
fseek(stdin, 0, 0); |
1184 |
if((cmd = (char *) |
1184 |
if((cmd = (char *) |
1185 |
malloc(strlen(cpp_program) + strlen(includes.val) + 1)) == |
1185 |
malloc(strlen(cpp_program) + 3 + strlen(includes.val) + 1)) == |
1186 |
NULL) |
1186 |
NULL) |
1187 |
fatal("%s: Out of memory\n", ProgramName); |
1187 |
fatal("%s: Out of memory\n", ProgramName); |
1188 |
sprintf(cmd, "%s%s", cpp_program, includes.val); |
1188 |
sprintf(cmd, "%s -P%s", cpp_program, includes.val); |
1189 |
if (!(input = popen(cmd, "r"))) |
1189 |
if (!(input = popen(cmd, "r"))) |
1190 |
fatal("%s: cannot run '%s'\n", ProgramName, cmd); |
1190 |
fatal("%s: cannot run '%s'\n", ProgramName, cmd); |
1191 |
free(cmd); |
1191 |
free(cmd); |
Lines 1200-1212
Process(int scrno, Bool doScreen, Bool execute)
Link Here
|
1200 |
#ifdef WIN32 |
1200 |
#ifdef WIN32 |
1201 |
(void) mktemp(tmpname3); |
1201 |
(void) mktemp(tmpname3); |
1202 |
if((cmd = (char *) |
1202 |
if((cmd = (char *) |
1203 |
malloc(strlen(cpp_program) + strlen(includes.val) + |
1203 |
malloc(strlen(cpp_program) + 3 + strlen(includes.val) + |
1204 |
1 + strlen(defines.val) + 1 + |
1204 |
1 + strlen(defines.val) + 1 + |
1205 |
strlen(filename ? filename : "") + 3 + |
1205 |
strlen(filename ? filename : "") + 3 + |
1206 |
strlen(tmpname3) + 1)) == |
1206 |
strlen(tmpname3) + 1)) == |
1207 |
NULL) |
1207 |
NULL) |
1208 |
fatal("%s: Out of memory\n", ProgramName); |
1208 |
fatal("%s: Out of memory\n", ProgramName); |
1209 |
sprintf(cmd, "%s%s %s %s > %s", cpp_program, |
1209 |
sprintf(cmd, "%s -P%s %s %s > %s", cpp_program, |
1210 |
includes.val, defines.val, |
1210 |
includes.val, defines.val, |
1211 |
filename ? filename : "", tmpname3); |
1211 |
filename ? filename : "", tmpname3); |
1212 |
if (system(cmd) < 0) |
1212 |
if (system(cmd) < 0) |
Lines 1216-1227
Process(int scrno, Bool doScreen, Bool execute)
Link Here
|
1216 |
fatal("%s: can't open file '%s'\n", ProgramName, tmpname3); |
1216 |
fatal("%s: can't open file '%s'\n", ProgramName, tmpname3); |
1217 |
#else |
1217 |
#else |
1218 |
if((cmd = (char *) |
1218 |
if((cmd = (char *) |
1219 |
malloc(strlen(cpp_program) + strlen(includes.val) + 1 + |
1219 |
malloc(strlen(cpp_program) + 3 + strlen(includes.val) + 1 + |
1220 |
strlen(defines.val) + 1 + |
1220 |
strlen(defines.val) + 1 + |
1221 |
strlen(filename ? filename : "") + 1)) == |
1221 |
strlen(filename ? filename : "") + 1)) == |
1222 |
NULL) |
1222 |
NULL) |
1223 |
fatal("%s: Out of memory\n", ProgramName); |
1223 |
fatal("%s: Out of memory\n", ProgramName); |
1224 |
sprintf(cmd, "%s%s %s %s", cpp_program, |
1224 |
sprintf(cmd, "%s -P%s %s %s", cpp_program, |
1225 |
includes.val, defines.val, |
1225 |
includes.val, defines.val, |
1226 |
filename ? filename : ""); |
1226 |
filename ? filename : ""); |
1227 |
if (!(input = popen(cmd, "r"))) |
1227 |
if (!(input = popen(cmd, "r"))) |
1228 |
- |
|
|