diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Copy_Surface.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_Image_Surface.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_Input.cxx | 6 | ||||
| -rw-r--r-- | src/Fl_Paged_Device.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_cocoa.mm | 2 | ||||
| -rw-r--r-- | src/Fl_grab.cxx | 4 | ||||
| -rw-r--r-- | src/Fl_lock.cxx | 4 | ||||
| -rw-r--r-- | src/Fl_win32.cxx | 4 | ||||
| -rw-r--r-- | src/Fl_x.cxx | 4 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx | 4 | ||||
| -rw-r--r-- | src/flstring.h | 10 | ||||
| -rw-r--r-- | src/gl_draw.cxx | 6 | ||||
| -rw-r--r-- | src/glut_compatability.cxx | 6 | ||||
| -rw-r--r-- | src/numericsort.c | 8 | ||||
| -rw-r--r-- | src/vsnprintf.c | 6 | ||||
| -rw-r--r-- | src/xutf8/utf8Input.c | 6 |
16 files changed, 39 insertions, 37 deletions
diff --git a/src/Fl_Copy_Surface.cxx b/src/Fl_Copy_Surface.cxx index 716aacfdc..08f494371 100644 --- a/src/Fl_Copy_Surface.cxx +++ b/src/Fl_Copy_Surface.cxx @@ -3,7 +3,7 @@ // // Copy-to-clipboard code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2014 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx index 48b97ccfd..6de588063 100644 --- a/src/Fl_Image_Surface.cxx +++ b/src/Fl_Image_Surface.cxx @@ -3,7 +3,7 @@ // // Draw-to-image code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2014 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx index ae46e7797..1a6c872c9 100644 --- a/src/Fl_Input.cxx +++ b/src/Fl_Input.cxx @@ -3,7 +3,7 @@ // // Input widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2011 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -730,7 +730,7 @@ int Fl_Input::handle(int event) { // fall through: case FL_DND_DRAG: //int p = mouse_position(X, Y, W, H); -#if DND_OUT_XXXX +#ifdef DND_OUT_XXXX if (Fl::focus()==this && (p>=dnd_save_position && p<=dnd_save_mark || p>=dnd_save_mark && p<=dnd_save_position)) { position(dnd_save_position, dnd_save_mark); @@ -746,7 +746,7 @@ int Fl_Input::handle(int event) { case FL_DND_LEAVE: position(dnd_save_position, dnd_save_mark); -#if DND_OUT_XXXX +#ifdef DND_OUT_XXXX if (!focused()) #endif if (dnd_save_focus && dnd_save_focus != this) { diff --git a/src/Fl_Paged_Device.cxx b/src/Fl_Paged_Device.cxx index 0147976d5..e4c27e925 100644 --- a/src/Fl_Paged_Device.cxx +++ b/src/Fl_Paged_Device.cxx @@ -3,7 +3,7 @@ // // implementation of Fl_Paged_Device class for the Fast Light Tool Kit (FLTK). // -// Copyright 2010-2014 by Bill Spitzak and others. +// Copyright 2010-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 534323965..46c7ac66a 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3,7 +3,7 @@ // // MacOS-Cocoa specific code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2015 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this diff --git a/src/Fl_grab.cxx b/src/Fl_grab.cxx index 35d69205a..5778607ab 100644 --- a/src/Fl_grab.cxx +++ b/src/Fl_grab.cxx @@ -3,7 +3,7 @@ // // Grab/release code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -47,7 +47,7 @@ extern void *fl_capture; #endif void Fl::grab(Fl_Window* win) { -#if USE_X11 +#ifdef USE_X11 Fl_Window *fullscreen_win = NULL; for (Fl_Window *W = Fl::first_window(); W; W = Fl::next_window(W)) { if (W->fullscreen_active()) { diff --git a/src/Fl_lock.cxx b/src/Fl_lock.cxx index fc6daf8b9..0ec2cf0a5 100644 --- a/src/Fl_lock.cxx +++ b/src/Fl_lock.cxx @@ -3,7 +3,7 @@ // // Multi-threading support code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2015 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -255,7 +255,7 @@ void Fl::awake(void* msg) { //////////////////////////////////////////////////////////////// // POSIX threading... -#elif HAVE_PTHREAD +#elif defined(HAVE_PTHREAD) # include <unistd.h> # include <fcntl.h> # include <pthread.h> diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 10e8141da..f15fd4c09 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -3,7 +3,7 @@ // // WIN32-specific code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2015 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -48,7 +48,7 @@ // that makes fltk use easier as only fltk libs are now requested // This idea could be extended to fltk libs themselves, // implementer should then care about DLL linkage flags ... -# if (_MSC_VER>=1310) +# if defined(_MSC_VER) && (_MSC_VER>=1310) # pragma comment (lib, "comctl32.lib") # endif #endif diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index e45405e70..fde1d8536 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -3,7 +3,7 @@ // // X specific code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2012 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -1869,7 +1869,7 @@ fprintf(stderr,"\n");*/ case 149: keysym = FL_Menu; break; } # endif -# if BACKSPACE_HACK +# ifdef BACKSPACE_HACK // Attempt to fix keyboards that send "delete" for the key in the // upper-right corner of the main keyboard. But it appears that // very few of these remain? diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx index 33c8d3379..019c0d57f 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx @@ -3,7 +3,7 @@ // // More font utilities for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2011 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -39,6 +39,8 @@ // of the font name array. #define ENDOFBUFFER 127 // sizeof(Fl_Font.fontname)-1 +#define USE_OVERLAY 0 + // turn a stored font name in "fltk format" into a pretty name: const char* Fl::get_font_name(Fl_Font fnum, int* ap) { Fl_Fontdesc *f = fl_fonts + fnum; diff --git a/src/flstring.h b/src/flstring.h index c575c2069..7c5d2dea6 100644 --- a/src/flstring.h +++ b/src/flstring.h @@ -3,7 +3,7 @@ * * Common string header file for the Fast Light Tool Kit (FLTK). * - * Copyright 1998-2010 by Bill Spitzak and others. + * Copyright 1998-2016 by Bill Spitzak and others. * * This library is free software. Distribution and use rights are outlined in * the file "COPYING" which should have been included with this file. If this @@ -60,12 +60,12 @@ extern "C" { # endif /* __cplusplus */ FL_EXPORT extern int fl_snprintf(char *, size_t, const char *, ...); -# if !HAVE_SNPRINTF +# ifndef HAVE_SNPRINTF # define snprintf fl_snprintf # endif /* !HAVE_SNPRINTF */ FL_EXPORT extern int fl_vsnprintf(char *, size_t, const char *, va_list ap); -# if !HAVE_VSNPRINTF +# ifndef HAVE_VSNPRINTF # define vsnprintf fl_vsnprintf # endif /* !HAVE_VSNPRINTF */ @@ -75,12 +75,12 @@ FL_EXPORT extern int fl_vsnprintf(char *, size_t, const char *, va_list ap); */ FL_EXPORT extern size_t fl_strlcat(char *, const char *, size_t); -# if !HAVE_STRLCAT +# ifndef HAVE_STRLCAT # define strlcat fl_strlcat # endif /* !HAVE_STRLCAT */ FL_EXPORT extern size_t fl_strlcpy(char *, const char *, size_t); -# if !HAVE_STRLCPY +# ifndef HAVE_STRLCPY # define strlcpy fl_strlcpy # endif /* !HAVE_STRLCPY */ diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx index 377914c2c..2f91143d8 100644 --- a/src/gl_draw.cxx +++ b/src/gl_draw.cxx @@ -3,7 +3,7 @@ // // OpenGL drawing support routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2011 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -179,7 +179,7 @@ void gl_remove_displaylist_fonts() #endif } -#if __APPLE__ +#ifdef __APPLE__ static void gl_draw_textures(const char* str, int n); #endif @@ -337,7 +337,7 @@ void gl_draw_image(const uchar* b, int x, int y, int w, int h, int d, int ld) { glDrawPixels(w,h,d<4?GL_RGB:GL_RGBA,GL_UNSIGNED_BYTE,(const ulong*)b); } -#if __APPLE__ || defined(FL_DOXYGEN) +#if defined(__APPLE__) || defined(FL_DOXYGEN) /* Text drawing to an OpenGL scene under Mac OS X is implemented using textures, as recommended by Apple. This allows to use any font at any size, and any Unicode character. Some old Apple hardware doesn't implement the required GL_EXT_texture_rectangle extension. diff --git a/src/glut_compatability.cxx b/src/glut_compatability.cxx index 9b1f9e6dd..1031b94ae 100644 --- a/src/glut_compatability.cxx +++ b/src/glut_compatability.cxx @@ -3,7 +3,7 @@ // // GLUT emulation routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -34,7 +34,7 @@ # define GLX_GLXEXT_LEGACY # include <GL/glx.h> # endif // HAVE_GLXGETPROCADDRESSARB -# ifdef HAVE_DLFCN_H +# if HAVE_DLFCN_H # include <dlfcn.h> # endif // HAVE_DLFCN_H # define MAXWINDOWS 32 @@ -443,7 +443,7 @@ GLUTproc glutGetProcAddress(const char *procName) { # ifdef WIN32 return (GLUTproc)wglGetProcAddress((LPCSTR)procName); -# elif defined(HAVE_DLSYM) && defined(HAVE_DLFCN_H) +# elif (HAVE_DLSYM && HAVE_DLFCN_H) char symbol[1024]; snprintf(symbol, sizeof(symbol), "_%s", procName); diff --git a/src/numericsort.c b/src/numericsort.c index 8ffe94aec..9c4297347 100644 --- a/src/numericsort.c +++ b/src/numericsort.c @@ -3,7 +3,7 @@ * * Numeric sorting routine for the Fast Light Tool Kit (FLTK). * - * Copyright 1998-2010 by Bill Spitzak and others. + * Copyright 1998-2016 by Bill Spitzak and others. * * This library is free software. Distribution and use rights are outlined in * the file "COPYING" which should have been included with this file. If this @@ -29,13 +29,13 @@ # include <dirent.h> # else # define dirent direct -# if HAVE_SYS_NDIR_H +# ifdef HAVE_SYS_NDIR_H # include <sys/ndir.h> # endif /* HAVE_SYS_NDIR_H */ -# if HAVE_SYS_DIR_H +# ifdef HAVE_SYS_DIR_H # include <sys/dir.h> # endif /* HAVE_SYS_DIR_H */ -# if HAVE_NDIR_H +# ifdef HAVE_NDIR_H # include <ndir.h> # endif /* HAVE_NDIR_H */ # endif /* HAVE_DIRENT_H */ diff --git a/src/vsnprintf.c b/src/vsnprintf.c index eb039f0b0..0fae17ca5 100644 --- a/src/vsnprintf.c +++ b/src/vsnprintf.c @@ -128,7 +128,7 @@ int fl_vsnprintf(char* buffer, size_t bufsize, const char* format, va_list ap) { case 'e' : case 'f' : case 'g' : - if ((width + 2) > sizeof(temp)) break; + if ((width + 2) > (int)sizeof(temp)) break; sprintf(temp, tformat, va_arg(ap, double)); @@ -153,7 +153,7 @@ int fl_vsnprintf(char* buffer, size_t bufsize, const char* format, va_list ap) { case 'o' : case 'u' : case 'x' : - if ((width + 2) > sizeof(temp)) break; + if ((width + 2) > (int)sizeof(temp)) break; #ifdef HAVE_LONG_LONG if (size == 'L') @@ -179,7 +179,7 @@ int fl_vsnprintf(char* buffer, size_t bufsize, const char* format, va_list ap) { break; case 'p' : /* Pointer value */ - if ((width + 2) > sizeof(temp)) break; + if ((width + 2) > (int)sizeof(temp)) break; sprintf(temp, tformat, va_arg(ap, void *)); diff --git a/src/xutf8/utf8Input.c b/src/xutf8/utf8Input.c index 7e21e3f55..392483c52 100644 --- a/src/xutf8/utf8Input.c +++ b/src/xutf8/utf8Input.c @@ -28,7 +28,7 @@ #include <string.h> #include <stdlib.h> -#if HAVE_LIBC_ICONV +#ifdef HAVE_LIBC_ICONV #include <iconv.h> #endif /* @@ -60,7 +60,7 @@ typedef struct { static int XConvertEucTwToUtf8(char* buffer_return, int len) { /* FIXME */ -#if HAVE_LIBC_ICONV +#ifdef HAVE_LIBC_ICONV iconv_t cd; int cdl; #else @@ -73,7 +73,7 @@ XConvertEucTwToUtf8(char* buffer_return, int len) { /*b = */ buf = (char*) malloc((unsigned)len); memcpy(buf, buffer_return, (unsigned) len); -#if HAVE_LIBC_ICONV +#ifdef HAVE_LIBC_ICONV l = cdl = len; cd = iconv_open("EUC-TW", "UTF-8"); iconv(cd, &b, &len, &buffer_return, &cdl); |
