Get rid of some valid compiler warnings with CodeWarrior that were reported

by Paul Chambers.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-11-19 16:37:36 +00:00
parent 2921ca57a0
commit a74795bbb8
35 changed files with 211 additions and 204 deletions

View File

@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.2
- Eliminate some compiler warnings with CodeWarrier
under WIN32 (Paul Chambers)
- Fl_Gl_Window widgets did not resize properly under
MacOS X.
- The cursor could be set for the wrong window in the

View File

@ -31,6 +31,7 @@ OTHER CONTRIBUTORS
for FLTK:
Teun Burgers
Paul Chambers
Fabien Costantini
Stephen Davies
Greg Ercolano

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_File_Browser.H,v 1.1.2.4 2002/08/14 16:49:38 easysw Exp $"
// "$Id: Fl_File_Browser.H,v 1.1.2.5 2002/11/19 16:37:33 easysw Exp $"
//
// FileBrowser definitions.
//
@ -57,23 +57,23 @@ public:
Fl_File_Browser(int, int, int, int, const char * = 0);
uchar iconsize() const { return (iconsize_); };
void iconsize(uchar s) { iconsize_ = s; redraw(); };
uchar iconsize() const { return (iconsize_); };
void iconsize(uchar s) { iconsize_ = s; redraw(); };
void filter(const char *pattern);
const char *filter() const { return (pattern_); };
const char *filter() const { return (pattern_); };
int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort);
uchar textsize() const { return (Fl_Browser::textsize()); };
void textsize(uchar s) { Fl_Browser::textsize(s); iconsize_ = 3 * s / 2; };
uchar textsize() const { return (Fl_Browser::textsize()); };
void textsize(uchar s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); };
int filetype() const { return (filetype_); };
void filetype(int t) { filetype_ = t; load(directory_); };
int filetype() const { return (filetype_); };
void filetype(int t) { filetype_ = t; load(directory_); };
};
#endif // !_Fl_File_Browser_H_
//
// End of "$Id: Fl_File_Browser.H,v 1.1.2.4 2002/08/14 16:49:38 easysw Exp $".
// End of "$Id: Fl_File_Browser.H,v 1.1.2.5 2002/11/19 16:37:33 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_File_Icon.H,v 1.1.2.7 2002/08/14 16:49:38 easysw Exp $"
// "$Id: Fl_File_Icon.H,v 1.1.2.8 2002/11/19 16:37:33 easysw Exp $"
//
// Fl_File_Icon definitions.
//
@ -80,26 +80,26 @@ class FL_EXPORT Fl_File_Icon //// Icon data
Fl_File_Icon(const char *p, int t, int nd = 0, short *d = 0);
~Fl_File_Icon();
short *add(short d);
short *add_color(Fl_Color c)
{ short *d = add(COLOR); add(c >> 16); add(c); return (d); }
short *add_vertex(int x, int y)
{ short *d = add(VERTEX); add(x); add(y); return (d); }
short *add_vertex(float x, float y)
{ short *d = add(VERTEX); add((int)(x * 10000.0));
add((int)(y * 10000.0)); return (d); }
void clear() { num_data_ = 0; }
void draw(int x, int y, int w, int h, Fl_Color ic, int active = 1);
void label(Fl_Widget *w);
short *add(short d);
short *add_color(Fl_Color c)
{ short *d = add((short)COLOR); add((short)(c >> 16)); add((short)c); return (d); }
short *add_vertex(int x, int y)
{ short *d = add((short)VERTEX); add((short)x); add((short)y); return (d); }
short *add_vertex(float x, float y)
{ short *d = add((short)VERTEX); add((short)(x * 10000.0));
add((short)(y * 10000.0)); return (d); }
void clear() { num_data_ = 0; }
void draw(int x, int y, int w, int h, Fl_Color ic, int active = 1);
void label(Fl_Widget *w);
static void labeltype(const Fl_Label *o, int x, int y, int w, int h, Fl_Align a);
void load(const char *f);
void load(const char *f);
int load_fti(const char *fti);
int load_image(const char *i);
Fl_File_Icon *next() { return (next_); }
const char *pattern() { return (pattern_); }
int size() { return (num_data_); }
int type() { return (type_); }
short *value() { return (data_); }
Fl_File_Icon *next() { return (next_); }
const char *pattern() { return (pattern_); }
int size() { return (num_data_); }
int type() { return (type_); }
short *value() { return (data_); }
static Fl_File_Icon *find(const char *filename, int filetype = ANY);
static Fl_File_Icon *first() { return (first_); }
@ -109,5 +109,5 @@ class FL_EXPORT Fl_File_Icon //// Icon data
#endif // !_Fl_Fl_File_Icon_H_
//
// End of "$Id: Fl_File_Icon.H,v 1.1.2.7 2002/08/14 16:49:38 easysw Exp $".
// End of "$Id: Fl_File_Icon.H,v 1.1.2.8 2002/11/19 16:37:33 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Input_.H,v 1.6.2.4.2.6 2002/08/14 16:49:38 easysw Exp $"
// "$Id: Fl_Input_.H,v 1.6.2.4.2.7 2002/11/19 16:37:33 easysw Exp $"
//
// Input base class header file for the Fast Light Tool Kit (FLTK).
//
@ -126,17 +126,17 @@ public:
void cursor_color(unsigned n) {cursor_color_ = n;}
int input_type() const {return type() & FL_INPUT_TYPE; }
void input_type(int t) { type(t | readonly()); }
void input_type(int t) { type((uchar)(t | readonly())); }
int readonly() const { return type() & FL_INPUT_READONLY; }
void readonly(int b) { if (b) type(type() | FL_INPUT_READONLY);
else type(type() & ~FL_INPUT_READONLY); }
void readonly(int b) { if (b) type((uchar)(type() | FL_INPUT_READONLY));
else type((uchar)(type() & ~FL_INPUT_READONLY)); }
int wrap() const { return type() & FL_INPUT_WRAP; }
void wrap(int b) { if (b) type(type() | FL_INPUT_WRAP);
else type(type() & ~FL_INPUT_WRAP); }
void wrap(int b) { if (b) type((uchar)(type() | FL_INPUT_WRAP));
else type((uchar)(type() & ~FL_INPUT_WRAP)); }
};
#endif
//
// End of "$Id: Fl_Input_.H,v 1.6.2.4.2.6 2002/08/14 16:49:38 easysw Exp $".
// End of "$Id: Fl_Input_.H,v 1.6.2.4.2.7 2002/11/19 16:37:33 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: forms.H,v 1.7.2.7.2.6 2002/08/14 16:49:38 easysw Exp $"
// "$Id: forms.H,v 1.7.2.7.2.7 2002/11/19 16:37:33 easysw Exp $"
//
// Forms emulation header file for the Fast Light Tool Kit (FLTK).
//
@ -615,7 +615,7 @@ inline void fl_get_dial_bounds(Fl_Widget* o, float* a, float* b) {
inline void fl_set_dial_return(Fl_Widget* o, int i) {
((Fl_Dial*)o)->when((Fl_When)(i|FL_WHEN_RELEASE));}
inline void fl_set_dial_angles(Fl_Widget* o, int a, int b) {
((Fl_Dial*)o)->angles(a, b);}
((Fl_Dial*)o)->angles((short)a, (short)b);}
//inline void fl_set_dial_cross(Fl_Widget* o, int);
// inline void fl_set_dial_direction(Fl_Widget* o, uchar d) {
// ((Fl_Dial*)o)->direction(d);}
@ -838,5 +838,5 @@ inline void fl_draw() {Fl::flush();}
#endif /* define __FORMS_H__ */
//
// End of "$Id: forms.H,v 1.7.2.7.2.6 2002/08/14 16:49:38 easysw Exp $".
// End of "$Id: forms.H,v 1.7.2.7.2.7 2002/11/19 16:37:33 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_BMP_Image.cxx,v 1.1.2.11 2002/10/10 19:26:33 easysw Exp $"
// "$Id: Fl_BMP_Image.cxx,v 1.1.2.12 2002/11/19 16:37:33 easysw Exp $"
//
// Fl_BMP_Image routines.
//
@ -88,8 +88,8 @@ Fl_BMP_Image::Fl_BMP_Image(const char *bmp) // I - File to read
if ((fp = fopen(bmp, "rb")) == NULL) return;
// Get the header...
byte = getc(fp); // Check "BM" sync chars
bit = getc(fp);
byte = (uchar)getc(fp); // Check "BM" sync chars
bit = (uchar)getc(fp);
if (byte != 'B' || bit != 'M') {
fclose(fp);
return;
@ -189,7 +189,7 @@ Fl_BMP_Image::Fl_BMP_Image(const char *bmp) // I - File to read
{
case 1 : // Bitmap
for (x = w(), bit = 128; x > 0; x --) {
if (bit == 128) byte = getc(fp);
if (bit == 128) byte = (uchar)getc(fp);
if (byte & bit) {
*ptr++ = colormap[1][2];
@ -342,16 +342,16 @@ Fl_BMP_Image::Fl_BMP_Image(const char *bmp) // I - File to read
case 16 : // 16-bit 5:5:5 RGB
for (x = w(); x > 0; x --, ptr += bDepth) {
char b = getc(fp), a = getc(fp) ;
#ifdef USE_5_6_5 // Green as the brightes color should ahve one bit more 5:6:5
ptr[0] = ( b << 3 ) & 0xf8 ;
ptr[1] = ( ( a << 5 ) & 0xe0 ) | ( ( b >> 3) & 0x1c );
ptr[2] = a & 0xf8 ;
#else // this is the default wasting one bit: 5:5:5
ptr[2] = ( b << 3 ) & 0xf8 ;
ptr[1] = ( ( a << 6 ) & 0xc0 ) | ( ( b >> 2) & 0x38 );
ptr[0] = (a<<1) & 0xf8 ;
#endif
uchar b = getc(fp), a = getc(fp) ;
#ifdef USE_5_6_5 // Green as the brightest color should have one bit more 5:6:5
ptr[0] = (uchar)(( b << 3 ) & 0xf8);
ptr[1] = (uchar)(((a << 5) & 0xe0) | ((b >> 3) & 0x1c));
ptr[2] = (uchar)(a & 0xf8);
#else // this is the default wasting one bit: 5:5:5
ptr[2] = (uchar)((b << 3) & 0xf8);
ptr[1] = (uchar)(((a << 6) & 0xc0) | ((b >> 2) & 0x38));
ptr[0] = (uchar)((a<<1) & 0xf8);
#endif
}
// Read remaining bytes to align to 32 bits...
@ -362,9 +362,9 @@ Fl_BMP_Image::Fl_BMP_Image(const char *bmp) // I - File to read
case 24 : // 24-bit RGB
for (x = w(); x > 0; x --, ptr += bDepth) {
ptr[2] = getc(fp);
ptr[1] = getc(fp);
ptr[0] = getc(fp);
ptr[2] = (uchar)getc(fp);
ptr[1] = (uchar)getc(fp);
ptr[0] = (uchar)getc(fp);
}
// Read remaining bytes to align to 32 bits...
@ -379,7 +379,7 @@ Fl_BMP_Image::Fl_BMP_Image(const char *bmp) // I - File to read
for (y = h() - 1; y >= 0; y --) {
ptr = (uchar *)array + y * w() * d() + 3;
for (x = w(), bit = 128; x > 0; x --, ptr+=bDepth) {
if (bit == 128) byte = getc(fp);
if (bit == 128) byte = (uchar)getc(fp);
if (byte & bit)
*ptr = 0;
else
@ -408,8 +408,8 @@ static unsigned short // O - 16-bit unsigned integer
read_word(FILE *fp) { // I - File to read from
unsigned char b0, b1; // Bytes from file
b0 = getc(fp);
b1 = getc(fp);
b0 = (uchar)getc(fp);
b1 = (uchar)getc(fp);
return ((b1 << 8) | b0);
}
@ -423,10 +423,10 @@ static unsigned int // O - 32-bit unsigned integer
read_dword(FILE *fp) { // I - File to read from
unsigned char b0, b1, b2, b3; // Bytes from file
b0 = getc(fp);
b1 = getc(fp);
b2 = getc(fp);
b3 = getc(fp);
b0 = (uchar)getc(fp);
b1 = (uchar)getc(fp);
b2 = (uchar)getc(fp);
b3 = (uchar)getc(fp);
return ((((((b3 << 8) | b2) << 8) | b1) << 8) | b0);
}
@ -440,15 +440,15 @@ static int // O - 32-bit signed integer
read_long(FILE *fp) { // I - File to read from
unsigned char b0, b1, b2, b3; // Bytes from file
b0 = getc(fp);
b1 = getc(fp);
b2 = getc(fp);
b3 = getc(fp);
b0 = (uchar)getc(fp);
b1 = (uchar)getc(fp);
b2 = (uchar)getc(fp);
b3 = (uchar)getc(fp);
return ((int)(((((b3 << 8) | b2) << 8) | b1) << 8) | b0);
}
//
// End of "$Id: Fl_BMP_Image.cxx,v 1.1.2.11 2002/10/10 19:26:33 easysw Exp $".
// End of "$Id: Fl_BMP_Image.cxx,v 1.1.2.12 2002/11/19 16:37:33 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.18 2002/10/11 13:54:10 easysw Exp $"
// "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.19 2002/11/19 16:37:34 easysw Exp $"
//
// Bitmap drawing routines for the Fast Light Tool Kit (FLTK).
//
@ -94,8 +94,8 @@ static Fl_Bitmask fl_create_bitmap(int w, int h, const uchar *data) {
for (int y=0; y < h; y++) {
for (int n = 0; n < w1; n++, src++)
*dest++ = (reverse[*src & 0x0f] & 0xf0) |
(reverse[(*src >> 4) & 0x0f] & 0x0f);
*dest++ = (uchar)((reverse[*src & 0x0f] & 0xf0) |
(reverse[(*src >> 4) & 0x0f] & 0x0f));
dest += w2-w1;
}
@ -131,10 +131,10 @@ Fl_Bitmask fl_create_bitmask(int w, int h, const uchar *data) {
for (int j=w1; j>0; j--) {
uchar b = *src++;
if (bpp==1) {
*dst++ = ( hiNibble[b&15] ) | ( loNibble[(b>>4)&15] );
*dst++ = (uchar)( hiNibble[b&15] ) | ( loNibble[(b>>4)&15] );
} else if (bpp==4) {
for (int k=(j==1)?shr:4; k>0; k--) {
*dst++ = "\377\360\017\000"[b&3];
*dst++ = (uchar)("\377\360\017\000"[b&3]);
b = b >> 2;
}
} else {
@ -441,7 +441,7 @@ Fl_Image *Fl_Bitmap::copy(int W, int H) {
for (dx = W, xerr = W / 2, old_ptr = array + sy * (w() + 7) / 8, sx = 0, new_bit = 128;
dx > 0;
dx --) {
old_bit = 128 >> (sx & 7);
old_bit = (uchar)(128 >> (sx & 7));
if (old_ptr[sx / 8] & old_bit) *new_ptr |= new_bit;
if (new_bit > 1) new_bit >>= 1;
@ -474,5 +474,5 @@ Fl_Image *Fl_Bitmap::copy(int W, int H) {
//
// End of "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.18 2002/10/11 13:54:10 easysw Exp $".
// End of "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.19 2002/11/19 16:37:34 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Browser.cxx,v 1.9.2.12.2.6 2002/08/09 01:09:48 easysw Exp $"
// "$Id: Fl_Browser.cxx,v 1.9.2.12.2.7 2002/11/19 16:37:34 easysw Exp $"
//
// Browser widget for the Fast Light Tool Kit (FLTK).
//
@ -164,7 +164,7 @@ void Fl_Browser::insert(int line, FL_BLINE* t) {
void Fl_Browser::insert(int line, const char* newtext, void* d) {
int l = strlen(newtext);
FL_BLINE* t = (FL_BLINE*)malloc(sizeof(FL_BLINE)+l);
t->length = l;
t->length = (short)l;
t->flags = 0;
strcpy(t->txt, newtext);
t->data = d;
@ -185,7 +185,7 @@ void Fl_Browser::text(int line, const char* newtext) {
replacing(t, n);
cache = n;
n->data = t->data;
n->length = l;
n->length = (short)l;
n->flags = t->flags;
n->prev = t->prev;
if (n->prev) n->prev->next = n; else first = n;
@ -495,5 +495,5 @@ int Fl_Browser::value() const {
}
//
// End of "$Id: Fl_Browser.cxx,v 1.9.2.12.2.6 2002/08/09 01:09:48 easysw Exp $".
// End of "$Id: Fl_Browser.cxx,v 1.9.2.12.2.7 2002/11/19 16:37:34 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.16 2002/08/16 19:51:31 easysw Exp $"
// "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.17 2002/11/19 16:37:34 easysw Exp $"
//
// Base Browser widget class for the Fast Light Tool Kit (FLTK).
//
@ -304,7 +304,7 @@ J1:
top_ = item_first(); real_position_ = offset_ = 0;
if (scrollbar.visible()) {
scrollbar.clear_visible();
clear_damage(damage()|FL_DAMAGE_SCROLL);
clear_damage((uchar)(damage()|FL_DAMAGE_SCROLL));
}
}
@ -319,7 +319,7 @@ J1:
real_hposition_ = 0;
if (hscrollbar.visible()) {
hscrollbar.clear_visible();
clear_damage(damage()|FL_DAMAGE_SCROLL);
clear_damage((uchar)(damage()|FL_DAMAGE_SCROLL));
}
}
@ -337,7 +337,7 @@ J1:
top_ = item_first(); real_position_ = offset_ = 0;
if (scrollbar.visible()) {
scrollbar.clear_visible();
clear_damage(damage()|FL_DAMAGE_SCROLL);
clear_damage((uchar)(damage()|FL_DAMAGE_SCROLL));
}
}
@ -722,7 +722,7 @@ Fl_Browser_::Fl_Browser_(int X, int Y, int W, int H, const char* l)
hscrollbar.callback(hscrollbar_callback);
hscrollbar.type(FL_HORIZONTAL);
textfont_ = FL_HELVETICA;
textsize_ = FL_NORMAL_SIZE;
textsize_ = (uchar)FL_NORMAL_SIZE;
textcolor_ = FL_FOREGROUND_COLOR;
has_scrollbar_ = BOTH;
max_width = 0;
@ -757,5 +757,5 @@ void Fl_Browser_::item_select(void*, int) {}
int Fl_Browser_::item_selected(void* l) const {return l==selection_;}
//
// End of "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.16 2002/08/16 19:51:31 easysw Exp $".
// End of "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.17 2002/11/19 16:37:34 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Counter.cxx,v 1.8.2.3.2.10 2002/08/09 01:09:48 easysw Exp $"
// "$Id: Fl_Counter.cxx,v 1.8.2.3.2.11 2002/11/19 16:37:34 easysw Exp $"
//
// Counter widget for the Fast Light Tool Kit (FLTK).
//
@ -137,7 +137,7 @@ int Fl_Counter::handle(int event) {
i = calc_mouseobj();
if (i != mouseobj) {
Fl::remove_timeout(repeat_callback, this);
mouseobj = i;
mouseobj = (short)i;
if (i) Fl::add_timeout(INITIALREPEAT, repeat_callback, this);
increment_cb();
redraw();
@ -183,10 +183,10 @@ Fl_Counter::Fl_Counter(int X, int Y, int W, int H, const char* l)
lstep_ = 1.0;
mouseobj = 0;
textfont_ = FL_HELVETICA;
textsize_ = FL_NORMAL_SIZE;
textsize_ = (uchar)FL_NORMAL_SIZE;
textcolor_ = FL_FOREGROUND_COLOR;
}
//
// End of "$Id: Fl_Counter.cxx,v 1.8.2.3.2.10 2002/08/09 01:09:48 easysw Exp $".
// End of "$Id: Fl_Counter.cxx,v 1.8.2.3.2.11 2002/11/19 16:37:34 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_File_Browser.cxx,v 1.1.2.23 2002/08/13 15:42:44 easysw Exp $"
// "$Id: Fl_File_Browser.cxx,v 1.1.2.24 2002/11/19 16:37:34 easysw Exp $"
//
// Fl_File_Browser routines.
//
@ -398,7 +398,7 @@ Fl_File_Browser::Fl_File_Browser(int X, // I - Upper-lefthand X coordina
// Initialize the filter pattern, current directory, and icon size...
pattern_ = "*";
directory_ = "";
iconsize_ = 3 * textsize() / 2;
iconsize_ = (uchar)(3 * textsize() / 2);
filetype_ = FILES;
}
@ -643,5 +643,5 @@ Fl_File_Browser::filter(const char *pattern) // I - Pattern string
//
// End of "$Id: Fl_File_Browser.cxx,v 1.1.2.23 2002/08/13 15:42:44 easysw Exp $".
// End of "$Id: Fl_File_Browser.cxx,v 1.1.2.24 2002/11/19 16:37:34 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.26 2002/10/29 20:12:36 easysw Exp $"
// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.27 2002/11/19 16:37:34 easysw Exp $"
//
// More Fl_File_Chooser routines.
//
@ -949,7 +949,7 @@ Fl_File_Chooser::update_preview()
previewBox->label(preview_text_);
previewBox->align((Fl_Align)(FL_ALIGN_CLIP | FL_ALIGN_INSIDE |
FL_ALIGN_LEFT | FL_ALIGN_TOP));
previewBox->labelsize(size);
previewBox->labelsize((uchar)size);
previewBox->labelfont(FL_COURIER);
}
} else {
@ -1152,5 +1152,5 @@ unquote_pathname(char *dst, // O - Destination string
//
// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.26 2002/10/29 20:12:36 easysw Exp $".
// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.27 2002/11/19 16:37:34 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_File_Icon2.cxx,v 1.1.2.17 2002/10/03 15:23:46 easysw Exp $"
// "$Id: Fl_File_Icon2.cxx,v 1.1.2.18 2002/11/19 16:37:34 easysw Exp $"
//
// Fl_File_Icon system icon routines.
//
@ -246,7 +246,7 @@ Fl_File_Icon::load_fti(const char *fti) // I - File to read from
// Composite color; compute average...
c = -c;
add_color(fl_color_average((Fl_Color)(c >> 4),
(Fl_Color)(c & 15), 0.5));
(Fl_Color)(c & 15), 0.5f));
}
else
add_color((Fl_Color)c);
@ -284,7 +284,7 @@ Fl_File_Icon::load_fti(const char *fti) // I - File to read from
{
// Composite color; compute average...
c = -c;
cval = fl_color_average((Fl_Color)(c >> 4), (Fl_Color)(c & 15), 0.5);
cval = fl_color_average((Fl_Color)(c >> 4), (Fl_Color)(c & 15), 0.5f);
}
else
cval = c;
@ -509,7 +509,7 @@ Fl_File_Icon::load_image(const char *ifile) // I - File to read from
break;
}
colors[ch] = fl_rgb_color(red, green, blue);
colors[ch] = fl_rgb_color((uchar)red, (uchar)green, (uchar)blue);
} else {
// Read a color name...
if (strncasecmp(lineptr + 2, "white", 5) == 0) colors[ch] = FL_WHITE;
@ -971,5 +971,5 @@ get_kde_val(char *str,
//
// End of "$Id: Fl_File_Icon2.cxx,v 1.1.2.17 2002/10/03 15:23:46 easysw Exp $".
// End of "$Id: Fl_File_Icon2.cxx,v 1.1.2.18 2002/11/19 16:37:34 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_File_Input.cxx,v 1.1.2.7 2002/11/14 21:05:21 easysw Exp $"
// "$Id: Fl_File_Input.cxx,v 1.1.2.8 2002/11/19 16:37:34 easysw Exp $"
//
// File_Input header file for the Fast Light Tool Kit (FLTK).
//
@ -128,7 +128,7 @@ Fl_File_Input::update_buttons() {
end ++;
buttons_[i] = (int)fl_width(start, end - start);
buttons_[i] = (short)fl_width(start, end - start);
if (!i) buttons_[i] += Fl::box_dx(box()) + 6;
}
@ -235,7 +235,7 @@ Fl_File_Input::handle_button(int event) // I - Event
// Redraw the directory bar...
if (event == FL_RELEASE) pressed_ = -1;
else pressed_ = i;
else pressed_ = (short)i;
draw_buttons();
@ -271,5 +271,5 @@ Fl_File_Input::handle_button(int event) // I - Event
//
// End of "$Id: Fl_File_Input.cxx,v 1.1.2.7 2002/11/14 21:05:21 easysw Exp $".
// End of "$Id: Fl_File_Input.cxx,v 1.1.2.8 2002/11/19 16:37:34 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_GIF_Image.cxx,v 1.1.2.12 2002/05/25 13:38:24 easysw Exp $"
// "$Id: Fl_GIF_Image.cxx,v 1.1.2.13 2002/11/19 16:37:34 easysw Exp $"
//
// Fl_GIF_Image routines.
//
@ -73,7 +73,7 @@
typedef unsigned char uchar;
#define NEXTBYTE getc(GifFile)
#define NEXTBYTE (uchar)getc(GifFile)
#define GETSHORT(var) var = NEXTBYTE; var += NEXTBYTE << 8
Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
@ -124,7 +124,7 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
} else {
Fl::warning("%s does not have a colormap.", infname);
for (int i = 0; i < ColorMapSize; i++)
Red[i] = Green[i] = Blue[i] = 255 * i / (ColorMapSize-1);
Red[i] = Green[i] = Blue[i] = (uchar)(255 * i / (ColorMapSize-1));
}
int CodeSize; /* Code size, init from GIF header, increases... */
@ -256,7 +256,7 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
uchar *tp = OutCode;
int i;
if (CurCode < FreeCode) i = CurCode;
else if (CurCode == FreeCode) {*tp++ = FinChar; i = OldCode;}
else if (CurCode == FreeCode) {*tp++ = (uchar)FinChar; i = OldCode;}
else {fprintf(stderr,"%s : LZW Barf!\n",infname); break;}
while (i >= ColorMapSize) {*tp++ = Suffix[i]; i = Prefix[i];}
@ -278,7 +278,7 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
} while (tp > OutCode);
if (OldCode != ClearCode) {
Prefix[FreeCode] = OldCode;
Prefix[FreeCode] = (short)OldCode;
Suffix[FreeCode] = FinChar;
FreeCode++;
if (FreeCode > ReadMask) {
@ -333,7 +333,7 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
int base = has_transparent && used[0] ? ' ' : ' '+1;
int numcolors = 0;
for (i = 0; i < ColorMapSize; i++) if (used[i]) {
remap[i] = base++;
remap[i] = (uchar)(base++);
numcolors++;
}
@ -373,5 +373,5 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
//
// End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.12 2002/05/25 13:38:24 easysw Exp $".
// End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.13 2002/11/19 16:37:34 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Help_View.cxx,v 1.1.2.43 2002/10/11 20:48:14 easysw Exp $"
// "$Id: Fl_Help_View.cxx,v 1.1.2.44 2002/11/19 16:37:34 easysw Exp $"
//
// Fl_Help_View widget routines.
//
@ -529,11 +529,11 @@ Fl_Help_View::draw()
if (tolower(buf[0]) == 'h')
{
font = FL_HELVETICA_BOLD;
fsize = textsize_ + '7' - buf[1];
fsize = (uchar)(textsize_ + '7' - buf[1]);
}
else if (strcasecmp(buf, "DT") == 0)
{
font = textfont_ | FL_ITALIC;
font = (uchar)(textfont_ | FL_ITALIC);
fsize = textsize_;
}
else if (strcasecmp(buf, "PRE") == 0)
@ -1051,7 +1051,7 @@ Fl_Help_View::format()
else if (strcasecmp(buf, "TABLE") == 0)
{
if (get_attr(attrs, "BORDER", attr, sizeof(attr)))
border = atoi(attr);
border = (uchar)atoi(attr);
else
border = 0;
@ -1088,11 +1088,11 @@ Fl_Help_View::format()
if (tolower(buf[0]) == 'h' && isdigit(buf[1]))
{
font = FL_HELVETICA_BOLD;
fsize = textsize_ + '7' - buf[1];
fsize = (uchar)(textsize_ + '7' - buf[1]);
}
else if (strcasecmp(buf, "DT") == 0)
{
font = textfont_ | FL_ITALIC;
font = (uchar)(textfont_ | FL_ITALIC);
fsize = textsize_;
}
else if (strcasecmp(buf, "PRE") == 0)
@ -1273,7 +1273,7 @@ Fl_Help_View::format()
block->h += hh;
if (strcasecmp(buf, "TH") == 0)
font = textfont_ | FL_BOLD;
font = (uchar)(textfont_ | FL_BOLD);
else
font = textfont_;
@ -1629,11 +1629,11 @@ Fl_Help_View::format_table(int *table_width, // O - Total table width
if (tolower(buf[0]) == 'h' && isdigit(buf[1]))
{
font = FL_HELVETICA_BOLD;
fsize = textsize_ + '7' - buf[1];
fsize = (uchar)(textsize_ + '7' - buf[1]);
}
else if (strcasecmp(buf, "DT") == 0)
{
font = textfont_ | FL_ITALIC;
font = (uchar)(textfont_ | FL_ITALIC);
fsize = textsize_;
}
else if (strcasecmp(buf, "PRE") == 0)
@ -1743,7 +1743,7 @@ Fl_Help_View::format_table(int *table_width, // O - Total table width
incell = 1;
if (strcasecmp(buf, "TH") == 0)
font = textfont_ | FL_BOLD;
font = (uchar)(textfont_ | FL_BOLD);
else
font = textfont_;
@ -2061,7 +2061,7 @@ Fl_Help_View::get_color(const char *n, // I - Color name
g = (rgb >> 8) & 255;
b = rgb & 255;
return (fl_rgb_color(r, g, b));
return (fl_rgb_color((uchar)r, (uchar)g, (uchar)b));
}
else if (strcasecmp(n, "black") == 0)
return (FL_BLACK);
@ -2730,5 +2730,5 @@ hscrollbar_callback(Fl_Widget *s, void *)
//
// End of "$Id: Fl_Help_View.cxx,v 1.1.2.43 2002/10/11 20:48:14 easysw Exp $".
// End of "$Id: Fl_Help_View.cxx,v 1.1.2.44 2002/11/19 16:37:34 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Image.cxx,v 1.5.2.3.2.24 2002/10/11 13:54:10 easysw Exp $"
// "$Id: Fl_Image.cxx,v 1.5.2.3.2.25 2002/11/19 16:37:35 easysw Exp $"
//
// Image drawing code for the Fast Light Tool Kit (FLTK).
//
@ -277,7 +277,7 @@ void Fl_RGB_Image::desaturate() {
for (new_ptr = new_array, old_ptr = array, y = 0; y < h(); y ++, old_ptr += ld())
for (x = 0; x < w(); x ++, old_ptr += d()) {
*new_ptr++ = (31 * old_ptr[0] + 61 * old_ptr[1] + 8 * old_ptr[2]) / 100;
*new_ptr++ = (uchar)((31 * old_ptr[0] + 61 * old_ptr[1] + 8 * old_ptr[2]) / 100);
if (d() > 3) *new_ptr++ = old_ptr[3];
}
@ -392,5 +392,5 @@ void Fl_RGB_Image::label(Fl_Menu_Item* m) {
//
// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.24 2002/10/11 13:54:10 easysw Exp $".
// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.25 2002/11/19 16:37:35 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.25 2002/11/14 21:05:21 easysw Exp $"
// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.26 2002/11/19 16:37:35 easysw Exp $"
//
// Common input widget routines for the Fast Light Tool Kit (FLTK).
//
@ -758,7 +758,7 @@ Fl_Input_::Fl_Input_(int X, int Y, int W, int H, const char* l)
box(FL_DOWN_BOX);
color(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR);
align(FL_ALIGN_LEFT);
textsize_ = FL_NORMAL_SIZE;
textsize_ = (uchar)FL_NORMAL_SIZE;
textfont_ = FL_HELVETICA;
textcolor_ = FL_FOREGROUND_COLOR;
cursor_color_ = FL_FOREGROUND_COLOR; // was FL_BLUE
@ -852,5 +852,5 @@ Fl_Input_::~Fl_Input_() {
}
//
// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.25 2002/11/14 21:05:21 easysw Exp $".
// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.26 2002/11/19 16:37:35 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.20 2002/11/08 15:57:10 easysw Exp $"
// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.21 2002/11/19 16:37:35 easysw Exp $"
//
// Menu code for the Fast Light Tool Kit (FLTK).
//
@ -114,7 +114,7 @@ int Fl_Menu_Item::measure(int* hp, const Fl_Menu_* m) const {
l.deimage = 0;
l.type = labeltype_;
l.font = labelsize_ ? labelfont_ : uchar(m ? m->textfont() : FL_HELVETICA);
l.size = labelsize_ ? labelsize_ : m ? m->textsize() : FL_NORMAL_SIZE;
l.size = labelsize_ ? labelsize_ : m ? m->textsize() : (uchar)FL_NORMAL_SIZE;
l.color = FL_BLACK; // this makes no difference?
fl_draw_shortcut = 1;
int w = 0; int h = 0; l.measure(w, hp ? *hp : h);
@ -131,7 +131,7 @@ void Fl_Menu_Item::draw(int x, int y, int w, int h, const Fl_Menu_* m,
l.deimage = 0;
l.type = labeltype_;
l.font = labelsize_ ? labelfont_ : uchar(m ? m->textfont() : FL_HELVETICA);
l.size = labelsize_ ? labelsize_ : m ? m->textsize() : FL_NORMAL_SIZE;
l.size = labelsize_ ? labelsize_ : m ? m->textsize() : (uchar)FL_NORMAL_SIZE;
l.color = labelcolor_ ? labelcolor_ : m ? m->textcolor() : int(FL_BLACK);
if (!active()) l.color = fl_inactive((Fl_Color)l.color);
Fl_Color color = m ? m->color() : FL_GRAY;
@ -502,9 +502,13 @@ int menuwindow::handle(int e) {
if (!backward(pp.menu_number)) {pp.item_number = -1;backward(pp.menu_number);}
return 1;
case FL_Up:
if (pp.menubar && pp.menu_number == 0) ;
else if (backward(pp.menu_number));
else if (pp.menubar && pp.menu_number==1) setitem(0, pp.p[0]->selected);
if (pp.menubar && pp.menu_number == 0) {
// Do nothing...
} else if (backward(pp.menu_number)) {
// Do nothing...
} else if (pp.menubar && pp.menu_number==1) {
setitem(0, pp.p[0]->selected);
}
return 1;
case FL_Tab:
if (Fl::event_shift()) goto BACKTAB;
@ -780,5 +784,5 @@ const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const {
}
//
// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.20 2002/11/08 15:57:10 easysw Exp $".
// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.21 2002/11/19 16:37:35 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Menu_.cxx,v 1.7.2.8.2.4 2002/08/09 01:09:49 easysw Exp $"
// "$Id: Fl_Menu_.cxx,v 1.7.2.8.2.5 2002/11/19 16:37:35 easysw Exp $"
//
// Common menu code for the Fast Light Tool Kit (FLTK).
//
@ -97,7 +97,7 @@ Fl_Menu_::Fl_Menu_(int X,int Y,int W,int H,const char* l)
alloc = 0;
selection_color(FL_SELECTION_COLOR);
textfont(FL_HELVETICA);
textsize(FL_NORMAL_SIZE);
textsize((uchar)FL_NORMAL_SIZE);
textcolor(FL_BLACK);
down_box(FL_NO_BOX);
}
@ -150,5 +150,5 @@ void Fl_Menu_::clear() {
}
//
// End of "$Id: Fl_Menu_.cxx,v 1.7.2.8.2.4 2002/08/09 01:09:49 easysw Exp $".
// End of "$Id: Fl_Menu_.cxx,v 1.7.2.8.2.5 2002/11/19 16:37:35 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Overlay_Window.cxx,v 1.7.2.6.2.1 2002/01/01 15:11:31 easysw Exp $"
// "$Id: Fl_Overlay_Window.cxx,v 1.7.2.6.2.2 2002/11/19 16:37:35 easysw Exp $"
//
// Overlay window code for the Fast Light Tool Kit (FLTK).
//
@ -53,7 +53,7 @@ void Fl_Overlay_Window::flush() {
}
#endif
int erase_overlay = (damage()&FL_DAMAGE_OVERLAY);
clear_damage(damage()&~FL_DAMAGE_OVERLAY);
clear_damage((uchar)(damage()&~FL_DAMAGE_OVERLAY));
Fl_Double_Window::flush(erase_overlay);
if (overlay_ == this) draw_overlay();
}
@ -74,7 +74,7 @@ int Fl_Overlay_Window::can_do_overlay() {return 0;}
void Fl_Overlay_Window::redraw_overlay() {
overlay_ = this;
clear_damage(damage()|FL_DAMAGE_OVERLAY);
clear_damage((uchar)(damage()|FL_DAMAGE_OVERLAY));
Fl::damage(FL_DAMAGE_CHILD);
}
@ -149,5 +149,5 @@ void Fl_Overlay_Window::redraw_overlay() {
#endif
//
// End of "$Id: Fl_Overlay_Window.cxx,v 1.7.2.6.2.1 2002/01/01 15:11:31 easysw Exp $".
// End of "$Id: Fl_Overlay_Window.cxx,v 1.7.2.6.2.2 2002/11/19 16:37:35 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_PNM_Image.cxx,v 1.1.2.10 2002/10/11 02:30:20 easysw Exp $"
// "$Id: Fl_PNM_Image.cxx,v 1.1.2.11 2002/11/19 16:37:35 easysw Exp $"
//
// Fl_PNM_Image routines.
//
@ -130,26 +130,26 @@ Fl_PNM_Image::Fl_PNM_Image(const char *name) // I - File to read
case 1 :
case 2 :
for (x = w(); x > 0; x --)
if (fscanf(fp, "%d", &val) == 1) *ptr++ = 255 * val / maxval;
if (fscanf(fp, "%d", &val) == 1) *ptr++ = (uchar)(255 * val / maxval);
break;
case 3 :
for (x = w(); x > 0; x --) {
if (fscanf(fp, "%d", &val) == 1) *ptr++ = 255 * val / maxval;
if (fscanf(fp, "%d", &val) == 1) *ptr++ = 255 * val / maxval;
if (fscanf(fp, "%d", &val) == 1) *ptr++ = 255 * val / maxval;
if (fscanf(fp, "%d", &val) == 1) *ptr++ = (uchar)(255 * val / maxval);
if (fscanf(fp, "%d", &val) == 1) *ptr++ = (uchar)(255 * val / maxval);
if (fscanf(fp, "%d", &val) == 1) *ptr++ = (uchar)(255 * val / maxval);
}
break;
case 4 :
for (x = w(), byte = getc(fp), bit = 128; x > 0; x --) {
for (x = w(), byte = (uchar)getc(fp), bit = 128; x > 0; x --) {
if (byte & bit) *ptr++ = 255;
else *ptr++ = 0;
if (bit > 1) bit >>= 1;
else {
bit = 128;
byte = getc(fp);
byte = (uchar)getc(fp);
}
}
break;
@ -161,11 +161,11 @@ Fl_PNM_Image::Fl_PNM_Image(const char *name) // I - File to read
case 7 : /* XV 3:3:2 thumbnail format */
for (x = w(); x > 0; x --) {
byte = getc(fp);
byte = (uchar)getc(fp);
*ptr++ = 255 * ((byte >> 5) & 7) / 7;
*ptr++ = 255 * ((byte >> 2) & 7) / 7;
*ptr++ = 255 * (byte & 3) / 3;
*ptr++ = (uchar)(255 * ((byte >> 5) & 7) / 7);
*ptr++ = (uchar)(255 * ((byte >> 2) & 7) / 7);
*ptr++ = (uchar)(255 * (byte & 3) / 3);
}
break;
}
@ -176,5 +176,5 @@ Fl_PNM_Image::Fl_PNM_Image(const char *name) // I - File to read
//
// End of "$Id: Fl_PNM_Image.cxx,v 1.1.2.10 2002/10/11 02:30:20 easysw Exp $".
// End of "$Id: Fl_PNM_Image.cxx,v 1.1.2.11 2002/11/19 16:37:35 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.22 2002/10/11 13:54:10 easysw Exp $"
// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.23 2002/11/19 16:37:35 easysw Exp $"
//
// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
//
@ -425,7 +425,7 @@ void Fl_Pixmap::desaturate() {
ncolors = -ncolors;
uchar *cmap = (uchar *)(data()[1]);
for (i = 0; i < ncolors; i ++, cmap += 4) {
g = (cmap[1] * 31 + cmap[2] * 61 + cmap[3] * 8) / 100;
g = (uchar)((cmap[1] * 31 + cmap[2] * 61 + cmap[3] * 8) / 100);
cmap[1] = cmap[2] = cmap[3] = g;
}
} else {
@ -446,7 +446,7 @@ void Fl_Pixmap::desaturate() {
}
if (fl_parse_color(p, r, g, b)) {
g = (r * 31 + g * 61 + b * 8) / 100;
g = (uchar)((r * 31 + g * 61 + b * 8) / 100);
if (chars_per_pixel > 1) sprintf(line, "%c%c c #%02X%02X%02X", data()[i + 1][0],
data()[i + 1][1], g, g, g);
@ -461,5 +461,5 @@ void Fl_Pixmap::desaturate() {
}
//
// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.22 2002/10/11 13:54:10 easysw Exp $".
// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.23 2002/11/19 16:37:35 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Preferences.cxx,v 1.1.2.22 2002/10/07 13:19:22 easysw Exp $"
// "$Id: Fl_Preferences.cxx,v 1.1.2.23 2002/11/19 16:37:35 easysw Exp $"
//
// Preferences methods for the Fast Light Tool Kit (FLTK).
//
@ -381,13 +381,13 @@ static void *decodeHex( const char *src, int &size )
for ( i=size; i>0; i-- )
{
unsigned char v = 0;
int v;
char x = tolower(*s++);
if ( x >= 'a' ) v = x-'a'+10; else v = x-'0';
v = v<<4;
x = tolower(*s++);
if ( x >= 'a' ) v += x-'a'+10; else v += x-'0';
*d++ = v;
*d++ = (uchar)v;
}
return (void*)data;
@ -1116,5 +1116,5 @@ char Fl_Preferences::Node::remove()
//
// End of "$Id: Fl_Preferences.cxx,v 1.1.2.22 2002/10/07 13:19:22 easysw Exp $".
// End of "$Id: Fl_Preferences.cxx,v 1.1.2.23 2002/11/19 16:37:35 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Text_Display.cxx,v 1.12.2.37 2002/11/14 21:05:22 easysw Exp $"
// "$Id: Fl_Text_Display.cxx,v 1.12.2.38 2002/11/19 16:37:35 easysw Exp $"
//
// Copyright 2001-2002 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
@ -77,7 +77,7 @@ Fl_Text_Display::Fl_Text_Display(int X, int Y, int W, int H, const char* l)
color(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR);
box(FL_DOWN_FRAME);
textsize(FL_NORMAL_SIZE);
textsize((uchar)FL_NORMAL_SIZE);
textcolor(FL_FOREGROUND_COLOR);
textfont(FL_HELVETICA);
@ -2575,7 +2575,7 @@ void Fl_Text_Display::wrapped_line_counter(Fl_Text_Buffer *buf, int startPos,
colNum = 0;
width = 0;
for (p=lineStart; p<buf->length(); p++) {
c = buf->character(p);
c = (unsigned char)buf->character(p);
/* If the character was a newline, count the line and start over,
otherwise, add it to the width and column counts */
@ -2609,7 +2609,7 @@ void Fl_Text_Display::wrapped_line_counter(Fl_Text_Buffer *buf, int startPos,
if (colNum > wrapMargin || width > maxWidth) {
foundBreak = false;
for (b=p; b>=lineStart; b--) {
c = buf->character(b);
c = (unsigned char)buf->character(b);
if (c == '\t' || c == ' ') {
newLineStart = b + 1;
if (countPixels) {
@ -3030,5 +3030,5 @@ int Fl_Text_Display::handle(int event) {
//
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.37 2002/11/14 21:05:22 easysw Exp $".
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.38 2002/11/19 16:37:35 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Value_Output.cxx,v 1.6.2.3.2.5 2002/08/09 03:17:30 easysw Exp $"
// "$Id: Fl_Value_Output.cxx,v 1.6.2.3.2.6 2002/11/19 16:37:35 easysw Exp $"
//
// Value output widget for the Fast Light Tool Kit (FLTK).
//
@ -91,11 +91,11 @@ Fl_Value_Output::Fl_Value_Output(int X, int Y, int W, int H,const char *l)
box(FL_NO_BOX);
align(FL_ALIGN_LEFT);
textfont_ = FL_HELVETICA;
textsize_ = FL_NORMAL_SIZE;
textsize_ = (uchar)FL_NORMAL_SIZE;
textcolor_ = FL_BLACK;
soft_ = 0;
}
//
// End of "$Id: Fl_Value_Output.cxx,v 1.6.2.3.2.5 2002/08/09 03:17:30 easysw Exp $".
// End of "$Id: Fl_Value_Output.cxx,v 1.6.2.3.2.6 2002/11/19 16:37:35 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.20 2002/10/04 15:59:29 easysw Exp $"
// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.21 2002/11/19 16:37:35 easysw Exp $"
//
// Base widget class for the Fast Light Tool Kit (FLTK).
//
@ -83,7 +83,7 @@ Fl_Widget::Fl_Widget(int X, int Y, int W, int H, const char* L) {
label_.deimage = 0;
label_.type = FL_NORMAL_LABEL;
label_.font = FL_HELVETICA;
label_.size = FL_NORMAL_SIZE;
label_.size = (uchar)FL_NORMAL_SIZE;
label_.color = FL_BLACK;
tooltip_ = 0;
callback_ = default_callback;
@ -245,5 +245,5 @@ int Fl_Widget::contains(const Fl_Widget *o) const {
}
//
// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.20 2002/10/04 15:59:29 easysw Exp $".
// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.21 2002/11/19 16:37:35 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_XBM_Image.cxx,v 1.1.2.7 2002/08/09 03:17:30 easysw Exp $"
// "$Id: Fl_XBM_Image.cxx,v 1.1.2.8 2002/11/19 16:37:35 easysw Exp $"
//
// Fl_XBM_Image routines.
//
@ -88,7 +88,7 @@ Fl_XBM_Image::Fl_XBM_Image(const char *name) : Fl_Bitmap((const char *)0,0,0) {
while (*a && i<n) {
int t;
if (sscanf(a," 0x%x",&t)>0) {
*ptr++ = t;
*ptr++ = (uchar)t;
i ++;
}
while (*a && *a++ != ',');
@ -100,5 +100,5 @@ Fl_XBM_Image::Fl_XBM_Image(const char *name) : Fl_Bitmap((const char *)0,0,0) {
//
// End of "$Id: Fl_XBM_Image.cxx,v 1.1.2.7 2002/08/09 03:17:30 easysw Exp $".
// End of "$Id: Fl_XBM_Image.cxx,v 1.1.2.8 2002/11/19 16:37:35 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.13 2002/08/09 03:17:30 easysw Exp $"
// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.14 2002/11/19 16:37:35 easysw Exp $"
//
// System color support for the Fast Light Tool Kit (FLTK).
//
@ -97,7 +97,7 @@ int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b) {
case 3: R >>= 4; G >>= 4; B >>= 4; break;
case 4: R >>= 8; G >>= 8; B >>= 8; break;
}
r = R; g = G; b = B;
r = (uchar)R; g = (uchar)G; b = (uchar)B;
return 1;
}
#else
@ -106,9 +106,9 @@ int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b) {
XColor x;
if (!fl_display) fl_open_display();
if (XParseColor(fl_display, fl_colormap, p, &x)) {
r = x.red>>8;
g = x.green>>8;
b = x.blue>>8;
r = (uchar)(x.red>>8);
g = (uchar)(x.green>>8);
b = (uchar)(x.blue>>8);
return 1;
} else return 0;
}
@ -317,5 +317,5 @@ int Fl::reload_scheme() {
//
// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.13 2002/08/09 03:17:30 easysw Exp $".
// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.14 2002/11/19 16:37:35 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_win32.cxx,v 1.33.2.37.2.41 2002/10/29 20:18:55 easysw Exp $"
// "$Id: Fl_win32.cxx,v 1.33.2.37.2.42 2002/11/19 16:37:36 easysw Exp $"
//
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
//
@ -146,7 +146,7 @@ void Fl::add_fd(int n, int events, void (*cb)(int, void*), void *v) {
fd = (FD*)realloc(fd, fd_array_size*sizeof(FD));
}
fd[i].fd = n;
fd[i].events = events;
fd[i].events = (short)events;
fd[i].cb = cb;
fd[i].arg = v;
@ -172,7 +172,7 @@ void Fl::remove_fd(int n, int events) {
int i,j;
for (i=j=0; i<nfds; i++) {
if (fd[i].fd == n) {
int e = fd[i].events & ~events;
short e = fd[i].events & ~events;
if (!e) continue; // if no events left, delete this fd
fd[i].events = e;
}
@ -604,7 +604,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
i->region = R;
}
}
window->clear_damage(window->damage()|FL_DAMAGE_EXPOSE);
window->clear_damage((uchar)(window->damage()|FL_DAMAGE_EXPOSE));
// These next two statements should not be here, so that all update
// is deferred until Fl::flush() is called during idle. However WIN32
// apparently is very unhappy if we don't obey it and draw right now.
@ -1192,5 +1192,5 @@ void Fl_Window::make_current() {
}
//
// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.41 2002/10/29 20:18:55 easysw Exp $".
// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.42 2002/11/19 16:37:36 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: fl_ask.cxx,v 1.8.2.8.2.10 2002/08/30 16:58:16 easysw Exp $"
// "$Id: fl_ask.cxx,v 1.8.2.8.2.11 2002/11/19 16:37:36 easysw Exp $"
//
// Standard dialog functions for the Fast Light Tool Kit (FLTK).
//
@ -147,7 +147,7 @@ void resizeform() {
message->resize(20 + icon_size, 10, message_w, message_h);
icon->resize(10, 10, icon_size, icon_size);
icon->labelsize(icon_size - 10);
icon->labelsize((uchar)(icon_size - 10));
input->resize(20 + icon_size, 10 + message_h, message_w, 25);
for (x = w, i = 0; i < 3; i ++)
@ -344,5 +344,5 @@ const char *fl_password(const char *fmt, const char *defstr, ...) {
}
//
// End of "$Id: fl_ask.cxx,v 1.8.2.8.2.10 2002/08/30 16:58:16 easysw Exp $".
// End of "$Id: fl_ask.cxx,v 1.8.2.8.2.11 2002/11/19 16:37:36 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: fl_draw_image_win32.cxx,v 1.4.2.3.2.2 2002/01/01 15:11:32 easysw Exp $"
// "$Id: fl_draw_image_win32.cxx,v 1.4.2.3.2.3 2002/11/19 16:37:36 easysw Exp $"
//
// WIN32 image drawing code for the Fast Light Tool Kit (FLTK).
//
@ -137,17 +137,17 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
}
#if USE_COLORMAP
if (indexed) {
for (int i=0; i<256; i++) {
for (short i=0; i<256; i++) {
*((short*)(bmi.bmiColors)+i) = i;
}
} else
#endif
if (mono) {
for (int i=0; i<256; i++) {
bmi.bmiColors[i].rgbBlue = i;
bmi.bmiColors[i].rgbGreen = i;
bmi.bmiColors[i].rgbRed = i;
bmi.bmiColors[i].rgbReserved = i;
bmi.bmiColors[i].rgbBlue = (uchar)(i;
bmi.bmiColors[i].rgbGreen = (uchar)(i;
bmi.bmiColors[i].rgbRed = (uchar)(i;
bmi.bmiColors[i].rgbReserved = (uchar)(i;
}
}
bmi.bmiHeader.biWidth = w;
@ -258,5 +258,5 @@ void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) {
}
//
// End of "$Id: fl_draw_image_win32.cxx,v 1.4.2.3.2.2 2002/01/01 15:11:32 easysw Exp $".
// End of "$Id: fl_draw_image_win32.cxx,v 1.4.2.3.2.3 2002/11/19 16:37:36 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.10 2002/08/09 03:17:30 easysw Exp $"
// "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.11 2002/11/19 16:37:36 easysw Exp $"
//
// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
//
@ -230,7 +230,7 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) {
const uchar* p = data[Y];
if (chars_per_pixel <= 1) {
for (int X = 0; X < W; X++) {
int b = (*p++ != transparent_index);
uchar b = (*p++ != transparent_index);
if (*p++ != transparent_index) b |= 2;
if (*p++ != transparent_index) b |= 4;
if (*p++ != transparent_index) b |= 8;
@ -242,7 +242,7 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) {
}
} else {
for (int X = 0; X < W; X++) {
int b = 0;
uchar b = 0;
for (int i = 0; i < 8; i++) {
int ind = *p++;
ind = (ind<<8) | (*p++);
@ -260,5 +260,5 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) {
}
//
// End of "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.10 2002/08/09 03:17:30 easysw Exp $".
// End of "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.11 2002/11/19 16:37:36 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: fl_symbols.cxx,v 1.8.2.3.2.3 2002/04/11 11:52:43 easysw Exp $"
// "$Id: fl_symbols.cxx,v 1.8.2.3.2.4 2002/11/19 16:37:36 easysw Exp $"
//
// Symbol drawing code for the Fast Light Tool Kit (FLTK).
//
@ -159,7 +159,7 @@ int fl_draw_symbol(const char *label,int x,int y,int w,int h,Fl_Color col) {
//for the outline color
static void set_outline_color(Fl_Color c) {
fl_color(fl_color_average(c, FL_BLACK, .5));
fl_color(fl_color_average(c, FL_BLACK, 0.5f));
}
static void rectangle(double x,double y,double x2,double y2,Fl_Color col) {
@ -361,5 +361,5 @@ static void fl_init_symbols(void) {
}
//
// End of "$Id: fl_symbols.cxx,v 1.8.2.3.2.3 2002/04/11 11:52:43 easysw Exp $".
// End of "$Id: fl_symbols.cxx,v 1.8.2.3.2.4 2002/11/19 16:37:36 easysw Exp $".
//