Commit fe1cc678 authored by Tor Lillqvist's avatar Tor Lillqvist
Browse files

app/makefile.cygwin app/makefile.msc plug-ins/makefile.cygwin

	* app/makefile.cygwin
	* app/makefile.msc
	* plug-ins/makefile.cygwin
	* plug-ins/makefile.msc
	* modules/makefile.cygwin
	* modules/makefile.msc
	* tools/gcg/makefile.cygwin: Various updates. GCC-compiled DLL
	name change.

	* app/context_manager.c: Include paint_options.h for prototype.

	* app/gimpimage.c (gimp_image_initialize_projection): Break out of
 	loop as soon as possible.

	* app/menus.c (menus_last_opened_cmd_callback): Check if referring
 	to entry not in list.

	* app/module_db.c (valid_module_name): (Win32) Require module DLL
 	names to include name of compiler built with.

	* app/paths_dialog.c (paths_draw_segment_points): No use to draw
 	lines if we have less that two points.

	* app/qmask.c: Include stdio.h and floating_sel.h.

	* libgimp/makefile.cygwin: New file.

	* libgimp/Makefile.am:  Distribute above file.

	* libgimp/gimp.def: Update.

	* libgimp/gimpenv.c (gimp_directory): Don't warn about missing
 	home directory on Win32, it is perfectly natural.

	* plug-ins/sel2path/global.h: Bypass unused declarations, some
	of which clash with functions in MSVCRT.

	* plug-ins/sel2path/math.c
	* modules/colorsel_water.c: Define M_PI if necessary.

	* plug-ins/sel2path/sel2path.c: Include config.h and
 	glib.h. Define rint() if needed.

	* plug-ins/sel2path/vector.c: Include glib.h (for hypot() renaming
 	on Win32; In the MS C runtime, as hypot() is non-ANSI, it's called
 	_hypot(), sigh).

	* plug-ins/sinus/sinus_logo.h: Use indexed format, it is easier on
 	some compilers than the huge string.
parent 061dc89d
1999-07-14 Tor Lillqvist <tml@iki.fi>
* app/makefile.cygwin
* app/makefile.msc
* plug-ins/makefile.cygwin
* plug-ins/makefile.msc
* modules/makefile.cygwin
* modules/makefile.msc
* tools/gcg/makefile.cygwin: Various updates. GCC-compiled DLL
name change.
* app/context_manager.c: Include paint_options.h for prototype.
* app/gimpimage.c (gimp_image_initialize_projection): Break out of
loop as soon as possible.
* app/menus.c (menus_last_opened_cmd_callback): Check if referring
to entry not in list.
* app/module_db.c (valid_module_name): (Win32) Require module DLL
names to include name of compiler built with.
* app/paths_dialog.c (paths_draw_segment_points): No use to draw
lines if we have less that two points.
* app/qmask.c: Include stdio.h and floating_sel.h.
* libgimp/makefile.cygwin: New file.
* libgimp/Makefile.am: Distribute above file.
* libgimp/gimp.def: Update.
* libgimp/gimpenv.c (gimp_directory): Don't warn about missing
home directory on Win32, it is perfectly natural.
* plug-ins/sel2path/global.h: Bypass unused declarations, some
of which clash with functions in MSVCRT.
* plug-ins/sel2path/math.c
* modules/colorsel_water.c: Define M_PI if necessary.
* plug-ins/sel2path/sel2path.c: Include config.h and
glib.h. Define rint() if needed.
* plug-ins/sel2path/vector.c: Include glib.h (for hypot() renaming
on Win32; In the MS C runtime, as hypot() is non-ANSI, it's called
_hypot(), sigh).
* plug-ins/sinus/sinus_logo.h: Use indexed format, it is easier on
some compilers than the huge string.
Wed Jul 14 11:42:49 MEST 1999 Sven Neumann <sven@gimp.org>
* app/ink.c: we were leaking a blob at each button_press
......@@ -289,9 +341,6 @@ Mon Jul 5 20:39:42 BST 1999 Austin Donnelly <austin@gimp.org>
1999-07-04 Tor Lillqvist <tml@iki.fi>
* libgimp/gimpenv.c (gimp_directory): Don't warn about missing
home directory on Win32, it is perfectly natural.
* app/color_notebook.c
* libgimp/color_selector.h: Bypass the declaration of the exported
functions in the header. (Caused different linkage error with MSC,
......
......@@ -18,10 +18,12 @@
#include <glib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "appenv.h"
#include "channel.h"
#include "floating_sel.h"
#include "gdisplayF.h"
#include "gimpcontext.h"
#include "gimage_mask.h"
......
......@@ -18,10 +18,12 @@
#include <glib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "appenv.h"
#include "channel.h"
#include "floating_sel.h"
#include "gdisplayF.h"
#include "gimpcontext.h"
#include "gimage_mask.h"
......
......@@ -21,6 +21,7 @@
#include "appenv.h"
#include "gdisplay.h"
#include "gimprc.h"
#include "paint_options.h"
#include "tools.h"
static GimpContext * global_user_context;
......
......@@ -1464,7 +1464,10 @@ gimp_image_initialize_projection (GimpImage *gimage,
(off_y <= y) &&
(off_x + drawable_width (GIMP_DRAWABLE(layer)) >= x + w) &&
(off_y + drawable_height (GIMP_DRAWABLE(layer)) >= y + h))
coverage = 1;
{
coverage = 1;
break;
}
list = g_slist_next (list);
}
......
......@@ -1464,7 +1464,10 @@ gimp_image_initialize_projection (GimpImage *gimage,
(off_y <= y) &&
(off_x + drawable_width (GIMP_DRAWABLE(layer)) >= x + w) &&
(off_y + drawable_height (GIMP_DRAWABLE(layer)) >= y + h))
coverage = 1;
{
coverage = 1;
break;
}
list = g_slist_next (list);
}
......
......@@ -1464,7 +1464,10 @@ gimp_image_initialize_projection (GimpImage *gimage,
(off_y <= y) &&
(off_x + drawable_width (GIMP_DRAWABLE(layer)) >= x + w) &&
(off_y + drawable_height (GIMP_DRAWABLE(layer)) >= y + h))
coverage = 1;
{
coverage = 1;
break;
}
list = g_slist_next (list);
}
......
......@@ -18,10 +18,12 @@
#include <glib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "appenv.h"
#include "channel.h"
#include "floating_sel.h"
#include "gdisplayF.h"
#include "gimpcontext.h"
#include "gimage_mask.h"
......
......@@ -18,10 +18,12 @@
#include <glib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "appenv.h"
#include "channel.h"
#include "floating_sel.h"
#include "gdisplayF.h"
#include "gimpcontext.h"
#include "gimage_mask.h"
......
......@@ -1464,7 +1464,10 @@ gimp_image_initialize_projection (GimpImage *gimage,
(off_y <= y) &&
(off_x + drawable_width (GIMP_DRAWABLE(layer)) >= x + w) &&
(off_y + drawable_height (GIMP_DRAWABLE(layer)) >= y + h))
coverage = 1;
{
coverage = 1;
break;
}
list = g_slist_next (list);
}
......
......@@ -1464,7 +1464,10 @@ gimp_image_initialize_projection (GimpImage *gimage,
(off_y <= y) &&
(off_x + drawable_width (GIMP_DRAWABLE(layer)) >= x + w) &&
(off_y + drawable_height (GIMP_DRAWABLE(layer)) >= y + h))
coverage = 1;
{
coverage = 1;
break;
}
list = g_slist_next (list);
}
......
......@@ -1464,7 +1464,10 @@ gimp_image_initialize_projection (GimpImage *gimage,
(off_y <= y) &&
(off_x + drawable_width (GIMP_DRAWABLE(layer)) >= x + w) &&
(off_y + drawable_height (GIMP_DRAWABLE(layer)) >= y + h))
coverage = 1;
{
coverage = 1;
break;
}
list = g_slist_next (list);
}
......
......@@ -1464,7 +1464,10 @@ gimp_image_initialize_projection (GimpImage *gimage,
(off_y <= y) &&
(off_x + drawable_width (GIMP_DRAWABLE(layer)) >= x + w) &&
(off_y + drawable_height (GIMP_DRAWABLE(layer)) >= y + h))
coverage = 1;
{
coverage = 1;
break;
}
list = g_slist_next (list);
}
......
......@@ -470,11 +470,23 @@ valid_module_name (const char *filename)
if (strcmp (basename + len - 3, ".so"))
return FALSE;
#elif defined (__GNUC__)
/* When compiled with gcc on Win32, require modules to be compiled with
* gcc, too. Use the convention that gcc-compiled GIMP modules are named
* *.gcc.dll. Subject to change.
*/
if (len < 1 + 8)
return FALSE;
if (g_strcasecmp (basename + len - 8, ".gcc.dll"))
return FALSE;
#else
if (len < 1 + 4)
/* When compiled with MSVC, the modules should be called *.msvc.dll.
*/
if (len < 1 + 9)
return FALSE;
if (g_strcasecmp (basename + len - 4, ".dll"))
if (g_strcasecmp (basename + len - 9, ".msvc.dll"))
return FALSE;
#endif
......
......@@ -18,10 +18,12 @@
#include <glib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "appenv.h"
#include "channel.h"
#include "floating_sel.h"
#include "gdisplayF.h"
#include "gimpcontext.h"
#include "gimage_mask.h"
......
......@@ -1464,7 +1464,10 @@ gimp_image_initialize_projection (GimpImage *gimage,
(off_y <= y) &&
(off_x + drawable_width (GIMP_DRAWABLE(layer)) >= x + w) &&
(off_y + drawable_height (GIMP_DRAWABLE(layer)) >= y + h))
coverage = 1;
{
coverage = 1;
break;
}
list = g_slist_next (list);
}
......
......@@ -583,6 +583,11 @@ menus_last_opened_cmd_callback (GtkWidget *widget,
guint num)
{
gchar *filename, *raw_filename;
guint num_entries;
num_entries = g_slist_length (last_opened_raw_filenames);
if (num >= num_entries)
return;
raw_filename = ((GString *) g_slist_nth_data (last_opened_raw_filenames, num))->str;
filename = g_basename (raw_filename);
......
......@@ -470,11 +470,23 @@ valid_module_name (const char *filename)
if (strcmp (basename + len - 3, ".so"))
return FALSE;
#elif defined (__GNUC__)
/* When compiled with gcc on Win32, require modules to be compiled with
* gcc, too. Use the convention that gcc-compiled GIMP modules are named
* *.gcc.dll. Subject to change.
*/
if (len < 1 + 8)
return FALSE;
if (g_strcasecmp (basename + len - 8, ".gcc.dll"))
return FALSE;
#else
if (len < 1 + 4)
/* When compiled with MSVC, the modules should be called *.msvc.dll.
*/
if (len < 1 + 9)
return FALSE;
if (g_strcasecmp (basename + len - 4, ".dll"))
if (g_strcasecmp (basename + len - 9, ".msvc.dll"))
return FALSE;
#endif
......
......@@ -1884,7 +1884,7 @@ paths_draw_segment_points(BezierSelect *bezier_sel,
pwidget = (PATHWIDGETP)gtk_clist_get_row_data(GTK_CLIST(paths_dialog->paths_list),row);
if(pcount == 0)
if(pcount < 2)
return;
g_return_if_fail(pwidget != NULL);
......
......@@ -18,10 +18,12 @@
#include <glib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "appenv.h"
#include "channel.h"
#include "floating_sel.h"
#include "gdisplayF.h"
#include "gimpcontext.h"
#include "gimage_mask.h"
......
......@@ -203,6 +203,7 @@ gimp_OBJECTS = \
preferences_dialog.o \
procedural_db.o \
procedural_db_cmds.o \
qmask.o \
rect_select.o \
regex.o \
resize.o \
......@@ -244,11 +245,11 @@ gimpres.o : gimp.rc wilber.ico
gimp.exe : ../config.h $(gimp_OBJECTS) libgimpim.a gimp.def gimpres.o
# This is sickening.
$(CC) $(CFLAGS) -Wl,--base-file,gimp.base -mwindows -o gimp.exe $(gimp_OBJECTS) -L . -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER) -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32
$(CC) $(CFLAGS) -Wl,--base-file,gimp.base -mwindows -o gimp.exe $(gimp_OBJECTS) -L . -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER).gcc -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER).gcc -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER).gcc -lgmodule-$(GLIB_VER).gcc gimpres.o -lgdi32 -luser32
$(DLLTOOL) --base-file gimp.base --input-def gimp.def --output-exp gimp.exp
$(CC) $(CFLAGS) -Wl,--base-file,gimp.base,gimp.exp -mwindows -o gimp.exe $(gimp_OBJECTS) -L . -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER) -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32
$(CC) $(CFLAGS) -Wl,--base-file,gimp.base,gimp.exp -mwindows -o gimp.exe $(gimp_OBJECTS) -L . -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER).gcc -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER).gcc -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER).gcc -lgmodule-$(GLIB_VER).gcc gimpres.o -lgdi32 -luser32
$(DLLTOOL) --base-file gimp.base --input-def gimp.def --output-exp gimp.exp
$(CC) $(CFLAGS) -Wl,gimp.exp -mwindows -o gimp.exe $(gimp_OBJECTS) -L. -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER) -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32
$(CC) -v $(CFLAGS) -Wl,gimp.exp -mwindows -o gimp.exe $(gimp_OBJECTS) -L. -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER).gcc -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER).gcc -L $(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER).gcc -lgmodule-$(GLIB_VER).gcc gimpres.o -lgdi32 -luser32
$(DLLTOOL) --dllname gimp.exe gimp.def --output-lib libgimp.a $(gimp_OBJECTS)
# General rule for building $(gimp_OBJECTS)
......
......@@ -4,6 +4,10 @@
# Change this to wherever you want to install gimp.exe.
BIN = C:\gimp\bin
################################################################
# Nothing much configurable below
!IFNDEF DEBUG
# Full optimization:
OPTIMIZE = -Ox -MD
......@@ -14,10 +18,6 @@ OPTIMIZE = -Zi -MDd
LINKDEBUG = /subsystem:console /debug
!ENDIF
################################################################
# Nothing much configurable below
# cl -? describes the options
CC = cl -GA -G5 -GF $(OPTIMIZE) -W3 -nologo
......@@ -214,6 +214,7 @@ gimp_OBJECTS = \
preferences_dialog.obj \
procedural_db.obj \
procedural_db_cmds.obj \
qmask.obj \
rect_select.obj \
regex.obj \
resize.obj \
......
......@@ -583,6 +583,11 @@ menus_last_opened_cmd_callback (GtkWidget *widget,
guint num)
{
gchar *filename, *raw_filename;
guint num_entries;
num_entries = g_slist_length (last_opened_raw_filenames);
if (num >= num_entries)
return;
raw_filename = ((GString *) g_slist_nth_data (last_opened_raw_filenames, num))->str;
filename = g_basename (raw_filename);
......
......@@ -583,6 +583,11 @@ menus_last_opened_cmd_callback (GtkWidget *widget,
guint num)
{
gchar *filename, *raw_filename;
guint num_entries;
num_entries = g_slist_length (last_opened_raw_filenames);
if (num >= num_entries)
return;
raw_filename = ((GString *) g_slist_nth_data (last_opened_raw_filenames, num))->str;
filename = g_basename (raw_filename);
......
......@@ -470,11 +470,23 @@ valid_module_name (const char *filename)
if (strcmp (basename + len - 3, ".so"))
return FALSE;
#elif defined (__GNUC__)
/* When compiled with gcc on Win32, require modules to be compiled with
* gcc, too. Use the convention that gcc-compiled GIMP modules are named
* *.gcc.dll. Subject to change.
*/
if (len < 1 + 8)
return FALSE;
if (g_strcasecmp (basename + len - 8, ".gcc.dll"))
return FALSE;
#else
if (len < 1 + 4)
/* When compiled with MSVC, the modules should be called *.msvc.dll.
*/
if (len < 1 + 9)
return FALSE;
if (g_strcasecmp (basename + len - 4, ".dll"))
if (g_strcasecmp (basename + len - 9, ".msvc.dll"))
return FALSE;
#endif
......
......@@ -1884,7 +1884,7 @@ paths_draw_segment_points(BezierSelect *bezier_sel,
pwidget = (PATHWIDGETP)gtk_clist_get_row_data(GTK_CLIST(paths_dialog->paths_list),row);
if(pcount == 0)
if(pcount < 2)
return;
g_return_if_fail(pwidget != NULL);
......
......@@ -18,10 +18,12 @@
#include <glib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "appenv.h"
#include "channel.h"
#include "floating_sel.h"
#include "gdisplayF.h"
#include "gimpcontext.h"
#include "gimage_mask.h"
......
......@@ -583,6 +583,11 @@ menus_last_opened_cmd_callback (GtkWidget *widget,
guint num)
{
gchar *filename, *raw_filename;
guint num_entries;
num_entries = g_slist_length (last_opened_raw_filenames);
if (num >= num_entries)
return;
raw_filename = ((GString *) g_slist_nth_data (last_opened_raw_filenames, num))->str;
filename = g_basename (raw_filename);
......
......@@ -17,6 +17,7 @@ INCLUDES = \
EXTRA_DIST = \
gimpfeatures.h.in \
makefile.msc \
makefile.cygwin \
gimp.def \
gimpui.def \
gimpfeatures.h.win32
......
EXPORTS
g_free_serial_description
g_deserialize
g_free_serial_description
g_new_serial_description
g_new_serial_item
g_serialize
......@@ -24,8 +24,8 @@ EXPORTS
gimp_channel_width
gimp_color_cube
gimp_data_directory
gimp_destroy_params
gimp_destroy_paramdefs
gimp_destroy_params
gimp_directory
gimp_display_delete
gimp_display_new
......@@ -86,8 +86,8 @@ EXPORTS
gimp_image_detach_parasite
gimp_image_disable_undo
gimp_image_enable_undo
gimp_image_find_parasite
gimp_image_find_next_guide
gimp_image_find_parasite
gimp_image_flatten
gimp_image_floating_selection
gimp_image_get_active_channel
......@@ -100,8 +100,8 @@ EXPORTS
gimp_image_get_guide_orientation
gimp_image_get_guide_position
gimp_image_get_layers
gimp_image_get_selection
gimp_image_get_resolution
gimp_image_get_selection
gimp_image_get_unit
gimp_image_height
gimp_image_lower_channel
......@@ -162,17 +162,20 @@ EXPORTS
gimp_layer_width
gimp_main
gimp_major_version
gimp_matrix_determinant
gimp_matrix_duplicate
gimp_matrix_transform_point
gimp_matrix_mult
gimp_matrix_identity
gimp_matrix_translate
gimp_matrix_scale
gimp_matrix_invert
gimp_matrix_is_diagonal
gimp_matrix_is_identity
gimp_matrix_is_simple
gimp_matrix_mult
gimp_matrix_rotate
gimp_matrix_scale
gimp_matrix_transform_point
gimp_matrix_translate
gimp_matrix_xshear
gimp_matrix_yshear
gimp_matrix_determinant
gimp_matrix_invert
gimp_message
gimp_micro_version
gimp_minor_version
......@@ -221,8 +224,8 @@ EXPORTS
gimp_unit_get_digits
gimp_unit_get_factor
gimp_unit_get_identifier
gimp_unit_get_number_of_units
gimp_unit_get_number_of_built_in_units
gimp_unit_get_number_of_units
gimp_unit_get_plural
gimp_unit_get_singular
gimp_unit_get_symbol
......
......@@ -78,7 +78,9 @@ gimp_directory ()
}
else
{
#ifndef NATIVE_WIN32
g_message (_("warning: no home directory."));
#endif
gimp_dir = g_strconcat (gimp_data_directory (),
G_DIR_SEPARATOR_S,
GIMPDIR,
......
## Makefile for building the GIMP DLLs and LIBs with gcc -mno-cygwin.
## Use: make -f makefile.cygwin
# Change this to wherever you want to install the DLLs. This directory
# should be in your PATH. As these DLLs are for the GIMP and its plug-ins
# only, it probably is best to keep them in the GIMP's bin directory.
BIN = /gimp/bin
# The name of the directory in your %HOME% where the GIMP's personal settings
# and stuff is saved.
GIMPDIR = _gimp$(GIMP_VER)
OPTIMIZE = -g -O
################################################################
# Nothing much configurable below
CC = gcc -mno-cygwin -mpentium
CP = cp
LD = ld
DLLTOOL = dlltool
INSTALL = install
GTK_VER = 1.3
GLIB_VER = 1.3
GIMP_VER = 1.1
GTK = ../../gtk+
GLIB = ../../glib
GETTEXT = ../../gettext-0.10.35
GIMP_VER = 1.1
CFLAGS = $(OPTIMIZE) -I.. -I$(GLIB) -I$(GTK)/gdk/win32 -I$(GTK) -I$(GETTEXT)/intl -DGIMPDIR=\"$(GIMPDIR)\"
all : \
../config.h \
gimpfeatures.h \
libgimpi.a \
gimp-$(GIMP_VER).gcc.dll \
gimpui-$(GIMP_VER).gcc.dll
../config.h : ../config.h.win32
cp ../config.h.win32 ../config.h