removed uesless g_malloc() wrapper.

2005-07-04  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/psd_save.c: removed uesless g_malloc() wrapper.
This commit is contained in:
Sven Neumann 2005-07-04 14:21:08 +00:00 committed by Sven Neumann
parent 6d9aa3e80f
commit ff205ad855
2 changed files with 11 additions and 33 deletions

View File

@ -1,3 +1,7 @@
2005-07-04 Sven Neumann <sven@gimp.org>
* plug-ins/common/psd_save.c: removed uesless g_malloc() wrapper.
2005-07-04 Sven Neumann <sven@gimp.org>
* configure.in

View File

@ -129,7 +129,6 @@ static void run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals);
static void * xmalloc (size_t n);
static void psd_lmode_layer (gint32 idLayer, gchar* psdMode);
static void reshuffle_cmap_write (guchar *mapGimp);
static void save_header (FILE *fd, gint32 image_id);
@ -159,7 +158,6 @@ GimpPlugInInfo PLUG_IN_INFO =
run, /* run_proc */
};
static const gchar *prog_name = "PSD";
MAIN()
@ -257,28 +255,6 @@ run (const gchar *name,
}
}
static void *
xmalloc (size_t n)
{
void *p;
if (n == 0)
{
IFDBG printf ("PSD: WARNING: %s: xmalloc asked for zero-sized chunk\n", prog_name);
return (NULL);
}
if ((p = g_malloc (n)) != NULL)
return p;
IFDBG printf ("%s: out of memory\n", prog_name);
gimp_quit ();
return NULL;
}
static void
psd_lmode_layer (gint32 idLayer, gchar *psdMode)
{
@ -320,8 +296,6 @@ psd_lmode_layer (gint32 idLayer, gchar *psdMode)
case GIMP_OVERLAY_MODE: /* ? */
strcpy (psdMode, "over");
break;
/* case GIMP_BEHIND_MODE: These are from GIMP 1.1.14*/
/* case GIMP_DIVIDE_MODE: These are from GIMP 1.1.14*/
case GIMP_ADDITION_MODE:
case GIMP_SUBTRACT_MODE:
IFDBG printf ("PSD: Warning - unsupported layer-blend mode: %c, using 'norm' mode\n",
@ -558,7 +532,7 @@ reshuffle_cmap_write (guchar *mapGimp)
guchar *mapPSD;
gint i;
mapPSD = xmalloc (768);
mapPSD = g_malloc (768);
for (i = 0; i < 256; i++)
{
@ -631,7 +605,7 @@ save_color_mode_data (FILE *fd, gint32 image_id)
write_glong (fd, 768, "color data length");
/* For this type, length is always 768 */
cmap_modified = xmalloc (768);
cmap_modified = g_malloc (768);
for (i = 0; i < nColors * 3; i++)
cmap_modified[i] = cmap[i];