Watcom fixes (STR #584, STR #594, STR #595)

Fixed library include order when building DSOs on MacOS X (STR
#596)

fl_xid() could cause a WIN32 application to crash (STR #560, STR
#576, STR #618)

Fl_Browser::remove_() removed the item from the list before
computing the item height, which caused problems with some
programs (STR #613)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3897 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2004-11-20 03:19:59 +00:00
parent a5a683f35f
commit 23bb059065
20 changed files with 1168 additions and 27 deletions

12
CHANGES
View File

@ -1,3 +1,15 @@
CHANGES IN FLTK 1.1.6
- Watcom fixes (STR #584, STR #594, STR #595)
- Fixed library include order when building DSOs on
MacOS X (STR #596)
- fl_xid() could cause a WIN32 application to crash (STR
#560, STR #576, STR #618)
- Fl_Browser::remove_() removed the item from the list
before computing the item height, which caused
problems with some programs (STR #613)
CHANGES IN FLTK 1.1.5
- Documentation updates (STR #568, STR #570)

View File

@ -1,5 +1,5 @@
//
// "$Id: Enumerations.H,v 1.18.2.14.2.37 2004/04/11 04:38:53 easysw Exp $"
// "$Id: Enumerations.H,v 1.18.2.14.2.38 2004/11/20 03:19:57 easysw Exp $"
//
// Enumerations for the Fast Light Tool Kit (FLTK).
//
@ -45,7 +45,7 @@
#define FL_MAJOR_VERSION 1
#define FL_MINOR_VERSION 1
#define FL_PATCH_VERSION 5
#define FL_PATCH_VERSION 6
#define FL_VERSION ((double)FL_MAJOR_VERSION + \
(double)FL_MINOR_VERSION * 0.01 + \
(double)FL_PATCH_VERSION * 0.0001)
@ -419,5 +419,5 @@ enum Fl_Damage {
#endif
//
// End of "$Id: Enumerations.H,v 1.18.2.14.2.37 2004/04/11 04:38:53 easysw Exp $".
// End of "$Id: Enumerations.H,v 1.18.2.14.2.38 2004/11/20 03:19:57 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Window.H,v 1.12.2.6.2.8 2004/04/11 04:38:54 easysw Exp $"
// "$Id: Fl_Window.H,v 1.12.2.6.2.9 2004/11/20 03:19:57 easysw Exp $"
//
// Window header file for the Fast Light Tool Kit (FLTK).
//
@ -88,7 +88,7 @@ public:
void hotspot(const Fl_Widget& p, int offscreen = 0) {hotspot(&p,offscreen);}
void free_position() {clear_flag(FL_FORCE_POSITION);}
void size_range(int a, int b, int c=0, int d=0, int e=0, int f=0, int g=0) {
minw=a; minh=b; maxw=c; maxh=d; dw=e; dh=f; aspect=g; size_range_();}
minw=(short)a; minh=(short)b; maxw=(short)c; maxh=(short)d; dw=(short)e; dh=(short)f; aspect=(short)g; size_range_();}
const char* label() const {return Fl_Widget::label();}
const char* iconlabel() const {return iconlabel_;}
@ -124,5 +124,5 @@ public:
#endif
//
// End of "$Id: Fl_Window.H,v 1.12.2.6.2.8 2004/04/11 04:38:54 easysw Exp $".
// End of "$Id: Fl_Window.H,v 1.12.2.6.2.9 2004/11/20 03:19:57 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: win32.H,v 1.15.2.3.2.12 2004/04/11 04:38:55 easysw Exp $"
// "$Id: win32.H,v 1.15.2.3.2.13 2004/11/20 03:19:57 easysw Exp $"
//
// WIN32 header file for the Fast Light Tool Kit (FLTK).
//
@ -88,7 +88,7 @@ public:
};
extern FL_EXPORT HCURSOR fl_default_cursor;
extern FL_EXPORT UINT fl_wake_msg;
inline Window fl_xid(const Fl_Window*w) {return Fl_X::i(w)->xid;}
inline Window fl_xid(const Fl_Window*w) {Fl_X *temp = Fl_X::i(w); return temp ? temp->xid : 0;}
FL_EXPORT Fl_Window* fl_find(Window xid);
extern FL_EXPORT char fl_override_redirect; // hack into Fl_Window::make_xid()
extern FL_EXPORT int fl_background_pixel; // hack into Fl_Window::make_xid()
@ -138,5 +138,5 @@ inline void fl_open_callback(void (*)(const char *)) {}
extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b);
//
// End of "$Id: win32.H,v 1.15.2.3.2.12 2004/04/11 04:38:55 easysw Exp $".
// End of "$Id: win32.H,v 1.15.2.3.2.13 2004/11/20 03:19:57 easysw Exp $".
//

View File

@ -1,7 +1,7 @@
dnl -*- sh -*-
dnl the "configure" script is made from this by running GNU "autoconf"
dnl
dnl "$Id: configure.in,v 1.33.2.31.2.120 2004/10/18 21:05:27 easysw Exp $"
dnl "$Id: configure.in,v 1.33.2.31.2.121 2004/11/20 03:19:57 easysw Exp $"
dnl
dnl Configuration script for the Fast Light Tool Kit (FLTK).
dnl
@ -34,7 +34,7 @@ AC_INIT(src/Fl.cxx)
dnl FLTK library versions...
FL_MAJOR_VERSION=1
FL_MINOR_VERSION=1
FL_PATCH_VERSION=5
FL_PATCH_VERSION=6
FL_RELEASE_VERSION=
FL_API_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}
@ -911,5 +911,5 @@ dnl Make sure the fltk-config script is executable...
chmod +x fltk-config
dnl
dnl End of "$Id: configure.in,v 1.33.2.31.2.120 2004/10/18 21:05:27 easysw Exp $".
dnl End of "$Id: configure.in,v 1.33.2.31.2.121 2004/11/20 03:19:57 easysw Exp $".
dnl

View File

@ -1,5 +1,5 @@
#
# "$Id: fltk.spec,v 1.1.2.9.2.31 2004/10/18 21:05:28 easysw Exp $"
# "$Id: fltk.spec,v 1.1.2.9.2.32 2004/11/20 03:19:57 easysw Exp $"
#
# RPM spec file for FLTK.
#
@ -23,7 +23,7 @@
# Please report all bugs and problems to "fltk-bugs@fltk.org".
#
%define version 1.1.5
%define version 1.1.6
%define release 0
%define prefix /usr
@ -96,5 +96,5 @@ rm -rf $RPM_BUILD_ROOT
%{prefix}/share/doc/fltk/*
#
# End of "$Id: fltk.spec,v 1.1.2.9.2.31 2004/10/18 21:05:28 easysw Exp $".
# End of "$Id: fltk.spec,v 1.1.2.9.2.32 2004/11/20 03:19:57 easysw Exp $".
#

View File

@ -85,7 +85,7 @@ Fl_Window* make_about_panel() {
o->labelcolor(7);
o->align(FL_ALIGN_TOP|FL_ALIGN_INSIDE);
}
{ Fl_Box* o = new Fl_Box(140, 27, 160, 123, "FLTK User\nInterface\nDesigner\nVersion 1.1.5");
{ Fl_Box* o = new Fl_Box(140, 27, 160, 123, "FLTK User\nInterface\nDesigner\nVersion 1.1.6");
o->box(FL_OVAL_BOX);
o->color(12);
o->selection_color(47);

View File

@ -49,7 +49,7 @@ Function {make_about_panel()} {open
label {FLTK User
Interface
Designer
Version 1.1.5}
Version 1.1.6}
xywh {140 27 160 123} box OVAL_BOX color 12 selection_color 47 labeltype SHADOW_LABEL labelfont 1 labelsize 18 labelcolor 7
}
Fl_Button {} {

77
fluid/makefile.wat Normal file
View File

@ -0,0 +1,77 @@
#
# "$Id: makefile.wat,v 1.1.2.1 2004/11/20 03:19:58 easysw Exp $"
#
# FLUID makefile for the Fast Light Tool Kit (FLTK).
#
# Copyright 1998-2004 by Bill Spitzak and others.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
#
# Please report all bugs and problems to "fltk-bugs@fltk.org".
#
CPPFILES = &
Fl_Function_Type.obj &
Fl_Menu_Type.obj &
Fl_Group_Type.obj &
Fl_Widget_Type.obj &
Fl_Type.obj &
Fl_Window_Type.obj &
Fluid_Image.obj &
code.obj &
factory.obj &
file.obj &
fluid.obj &
align_widget.obj &
about_panel.obj &
widget_panel.obj &
alignment_panel.obj &
function_panel.obj
################################################################
OBJECTS = $(CPPFILES)
EXTRA_LIBS = uuid.lib
!include ../watcom.mif
all: $(ODIR)/fluid$(EXEEXT)
$(ODIR)\fluid$(EXEEXT): $(OBJECTS) $(LIBS)
#
# Clean all directories
#
clean : .SYMBOLIC
@echo Cleaning up.
CLEANEXTS = exe map sym obj lk1
@for %a in ($(CLEANEXTS)) do -rm -f $(ODIR)\*.%a
-rm -f *.err
#
# Note: The rebuild target can only be used if you have the original .fl
# files. This is normally only used by the FLTK maintainers...
#
rebuild:
./fluid -c about_panel.fl
./fluid -c alignment_panel.fl
./fluid -c function_panel.fl
./fluid -c widget_panel.fl
#
# End of "$Id: makefile.wat,v 1.1.2.1 2004/11/20 03:19:58 easysw Exp $".
#

67
jpeg/makefile.wat Normal file
View File

@ -0,0 +1,67 @@
#
# "$Id: makefile.wat,v 1.1.2.1 2004/11/20 03:19:58 easysw Exp $"
#
# JPEG library makefile for the Fast Light Toolkit (FLTK).
#
# Copyright 1997-2004 by Easy Software Products.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
#
# Please report all bugs and problems to "fltk-bugs@fltk.org".
#
LIBNAMEROOT=ftlk_jpeg
!include ../watcom.mif
#
# Object files...
#
LIBOBJS = jmemnobs.obj &
jcapimin.obj jcapistd.obj jccoefct.obj jccolor.obj jcdctmgr.obj &
jchuff.obj jcinit.obj jcmainct.obj jcmarker.obj jcmaster.obj jcomapi.obj &
jcparam.obj jcphuff.obj jcprepct.obj jcsample.obj jctrans.obj &
jdapimin.obj jdapistd.obj jdatadst.obj jdatasrc.obj jdcoefct.obj &
jdcolor.obj jddctmgr.obj jdhuff.obj jdinput.obj jdmainct.obj jdmarker.obj &
jdmaster.obj jdmerge.obj jdphuff.obj jdpostct.obj jdsample.obj &
jdtrans.obj jerror.obj jfdctflt.obj jfdctfst.obj jfdctint.obj &
jidctflt.obj jidctfst.obj jidctint.obj jidctred.obj jquant1.obj &
jquant2.obj jutils.obj jmemmgr.obj
#
# Make all targets...
#
all: $(LIBNAME)
$(LIBNAME): $(LIBOBJS)
$(LIB) $(LIBOPTS) $@ $<
#
# Clean all directories
#
clean : .SYMBOLIC
@echo Cleaning up.
CLEANEXTS = obj
@for %a in ($(CLEANEXTS)) do -rm -f $(ODIR)\*.%a
-rm -f *.err
-rm -f $(LIBNAME)
#
# End of "$Id: makefile.wat,v 1.1.2.1 2004/11/20 03:19:58 easysw Exp $".
#

64
png/makefile.wat Normal file
View File

@ -0,0 +1,64 @@
#
# "$Id: makefile.wat,v 1.1.2.1 2004/11/20 03:19:58 easysw Exp $"
#
# PNG library makefile for the Fast Light Toolkit (FLTK).
#
# Copyright 1997-2004 by Easy Software Products.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
#
# Please report all bugs and problems to "fltk-bugs@fltk.org".
#
LIBNAMEROOT=ftlk_png
# I ought to be able to do "EXTRA_INCLUDE_DIRS += ;../zlib" but it doesn't work for me (OW1.3)
!undef EXTRA_INCLUDE_DIRS
EXTRA_INCLUDE_DIRS=$(ROOT);../zlib
!include ../watcom.mif
#
# Object files...
#
LIBOBJS = png.obj pngset.obj pngget.obj pngrutil.obj pngtrans.obj pngwutil.obj &
pngread.obj pngrio.obj pngwio.obj pngwrite.obj pngrtran.obj &
pngwtran.obj pngmem.obj pngerror.obj pngpread.obj
#
# Make all targets...
#
all: $(LIBNAME)
$(LIBNAME): $(LIBOBJS)
$(LIB) $(LIBOPTS) $@ $<
#
# Clean all directories
#
clean : .SYMBOLIC
@echo Cleaning up.
CLEANEXTS = obj
@for %a in ($(CLEANEXTS)) do -rm -f $(ODIR)\*.%a
-rm -f *.err
-rm -f $(LIBNAME)
#
# End of "$Id: makefile.wat,v 1.1.2.1 2004/11/20 03:19:58 easysw Exp $".
#

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Browser.cxx,v 1.9.2.12.2.12 2004/07/26 20:52:50 easysw Exp $"
// "$Id: Fl_Browser.cxx,v 1.9.2.12.2.13 2004/11/20 03:19:58 easysw Exp $"
//
// Browser widget for the Fast Light Tool Kit (FLTK).
//
@ -116,13 +116,13 @@ FL_BLINE* Fl_Browser::_remove(int line) {
cacheline = line-1;
cache = ttt->prev;
lines--;
full_height_ -= item_height(ttt);
if (ttt->prev) ttt->prev->next = ttt->next;
else first = ttt->next;
if (ttt->next) ttt->next->prev = ttt->prev;
else last = ttt->prev;
lines--;
full_height_ -= item_height(ttt);
return(ttt);
}
@ -546,5 +546,5 @@ void Fl_Browser::swap(int ai, int bi) {
}
//
// End of "$Id: Fl_Browser.cxx,v 1.9.2.12.2.12 2004/07/26 20:52:50 easysw Exp $".
// End of "$Id: Fl_Browser.cxx,v 1.9.2.12.2.13 2004/11/20 03:19:58 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
#
# "$Id: Makefile,v 1.18.2.14.2.58 2004/10/18 20:22:25 easysw Exp $"
# "$Id: Makefile,v 1.18.2.14.2.59 2004/11/20 03:19:58 easysw Exp $"
#
# Library makefile for the Fast Light Tool Kit (FLTK).
#
@ -253,7 +253,7 @@ libfltk_forms.1.1.dylib: $(FLOBJECTS) libfltk.1.1.dylib
-install_name $(libdir)/$@ \
-current_version 1.1.4 \
-compatibility_version 1.1.0 \
$(FLOBJECTS) $(LDLIBS) -L. -lfltk
$(FLOBJECTS) -L. $(LDLIBS) -lfltk
$(RM) libfltk_forms.dylib
$(LN) libfltk_forms.1.1.dylib libfltk_forms.dylib
@ -289,7 +289,7 @@ libfltk_gl.1.1.dylib: $(GLOBJECTS) libfltk.1.1.dylib
-install_name $(libdir)/$@ \
-current_version 1.1.4 \
-compatibility_version 1.1.0 \
$(GLOBJECTS) $(GLDLIBS) -L. -lfltk
$(GLOBJECTS) -L. $(GLDLIBS) -lfltk
$(RM) libfltk_gl.dylib
$(LN) libfltk_gl.1.1.dylib libfltk_gl.dylib
@ -325,7 +325,7 @@ libfltk_images.1.1.dylib: $(IMGOBJECTS) libfltk.1.1.dylib
-install_name $(libdir)/$@ \
-current_version 1.1.4 \
-compatibility_version 1.1.0 \
$(IMGOBJECTS) $(LDLIBS) $(IMAGELIBS) -L. -lfltk
$(IMGOBJECTS) $(LDLIBS) -L. $(IMAGELIBS) -lfltk
$(RM) libfltk_images.dylib
$(LN) libfltk_images.1.1.dylib libfltk_images.dylib
@ -583,5 +583,5 @@ uninstall:
#
# End of "$Id: Makefile,v 1.18.2.14.2.58 2004/10/18 20:22:25 easysw Exp $".
# End of "$Id: Makefile,v 1.18.2.14.2.59 2004/11/20 03:19:58 easysw Exp $".
#

226
src/makefile.wat Normal file
View File

@ -0,0 +1,226 @@
#
# "$Id: makefile.wat,v 1.1.2.1 2004/11/20 03:19:58 easysw Exp $"
#
# Library makefile for the Fast Light Tool Kit (FLTK).
#
# Copyright 1998-2004 by Bill Spitzak and others.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
#
# Please report all bugs and problems to "fltk-bugs@fltk.org".
#
CPPFILES = &
Fl.obj &
Fl_Adjuster.obj &
Fl_Bitmap.obj &
Fl_Browser.obj &
Fl_Browser_.obj &
Fl_Browser_load.obj &
Fl_Box.obj &
Fl_Button.obj &
Fl_Chart.obj &
Fl_Check_Browser.obj &
Fl_Check_Button.obj &
Fl_Choice.obj &
Fl_Clock.obj &
Fl_Color_Chooser.obj &
Fl_Counter.obj &
Fl_Dial.obj &
Fl_Double_Window.obj &
Fl_File_Browser.obj &
Fl_File_Chooser.obj &
Fl_File_Chooser2.obj &
Fl_File_Icon.obj &
Fl_File_Input.obj &
Fl_Group.obj &
Fl_Help_View.obj &
Fl_Image.obj &
Fl_Input.obj &
Fl_Input_.obj &
Fl_Light_Button.obj &
Fl_Menu.obj &
Fl_Menu_.obj &
Fl_Menu_Bar.obj &
Fl_Sys_Menu_Bar.obj &
Fl_Menu_Button.obj &
Fl_Menu_Window.obj &
Fl_Menu_add.obj &
Fl_Menu_global.obj &
Fl_Multi_Label.obj &
Fl_Overlay_Window.obj &
Fl_Pack.obj &
Fl_Pixmap.obj &
Fl_Positioner.obj &
Fl_Preferences.obj &
Fl_Progress.obj &
Fl_Repeat_Button.obj &
Fl_Return_Button.obj &
Fl_Roller.obj &
Fl_Round_Button.obj &
Fl_Scroll.obj &
Fl_Scrollbar.obj &
Fl_Shared_Image.obj &
Fl_Single_Window.obj &
Fl_Slider.obj &
Fl_Tabs.obj &
Fl_Text_Buffer.obj &
Fl_Text_Display.obj &
Fl_Text_Editor.obj &
Fl_Tile.obj &
Fl_Tiled_Image.obj &
Fl_Tooltip.obj &
Fl_Valuator.obj &
Fl_Value_Input.obj &
Fl_Value_Output.obj &
Fl_Value_Slider.obj &
Fl_Widget.obj &
Fl_Window.obj &
Fl_Window_fullscreen.obj &
Fl_Window_hotspot.obj &
Fl_Window_iconize.obj &
Fl_Wizard.obj &
Fl_XBM_Image.obj &
Fl_XPM_Image.obj &
Fl_abort.obj &
Fl_add_idle.obj &
Fl_arg.obj &
Fl_compose.obj &
Fl_display.obj &
Fl_get_key.obj &
Fl_get_system_colors.obj &
Fl_grab.obj &
Fl_lock.obj &
Fl_own_colormap.obj &
Fl_visual.obj &
Fl_x.obj &
filename_absolute.obj &
filename_expand.obj &
filename_ext.obj &
filename_isdir.obj &
filename_list.obj &
filename_match.obj &
filename_setext.obj &
fl_arc.obj &
fl_arci.obj &
fl_ask.obj &
fl_boxtype.obj &
fl_color.obj &
fl_cursor.obj &
fl_curve.obj &
fl_diamond_box.obj &
fl_dnd.obj &
fl_draw.obj &
fl_draw_image.obj &
fl_draw_pixmap.obj &
fl_engraved_label.obj &
fl_file_dir.obj &
fl_font.obj &
fl_labeltype.obj &
fl_line_style.obj &
fl_oval_box.obj &
fl_overlay.obj &
fl_overlay_visual.obj &
fl_plastic.obj &
fl_read_image.obj &
fl_rect.obj &
fl_round_box.obj &
fl_rounded_box.obj &
fl_set_font.obj &
fl_set_fonts.obj &
fl_scroll_area.obj &
fl_shadow_box.obj &
fl_shortcut.obj &
fl_show_colormap.obj &
fl_symbols.obj &
fl_vertex.obj
FLCPPFILES = &
forms_compatability.obj &
forms_bitmap.obj &
forms_free.obj &
forms_fselect.obj &
forms_pixmap.obj &
forms_timer.obj
GLCPPFILES = &
Fl_Gl_Choice.obj &
Fl_Gl_Overlay.obj &
Fl_Gl_Window.obj &
gl_draw.obj &
gl_start.obj &
glut_compatability.obj &
glut_font.obj
IMGCPPFILES = &
fl_images_core.obj &
Fl_BMP_Image.obj &
Fl_File_Icon2.obj &
Fl_GIF_Image.obj &
Fl_Help_Dialog.obj &
Fl_JPEG_Image.obj &
Fl_PNG_Image.obj &
Fl_PNM_Image.obj
CFILES = fl_call_main.obj flstring.obj scandir.obj numericsort.obj vsnprintf.obj
################################################################
!include ../watcom.mif
OBJECTS = $(CPPFILES) $(CFILES)
FLOBJECTS = $(FLCPPFILES)
GLOBJECTS = $(GLCPPFILES)
IMGOBJECTS = $(IMGCPPFILES)
# The four basic fltk libraries are defined in ../watcom.mif, so that appliactions
# can also use them.
all: $(LIBNAME) &
$(LIBNAMEFL) &
$(LIBNAMEGL) &
$(LIBNAMEIMG)
# $(DSONAME) &
# $(FLDSONAME) &
# $(GLDSONAME) &
# $(IMGDSONAME)
$(LIBNAME): $(OBJECTS)
$(LIB) $(LIBOPTS) $@ $<
$(LIBNAMEFL): $(FLOBJECTS)
$(LIB) $(LIBOPTS) $@ $<
$(LIBNAMEGL): $(GLOBJECTS)
$(LIB) $(LIBOPTS) $@ $<
$(LIBNAMEIMG): $(IMGOBJECTS)
$(LIB) $(LIBOPTS) $@ $<
#
# Clean all directories
#
clean : .SYMBOLIC
@echo Cleaning up.
CLEANEXTS = exe map sym obj lk1
@for %a in ($(CLEANEXTS)) do -rm -f $(ODIR)\*.%a
-rm -f *.err
-rm -f $(LIBNAME)
-rm -f $(LIBNAMEFL)
-rm -f $(LIBNAMEGL)
-rm -f $(LIBNAMEIMG)

View File

@ -267,5 +267,5 @@ int main(int argc, char **argv) {
createMenuPage();
win->end();
win->show(argc, argv);
Fl::run();
return Fl::run();
}

284
watcom.mif Normal file
View File

@ -0,0 +1,284 @@
######################################################################
#
# Watcom C specific makefile, multiplatform
#
#
# The following macross must be set active when this file is called
# -D parameter, e.g. -DPROJ=fltk
# ROOT = root of project (e.g. FLTK directory)
# PROJ = project name (e.g. fltk)
#
# The following environment variable must be set. If you have multiple
# Watcom versions, use the setvars file in the Watcom directory to set it.
# WATCOM = root of Watcom C
######################################################################
#
# The following options must be set when calling this wmake file
# (case-sensitive):
# D (debug/release mode): d for debug mode,
# r for release mode
# O (target environment): d = DOS 32 bits
# o = OS/2 32 bits
# w = Windows 32 bit
# l = Linux Intel (experimental, no graphics yet (OW 1.3))
#
#
# If not set, debug mode and target=host (that is, no cross-compiling).
# Example: wmake -h -f makefile.wat d=r o=w
#
# Following macros can be used to add/override existing macros in
# this file.
# EXTRA_INCLUDE_DIRS # Non-Watcom (project) include dirs
# ODIR # Output directory if not default
# ROOT # Project root. If not given, .
# PROJ # Project name.
# LIBS # Extra libs to link in
# LIBDIR # Project library directory. Default: PROJ\LIB
# LIBNAMEROOT # Project rootname of output library. Default: PROJ\Lib\Proj
# EXTRA_LIBS # Target specific include libs
!ifndef D
MODE=d # default is debug mode
!else
! ifeq D d
MODE=d
! else ifeq D r
MODE=r
! else
CONFIG_ERROR_MSG=Unrecognized mode: $(D)
! endif
!endif
# If target is specified, check its validity; if not specified, the target is
# the host platform itself.
!ifdef O
! ifeq O d
TARGET=dos
! else ifeq O o
TARGET=os2
! else ifeq O w
TARGET=nt
! else ifeq O l
TARGET=linux
! else
CONFIG_ERROR_MSG=Unrecognized target: $(O)
! endif
!else
! ifdef __DOS__
TARGET=dos
! else ifdef __OS2__
TARGET=os2
! else ifdef __NT__
TARGET=nt
! else ifdef __LINUX__
TARGET=linux
! endif
!endif
!ifeq TARGET os2
WATCOMTARGET=os2v2
!else
WATCOMTARGET=$(TARGET)
!endif
#
# Very important: specify the sequence of extensions. Wmake will try to make a target
# with an extension from the first file of the same name with an extension to the right.
# E.g. it tries to make hello.obj from hello.cxx, or hello.cpp etc, but never from hello.exe
#
.EXTENSIONS :
.EXTENSIONS : .exe .lib .obj .cxx .cpp .c .h .fl
#
# Create output directory name if not already supplied. To allow
# cross-development, must include target name.
#
!ifndef ODIR
ODIR=$(D)_$(TARGET)
!endif
#
# Contruct the libname from the root plus D and O macros, so that
# multiple LIBS can co-exists, e.g. FLTK_DW and FLTK_RW for Win32.
#
!ifndef LIBDIR
LIBDIR=$(ROOT)\lib\
!endif
!ifndef LIBNAMEROOT
LIBNAMEROOT=$(PROJ)
!endif
!ifndef LIBNAME
LIBNAME = $(LIBDIR)$(LIBNAMEROOT)_$(D)$(O).lib
# FLTK has other 'global' libs. Define the names here so that any application
# using FLTK can use them by just including this mif file.
LIBNAMEFL = $(LIBDIR)$(LIBNAMEROOT)_fl_$(D)$(O).lib
LIBNAMEGL = $(LIBDIR)$(LIBNAMEROOT)_gl_$(D)$(O).lib
LIBNAMEIMG = $(LIBDIR)$(LIBNAMEROOT)_img_$(D)$(O).lib
LIBS = $(LIBNAME) $(LIBNAMEFL) $(LIBNAMEGL) $(LIBNAMEIMG)
!endif
# Set target environment options
!ifeqi TARGET nt # WINDOWS 32 bit
SYSDEF= -DWIN32
ASYSDEF=
EXEEXT=.exe
!else ifeqi TARGET linux # Linux Intel 32 bit generic
SYSDEF=
ASYSDEF=
EXEEXT=
!else ifeqi TARGET os2 # OS/2 32 bit
SYSDEF=
ASYSDEF=
EXEEXT=.exe
!else ifeqi TARGET dos # DOS 32 bit
SYSDEF=
ASYSDEF=
EXEEXT=.exe
!endif
######################################################################
#
# End of compiler- and environment specific options
#
# Note !message will print before any actions ('PRE'processor!), and thus
# will not reflect results of any rules (like set xxx=yyy).
# echo is a rule itself, and will reflect results of preceding rules.
#
######################################################################
.BEFORE :
!ifdef CONFIG_ERROR_MSG
! message
! message Configuration error:
! message $(CONFIG_ERROR_MSG)
! message
%abort
!endif
@if not exist $(ODIR) -mkdir $(ODIR)
!ifeqi O d
@set INCLUDE=$(%WATCOM)\H;$(EXTRA_INCLUDE_DIRS)
!else ifeqi O o
@set INCLUDE=$(%WATCOM)\H;$(%WATCOM)\H\OS2;$(EXTRA_INCLUDE_DIRS)
!else ifeqi O w
@set INCLUDE=$(%WATCOM)\H;$(%WATCOM)\H\NT;$(EXTRA_INCLUDE_DIRS)
!else ifeqi O l
@set INCLUDE=$(%WATCOM)\LH;$(EXTRA_INCLUDE_DIRS)
!endif
@set LIB=$(LIBPATH)
# @echo Top dir: $(PROJ)
# @echo Include dirs: $(%INCLUDE)
# @echo Lib dirs: $(LIBDIRS)
# @echo Libname=$(LIBNAME)
# @echo extra libs: $(LIBS)
# @echo Wmake version $(__VERSION__)
# @echo Wmake parameters: $(__MAKEOPTS__)
# @echo Compiler : $(CC) $(CCOPTS0) $(CCOPTS1) $(CCOPTS2) $(CCOPTS3)
# @echo Librarian: $(LIB)
# @echo Linker : $(LN) $(LNOPTS)
# @echo Project : $(P)
!ifeqi D d
WCADEBUG=-d1 # debug opts for wasm
WCCDEBUG=-d2 -s -ors # debug opts for wcc. NOTE: -we is to make errors of all warnings
WCLDEBUG=d d all # debug opts for wlink
# WCCTIMING=-et # if added to CC command line will generate timing file after execution
!else
#
# WCADEBUG= # debug opts for wasm
WCCDEBUG= -ors -s # release opts for wcc
# WCLDEBUG= # release opts for wlink
!endif
# Conventions Watcom
# Tell default paths based on extension
.fl : .
.h : .
#.lib : .
.c : .
.cpp : .
.cxx : .
.obj : $(ODIR)
.exe : $(ODIR)
#
# Tell wmake to use DLL versions of some commands (much quicker)
#
!loaddll wcc386 wccd386
!loaddll wpp386 wppd386
!loaddll wlink wlink
!loaddll wlib wlibd
!ifeqi O D
LIBPATH=$(%WATCOM)\lib386;$(%WATCOM)\lib386\dos;
SYSLIBS=
!else ifeqi O O
LIBPATH=$(%WATCOM)\lib386;$(%WATCOM)\lib386\os2
SYSLIBS=
!else ifeqi O W
LIBPATH=$(%WATCOM)\lib386;$(%WATCOM)\lib386\nt
SYSLIBS=netapi32.lib wsock32.lib mpr.lib glu32.lib opengl32.lib
!else ifeqi O L
LIBPATH=$(%WATCOM)\lib386;$(%WATCOM)\lib386\linux
SYSLIBS=
!endif
CCOPTS0=-6r -zq
CCOPTS1=$(WCCDEBUG) -bt=$(TARGET) -fp6 -fpi87 # 1st part of Watcom opts
CCOPTS2=-mf -wce=130 -wx -zm -zq # -j # 2nd part of Watcom opts
CCOPTS3=-fo$(ODIR)\$^&.obj # 3rd part Watcom opts
COPTS=-zm
CPPOPTS=-zm -zv -fx
LNOPTS=sys $(WATCOMTARGET) $(WCLDEBUG) op symf,q,m,el,vfr op st=32k ru native libpath $(LIBPATH) # linker options
LIBOPTS= -b -q -p=512 -c # librarian options
LN=wlink # Watcom linker
AS=wasm # Watcom assembler
cc=wcc386 # Watcom C compiler
cpp=wpp386 # Watcom C++ compiler
LIB=wlib # Watcom librarian
#
# Compilation
#
.c.obj: .AUTODEPEND
$(CC) $(SYSDEF) $(DEBUGDEF) $(CCOPTS0) $(CCOPTS1) $(CCOPTS2) $(CCOPTS3) $(COPTS) $[@
.cpp.obj: .AUTODEPEND
$(CPP) $(SYSDEF) $(DEBUGDEF) $(CCOPTS0) $(CCOPTS1) $(CCOPTS2) $(CCOPTS3) $(CPPOPTS) $[@
.cxx.obj: .AUTODEPEND
$(CPP) $(SYSDEF) $(DEBUGDEF) $(CCOPTS0) $(CCOPTS1) $(CCOPTS2) $(CCOPTS3) $(CPPOPTS) $[@
#
# Librarian stage
#
.obj.lib:
$(LIB) $(LIBOPTS) $@ $<
#
# Linking stage. This implicit rule assumes the .exe is created from an object file with the
# same name, plus other object in macro OBJECTS, a number of .libs in macro LIBS etc.
# If the linking fails for some reason, the .lk1 file is not deleted and it can be
# examined.
#
.obj.exe:
@%create $^*.lk1
@%append $^*.lk1 F $(ODIR)/$^&
@for %i in ($(%OBJS)) do @%append $^*.lk1 F $(ODIR)/%i
@for %i in ($(OBJECTS)) do @%append $^*.lk1 F $(ODIR)/%i
@for %i in ($(LIBS)) do @%append $^*.lk1 L %i
@for %i in ($(EXTRA_LIBS)) do @%append $^*.lk1 L %i
@for %i in ($(SYSLIBS)) do @%append $^*.lk1 L %i
$(LN) $(LNOPTS) name $^@ op map=$^* @$^*.lk1
@del $^*.lk1

222
watcom/config.h Normal file
View File

@ -0,0 +1,222 @@
/*
* "$Id: config.h,v 1.1.2.1 2004/11/20 03:19:59 easysw Exp $"
*
* Configuration file for the Fast Light Tool Kit (FLTK) for Watcom C++ 1.3
*
* Copyright 1998-2004 by Bill Spitzak and others.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "fltk-bugs@fltk.org".
*/
/*
* Where to find the documentation files...
*/
#define FLTK_DATADIR "C:/FLTK"
#define FLTK_DOCDIR "C:/FLTK/DOC"
/*
* BORDER_WIDTH:
*
* Thickness of FL_UP_BOX and FL_DOWN_BOX. Current 1,2, and 3 are
* supported. 3 is the historic FLTK look. 2 looks more like Microsoft
* Windows, KDE, and Qt, and is the default when building for Windows.
* 1 is a plausible future evolution... Note that this may be simulated
* at runtime by redefining the boxtypes using Fl::set_boxtype().
*/
#define BORDER_WIDTH 2
/*
* HAVE_GL:
*
* Do you have OpenGL? Set this to 0 if you don't have or plan to use
* OpenGL, and FLTK will be smaller.
*/
#define HAVE_GL 1
/*
* HAVE_GL_GLU_H:
*
* Do you have the OpenGL Utility Library header file?
* (many broken Mesa RPMs do not...)
*/
#define HAVE_GL_GLU_H 1
/*
* USE_COLORMAP:
*
* Setting this to zero will save a good deal of code (especially for
* fl_draw_image), but FLTK will only work on TrueColor visuals.
*/
#define USE_COLORMAP 1
/*
* USE_XFT
*
* Use the new Xft library to draw anti-aliased text.
*/
#define USE_XFT 0
/*
* HAVE_XDBE:
*
* Do we have the X double-buffer extension?
*/
#define HAVE_XDBE 0
/*
* USE_XDBE:
*
* Actually try to use the double-buffer extension? Set this to zero
* disable use of XDBE without breaking the list_visuals program.
*/
#define USE_XDBE HAVE_XDBE
/*
* HAVE_OVERLAY:
*
* Use the X overlay extension? FLTK will try to use an overlay
* visual for Fl_Overlay_Window, the Gl_Window overlay, and for the
* menus. Setting this to zero will remove a substantial amount of
* code from FLTK. Overlays have only been tested on SGI servers!
*/
#define HAVE_OVERLAY 0
/*
* HAVE_GL_OVERLAY:
*
* It is possible your GL has an overlay even if X does not. If so,
* set this to 1.
*/
#define HAVE_GL_OVERLAY 1
/*
* WORDS_BIGENDIAN:
*
* Byte order of your machine: 1 = big-endian, 0 = little-endian.
*/
#define WORDS_BIGENDIAN 0
/*
* U16, U32, U64:
*
* Types used by fl_draw_image. One of U32 or U64 must be defined.
* U16 is optional but FLTK will work better with it!
*/
#define U16 unsigned short
#define U32 unsigned
/* #undef U64 */
/*
* HAVE_DIRENT_H, HAVE_SYS_NDIR_H, HAVE_SYS_DIR_H, HAVE_NDIR_H, HAVE_SCANDIR:
*
* Where is <dirent.h> (used only by fl_file_chooser and scandir).
*/
#define HAVE_DIRENT_H 1
/* #undef HAVE_SYS_NDIR_H */
/* #undef HAVE_SYS_DIR_H */
/* #undef HAVE_NDIR_H */
/* #undef HAVE_SCANDIR */
/*
* Possibly missing sprintf-style functions:
*/
#define HAVE_VSNPRINTF 1
#define HAVE_SNPRINTF 1
/*
* String functions and headers...
*/
/* #undef HAVE_STRINGS_H */
#define HAVE_STRCASECMP 1
/* #undef HAVE_STRLCAT */
/* #undef HAVE_STRLCPY */
/*
* HAVE_SYS_SELECT_H:
*
* Whether or not select() call has its own header file.
*/
/* #undef HAVE_SYS_SELECT_H */
/*
* HAVE_SYS_STDTYPES_H:
*
* Whether or not we have the <sys/stdtypes.h> header file.
*/
/* #undef HAVE_SYS_STDTYPES_H */
/*
* HAVE_POLL:
*
* Use poll() if we don't have select().
*/
#define HAVE_POLL 0
/*
* Do we have various image libraries?
*/
/* #undef HAVE_LIBPNG */
/* #undef HAVE_LIBZ */
/* #undef HAVE_LIBJPEG */
/*
* Which header file do we include for libpng?
*/
/* #undef HAVE_PNG_H */
/* #undef HAVE_LIBPNG_PNG_H */
/*
* Do we have the png_xyz() functions?
*/
/* #undef HAVE_PNG_GET_VALID */
/* #undef HAVE_PNG_SET_TRNS_TO_ALPHA */
/* #undef HAVE_PNG_READ_DESTROY */
/*
* Do we have POSIX threading?
*/
/* #undef HAVE_PTHREAD */
/* #undef HAVE_PTHREAD_H */
/*
* End of "$Id: config.h,v 1.1.2.1 2004/11/20 03:19:59 easysw Exp $".
*/

103
watcom/makefile Normal file
View File

@ -0,0 +1,103 @@
#
# Name : Watcom makefile for FLTK, multiplatform
#
# Author : M. Nieuwenhoven
#
# The makefile has multiple targets:
# - clean : Cleans all directories from files built during make
# - all : Builds all targets for both debug and release
# - xy : where x = D|R, Y = D|O|W|L, where only W (Win32) is
# currently supported by the source for Watcom.
#
!ifndef %FLTK
ERROR_MSG = Environment variable FLTK must have been set!
!endif
.BEFORE
!ifdef ERROR_MSG
@echo .
@echo $(ERROR_MSG)
@echo .
@%abort
!endif
ROOT=$(%FLTK)
PROJ=fltk
#
# This builds all library targets and the main programs
#
ALL : .SYMBOLIC
set Clean=
wmake -h dw
wmake -h rw
# wmake -h do
# wmake -h ro
# wmake -h dl
# wmake -h rl
#
# Clean all directories. Call each target with a 'clean' target. Proper
# knowledge about cleaning can only be at the places where also the
# builds is done.
#
clean : .SYMBOLIC
@echo Cleaning up.
set Clean=CLEAN
wmake -h dw
wmake -h rw
# wmake -h do
# wmake -h ro
# wmake -h dl
# wmake -h rl
#
# Win32 Debug and Release targets
#
DW : .SYMBOLIC
@set OPTIONS=D=d O=w ROOT=$(ROOT) PROJ=$(PROJ) EXTRA_INCLUDE_DIRS=$(ROOT)
%make BuildOne
RW : .SYMBOLIC
@set OPTIONS=D=r O=w ROOT=$(ROOT) PROJ=$(PROJ) EXTRA_INCLUDE_DIRS=$(ROOT)
%make BuildOne
#
# OS/2 Debug and Release targets. Builds only jpeg, zlib and png libs for now.
#
DO : .SYMBOLIC
@set OPTIONS=D=d O=o ROOT=$(ROOT) PROJ=$(PROJ) EXTRA_INCLUDE_DIRS=$(ROOT)
%make BuildOne
RO : .SYMBOLIC
@set OPTIONS=D=r O=o ROOT=$(ROOT) PROJ=$(PROJ) EXTRA_INCLUDE_DIRS=$(ROOT)
%make BuildOne
# Internal target to build the individual modules. The following macros must
# have been set: D (value D or R), O (D,O,W,L)
BuildOne : .SYMBOLIC
@echo "=== making jpeg library ==="
@cd $(ROOT)\jpeg
@wmake -h -f makefile.wat $(%OPTIONS) $(%CLEAN)
@echo "=== making zlib library ==="
@cd $(ROOT)\zlib
@wmake -h -f makefile.wat $(%OPTIONS) $(%CLEAN)
@echo "=== making png library ==="
@cd $(ROOT)\png
@wmake -h -f makefile.wat $(%OPTIONS) $(%CLEAN)
@echo "=== making fltk libraries ==="
@cd $(ROOT)\src
@wmake -h -f makefile.wat $(%OPTIONS) $(%CLEAN)
@echo "=== making fluid ==="
@cd $(ROOT)\fluid
@wmake -h -f makefile.wat $(%OPTIONS) $(%CLEAN)
@echo "=== making test ==="
@cd $(ROOT)\test
@wmake -h -f makefile.wat $(%OPTIONS) $(%CLEAN)

26
watcom/readme.wat Normal file
View File

@ -0,0 +1,26 @@
Using Watcom to build and use FLTK 1.1.5
Supported targets: Win32 only, static builds (no DLLs). Can be used from any Watcom
supported host (DOS, OS/2, Windows).
1. Unzip the include file in the root of the fltk 1.1.5 directory. It will create a
new directory called watcom, put a makefile.wat in source directories, and update
two sources files which need to be different from the 1.1.5 versions (STR updated),
and put a watcom.mif file in the fltk root directory.
2. To build: set the environment variable fltk to the root directory of fltk, go
to the Watcom directory, run wmake. Both debug and release versions of all libs,
test programs and FLUID will be built.
3. To create you own programs: use the supplied watcom.mif file. If you use fluid,
move the two fluid rules from test/makefile.wat into the watcom.mif
file. Look in test/makefile.wat also for rules about building a non-fluid program
with one object (source) file, or with multiple. if you use FLUID, take care in
the order of object files specified (see tes/makefile.wat keyboard.exe).
Questions about the watcom port please to the fltk.general newsgroup.
Mat Nieuwenhoven, Hilversum, 2004-10-28

60
zlib/makefile.wat Normal file
View File

@ -0,0 +1,60 @@
#
# "$Id: makefile.wat,v 1.1.2.1 2004/11/20 03:19:59 easysw Exp $"
#
# GNU ZIP library makefile for the Fast Light Toolkit (FLTK).
#
# Copyright 1997-2004 by Easy Software Products.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
#
# Please report all bugs and problems to "fltk-bugs@fltk.org".
#
LIBNAMEROOT=ftlk_z
!include ../watcom.mif
#
# Object files...
#
LIBOBJS = adler32.obj compress.obj crc32.obj gzio.obj uncompr.obj deflate.obj &
trees.obj zutil.obj inflate.obj inftrees.obj inffast.obj
#
# Make all targets...
#
all: $(LIBNAME)
$(LIBNAME): $(LIBOBJS)
$(LIB) $(LIBOPTS) $@ $<
#
# Clean all directories
#
clean : .SYMBOLIC
@echo Cleaning up.
CLEANEXTS = obj
@for %a in ($(CLEANEXTS)) do -rm -f $(ODIR)\*.%a
-rm -f *.err
-rm -f $(LIBNAME)
#
# End of "$Id: makefile.wat,v 1.1.2.1 2004/11/20 03:19:59 easysw Exp $".
#