DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: http://www.fltk.org/str.php?L2803
Version: 1.3-current
Attached file "diff.txt"...
Link: http://www.fltk.org/str.php?L2803
Version: 1.3-current
--- ./orig/./FL/glut.H 2011-07-18 23:49:30.000000000 -0500
+++ ./FL/glut.H 2012-02-02 00:37:44.131571676 -0600
@@ -33,7 +33,7 @@
# include "gl.h"
-
+# include <stddef.h>
# include "Fl.H"
# include "Fl_Gl_Window.H"
@@ -233,7 +233,7 @@
// Warning: this cast may not work on all machines:
inline void glutTimerFunc(unsigned int msec, void (*f)(int), int value) {
- Fl::add_timeout(msec*.001, (void (*)(void *))f, (void *)value);
+ Fl::add_timeout(msec*.001, (void (*)(void *))f, (void *)(ptrdiff_t)value);
}
inline void glutMenuStateFunc(void (*f)(int state)) {
--- ./orig/./src/Fl_Device.cxx 2012-01-13 13:04:10.000000000 -0600
+++ ./src/Fl_Device.cxx 2012-02-01 23:08:22.061730924 -0600
@@ -53,7 +53,7 @@
fl_matrix = &m;
p = (XPOINT *)0;
font_descriptor_ = NULL;
-};
+}
void Fl_Graphics_Driver::text_extents(const char*t, int n, int& dx, int& dy,
int& w, int& h)
{
@@ -86,7 +86,7 @@
#endif
fl_mac_os_version = versionMajor * 10000 + versionMinor * 100 +
versionBugFix;
#endif
-};
+}
//
--- ./orig/./src/fl_draw_pixmap.cxx 2011-07-18 23:49:30.000000000 -0500
+++ ./src/fl_draw_pixmap.cxx 2012-02-01 23:51:45.151653617 -0600
@@ -209,8 +209,8 @@
if (!fl_measure_pixmap(cdata, d.w, d.h)) return 0;
const uchar*const* data = (const uchar*const*)(cdata+1);
int transparent_index = -1;
- uchar *transparent_c = (uchar *)0; // such that transparent_c[0,1,2] are the
RGB of the transparent color
#ifdef WIN32
+ uchar *transparent_c = (uchar *)0; // such that transparent_c[0,1,2] are the
RGB of the transparent color
color_count = 0;
used_colors = (uchar *)malloc(abs(ncolors)*3*sizeof(uchar));
#endif
@@ -230,7 +230,9 @@
#endif
transparent_index = ' ';
Fl::get_color(bg, c[0], c[1], c[2]); c[3] = 0;
+#ifdef WIN32
transparent_c = c;
+#endif
p += 4;
ncolors--;
}
@@ -316,7 +318,9 @@
c[3] = 0;
#endif
transparent_index = ind;
+#ifdef WIN32
transparent_c = c;
+#endif
}
}
}
--- ./orig/./src/glut_compatability.cxx 2011-07-18 23:49:30.000000000 -0500
+++ ./src/glut_compatability.cxx 2012-02-02 01:37:52.584797844 -0600
@@ -29,6 +29,8 @@
#include "flstring.h"
#if HAVE_GL
+#include <stddef.h>
+
# include <FL/glut.H>
# ifdef HAVE_GLXGETPROCADDRESSARB
# define GLX_GLXEXT_LEGACY
@@ -333,7 +335,7 @@
Fl_Menu_Item* i = additem(m);
i->text = label;
i->callback_ = (Fl_Callback*)(m->cb);
- i->user_data_ = (void *)value;
+ i->user_data_ = (void *)(ptrdiff_t)value;
}
void glutAddSubMenu(char *label, int submenu) {
@@ -350,7 +352,7 @@
Fl_Menu_Item* i = &m->m[item-1];
i->text = label;
i->callback_ = (Fl_Callback*)(m->cb);
- i->user_data_ = (void *)value;
+ i->user_data_ = (void *)(ptrdiff_t)value;
i->flags = 0;
}
@@ -443,15 +445,26 @@
snprintf(symbol, sizeof(symbol), "_%s", procName);
# ifdef RTLD_DEFAULT
- return (GLUTproc)dlsym(RTLD_DEFAULT, symbol);
+ /* return (GLUTproc)dlsym(RTLD_DEFAULT, symbol); */
+ {
+ /* hack - http://en.wikipedia.org/wiki/Dynamic_loading */
+ union {GLUTproc func; void * obj; } alias;
+ alias.obj= dlsym(RTLD_DEFAULT, symbol);
+ return alias.func;
+ }
# else // No RTLD_DEFAULT support, so open the current a.out symbols...
static void *rtld_default = 0;
if (!rtld_default) rtld_default = dlopen(0, RTLD_LAZY);
- if (rtld_default) return (GLUTproc)dlsym(rtld_default, symbol);
- else return 0;
+ /* if (rtld_default) return (GLUTproc)dlsym(rtld_default, symbol); */
+ if (rtld_default){
+ /* hack - http://en.wikipedia.org/wiki/Dynamic_loading */
+ union {GLUTproc func; void * obj; } alias;
+ alias.obj= dlsym(rtld_default, symbol);
+ return alias.func;
+ }else return 0;
# endif // RTLD_DEFAULT
--- ./orig/./src/Fl_x.cxx 2011-11-29 08:41:33.000000000 -0600
+++ ./src/Fl_x.cxx 2012-02-02 01:04:30.451523972 -0600
@@ -652,8 +652,19 @@
int error_base;
typedef Bool (*XRRQueryExtension_type)(Display*, int*, int*);
typedef void (*XRRSelectInput_type)(Display*, Window, int);
- XRRQueryExtension_type XRRQueryExtension_f =
(XRRQueryExtension_type)dlsym(libxrandr_addr, "XRRQueryExtension");
- XRRSelectInput_type XRRSelectInput_f =
(XRRSelectInput_type)dlsym(libxrandr_addr, "XRRSelectInput");
+ /* hack - http://en.wikipedia.org/wiki/Dynamic_loading */
+ XRRQueryExtension_type XRRQueryExtension_f;
+ XRRSelectInput_type XRRSelectInput_f;
+ {
+ union {XRRQueryExtension_type func; void * obj; } alias;
+ alias.obj= dlsym(libxrandr_addr, "XRRQueryExtension");
+ XRRQueryExtension_f= alias.func;
+ }
+ {
+ union {XRRSelectInput_type func; void * obj; } alias;
+ alias.obj= dlsym(libxrandr_addr, "XRRSelectInput");
+ XRRSelectInput_f = alias.func;
+ }
if (XRRQueryExtension_f && XRRSelectInput_f && XRRQueryExtension_f(d,
&randrEventBase, &error_base))
XRRSelectInput_f(d, RootWindow(d, fl_screen), RRScreenChangeNotifyMask);
else libxrandr_addr = NULL;
@@ -1260,7 +1271,7 @@
fl_key_vector[keycode/8] |= (1 << (keycode%8));
static char *buffer = NULL;
static int buffer_len = 0;
- int len;
+ /*int len;*/
KeySym keysym;
if (buffer_len == 0) {
buffer_len = 4096;
@@ -1440,7 +1451,7 @@
// Store ASCII numeric keypad value...
keysym = keysym1 | FL_KP;
buffer[0] = char(keysym1) & 0x7F;
- len = 1;
+ /*len = 1;*/
} else {
// Map keypad to special key...
static const unsigned short table[15] = {
--- ./orig/./src/fl_font_xft.cxx 2011-07-18 23:49:30.000000000 -0500
+++ ./src/fl_font_xft.cxx 2012-02-01 23:53:13.078317670 -0600
@@ -673,9 +673,9 @@
if (num_chars < n) n = num_chars; // limit drawing to usable characters in
input array
FcChar32 *ucs_txt = new FcChar32[n+1];
FcChar32* pu;
- int in, out, sz;
+ int /*in,*/ out, sz;
ucs_txt[n] = 0;
- in = 0; out = n-1;
+ /*in = 0;*/ out = n-1;
while ((out >= 0) && (utf_len > 0))
{
pu = &ucs_txt[out];
--- ./orig/./src/Fl_Preferences.cxx 2012-01-18 05:39:57.000000000 -0600
+++ ./src/Fl_Preferences.cxx 2012-02-01 23:09:38.181728662 -0600
@@ -1307,17 +1307,17 @@
char *src = entry_[i].value;
if ( src ) { // hack it into smaller pieces if needed
fprintf( f, "%s:", entry_[i].name );
- int cnt, written;
+ int cnt/*, written*/;
for ( cnt = 0; cnt < 60; cnt++ )
if ( src[cnt]==0 ) break;
- written = fwrite( src, cnt, 1, f );
+ /*written =*/ fwrite( src, cnt, 1, f );
fprintf( f, "\n" );
src += cnt;
for (;*src;) {
for ( cnt = 0; cnt < 80; cnt++ )
if ( src[cnt]==0 ) break;
fputc( '+', f );
- written = fwrite( src, cnt, 1, f );
+ /*written =*/ fwrite( src, cnt, 1, f );
fputc( '\n', f );
src += cnt;
}
--- ./orig/./src/fl_ask.cxx 2011-09-27 22:39:23.000000000 -0500
+++ ./src/fl_ask.cxx 2012-02-01 23:49:21.374991221 -0600
@@ -21,6 +21,7 @@
// mostly. In most cases it is easier to get a multi-line message
// by putting newlines in the message.
+#include <stddef.h>
#include <stdio.h>
#include <stdarg.h>
#include "flstring.h"
@@ -92,7 +93,7 @@
}
w->end(); // don't add the buttons automatically
// create the buttons (right to left)
- for (int b=0, x=310; b<3; b++, x -= 100) {
+ for (/*int*/ptrdiff_t b=0, x=310; b<3; b++, x -= 100) {
if (b==1)
button[b] = new Fl_Return_Button(x, 70, 90, 23);
else
--- ./orig/./test/file_chooser.cxx 2011-07-18 23:49:30.000000000 -0500
+++ ./test/file_chooser.cxx 2012-02-02 01:40:00.324794049 -0600
@@ -221,7 +221,7 @@
const char *filename; // Current filename
- printf("fc_callback(fc = %p, data = %p)\n", fc, data);
+ printf("fc_callback(fc = %p, data = %p)\n", (void*)fc, data);
filename = fc->value();
--- ./orig/./test/curve.cxx 2011-07-18 23:49:30.000000000 -0500
+++ ./test/curve.cxx 2012-02-02 01:39:14.644795407 -0600
@@ -22,6 +22,8 @@
#include <FL/fl_draw.H>
#include <FL/Fl_Toggle_Button.H>
+#include <stddef.h>
+
double args[9] = {
20,20, 50,200, 100,20, 200,200, 0};
const char* name[9] = {
@@ -91,7 +93,7 @@
s->step(1);
s->value(args[n]);
s->align(FL_ALIGN_LEFT);
- s->callback(slider_cb, (void*)n);
+ s->callback(slider_cb, (void*)(ptrdiff_t)n);
}
Fl_Toggle_Button but(50,y,50,25,"points");
but.callback(points_cb);
--- ./orig/./test/arc.cxx 2011-07-18 23:49:30.000000000 -0500
+++ ./test/arc.cxx 2012-02-02 01:38:42.098129707 -0600
@@ -21,6 +21,8 @@
#include <FL/Fl_Hor_Value_Slider.H>
#include <FL/fl_draw.H>
+#include <stddef.h>
+
double args[6] = {140, 140, 50, 0, 360, 0};
const char* name[6] = {"X", "Y", "R", "start", "end", "rotate"};
@@ -75,7 +77,7 @@
s->step(1);
s->value(args[n]);
s->align(FL_ALIGN_LEFT);
- s->callback(slider_cb, (void*)n);
+ s->callback(slider_cb, (void*)(ptrdiff_t)n);
}
window.end();
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs