From 629f32738284d715f29f3786b3268a821823945d Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Wed, 17 Jul 2002 15:23:58 +0000 Subject: Use parenthesis for "#if defined foo" -> "#if defined(foo)" - portability. Use ANSI C comments in flstring.h, which is included from both C++ and C code. Move prototypes for OSX inside existing "C" wrapper in flstring.h. Simplify M_PI and M_SQRT2 definitions in FL/math.h; no need to define them twice... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2537 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/flstring.h | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/flstring.h') diff --git a/src/flstring.h b/src/flstring.h index a3c454f44..c05250e73 100644 --- a/src/flstring.h +++ b/src/flstring.h @@ -1,5 +1,5 @@ /* - * "$Id: flstring.h,v 1.1.2.9 2002/07/17 06:09:26 matthiaswm Exp $" + * "$Id: flstring.h,v 1.1.2.10 2002/07/17 15:23:58 easysw Exp $" * * Common string header file for the Fast Light Tool Kit (FLTK). * @@ -53,20 +53,22 @@ # define strncasecmp(s,t,n) strnicmp((s), (t), (n)) # endif /* WIN32 */ -// MetroWerks' CodeWarrior put thes "non-standard" functions int -// which unfortunatly does not play well otherwise when included - to be resolved -# if defined __APPLE__ && defined __MWERKS__ - extern "C" { - int strcasecmp(const char*,const char*); - int strncasecmp(const char*,const char*,int); - char *strdup(const char*); - } -# endif - # ifdef __cplusplus extern "C" { # endif /* __cplusplus */ +/* + * MetroWerks' CodeWarrior put thes "non-standard" functions in + * which unfortunatly does not play well otherwise + * when included - to be resolved... + */ + +# if defined(__APPLE__) && defined(__MWERKS__) +int strcasecmp(const char*,const char*); +int strncasecmp(const char*,const char*,int); +char *strdup(const char*); +# endif + # if !HAVE_SNPRINTF FL_EXPORT extern int fl_snprintf(char *, size_t, const char *, ...); # define snprintf fl_snprintf @@ -97,6 +99,7 @@ FL_EXPORT extern size_t fl_strlcpy(char *, const char *, size_t); # endif /* __cplusplus */ #endif /* !flstring_h */ + /* - * End of "$Id: flstring.h,v 1.1.2.9 2002/07/17 06:09:26 matthiaswm Exp $". + * End of "$Id: flstring.h,v 1.1.2.10 2002/07/17 15:23:58 easysw Exp $". */ -- cgit v1.2.3