Fix portability problems with Solaris Forte C++ compiler.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2191 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-05-03 20:30:19 +00:00
parent 35d50f14a9
commit fbf099f11e
8 changed files with 64 additions and 63 deletions

View File

@ -1,5 +1,6 @@
CHANGES IN FLTK 1.1.0rc2 CHANGES IN FLTK 1.1.0rc2
- Portability fixes.
- Adjusted the size of the circle that is drawn inside - Adjusted the size of the circle that is drawn inside
radio buttons to scale better for larger labels. radio buttons to scale better for larger labels.
- FLUID was opening the display when it shouldn't have. - FLUID was opening the display when it shouldn't have.

View File

@ -1,47 +1,47 @@
// /*
// "$Id: Fl_Export.H,v 1.3.2.2 2002/01/01 15:11:27 easysw Exp $" * "$Id: Fl_Export.H,v 1.3.2.3 2002/05/03 20:30:19 easysw Exp $"
// *
// WIN32 DLL export definitions for the Fast Light Tool Kit (FLTK). * WIN32 DLL export definitions for the Fast Light Tool Kit (FLTK).
// *
// Copyright 1998-2002 by Bill Spitzak and others. * Copyright 1998-2002 by Bill Spitzak and others.
// *
// This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version. * version 2 of the License, or (at your option) any later version.
// *
// This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details. * Library General Public License for more details.
// *
// You should have received a copy of the GNU Library General Public * You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA. * USA.
// *
// Please report all bugs and problems to "fltk-bugs@fltk.org". * Please report all bugs and problems to "fltk-bugs@fltk.org".
// */
#ifndef Fl_Export_H #ifndef Fl_Export_H
#define Fl_Export_H # define Fl_Export_H
// /*
// The following is only used when building DLLs under WIN32 with Visual C++... * The following is only used when building DLLs under WIN32 with Visual C++...
// */
#if defined(FL_DLL) && defined(_MSC_VER) # if defined(FL_DLL) && defined(_MSC_VER)
# ifdef FL_LIBRARY # ifdef FL_LIBRARY
# define FL_EXPORT __declspec(dllexport) # define FL_EXPORT __declspec(dllexport)
# else
# define FL_EXPORT __declspec(dllimport)
# endif /* FL_LIBRARY */
# else # else
# define FL_EXPORT __declspec(dllimport) # define FL_EXPORT
# endif /* FL_LIBRARY */ # endif /* FL_DLL && _MSC_VER */
#else
# define FL_EXPORT
#endif /* FL_DLL && _MSC_VER */
#endif // !Fl_Export_H #endif /* !Fl_Export_H */
// /*
// End of "$Id: Fl_Export.H,v 1.3.2.2 2002/01/01 15:11:27 easysw Exp $". * End of "$Id: Fl_Export.H,v 1.3.2.3 2002/05/03 20:30:19 easysw Exp $".
// */

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Preferences.H,v 1.1.2.5 2002/04/30 22:25:18 matthiaswm Exp $" // "$Id: Fl_Preferences.H,v 1.1.2.6 2002/05/03 20:30:19 easysw Exp $"
// //
// Preferences definitions for the Fast Light Tool Kit (FLTK). // Preferences definitions for the Fast Light Tool Kit (FLTK).
// //
@ -45,7 +45,7 @@ public:
typedef enum { SYSTEM=0, USER } Root; typedef enum { SYSTEM=0, USER } Root;
// typedef enum { win32, macos, fltk } Type; // typedef enum { win32, macos, fltk } Type;
FL_EXPORT Fl_Preferences( enum Root root, const char *vendor, const char *application ); FL_EXPORT Fl_Preferences( Root root, const char *vendor, const char *application );
FL_EXPORT Fl_Preferences( Fl_Preferences&, const char *group ); FL_EXPORT Fl_Preferences( Fl_Preferences&, const char *group );
FL_EXPORT Fl_Preferences( Fl_Preferences*, const char *group ); FL_EXPORT Fl_Preferences( Fl_Preferences*, const char *group );
FL_EXPORT ~Fl_Preferences(); FL_EXPORT ~Fl_Preferences();
@ -81,7 +81,7 @@ public:
FL_EXPORT void flush(); FL_EXPORT void flush();
// FL_EXPORT char export( const char *filename, enum Type fileFormat ); // FL_EXPORT char export( const char *filename, Type fileFormat );
// FL_EXPORT char import( const char *filename ); // FL_EXPORT char import( const char *filename );
class Name { class Name {
@ -93,15 +93,15 @@ public:
FL_EXPORT ~Name(); FL_EXPORT ~Name();
}; };
private:
static char nameBuffer[128];
struct Entry struct Entry
{ {
char *name, *value; char *name, *value;
}; };
private:
static char nameBuffer[128];
class Node // a node contains a list to all its entries class Node // a node contains a list to all its entries
{ // and all means to manage the tree structure { // and all means to manage the tree structure
Node *child_, *next_, *parent_; Node *child_, *next_, *parent_;
@ -140,7 +140,7 @@ private:
char *filename_; char *filename_;
char *vendor_, *application_; char *vendor_, *application_;
public: public:
RootNode( Fl_Preferences *, enum Root root, const char *vendor, const char *application ); RootNode( Fl_Preferences *, Root root, const char *vendor, const char *application );
~RootNode(); ~RootNode();
int read(); int read();
int write(); int write();
@ -157,5 +157,5 @@ private:
#endif // !Fl_Preferences_H #endif // !Fl_Preferences_H
// //
// End of "$Id: Fl_Preferences.H,v 1.1.2.5 2002/04/30 22:25:18 matthiaswm Exp $". // End of "$Id: Fl_Preferences.H,v 1.1.2.6 2002/05/03 20:30:19 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
/* XPM */ /* XPM */
static char *lock_xpm[] = { static const char *lock_xpm[] = {
/* width height ncolors chars_per_pixel */ /* width height ncolors chars_per_pixel */
"16 16 6 1", "16 16 6 1",
/* colors */ /* colors */

View File

@ -1,5 +1,5 @@
/* XPM */ /* XPM */
static char *unlock_xpm[] = { static const char *unlock_xpm[] = {
/* width height ncolors chars_per_pixel */ /* width height ncolors chars_per_pixel */
"16 16 6 1", "16 16 6 1",
/* colors */ /* colors */

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Preferences.cxx,v 1.1.2.9 2002/05/01 00:03:35 easysw Exp $" // "$Id: Fl_Preferences.cxx,v 1.1.2.10 2002/05/03 20:30:19 easysw Exp $"
// //
// Preferences methods for the Fast Light Tool Kit (FLTK). // Preferences methods for the Fast Light Tool Kit (FLTK).
// //
@ -43,7 +43,7 @@
#endif #endif
char Fl_Preferences::nameBuffer[]; char Fl_Preferences::nameBuffer[128];
/** /**
@ -56,7 +56,7 @@ char Fl_Preferences::nameBuffer[];
* Must be a valid file name. * Must be a valid file name.
* example: Fl_Preferences base( Fl_Preferences::USER, "fltk.org", "test01"); * example: Fl_Preferences base( Fl_Preferences::USER, "fltk.org", "test01");
*/ */
Fl_Preferences::Fl_Preferences( enum Root root, const char *vendor, const char *application ) Fl_Preferences::Fl_Preferences( Root root, const char *vendor, const char *application )
{ {
node = new Node( "." ); node = new Node( "." );
rootNode = new RootNode( this, root, vendor, application ); rootNode = new RootNode( this, root, vendor, application );
@ -586,7 +586,7 @@ static char makePath( const char *path )
int ret = stat( path, &stats ); int ret = stat( path, &stats );
if ( ret ) if ( ret )
{ {
char *s = strrchr( path, '/' ); const char *s = strrchr( path, '/' );
if ( !s ) return 0; if ( !s ) return 0;
int len = s-path; int len = s-path;
char *p = (char*)malloc( len+1 ); char *p = (char*)malloc( len+1 );
@ -606,7 +606,7 @@ static char makePath( const char *path )
// strip the filename and create a path // strip the filename and create a path
static void makePathForFile( const char *path ) static void makePathForFile( const char *path )
{ {
char *s = strrchr( path, '/' ); const char *s = strrchr( path, '/' );
if ( !s ) return; if ( !s ) return;
int len = s-path; int len = s-path;
char *p = (char*)malloc( len+1 ); char *p = (char*)malloc( len+1 );
@ -618,7 +618,7 @@ static void makePathForFile( const char *path )
// create the root node // create the root node
// - construct the name of the file that will hold our preferences // - construct the name of the file that will hold our preferences
Fl_Preferences::RootNode::RootNode( Fl_Preferences *prefs, enum Root root, const char *vendor, const char *application ) Fl_Preferences::RootNode::RootNode( Fl_Preferences *prefs, Root root, const char *vendor, const char *application )
{ {
char filename[ FL_PATH_MAX ]; filename[0] = 0; char filename[ FL_PATH_MAX ]; filename[0] = 0;
#ifdef WIN32 #ifdef WIN32
@ -928,7 +928,7 @@ void Fl_Preferences::Node::set( const char *line )
} }
else else
{ {
char *c = strchr( line, ':' ); const char *c = strchr( line, ':' );
if ( c ) if ( c )
{ {
strncpy( nameBuffer, line, c-line ); strncpy( nameBuffer, line, c-line );
@ -1084,5 +1084,5 @@ char Fl_Preferences::Node::remove()
// //
// End of "$Id: Fl_Preferences.cxx,v 1.1.2.9 2002/05/01 00:03:35 easysw Exp $". // End of "$Id: Fl_Preferences.cxx,v 1.1.2.10 2002/05/03 20:30:19 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Text_Buffer.cxx,v 1.9.2.4 2002/04/11 11:52:41 easysw Exp $" // "$Id: Fl_Text_Buffer.cxx,v 1.9.2.5 2002/05/03 20:30:19 easysw Exp $"
// //
// Copyright 2001-2002 by Bill Spitzak and others. // Copyright 2001-2002 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under // Original code Copyright Mark Edel. Permission to distribute under
@ -364,7 +364,7 @@ void Fl_Text_Buffer::replace_rectangular( int start, int end, int rectStart,
int rectEnd, const char *text ) { int rectEnd, const char *text ) {
char *insPtr; char *insPtr;
const char *deletedText; const char *deletedText;
char *insText = ""; char *insText = (char *)"";
int i, nInsertedLines, nDeletedLines, insLen, hint; int i, nInsertedLines, nDeletedLines, insLen, hint;
int insertDeleted, insertInserted, deleteInserted; int insertDeleted, insertInserted, deleteInserted;
int linesPadded = 0; int linesPadded = 0;
@ -2285,5 +2285,5 @@ Fl_Text_Buffer::outputfile(const char *file, int start, int end, int buflen) {
// //
// End of "$Id: Fl_Text_Buffer.cxx,v 1.9.2.4 2002/04/11 11:52:41 easysw Exp $". // End of "$Id: Fl_Text_Buffer.cxx,v 1.9.2.5 2002/05/03 20:30:19 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
/* XPM */ /* XPM */
static char * tile_xpm[] = { static const char * tile_xpm[] = {
"100 100 17 1", "100 100 17 1",
" c None", " c None",
". c #DCDCDC", ". c #DCDCDC",