From 31a54bcf1bf073e35d192f49320774ac485d843c Mon Sep 17 00:00:00 2001 From: Fabien Costantini Date: Sun, 21 Mar 2010 22:55:18 +0000 Subject: Fixed msvc6 compilation was broken. What is the use of visualc now? seems we should remove that one ... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7312 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_PSfile_Device.H | 3 ++- fluid/alignment_panel.fl | 2 +- fluid/alignment_panel.h | 2 +- src/Fl_Device.cxx | 2 +- src/Fl_GDI_Printer.cxx | 2 +- src/Fl_Native_File_Chooser_WIN32.cxx | 2 +- src/Fl_Tree_Item.cxx | 26 +++++++++++++++----------- 7 files changed, 22 insertions(+), 17 deletions(-) diff --git a/FL/Fl_PSfile_Device.H b/FL/Fl_PSfile_Device.H index 0baccb5d4..38213e105 100644 --- a/FL/Fl_PSfile_Device.H +++ b/FL/Fl_PSfile_Device.H @@ -29,6 +29,8 @@ #ifndef Fl_PSfile_Device_H #define Fl_PSfile_Device_H + +#define NO_PAGE_FORMATS 30 /* MSVC6 compilation fix */ /** \brief Sends all graphics to a local PostScript file; same API as Fl_Printer class. @@ -136,7 +138,6 @@ class Fl_PSfile_Device : public Fl_Abstract_Printer { FILE *output; double pw_, ph_; - static const int NO_PAGE_FORMATS=30; static const struct page_format page_formats[NO_PAGE_FORMATS]; uchar bg_r, bg_g, bg_b; diff --git a/fluid/alignment_panel.fl b/fluid/alignment_panel.fl index 463a5febc..0aa05fd90 100644 --- a/fluid/alignment_panel.fl +++ b/fluid/alignment_panel.fl @@ -49,7 +49,7 @@ decl {extern int show_comments;} {public local decl {extern int show_coredevmenus;} {public local } -decl {extern class Fl_Menu_Item *dbmanager_item;} {public local +decl {extern struct Fl_Menu_Item *dbmanager_item;} {public local } Function {make_project_window()} {} { diff --git a/fluid/alignment_panel.h b/fluid/alignment_panel.h index 5051dac94..4d48b6187 100644 --- a/fluid/alignment_panel.h +++ b/fluid/alignment_panel.h @@ -36,7 +36,7 @@ extern void load_history(); extern void redraw_browser(); extern int show_comments; extern int show_coredevmenus; -extern class Fl_Menu_Item *dbmanager_item; +extern struct Fl_Menu_Item *dbmanager_item; #include #include #include diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx index ac41afc23..26db1583c 100644 --- a/src/Fl_Device.cxx +++ b/src/Fl_Device.cxx @@ -142,7 +142,7 @@ void Fl_Abstract_Printer::delete_image_list() while(image_list_) { struct chain_elt *next = image_list_->next; if(image_list_->image) delete image_list_->image; - if (image_list_->data) delete image_list_->data; + if (image_list_->data) delete (uchar*) image_list_->data; // msvc6 compilation fix free(image_list_); image_list_ = next; } diff --git a/src/Fl_GDI_Printer.cxx b/src/Fl_GDI_Printer.cxx index 7ac51389c..6717a3803 100644 --- a/src/Fl_GDI_Printer.cxx +++ b/src/Fl_GDI_Printer.cxx @@ -30,7 +30,7 @@ #include -#include +#include extern HWND fl_window; diff --git a/src/Fl_Native_File_Chooser_WIN32.cxx b/src/Fl_Native_File_Chooser_WIN32.cxx index 2cebb62ff..063c1e532 100644 --- a/src/Fl_Native_File_Chooser_WIN32.cxx +++ b/src/Fl_Native_File_Chooser_WIN32.cxx @@ -243,7 +243,7 @@ void Fl_Native_File_Chooser::ClearOFN() { _ofn.lpstrFile = NULL; } if ( _ofn.lpstrInitialDir ) { - delete [] _ofn.lpstrInitialDir; + delete [] (TCHAR*) _ofn.lpstrInitialDir; //msvc6 compilation fix _ofn.lpstrInitialDir = NULL; } _ofn.lpstrFilter = NULL; // (deleted elsewhere) diff --git a/src/Fl_Tree_Item.cxx b/src/Fl_Tree_Item.cxx index 66950ed4f..703bfb2fd 100644 --- a/src/Fl_Tree_Item.cxx +++ b/src/Fl_Tree_Item.cxx @@ -373,11 +373,13 @@ void Fl_Tree_Item::draw_horizontal_connector(int x1, int x2, int y, const Fl_Tre y |= 1; // force alignment w/dot pattern fl_line(x1,y,x2,y); return; - case FL_TREE_CONNECTOR_DOTTED: - y |= 1; // force alignment w/dot pattern - for ( int xx=x1; xx<=x2; xx++ ) { - if ( !(xx & 1) ) fl_point(xx, y); - } + case FL_TREE_CONNECTOR_DOTTED: + { + y |= 1; // force alignment w/dot pattern + for ( int xx=x1; xx<=x2; xx++ ) { + if ( !(xx & 1) ) fl_point(xx, y); + } + } return; case FL_TREE_CONNECTOR_NONE: return; @@ -394,12 +396,14 @@ void Fl_Tree_Item::draw_vertical_connector(int x, int y1, int y2, const Fl_Tree_ fl_line(x,y1,x,y2); return; case FL_TREE_CONNECTOR_DOTTED: - y1 |= 1; // force alignment w/dot pattern - y2 |= 1; // force alignment w/dot pattern - for ( int yy=y1; yy<=y2; yy++ ) { - if ( yy & 1 ) fl_point(x, yy); - } - return; + { + y1 |= 1; // force alignment w/dot pattern + y2 |= 1; // force alignment w/dot pattern + for ( int yy=y1; yy<=y2; yy++ ) { + if ( yy & 1 ) fl_point(x, yy); + } + } + return; case FL_TREE_CONNECTOR_NONE: return; } -- cgit v1.2.3