app/core/gimpbrush-header.h Replace guint by guint32 just in case we're on
2003-07-10 Dave Neary <bolsh@gimp.org> * app/core/gimpbrush-header.h * app/core/gimppattern-header.h: Replace guint by guint32 just in case we're on a platform with 16 bit ints. * app/core/gimppattern.c: Uncomment a check for colourdepth of the pattern. There are no other values possible outside the range 1-4, but it serves as a sanity check in case people do odd things. * configure.in: Add a --enable-profile configure flag to allow profiling support. Adds -pg to the CFLAGS.
This commit is contained in:
@ -28,13 +28,13 @@ typedef struct _BrushHeader BrushHeader;
|
||||
|
||||
struct _BrushHeader
|
||||
{
|
||||
guint header_size; /* header_size = sizeof (BrushHeader) + brush name */
|
||||
guint version; /* brush file version # */
|
||||
guint width; /* width of brush */
|
||||
guint height; /* height of brush */
|
||||
guint bytes; /* depth of brush in bytes--always 1 */
|
||||
guint magic_number; /* GIMP brush magic number */
|
||||
guint spacing; /* brush spacing */
|
||||
guint32 header_size; /* header_size = sizeof (BrushHeader) + brush name */
|
||||
guint32 version; /* brush file version # */
|
||||
guint32 width; /* width of brush */
|
||||
guint32 height; /* height of brush */
|
||||
guint32 bytes; /* depth of brush in bytes--always 1 */
|
||||
guint32 magic_number; /* GIMP brush magic number */
|
||||
guint32 spacing; /* brush spacing */
|
||||
};
|
||||
|
||||
/* In a brush file, next comes the brush name, null-terminated. After that
|
||||
|
@ -28,12 +28,12 @@ typedef struct _PatternHeader PatternHeader;
|
||||
|
||||
struct _PatternHeader
|
||||
{
|
||||
guint header_size; /* header_size = sizeof(PatternHeader) + pattern name */
|
||||
guint version; /* pattern file version # */
|
||||
guint width; /* width of pattern */
|
||||
guint height; /* height of pattern */
|
||||
guint bytes; /* depth of pattern in bytes */
|
||||
guint magic_number; /* GIMP pattern magic number */
|
||||
guint32 header_size; /* header_size = sizeof(PatternHeader) + pattern name */
|
||||
guint32 version; /* pattern file version # */
|
||||
guint32 width; /* width of pattern */
|
||||
guint32 height; /* height of pattern */
|
||||
guint32 bytes; /* depth of pattern in bytes */
|
||||
guint32 magic_number; /* GIMP pattern magic number */
|
||||
};
|
||||
|
||||
/* In a pattern file, next comes the pattern name, null-terminated. After that
|
||||
|
@ -374,8 +374,7 @@ gimp_pattern_load (const gchar *filename,
|
||||
}
|
||||
|
||||
/* Check for supported bit depths */
|
||||
/*
|
||||
if (header.bytes != 1 && header.bytes != 3)
|
||||
if (header.bytes <1 || header.bytes > 3)
|
||||
{
|
||||
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
|
||||
_("Unsupported pattern depth %d\n"
|
||||
@ -384,7 +383,6 @@ gimp_pattern_load (const gchar *filename,
|
||||
header.bytes, filename);
|
||||
goto error;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Read in the pattern name */
|
||||
if ((bn_size = (header.header_size - sizeof (header))))
|
||||
|
@ -374,8 +374,7 @@ gimp_pattern_load (const gchar *filename,
|
||||
}
|
||||
|
||||
/* Check for supported bit depths */
|
||||
/*
|
||||
if (header.bytes != 1 && header.bytes != 3)
|
||||
if (header.bytes <1 || header.bytes > 3)
|
||||
{
|
||||
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
|
||||
_("Unsupported pattern depth %d\n"
|
||||
@ -384,7 +383,6 @@ gimp_pattern_load (const gchar *filename,
|
||||
header.bytes, filename);
|
||||
goto error;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Read in the pattern name */
|
||||
if ((bn_size = (header.header_size - sizeof (header))))
|
||||
|
18
configure.in
18
configure.in
@ -171,6 +171,7 @@ AC_PROG_CPP
|
||||
dnl Large file support for the swap file
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
AC_MSG_CHECKING([whether to turn on debugging])
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug turn on debugging (default=no)],
|
||||
if eval "test x$enable_debug = xyes"; then
|
||||
@ -178,7 +179,24 @@ AC_ARG_ENABLE(debug,
|
||||
fi)
|
||||
|
||||
if test -n "$DEBUGFLAG"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
CFLAGS="$DEBUGFLAG $CFLAGS"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to turn on profiling])
|
||||
AC_ARG_ENABLE(profile,
|
||||
[ --enable-profile turn on profiling (default=no)],
|
||||
if eval "test x$enable_profile = xyes"; then
|
||||
PROFFLAG="-pg"
|
||||
fi)
|
||||
|
||||
if test -n "$PROFFLAG"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
CFLAGS="$PROFFLAG $CFLAGS"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(ansi,
|
||||
|
Reference in New Issue
Block a user