Dear All
I'm having problems with multiple #include "filename" lines with gpc-19990813 in a program that worked with gpc-19990118 (and others).
Example program is:
--------- solver.p ----------- program SOLVER(input,output);
#include "TurboP.def" #include "WinLib.def" #include "PlotLib.def" #include "MxFiler.def"
begin writeln("Hello!"); end. -------------------------
% gpc -I./modules solver.p solver.p:5: WinLib.def: No such file or directory solver.p:6: PlotLib.def: No such file or directory solver.p:7: MxFiler.def: No such file or directory
% gpc -I./modules -I./modules -I./modules -I./modules solver.p % ./a.out Hello!
Actually gpc -v reports 19990610, by the way.
Thanks
Ian
-- Ian Thurlbeck http://www.stams.strath.ac.uk/ Statistics and Modelling Science, University of Strathclyde Livingstone Tower, 26 Richmond Street, Glasgow, UK, G1 1XH Tel: +44 (0)141 548 3667 Fax: +44 (0)141 552 2079
Dear Pascal Peeps
I reported a bug (see below) a week ago about #include directives not working properly. A quick scan of the diffs for file gpc-cccp.c with the 19990118 gpc revealed 2 lines 5902,5093:
searchptr->fname = (char *) xmalloc (flen + 1); strncpy (searchptr->fname, fname, flen);
No idea what this is supposed to do, but commenting them out fixes the problem.
Hope this helps someone!
Ian
Original bug report:
On Fri, 20 Aug 1999, you wrote:
Dear All
I'm having problems with multiple #include "filename" lines with gpc-19990813 in a program that worked with gpc-19990118 (and others).
Example program is:
--------- solver.p ----------- program SOLVER(input,output);
#include "TurboP.def" #include "WinLib.def" #include "PlotLib.def" #include "MxFiler.def"
begin writeln("Hello!"); end.
% gpc -I./modules solver.p solver.p:5: WinLib.def: No such file or directory solver.p:6: PlotLib.def: No such file or directory solver.p:7: MxFiler.def: No such file or directory
% gpc -I./modules -I./modules -I./modules -I./modules solver.p % ./a.out Hello!
Actually gpc -v reports 19990610, by the way.
Thanks
Ian
-- Ian Thurlbeck http://www.stams.strath.ac.uk/ Statistics and Modelling Science, University of Strathclyde Livingstone Tower, 26 Richmond Street, Glasgow, UK, G1 1XH Tel: +44 (0)141 548 3667 Fax: +44 (0)141 552 2079
Ian Thurlbeck wrote:
[...] searchptr->fname = (char *) xmalloc (flen + 1); strncpy (searchptr->fname, fname, flen);
No idea what this is supposed to do, but commenting them out fixes the problem.
Thanks for finding this out. I am currently on holidays but will investigate this as soon as possible.
Greetings,
Peter