Tags: patch On Tue, Mar 14, 2006 at 03:19:46PM +0000, Martin Michlmayr wrote: > But then I get the following (which I'm sure is easy to fix if you > know C++, which I don't):
The code is trying to pass NULL where a function expects list<sheetrecord>::iterator but never uses the parameter because of the values of other passed parameters. That's not valid C++. I don't have GCC 4.1 to hand, but the attached patch compiles with 4.0 and should fix the problem. I've included Martin's patch for the first error. Cheers, Olly
diff -ru therion-0.3.9-orig/thepsparse.h therion-0.3.9/thepsparse.h --- therion-0.3.9-orig/thepsparse.h 2005-05-05 12:20:53.000000000 +0100 +++ therion-0.3.9/thepsparse.h 2006-03-15 05:50:28.221880976 +0000 @@ -40,7 +40,7 @@ map<int,int> clippathdepth; static int clippathID; - CGS::CGS(); + CGS(); string svg_color(); }; diff -ru therion-0.3.9-orig/thpdf.cxx therion-0.3.9/thpdf.cxx --- therion-0.3.9-orig/thpdf.cxx 2005-05-05 12:20:53.000000000 +0100 +++ therion-0.3.9/thpdf.cxx 2006-03-15 05:57:23.699718744 +0000 @@ -561,7 +561,7 @@ void print_preview(int up,ofstream& PAGEDEF,double HSHIFT,double VSHIFT, - list<sheetrecord>::iterator sheet_it) { + list<sheetrecord>::iterator sheet_it = list<sheetrecord>::iterator()) { set<int> used_layers; set<string> used_scraps; double xc = 0, yc = 0; @@ -780,7 +780,7 @@ } void print_page_bg_scraps(int layer, ofstream& PAGEDEF, - list<sheetrecord>::iterator sheet_it) { + list<sheetrecord>::iterator sheet_it = list<sheetrecord>::iterator()) { // if transparency is used, all scraps should be filled white // on the coloured background, just before preview_down is displayed // and transparency is turned on @@ -975,7 +975,7 @@ void print_map(int layer, ofstream& PAGEDEF, - list<sheetrecord>::iterator sheet_it){ + list<sheetrecord>::iterator sheet_it = list<sheetrecord>::iterator()){ double HSHIFT=0, VSHIFT=0, xc = 0, yc = 0; map < int,set<string> > LEVEL; set <string> page_text_scraps,used_scraps; @@ -1561,7 +1561,7 @@ // if (LAYOUT.OCG) { // PAGEDEF << "\\PL{/OC /oc\\the\\oc" << u2str(I->first) << "\\space BDC}%" << endl; // } - print_page_bg_scraps(I->first,PAGEDEF,NULL); + print_page_bg_scraps(I->first,PAGEDEF); // if (LAYOUT.OCG) { // PAGEDEF << "\\PL{EMC}%" << endl; // } @@ -1570,7 +1570,7 @@ if (LAYOUT.grid == 1) print_grid(PAGEDEF,MINX,MINY); - if (!MAP_PREVIEW_DOWN.empty()) print_preview(0,PAGEDEF,MINX,MINY,NULL); + if (!MAP_PREVIEW_DOWN.empty()) print_preview(0,PAGEDEF,MINX,MINY); for (map<int,layerrecord>::iterator I = LAYERHASH.begin(); I != LAYERHASH.end(); I++) { if (I->second.Z == 0) { @@ -1578,7 +1578,7 @@ // we need flush layer data using XObject // (the text clipping path may become too large) - print_map((*I).first,PAGEDEF,NULL); + print_map((*I).first,PAGEDEF); PAGEDEF << "\\hfill}\\ht\\xxx=" << VS << "bp\\dp\\xxx=0bp" << endl; PAGEDEF << "\\immediate\\pdfxform "; @@ -1588,7 +1588,7 @@ PAGEDEF << "\\xxx\\PB{0}{0}{\\pdflastxform}%" << endl; } } - if (!MAP_PREVIEW_UP.empty()) print_preview(1,PAGEDEF,MINX,MINY,NULL); + if (!MAP_PREVIEW_UP.empty()) print_preview(1,PAGEDEF,MINX,MINY); if (LAYOUT.surface == 2) print_surface_bitmaps(PAGEDEF,MINX,MINY); if (LAYOUT.grid == 2) print_grid(PAGEDEF,MINX,MINY);