mirror of https://github.com/GNOME/gimp.git
more g_message changes
* more g_message changes * CEL plugin update * INSTALL: info on why plugins don't get built -Yosh
This commit is contained in:
parent
9bb6ea8994
commit
6ddbb705a3
|
@ -1,3 +1,12 @@
|
||||||
|
Fri May 29 23:54:42 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* more changes to use g_message. All of app uses it now, plus
|
||||||
|
the major file plugins.
|
||||||
|
|
||||||
|
* plug-ins/CEL/CEL.c: update from author
|
||||||
|
|
||||||
|
* INSTALL: info about why optional plugins won't build
|
||||||
|
|
||||||
Sat May 30 02:03:19 EDT 1998 Matthew Wilson <msw@gimp.org>
|
Sat May 30 02:03:19 EDT 1998 Matthew Wilson <msw@gimp.org>
|
||||||
|
|
||||||
* plug-ins/grid/grid.c: fix by sjburges to fix grid on selections.
|
* plug-ins/grid/grid.c: fix by sjburges to fix grid on selections.
|
||||||
|
|
27
INSTALL
27
INSTALL
|
@ -115,6 +115,33 @@ After fixing a problem, it is safest to delete the file 'config.cache'
|
||||||
before re-running ./configure.
|
before re-running ./configure.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
When ./configure fails on plug-ins
|
||||||
|
==================================
|
||||||
|
|
||||||
|
There are some GIMP plug-ins that need additional third-party libraries
|
||||||
|
installed on your system. For example to compile the plug-ins that load
|
||||||
|
and save JPEG, PNG or TIFF files you need the related libraries and header
|
||||||
|
files installed, otherwise you'll get a message that plugin xyz will not
|
||||||
|
be build.
|
||||||
|
|
||||||
|
If you are sure that those libraries are correctly installed, but configure
|
||||||
|
fails to detect them, the following might help:
|
||||||
|
|
||||||
|
Set your LDFLAGS environment variable to look for the library in a certain
|
||||||
|
place, e.g. if you are working in a bash shell you would say:
|
||||||
|
export LDFLAGS="-L<path_to_library> -L<path_to_another_one>"
|
||||||
|
before you run configure.
|
||||||
|
|
||||||
|
Set your CPPFLAGS environment variable to look for the header file in a
|
||||||
|
certain place, e.g. if you are working in a bash shell you would say:
|
||||||
|
export CPPFLAGS="-I<path_to_header_file> -I<path_to_another_one>"
|
||||||
|
before you run configure.
|
||||||
|
|
||||||
|
It's wise to remove the file 'config.cache' before re-running configure.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Generic Instructions for Building Auto-Configured Packages
|
Generic Instructions for Building Auto-Configured Packages
|
||||||
==========================================================
|
==========================================================
|
||||||
|
|
||||||
|
|
|
@ -283,7 +283,7 @@ about_dialog_load_logo (GtkWidget *window)
|
||||||
|
|
||||||
sprintf (buf, "%s/gimp_logo.ppm", DATADIR);
|
sprintf (buf, "%s/gimp_logo.ppm", DATADIR);
|
||||||
|
|
||||||
fp = fopen (buf, "r");
|
fp = fopen (buf, "rb");
|
||||||
if (!fp)
|
if (!fp)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -516,7 +516,8 @@ app_init (void)
|
||||||
render_setup (transparency_type, transparency_size);
|
render_setup (transparency_type, transparency_size);
|
||||||
tools_options_dialog_new ();
|
tools_options_dialog_new ();
|
||||||
tools_select (RECT_SELECT);
|
tools_select (RECT_SELECT);
|
||||||
g_set_message_handler (&message_box_func);
|
if (console_messages == FALSE)
|
||||||
|
g_set_message_handler (&message_box_func);
|
||||||
}
|
}
|
||||||
|
|
||||||
color_transfer_init ();
|
color_transfer_init ();
|
||||||
|
@ -539,6 +540,8 @@ app_exit_finish (void)
|
||||||
return;
|
return;
|
||||||
is_app_exit_finish_done = TRUE;
|
is_app_exit_finish_done = TRUE;
|
||||||
|
|
||||||
|
g_set_message_handler (&message_console_func);
|
||||||
|
|
||||||
lc_dialog_free ();
|
lc_dialog_free ();
|
||||||
gdisplays_delete ();
|
gdisplays_delete ();
|
||||||
global_edit_free ();
|
global_edit_free ();
|
||||||
|
|
|
@ -33,5 +33,7 @@ extern int no_splash;
|
||||||
extern int no_splash_image;
|
extern int no_splash_image;
|
||||||
extern int no_data;
|
extern int no_data;
|
||||||
extern int be_verbose;
|
extern int be_verbose;
|
||||||
|
extern int use_debug_handler;
|
||||||
|
extern int console_messages;
|
||||||
|
|
||||||
#endif /* APPENV_H */
|
#endif /* APPENV_H */
|
||||||
|
|
|
@ -467,7 +467,7 @@ sort_boundary (BoundSeg *segs,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x != startx || y != starty)
|
if (x != startx || y != starty)
|
||||||
g_warning ("Unconnected boundary group!");
|
g_message ("sort_boundary(): Unconnected boundary group!");
|
||||||
|
|
||||||
/* Mark the end of a group */
|
/* Mark the end of a group */
|
||||||
*num_groups = *num_groups + 1;
|
*num_groups = *num_groups + 1;
|
||||||
|
|
|
@ -621,7 +621,7 @@ static void
|
||||||
color_balance_preview (ColorBalanceDialog *cbd)
|
color_balance_preview (ColorBalanceDialog *cbd)
|
||||||
{
|
{
|
||||||
if (!cbd->image_map)
|
if (!cbd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("color_balance_preview(): No image map");
|
||||||
active_tool->preserve = TRUE;
|
active_tool->preserve = TRUE;
|
||||||
image_map_apply (cbd->image_map, color_balance, (void *) cbd);
|
image_map_apply (cbd->image_map, color_balance, (void *) cbd);
|
||||||
active_tool->preserve = FALSE;
|
active_tool->preserve = FALSE;
|
||||||
|
|
|
@ -817,7 +817,7 @@ static void
|
||||||
curves_preview (CurvesDialog *cd)
|
curves_preview (CurvesDialog *cd)
|
||||||
{
|
{
|
||||||
if (!cd->image_map)
|
if (!cd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("curves_preview(): No image map");
|
||||||
|
|
||||||
active_tool->preserve = TRUE; /* Going to dirty the display... */
|
active_tool->preserve = TRUE; /* Going to dirty the display... */
|
||||||
|
|
||||||
|
|
|
@ -734,7 +734,7 @@ static void
|
||||||
hue_saturation_preview (HueSaturationDialog *hsd)
|
hue_saturation_preview (HueSaturationDialog *hsd)
|
||||||
{
|
{
|
||||||
if (!hsd->image_map)
|
if (!hsd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("hue_saturation_preview(): No image map");
|
||||||
active_tool->preserve = TRUE;
|
active_tool->preserve = TRUE;
|
||||||
image_map_apply (hsd->image_map, hue_saturation, (void *) hsd);
|
image_map_apply (hsd->image_map, hue_saturation, (void *) hsd);
|
||||||
active_tool->preserve = FALSE;
|
active_tool->preserve = FALSE;
|
||||||
|
|
|
@ -488,7 +488,7 @@ static void
|
||||||
threshold_preview (ThresholdDialog *td)
|
threshold_preview (ThresholdDialog *td)
|
||||||
{
|
{
|
||||||
if (!td->image_map)
|
if (!td->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("threshold_preview(): No image map");
|
||||||
image_map_apply (td->image_map, threshold, (void *) td);
|
image_map_apply (td->image_map, threshold, (void *) td);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,7 +252,7 @@ tile_swap_command (Tile *tile,
|
||||||
swap_file = g_hash_table_lookup (swap_files, &tile->swap_num);
|
swap_file = g_hash_table_lookup (swap_files, &tile->swap_num);
|
||||||
if (!swap_file)
|
if (!swap_file)
|
||||||
{
|
{
|
||||||
g_warning ("could not find swap file for tile");
|
g_message ("could not find swap file for tile");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ tile_swap_open (SwapFile *swap_file)
|
||||||
swap_file->fd = open (swap_file->filename, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR);
|
swap_file->fd = open (swap_file->filename, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR);
|
||||||
if (swap_file->fd == -1)
|
if (swap_file->fd == -1)
|
||||||
{
|
{
|
||||||
g_warning ("unable to open swap file...BAD THINGS WILL HAPPEN SOON");
|
g_message ("unable to open swap file...BAD THINGS WILL HAPPEN SOON");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ tile_swap_default (int fd,
|
||||||
tile_swap_default_delete (def_swap_file, fd, tile);
|
tile_swap_default_delete (def_swap_file, fd, tile);
|
||||||
break;
|
break;
|
||||||
case SWAP_COMPRESS:
|
case SWAP_COMPRESS:
|
||||||
g_warning ("tile_swap_default: SWAP_COMPRESS: UNFINISHED");
|
g_message ("tile_swap_default: SWAP_COMPRESS: UNFINISHED");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ tile_swap_default_in (DefSwapFile *def_swap_file,
|
||||||
offset = lseek (fd, tile->swap_offset, SEEK_SET);
|
offset = lseek (fd, tile->swap_offset, SEEK_SET);
|
||||||
if (offset == -1)
|
if (offset == -1)
|
||||||
{
|
{
|
||||||
g_warning ("unable to seek to tile location on disk: %d", err);
|
g_message ("unable to seek to tile location on disk: %d", err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -369,7 +369,7 @@ tile_swap_default_in (DefSwapFile *def_swap_file,
|
||||||
|
|
||||||
if (err <= 0)
|
if (err <= 0)
|
||||||
{
|
{
|
||||||
g_warning ("unable to read tile data from disk: %d ( %d ) bytes read", err, nleft);
|
g_message ("unable to read tile data from disk: %d ( %d ) bytes read", err, nleft);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -407,7 +407,7 @@ tile_swap_default_out (DefSwapFile *def_swap_file,
|
||||||
offset = lseek (fd, tile->swap_offset, SEEK_SET);
|
offset = lseek (fd, tile->swap_offset, SEEK_SET);
|
||||||
if (offset == -1)
|
if (offset == -1)
|
||||||
{
|
{
|
||||||
g_warning ("unable to seek to tile location on disk: %d", errno);
|
g_message ("unable to seek to tile location on disk: %d", errno);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -418,7 +418,7 @@ tile_swap_default_out (DefSwapFile *def_swap_file,
|
||||||
err = write (fd, tile->data + rbytes - nleft, nleft);
|
err = write (fd, tile->data + rbytes - nleft, nleft);
|
||||||
if (err <= 0)
|
if (err <= 0)
|
||||||
{
|
{
|
||||||
g_warning ("unable to write tile data to disk: %d ( %d ) bytes written", err, nleft);
|
g_message ("unable to write tile data to disk: %d ( %d ) bytes written", err, nleft);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -467,7 +467,7 @@ sort_boundary (BoundSeg *segs,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x != startx || y != starty)
|
if (x != startx || y != starty)
|
||||||
g_warning ("Unconnected boundary group!");
|
g_message ("sort_boundary(): Unconnected boundary group!");
|
||||||
|
|
||||||
/* Mark the end of a group */
|
/* Mark the end of a group */
|
||||||
*num_groups = *num_groups + 1;
|
*num_groups = *num_groups + 1;
|
||||||
|
|
|
@ -483,7 +483,7 @@ static void
|
||||||
brightness_contrast_preview (BrightnessContrastDialog *bcd)
|
brightness_contrast_preview (BrightnessContrastDialog *bcd)
|
||||||
{
|
{
|
||||||
if (!bcd->image_map)
|
if (!bcd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("brightness_contrast_preview(): No image map");
|
||||||
active_tool->preserve = TRUE;
|
active_tool->preserve = TRUE;
|
||||||
image_map_apply (bcd->image_map, brightness_contrast, (void *) bcd);
|
image_map_apply (bcd->image_map, brightness_contrast, (void *) bcd);
|
||||||
active_tool->preserve = FALSE;
|
active_tool->preserve = FALSE;
|
||||||
|
|
|
@ -736,7 +736,7 @@ brush_select_events (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GDK_DELETE:
|
case GDK_DELETE:
|
||||||
g_warning ("test");
|
/* g_warning ("test"); */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -621,7 +621,7 @@ static void
|
||||||
color_balance_preview (ColorBalanceDialog *cbd)
|
color_balance_preview (ColorBalanceDialog *cbd)
|
||||||
{
|
{
|
||||||
if (!cbd->image_map)
|
if (!cbd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("color_balance_preview(): No image map");
|
||||||
active_tool->preserve = TRUE;
|
active_tool->preserve = TRUE;
|
||||||
image_map_apply (cbd->image_map, color_balance, (void *) cbd);
|
image_map_apply (cbd->image_map, color_balance, (void *) cbd);
|
||||||
active_tool->preserve = FALSE;
|
active_tool->preserve = FALSE;
|
||||||
|
|
|
@ -278,7 +278,7 @@ image_map_abort (ImageMap image_map)
|
||||||
/* if the user has changed the image depth get out quickly */
|
/* if the user has changed the image depth get out quickly */
|
||||||
if (destPR.bytes != srcPR.bytes)
|
if (destPR.bytes != srcPR.bytes)
|
||||||
{
|
{
|
||||||
g_warning ("image depth change, unable to restore original image");
|
g_message ("image depth change, unable to restore original image");
|
||||||
tile_manager_destroy (_image_map->undo_tiles);
|
tile_manager_destroy (_image_map->undo_tiles);
|
||||||
g_free (_image_map);
|
g_free (_image_map);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -817,7 +817,7 @@ static void
|
||||||
curves_preview (CurvesDialog *cd)
|
curves_preview (CurvesDialog *cd)
|
||||||
{
|
{
|
||||||
if (!cd->image_map)
|
if (!cd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("curves_preview(): No image map");
|
||||||
|
|
||||||
active_tool->preserve = TRUE; /* Going to dirty the display... */
|
active_tool->preserve = TRUE; /* Going to dirty the display... */
|
||||||
|
|
||||||
|
|
|
@ -283,7 +283,7 @@ about_dialog_load_logo (GtkWidget *window)
|
||||||
|
|
||||||
sprintf (buf, "%s/gimp_logo.ppm", DATADIR);
|
sprintf (buf, "%s/gimp_logo.ppm", DATADIR);
|
||||||
|
|
||||||
fp = fopen (buf, "r");
|
fp = fopen (buf, "rb");
|
||||||
if (!fp)
|
if (!fp)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ install_verify (InstallCallback install_callback)
|
||||||
filename = gimp_directory ();
|
filename = gimp_directory ();
|
||||||
if ('\000' == filename[0])
|
if ('\000' == filename[0])
|
||||||
{
|
{
|
||||||
g_warning ("No home directory--skipping GIMP user installation.");
|
g_message ("No home directory--skipping GIMP user installation.");
|
||||||
(* install_callback) ();
|
(* install_callback) ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -276,14 +276,14 @@ render_image (GDisplay *gdisp,
|
||||||
image_type = gimage_projection_type (gdisp->gimage);
|
image_type = gimage_projection_type (gdisp->gimage);
|
||||||
if ((image_type < 0) || (image_type > 5))
|
if ((image_type < 0) || (image_type > 5))
|
||||||
{
|
{
|
||||||
g_warning ("unknown gimage projection type: %d",
|
g_message ("unknown gimage projection type: %d",
|
||||||
gimage_projection_type (gdisp->gimage));
|
gimage_projection_type (gdisp->gimage));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((info.dest_bpp < 1) || (info.dest_bpp > 4))
|
if ((info.dest_bpp < 1) || (info.dest_bpp > 4))
|
||||||
{
|
{
|
||||||
g_warning ("unsupported destination bytes per pixel: %d", info.dest_bpp);
|
g_message ("unsupported destination bytes per pixel: %d", info.dest_bpp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -276,14 +276,14 @@ render_image (GDisplay *gdisp,
|
||||||
image_type = gimage_projection_type (gdisp->gimage);
|
image_type = gimage_projection_type (gdisp->gimage);
|
||||||
if ((image_type < 0) || (image_type > 5))
|
if ((image_type < 0) || (image_type > 5))
|
||||||
{
|
{
|
||||||
g_warning ("unknown gimage projection type: %d",
|
g_message ("unknown gimage projection type: %d",
|
||||||
gimage_projection_type (gdisp->gimage));
|
gimage_projection_type (gdisp->gimage));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((info.dest_bpp < 1) || (info.dest_bpp > 4))
|
if ((info.dest_bpp < 1) || (info.dest_bpp > 4))
|
||||||
{
|
{
|
||||||
g_warning ("unsupported destination bytes per pixel: %d", info.dest_bpp);
|
g_message ("unsupported destination bytes per pixel: %d", info.dest_bpp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,17 +25,17 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
#include "appenv.h"
|
||||||
#include "app_procs.h"
|
#include "app_procs.h"
|
||||||
#include "interface.h"
|
#include "interface.h"
|
||||||
#include "errors.h"
|
#include "errors.h"
|
||||||
|
|
||||||
extern char *prog_name;
|
extern char *prog_name;
|
||||||
extern int use_debug_handler;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
message_console_func (char *str)
|
message_console_func (char *str)
|
||||||
{
|
{
|
||||||
g_print ("%s: %s\n", prog_name, str);
|
fprintf (stderr, "%s: %s\n", prog_name, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -392,7 +392,7 @@ register_magic_load_handler_invoker (Argument *args)
|
||||||
(proc->args[2].arg_type != PDB_STRING) ||
|
(proc->args[2].arg_type != PDB_STRING) ||
|
||||||
(proc->values[0].arg_type != PDB_IMAGE)))
|
(proc->values[0].arg_type != PDB_IMAGE)))
|
||||||
{
|
{
|
||||||
g_warning ("load handler \"%s\" does not take the standard load handler args",
|
g_message ("load handler \"%s\" does not take the standard load handler args",
|
||||||
(char*) args[0].value.pdb_pointer);
|
(char*) args[0].value.pdb_pointer);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -404,7 +404,7 @@ register_magic_load_handler_invoker (Argument *args)
|
||||||
|
|
||||||
if (!file_proc)
|
if (!file_proc)
|
||||||
{
|
{
|
||||||
g_warning ("attempt to register non-existant load handler \"%s\"",
|
g_message ("attempt to register non-existant load handler \"%s\"",
|
||||||
(char*) args[0].value.pdb_pointer);
|
(char*) args[0].value.pdb_pointer);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -438,7 +438,7 @@ register_save_handler_invoker (Argument *args)
|
||||||
(proc->args[3].arg_type != PDB_STRING) ||
|
(proc->args[3].arg_type != PDB_STRING) ||
|
||||||
(proc->args[4].arg_type != PDB_STRING)))
|
(proc->args[4].arg_type != PDB_STRING)))
|
||||||
{
|
{
|
||||||
g_warning ("save handler \"%s\" does not take the standard save handler args",
|
g_message ("save handler \"%s\" does not take the standard save handler args",
|
||||||
(char*) args[0].value.pdb_pointer);
|
(char*) args[0].value.pdb_pointer);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -450,7 +450,7 @@ register_save_handler_invoker (Argument *args)
|
||||||
|
|
||||||
if (!file_proc)
|
if (!file_proc)
|
||||||
{
|
{
|
||||||
g_warning ("attempt to register non-existant save handler \"%s\"",
|
g_message ("attempt to register non-existant save handler \"%s\"",
|
||||||
(char*) args[0].value.pdb_pointer);
|
(char*) args[0].value.pdb_pointer);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,7 +253,7 @@ gimp_directory ()
|
||||||
gimp_dir[len_env_home_dir] = '/';
|
gimp_dir[len_env_home_dir] = '/';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
g_warning ("No home directory.");
|
g_message ("warning: no home directory.");
|
||||||
|
|
||||||
strncpy (&gimp_dir[len_env_home_dir+1],
|
strncpy (&gimp_dir[len_env_home_dir+1],
|
||||||
env_gimp_dir,
|
env_gimp_dir,
|
||||||
|
@ -268,7 +268,7 @@ gimp_directory ()
|
||||||
gimp_dir[len_env_home_dir] = '/';
|
gimp_dir[len_env_home_dir] = '/';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
g_warning ("No home directory.");
|
g_message ("warning: no home directory.");
|
||||||
|
|
||||||
strncpy (&gimp_dir[len_env_home_dir+1],
|
strncpy (&gimp_dir[len_env_home_dir+1],
|
||||||
GIMPDIR,
|
GIMPDIR,
|
||||||
|
@ -1060,7 +1060,7 @@ parse_plug_in_def (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
g_warning ("error parsing pluginrc");
|
g_message ("error parsing pluginrc");
|
||||||
tmp_list = plug_in_def->proc_defs;
|
tmp_list = plug_in_def->proc_defs;
|
||||||
while (tmp_list)
|
while (tmp_list)
|
||||||
{
|
{
|
||||||
|
|
|
@ -283,7 +283,7 @@ about_dialog_load_logo (GtkWidget *window)
|
||||||
|
|
||||||
sprintf (buf, "%s/gimp_logo.ppm", DATADIR);
|
sprintf (buf, "%s/gimp_logo.ppm", DATADIR);
|
||||||
|
|
||||||
fp = fopen (buf, "r");
|
fp = fopen (buf, "rb");
|
||||||
if (!fp)
|
if (!fp)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -736,7 +736,7 @@ brush_select_events (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GDK_DELETE:
|
case GDK_DELETE:
|
||||||
g_warning ("test");
|
/* g_warning ("test"); */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -825,7 +825,7 @@ layers_dialog_update (int gimage_id)
|
||||||
layer_widget_delete (lw);
|
layer_widget_delete (lw);
|
||||||
}
|
}
|
||||||
if (layersD->layer_widgets)
|
if (layersD->layer_widgets)
|
||||||
g_warning ("layersD->layer_widgets not empty!");
|
g_message ("layersD->layer_widgets not empty!");
|
||||||
layersD->layer_widgets = NULL;
|
layersD->layer_widgets = NULL;
|
||||||
|
|
||||||
if (! (gimage = gimage_get_ID (layersD->gimage_id)))
|
if (! (gimage = gimage_get_ID (layersD->gimage_id)))
|
||||||
|
|
|
@ -316,7 +316,7 @@ menus_set_sensitive (char *path,
|
||||||
if (menu_path)
|
if (menu_path)
|
||||||
gtk_widget_set_sensitive (menu_path->widget, sensitive);
|
gtk_widget_set_sensitive (menu_path->widget, sensitive);
|
||||||
else
|
else
|
||||||
g_warning ("Unable to set sensitivity for menu which doesn't exist: %s", path);
|
g_message ("Unable to set sensitivity for menu which doesn't exist: %s", path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -335,7 +335,7 @@ menus_set_state (char *path,
|
||||||
gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (menu_path->widget), state);
|
gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (menu_path->widget), state);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
g_warning ("Unable to set state for menu which doesn't exist: %s", path);
|
g_message ("Unable to set state for menu which doesn't exist: %s", path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -48,7 +48,7 @@ install_verify (InstallCallback install_callback)
|
||||||
filename = gimp_directory ();
|
filename = gimp_directory ();
|
||||||
if ('\000' == filename[0])
|
if ('\000' == filename[0])
|
||||||
{
|
{
|
||||||
g_warning ("No home directory--skipping GIMP user installation.");
|
g_message ("No home directory--skipping GIMP user installation.");
|
||||||
(* install_callback) ();
|
(* install_callback) ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -734,7 +734,7 @@ static void
|
||||||
hue_saturation_preview (HueSaturationDialog *hsd)
|
hue_saturation_preview (HueSaturationDialog *hsd)
|
||||||
{
|
{
|
||||||
if (!hsd->image_map)
|
if (!hsd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("hue_saturation_preview(): No image map");
|
||||||
active_tool->preserve = TRUE;
|
active_tool->preserve = TRUE;
|
||||||
image_map_apply (hsd->image_map, hue_saturation, (void *) hsd);
|
image_map_apply (hsd->image_map, hue_saturation, (void *) hsd);
|
||||||
active_tool->preserve = FALSE;
|
active_tool->preserve = FALSE;
|
||||||
|
|
|
@ -278,7 +278,7 @@ image_map_abort (ImageMap image_map)
|
||||||
/* if the user has changed the image depth get out quickly */
|
/* if the user has changed the image depth get out quickly */
|
||||||
if (destPR.bytes != srcPR.bytes)
|
if (destPR.bytes != srcPR.bytes)
|
||||||
{
|
{
|
||||||
g_warning ("image depth change, unable to restore original image");
|
g_message ("image depth change, unable to restore original image");
|
||||||
tile_manager_destroy (_image_map->undo_tiles);
|
tile_manager_destroy (_image_map->undo_tiles);
|
||||||
g_free (_image_map);
|
g_free (_image_map);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -276,14 +276,14 @@ render_image (GDisplay *gdisp,
|
||||||
image_type = gimage_projection_type (gdisp->gimage);
|
image_type = gimage_projection_type (gdisp->gimage);
|
||||||
if ((image_type < 0) || (image_type > 5))
|
if ((image_type < 0) || (image_type > 5))
|
||||||
{
|
{
|
||||||
g_warning ("unknown gimage projection type: %d",
|
g_message ("unknown gimage projection type: %d",
|
||||||
gimage_projection_type (gdisp->gimage));
|
gimage_projection_type (gdisp->gimage));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((info.dest_bpp < 1) || (info.dest_bpp > 4))
|
if ((info.dest_bpp < 1) || (info.dest_bpp > 4))
|
||||||
{
|
{
|
||||||
g_warning ("unsupported destination bytes per pixel: %d", info.dest_bpp);
|
g_message ("unsupported destination bytes per pixel: %d", info.dest_bpp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ install_verify (InstallCallback install_callback)
|
||||||
filename = gimp_directory ();
|
filename = gimp_directory ();
|
||||||
if ('\000' == filename[0])
|
if ('\000' == filename[0])
|
||||||
{
|
{
|
||||||
g_warning ("No home directory--skipping GIMP user installation.");
|
g_message ("No home directory--skipping GIMP user installation.");
|
||||||
(* install_callback) ();
|
(* install_callback) ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -825,7 +825,7 @@ layers_dialog_update (int gimage_id)
|
||||||
layer_widget_delete (lw);
|
layer_widget_delete (lw);
|
||||||
}
|
}
|
||||||
if (layersD->layer_widgets)
|
if (layersD->layer_widgets)
|
||||||
g_warning ("layersD->layer_widgets not empty!");
|
g_message ("layersD->layer_widgets not empty!");
|
||||||
layersD->layer_widgets = NULL;
|
layersD->layer_widgets = NULL;
|
||||||
|
|
||||||
if (! (gimage = gimage_get_ID (layersD->gimage_id)))
|
if (! (gimage = gimage_get_ID (layersD->gimage_id)))
|
||||||
|
|
|
@ -47,6 +47,7 @@ int no_splash_image;
|
||||||
int be_verbose;
|
int be_verbose;
|
||||||
int use_shm;
|
int use_shm;
|
||||||
int use_debug_handler;
|
int use_debug_handler;
|
||||||
|
int console_messages;
|
||||||
char *prog_name; /* The path name we are invoked with */
|
char *prog_name; /* The path name we are invoked with */
|
||||||
char **batch_cmds;
|
char **batch_cmds;
|
||||||
|
|
||||||
|
@ -106,6 +107,7 @@ main (int argc, char **argv)
|
||||||
no_splash_image = FALSE;
|
no_splash_image = FALSE;
|
||||||
use_shm = TRUE;
|
use_shm = TRUE;
|
||||||
use_debug_handler = FALSE;
|
use_debug_handler = FALSE;
|
||||||
|
console_messages = FALSE;
|
||||||
batch_cmds = g_new (char*, argc);
|
batch_cmds = g_new (char*, argc);
|
||||||
batch_cmds[0] = NULL;
|
batch_cmds[0] = NULL;
|
||||||
|
|
||||||
|
@ -165,6 +167,10 @@ main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
use_debug_handler = TRUE;
|
use_debug_handler = TRUE;
|
||||||
}
|
}
|
||||||
|
else if (strcmp (argv[i], "--console-messages") == 0)
|
||||||
|
{
|
||||||
|
console_messages = TRUE;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* ANYTHING ELSE starting with a '-' is an error.
|
* ANYTHING ELSE starting with a '-' is an error.
|
||||||
*/
|
*/
|
||||||
|
@ -191,6 +197,7 @@ main (int argc, char **argv)
|
||||||
g_print (" --no-splash-image Do not add an image to the startup window.\n");
|
g_print (" --no-splash-image Do not add an image to the startup window.\n");
|
||||||
g_print (" --no-shm Do not use shared memory between GIMP and its plugins.\n");
|
g_print (" --no-shm Do not use shared memory between GIMP and its plugins.\n");
|
||||||
g_print (" --no-xshm Do not use the X Shared Memory extension.\n");
|
g_print (" --no-xshm Do not use the X Shared Memory extension.\n");
|
||||||
|
g_print (" --console-messages Display warnings to console instead of a dialog box.\n");
|
||||||
g_print (" --debug-handlers Enable debugging signal handlers.\n");
|
g_print (" --debug-handlers Enable debugging signal handlers.\n");
|
||||||
g_print (" --display <display> Use the designated X display.\n\n");
|
g_print (" --display <display> Use the designated X display.\n\n");
|
||||||
|
|
||||||
|
|
|
@ -316,7 +316,7 @@ menus_set_sensitive (char *path,
|
||||||
if (menu_path)
|
if (menu_path)
|
||||||
gtk_widget_set_sensitive (menu_path->widget, sensitive);
|
gtk_widget_set_sensitive (menu_path->widget, sensitive);
|
||||||
else
|
else
|
||||||
g_warning ("Unable to set sensitivity for menu which doesn't exist: %s", path);
|
g_message ("Unable to set sensitivity for menu which doesn't exist: %s", path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -335,7 +335,7 @@ menus_set_state (char *path,
|
||||||
gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (menu_path->widget), state);
|
gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (menu_path->widget), state);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
g_warning ("Unable to set state for menu which doesn't exist: %s", path);
|
g_message ("Unable to set state for menu which doesn't exist: %s", path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -316,7 +316,7 @@ menus_set_sensitive (char *path,
|
||||||
if (menu_path)
|
if (menu_path)
|
||||||
gtk_widget_set_sensitive (menu_path->widget, sensitive);
|
gtk_widget_set_sensitive (menu_path->widget, sensitive);
|
||||||
else
|
else
|
||||||
g_warning ("Unable to set sensitivity for menu which doesn't exist: %s", path);
|
g_message ("Unable to set sensitivity for menu which doesn't exist: %s", path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -335,7 +335,7 @@ menus_set_state (char *path,
|
||||||
gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (menu_path->widget), state);
|
gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (menu_path->widget), state);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
g_warning ("Unable to set state for menu which doesn't exist: %s", path);
|
g_message ("Unable to set state for menu which doesn't exist: %s", path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -883,7 +883,7 @@ replace_pixels (unsigned char *src1,
|
||||||
|
|
||||||
if (b1 != b2)
|
if (b1 != b2)
|
||||||
{
|
{
|
||||||
g_warning ("replace_pixels only works on commensurate pixel regions");
|
g_message ("replace_pixels only works on commensurate pixel regions");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -899,7 +899,7 @@ paint_core_replace (paint_core, brush_mask, drawable, brush_opacity, image_opaci
|
||||||
|
|
||||||
if (mode != INCREMENTAL)
|
if (mode != INCREMENTAL)
|
||||||
{
|
{
|
||||||
g_warning ("paint_core_replace only works in INCREMENTAL mode");
|
g_message ("paint_core_replace only works in INCREMENTAL mode");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -883,7 +883,7 @@ replace_pixels (unsigned char *src1,
|
||||||
|
|
||||||
if (b1 != b2)
|
if (b1 != b2)
|
||||||
{
|
{
|
||||||
g_warning ("replace_pixels only works on commensurate pixel regions");
|
g_message ("replace_pixels only works on commensurate pixel regions");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -242,13 +242,13 @@ plug_in_init ()
|
||||||
{
|
{
|
||||||
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
|
||||||
if (shm_ID == -1)
|
if (shm_ID == -1)
|
||||||
g_warning ("shmget failed...disabling shared memory tile transport\n");
|
g_message ("shmget failed...disabling shared memory tile transport\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
shm_addr = (guchar*) shmat (shm_ID, 0, 0);
|
||||||
if (shm_addr == (guchar*) -1)
|
if (shm_addr == (guchar*) -1)
|
||||||
{
|
{
|
||||||
g_warning ("shmat failed...disabling shared memory tile transport\n");
|
g_message ("shmat failed...disabling shared memory tile transport\n");
|
||||||
shm_ID = -1;
|
shm_ID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_handle_quit ();
|
plug_in_handle_quit ();
|
||||||
break;
|
break;
|
||||||
case GP_CONFIG:
|
case GP_CONFIG:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_REQ:
|
case GP_TILE_REQ:
|
||||||
plug_in_handle_tile_req (msg->data);
|
plug_in_handle_tile_req (msg->data);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_ACK:
|
case GP_TILE_ACK:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TILE_DATA:
|
case GP_TILE_DATA:
|
||||||
g_warning ("received a config message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a config message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_PROC_RUN:
|
case GP_PROC_RUN:
|
||||||
|
@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
|
||||||
plug_in_close (current_plug_in, FALSE);
|
plug_in_close (current_plug_in, FALSE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RUN:
|
case GP_TEMP_PROC_RUN:
|
||||||
g_warning ("received a temp proc run message (should not happen)\n");
|
g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
break;
|
break;
|
||||||
case GP_TEMP_PROC_RETURN:
|
case GP_TEMP_PROC_RETURN:
|
||||||
|
@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile data and received: %d\n", msg.type);
|
g_message ("expected tile data and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
tile = tile_manager_get (tm, tile_info->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
wire_destroy (&msg);
|
wire_destroy (&msg);
|
||||||
if (!gp_tile_ack_write (current_writefd))
|
if (!gp_tile_ack_write (current_writefd))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!tm)
|
if (!tm)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid drawable (killing)\n");
|
g_message ("plug-in requested invalid drawable (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
tile = tile_manager_get (tm, tile_req->tile_num, 0);
|
||||||
if (!tile)
|
if (!tile)
|
||||||
{
|
{
|
||||||
g_warning ("plug-in requested invalid tile (killing)\n");
|
g_message ("plug-in requested invalid tile (killing)\n");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!gp_tile_data_write (current_writefd, &tile_data))
|
if (!gp_tile_data_write (current_writefd, &tile_data))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
|
||||||
|
|
||||||
if (!wire_read_msg (current_readfd, &msg))
|
if (!wire_read_msg (current_readfd, &msg))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_tile_req: ERROR");
|
g_message ("plug_in_handle_tile_req: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("expected tile ack and received: %d\n", msg.type);
|
g_message ("expected tile ack and received: %d\n", msg.type);
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
if (!proc_rec)
|
if (!proc_rec)
|
||||||
{
|
{
|
||||||
/* THIS IS PROBABLY NOT CORRECT -josh */
|
/* THIS IS PROBABLY NOT CORRECT -josh */
|
||||||
g_warning ("PDB lookup failed on %s\n", proc_run->name);
|
g_message ("PDB lookup failed on %s\n", proc_run->name);
|
||||||
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
plug_in_args_destroy (args, proc_run->nparams, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
|
||||||
|
|
||||||
if (!gp_proc_return_write (current_writefd, &proc_return))
|
if (!gp_proc_return_write (current_writefd, &proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
|
||||||
plug_in_push (blocked->plug_in);
|
plug_in_push (blocked->plug_in);
|
||||||
if (!gp_proc_return_write (current_writefd, proc_return))
|
if (!gp_proc_return_write (current_writefd, proc_return))
|
||||||
{
|
{
|
||||||
g_warning ("plug_in_handle_proc_run: ERROR");
|
g_message ("plug_in_handle_proc_run: ERROR");
|
||||||
plug_in_close (current_plug_in, TRUE);
|
plug_in_close (current_plug_in, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
if ((proc_install->nparams < 1) ||
|
if ((proc_install->nparams < 1) ||
|
||||||
(proc_install->params[0].type != PDB_INT32))
|
(proc_install->params[0].type != PDB_INT32))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_IMAGE) ||
|
(proc_install->params[1].type != PDB_IMAGE) ||
|
||||||
(proc_install->params[2].type != PDB_DRAWABLE))
|
(proc_install->params[2].type != PDB_DRAWABLE))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[1].type != PDB_STRING) ||
|
(proc_install->params[1].type != PDB_STRING) ||
|
||||||
(proc_install->params[2].type != PDB_STRING))
|
(proc_install->params[2].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
(proc_install->params[3].type != PDB_STRING) ||
|
(proc_install->params[3].type != PDB_STRING) ||
|
||||||
(proc_install->params[4].type != PDB_STRING))
|
(proc_install->params[4].type != PDB_STRING))
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which "
|
||||||
"does not take the standard plug-in args",
|
"does not take the standard plug-in args",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
return;
|
return;
|
||||||
|
@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in "
|
||||||
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
"an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
|
||||||
"\"<Load>\", or \"<Save>\".",
|
"\"<Load>\", or \"<Save>\".",
|
||||||
current_plug_in->args[0], proc_install->name);
|
current_plug_in->args[0], proc_install->name);
|
||||||
|
@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
|
||||||
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
proc_install->params[i].type == PDB_STRINGARRAY) &&
|
||||||
proc_install->params[i-1].type != PDB_INT32)
|
proc_install->params[i-1].type != PDB_INT32)
|
||||||
{
|
{
|
||||||
g_warning ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
|
||||||
"which fails to comply with the array parameter "
|
"which fails to comply with the array parameter "
|
||||||
"passing standard. Argument %d is noncompliant.",
|
"passing standard. Argument %d is noncompliant.",
|
||||||
current_plug_in->args[0], proc_install->name, i);
|
current_plug_in->args[0], proc_install->name, i);
|
||||||
|
@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the plug-in!");
|
g_message ("Uh-oh, no active gdisplay for the plug-in!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Uh-oh, no active gdisplay for the temporary procedure!");
|
g_message ("Uh-oh, no active gdisplay for the temporary procedure!");
|
||||||
g_free (args);
|
g_free (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
|
||||||
colorarray[2] = params[i].data.d_color.blue;
|
colorarray[2] = params[i].data.d_color.blue;
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
args[i].value.pdb_int = params[i].data.d_display;
|
args[i].value.pdb_int = params[i].data.d_display;
|
||||||
|
@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
params[i].data.d_display = args[i].value.pdb_int;
|
params[i].data.d_display = args[i].value.pdb_int;
|
||||||
|
@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
|
||||||
case PDB_COLOR:
|
case PDB_COLOR:
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
|
||||||
g_free (args[i].value.pdb_pointer);
|
g_free (args[i].value.pdb_pointer);
|
||||||
break;
|
break;
|
||||||
case PDB_REGION:
|
case PDB_REGION:
|
||||||
g_warning ("the \"region\" arg type is not currently supported");
|
g_message ("the \"region\" arg type is not currently supported");
|
||||||
break;
|
break;
|
||||||
case PDB_DISPLAY:
|
case PDB_DISPLAY:
|
||||||
case PDB_IMAGE:
|
case PDB_IMAGE:
|
||||||
|
|
|
@ -356,7 +356,7 @@ static void
|
||||||
posterize_preview (PosterizeDialog *pd)
|
posterize_preview (PosterizeDialog *pd)
|
||||||
{
|
{
|
||||||
if (!pd->image_map)
|
if (!pd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("posterize_preview(): No image map");
|
||||||
active_tool->preserve = TRUE;
|
active_tool->preserve = TRUE;
|
||||||
image_map_apply (pd->image_map, posterize, (void *) pd);
|
image_map_apply (pd->image_map, posterize, (void *) pd);
|
||||||
active_tool->preserve = FALSE;
|
active_tool->preserve = FALSE;
|
||||||
|
|
|
@ -580,7 +580,7 @@ procedural_db_execute (gchar *name,
|
||||||
return_args->arg_type = PDB_STATUS;
|
return_args->arg_type = PDB_STATUS;
|
||||||
return_args->value.pdb_int = PDB_CALLING_ERROR;
|
return_args->value.pdb_int = PDB_CALLING_ERROR;
|
||||||
|
|
||||||
g_warning ("PDB calling error %s", procedure->name);
|
g_message ("PDB calling error %s", procedure->name);
|
||||||
|
|
||||||
return return_args;
|
return return_args;
|
||||||
}
|
}
|
||||||
|
@ -656,7 +656,7 @@ procedural_db_run_proc (gchar *name,
|
||||||
{
|
{
|
||||||
if (proc->args[i].arg_type != (params[i].arg_type = va_arg (args, PDBArgType)))
|
if (proc->args[i].arg_type != (params[i].arg_type = va_arg (args, PDBArgType)))
|
||||||
{
|
{
|
||||||
g_warning ("Incorrect arguments passed to procedural_db_run_proc");
|
g_message ("Incorrect arguments passed to procedural_db_run_proc");
|
||||||
g_free (params);
|
g_free (params);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -488,7 +488,7 @@ static void
|
||||||
threshold_preview (ThresholdDialog *td)
|
threshold_preview (ThresholdDialog *td)
|
||||||
{
|
{
|
||||||
if (!td->image_map)
|
if (!td->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("threshold_preview(): No image map");
|
||||||
image_map_apply (td->image_map, threshold, (void *) td);
|
image_map_apply (td->image_map, threshold, (void *) td);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,7 +252,7 @@ tile_swap_command (Tile *tile,
|
||||||
swap_file = g_hash_table_lookup (swap_files, &tile->swap_num);
|
swap_file = g_hash_table_lookup (swap_files, &tile->swap_num);
|
||||||
if (!swap_file)
|
if (!swap_file)
|
||||||
{
|
{
|
||||||
g_warning ("could not find swap file for tile");
|
g_message ("could not find swap file for tile");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ tile_swap_open (SwapFile *swap_file)
|
||||||
swap_file->fd = open (swap_file->filename, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR);
|
swap_file->fd = open (swap_file->filename, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR);
|
||||||
if (swap_file->fd == -1)
|
if (swap_file->fd == -1)
|
||||||
{
|
{
|
||||||
g_warning ("unable to open swap file...BAD THINGS WILL HAPPEN SOON");
|
g_message ("unable to open swap file...BAD THINGS WILL HAPPEN SOON");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ tile_swap_default (int fd,
|
||||||
tile_swap_default_delete (def_swap_file, fd, tile);
|
tile_swap_default_delete (def_swap_file, fd, tile);
|
||||||
break;
|
break;
|
||||||
case SWAP_COMPRESS:
|
case SWAP_COMPRESS:
|
||||||
g_warning ("tile_swap_default: SWAP_COMPRESS: UNFINISHED");
|
g_message ("tile_swap_default: SWAP_COMPRESS: UNFINISHED");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ tile_swap_default_in (DefSwapFile *def_swap_file,
|
||||||
offset = lseek (fd, tile->swap_offset, SEEK_SET);
|
offset = lseek (fd, tile->swap_offset, SEEK_SET);
|
||||||
if (offset == -1)
|
if (offset == -1)
|
||||||
{
|
{
|
||||||
g_warning ("unable to seek to tile location on disk: %d", err);
|
g_message ("unable to seek to tile location on disk: %d", err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -369,7 +369,7 @@ tile_swap_default_in (DefSwapFile *def_swap_file,
|
||||||
|
|
||||||
if (err <= 0)
|
if (err <= 0)
|
||||||
{
|
{
|
||||||
g_warning ("unable to read tile data from disk: %d ( %d ) bytes read", err, nleft);
|
g_message ("unable to read tile data from disk: %d ( %d ) bytes read", err, nleft);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -407,7 +407,7 @@ tile_swap_default_out (DefSwapFile *def_swap_file,
|
||||||
offset = lseek (fd, tile->swap_offset, SEEK_SET);
|
offset = lseek (fd, tile->swap_offset, SEEK_SET);
|
||||||
if (offset == -1)
|
if (offset == -1)
|
||||||
{
|
{
|
||||||
g_warning ("unable to seek to tile location on disk: %d", errno);
|
g_message ("unable to seek to tile location on disk: %d", errno);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -418,7 +418,7 @@ tile_swap_default_out (DefSwapFile *def_swap_file,
|
||||||
err = write (fd, tile->data + rbytes - nleft, nleft);
|
err = write (fd, tile->data + rbytes - nleft, nleft);
|
||||||
if (err <= 0)
|
if (err <= 0)
|
||||||
{
|
{
|
||||||
g_warning ("unable to write tile data to disk: %d ( %d ) bytes written", err, nleft);
|
g_message ("unable to write tile data to disk: %d ( %d ) bytes written", err, nleft);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -483,7 +483,7 @@ static void
|
||||||
brightness_contrast_preview (BrightnessContrastDialog *bcd)
|
brightness_contrast_preview (BrightnessContrastDialog *bcd)
|
||||||
{
|
{
|
||||||
if (!bcd->image_map)
|
if (!bcd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("brightness_contrast_preview(): No image map");
|
||||||
active_tool->preserve = TRUE;
|
active_tool->preserve = TRUE;
|
||||||
image_map_apply (bcd->image_map, brightness_contrast, (void *) bcd);
|
image_map_apply (bcd->image_map, brightness_contrast, (void *) bcd);
|
||||||
active_tool->preserve = FALSE;
|
active_tool->preserve = FALSE;
|
||||||
|
|
|
@ -621,7 +621,7 @@ static void
|
||||||
color_balance_preview (ColorBalanceDialog *cbd)
|
color_balance_preview (ColorBalanceDialog *cbd)
|
||||||
{
|
{
|
||||||
if (!cbd->image_map)
|
if (!cbd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("color_balance_preview(): No image map");
|
||||||
active_tool->preserve = TRUE;
|
active_tool->preserve = TRUE;
|
||||||
image_map_apply (cbd->image_map, color_balance, (void *) cbd);
|
image_map_apply (cbd->image_map, color_balance, (void *) cbd);
|
||||||
active_tool->preserve = FALSE;
|
active_tool->preserve = FALSE;
|
||||||
|
|
|
@ -817,7 +817,7 @@ static void
|
||||||
curves_preview (CurvesDialog *cd)
|
curves_preview (CurvesDialog *cd)
|
||||||
{
|
{
|
||||||
if (!cd->image_map)
|
if (!cd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("curves_preview(): No image map");
|
||||||
|
|
||||||
active_tool->preserve = TRUE; /* Going to dirty the display... */
|
active_tool->preserve = TRUE; /* Going to dirty the display... */
|
||||||
|
|
||||||
|
|
|
@ -483,7 +483,7 @@ static void
|
||||||
brightness_contrast_preview (BrightnessContrastDialog *bcd)
|
brightness_contrast_preview (BrightnessContrastDialog *bcd)
|
||||||
{
|
{
|
||||||
if (!bcd->image_map)
|
if (!bcd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("brightness_contrast_preview(): No image map");
|
||||||
active_tool->preserve = TRUE;
|
active_tool->preserve = TRUE;
|
||||||
image_map_apply (bcd->image_map, brightness_contrast, (void *) bcd);
|
image_map_apply (bcd->image_map, brightness_contrast, (void *) bcd);
|
||||||
active_tool->preserve = FALSE;
|
active_tool->preserve = FALSE;
|
||||||
|
|
|
@ -621,7 +621,7 @@ static void
|
||||||
color_balance_preview (ColorBalanceDialog *cbd)
|
color_balance_preview (ColorBalanceDialog *cbd)
|
||||||
{
|
{
|
||||||
if (!cbd->image_map)
|
if (!cbd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("color_balance_preview(): No image map");
|
||||||
active_tool->preserve = TRUE;
|
active_tool->preserve = TRUE;
|
||||||
image_map_apply (cbd->image_map, color_balance, (void *) cbd);
|
image_map_apply (cbd->image_map, color_balance, (void *) cbd);
|
||||||
active_tool->preserve = FALSE;
|
active_tool->preserve = FALSE;
|
||||||
|
|
|
@ -817,7 +817,7 @@ static void
|
||||||
curves_preview (CurvesDialog *cd)
|
curves_preview (CurvesDialog *cd)
|
||||||
{
|
{
|
||||||
if (!cd->image_map)
|
if (!cd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("curves_preview(): No image map");
|
||||||
|
|
||||||
active_tool->preserve = TRUE; /* Going to dirty the display... */
|
active_tool->preserve = TRUE; /* Going to dirty the display... */
|
||||||
|
|
||||||
|
|
|
@ -734,7 +734,7 @@ static void
|
||||||
hue_saturation_preview (HueSaturationDialog *hsd)
|
hue_saturation_preview (HueSaturationDialog *hsd)
|
||||||
{
|
{
|
||||||
if (!hsd->image_map)
|
if (!hsd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("hue_saturation_preview(): No image map");
|
||||||
active_tool->preserve = TRUE;
|
active_tool->preserve = TRUE;
|
||||||
image_map_apply (hsd->image_map, hue_saturation, (void *) hsd);
|
image_map_apply (hsd->image_map, hue_saturation, (void *) hsd);
|
||||||
active_tool->preserve = FALSE;
|
active_tool->preserve = FALSE;
|
||||||
|
|
|
@ -356,7 +356,7 @@ static void
|
||||||
posterize_preview (PosterizeDialog *pd)
|
posterize_preview (PosterizeDialog *pd)
|
||||||
{
|
{
|
||||||
if (!pd->image_map)
|
if (!pd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("posterize_preview(): No image map");
|
||||||
active_tool->preserve = TRUE;
|
active_tool->preserve = TRUE;
|
||||||
image_map_apply (pd->image_map, posterize, (void *) pd);
|
image_map_apply (pd->image_map, posterize, (void *) pd);
|
||||||
active_tool->preserve = FALSE;
|
active_tool->preserve = FALSE;
|
||||||
|
|
|
@ -488,7 +488,7 @@ static void
|
||||||
threshold_preview (ThresholdDialog *td)
|
threshold_preview (ThresholdDialog *td)
|
||||||
{
|
{
|
||||||
if (!td->image_map)
|
if (!td->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("threshold_preview(): No image map");
|
||||||
image_map_apply (td->image_map, threshold, (void *) td);
|
image_map_apply (td->image_map, threshold, (void *) td);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -734,7 +734,7 @@ static void
|
||||||
hue_saturation_preview (HueSaturationDialog *hsd)
|
hue_saturation_preview (HueSaturationDialog *hsd)
|
||||||
{
|
{
|
||||||
if (!hsd->image_map)
|
if (!hsd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("hue_saturation_preview(): No image map");
|
||||||
active_tool->preserve = TRUE;
|
active_tool->preserve = TRUE;
|
||||||
image_map_apply (hsd->image_map, hue_saturation, (void *) hsd);
|
image_map_apply (hsd->image_map, hue_saturation, (void *) hsd);
|
||||||
active_tool->preserve = FALSE;
|
active_tool->preserve = FALSE;
|
||||||
|
|
|
@ -899,7 +899,7 @@ paint_core_replace (paint_core, brush_mask, drawable, brush_opacity, image_opaci
|
||||||
|
|
||||||
if (mode != INCREMENTAL)
|
if (mode != INCREMENTAL)
|
||||||
{
|
{
|
||||||
g_warning ("paint_core_replace only works in INCREMENTAL mode");
|
g_message ("paint_core_replace only works in INCREMENTAL mode");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -356,7 +356,7 @@ static void
|
||||||
posterize_preview (PosterizeDialog *pd)
|
posterize_preview (PosterizeDialog *pd)
|
||||||
{
|
{
|
||||||
if (!pd->image_map)
|
if (!pd->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("posterize_preview(): No image map");
|
||||||
active_tool->preserve = TRUE;
|
active_tool->preserve = TRUE;
|
||||||
image_map_apply (pd->image_map, posterize, (void *) pd);
|
image_map_apply (pd->image_map, posterize, (void *) pd);
|
||||||
active_tool->preserve = FALSE;
|
active_tool->preserve = FALSE;
|
||||||
|
|
|
@ -488,7 +488,7 @@ static void
|
||||||
threshold_preview (ThresholdDialog *td)
|
threshold_preview (ThresholdDialog *td)
|
||||||
{
|
{
|
||||||
if (!td->image_map)
|
if (!td->image_map)
|
||||||
g_warning ("No image map");
|
g_message ("threshold_preview(): No image map");
|
||||||
image_map_apply (td->image_map, threshold, (void *) td);
|
image_map_apply (td->image_map, threshold, (void *) td);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ install_verify (InstallCallback install_callback)
|
||||||
filename = gimp_directory ();
|
filename = gimp_directory ();
|
||||||
if ('\000' == filename[0])
|
if ('\000' == filename[0])
|
||||||
{
|
{
|
||||||
g_warning ("No home directory--skipping GIMP user installation.");
|
g_message ("No home directory--skipping GIMP user installation.");
|
||||||
(* install_callback) ();
|
(* install_callback) ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -316,7 +316,7 @@ menus_set_sensitive (char *path,
|
||||||
if (menu_path)
|
if (menu_path)
|
||||||
gtk_widget_set_sensitive (menu_path->widget, sensitive);
|
gtk_widget_set_sensitive (menu_path->widget, sensitive);
|
||||||
else
|
else
|
||||||
g_warning ("Unable to set sensitivity for menu which doesn't exist: %s", path);
|
g_message ("Unable to set sensitivity for menu which doesn't exist: %s", path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -335,7 +335,7 @@ menus_set_state (char *path,
|
||||||
gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (menu_path->widget), state);
|
gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (menu_path->widget), state);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
g_warning ("Unable to set state for menu which doesn't exist: %s", path);
|
g_message ("Unable to set state for menu which doesn't exist: %s", path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
22
app/xcf.c
22
app/xcf.c
|
@ -383,7 +383,7 @@ xcf_save_invoker (Argument *args)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("open failed on %s: %s\n", filename, g_strerror(errno));
|
g_message ("open failed on %s: %s\n", filename, g_strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
return_args = procedural_db_return_args (&xcf_plug_in_save_proc.db_info, success);
|
return_args = procedural_db_return_args (&xcf_plug_in_save_proc.db_info, success);
|
||||||
|
@ -1380,7 +1380,7 @@ xcf_load_image_props (XcfInfo *info,
|
||||||
(compression != COMPRESS_ZLIB) &&
|
(compression != COMPRESS_ZLIB) &&
|
||||||
(compression != COMPRESS_FRACTAL))
|
(compression != COMPRESS_FRACTAL))
|
||||||
{
|
{
|
||||||
g_warning ("unknown compression type: %d", (int) compression);
|
g_message ("unknown compression type: %d", (int) compression);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1411,7 +1411,7 @@ xcf_load_image_props (XcfInfo *info,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_warning ("unexpected/unknown image property: %d (skipping)", prop_type);
|
g_message ("unexpected/unknown image property: %d (skipping)", prop_type);
|
||||||
|
|
||||||
{
|
{
|
||||||
guint8 buf[16];
|
guint8 buf[16];
|
||||||
|
@ -1484,7 +1484,7 @@ xcf_load_layer_props (XcfInfo *info,
|
||||||
info->cp += xcf_read_int32 (info->fp, (guint32*) &layer->mode, 1);
|
info->cp += xcf_read_int32 (info->fp, (guint32*) &layer->mode, 1);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_warning ("unexpected/unknown layer property: %d (skipping)", prop_type);
|
g_message ("unexpected/unknown layer property: %d (skipping)", prop_type);
|
||||||
|
|
||||||
{
|
{
|
||||||
guint8 buf[16];
|
guint8 buf[16];
|
||||||
|
@ -1543,7 +1543,7 @@ xcf_load_channel_props (XcfInfo *info,
|
||||||
info->cp += xcf_read_int8 (info->fp, (guint8*) channel->col, 3);
|
info->cp += xcf_read_int8 (info->fp, (guint8*) channel->col, 3);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_warning ("unexpected/unknown channel property: %d (skipping)", prop_type);
|
g_message ("unexpected/unknown channel property: %d (skipping)", prop_type);
|
||||||
|
|
||||||
{
|
{
|
||||||
guint8 buf[16];
|
guint8 buf[16];
|
||||||
|
@ -1818,7 +1818,7 @@ xcf_load_hierarchy (XcfInfo *info,
|
||||||
|
|
||||||
if (offset == 0)
|
if (offset == 0)
|
||||||
{
|
{
|
||||||
g_warning ("not enough levels found in hierarchy");
|
g_message ("not enough levels found in hierarchy");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1843,7 +1843,7 @@ xcf_load_hierarchy (XcfInfo *info,
|
||||||
info->cp += xcf_read_int32 (info->fp, &offset, 1);
|
info->cp += xcf_read_int32 (info->fp, &offset, 1);
|
||||||
if (offset != 0)
|
if (offset != 0)
|
||||||
{
|
{
|
||||||
g_warning ("encountered garbage after reading hierarchy: %d", offset);
|
g_message ("encountered garbage after reading hierarchy: %d", offset);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1889,7 +1889,7 @@ xcf_load_level (XcfInfo *info,
|
||||||
{
|
{
|
||||||
if (offset == 0)
|
if (offset == 0)
|
||||||
{
|
{
|
||||||
g_warning ("not enough tiles found in level");
|
g_message ("not enough tiles found in level");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1931,7 +1931,7 @@ xcf_load_level (XcfInfo *info,
|
||||||
|
|
||||||
if (offset != 0)
|
if (offset != 0)
|
||||||
{
|
{
|
||||||
g_warning ("encountered garbage after reading level: %d", offset);
|
g_message ("encountered garbage after reading level: %d", offset);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2033,7 +2033,7 @@ xcf_load_tile_rle (XcfInfo *info,
|
||||||
size -= length;
|
size -= length;
|
||||||
|
|
||||||
if (size < 0)
|
if (size < 0)
|
||||||
g_warning ("xcf: uh oh! xcf rle tile loading error: %d", count);
|
g_message ("xcf: uh oh! xcf rle tile loading error: %d", count);
|
||||||
|
|
||||||
info->cp += xcf_read_int8 (info->fp, &val, 1);
|
info->cp += xcf_read_int8 (info->fp, &val, 1);
|
||||||
|
|
||||||
|
@ -2082,7 +2082,7 @@ xcf_swap_func (int fd,
|
||||||
|
|
||||||
if (err <= 0)
|
if (err <= 0)
|
||||||
{
|
{
|
||||||
g_warning ("unable to read tile data from xcf file: %d ( %d ) bytes read", err, nleft);
|
g_message ("unable to read tile data from xcf file: %d ( %d ) bytes read", err, nleft);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -383,7 +383,7 @@ xcf_save_invoker (Argument *args)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("open failed on %s: %s\n", filename, g_strerror(errno));
|
g_message ("open failed on %s: %s\n", filename, g_strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
return_args = procedural_db_return_args (&xcf_plug_in_save_proc.db_info, success);
|
return_args = procedural_db_return_args (&xcf_plug_in_save_proc.db_info, success);
|
||||||
|
@ -1380,7 +1380,7 @@ xcf_load_image_props (XcfInfo *info,
|
||||||
(compression != COMPRESS_ZLIB) &&
|
(compression != COMPRESS_ZLIB) &&
|
||||||
(compression != COMPRESS_FRACTAL))
|
(compression != COMPRESS_FRACTAL))
|
||||||
{
|
{
|
||||||
g_warning ("unknown compression type: %d", (int) compression);
|
g_message ("unknown compression type: %d", (int) compression);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1411,7 +1411,7 @@ xcf_load_image_props (XcfInfo *info,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_warning ("unexpected/unknown image property: %d (skipping)", prop_type);
|
g_message ("unexpected/unknown image property: %d (skipping)", prop_type);
|
||||||
|
|
||||||
{
|
{
|
||||||
guint8 buf[16];
|
guint8 buf[16];
|
||||||
|
@ -1484,7 +1484,7 @@ xcf_load_layer_props (XcfInfo *info,
|
||||||
info->cp += xcf_read_int32 (info->fp, (guint32*) &layer->mode, 1);
|
info->cp += xcf_read_int32 (info->fp, (guint32*) &layer->mode, 1);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_warning ("unexpected/unknown layer property: %d (skipping)", prop_type);
|
g_message ("unexpected/unknown layer property: %d (skipping)", prop_type);
|
||||||
|
|
||||||
{
|
{
|
||||||
guint8 buf[16];
|
guint8 buf[16];
|
||||||
|
@ -1543,7 +1543,7 @@ xcf_load_channel_props (XcfInfo *info,
|
||||||
info->cp += xcf_read_int8 (info->fp, (guint8*) channel->col, 3);
|
info->cp += xcf_read_int8 (info->fp, (guint8*) channel->col, 3);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_warning ("unexpected/unknown channel property: %d (skipping)", prop_type);
|
g_message ("unexpected/unknown channel property: %d (skipping)", prop_type);
|
||||||
|
|
||||||
{
|
{
|
||||||
guint8 buf[16];
|
guint8 buf[16];
|
||||||
|
@ -1818,7 +1818,7 @@ xcf_load_hierarchy (XcfInfo *info,
|
||||||
|
|
||||||
if (offset == 0)
|
if (offset == 0)
|
||||||
{
|
{
|
||||||
g_warning ("not enough levels found in hierarchy");
|
g_message ("not enough levels found in hierarchy");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1843,7 +1843,7 @@ xcf_load_hierarchy (XcfInfo *info,
|
||||||
info->cp += xcf_read_int32 (info->fp, &offset, 1);
|
info->cp += xcf_read_int32 (info->fp, &offset, 1);
|
||||||
if (offset != 0)
|
if (offset != 0)
|
||||||
{
|
{
|
||||||
g_warning ("encountered garbage after reading hierarchy: %d", offset);
|
g_message ("encountered garbage after reading hierarchy: %d", offset);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1889,7 +1889,7 @@ xcf_load_level (XcfInfo *info,
|
||||||
{
|
{
|
||||||
if (offset == 0)
|
if (offset == 0)
|
||||||
{
|
{
|
||||||
g_warning ("not enough tiles found in level");
|
g_message ("not enough tiles found in level");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1931,7 +1931,7 @@ xcf_load_level (XcfInfo *info,
|
||||||
|
|
||||||
if (offset != 0)
|
if (offset != 0)
|
||||||
{
|
{
|
||||||
g_warning ("encountered garbage after reading level: %d", offset);
|
g_message ("encountered garbage after reading level: %d", offset);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2033,7 +2033,7 @@ xcf_load_tile_rle (XcfInfo *info,
|
||||||
size -= length;
|
size -= length;
|
||||||
|
|
||||||
if (size < 0)
|
if (size < 0)
|
||||||
g_warning ("xcf: uh oh! xcf rle tile loading error: %d", count);
|
g_message ("xcf: uh oh! xcf rle tile loading error: %d", count);
|
||||||
|
|
||||||
info->cp += xcf_read_int8 (info->fp, &val, 1);
|
info->cp += xcf_read_int8 (info->fp, &val, 1);
|
||||||
|
|
||||||
|
@ -2082,7 +2082,7 @@ xcf_swap_func (int fd,
|
||||||
|
|
||||||
if (err <= 0)
|
if (err <= 0)
|
||||||
{
|
{
|
||||||
g_warning ("unable to read tile data from xcf file: %d ( %d ) bytes read", err, nleft);
|
g_message ("unable to read tile data from xcf file: %d ( %d ) bytes read", err, nleft);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,7 @@ gimp_tile_get (GTile *tile)
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("unexpected message: %d\n", msg.type);
|
g_message ("unexpected message: %d\n", msg.type);
|
||||||
gimp_quit ();
|
gimp_quit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ gimp_tile_get (GTile *tile)
|
||||||
(tile_data->height != tile->eheight) ||
|
(tile_data->height != tile->eheight) ||
|
||||||
(tile_data->bpp != tile->bpp))
|
(tile_data->bpp != tile->bpp))
|
||||||
{
|
{
|
||||||
g_warning ("received tile info did not match computed tile info\n");
|
g_message ("received tile info did not match computed tile info\n");
|
||||||
gimp_quit ();
|
gimp_quit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ gimp_tile_put (GTile *tile)
|
||||||
|
|
||||||
if (msg.type != GP_TILE_DATA)
|
if (msg.type != GP_TILE_DATA)
|
||||||
{
|
{
|
||||||
g_warning ("unexpected message: %d\n", msg.type);
|
g_message ("unexpected message: %d\n", msg.type);
|
||||||
gimp_quit ();
|
gimp_quit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ gimp_tile_put (GTile *tile)
|
||||||
|
|
||||||
if (msg.type != GP_TILE_ACK)
|
if (msg.type != GP_TILE_ACK)
|
||||||
{
|
{
|
||||||
g_warning ("unexpected message: %d\n", msg.type);
|
g_message ("unexpected message: %d\n", msg.type);
|
||||||
gimp_quit ();
|
gimp_quit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* cel.c -- KISS CEL file format plug-in for The GIMP
|
/* cel.c -- KISS CEL file format plug-in for The GIMP
|
||||||
* (copyright) 1997 Nick Lamb (njl195@ecs.soton.ac.uk)
|
* (copyright) 1997,1998 Nick Lamb (njl195@ecs.soton.ac.uk)
|
||||||
*
|
*
|
||||||
* Skeleton cloned from Michael Sweet's PNG plug-in. KISS format courtesy
|
* Skeleton cloned from Michael Sweet's PNG plug-in. KISS format courtesy
|
||||||
* of the KISS/GS documentation. Problem reports to the above address
|
* of the KISS/GS documentation. Problem reports to the above address
|
||||||
|
@ -14,10 +14,13 @@
|
||||||
* 0.6 File dialogs, palette handling, better magic behaviour
|
* 0.6 File dialogs, palette handling, better magic behaviour
|
||||||
* 0.7 Handle interactivity settings, tidy up
|
* 0.7 Handle interactivity settings, tidy up
|
||||||
* 1.0 Fixed for GIMP 0.99.27 running on GTK+ 1.0.0, and released
|
* 1.0 Fixed for GIMP 0.99.27 running on GTK+ 1.0.0, and released
|
||||||
|
* 1.1 Oops, #include unistd.h, thanks Tamito Kajiyama
|
||||||
|
* 1.2 Changed email address, tidied up
|
||||||
|
* 1.3 Added g_message features, fixed Saving bugs...
|
||||||
|
* 1.4 Offsets work (needed them for a nice example set)
|
||||||
*
|
*
|
||||||
* Possible future additions:
|
* Possible future additions:
|
||||||
* + Save (perhaps optionally?) the palette in a KCF
|
* + Save (perhaps optionally?) the palette in a KCF
|
||||||
* + Support offsets -- like GIF?
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -88,7 +91,7 @@ static void query(void) {
|
||||||
gimp_install_procedure("file_cel_load",
|
gimp_install_procedure("file_cel_load",
|
||||||
"Loads files in KISS CEL file format",
|
"Loads files in KISS CEL file format",
|
||||||
"This plug-in loads individual KISS cell files.",
|
"This plug-in loads individual KISS cell files.",
|
||||||
"Nick Lamb", "Nick Lamb", "April 1998", "<Load>/CEL", NULL, PROC_PLUG_IN,
|
"Nick Lamb", "Nick Lamb", "May 1998", "<Load>/CEL", NULL, PROC_PLUG_IN,
|
||||||
nload_args, nload_return_vals, load_args, load_return_vals);
|
nload_args, nload_return_vals, load_args, load_return_vals);
|
||||||
|
|
||||||
gimp_register_magic_load_handler("file_cel_load", "cel",
|
gimp_register_magic_load_handler("file_cel_load", "cel",
|
||||||
|
@ -97,7 +100,7 @@ static void query(void) {
|
||||||
gimp_install_procedure("file_cel_save",
|
gimp_install_procedure("file_cel_save",
|
||||||
"Saves files in KISS CEL file format",
|
"Saves files in KISS CEL file format",
|
||||||
"This plug-in saves individual KISS cell files.",
|
"This plug-in saves individual KISS cell files.",
|
||||||
"Nick Lamb", "Nick Lamb", "April 1998", "<Save>/CEL", "INDEXED*",
|
"Nick Lamb", "Nick Lamb", "May 1998", "<Save>/CEL", "INDEXEDA",
|
||||||
PROC_PLUG_IN, nsave_args, 0, save_args, NULL);
|
PROC_PLUG_IN, nsave_args, 0, save_args, NULL);
|
||||||
|
|
||||||
gimp_register_save_handler("file_cel_save", "cel", "");
|
gimp_register_save_handler("file_cel_save", "cel", "");
|
||||||
|
@ -175,6 +178,7 @@ static gint32 load_image(char *file, char *brief) {
|
||||||
char *progress; /* Title for progress display */
|
char *progress; /* Title for progress display */
|
||||||
guchar header[32]; /* File header */
|
guchar header[32]; /* File header */
|
||||||
int height, width, /* Dimensions of image */
|
int height, width, /* Dimensions of image */
|
||||||
|
offx, offy, /* Layer offets */
|
||||||
colours; /* Number of colours */
|
colours; /* Number of colours */
|
||||||
|
|
||||||
gint32 image, /* Image */
|
gint32 image, /* Image */
|
||||||
|
@ -192,7 +196,7 @@ static gint32 load_image(char *file, char *brief) {
|
||||||
fp = fopen(file, "r");
|
fp = fopen(file, "r");
|
||||||
|
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
g_print("Can't open file\n");
|
g_message("%s\nis not present or is unreadable", file);
|
||||||
gimp_quit();
|
gimp_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,17 +212,21 @@ static gint32 load_image(char *file, char *brief) {
|
||||||
colours= 16;
|
colours= 16;
|
||||||
width= header[0] + (256 * header[1]);
|
width= header[0] + (256 * header[1]);
|
||||||
height= header[2] + (256 * header[3]);
|
height= header[2] + (256 * header[3]);
|
||||||
|
offx= 0;
|
||||||
|
offy= 0;
|
||||||
} else { /* New-style image file, read full header */
|
} else { /* New-style image file, read full header */
|
||||||
fread(header, 28, 1, fp);
|
fread(header, 28, 1, fp);
|
||||||
colours= (1 << header[1]);
|
colours= (1 << header[1]);
|
||||||
width= header[4] + (256 * header[5]);
|
width= header[4] + (256 * header[5]);
|
||||||
height= header[6] + (256 * header[7]);
|
height= header[6] + (256 * header[7]);
|
||||||
|
offx= header[8] + (256 * header[9]);
|
||||||
|
offy= header[10] + (256 * header[11]);
|
||||||
}
|
}
|
||||||
|
|
||||||
image = gimp_image_new(width, height, INDEXED);
|
image = gimp_image_new(width + offx, height + offy, INDEXED);
|
||||||
|
|
||||||
if (image == -1) {
|
if (image == -1) {
|
||||||
g_print("Can't allocate new image\n");
|
g_message("Can't create a new image");
|
||||||
gimp_quit();
|
gimp_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,6 +237,7 @@ static gint32 load_image(char *file, char *brief) {
|
||||||
layer = gimp_layer_new(image, "Background", width, height,
|
layer = gimp_layer_new(image, "Background", width, height,
|
||||||
INDEXEDA_IMAGE, 100, NORMAL_MODE);
|
INDEXEDA_IMAGE, 100, NORMAL_MODE);
|
||||||
gimp_image_add_layer(image, layer, 0);
|
gimp_image_add_layer(image, layer, 0);
|
||||||
|
gimp_layer_set_offsets(layer, offx, offy);
|
||||||
|
|
||||||
/* Get the drawable and set the pixel region for our load... */
|
/* Get the drawable and set the pixel region for our load... */
|
||||||
|
|
||||||
|
@ -248,19 +257,37 @@ static gint32 load_image(char *file, char *brief) {
|
||||||
case 16:
|
case 16:
|
||||||
fread(buffer, (width+1)/2, 1, fp);
|
fread(buffer, (width+1)/2, 1, fp);
|
||||||
for (j = 0, k = 0; j < width*2; j+= 4, ++k) {
|
for (j = 0, k = 0; j < width*2; j+= 4, ++k) {
|
||||||
line[j]= buffer[k] / 16;
|
if (buffer[k] / 16 == 0) {
|
||||||
line[j+1]= line[j] ? 255 : 0;
|
line[j]= 16;
|
||||||
line[j+2]= buffer[k] & 15;
|
line[j+1]= 0;
|
||||||
line[j+3]= line[j+2] ? 255 : 0;
|
} else {
|
||||||
|
line[j]= (buffer[k] / 16) - 1;
|
||||||
|
line[j+1]= 255;
|
||||||
|
}
|
||||||
|
if (buffer[k] % 16 == 0) {
|
||||||
|
line[j+2]= 16;
|
||||||
|
line[j+3]= 0;
|
||||||
|
} else {
|
||||||
|
line[j+2]= (buffer[k] % 16) - 1;
|
||||||
|
line[j+3]= 255;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 256:
|
case 256:
|
||||||
fread(buffer, width, 1, fp);
|
fread(buffer, width, 1, fp);
|
||||||
for (j = 0, k = 0; j < width*2; j+= 2, ++k) {
|
for (j = 0, k = 0; j < width*2; j+= 2, ++k) {
|
||||||
line[j]= buffer[k];
|
if (buffer[k] == 0) {
|
||||||
line[j+1]= line[j] ? 255 : 0;
|
line[j]= 255;
|
||||||
|
line[j+1]= 0;
|
||||||
|
} else {
|
||||||
|
line[j]= buffer[k] - 1;
|
||||||
|
line[j+1]= 255;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
g_error("Unsupported number of colours (%d)\n", colours);
|
||||||
|
gimp_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_pixel_rgn_set_rect(&pixel_rgn, line, 0, i, drawable->width, 1);
|
gimp_pixel_rgn_set_rect(&pixel_rgn, line, 0, i, drawable->width, 1);
|
||||||
|
@ -270,8 +297,8 @@ static gint32 load_image(char *file, char *brief) {
|
||||||
/* Close image files, give back allocated memory */
|
/* Close image files, give back allocated memory */
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
free(buffer);
|
g_free(buffer);
|
||||||
free(line);
|
g_free(line);
|
||||||
|
|
||||||
/* Use palette from file or otherwise default grey palette */
|
/* Use palette from file or otherwise default grey palette */
|
||||||
palette = g_new(guchar, colours*3);
|
palette = g_new(guchar, colours*3);
|
||||||
|
@ -291,12 +318,12 @@ static gint32 load_image(char *file, char *brief) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_image_set_cmap(image, palette, colours);
|
gimp_image_set_cmap(image, palette + 3, colours - 1);
|
||||||
|
|
||||||
/* Close palette file, give back allocated memory */
|
/* Close palette file, give back allocated memory */
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
free(palette);
|
g_free(palette);
|
||||||
|
|
||||||
/* Now get everything redrawn and hand back the finished image */
|
/* Now get everything redrawn and hand back the finished image */
|
||||||
|
|
||||||
|
@ -344,7 +371,8 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) {
|
||||||
FILE* fp; /* Write file pointer */
|
FILE* fp; /* Write file pointer */
|
||||||
char *progress; /* Title for progress display */
|
char *progress; /* Title for progress display */
|
||||||
guchar header[32]; /* File header */
|
guchar header[32]; /* File header */
|
||||||
gint colours, type; /* Number of colours, type of layer */
|
gint colours, type, /* Number of colours, type of layer */
|
||||||
|
offx, offy; /* Layer offsets */
|
||||||
|
|
||||||
guchar *buffer, /* Temporary buffer */
|
guchar *buffer, /* Temporary buffer */
|
||||||
*line; /* Pixel data */
|
*line; /* Pixel data */
|
||||||
|
@ -355,28 +383,36 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) {
|
||||||
|
|
||||||
/* Check that this is an indexed image, fail otherwise */
|
/* Check that this is an indexed image, fail otherwise */
|
||||||
type= gimp_drawable_type(layer);
|
type= gimp_drawable_type(layer);
|
||||||
if (type != INDEXED_IMAGE && type != INDEXEDA_IMAGE) {
|
if (type != INDEXEDA_IMAGE) {
|
||||||
g_print("GIMP tried to save a non-indexed image as CEL.\n");
|
g_message("Only an indexed-alpha image can be saved in CEL format");
|
||||||
return FALSE;
|
gimp_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Find out how offset this layer was */
|
||||||
|
gimp_drawable_offsets(layer, &offx, &offy);
|
||||||
|
|
||||||
drawable = gimp_drawable_get(layer);
|
drawable = gimp_drawable_get(layer);
|
||||||
|
|
||||||
/* Open the file for writing */
|
/* Open the file for writing */
|
||||||
fp = fopen(file, "w");
|
fp = fopen(file, "w");
|
||||||
|
|
||||||
|
if (fp == NULL) {
|
||||||
|
g_message("Couldn't write image to\n%s", file);
|
||||||
|
gimp_quit();
|
||||||
|
}
|
||||||
|
|
||||||
progress= g_malloc(strlen(brief) + 9);
|
progress= g_malloc(strlen(brief) + 9);
|
||||||
sprintf(progress, "Saving %s:", brief);
|
sprintf(progress, "Saving %s:", brief);
|
||||||
gimp_progress_init(progress);
|
gimp_progress_init(progress);
|
||||||
|
|
||||||
/* Headers */
|
/* Headers */
|
||||||
memset(header, 0, 32);
|
bzero(header, 32);
|
||||||
strcpy(header, "KiSS");
|
strcpy(header, "KiSS");
|
||||||
header[4]= 0x20;
|
header[4]= 0x20;
|
||||||
|
|
||||||
/* Work out whether to save as 8bit or 4bit */
|
/* Work out whether to save as 8bit or 4bit */
|
||||||
gimp_image_get_cmap(image, &colours);
|
gimp_image_get_cmap(image, &colours);
|
||||||
if (colours > 16) {
|
if (colours > 15) {
|
||||||
header[5]= 8;
|
header[5]= 8;
|
||||||
} else {
|
} else {
|
||||||
header[5]= 4;
|
header[5]= 4;
|
||||||
|
@ -387,6 +423,10 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) {
|
||||||
header[9]= drawable->width / 256;
|
header[9]= drawable->width / 256;
|
||||||
header[10]= drawable->height % 256;
|
header[10]= drawable->height % 256;
|
||||||
header[11]= drawable->height / 256;
|
header[11]= drawable->height / 256;
|
||||||
|
header[12]= offx % 256;
|
||||||
|
header[13]= offx / 256;
|
||||||
|
header[14]= offy % 256;
|
||||||
|
header[15]= offy / 256;
|
||||||
fwrite(header, 32, 1, fp);
|
fwrite(header, 32, 1, fp);
|
||||||
|
|
||||||
/* Arrange for memory etc. */
|
/* Arrange for memory etc. */
|
||||||
|
@ -398,21 +438,27 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) {
|
||||||
/* Get the image from the GIMP one line at a time and write it out */
|
/* Get the image from the GIMP one line at a time and write it out */
|
||||||
for (i = 0; i < drawable->height; ++i) {
|
for (i = 0; i < drawable->height; ++i) {
|
||||||
gimp_pixel_rgn_get_rect(&pixel_rgn, line, 0, i, drawable->width, 1);
|
gimp_pixel_rgn_get_rect(&pixel_rgn, line, 0, i, drawable->width, 1);
|
||||||
|
memset(buffer, 0, drawable->width);
|
||||||
|
|
||||||
switch (colours) {
|
if (colours > 16) {
|
||||||
case 16:
|
|
||||||
for (j = 0, k = 0; j < drawable->width*2; j+= 4, ++k) {
|
|
||||||
buffer[k]= 16 * (line[j+1] ? line[j] : 0)
|
|
||||||
+ (line[j+3] ? line[j+2] : 0);
|
|
||||||
}
|
|
||||||
fwrite(buffer, (drawable->width+1)/2, 1, fp);
|
|
||||||
break;
|
|
||||||
case 256:
|
|
||||||
for (j = 0, k = 0; j < drawable->width*2; j+= 2, ++k) {
|
for (j = 0, k = 0; j < drawable->width*2; j+= 2, ++k) {
|
||||||
buffer[k]= line[j+1] ? line[j] : 0;
|
if (line[j+1] > 127) {
|
||||||
|
buffer[k]= line[j] + 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fwrite(buffer, drawable->width, 1, fp);
|
fwrite(buffer, drawable->width, 1, fp);
|
||||||
break;
|
|
||||||
|
} else {
|
||||||
|
for (j = 0, k = 0; j < drawable->width*2; j+= 4, ++k) {
|
||||||
|
buffer[k]= 0;
|
||||||
|
if (line[j+1] > 127) {
|
||||||
|
buffer[k]+= (line[j] + 1)<< 4;
|
||||||
|
}
|
||||||
|
if (line[j+3] > 127) {
|
||||||
|
buffer[k]+= (line[j+2] + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fwrite(buffer, (drawable->width+1)/2, 1, fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_progress_update((float) i / (float) drawable->height);
|
gimp_progress_update((float) i / (float) drawable->height);
|
||||||
|
@ -420,8 +466,8 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) {
|
||||||
|
|
||||||
/* Close files, give back allocated memory */
|
/* Close files, give back allocated memory */
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
free(buffer);
|
g_free(buffer);
|
||||||
free(line);
|
g_free(line);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,24 +245,24 @@ save_image (char *filename,
|
||||||
/* fork off a bzip2 process */
|
/* fork off a bzip2 process */
|
||||||
if ((pid = fork()) < 0)
|
if ((pid = fork()) < 0)
|
||||||
{
|
{
|
||||||
g_warning ("bz2: fork failed: %s\n", g_strerror(errno));
|
g_message ("bz2: fork failed: %s\n", g_strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if (pid == 0)
|
else if (pid == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!(f = fopen(filename,"w"))){
|
if (!(f = fopen(filename,"w"))){
|
||||||
g_warning("bz2: fopen failed: %s\n", g_strerror(errno));
|
g_message("bz2: fopen failed: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make stdout for this process be the output file */
|
/* make stdout for this process be the output file */
|
||||||
if (-1 == dup2(fileno(f),fileno(stdout)))
|
if (-1 == dup2(fileno(f),fileno(stdout)))
|
||||||
g_warning ("bz2: dup2 failed: %s\n", g_strerror(errno));
|
g_message ("bz2: dup2 failed: %s\n", g_strerror(errno));
|
||||||
|
|
||||||
/* and bzip2 into it */
|
/* and bzip2 into it */
|
||||||
execlp ("bzip2", "bzip2", "-cf", tmpname, NULL);
|
execlp ("bzip2", "bzip2", "-cf", tmpname, NULL);
|
||||||
g_warning ("bz2: exec failed: bzip2: %s\n", g_strerror(errno));
|
g_message ("bz2: exec failed: bzip2: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -272,7 +272,7 @@ save_image (char *filename,
|
||||||
if (!WIFEXITED(status) ||
|
if (!WIFEXITED(status) ||
|
||||||
WEXITSTATUS(status) != 0)
|
WEXITSTATUS(status) != 0)
|
||||||
{
|
{
|
||||||
g_warning ("bz2: bzip2 exited abnormally on file %s\n", tmpname);
|
g_message ("bz2: bzip2 exited abnormally on file %s\n", tmpname);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -305,24 +305,24 @@ load_image (char *filename, gint32 run_mode)
|
||||||
/* fork off a g(un)zip and wait for it */
|
/* fork off a g(un)zip and wait for it */
|
||||||
if ((pid = fork()) < 0)
|
if ((pid = fork()) < 0)
|
||||||
{
|
{
|
||||||
g_warning ("bz2: fork failed: %s\n", g_strerror(errno));
|
g_message ("bz2: fork failed: %s\n", g_strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if (pid == 0) /* child process */
|
else if (pid == 0) /* child process */
|
||||||
{
|
{
|
||||||
FILE* f;
|
FILE* f;
|
||||||
if (!(f = fopen(tmpname,"w"))){
|
if (!(f = fopen(tmpname,"w"))){
|
||||||
g_warning("bz2: fopen failed: %s\n", g_strerror(errno));
|
g_message("bz2: fopen failed: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make stdout for this child process be the temp file */
|
/* make stdout for this child process be the temp file */
|
||||||
if (-1 == dup2(fileno(f),fileno(stdout)))
|
if (-1 == dup2(fileno(f),fileno(stdout)))
|
||||||
g_warning ("bz2: dup2 failed: %s\n", g_strerror(errno));
|
g_message ("bz2: dup2 failed: %s\n", g_strerror(errno));
|
||||||
|
|
||||||
/* and unzip into it */
|
/* and unzip into it */
|
||||||
execlp ("bzip2", "bzip2", "-cfd", filename, NULL);
|
execlp ("bzip2", "bzip2", "-cfd", filename, NULL);
|
||||||
g_warning ("bz2: exec failed: bunzip2: %s\n", g_strerror(errno));
|
g_message ("bz2: exec failed: bunzip2: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
else /* parent process */
|
else /* parent process */
|
||||||
|
@ -332,7 +332,7 @@ load_image (char *filename, gint32 run_mode)
|
||||||
if (!WIFEXITED(status) ||
|
if (!WIFEXITED(status) ||
|
||||||
WEXITSTATUS(status) != 0)
|
WEXITSTATUS(status) != 0)
|
||||||
{
|
{
|
||||||
g_warning ("bz2: bzip2 exited abnormally on file %s\n", filename);
|
g_message ("bz2: bzip2 exited abnormally on file %s\n", filename);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -386,7 +386,7 @@ static char* find_extension (char* filename)
|
||||||
while (1) {
|
while (1) {
|
||||||
if (!ext || ext[1] == 0 || strchr(ext, '/'))
|
if (!ext || ext[1] == 0 || strchr(ext, '/'))
|
||||||
{
|
{
|
||||||
g_warning ("bz2: can't open bzip2ed file without a sensible extension\n");
|
g_message ("bz2: can't open bzip2ed file without a sensible extension\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (0 == strcmp(ext, ".xcfbz2")) {
|
if (0 == strcmp(ext, ".xcfbz2")) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* cel.c -- KISS CEL file format plug-in for The GIMP
|
/* cel.c -- KISS CEL file format plug-in for The GIMP
|
||||||
* (copyright) 1997 Nick Lamb (njl195@ecs.soton.ac.uk)
|
* (copyright) 1997,1998 Nick Lamb (njl195@ecs.soton.ac.uk)
|
||||||
*
|
*
|
||||||
* Skeleton cloned from Michael Sweet's PNG plug-in. KISS format courtesy
|
* Skeleton cloned from Michael Sweet's PNG plug-in. KISS format courtesy
|
||||||
* of the KISS/GS documentation. Problem reports to the above address
|
* of the KISS/GS documentation. Problem reports to the above address
|
||||||
|
@ -14,10 +14,13 @@
|
||||||
* 0.6 File dialogs, palette handling, better magic behaviour
|
* 0.6 File dialogs, palette handling, better magic behaviour
|
||||||
* 0.7 Handle interactivity settings, tidy up
|
* 0.7 Handle interactivity settings, tidy up
|
||||||
* 1.0 Fixed for GIMP 0.99.27 running on GTK+ 1.0.0, and released
|
* 1.0 Fixed for GIMP 0.99.27 running on GTK+ 1.0.0, and released
|
||||||
|
* 1.1 Oops, #include unistd.h, thanks Tamito Kajiyama
|
||||||
|
* 1.2 Changed email address, tidied up
|
||||||
|
* 1.3 Added g_message features, fixed Saving bugs...
|
||||||
|
* 1.4 Offsets work (needed them for a nice example set)
|
||||||
*
|
*
|
||||||
* Possible future additions:
|
* Possible future additions:
|
||||||
* + Save (perhaps optionally?) the palette in a KCF
|
* + Save (perhaps optionally?) the palette in a KCF
|
||||||
* + Support offsets -- like GIF?
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -88,7 +91,7 @@ static void query(void) {
|
||||||
gimp_install_procedure("file_cel_load",
|
gimp_install_procedure("file_cel_load",
|
||||||
"Loads files in KISS CEL file format",
|
"Loads files in KISS CEL file format",
|
||||||
"This plug-in loads individual KISS cell files.",
|
"This plug-in loads individual KISS cell files.",
|
||||||
"Nick Lamb", "Nick Lamb", "April 1998", "<Load>/CEL", NULL, PROC_PLUG_IN,
|
"Nick Lamb", "Nick Lamb", "May 1998", "<Load>/CEL", NULL, PROC_PLUG_IN,
|
||||||
nload_args, nload_return_vals, load_args, load_return_vals);
|
nload_args, nload_return_vals, load_args, load_return_vals);
|
||||||
|
|
||||||
gimp_register_magic_load_handler("file_cel_load", "cel",
|
gimp_register_magic_load_handler("file_cel_load", "cel",
|
||||||
|
@ -97,7 +100,7 @@ static void query(void) {
|
||||||
gimp_install_procedure("file_cel_save",
|
gimp_install_procedure("file_cel_save",
|
||||||
"Saves files in KISS CEL file format",
|
"Saves files in KISS CEL file format",
|
||||||
"This plug-in saves individual KISS cell files.",
|
"This plug-in saves individual KISS cell files.",
|
||||||
"Nick Lamb", "Nick Lamb", "April 1998", "<Save>/CEL", "INDEXED*",
|
"Nick Lamb", "Nick Lamb", "May 1998", "<Save>/CEL", "INDEXEDA",
|
||||||
PROC_PLUG_IN, nsave_args, 0, save_args, NULL);
|
PROC_PLUG_IN, nsave_args, 0, save_args, NULL);
|
||||||
|
|
||||||
gimp_register_save_handler("file_cel_save", "cel", "");
|
gimp_register_save_handler("file_cel_save", "cel", "");
|
||||||
|
@ -175,6 +178,7 @@ static gint32 load_image(char *file, char *brief) {
|
||||||
char *progress; /* Title for progress display */
|
char *progress; /* Title for progress display */
|
||||||
guchar header[32]; /* File header */
|
guchar header[32]; /* File header */
|
||||||
int height, width, /* Dimensions of image */
|
int height, width, /* Dimensions of image */
|
||||||
|
offx, offy, /* Layer offets */
|
||||||
colours; /* Number of colours */
|
colours; /* Number of colours */
|
||||||
|
|
||||||
gint32 image, /* Image */
|
gint32 image, /* Image */
|
||||||
|
@ -192,7 +196,7 @@ static gint32 load_image(char *file, char *brief) {
|
||||||
fp = fopen(file, "r");
|
fp = fopen(file, "r");
|
||||||
|
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
g_print("Can't open file\n");
|
g_message("%s\nis not present or is unreadable", file);
|
||||||
gimp_quit();
|
gimp_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,17 +212,21 @@ static gint32 load_image(char *file, char *brief) {
|
||||||
colours= 16;
|
colours= 16;
|
||||||
width= header[0] + (256 * header[1]);
|
width= header[0] + (256 * header[1]);
|
||||||
height= header[2] + (256 * header[3]);
|
height= header[2] + (256 * header[3]);
|
||||||
|
offx= 0;
|
||||||
|
offy= 0;
|
||||||
} else { /* New-style image file, read full header */
|
} else { /* New-style image file, read full header */
|
||||||
fread(header, 28, 1, fp);
|
fread(header, 28, 1, fp);
|
||||||
colours= (1 << header[1]);
|
colours= (1 << header[1]);
|
||||||
width= header[4] + (256 * header[5]);
|
width= header[4] + (256 * header[5]);
|
||||||
height= header[6] + (256 * header[7]);
|
height= header[6] + (256 * header[7]);
|
||||||
|
offx= header[8] + (256 * header[9]);
|
||||||
|
offy= header[10] + (256 * header[11]);
|
||||||
}
|
}
|
||||||
|
|
||||||
image = gimp_image_new(width, height, INDEXED);
|
image = gimp_image_new(width + offx, height + offy, INDEXED);
|
||||||
|
|
||||||
if (image == -1) {
|
if (image == -1) {
|
||||||
g_print("Can't allocate new image\n");
|
g_message("Can't create a new image");
|
||||||
gimp_quit();
|
gimp_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,6 +237,7 @@ static gint32 load_image(char *file, char *brief) {
|
||||||
layer = gimp_layer_new(image, "Background", width, height,
|
layer = gimp_layer_new(image, "Background", width, height,
|
||||||
INDEXEDA_IMAGE, 100, NORMAL_MODE);
|
INDEXEDA_IMAGE, 100, NORMAL_MODE);
|
||||||
gimp_image_add_layer(image, layer, 0);
|
gimp_image_add_layer(image, layer, 0);
|
||||||
|
gimp_layer_set_offsets(layer, offx, offy);
|
||||||
|
|
||||||
/* Get the drawable and set the pixel region for our load... */
|
/* Get the drawable and set the pixel region for our load... */
|
||||||
|
|
||||||
|
@ -248,19 +257,37 @@ static gint32 load_image(char *file, char *brief) {
|
||||||
case 16:
|
case 16:
|
||||||
fread(buffer, (width+1)/2, 1, fp);
|
fread(buffer, (width+1)/2, 1, fp);
|
||||||
for (j = 0, k = 0; j < width*2; j+= 4, ++k) {
|
for (j = 0, k = 0; j < width*2; j+= 4, ++k) {
|
||||||
line[j]= buffer[k] / 16;
|
if (buffer[k] / 16 == 0) {
|
||||||
line[j+1]= line[j] ? 255 : 0;
|
line[j]= 16;
|
||||||
line[j+2]= buffer[k] & 15;
|
line[j+1]= 0;
|
||||||
line[j+3]= line[j+2] ? 255 : 0;
|
} else {
|
||||||
|
line[j]= (buffer[k] / 16) - 1;
|
||||||
|
line[j+1]= 255;
|
||||||
|
}
|
||||||
|
if (buffer[k] % 16 == 0) {
|
||||||
|
line[j+2]= 16;
|
||||||
|
line[j+3]= 0;
|
||||||
|
} else {
|
||||||
|
line[j+2]= (buffer[k] % 16) - 1;
|
||||||
|
line[j+3]= 255;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 256:
|
case 256:
|
||||||
fread(buffer, width, 1, fp);
|
fread(buffer, width, 1, fp);
|
||||||
for (j = 0, k = 0; j < width*2; j+= 2, ++k) {
|
for (j = 0, k = 0; j < width*2; j+= 2, ++k) {
|
||||||
line[j]= buffer[k];
|
if (buffer[k] == 0) {
|
||||||
line[j+1]= line[j] ? 255 : 0;
|
line[j]= 255;
|
||||||
|
line[j+1]= 0;
|
||||||
|
} else {
|
||||||
|
line[j]= buffer[k] - 1;
|
||||||
|
line[j+1]= 255;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
g_error("Unsupported number of colours (%d)\n", colours);
|
||||||
|
gimp_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_pixel_rgn_set_rect(&pixel_rgn, line, 0, i, drawable->width, 1);
|
gimp_pixel_rgn_set_rect(&pixel_rgn, line, 0, i, drawable->width, 1);
|
||||||
|
@ -270,8 +297,8 @@ static gint32 load_image(char *file, char *brief) {
|
||||||
/* Close image files, give back allocated memory */
|
/* Close image files, give back allocated memory */
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
free(buffer);
|
g_free(buffer);
|
||||||
free(line);
|
g_free(line);
|
||||||
|
|
||||||
/* Use palette from file or otherwise default grey palette */
|
/* Use palette from file or otherwise default grey palette */
|
||||||
palette = g_new(guchar, colours*3);
|
palette = g_new(guchar, colours*3);
|
||||||
|
@ -291,12 +318,12 @@ static gint32 load_image(char *file, char *brief) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_image_set_cmap(image, palette, colours);
|
gimp_image_set_cmap(image, palette + 3, colours - 1);
|
||||||
|
|
||||||
/* Close palette file, give back allocated memory */
|
/* Close palette file, give back allocated memory */
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
free(palette);
|
g_free(palette);
|
||||||
|
|
||||||
/* Now get everything redrawn and hand back the finished image */
|
/* Now get everything redrawn and hand back the finished image */
|
||||||
|
|
||||||
|
@ -344,7 +371,8 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) {
|
||||||
FILE* fp; /* Write file pointer */
|
FILE* fp; /* Write file pointer */
|
||||||
char *progress; /* Title for progress display */
|
char *progress; /* Title for progress display */
|
||||||
guchar header[32]; /* File header */
|
guchar header[32]; /* File header */
|
||||||
gint colours, type; /* Number of colours, type of layer */
|
gint colours, type, /* Number of colours, type of layer */
|
||||||
|
offx, offy; /* Layer offsets */
|
||||||
|
|
||||||
guchar *buffer, /* Temporary buffer */
|
guchar *buffer, /* Temporary buffer */
|
||||||
*line; /* Pixel data */
|
*line; /* Pixel data */
|
||||||
|
@ -355,28 +383,36 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) {
|
||||||
|
|
||||||
/* Check that this is an indexed image, fail otherwise */
|
/* Check that this is an indexed image, fail otherwise */
|
||||||
type= gimp_drawable_type(layer);
|
type= gimp_drawable_type(layer);
|
||||||
if (type != INDEXED_IMAGE && type != INDEXEDA_IMAGE) {
|
if (type != INDEXEDA_IMAGE) {
|
||||||
g_print("GIMP tried to save a non-indexed image as CEL.\n");
|
g_message("Only an indexed-alpha image can be saved in CEL format");
|
||||||
return FALSE;
|
gimp_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Find out how offset this layer was */
|
||||||
|
gimp_drawable_offsets(layer, &offx, &offy);
|
||||||
|
|
||||||
drawable = gimp_drawable_get(layer);
|
drawable = gimp_drawable_get(layer);
|
||||||
|
|
||||||
/* Open the file for writing */
|
/* Open the file for writing */
|
||||||
fp = fopen(file, "w");
|
fp = fopen(file, "w");
|
||||||
|
|
||||||
|
if (fp == NULL) {
|
||||||
|
g_message("Couldn't write image to\n%s", file);
|
||||||
|
gimp_quit();
|
||||||
|
}
|
||||||
|
|
||||||
progress= g_malloc(strlen(brief) + 9);
|
progress= g_malloc(strlen(brief) + 9);
|
||||||
sprintf(progress, "Saving %s:", brief);
|
sprintf(progress, "Saving %s:", brief);
|
||||||
gimp_progress_init(progress);
|
gimp_progress_init(progress);
|
||||||
|
|
||||||
/* Headers */
|
/* Headers */
|
||||||
memset(header, 0, 32);
|
bzero(header, 32);
|
||||||
strcpy(header, "KiSS");
|
strcpy(header, "KiSS");
|
||||||
header[4]= 0x20;
|
header[4]= 0x20;
|
||||||
|
|
||||||
/* Work out whether to save as 8bit or 4bit */
|
/* Work out whether to save as 8bit or 4bit */
|
||||||
gimp_image_get_cmap(image, &colours);
|
gimp_image_get_cmap(image, &colours);
|
||||||
if (colours > 16) {
|
if (colours > 15) {
|
||||||
header[5]= 8;
|
header[5]= 8;
|
||||||
} else {
|
} else {
|
||||||
header[5]= 4;
|
header[5]= 4;
|
||||||
|
@ -387,6 +423,10 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) {
|
||||||
header[9]= drawable->width / 256;
|
header[9]= drawable->width / 256;
|
||||||
header[10]= drawable->height % 256;
|
header[10]= drawable->height % 256;
|
||||||
header[11]= drawable->height / 256;
|
header[11]= drawable->height / 256;
|
||||||
|
header[12]= offx % 256;
|
||||||
|
header[13]= offx / 256;
|
||||||
|
header[14]= offy % 256;
|
||||||
|
header[15]= offy / 256;
|
||||||
fwrite(header, 32, 1, fp);
|
fwrite(header, 32, 1, fp);
|
||||||
|
|
||||||
/* Arrange for memory etc. */
|
/* Arrange for memory etc. */
|
||||||
|
@ -398,21 +438,27 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) {
|
||||||
/* Get the image from the GIMP one line at a time and write it out */
|
/* Get the image from the GIMP one line at a time and write it out */
|
||||||
for (i = 0; i < drawable->height; ++i) {
|
for (i = 0; i < drawable->height; ++i) {
|
||||||
gimp_pixel_rgn_get_rect(&pixel_rgn, line, 0, i, drawable->width, 1);
|
gimp_pixel_rgn_get_rect(&pixel_rgn, line, 0, i, drawable->width, 1);
|
||||||
|
memset(buffer, 0, drawable->width);
|
||||||
|
|
||||||
switch (colours) {
|
if (colours > 16) {
|
||||||
case 16:
|
|
||||||
for (j = 0, k = 0; j < drawable->width*2; j+= 4, ++k) {
|
|
||||||
buffer[k]= 16 * (line[j+1] ? line[j] : 0)
|
|
||||||
+ (line[j+3] ? line[j+2] : 0);
|
|
||||||
}
|
|
||||||
fwrite(buffer, (drawable->width+1)/2, 1, fp);
|
|
||||||
break;
|
|
||||||
case 256:
|
|
||||||
for (j = 0, k = 0; j < drawable->width*2; j+= 2, ++k) {
|
for (j = 0, k = 0; j < drawable->width*2; j+= 2, ++k) {
|
||||||
buffer[k]= line[j+1] ? line[j] : 0;
|
if (line[j+1] > 127) {
|
||||||
|
buffer[k]= line[j] + 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fwrite(buffer, drawable->width, 1, fp);
|
fwrite(buffer, drawable->width, 1, fp);
|
||||||
break;
|
|
||||||
|
} else {
|
||||||
|
for (j = 0, k = 0; j < drawable->width*2; j+= 4, ++k) {
|
||||||
|
buffer[k]= 0;
|
||||||
|
if (line[j+1] > 127) {
|
||||||
|
buffer[k]+= (line[j] + 1)<< 4;
|
||||||
|
}
|
||||||
|
if (line[j+3] > 127) {
|
||||||
|
buffer[k]+= (line[j+2] + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fwrite(buffer, (drawable->width+1)/2, 1, fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_progress_update((float) i / (float) drawable->height);
|
gimp_progress_update((float) i / (float) drawable->height);
|
||||||
|
@ -420,8 +466,8 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) {
|
||||||
|
|
||||||
/* Close files, give back allocated memory */
|
/* Close files, give back allocated memory */
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
free(buffer);
|
g_free(buffer);
|
||||||
free(line);
|
g_free(line);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,24 +245,24 @@ save_image (char *filename,
|
||||||
/* fork off a bzip2 process */
|
/* fork off a bzip2 process */
|
||||||
if ((pid = fork()) < 0)
|
if ((pid = fork()) < 0)
|
||||||
{
|
{
|
||||||
g_warning ("bz2: fork failed: %s\n", g_strerror(errno));
|
g_message ("bz2: fork failed: %s\n", g_strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if (pid == 0)
|
else if (pid == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!(f = fopen(filename,"w"))){
|
if (!(f = fopen(filename,"w"))){
|
||||||
g_warning("bz2: fopen failed: %s\n", g_strerror(errno));
|
g_message("bz2: fopen failed: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make stdout for this process be the output file */
|
/* make stdout for this process be the output file */
|
||||||
if (-1 == dup2(fileno(f),fileno(stdout)))
|
if (-1 == dup2(fileno(f),fileno(stdout)))
|
||||||
g_warning ("bz2: dup2 failed: %s\n", g_strerror(errno));
|
g_message ("bz2: dup2 failed: %s\n", g_strerror(errno));
|
||||||
|
|
||||||
/* and bzip2 into it */
|
/* and bzip2 into it */
|
||||||
execlp ("bzip2", "bzip2", "-cf", tmpname, NULL);
|
execlp ("bzip2", "bzip2", "-cf", tmpname, NULL);
|
||||||
g_warning ("bz2: exec failed: bzip2: %s\n", g_strerror(errno));
|
g_message ("bz2: exec failed: bzip2: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -272,7 +272,7 @@ save_image (char *filename,
|
||||||
if (!WIFEXITED(status) ||
|
if (!WIFEXITED(status) ||
|
||||||
WEXITSTATUS(status) != 0)
|
WEXITSTATUS(status) != 0)
|
||||||
{
|
{
|
||||||
g_warning ("bz2: bzip2 exited abnormally on file %s\n", tmpname);
|
g_message ("bz2: bzip2 exited abnormally on file %s\n", tmpname);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -305,24 +305,24 @@ load_image (char *filename, gint32 run_mode)
|
||||||
/* fork off a g(un)zip and wait for it */
|
/* fork off a g(un)zip and wait for it */
|
||||||
if ((pid = fork()) < 0)
|
if ((pid = fork()) < 0)
|
||||||
{
|
{
|
||||||
g_warning ("bz2: fork failed: %s\n", g_strerror(errno));
|
g_message ("bz2: fork failed: %s\n", g_strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if (pid == 0) /* child process */
|
else if (pid == 0) /* child process */
|
||||||
{
|
{
|
||||||
FILE* f;
|
FILE* f;
|
||||||
if (!(f = fopen(tmpname,"w"))){
|
if (!(f = fopen(tmpname,"w"))){
|
||||||
g_warning("bz2: fopen failed: %s\n", g_strerror(errno));
|
g_message("bz2: fopen failed: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make stdout for this child process be the temp file */
|
/* make stdout for this child process be the temp file */
|
||||||
if (-1 == dup2(fileno(f),fileno(stdout)))
|
if (-1 == dup2(fileno(f),fileno(stdout)))
|
||||||
g_warning ("bz2: dup2 failed: %s\n", g_strerror(errno));
|
g_message ("bz2: dup2 failed: %s\n", g_strerror(errno));
|
||||||
|
|
||||||
/* and unzip into it */
|
/* and unzip into it */
|
||||||
execlp ("bzip2", "bzip2", "-cfd", filename, NULL);
|
execlp ("bzip2", "bzip2", "-cfd", filename, NULL);
|
||||||
g_warning ("bz2: exec failed: bunzip2: %s\n", g_strerror(errno));
|
g_message ("bz2: exec failed: bunzip2: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
else /* parent process */
|
else /* parent process */
|
||||||
|
@ -332,7 +332,7 @@ load_image (char *filename, gint32 run_mode)
|
||||||
if (!WIFEXITED(status) ||
|
if (!WIFEXITED(status) ||
|
||||||
WEXITSTATUS(status) != 0)
|
WEXITSTATUS(status) != 0)
|
||||||
{
|
{
|
||||||
g_warning ("bz2: bzip2 exited abnormally on file %s\n", filename);
|
g_message ("bz2: bzip2 exited abnormally on file %s\n", filename);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -386,7 +386,7 @@ static char* find_extension (char* filename)
|
||||||
while (1) {
|
while (1) {
|
||||||
if (!ext || ext[1] == 0 || strchr(ext, '/'))
|
if (!ext || ext[1] == 0 || strchr(ext, '/'))
|
||||||
{
|
{
|
||||||
g_warning ("bz2: can't open bzip2ed file without a sensible extension\n");
|
g_message ("bz2: can't open bzip2ed file without a sensible extension\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (0 == strcmp(ext, ".xcfbz2")) {
|
if (0 == strcmp(ext, ".xcfbz2")) {
|
||||||
|
|
|
@ -246,7 +246,7 @@ save_image (char *filename,
|
||||||
|
|
||||||
ext = find_extension(filename);
|
ext = find_extension(filename);
|
||||||
if (0 == *ext) {
|
if (0 == *ext) {
|
||||||
g_warning("gz: no sensible extension, saving as gzip'd xcf\n");
|
g_message("gz: no sensible extension, saving as gzip'd xcf\n");
|
||||||
ext = ".xcf";
|
ext = ".xcf";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,24 +281,24 @@ save_image (char *filename,
|
||||||
/* fork off a gzip process */
|
/* fork off a gzip process */
|
||||||
if ((pid = fork()) < 0)
|
if ((pid = fork()) < 0)
|
||||||
{
|
{
|
||||||
g_warning ("gz: fork failed: %s\n", g_strerror(errno));
|
g_message ("gz: fork failed: %s\n", g_strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if (pid == 0)
|
else if (pid == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!(f = fopen(filename,"w"))){
|
if (!(f = fopen(filename,"w"))){
|
||||||
g_warning("gz: fopen failed: %s\n", g_strerror(errno));
|
g_message("gz: fopen failed: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make stdout for this process be the output file */
|
/* make stdout for this process be the output file */
|
||||||
if (-1 == dup2(fileno(f),fileno(stdout)))
|
if (-1 == dup2(fileno(f),fileno(stdout)))
|
||||||
g_warning ("gz: dup2 failed: %s\n", g_strerror(errno));
|
g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
|
||||||
|
|
||||||
/* and gzip into it */
|
/* and gzip into it */
|
||||||
execlp ("gzip", "gzip", "-cf", tmpname, NULL);
|
execlp ("gzip", "gzip", "-cf", tmpname, NULL);
|
||||||
g_warning ("gz: exec failed: gzip: %s\n", g_strerror(errno));
|
g_message ("gz: exec failed: gzip: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -308,7 +308,7 @@ save_image (char *filename,
|
||||||
if (!WIFEXITED(status) ||
|
if (!WIFEXITED(status) ||
|
||||||
WEXITSTATUS(status) != 0)
|
WEXITSTATUS(status) != 0)
|
||||||
{
|
{
|
||||||
g_warning ("gz: gzip exited abnormally on file %s\n", tmpname);
|
g_message ("gz: gzip exited abnormally on file %s\n", tmpname);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ load_image (char *filename, gint32 run_mode)
|
||||||
|
|
||||||
ext = find_extension(filename);
|
ext = find_extension(filename);
|
||||||
if (0 == *ext) {
|
if (0 == *ext) {
|
||||||
g_warning("gz: no sensible extension, attempting to load with file magic\n");
|
g_message("gz: no sensible extension, attempting to load with file magic\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* find a temp name */
|
/* find a temp name */
|
||||||
|
@ -344,24 +344,24 @@ load_image (char *filename, gint32 run_mode)
|
||||||
/* fork off a g(un)zip and wait for it */
|
/* fork off a g(un)zip and wait for it */
|
||||||
if ((pid = fork()) < 0)
|
if ((pid = fork()) < 0)
|
||||||
{
|
{
|
||||||
g_warning ("gz: fork failed: %s\n", g_strerror(errno));
|
g_message ("gz: fork failed: %s\n", g_strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if (pid == 0) /* child process */
|
else if (pid == 0) /* child process */
|
||||||
{
|
{
|
||||||
FILE* f;
|
FILE* f;
|
||||||
if (!(f = fopen(tmpname,"w"))){
|
if (!(f = fopen(tmpname,"w"))){
|
||||||
g_warning("gz: fopen failed: %s\n", g_strerror(errno));
|
g_message("gz: fopen failed: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make stdout for this child process be the temp file */
|
/* make stdout for this child process be the temp file */
|
||||||
if (-1 == dup2(fileno(f),fileno(stdout)))
|
if (-1 == dup2(fileno(f),fileno(stdout)))
|
||||||
g_warning ("gz: dup2 failed: %s\n", g_strerror(errno));
|
g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
|
||||||
|
|
||||||
/* and unzip into it */
|
/* and unzip into it */
|
||||||
execlp ("gzip", "gzip", "-cfd", filename, NULL);
|
execlp ("gzip", "gzip", "-cfd", filename, NULL);
|
||||||
g_warning ("gz: exec failed: gunzip: %s\n", g_strerror(errno));
|
g_message ("gz: exec failed: gunzip: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
else /* parent process */
|
else /* parent process */
|
||||||
|
@ -371,7 +371,7 @@ load_image (char *filename, gint32 run_mode)
|
||||||
if (!WIFEXITED(status) ||
|
if (!WIFEXITED(status) ||
|
||||||
WEXITSTATUS(status) != 0)
|
WEXITSTATUS(status) != 0)
|
||||||
{
|
{
|
||||||
g_warning ("gz: gzip exited abnormally on file %s\n", filename);
|
g_message ("gz: gzip exited abnormally on file %s\n", filename);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -426,7 +426,7 @@ run (char *name,
|
||||||
* or trim down the number of GIMP colours at load-time. We do the
|
* or trim down the number of GIMP colours at load-time. We do the
|
||||||
* latter for now.
|
* latter for now.
|
||||||
*/
|
*/
|
||||||
printf("GIF: Highest used index is %d\n", highest_used_index);
|
g_print ("GIF: Highest used index is %d\n", highest_used_index);
|
||||||
if (!promote_to_rgb)
|
if (!promote_to_rgb)
|
||||||
{
|
{
|
||||||
gimp_image_set_cmap (image_ID, gimp_cmap, highest_used_index+1);
|
gimp_image_set_cmap (image_ID, gimp_cmap, highest_used_index+1);
|
||||||
|
@ -607,7 +607,7 @@ load_image (char *filename)
|
||||||
fd = fopen (filename, "rb");
|
fd = fopen (filename, "rb");
|
||||||
if (!fd)
|
if (!fd)
|
||||||
{
|
{
|
||||||
printf ("GIF: can't open \"%s\"\n", filename);
|
g_message ("GIF: can't open \"%s\"\n", filename);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -619,13 +619,13 @@ load_image (char *filename)
|
||||||
|
|
||||||
if (!ReadOK (fd, buf, 6))
|
if (!ReadOK (fd, buf, 6))
|
||||||
{
|
{
|
||||||
printf ("GIF: error reading magic number\n");
|
g_message ("GIF: error reading magic number\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strncmp ((char *) buf, "GIF", 3) != 0)
|
if (strncmp ((char *) buf, "GIF", 3) != 0)
|
||||||
{
|
{
|
||||||
printf ("GIF: not a GIF file\n");
|
g_message ("GIF: not a GIF file\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -634,13 +634,13 @@ load_image (char *filename)
|
||||||
|
|
||||||
if ((strcmp (version, "87a") != 0) && (strcmp (version, "89a") != 0))
|
if ((strcmp (version, "87a") != 0) && (strcmp (version, "89a") != 0))
|
||||||
{
|
{
|
||||||
printf ("GIF: bad version number, not '87a' or '89a'\n");
|
g_message ("GIF: bad version number, not '87a' or '89a'\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ReadOK (fd, buf, 7))
|
if (!ReadOK (fd, buf, 7))
|
||||||
{
|
{
|
||||||
printf ("GIF: failed to read screen descriptor\n");
|
g_message ("GIF: failed to read screen descriptor\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -656,14 +656,14 @@ load_image (char *filename)
|
||||||
/* Global Colormap */
|
/* Global Colormap */
|
||||||
if (ReadColorMap (fd, GifScreen.BitPixel, GifScreen.ColorMap, &GifScreen.GrayScale))
|
if (ReadColorMap (fd, GifScreen.BitPixel, GifScreen.ColorMap, &GifScreen.GrayScale))
|
||||||
{
|
{
|
||||||
printf ("GIF: error reading global colormap\n");
|
g_message ("GIF: error reading global colormap\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GifScreen.AspectRatio != 0 && GifScreen.AspectRatio != 49)
|
if (GifScreen.AspectRatio != 0 && GifScreen.AspectRatio != 49)
|
||||||
{
|
{
|
||||||
printf ("GIF: warning - non-square pixels\n");
|
g_message ("GIF: warning - non-square pixels\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -674,7 +674,7 @@ load_image (char *filename)
|
||||||
{
|
{
|
||||||
if (!ReadOK (fd, &c, 1))
|
if (!ReadOK (fd, &c, 1))
|
||||||
{
|
{
|
||||||
printf ("GIF: EOF / read error on image data\n");
|
g_message ("GIF: EOF / read error on image data\n");
|
||||||
return image_ID; /* will be -1 if failed on first image! */
|
return image_ID; /* will be -1 if failed on first image! */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -689,7 +689,7 @@ load_image (char *filename)
|
||||||
/* Extension */
|
/* Extension */
|
||||||
if (!ReadOK (fd, &c, 1))
|
if (!ReadOK (fd, &c, 1))
|
||||||
{
|
{
|
||||||
printf ("GIF: OF / read error on extention function code\n");
|
g_message ("GIF: OF / read error on extention function code\n");
|
||||||
return image_ID; /* will be -1 if failed on first image! */
|
return image_ID; /* will be -1 if failed on first image! */
|
||||||
}
|
}
|
||||||
DoExtension (fd, c);
|
DoExtension (fd, c);
|
||||||
|
@ -699,7 +699,7 @@ load_image (char *filename)
|
||||||
if (c != ',')
|
if (c != ',')
|
||||||
{
|
{
|
||||||
/* Not a valid start character */
|
/* Not a valid start character */
|
||||||
printf ("GIF: bogus character 0x%02x, ignoring\n", (int) c);
|
g_message ("GIF: bogus character 0x%02x, ignoring\n", (int) c);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -707,7 +707,7 @@ load_image (char *filename)
|
||||||
|
|
||||||
if (!ReadOK (fd, buf, 9))
|
if (!ReadOK (fd, buf, 9))
|
||||||
{
|
{
|
||||||
printf ("GIF: couldn't read left/top/width/height\n");
|
g_message ("GIF: couldn't read left/top/width/height\n");
|
||||||
return image_ID; /* will be -1 if failed on first image! */
|
return image_ID; /* will be -1 if failed on first image! */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -719,7 +719,7 @@ load_image (char *filename)
|
||||||
{
|
{
|
||||||
if (ReadColorMap (fd, bitPixel, localColorMap, &grayScale))
|
if (ReadColorMap (fd, bitPixel, localColorMap, &grayScale))
|
||||||
{
|
{
|
||||||
printf ("GIF: error reading local colormap\n");
|
g_message ("GIF: error reading local colormap\n");
|
||||||
return image_ID; /* will be -1 if failed on first image! */
|
return image_ID; /* will be -1 if failed on first image! */
|
||||||
}
|
}
|
||||||
image_ID = ReadImage (fd, filename, LM_to_uint (buf[4], buf[5]),
|
image_ID = ReadImage (fd, filename, LM_to_uint (buf[4], buf[5]),
|
||||||
|
@ -768,7 +768,7 @@ ReadColorMap (FILE *fd,
|
||||||
{
|
{
|
||||||
if (!ReadOK (fd, rgb, sizeof (rgb)))
|
if (!ReadOK (fd, rgb, sizeof (rgb)))
|
||||||
{
|
{
|
||||||
printf ("GIF: bad colormap\n");
|
g_message ("GIF: bad colormap\n");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -829,7 +829,7 @@ DoExtension (FILE *fd,
|
||||||
while (GetDataBlock (fd, (unsigned char *) buf) != 0)
|
while (GetDataBlock (fd, (unsigned char *) buf) != 0)
|
||||||
{
|
{
|
||||||
if (showComment)
|
if (showComment)
|
||||||
printf ("GIF: gif comment: %s\n", buf);
|
g_print ("GIF: gif comment: %s\n", buf);
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
case 0xf9: /* Graphic Control Extension */
|
case 0xf9: /* Graphic Control Extension */
|
||||||
|
@ -852,7 +852,7 @@ DoExtension (FILE *fd,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("GIF: got a '%s' extension\n", str);
|
g_print ("GIF: got a '%s' extension\n", str);
|
||||||
|
|
||||||
while (GetDataBlock (fd, (unsigned char *) buf) != 0)
|
while (GetDataBlock (fd, (unsigned char *) buf) != 0)
|
||||||
;
|
;
|
||||||
|
@ -870,7 +870,7 @@ GetDataBlock (FILE *fd,
|
||||||
|
|
||||||
if (!ReadOK (fd, &count, 1))
|
if (!ReadOK (fd, &count, 1))
|
||||||
{
|
{
|
||||||
printf ("GIF: error in getting DataBlock size\n");
|
g_message ("GIF: error in getting DataBlock size\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -878,7 +878,7 @@ GetDataBlock (FILE *fd,
|
||||||
|
|
||||||
if ((count != 0) && (!ReadOK (fd, buf, count)))
|
if ((count != 0) && (!ReadOK (fd, buf, count)))
|
||||||
{
|
{
|
||||||
printf ("GIF: error in reading DataBlock\n");
|
g_message ("GIF: error in reading DataBlock\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -909,7 +909,7 @@ GetCode (FILE *fd,
|
||||||
{
|
{
|
||||||
if (curbit >= lastbit)
|
if (curbit >= lastbit)
|
||||||
{
|
{
|
||||||
printf ("GIF: ran off the end of by bits\n");
|
g_message ("GIF: ran off the end of by bits\n");
|
||||||
gimp_quit ();
|
gimp_quit ();
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1020,7 +1020,7 @@ LWZReadByte (FILE *fd,
|
||||||
;
|
;
|
||||||
|
|
||||||
if (count != 0)
|
if (count != 0)
|
||||||
printf ("GIF: missing EOD in data stream (common occurence)");
|
g_print ("GIF: missing EOD in data stream (common occurence)");
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1037,7 +1037,7 @@ LWZReadByte (FILE *fd,
|
||||||
*sp++ = table[1][code];
|
*sp++ = table[1][code];
|
||||||
if (code == table[0][code])
|
if (code == table[0][code])
|
||||||
{
|
{
|
||||||
printf ("GIF: circular table entry BIG ERROR\n");
|
g_message ("GIF: circular table entry BIG ERROR\n");
|
||||||
gimp_quit ();
|
gimp_quit ();
|
||||||
}
|
}
|
||||||
code = table[0][code];
|
code = table[0][code];
|
||||||
|
@ -1105,13 +1105,13 @@ ReadImage (FILE *fd,
|
||||||
*/
|
*/
|
||||||
if (!ReadOK (fd, &c, 1))
|
if (!ReadOK (fd, &c, 1))
|
||||||
{
|
{
|
||||||
printf ("GIF: EOF / read error on image data\n");
|
g_message ("GIF: EOF / read error on image data\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LWZReadByte (fd, TRUE, c) < 0)
|
if (LWZReadByte (fd, TRUE, c) < 0)
|
||||||
{
|
{
|
||||||
printf ("GIF: error while reading\n");
|
g_message ("GIF: error while reading\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1167,7 +1167,7 @@ ReadImage (FILE *fd,
|
||||||
promote_to_rgb = TRUE;
|
promote_to_rgb = TRUE;
|
||||||
|
|
||||||
/* Promote everything we have so far into RGB(A) */
|
/* Promote everything we have so far into RGB(A) */
|
||||||
printf("GIF: Promoting image to RGB...\n");
|
g_print ("GIF: Promoting image to RGB...\n");
|
||||||
gimp_run_procedure("gimp_convert_rgb", &nreturn_vals,
|
gimp_run_procedure("gimp_convert_rgb", &nreturn_vals,
|
||||||
PARAM_IMAGE, image_ID,
|
PARAM_IMAGE, image_ID,
|
||||||
PARAM_END);
|
PARAM_END);
|
||||||
|
@ -1193,10 +1193,10 @@ ReadImage (FILE *fd,
|
||||||
case 0x06:
|
case 0x06:
|
||||||
case 0x07:
|
case 0x07:
|
||||||
strcat(framename," (unknown disposal)");
|
strcat(framename," (unknown disposal)");
|
||||||
printf("GIF: Hmm... please forward this GIF to the "
|
g_message ("GIF: Hmm... please forward this GIF to the "
|
||||||
"GIF plugin author!\n (adam@foxbox.org)\n");
|
"GIF plugin author!\n (adam@foxbox.org)\n");
|
||||||
break;
|
break;
|
||||||
default: printf("GIF: Something got corrupted.\n"); break;
|
default: g_message ("GIF: Something got corrupted.\n"); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
previous_disposal = Gif89.disposal;
|
previous_disposal = Gif89.disposal;
|
||||||
|
@ -1225,12 +1225,12 @@ ReadImage (FILE *fd,
|
||||||
dest = (guchar *) g_malloc (len * height);
|
dest = (guchar *) g_malloc (len * height);
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf ("GIF: reading %d by %d%s GIF image, ncols=%d\n",
|
g_print ("GIF: reading %d by %d%s GIF image, ncols=%d\n",
|
||||||
len, height, interlace ? " interlaced" : "", ncols);
|
len, height, interlace ? " interlaced" : "", ncols);
|
||||||
|
|
||||||
if (!alpha_frame && promote_to_rgb)
|
if (!alpha_frame && promote_to_rgb)
|
||||||
{
|
{
|
||||||
printf("GIF: Ouchie! Can't handle non-alpha RGB frames.\n Please mail the plugin author. (adam@gimp.org)\n");
|
g_message ("GIF: Ouchie! Can't handle non-alpha RGB frames.\n Please mail the plugin author. (adam@gimp.org)\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1319,7 +1319,7 @@ ReadImage (FILE *fd,
|
||||||
|
|
||||||
fini:
|
fini:
|
||||||
if (LWZReadByte (fd, FALSE, c) >= 0)
|
if (LWZReadByte (fd, FALSE, c) >= 0)
|
||||||
printf ("GIF: too much input data, ignoring extra...\n");
|
g_print ("GIF: too much input data, ignoring extra...\n");
|
||||||
|
|
||||||
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width, drawable->height, TRUE, FALSE);
|
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width, drawable->height, TRUE, FALSE);
|
||||||
gimp_pixel_rgn_set_rect (&pixel_rgn, dest, 0, 0, drawable->width, drawable->height);
|
gimp_pixel_rgn_set_rect (&pixel_rgn, dest, 0, 0, drawable->width, drawable->height);
|
||||||
|
@ -1426,7 +1426,7 @@ static int find_unused_ia_colour (guchar *pixels,
|
||||||
gboolean ix_used[256];
|
gboolean ix_used[256];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
fprintf(stderr,"GIF: Image has >=256 colors - attempting to reduce...\n");
|
g_message ("GIF: Image has >=256 colors - attempting to reduce...\n");
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i=0;i<256;i++)
|
for (i=0;i<256;i++)
|
||||||
|
@ -1439,12 +1439,12 @@ static int find_unused_ia_colour (guchar *pixels,
|
||||||
if (ix_used[i] == (gboolean)FALSE)
|
if (ix_used[i] == (gboolean)FALSE)
|
||||||
{
|
{
|
||||||
|
|
||||||
fprintf(stderr,"GIF: Found unused colour index %d.\n",(int)i);
|
g_message ("GIF: Found unused colour index %d.\n",(int)i);
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr,"GIF: Couldn't simply reduce colours further. Saving as opaque.\n");
|
g_message ("GIF: Couldn't simply reduce colours further. Saving as opaque.\n");
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1688,9 +1688,7 @@ save_image (char *filename,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* FIXME: should be a popup (or, of course, ideally GIMP shouldn't
|
g_message ("GIF: Sorry, can't save RGB images as GIFs - convert to INDEXED\nor GRAY first.\n");
|
||||||
let RGB images through in the first place :) ) */
|
|
||||||
fprintf (stderr, "GIF: Sorry, can't save RGB images as GIFs - convert to INDEXED\nor GRAY first.\n");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1707,7 +1705,7 @@ save_image (char *filename,
|
||||||
outfile = fopen (filename, "wb");
|
outfile = fopen (filename, "wb");
|
||||||
if (!outfile)
|
if (!outfile)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "GIF: can't open %s\n", filename);
|
g_message ("GIF: can't open %s\n", filename);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1722,7 +1720,7 @@ save_image (char *filename,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BitsPerPixel = colorstobpp (256);
|
BitsPerPixel = colorstobpp (256);
|
||||||
fprintf (stderr, "GIF: Too many colours?\n");
|
g_message ("GIF: Too many colours?\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
cols = gimp_image_width(image_ID);
|
cols = gimp_image_width(image_ID);
|
||||||
|
@ -2159,7 +2157,7 @@ colorstobpp (int colors)
|
||||||
bpp = 8;
|
bpp = 8;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf ("GIF: too many colors: %d\n", colors);
|
g_message ("GIF: too many colors: %d\n", colors);
|
||||||
return 8;
|
return 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2691,7 +2689,7 @@ static void GIFEncodeCommentExt (FILE *fp, char *comment)
|
||||||
{
|
{
|
||||||
if (comment==NULL||strlen(comment)<1)
|
if (comment==NULL||strlen(comment)<1)
|
||||||
{
|
{
|
||||||
printf("GIF: warning: no comment given - comment block not written.\n");
|
g_message ("GIF: warning: no comment given - comment block not written.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3087,7 +3085,7 @@ cl_hash (register count_int hsize) /* reset code table */
|
||||||
static void
|
static void
|
||||||
writeerr ()
|
writeerr ()
|
||||||
{
|
{
|
||||||
printf ("GIF: error writing output file\n");
|
g_message ("GIF: error writing output file\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3240,7 +3238,7 @@ comment_entry_callback (GtkWidget *widget,
|
||||||
/* Temporary kludge for overlength strings - just return */
|
/* Temporary kludge for overlength strings - just return */
|
||||||
if (ssize>240)
|
if (ssize>240)
|
||||||
{
|
{
|
||||||
printf("GIF save: Your comment string is too long.\n");
|
g_message ("GIF save: Your comment string is too long.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3249,7 +3247,7 @@ comment_entry_callback (GtkWidget *widget,
|
||||||
|
|
||||||
strcpy(globalcomment, gtk_entry_get_text (GTK_ENTRY (widget)));
|
strcpy(globalcomment, gtk_entry_get_text (GTK_ENTRY (widget)));
|
||||||
|
|
||||||
/* printf("COMMENT: %s\n",globalcomment); */
|
/* g_print ("COMMENT: %s\n",globalcomment); */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The End */
|
/* The End */
|
||||||
|
|
|
@ -246,7 +246,7 @@ save_image (char *filename,
|
||||||
|
|
||||||
ext = find_extension(filename);
|
ext = find_extension(filename);
|
||||||
if (0 == *ext) {
|
if (0 == *ext) {
|
||||||
g_warning("gz: no sensible extension, saving as gzip'd xcf\n");
|
g_message("gz: no sensible extension, saving as gzip'd xcf\n");
|
||||||
ext = ".xcf";
|
ext = ".xcf";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,24 +281,24 @@ save_image (char *filename,
|
||||||
/* fork off a gzip process */
|
/* fork off a gzip process */
|
||||||
if ((pid = fork()) < 0)
|
if ((pid = fork()) < 0)
|
||||||
{
|
{
|
||||||
g_warning ("gz: fork failed: %s\n", g_strerror(errno));
|
g_message ("gz: fork failed: %s\n", g_strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if (pid == 0)
|
else if (pid == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!(f = fopen(filename,"w"))){
|
if (!(f = fopen(filename,"w"))){
|
||||||
g_warning("gz: fopen failed: %s\n", g_strerror(errno));
|
g_message("gz: fopen failed: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make stdout for this process be the output file */
|
/* make stdout for this process be the output file */
|
||||||
if (-1 == dup2(fileno(f),fileno(stdout)))
|
if (-1 == dup2(fileno(f),fileno(stdout)))
|
||||||
g_warning ("gz: dup2 failed: %s\n", g_strerror(errno));
|
g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
|
||||||
|
|
||||||
/* and gzip into it */
|
/* and gzip into it */
|
||||||
execlp ("gzip", "gzip", "-cf", tmpname, NULL);
|
execlp ("gzip", "gzip", "-cf", tmpname, NULL);
|
||||||
g_warning ("gz: exec failed: gzip: %s\n", g_strerror(errno));
|
g_message ("gz: exec failed: gzip: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -308,7 +308,7 @@ save_image (char *filename,
|
||||||
if (!WIFEXITED(status) ||
|
if (!WIFEXITED(status) ||
|
||||||
WEXITSTATUS(status) != 0)
|
WEXITSTATUS(status) != 0)
|
||||||
{
|
{
|
||||||
g_warning ("gz: gzip exited abnormally on file %s\n", tmpname);
|
g_message ("gz: gzip exited abnormally on file %s\n", tmpname);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ load_image (char *filename, gint32 run_mode)
|
||||||
|
|
||||||
ext = find_extension(filename);
|
ext = find_extension(filename);
|
||||||
if (0 == *ext) {
|
if (0 == *ext) {
|
||||||
g_warning("gz: no sensible extension, attempting to load with file magic\n");
|
g_message("gz: no sensible extension, attempting to load with file magic\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* find a temp name */
|
/* find a temp name */
|
||||||
|
@ -344,24 +344,24 @@ load_image (char *filename, gint32 run_mode)
|
||||||
/* fork off a g(un)zip and wait for it */
|
/* fork off a g(un)zip and wait for it */
|
||||||
if ((pid = fork()) < 0)
|
if ((pid = fork()) < 0)
|
||||||
{
|
{
|
||||||
g_warning ("gz: fork failed: %s\n", g_strerror(errno));
|
g_message ("gz: fork failed: %s\n", g_strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if (pid == 0) /* child process */
|
else if (pid == 0) /* child process */
|
||||||
{
|
{
|
||||||
FILE* f;
|
FILE* f;
|
||||||
if (!(f = fopen(tmpname,"w"))){
|
if (!(f = fopen(tmpname,"w"))){
|
||||||
g_warning("gz: fopen failed: %s\n", g_strerror(errno));
|
g_message("gz: fopen failed: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make stdout for this child process be the temp file */
|
/* make stdout for this child process be the temp file */
|
||||||
if (-1 == dup2(fileno(f),fileno(stdout)))
|
if (-1 == dup2(fileno(f),fileno(stdout)))
|
||||||
g_warning ("gz: dup2 failed: %s\n", g_strerror(errno));
|
g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
|
||||||
|
|
||||||
/* and unzip into it */
|
/* and unzip into it */
|
||||||
execlp ("gzip", "gzip", "-cfd", filename, NULL);
|
execlp ("gzip", "gzip", "-cfd", filename, NULL);
|
||||||
g_warning ("gz: exec failed: gunzip: %s\n", g_strerror(errno));
|
g_message ("gz: exec failed: gunzip: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
else /* parent process */
|
else /* parent process */
|
||||||
|
@ -371,7 +371,7 @@ load_image (char *filename, gint32 run_mode)
|
||||||
if (!WIFEXITED(status) ||
|
if (!WIFEXITED(status) ||
|
||||||
WEXITSTATUS(status) != 0)
|
WEXITSTATUS(status) != 0)
|
||||||
{
|
{
|
||||||
g_warning ("gz: gzip exited abnormally on file %s\n", filename);
|
g_message ("gz: gzip exited abnormally on file %s\n", filename);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -508,7 +508,7 @@ save_image (char *filename,
|
||||||
*/
|
*/
|
||||||
if ((outfile = fopen (filename, "wb")) == NULL)
|
if ((outfile = fopen (filename, "wb")) == NULL)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "can't open %s\n", filename);
|
g_message ("can't open %s\n", filename);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
jpeg_stdio_dest (&cinfo, outfile);
|
jpeg_stdio_dest (&cinfo, outfile);
|
||||||
|
|
|
@ -722,7 +722,7 @@ save_image (char *filename,
|
||||||
fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
|
fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "pnm: can't open \"%s\"\n", filename);
|
g_message ("pnm: can't open \"%s\"\n", filename);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -234,8 +234,6 @@ static void save_toggle_update (GtkWidget *widget,
|
||||||
static void save_mm_toggle_update (GtkWidget *widget,
|
static void save_mm_toggle_update (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
static void show_message (char *);
|
|
||||||
|
|
||||||
|
|
||||||
GPlugInInfo PLUG_IN_INFO =
|
GPlugInInfo PLUG_IN_INFO =
|
||||||
{
|
{
|
||||||
|
@ -531,7 +529,7 @@ load_image (char *filename)
|
||||||
ifp = fopen (filename, "r");
|
ifp = fopen (filename, "r");
|
||||||
if (ifp == NULL)
|
if (ifp == NULL)
|
||||||
{
|
{
|
||||||
show_message ("can't open file for reading");
|
g_message ("can't open file for reading");
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
fclose (ifp);
|
fclose (ifp);
|
||||||
|
@ -548,14 +546,14 @@ load_image (char *filename)
|
||||||
ifp = ps_open (filename, &plvals, &llx, &lly, &urx, &ury);
|
ifp = ps_open (filename, &plvals, &llx, &lly, &urx, &ury);
|
||||||
if (!ifp)
|
if (!ifp)
|
||||||
{
|
{
|
||||||
show_message ("can't interprete file");
|
g_message ("can't interprete file");
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
image_list = (gint32 *)g_malloc (10 * sizeof (gint32));
|
image_list = (gint32 *)g_malloc (10 * sizeof (gint32));
|
||||||
if (image_list == NULL)
|
if (image_list == NULL)
|
||||||
{
|
{
|
||||||
show_message ("out of memory");
|
g_message ("out of memory");
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
n_images = 0;
|
n_images = 0;
|
||||||
|
@ -635,7 +633,7 @@ save_image (char *filename,
|
||||||
/* Make sure we're not saving an image with an alpha channel */
|
/* Make sure we're not saving an image with an alpha channel */
|
||||||
if (gimp_drawable_has_alpha (drawable_ID))
|
if (gimp_drawable_has_alpha (drawable_ID))
|
||||||
{
|
{
|
||||||
show_message ("PostScript save cannot handle images with alpha channels");
|
g_message ("PostScript save cannot handle images with alpha channels");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -646,7 +644,7 @@ save_image (char *filename,
|
||||||
case RGB_IMAGE:
|
case RGB_IMAGE:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
show_message ("cannot operate on unknown image types");
|
g_message ("cannot operate on unknown image types");
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -655,7 +653,7 @@ save_image (char *filename,
|
||||||
ofp = fopen (filename, "wb");
|
ofp = fopen (filename, "wb");
|
||||||
if (!ofp)
|
if (!ofp)
|
||||||
{
|
{
|
||||||
show_message ("cant open file for writing");
|
g_message ("cant open file for writing");
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1272,7 +1270,7 @@ load_ps (char *filename,
|
||||||
if (bitline) g_free (bitline);
|
if (bitline) g_free (bitline);
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
show_message ("EOF encountered on reading");
|
g_message ("EOF encountered on reading");
|
||||||
|
|
||||||
gimp_drawable_flush (drawable);
|
gimp_drawable_flush (drawable);
|
||||||
|
|
||||||
|
@ -1662,7 +1660,7 @@ save_gray (FILE *ofp,
|
||||||
|
|
||||||
if (ferror (ofp))
|
if (ferror (ofp))
|
||||||
{
|
{
|
||||||
show_message ("write error occured");
|
g_message ("write error occured");
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
@ -1751,7 +1749,7 @@ save_index (FILE *ofp,
|
||||||
|
|
||||||
if (ferror (ofp))
|
if (ferror (ofp))
|
||||||
{
|
{
|
||||||
show_message ("write error occured");
|
g_message ("write error occured");
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
@ -1820,7 +1818,7 @@ save_rgb (FILE *ofp,
|
||||||
|
|
||||||
if (ferror (ofp))
|
if (ferror (ofp))
|
||||||
{
|
{
|
||||||
show_message ("write error occured");
|
g_message ("write error occured");
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
@ -2442,18 +2440,3 @@ save_mm_toggle_update (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Show a message. Where to show it, depends on the runmode */
|
|
||||||
static void show_message (char *message)
|
|
||||||
|
|
||||||
{
|
|
||||||
#ifdef Simple_Message_Box_Available
|
|
||||||
/* If there would be a simple message box like the one */
|
|
||||||
/* used in ../app/interface.h, I would like to use it. */
|
|
||||||
if (l_run_mode == RUN_INTERACTIVE)
|
|
||||||
gtk_message_box (message);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
fprintf (stderr, "ps: %s\n", message);
|
|
||||||
}
|
|
||||||
|
|
|
@ -234,8 +234,6 @@ static void save_toggle_update (GtkWidget *widget,
|
||||||
static void save_mm_toggle_update (GtkWidget *widget,
|
static void save_mm_toggle_update (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
static void show_message (char *);
|
|
||||||
|
|
||||||
|
|
||||||
GPlugInInfo PLUG_IN_INFO =
|
GPlugInInfo PLUG_IN_INFO =
|
||||||
{
|
{
|
||||||
|
@ -531,7 +529,7 @@ load_image (char *filename)
|
||||||
ifp = fopen (filename, "r");
|
ifp = fopen (filename, "r");
|
||||||
if (ifp == NULL)
|
if (ifp == NULL)
|
||||||
{
|
{
|
||||||
show_message ("can't open file for reading");
|
g_message ("can't open file for reading");
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
fclose (ifp);
|
fclose (ifp);
|
||||||
|
@ -548,14 +546,14 @@ load_image (char *filename)
|
||||||
ifp = ps_open (filename, &plvals, &llx, &lly, &urx, &ury);
|
ifp = ps_open (filename, &plvals, &llx, &lly, &urx, &ury);
|
||||||
if (!ifp)
|
if (!ifp)
|
||||||
{
|
{
|
||||||
show_message ("can't interprete file");
|
g_message ("can't interprete file");
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
image_list = (gint32 *)g_malloc (10 * sizeof (gint32));
|
image_list = (gint32 *)g_malloc (10 * sizeof (gint32));
|
||||||
if (image_list == NULL)
|
if (image_list == NULL)
|
||||||
{
|
{
|
||||||
show_message ("out of memory");
|
g_message ("out of memory");
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
n_images = 0;
|
n_images = 0;
|
||||||
|
@ -635,7 +633,7 @@ save_image (char *filename,
|
||||||
/* Make sure we're not saving an image with an alpha channel */
|
/* Make sure we're not saving an image with an alpha channel */
|
||||||
if (gimp_drawable_has_alpha (drawable_ID))
|
if (gimp_drawable_has_alpha (drawable_ID))
|
||||||
{
|
{
|
||||||
show_message ("PostScript save cannot handle images with alpha channels");
|
g_message ("PostScript save cannot handle images with alpha channels");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -646,7 +644,7 @@ save_image (char *filename,
|
||||||
case RGB_IMAGE:
|
case RGB_IMAGE:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
show_message ("cannot operate on unknown image types");
|
g_message ("cannot operate on unknown image types");
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -655,7 +653,7 @@ save_image (char *filename,
|
||||||
ofp = fopen (filename, "wb");
|
ofp = fopen (filename, "wb");
|
||||||
if (!ofp)
|
if (!ofp)
|
||||||
{
|
{
|
||||||
show_message ("cant open file for writing");
|
g_message ("cant open file for writing");
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1272,7 +1270,7 @@ load_ps (char *filename,
|
||||||
if (bitline) g_free (bitline);
|
if (bitline) g_free (bitline);
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
show_message ("EOF encountered on reading");
|
g_message ("EOF encountered on reading");
|
||||||
|
|
||||||
gimp_drawable_flush (drawable);
|
gimp_drawable_flush (drawable);
|
||||||
|
|
||||||
|
@ -1662,7 +1660,7 @@ save_gray (FILE *ofp,
|
||||||
|
|
||||||
if (ferror (ofp))
|
if (ferror (ofp))
|
||||||
{
|
{
|
||||||
show_message ("write error occured");
|
g_message ("write error occured");
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
@ -1751,7 +1749,7 @@ save_index (FILE *ofp,
|
||||||
|
|
||||||
if (ferror (ofp))
|
if (ferror (ofp))
|
||||||
{
|
{
|
||||||
show_message ("write error occured");
|
g_message ("write error occured");
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
@ -1820,7 +1818,7 @@ save_rgb (FILE *ofp,
|
||||||
|
|
||||||
if (ferror (ofp))
|
if (ferror (ofp))
|
||||||
{
|
{
|
||||||
show_message ("write error occured");
|
g_message ("write error occured");
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
@ -2442,18 +2440,3 @@ save_mm_toggle_update (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Show a message. Where to show it, depends on the runmode */
|
|
||||||
static void show_message (char *message)
|
|
||||||
|
|
||||||
{
|
|
||||||
#ifdef Simple_Message_Box_Available
|
|
||||||
/* If there would be a simple message box like the one */
|
|
||||||
/* used in ../app/interface.h, I would like to use it. */
|
|
||||||
if (l_run_mode == RUN_INTERACTIVE)
|
|
||||||
gtk_message_box (message);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
fprintf (stderr, "ps: %s\n", message);
|
|
||||||
}
|
|
||||||
|
|
|
@ -447,7 +447,7 @@ psd_type_to_gimp_base_type (psd_imagetype psdtype)
|
||||||
case PSD_INDEXEDA_IMAGE:
|
case PSD_INDEXEDA_IMAGE:
|
||||||
case PSD_INDEXED_IMAGE: return(INDEXED);
|
case PSD_INDEXED_IMAGE: return(INDEXED);
|
||||||
default:
|
default:
|
||||||
printf("PSD: Error: Can't convert PSD imagetype to GIMP imagetype\n");
|
g_message ("PSD: Error: Can't convert PSD imagetype to GIMP imagetype\n");
|
||||||
gimp_quit();
|
gimp_quit();
|
||||||
return(RGB);
|
return(RGB);
|
||||||
}
|
}
|
||||||
|
@ -464,7 +464,7 @@ psd_mode_to_gimp_base_type (gushort psdtype)
|
||||||
case 2: return(INDEXED);
|
case 2: return(INDEXED);
|
||||||
case 3: return(RGB);
|
case 3: return(RGB);
|
||||||
default:
|
default:
|
||||||
printf("PSD: Error: Can't convert PSD mode to GIMP base imagetype\n");
|
g_message ("PSD: Error: Can't convert PSD mode to GIMP base imagetype\n");
|
||||||
gimp_quit();
|
gimp_quit();
|
||||||
return(RGB);
|
return(RGB);
|
||||||
}
|
}
|
||||||
|
@ -715,7 +715,7 @@ do_layer_record(FILE *fd, guint32 *offset, gint layernum)
|
||||||
|
|
||||||
if (psd_image.layer[layernum].num_channels > MAX_CHANNELS)
|
if (psd_image.layer[layernum].num_channels > MAX_CHANNELS)
|
||||||
{
|
{
|
||||||
printf("\nPSD: Sorry - this image has too many channels. Tell Adam!\n");
|
g_message ("\nPSD: Sorry - this image has too many channels. Tell Adam!\n");
|
||||||
gimp_quit();
|
gimp_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -744,7 +744,7 @@ do_layer_record(FILE *fd, guint32 *offset, gint layernum)
|
||||||
|
|
||||||
if (strncmp(sig, "8BIM", 4)!=0)
|
if (strncmp(sig, "8BIM", 4)!=0)
|
||||||
{
|
{
|
||||||
printf("PSD: Error - layer blend signature is incorrect. :-(\n");
|
g_message ("PSD: Error - layer blend signature is incorrect. :-(\n");
|
||||||
gimp_quit();
|
gimp_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -884,7 +884,7 @@ do_layer_struct(FILE *fd, guint32 *offset)
|
||||||
|
|
||||||
if (psd_image.num_layers > MAX_LAYERS)
|
if (psd_image.num_layers > MAX_LAYERS)
|
||||||
{
|
{
|
||||||
printf("\nPSD: Sorry - this image has too many layers. Tell Adam!\n");
|
g_message ("\nPSD: Sorry - this image has too many layers. Tell Adam!\n");
|
||||||
gimp_quit();
|
gimp_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1003,7 +1003,7 @@ do_layer_pixeldata(FILE *fd, guint32 *offset)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: /* *unknown* */
|
default: /* *unknown* */
|
||||||
printf("*** Unknown compression type in channel.\n");
|
g_message ("*** Unknown compression type in channel.\n");
|
||||||
gimp_quit();
|
gimp_quit();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ load_image (char *filename)
|
||||||
|
|
||||||
if (!ext || ext[1] == 0 || strchr(ext, '/'))
|
if (!ext || ext[1] == 0 || strchr(ext, '/'))
|
||||||
{
|
{
|
||||||
g_warning ("url: can't open URL without an extension\n");
|
g_message ("url: can't open URL without an extension\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,13 +141,13 @@ load_image (char *filename)
|
||||||
|
|
||||||
if ((pid = fork()) < 0)
|
if ((pid = fork()) < 0)
|
||||||
{
|
{
|
||||||
g_warning ("url: fork failed: %s\n", g_strerror(errno));
|
g_message ("url: fork failed: %s\n", g_strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if (pid == 0)
|
else if (pid == 0)
|
||||||
{
|
{
|
||||||
execlp ("wget", "wget", filename, "-O", tmpname, NULL);
|
execlp ("wget", "wget", filename, "-O", tmpname, NULL);
|
||||||
g_warning ("url: exec failed: wget: %s\n", g_strerror(errno));
|
g_message ("url: exec failed: wget: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -157,7 +157,7 @@ load_image (char *filename)
|
||||||
if (!WIFEXITED(status) ||
|
if (!WIFEXITED(status) ||
|
||||||
WEXITSTATUS(status) != 0)
|
WEXITSTATUS(status) != 0)
|
||||||
{
|
{
|
||||||
g_warning ("url: wget exited abnormally on URL %s\n", filename);
|
g_message ("url: wget exited abnormally on URL %s\n", filename);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -426,7 +426,7 @@ run (char *name,
|
||||||
* or trim down the number of GIMP colours at load-time. We do the
|
* or trim down the number of GIMP colours at load-time. We do the
|
||||||
* latter for now.
|
* latter for now.
|
||||||
*/
|
*/
|
||||||
printf("GIF: Highest used index is %d\n", highest_used_index);
|
g_print ("GIF: Highest used index is %d\n", highest_used_index);
|
||||||
if (!promote_to_rgb)
|
if (!promote_to_rgb)
|
||||||
{
|
{
|
||||||
gimp_image_set_cmap (image_ID, gimp_cmap, highest_used_index+1);
|
gimp_image_set_cmap (image_ID, gimp_cmap, highest_used_index+1);
|
||||||
|
@ -607,7 +607,7 @@ load_image (char *filename)
|
||||||
fd = fopen (filename, "rb");
|
fd = fopen (filename, "rb");
|
||||||
if (!fd)
|
if (!fd)
|
||||||
{
|
{
|
||||||
printf ("GIF: can't open \"%s\"\n", filename);
|
g_message ("GIF: can't open \"%s\"\n", filename);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -619,13 +619,13 @@ load_image (char *filename)
|
||||||
|
|
||||||
if (!ReadOK (fd, buf, 6))
|
if (!ReadOK (fd, buf, 6))
|
||||||
{
|
{
|
||||||
printf ("GIF: error reading magic number\n");
|
g_message ("GIF: error reading magic number\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strncmp ((char *) buf, "GIF", 3) != 0)
|
if (strncmp ((char *) buf, "GIF", 3) != 0)
|
||||||
{
|
{
|
||||||
printf ("GIF: not a GIF file\n");
|
g_message ("GIF: not a GIF file\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -634,13 +634,13 @@ load_image (char *filename)
|
||||||
|
|
||||||
if ((strcmp (version, "87a") != 0) && (strcmp (version, "89a") != 0))
|
if ((strcmp (version, "87a") != 0) && (strcmp (version, "89a") != 0))
|
||||||
{
|
{
|
||||||
printf ("GIF: bad version number, not '87a' or '89a'\n");
|
g_message ("GIF: bad version number, not '87a' or '89a'\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ReadOK (fd, buf, 7))
|
if (!ReadOK (fd, buf, 7))
|
||||||
{
|
{
|
||||||
printf ("GIF: failed to read screen descriptor\n");
|
g_message ("GIF: failed to read screen descriptor\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -656,14 +656,14 @@ load_image (char *filename)
|
||||||
/* Global Colormap */
|
/* Global Colormap */
|
||||||
if (ReadColorMap (fd, GifScreen.BitPixel, GifScreen.ColorMap, &GifScreen.GrayScale))
|
if (ReadColorMap (fd, GifScreen.BitPixel, GifScreen.ColorMap, &GifScreen.GrayScale))
|
||||||
{
|
{
|
||||||
printf ("GIF: error reading global colormap\n");
|
g_message ("GIF: error reading global colormap\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GifScreen.AspectRatio != 0 && GifScreen.AspectRatio != 49)
|
if (GifScreen.AspectRatio != 0 && GifScreen.AspectRatio != 49)
|
||||||
{
|
{
|
||||||
printf ("GIF: warning - non-square pixels\n");
|
g_message ("GIF: warning - non-square pixels\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -674,7 +674,7 @@ load_image (char *filename)
|
||||||
{
|
{
|
||||||
if (!ReadOK (fd, &c, 1))
|
if (!ReadOK (fd, &c, 1))
|
||||||
{
|
{
|
||||||
printf ("GIF: EOF / read error on image data\n");
|
g_message ("GIF: EOF / read error on image data\n");
|
||||||
return image_ID; /* will be -1 if failed on first image! */
|
return image_ID; /* will be -1 if failed on first image! */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -689,7 +689,7 @@ load_image (char *filename)
|
||||||
/* Extension */
|
/* Extension */
|
||||||
if (!ReadOK (fd, &c, 1))
|
if (!ReadOK (fd, &c, 1))
|
||||||
{
|
{
|
||||||
printf ("GIF: OF / read error on extention function code\n");
|
g_message ("GIF: OF / read error on extention function code\n");
|
||||||
return image_ID; /* will be -1 if failed on first image! */
|
return image_ID; /* will be -1 if failed on first image! */
|
||||||
}
|
}
|
||||||
DoExtension (fd, c);
|
DoExtension (fd, c);
|
||||||
|
@ -699,7 +699,7 @@ load_image (char *filename)
|
||||||
if (c != ',')
|
if (c != ',')
|
||||||
{
|
{
|
||||||
/* Not a valid start character */
|
/* Not a valid start character */
|
||||||
printf ("GIF: bogus character 0x%02x, ignoring\n", (int) c);
|
g_message ("GIF: bogus character 0x%02x, ignoring\n", (int) c);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -707,7 +707,7 @@ load_image (char *filename)
|
||||||
|
|
||||||
if (!ReadOK (fd, buf, 9))
|
if (!ReadOK (fd, buf, 9))
|
||||||
{
|
{
|
||||||
printf ("GIF: couldn't read left/top/width/height\n");
|
g_message ("GIF: couldn't read left/top/width/height\n");
|
||||||
return image_ID; /* will be -1 if failed on first image! */
|
return image_ID; /* will be -1 if failed on first image! */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -719,7 +719,7 @@ load_image (char *filename)
|
||||||
{
|
{
|
||||||
if (ReadColorMap (fd, bitPixel, localColorMap, &grayScale))
|
if (ReadColorMap (fd, bitPixel, localColorMap, &grayScale))
|
||||||
{
|
{
|
||||||
printf ("GIF: error reading local colormap\n");
|
g_message ("GIF: error reading local colormap\n");
|
||||||
return image_ID; /* will be -1 if failed on first image! */
|
return image_ID; /* will be -1 if failed on first image! */
|
||||||
}
|
}
|
||||||
image_ID = ReadImage (fd, filename, LM_to_uint (buf[4], buf[5]),
|
image_ID = ReadImage (fd, filename, LM_to_uint (buf[4], buf[5]),
|
||||||
|
@ -768,7 +768,7 @@ ReadColorMap (FILE *fd,
|
||||||
{
|
{
|
||||||
if (!ReadOK (fd, rgb, sizeof (rgb)))
|
if (!ReadOK (fd, rgb, sizeof (rgb)))
|
||||||
{
|
{
|
||||||
printf ("GIF: bad colormap\n");
|
g_message ("GIF: bad colormap\n");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -829,7 +829,7 @@ DoExtension (FILE *fd,
|
||||||
while (GetDataBlock (fd, (unsigned char *) buf) != 0)
|
while (GetDataBlock (fd, (unsigned char *) buf) != 0)
|
||||||
{
|
{
|
||||||
if (showComment)
|
if (showComment)
|
||||||
printf ("GIF: gif comment: %s\n", buf);
|
g_print ("GIF: gif comment: %s\n", buf);
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
case 0xf9: /* Graphic Control Extension */
|
case 0xf9: /* Graphic Control Extension */
|
||||||
|
@ -852,7 +852,7 @@ DoExtension (FILE *fd,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("GIF: got a '%s' extension\n", str);
|
g_print ("GIF: got a '%s' extension\n", str);
|
||||||
|
|
||||||
while (GetDataBlock (fd, (unsigned char *) buf) != 0)
|
while (GetDataBlock (fd, (unsigned char *) buf) != 0)
|
||||||
;
|
;
|
||||||
|
@ -870,7 +870,7 @@ GetDataBlock (FILE *fd,
|
||||||
|
|
||||||
if (!ReadOK (fd, &count, 1))
|
if (!ReadOK (fd, &count, 1))
|
||||||
{
|
{
|
||||||
printf ("GIF: error in getting DataBlock size\n");
|
g_message ("GIF: error in getting DataBlock size\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -878,7 +878,7 @@ GetDataBlock (FILE *fd,
|
||||||
|
|
||||||
if ((count != 0) && (!ReadOK (fd, buf, count)))
|
if ((count != 0) && (!ReadOK (fd, buf, count)))
|
||||||
{
|
{
|
||||||
printf ("GIF: error in reading DataBlock\n");
|
g_message ("GIF: error in reading DataBlock\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -909,7 +909,7 @@ GetCode (FILE *fd,
|
||||||
{
|
{
|
||||||
if (curbit >= lastbit)
|
if (curbit >= lastbit)
|
||||||
{
|
{
|
||||||
printf ("GIF: ran off the end of by bits\n");
|
g_message ("GIF: ran off the end of by bits\n");
|
||||||
gimp_quit ();
|
gimp_quit ();
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1020,7 +1020,7 @@ LWZReadByte (FILE *fd,
|
||||||
;
|
;
|
||||||
|
|
||||||
if (count != 0)
|
if (count != 0)
|
||||||
printf ("GIF: missing EOD in data stream (common occurence)");
|
g_print ("GIF: missing EOD in data stream (common occurence)");
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1037,7 +1037,7 @@ LWZReadByte (FILE *fd,
|
||||||
*sp++ = table[1][code];
|
*sp++ = table[1][code];
|
||||||
if (code == table[0][code])
|
if (code == table[0][code])
|
||||||
{
|
{
|
||||||
printf ("GIF: circular table entry BIG ERROR\n");
|
g_message ("GIF: circular table entry BIG ERROR\n");
|
||||||
gimp_quit ();
|
gimp_quit ();
|
||||||
}
|
}
|
||||||
code = table[0][code];
|
code = table[0][code];
|
||||||
|
@ -1105,13 +1105,13 @@ ReadImage (FILE *fd,
|
||||||
*/
|
*/
|
||||||
if (!ReadOK (fd, &c, 1))
|
if (!ReadOK (fd, &c, 1))
|
||||||
{
|
{
|
||||||
printf ("GIF: EOF / read error on image data\n");
|
g_message ("GIF: EOF / read error on image data\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LWZReadByte (fd, TRUE, c) < 0)
|
if (LWZReadByte (fd, TRUE, c) < 0)
|
||||||
{
|
{
|
||||||
printf ("GIF: error while reading\n");
|
g_message ("GIF: error while reading\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1167,7 +1167,7 @@ ReadImage (FILE *fd,
|
||||||
promote_to_rgb = TRUE;
|
promote_to_rgb = TRUE;
|
||||||
|
|
||||||
/* Promote everything we have so far into RGB(A) */
|
/* Promote everything we have so far into RGB(A) */
|
||||||
printf("GIF: Promoting image to RGB...\n");
|
g_print ("GIF: Promoting image to RGB...\n");
|
||||||
gimp_run_procedure("gimp_convert_rgb", &nreturn_vals,
|
gimp_run_procedure("gimp_convert_rgb", &nreturn_vals,
|
||||||
PARAM_IMAGE, image_ID,
|
PARAM_IMAGE, image_ID,
|
||||||
PARAM_END);
|
PARAM_END);
|
||||||
|
@ -1193,10 +1193,10 @@ ReadImage (FILE *fd,
|
||||||
case 0x06:
|
case 0x06:
|
||||||
case 0x07:
|
case 0x07:
|
||||||
strcat(framename," (unknown disposal)");
|
strcat(framename," (unknown disposal)");
|
||||||
printf("GIF: Hmm... please forward this GIF to the "
|
g_message ("GIF: Hmm... please forward this GIF to the "
|
||||||
"GIF plugin author!\n (adam@foxbox.org)\n");
|
"GIF plugin author!\n (adam@foxbox.org)\n");
|
||||||
break;
|
break;
|
||||||
default: printf("GIF: Something got corrupted.\n"); break;
|
default: g_message ("GIF: Something got corrupted.\n"); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
previous_disposal = Gif89.disposal;
|
previous_disposal = Gif89.disposal;
|
||||||
|
@ -1225,12 +1225,12 @@ ReadImage (FILE *fd,
|
||||||
dest = (guchar *) g_malloc (len * height);
|
dest = (guchar *) g_malloc (len * height);
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf ("GIF: reading %d by %d%s GIF image, ncols=%d\n",
|
g_print ("GIF: reading %d by %d%s GIF image, ncols=%d\n",
|
||||||
len, height, interlace ? " interlaced" : "", ncols);
|
len, height, interlace ? " interlaced" : "", ncols);
|
||||||
|
|
||||||
if (!alpha_frame && promote_to_rgb)
|
if (!alpha_frame && promote_to_rgb)
|
||||||
{
|
{
|
||||||
printf("GIF: Ouchie! Can't handle non-alpha RGB frames.\n Please mail the plugin author. (adam@gimp.org)\n");
|
g_message ("GIF: Ouchie! Can't handle non-alpha RGB frames.\n Please mail the plugin author. (adam@gimp.org)\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1319,7 +1319,7 @@ ReadImage (FILE *fd,
|
||||||
|
|
||||||
fini:
|
fini:
|
||||||
if (LWZReadByte (fd, FALSE, c) >= 0)
|
if (LWZReadByte (fd, FALSE, c) >= 0)
|
||||||
printf ("GIF: too much input data, ignoring extra...\n");
|
g_print ("GIF: too much input data, ignoring extra...\n");
|
||||||
|
|
||||||
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width, drawable->height, TRUE, FALSE);
|
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width, drawable->height, TRUE, FALSE);
|
||||||
gimp_pixel_rgn_set_rect (&pixel_rgn, dest, 0, 0, drawable->width, drawable->height);
|
gimp_pixel_rgn_set_rect (&pixel_rgn, dest, 0, 0, drawable->width, drawable->height);
|
||||||
|
@ -1426,7 +1426,7 @@ static int find_unused_ia_colour (guchar *pixels,
|
||||||
gboolean ix_used[256];
|
gboolean ix_used[256];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
fprintf(stderr,"GIF: Image has >=256 colors - attempting to reduce...\n");
|
g_message ("GIF: Image has >=256 colors - attempting to reduce...\n");
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i=0;i<256;i++)
|
for (i=0;i<256;i++)
|
||||||
|
@ -1439,12 +1439,12 @@ static int find_unused_ia_colour (guchar *pixels,
|
||||||
if (ix_used[i] == (gboolean)FALSE)
|
if (ix_used[i] == (gboolean)FALSE)
|
||||||
{
|
{
|
||||||
|
|
||||||
fprintf(stderr,"GIF: Found unused colour index %d.\n",(int)i);
|
g_message ("GIF: Found unused colour index %d.\n",(int)i);
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr,"GIF: Couldn't simply reduce colours further. Saving as opaque.\n");
|
g_message ("GIF: Couldn't simply reduce colours further. Saving as opaque.\n");
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1688,9 +1688,7 @@ save_image (char *filename,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* FIXME: should be a popup (or, of course, ideally GIMP shouldn't
|
g_message ("GIF: Sorry, can't save RGB images as GIFs - convert to INDEXED\nor GRAY first.\n");
|
||||||
let RGB images through in the first place :) ) */
|
|
||||||
fprintf (stderr, "GIF: Sorry, can't save RGB images as GIFs - convert to INDEXED\nor GRAY first.\n");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1707,7 +1705,7 @@ save_image (char *filename,
|
||||||
outfile = fopen (filename, "wb");
|
outfile = fopen (filename, "wb");
|
||||||
if (!outfile)
|
if (!outfile)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "GIF: can't open %s\n", filename);
|
g_message ("GIF: can't open %s\n", filename);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1722,7 +1720,7 @@ save_image (char *filename,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BitsPerPixel = colorstobpp (256);
|
BitsPerPixel = colorstobpp (256);
|
||||||
fprintf (stderr, "GIF: Too many colours?\n");
|
g_message ("GIF: Too many colours?\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
cols = gimp_image_width(image_ID);
|
cols = gimp_image_width(image_ID);
|
||||||
|
@ -2159,7 +2157,7 @@ colorstobpp (int colors)
|
||||||
bpp = 8;
|
bpp = 8;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf ("GIF: too many colors: %d\n", colors);
|
g_message ("GIF: too many colors: %d\n", colors);
|
||||||
return 8;
|
return 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2691,7 +2689,7 @@ static void GIFEncodeCommentExt (FILE *fp, char *comment)
|
||||||
{
|
{
|
||||||
if (comment==NULL||strlen(comment)<1)
|
if (comment==NULL||strlen(comment)<1)
|
||||||
{
|
{
|
||||||
printf("GIF: warning: no comment given - comment block not written.\n");
|
g_message ("GIF: warning: no comment given - comment block not written.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3087,7 +3085,7 @@ cl_hash (register count_int hsize) /* reset code table */
|
||||||
static void
|
static void
|
||||||
writeerr ()
|
writeerr ()
|
||||||
{
|
{
|
||||||
printf ("GIF: error writing output file\n");
|
g_message ("GIF: error writing output file\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3240,7 +3238,7 @@ comment_entry_callback (GtkWidget *widget,
|
||||||
/* Temporary kludge for overlength strings - just return */
|
/* Temporary kludge for overlength strings - just return */
|
||||||
if (ssize>240)
|
if (ssize>240)
|
||||||
{
|
{
|
||||||
printf("GIF save: Your comment string is too long.\n");
|
g_message ("GIF save: Your comment string is too long.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3249,7 +3247,7 @@ comment_entry_callback (GtkWidget *widget,
|
||||||
|
|
||||||
strcpy(globalcomment, gtk_entry_get_text (GTK_ENTRY (widget)));
|
strcpy(globalcomment, gtk_entry_get_text (GTK_ENTRY (widget)));
|
||||||
|
|
||||||
/* printf("COMMENT: %s\n",globalcomment); */
|
/* g_print ("COMMENT: %s\n",globalcomment); */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The End */
|
/* The End */
|
||||||
|
|
|
@ -246,7 +246,7 @@ save_image (char *filename,
|
||||||
|
|
||||||
ext = find_extension(filename);
|
ext = find_extension(filename);
|
||||||
if (0 == *ext) {
|
if (0 == *ext) {
|
||||||
g_warning("gz: no sensible extension, saving as gzip'd xcf\n");
|
g_message("gz: no sensible extension, saving as gzip'd xcf\n");
|
||||||
ext = ".xcf";
|
ext = ".xcf";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,24 +281,24 @@ save_image (char *filename,
|
||||||
/* fork off a gzip process */
|
/* fork off a gzip process */
|
||||||
if ((pid = fork()) < 0)
|
if ((pid = fork()) < 0)
|
||||||
{
|
{
|
||||||
g_warning ("gz: fork failed: %s\n", g_strerror(errno));
|
g_message ("gz: fork failed: %s\n", g_strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if (pid == 0)
|
else if (pid == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!(f = fopen(filename,"w"))){
|
if (!(f = fopen(filename,"w"))){
|
||||||
g_warning("gz: fopen failed: %s\n", g_strerror(errno));
|
g_message("gz: fopen failed: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make stdout for this process be the output file */
|
/* make stdout for this process be the output file */
|
||||||
if (-1 == dup2(fileno(f),fileno(stdout)))
|
if (-1 == dup2(fileno(f),fileno(stdout)))
|
||||||
g_warning ("gz: dup2 failed: %s\n", g_strerror(errno));
|
g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
|
||||||
|
|
||||||
/* and gzip into it */
|
/* and gzip into it */
|
||||||
execlp ("gzip", "gzip", "-cf", tmpname, NULL);
|
execlp ("gzip", "gzip", "-cf", tmpname, NULL);
|
||||||
g_warning ("gz: exec failed: gzip: %s\n", g_strerror(errno));
|
g_message ("gz: exec failed: gzip: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -308,7 +308,7 @@ save_image (char *filename,
|
||||||
if (!WIFEXITED(status) ||
|
if (!WIFEXITED(status) ||
|
||||||
WEXITSTATUS(status) != 0)
|
WEXITSTATUS(status) != 0)
|
||||||
{
|
{
|
||||||
g_warning ("gz: gzip exited abnormally on file %s\n", tmpname);
|
g_message ("gz: gzip exited abnormally on file %s\n", tmpname);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ load_image (char *filename, gint32 run_mode)
|
||||||
|
|
||||||
ext = find_extension(filename);
|
ext = find_extension(filename);
|
||||||
if (0 == *ext) {
|
if (0 == *ext) {
|
||||||
g_warning("gz: no sensible extension, attempting to load with file magic\n");
|
g_message("gz: no sensible extension, attempting to load with file magic\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* find a temp name */
|
/* find a temp name */
|
||||||
|
@ -344,24 +344,24 @@ load_image (char *filename, gint32 run_mode)
|
||||||
/* fork off a g(un)zip and wait for it */
|
/* fork off a g(un)zip and wait for it */
|
||||||
if ((pid = fork()) < 0)
|
if ((pid = fork()) < 0)
|
||||||
{
|
{
|
||||||
g_warning ("gz: fork failed: %s\n", g_strerror(errno));
|
g_message ("gz: fork failed: %s\n", g_strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if (pid == 0) /* child process */
|
else if (pid == 0) /* child process */
|
||||||
{
|
{
|
||||||
FILE* f;
|
FILE* f;
|
||||||
if (!(f = fopen(tmpname,"w"))){
|
if (!(f = fopen(tmpname,"w"))){
|
||||||
g_warning("gz: fopen failed: %s\n", g_strerror(errno));
|
g_message("gz: fopen failed: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make stdout for this child process be the temp file */
|
/* make stdout for this child process be the temp file */
|
||||||
if (-1 == dup2(fileno(f),fileno(stdout)))
|
if (-1 == dup2(fileno(f),fileno(stdout)))
|
||||||
g_warning ("gz: dup2 failed: %s\n", g_strerror(errno));
|
g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
|
||||||
|
|
||||||
/* and unzip into it */
|
/* and unzip into it */
|
||||||
execlp ("gzip", "gzip", "-cfd", filename, NULL);
|
execlp ("gzip", "gzip", "-cfd", filename, NULL);
|
||||||
g_warning ("gz: exec failed: gunzip: %s\n", g_strerror(errno));
|
g_message ("gz: exec failed: gunzip: %s\n", g_strerror(errno));
|
||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
else /* parent process */
|
else /* parent process */
|
||||||
|
@ -371,7 +371,7 @@ load_image (char *filename, gint32 run_mode)
|
||||||
if (!WIFEXITED(status) ||
|
if (!WIFEXITED(status) ||
|
||||||
WEXITSTATUS(status) != 0)
|
WEXITSTATUS(status) != 0)
|
||||||
{
|
{
|
||||||
g_warning ("gz: gzip exited abnormally on file %s\n", filename);
|
g_message ("gz: gzip exited abnormally on file %s\n", filename);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -508,7 +508,7 @@ save_image (char *filename,
|
||||||
*/
|
*/
|
||||||
if ((outfile = fopen (filename, "wb")) == NULL)
|
if ((outfile = fopen (filename, "wb")) == NULL)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "can't open %s\n", filename);
|
g_message ("can't open %s\n", filename);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
jpeg_stdio_dest (&cinfo, outfile);
|
jpeg_stdio_dest (&cinfo, outfile);
|
||||||
|
|
|
@ -508,7 +508,7 @@ save_image (char *filename,
|
||||||
*/
|
*/
|
||||||
if ((outfile = fopen (filename, "wb")) == NULL)
|
if ((outfile = fopen (filename, "wb")) == NULL)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "can't open %s\n", filename);
|
g_message ("can't open %s\n", filename);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
jpeg_stdio_dest (&cinfo, outfile);
|
jpeg_stdio_dest (&cinfo, outfile);
|
||||||
|
|
|
@ -508,7 +508,7 @@ save_image (char *filename,
|
||||||
*/
|
*/
|
||||||
if ((outfile = fopen (filename, "wb")) == NULL)
|
if ((outfile = fopen (filename, "wb")) == NULL)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "can't open %s\n", filename);
|
g_message ("can't open %s\n", filename);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
jpeg_stdio_dest (&cinfo, outfile);
|
jpeg_stdio_dest (&cinfo, outfile);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue