Get rid of as many compiler warnings as possible.

Add missing offbits seek when reading BMP files.

Add -OPT:Olimit=4000 to SGI compiler options (for keyboard_ui)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2253 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-05-24 14:19:19 +00:00
parent 262321f5e6
commit 3a117a899c
14 changed files with 45 additions and 56 deletions

View File

@ -1,7 +1,7 @@
dnl -*- sh -*- dnl -*- sh -*-
dnl the "configure" script is made from this by running GNU "autoconf" dnl the "configure" script is made from this by running GNU "autoconf"
dnl dnl
dnl "$Id: configure.in,v 1.33.2.31.2.67 2002/05/19 17:44:56 easysw Exp $" dnl "$Id: configure.in,v 1.33.2.31.2.68 2002/05/24 14:19:19 easysw Exp $"
dnl dnl
dnl Configuration script for the Fast Light Tool Kit (FLTK). dnl Configuration script for the Fast Light Tool Kit (FLTK).
dnl dnl
@ -662,7 +662,7 @@ else
if test "x$with_optim" != x; then if test "x$with_optim" != x; then
OPTIM="$with_optim $OPTIM" OPTIM="$with_optim $OPTIM"
else else
OPTIM="-O2 $OPTIM" OPTIM="-O2 -OPT:Olimit=4000 $OPTIM"
fi fi
fi fi
;; ;;
@ -744,5 +744,5 @@ dnl Make sure the fltk-config script is executable...
chmod +x fltk-config chmod +x fltk-config
dnl dnl
dnl End of "$Id: configure.in,v 1.33.2.31.2.67 2002/05/19 17:44:56 easysw Exp $". dnl End of "$Id: configure.in,v 1.33.2.31.2.68 2002/05/24 14:19:19 easysw Exp $".
dnl dnl

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.15 2002/05/16 12:47:42 easysw Exp $" // "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.16 2002/05/24 14:19:19 easysw Exp $"
// //
// Widget type code for the Fast Light Tool Kit (FLTK). // Widget type code for the Fast Light Tool Kit (FLTK).
// //
@ -297,11 +297,9 @@ void name_public_cb(Fl_Light_Button* i, void* v) {
static char* oldlabel; static char* oldlabel;
static unsigned oldlabellen; static unsigned oldlabellen;
static Fl_Input *label_input;
void label_cb(Fl_Input* i, void *v) { void label_cb(Fl_Input* i, void *v) {
if (v == LOAD) { if (v == LOAD) {
label_input = i;
i->static_value(current_widget->label()); i->static_value(current_widget->label());
if (strlen(i->value()) >= oldlabellen) { if (strlen(i->value()) >= oldlabellen) {
oldlabellen = strlen(i->value())+128; oldlabellen = strlen(i->value())+128;
@ -370,11 +368,8 @@ void inactive_browse_cb(Fl_Button* b, void *v) {
} }
} }
static Fl_Input *tooltip_input;
void tooltip_cb(Fl_Input* i, void *v) { void tooltip_cb(Fl_Input* i, void *v) {
if (v == LOAD) { if (v == LOAD) {
tooltip_input = i;
if (current_widget->is_widget()) { if (current_widget->is_widget()) {
i->activate(); i->activate();
i->static_value(((Fl_Widget_Type*)current_widget)->tooltip()); i->static_value(((Fl_Widget_Type*)current_widget)->tooltip());
@ -1975,5 +1970,5 @@ int Fl_Widget_Type::read_fdesign(const char* name, const char* value) {
} }
// //
// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.15 2002/05/16 12:47:42 easysw Exp $". // End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.16 2002/05/24 14:19:19 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Adjuster.cxx,v 1.5.2.3.2.6 2002/05/12 11:12:56 easysw Exp $" // "$Id: Fl_Adjuster.cxx,v 1.5.2.3.2.7 2002/05/24 14:19:19 easysw Exp $"
// //
// Adjuster widget for the Fast Light Tool Kit (FLTK). // Adjuster widget for the Fast Light Tool Kit (FLTK).
// //
@ -139,7 +139,8 @@ int Fl_Adjuster::handle(int event) {
default: default:
return 0; return 0;
} }
break; // break not required because of switch...
case FL_FOCUS: case FL_FOCUS:
case FL_UNFOCUS: case FL_UNFOCUS:
if (Fl::visible_focus()) { if (Fl::visible_focus()) {
@ -164,5 +165,5 @@ Fl_Adjuster::Fl_Adjuster(int x, int y, int w, int h, const char* l)
} }
// //
// End of "$Id: Fl_Adjuster.cxx,v 1.5.2.3.2.6 2002/05/12 11:12:56 easysw Exp $". // End of "$Id: Fl_Adjuster.cxx,v 1.5.2.3.2.7 2002/05/24 14:19:19 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_BMP_Image.cxx,v 1.1.2.2 2002/05/15 19:42:34 easysw Exp $" // "$Id: Fl_BMP_Image.cxx,v 1.1.2.3 2002/05/24 14:19:19 easysw Exp $"
// //
// Fl_BMP_Image routines. // Fl_BMP_Image routines.
// //
@ -75,7 +75,7 @@ Fl_BMP_Image::Fl_BMP_Image(const char *bmp) // I - File to read
count, // Number of times to repeat count, // Number of times to repeat
temp, // Temporary color temp, // Temporary color
align; // Alignment bytes align; // Alignment bytes
long offbits; // Offset to image data unsigned long offbits; // Offset to image data
uchar bit, // Bit in image uchar bit, // Bit in image
byte; // Byte in image byte; // Byte in image
uchar *ptr; // Pointer into pixels uchar *ptr; // Pointer into pixels
@ -137,6 +137,7 @@ Fl_BMP_Image::Fl_BMP_Image(const char *bmp) // I - File to read
// Setup image and buffers... // Setup image and buffers...
d(3); d(3);
fseek(fp, offbits, SEEK_SET);
array = new uchar[w() * h() * d()]; array = new uchar[w() * h() * d()];
@ -369,5 +370,5 @@ read_long(FILE *fp) { // I - File to read from
// //
// End of "$Id: Fl_BMP_Image.cxx,v 1.1.2.2 2002/05/15 19:42:34 easysw Exp $". // End of "$Id: Fl_BMP_Image.cxx,v 1.1.2.3 2002/05/24 14:19:19 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Counter.cxx,v 1.8.2.3.2.8 2002/04/11 10:46:19 easysw Exp $" // "$Id: Fl_Counter.cxx,v 1.8.2.3.2.9 2002/05/24 14:19:19 easysw Exp $"
// //
// Counter widget for the Fast Light Tool Kit (FLTK). // Counter widget for the Fast Light Tool Kit (FLTK).
// //
@ -154,7 +154,7 @@ int Fl_Counter::handle(int event) {
default: default:
return 0; return 0;
} }
break; // break not required because of switch...
case FL_FOCUS : case FL_FOCUS :
case FL_UNFOCUS : case FL_UNFOCUS :
if (Fl::visible_focus()) { if (Fl::visible_focus()) {
@ -188,5 +188,5 @@ Fl_Counter::Fl_Counter(int x, int y, int w, int h, const char* l)
} }
// //
// End of "$Id: Fl_Counter.cxx,v 1.8.2.3.2.8 2002/04/11 10:46:19 easysw Exp $". // End of "$Id: Fl_Counter.cxx,v 1.8.2.3.2.9 2002/05/24 14:19:19 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Help_View.cxx,v 1.1.2.32 2002/05/21 11:14:57 easysw Exp $" // "$Id: Fl_Help_View.cxx,v 1.1.2.33 2002/05/24 14:19:19 easysw Exp $"
// //
// Fl_Help_View widget routines. // Fl_Help_View widget routines.
// //
@ -2283,6 +2283,8 @@ Fl_Help_View::load(const char *f)// I - Filename to load (may also have target)
strcpy(filename_, f); strcpy(filename_, f);
strcpy(directory_, filename_); strcpy(directory_, filename_);
// Note: We do not support Windows backslashes, since they are illegal
// in URLs...
if ((slash = strrchr(directory_, '/')) == NULL) if ((slash = strrchr(directory_, '/')) == NULL)
directory_[0] = '\0'; directory_[0] = '\0';
else if (slash > directory_ && slash[-1] != '/') else if (slash > directory_ && slash[-1] != '/')
@ -2623,5 +2625,5 @@ hscrollbar_callback(Fl_Widget *s, void *)
// //
// End of "$Id: Fl_Help_View.cxx,v 1.1.2.32 2002/05/21 11:14:57 easysw Exp $". // End of "$Id: Fl_Help_View.cxx,v 1.1.2.33 2002/05/24 14:19:19 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Image.cxx,v 1.5.2.3.2.20 2002/04/26 11:32:37 easysw Exp $" // "$Id: Fl_Image.cxx,v 1.5.2.3.2.21 2002/05/24 14:19:19 easysw Exp $"
// //
// Image drawing code for the Fast Light Tool Kit (FLTK). // Image drawing code for the Fast Light Tool Kit (FLTK).
// //
@ -41,7 +41,7 @@ void fl_restore_clip(); // from fl_rect.cxx
Fl_Image::~Fl_Image() { Fl_Image::~Fl_Image() {
} }
void Fl_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) { void Fl_Image::draw(int XP, int YP, int, int, int, int) {
draw_empty(XP, YP); draw_empty(XP, YP);
} }
@ -58,7 +58,7 @@ Fl_Image *Fl_Image::copy(int W, int H) {
return new Fl_Image(W, H, d()); return new Fl_Image(W, H, d());
} }
void Fl_Image::color_average(Fl_Color c, float i) { void Fl_Image::color_average(Fl_Color, float) {
} }
void Fl_Image::desaturate() { void Fl_Image::desaturate() {
@ -393,5 +393,5 @@ void Fl_RGB_Image::label(Fl_Menu_Item* m) {
// //
// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.20 2002/04/26 11:32:37 easysw Exp $". // End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.21 2002/05/24 14:19:19 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_PNG_Image.cxx,v 1.1.2.5 2002/04/24 18:29:05 easysw Exp $" // "$Id: Fl_PNG_Image.cxx,v 1.1.2.6 2002/05/24 14:19:19 easysw Exp $"
// //
// Fl_PNG_Image routines. // Fl_PNG_Image routines.
// //
@ -89,8 +89,8 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read
if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans) if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
channels ++; channels ++;
w(info->width); w((int)(info->width));
h(info->height); h((int)(info->height));
d(channels); d(channels);
if (info->bit_depth < 8) if (info->bit_depth < 8)
@ -135,5 +135,5 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read
// //
// End of "$Id: Fl_PNG_Image.cxx,v 1.1.2.5 2002/04/24 18:29:05 easysw Exp $". // End of "$Id: Fl_PNG_Image.cxx,v 1.1.2.6 2002/05/24 14:19:19 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Roller.cxx,v 1.6.2.4.2.5 2002/05/12 11:12:56 easysw Exp $" // "$Id: Fl_Roller.cxx,v 1.6.2.4.2.6 2002/05/24 14:19:19 easysw Exp $"
// //
// Roller widget for the Fast Light Tool Kit (FLTK). // Roller widget for the Fast Light Tool Kit (FLTK).
// //
@ -66,7 +66,7 @@ int Fl_Roller::handle(int event) {
default: default:
return 0; return 0;
} }
break; // break not required because of switch...
case FL_FOCUS : case FL_FOCUS :
case FL_UNFOCUS : case FL_UNFOCUS :
if (Fl::visible_focus()) { if (Fl::visible_focus()) {
@ -171,5 +171,5 @@ Fl_Roller::Fl_Roller(int X,int Y,int W,int H,const char* L)
} }
// //
// End of "$Id: Fl_Roller.cxx,v 1.6.2.4.2.5 2002/05/12 11:12:56 easysw Exp $". // End of "$Id: Fl_Roller.cxx,v 1.6.2.4.2.6 2002/05/24 14:19:19 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Slider.cxx,v 1.8.2.10.2.6 2002/04/11 10:46:19 easysw Exp $" // "$Id: Fl_Slider.cxx,v 1.8.2.10.2.7 2002/05/24 14:19:19 easysw Exp $"
// //
// Slider widget for the Fast Light Tool Kit (FLTK). // Slider widget for the Fast Light Tool Kit (FLTK).
// //
@ -267,7 +267,7 @@ int Fl_Slider::handle(int event, int x, int y, int w, int h) {
default: default:
return 0; return 0;
} }
break; // break not required because of switch...
case FL_FOCUS : case FL_FOCUS :
case FL_UNFOCUS : case FL_UNFOCUS :
if (Fl::visible_focus()) { if (Fl::visible_focus()) {
@ -291,5 +291,5 @@ int Fl_Slider::handle(int event) {
} }
// //
// End of "$Id: Fl_Slider.cxx,v 1.8.2.10.2.6 2002/04/11 10:46:19 easysw Exp $". // End of "$Id: Fl_Slider.cxx,v 1.8.2.10.2.7 2002/05/24 14:19:19 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Text_Display.cxx,v 1.12.2.14 2002/05/21 11:14:59 easysw Exp $" // "$Id: Fl_Text_Display.cxx,v 1.12.2.15 2002/05/24 14:19: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
@ -881,8 +881,8 @@ void Fl_Text_Display::draw_vline(int visLineNum, int leftClip, int rightClip,
Fl_Text_Buffer * buf = mBuffer; Fl_Text_Buffer * buf = mBuffer;
int i, X, Y, startX, charIndex, lineStartPos, lineLen, fontHeight; int i, X, Y, startX, charIndex, lineStartPos, lineLen, fontHeight;
int stdCharWidth, charWidth, startIndex, charStyle, style; int stdCharWidth, charWidth, startIndex, charStyle, style;
int charLen, outStartIndex, outIndex, cursorX, hasCursor = 0; int charLen, outStartIndex, outIndex;
int dispIndexOffset, cursorPos = mCursorPos; int dispIndexOffset;
char expandedChar[ FL_TEXT_MAX_EXP_CHAR_LEN ], outStr[ MAX_DISP_LINE_LEN ]; char expandedChar[ FL_TEXT_MAX_EXP_CHAR_LEN ], outStr[ MAX_DISP_LINE_LEN ];
char *outPtr; char *outPtr;
const char *lineStr; const char *lineStr;
@ -960,16 +960,6 @@ void Fl_Text_Display::draw_vline(int visLineNum, int leftClip, int rightClip,
outIndex = outStartIndex; outIndex = outStartIndex;
X = startX; X = startX;
for ( charIndex = startIndex; charIndex < rightCharIndex; charIndex++ ) { for ( charIndex = startIndex; charIndex < rightCharIndex; charIndex++ ) {
if ( lineStartPos + charIndex == cursorPos ) {
if ( charIndex < lineLen || ( charIndex == lineLen &&
cursorPos >= buf->length() ) ) {
hasCursor = 1; // CET - FIXME
cursorX = X - 1;
} else if ( charIndex == lineLen ) {
hasCursor = 1;
cursorX = X - 1;
}
}
charLen = charIndex >= lineLen ? 1 : charLen = charIndex >= lineLen ? 1 :
Fl_Text_Buffer::expand_character( lineStr[ charIndex ], outIndex, expandedChar, Fl_Text_Buffer::expand_character( lineStr[ charIndex ], outIndex, expandedChar,
buf->tab_distance(), buf->null_substitution_character() ); buf->tab_distance(), buf->null_substitution_character() );
@ -1958,5 +1948,5 @@ int Fl_Text_Display::handle(int event) {
// //
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.14 2002/05/21 11:14:59 easysw Exp $". // End of "$Id: Fl_Text_Display.cxx,v 1.12.2.15 2002/05/24 14:19:19 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.16 2002/04/12 20:16:07 easysw Exp $" // "$Id: Fl_Widget.cxx,v 1.5.2.4.2.17 2002/05/24 14:19:19 easysw Exp $"
// //
// Base widget class for the Fast Light Tool Kit (FLTK). // Base widget class for the Fast Light Tool Kit (FLTK).
// //
@ -68,7 +68,7 @@ Fl_Widget *Fl::readqueue() {
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
int Fl_Widget::handle(int event) { int Fl_Widget::handle(int) {
return 0; return 0;
} }
@ -250,5 +250,5 @@ int Fl_Widget::contains(const Fl_Widget *o) const {
} }
// //
// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.16 2002/04/12 20:16:07 easysw Exp $". // End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.17 2002/05/24 14:19:19 easysw Exp $".
// //

View File

@ -244,7 +244,7 @@ Fl_Valuator.o: ../FL/Fl_Valuator.H ../FL/Fl_Widget.H ../FL/math.h
Fl_Value_Input.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H Fl_Value_Input.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
Fl_Value_Input.o: ../FL/Fl_Value_Input.H ../FL/Fl_Valuator.H Fl_Value_Input.o: ../FL/Fl_Value_Input.H ../FL/Fl_Valuator.H
Fl_Value_Input.o: ../FL/Fl_Widget.H ../FL/Fl_Input.H ../FL/Fl_Input_.H Fl_Value_Input.o: ../FL/Fl_Widget.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
Fl_Value_Input.o: ../FL/Fl_Group.H Fl_Value_Input.o: ../FL/Fl_Group.H ../FL/math.h
Fl_Value_Output.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H Fl_Value_Output.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
Fl_Value_Output.o: ../FL/Fl_Value_Output.H ../FL/Fl_Valuator.H Fl_Value_Output.o: ../FL/Fl_Value_Output.H ../FL/Fl_Valuator.H
Fl_Value_Output.o: ../FL/Fl_Widget.H ../FL/fl_draw.H Fl_Value_Output.o: ../FL/Fl_Widget.H ../FL/fl_draw.H

View File

@ -1,5 +1,5 @@
// //
// "$Id: symbols.cxx,v 1.4.2.3.2.3 2002/05/13 05:05:11 spitzak Exp $" // "$Id: symbols.cxx,v 1.4.2.3.2.4 2002/05/24 14:19:19 easysw Exp $"
// //
// Symbol test program for the Fast Light Tool Kit (FLTK). // Symbol test program for the Fast Light Tool Kit (FLTK).
// //
@ -41,7 +41,7 @@ int N = 0;
Fl_Window *window; Fl_Window *window;
void slider_cb(Fl_Widget *w, void *data) { void slider_cb(Fl_Widget *w, void *) {
static char buf[80]; static char buf[80];
int val = (int)(((Fl_Value_Slider*)w)->value()); int val = (int)(((Fl_Value_Slider*)w)->value());
Fl_Window *win = (Fl_Window*)w->parent(); // get parent window Fl_Window *win = (Fl_Window*)w->parent(); // get parent window
@ -126,5 +126,5 @@ bt("@DnArrow");
} }
// //
// End of "$Id: symbols.cxx,v 1.4.2.3.2.3 2002/05/13 05:05:11 spitzak Exp $". // End of "$Id: symbols.cxx,v 1.4.2.3.2.4 2002/05/24 14:19:19 easysw Exp $".
// //