Commit 98410c35 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

added -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_COMPAT_H.

2001-08-29  Michael Natterer  <mitch@gimp.org>

	* configure.in: added -DG_DISABLE_DEPRECATED and
	-DGDK_DISABLE_COMPAT_H.

	* app/batch.c
	* app/file-utils.c
	* app/gdisplay.c
	* app/gdisplay_ops.c
	* app/gimprc.[ch]
	* app/module_db.c
	* app/nav_window.c
	* app/undo_history.c
	* app/core/gimpgradient.c
	* app/core/gimpimagefile.c
	* app/core/gimppalette.c
	* app/gui/color-notebook.c
	* app/gui/convert-dialog.c
	* app/gui/error-console-dialog.c
	* app/gui/file-commands.c
	* app/gui/file-open-dialog.c
	* app/gui/file-save-dialog.c
	* app/gui/gradient-editor.c
	* app/gui/info-window.c
	* app/gui/menus.c
	* app/gui/palette-import-dialog.c
	* app/tools/gimpbycolorselecttool.c
	* app/widgets/gimpcontainerview-utils.c
	* app/widgets/gimpdatafactoryview.c
	* libgimp/gimpmenu.c
	* plug-ins/common/bz2.c
	* plug-ins/common/compose.c
	* plug-ins/common/csource.c
	* plug-ins/common/decompose.c
	* plug-ins/common/gz.c
	* plug-ins/common/uniteditor.c
	* plug-ins/common/wmf.c
	* plug-ins/common/xbm.c
	* plug-ins/rcm/rcm_dialog.c
	* plug-ins/script-fu/interp_slib.c
	* plug-ins/script-fu/script-fu-console.c
	* plug-ins/script-fu/script-fu-scripts.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/gimprc.pdb
	* app/pdb/fileops_cmds.c
	* app/pdb/gimprc_cmds.c: removed deprecated stuff like
	g_basename(), g_dirname(), g_strup() and friends. Added some
	"const gchar *" declarations while I was on it. Added some
	G_N_ELEMENTS() macros instead of declaring a useless variable
	for the number of items.

	* app/widgets/gtkhwrapbox.[ch]
	* app/widgets/gtkvwrapbox.[ch]
	* app/widgets/gtkwrapbox.[ch]: replaced with the latest versions
	from GLE, ported by the master himself.

	* app/gui/toolbox.c: changed accordingly.

	* app/plug_in.c
	* libgimp/gimp.c
	* libgimpbase/gimpwire.[ch]: use evil hacks to get binary mode
	from the new GIOChannel implementation (upstream bugreport already
	posted).
parent 8e6beaf0
2001-08-29 Michael Natterer <mitch@gimp.org>
* configure.in: added -DG_DISABLE_DEPRECATED and
-DGDK_DISABLE_COMPAT_H.
* app/batch.c
* app/file-utils.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/gimprc.[ch]
* app/module_db.c
* app/nav_window.c
* app/undo_history.c
* app/core/gimpgradient.c
* app/core/gimpimagefile.c
* app/core/gimppalette.c
* app/gui/color-notebook.c
* app/gui/convert-dialog.c
* app/gui/error-console-dialog.c
* app/gui/file-commands.c
* app/gui/file-open-dialog.c
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/info-window.c
* app/gui/menus.c
* app/gui/palette-import-dialog.c
* app/tools/gimpbycolorselecttool.c
* app/widgets/gimpcontainerview-utils.c
* app/widgets/gimpdatafactoryview.c
* libgimp/gimpmenu.c
* plug-ins/common/bz2.c
* plug-ins/common/compose.c
* plug-ins/common/csource.c
* plug-ins/common/decompose.c
* plug-ins/common/gz.c
* plug-ins/common/uniteditor.c
* plug-ins/common/wmf.c
* plug-ins/common/xbm.c
* plug-ins/rcm/rcm_dialog.c
* plug-ins/script-fu/interp_slib.c
* plug-ins/script-fu/script-fu-console.c
* plug-ins/script-fu/script-fu-scripts.c
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/gimprc.pdb
* app/pdb/fileops_cmds.c
* app/pdb/gimprc_cmds.c: removed deprecated stuff like
g_basename(), g_dirname(), g_strup() and friends. Added some
"const gchar *" declarations while I was on it. Added some
G_N_ELEMENTS() macros instead of declaring a useless variable
for the number of items.
* app/widgets/gtkhwrapbox.[ch]
* app/widgets/gtkvwrapbox.[ch]
* app/widgets/gtkwrapbox.[ch]: replaced with the latest versions
from GLE, ported by the master himself.
* app/gui/toolbox.c: changed accordingly.
* app/plug_in.c
* libgimp/gimp.c
* libgimpbase/gimpwire.[ch]: use evil hacks to get binary mode
from the new GIOChannel implementation (upstream bugreport already
posted).
2001-08-28 Sven Neumann <sven@gimp.org>
* configure.in: removed the authorgen hack. It broke the build with
......
......@@ -152,17 +152,19 @@ file_save_cmd_callback (GtkWidget *widget,
}
else
{
const gchar *raw_filename;
gint status;
gchar *basename;
gint status;
raw_filename = g_basename (filename);
basename = g_path_get_basename (filename);
status = file_save (gdisp->gimage,
filename,
raw_filename,
basename,
RUN_WITH_LAST_VALS,
TRUE);
g_free (basename);
if (status != GIMP_PDB_SUCCESS &&
status != GIMP_PDB_CANCEL)
{
......@@ -219,14 +221,18 @@ file_revert_cmd_callback (GtkWidget *widget,
}
else
{
gchar *basename;
gchar *text;
basename = g_path_get_basename (filename);
text = g_strdup_printf (_("Reverting %s to\n"
"%s\n\n"
"(You will lose all your changes\n"
"including all undo information)"),
g_basename (filename),
filename);
basename, filename);
g_free (basename);
query_box = gimp_query_boolean_box (_("Revert Image?"),
gimp_standard_help_func,
......
......@@ -773,7 +773,7 @@ plug_in_def_add (PlugInDef *plug_in_def)
if (strcmp (basename1, basename2) == 0)
{
if ((g_strcasecmp (plug_in_def->prog, tplug_in_def->prog) == 0) &&
if ((g_ascii_strcasecmp (plug_in_def->prog, tplug_in_def->prog) == 0) &&
(plug_in_def->mtime == tplug_in_def->mtime))
{
/* Use cached plug-in entry */
......@@ -1001,7 +1001,8 @@ plug_in_open (PlugIn *plug_in)
if ((pipe (my_read) == -1) || (pipe (my_write) == -1))
{
g_message ("pipe() failed: Unable to start Plug-In \"%s\"\n(%s)",
g_basename (plug_in->args[0]), plug_in->args[0]);
g_path_get_basename (plug_in->args[0]),
plug_in->args[0]);
return FALSE;
}
......@@ -1018,6 +1019,16 @@ plug_in_open (PlugIn *plug_in)
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
g_io_channel_set_encoding (plug_in->my_read, NULL, NULL);
g_io_channel_set_encoding (plug_in->my_write, NULL, NULL);
g_io_channel_set_encoding (plug_in->his_read, NULL, NULL);
g_io_channel_set_encoding (plug_in->his_write, NULL, NULL);
g_io_channel_set_close_on_unref (plug_in->my_read, TRUE);
g_io_channel_set_close_on_unref (plug_in->my_write, TRUE);
g_io_channel_set_close_on_unref (plug_in->his_read, TRUE);
g_io_channel_set_close_on_unref (plug_in->his_write, TRUE);
/* Remember the file descriptors for the pipes.
*/
plug_in->args[2] =
......@@ -1054,10 +1065,9 @@ plug_in_open (PlugIn *plug_in)
if (plug_in->pid == 0)
{
g_io_channel_close (plug_in->my_read);
g_io_channel_unref (plug_in->my_read);
plug_in->my_read = NULL;
g_io_channel_close (plug_in->my_write);
g_io_channel_unref (plug_in->my_write);
plug_in->my_write = NULL;
......@@ -1072,15 +1082,15 @@ plug_in_open (PlugIn *plug_in)
#endif
{
g_message ("fork() failed: Unable to run Plug-In: \"%s\"\n(%s)",
g_basename (plug_in->args[0]), plug_in->args[0]);
g_path_get_basename (plug_in->args[0]),
plug_in->args[0]);
plug_in_destroy (plug_in);
return FALSE;
}
g_io_channel_close (plug_in->his_read);
g_io_channel_unref (plug_in->his_read);
plug_in->his_read = NULL;
g_io_channel_close (plug_in->his_write);
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
......@@ -1174,25 +1184,21 @@ plug_in_close (PlugIn *plug_in,
/* Close the pipes. */
if (plug_in->my_read != NULL)
{
g_io_channel_close (plug_in->my_read);
g_io_channel_unref (plug_in->my_read);
plug_in->my_read = NULL;
}
if (plug_in->my_write != NULL)
{
g_io_channel_close (plug_in->my_write);
g_io_channel_unref (plug_in->my_write);
plug_in->my_write = NULL;
}
if (plug_in->his_read != NULL)
{
g_io_channel_close (plug_in->his_read);
g_io_channel_unref (plug_in->his_read);
plug_in->his_read = NULL;
}
if (plug_in->his_write != NULL)
{
g_io_channel_close (plug_in->his_write);
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
}
......@@ -1498,7 +1504,7 @@ plug_in_recv_message (GIOChannel *channel,
"The dying Plug-In may have messed up GIMP's internal state.\n"
"You may want to save your images and restart GIMP\n"
"to be on the safe side."),
g_basename (current_plug_in->args[0]),
g_path_get_basename (current_plug_in->args[0]),
current_plug_in->args[0]);
if (!current_plug_in->open)
......@@ -1838,7 +1844,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
g_message ("Plug-In \"%s\"\n(%s)\n"
"attempted to install procedure \"%s\"\n"
"which does not take the standard Plug-In args.",
g_basename (current_plug_in->args[0]),
g_path_get_basename (current_plug_in->args[0]),
current_plug_in->args[0],
proc_install->name);
return;
......@@ -1854,7 +1860,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
g_message ("Plug-In \"%s\"\n(%s)\n"
"attempted to install procedure \"%s\"\n"
"which does not take the standard Plug-In args.",
g_basename (current_plug_in->args[0]),
g_path_get_basename (current_plug_in->args[0]),
current_plug_in->args[0],
proc_install->name);
return;
......@@ -1870,7 +1876,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
g_message ("Plug-In \"%s\"\n(%s)\n"
"attempted to install procedure \"%s\"\n"
"which does not take the standard Plug-In args.",
g_basename (current_plug_in->args[0]),
g_path_get_basename (current_plug_in->args[0]),
current_plug_in->args[0],
proc_install->name);
return;
......@@ -1888,7 +1894,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
g_message ("Plug-In \"%s\"\n(%s)\n"
"attempted to install procedure \"%s\"\n"
"which does not take the standard Plug-In args.",
g_basename (current_plug_in->args[0]),
g_path_get_basename (current_plug_in->args[0]),
current_plug_in->args[0],
proc_install->name);
return;
......@@ -1901,7 +1907,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
"in an invalid menu location.\n"
"Use either \"<Toolbox>\", \"<Image>\", "
"\"<Load>\", or \"<Save>\".",
g_basename (current_plug_in->args[0]),
g_path_get_basename (current_plug_in->args[0]),
current_plug_in->args[0],
proc_install->name);
return;
......@@ -1922,7 +1928,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
"attempted to install procedure \"%s\"\n"
"which fails to comply with the array parameter\n"
"passing standard. Argument %d is noncompliant.",
g_basename (current_plug_in->args[0]),
g_path_get_basename (current_plug_in->args[0]),
current_plug_in->args[0],
proc_install->name, i);
return;
......@@ -2121,23 +2127,41 @@ plug_in_write (GIOChannel *channel,
static gboolean
plug_in_flush (GIOChannel *channel)
{
GIOError error;
gint count;
guint bytes;
GIOStatus status;
GError *error;
gint count;
guint bytes;
if (current_write_buffer_index > 0)
{
count = 0;
while (count != current_write_buffer_index)
{
do {
bytes = 0;
error = g_io_channel_write (channel, &current_write_buffer[count],
(current_write_buffer_index - count),
&bytes);
} while (error == G_IO_ERROR_AGAIN);
if (error != G_IO_ERROR_NONE)
do
{
bytes = 0;
#ifdef __GNUC__
#warning FIXME: g_io_channel_write_chars()
#endif
#if 0
status = g_io_channel_write_chars (channel,
&current_write_buffer[count],
(current_write_buffer_index - count),
&bytes,
&error);
#endif
status = channel->funcs->io_write (channel,
&current_write_buffer[count],
(current_write_buffer_index - count),
&bytes,
&error);
}
while (status == G_IO_STATUS_AGAIN);
if (status != G_IO_STATUS_NORMAL)
return FALSE;
count += bytes;
......@@ -2360,10 +2384,10 @@ plug_in_init_file (const gchar *filename,
{
GSList *tmp;
PlugInDef *plug_in_def;
const gchar *plug_in_name;
const gchar *name;
gchar *plug_in_name;
gchar *basename;
name = g_basename (filename);
basename = g_path_get_basename (filename);
plug_in_def = NULL;
tmp = plug_in_defs;
......@@ -2373,17 +2397,21 @@ plug_in_init_file (const gchar *filename,
plug_in_def = tmp->data;
tmp = tmp->next;
plug_in_name = g_basename (plug_in_def->prog);
plug_in_name = g_path_get_basename (plug_in_def->prog);
if (g_strcasecmp (name, plug_in_name) == 0)
if (g_ascii_strcasecmp (basename, plug_in_name) == 0)
{
g_print ("duplicate plug-in: \"%s\" (skipping)\n", filename);
return;
}
g_free (plug_in_name);
plug_in_def = NULL;
}
g_free (basename);
plug_in_def = plug_in_def_new (filename);
plug_in_def->mtime = gimp_datafile_mtime ();
plug_in_def->query = TRUE;
......@@ -2496,32 +2524,40 @@ plug_in_make_menu_entry (gpointer foo,
{
GimpItemFactoryEntry entry;
gchar *help_page;
gchar *basename;
gchar *lowercase_page;
basename = g_path_get_basename (menu_entry->proc_def->prog);
if (menu_entry->help_path)
{
help_page = g_strconcat (menu_entry->help_path,
"@", /* HACK: locale subdir */
g_basename (menu_entry->proc_def->prog),
basename,
".html",
NULL);
}
else
{
help_page = g_strconcat ("filters/", /* _not_ G_DIR_SEPARATOR_S */
g_basename (menu_entry->proc_def->prog),
basename,
".html",
NULL);
}
g_strdown (help_page);
g_free (basename);
lowercase_page = g_ascii_strdown (help_page);
g_free (help_page);
entry.entry.path = menu_entry->proc_def->menu_path;
entry.entry.accelerator = menu_entry->proc_def->accelerator;
entry.entry.callback = plug_in_callback;
entry.entry.callback_action = 0;
entry.entry.item_type = NULL;
entry.quark_string = NULL;
entry.help_page = help_page;
entry.help_page = lowercase_page;
entry.description = NULL;
menus_create_item_from_full_path (&entry,
......
......@@ -111,7 +111,7 @@ batch_run_cmd (Gimp *gimp,
Argument *vals;
gint i;
if (g_strcasecmp (cmd, "(gimp-quit 0)") == 0)
if (g_ascii_strcasecmp (cmd, "(gimp-quit 0)") == 0)
{
app_exit (FALSE);
exit (0);
......
......@@ -327,7 +327,13 @@ gimp_gradient_load (const gchar *filename)
}
else /* old gradient format */
{
gimp_object_set_name (GIMP_OBJECT (gradient), g_basename (filename));
gchar *basename;
basename = g_path_get_basename (filename);
gimp_object_set_name (GIMP_OBJECT (gradient), basename);
g_free (basename);
}
num_segments = atoi (line);
......
......@@ -137,7 +137,7 @@ gimp_imagefile_get_new_preview (GimpViewable *viewable,
gint height)
{
GimpImagefile *imagefile;
const gchar *basename;
gchar *basename;
gchar *dirname;
gchar *thumbname;
struct stat file_stat;
......@@ -157,14 +157,15 @@ gimp_imagefile_get_new_preview (GimpViewable *viewable,
g_return_val_if_fail (GIMP_OBJECT (imagefile)->name != NULL, NULL);
dirname = g_dirname (GIMP_OBJECT (imagefile)->name);
basename = g_basename (GIMP_OBJECT (imagefile)->name);
dirname = g_path_get_dirname (GIMP_OBJECT (imagefile)->name);
basename = g_path_get_basename (GIMP_OBJECT (imagefile)->name);
thumbname = g_strconcat (dirname, G_DIR_SEPARATOR_S,
".xvpics", G_DIR_SEPARATOR_S,
basename, NULL);
g_free (dirname);
g_free (basename);
/* If the file is newer than its thumbnail, the thumbnail may
* be out of date.
......
......@@ -348,9 +348,15 @@ gimp_palette_load (const gchar *filename)
}
else /* old palette format */
{
gchar *basename;
g_warning ("old palette format %s", filename);
gimp_object_set_name (GIMP_OBJECT (palette), g_basename (filename));
basename = g_path_get_basename (filename);
gimp_object_set_name (GIMP_OBJECT (palette), basename);
g_free (basename);
}
while (! feof (fp))
......
......@@ -348,9 +348,15 @@ gimp_palette_load (const gchar *filename)
}
else /* old palette format */
{
gchar *basename;
g_warning ("old palette format %s", filename);
gimp_object_set_name (GIMP_OBJECT (palette), g_basename (filename));
basename = g_path_get_basename (filename);
gimp_object_set_name (GIMP_OBJECT (palette), basename);
g_free (basename);
}
while (! feof (fp))
......
......@@ -348,9 +348,15 @@ gimp_palette_load (const gchar *filename)
}
else /* old palette format */
{
gchar *basename;
g_warning ("old palette format %s", filename);
gimp_object_set_name (GIMP_OBJECT (palette), g_basename (filename));
basename = g_path_get_basename (filename);
gimp_object_set_name (GIMP_OBJECT (palette), basename);
g_free (basename);
}
while (! feof (fp))
......
......@@ -348,8 +348,15 @@ gdisplay_format_title (GDisplay *gdisp,
break;
case 'f': /* pruned filename */
i += print (title, title_len, i,
"%s", g_basename (gimp_image_filename (gimage)));
{
gchar *basename;
basename = g_path_get_basename (gimp_image_filename (gimage));
i += print (title, title_len, i, "%s", basename);
g_free (basename);
}
break;
case 'F': /* full filename */
......
......@@ -1236,7 +1236,7 @@ color_notebook_hex_entry_events (GtkWidget *widget,
g_snprintf (buffer, sizeof (buffer), "#%.2x%.2x%.2x", r, g, b);
if ((strlen (hex_color) == 7) &&
(g_strcasecmp (buffer, hex_color) != 0))
(g_ascii_strcasecmp (buffer, hex_color) != 0))
{
if ((sscanf (hex_color, "#%x", &hex_rgb) == 1) &&
(hex_rgb < (1 << 24)))
......
......@@ -447,7 +447,7 @@ build_palette_button (void)
/* Preferentially, the initial default is 'Web' if available */
if (theWebPalette == NULL &&
g_strcasecmp (GIMP_OBJECT (palette)->name, "Web") == 0)
g_ascii_strcasecmp (GIMP_OBJECT (palette)->name, "Web") == 0)
{
theWebPalette = palette;
UserHasWebPal = TRUE;
......
......@@ -110,15 +110,24 @@ file_open_dialog_menu_init (void)
for (list = load_procs; list; list = g_slist_next (list))
{
gchar *basename;
gchar *lowercase_basename;
gchar *help_page;
file_proc = (PlugInProcDef *) list->data;
basename = g_path_get_basename (file_proc->prog);
lowercase_basename = g_ascii_strdown (basename);
g_free (basename);
help_page = g_strconcat ("filters/",
g_basename (file_proc->prog),
lowercase_basename,
".html",
NULL);
g_strdown (help_page);
g_free (lowercase_basename);
entry.entry.path = file_proc->menu_path;
entry.entry.accelerator = NULL;
......@@ -449,8 +458,8 @@ set_preview (const gchar *fullfname,
guchar *thumb_rgb;
guchar *raw_thumb;
gint tnw,tnh, i;
gchar *pname;
const gchar *fname;
gchar *dirname;
gchar *basename;
gchar *tname;
gchar *imginfo = NULL;
struct stat file_stat;
......@@ -458,13 +467,12 @@ set_preview (const gchar *fullfname,
gboolean thumb_may_be_outdated = FALSE;
gboolean show_generate_label = TRUE;
pname = g_dirname (fullfname);
fname = g_basename (fullfname); /* Don't free this! */
tname = g_strconcat (pname, G_DIR_SEPARATOR_S,
".xvpics", G_DIR_SEPARATOR_S,
fname, NULL);
dirname = g_path_get_dirname (fullfname);
basename = g_path_get_basename (fullfname);
g_free (pname);
tname = g_strconcat (dirname, G_DIR_SEPARATOR_S,
".xvpics", G_DIR_SEPARATOR_S,
basename, NULL);
/* If the file is newer than its thumbnail, the thumbnail may
* be out of date.
......@@ -482,7 +490,10 @@ set_preview (const gchar *fullfname,
g_free (tname);
gtk_frame_set_label (GTK_FRAME (open_options_frame), fname);
gtk_frame_set_label (GTK_FRAME (open_options_frame), basename);
g_free (dirname);
g_free (basename);
g_free (preview_fullname);
preview_fullname = g_strdup (fullfname);
......
......@@ -98,15 +98,23 @@ file_save_dialog_menu_init (void)
for (list = save_procs; list; list = g_slist_next (list))
{
gchar *help_page;
gchar *basename;
gchar *page;
gchar *lowercase_page;
file_proc = (PlugInProcDef *) list->data;
help_page = g_strconcat ("filters/",
g_basename (file_proc->prog),
".html",
NULL);
g_strdown (help_page);
basename = g_path_get_basename (file_proc->prog);
page = g_strconcat ("filters", G_DIR_SEPARATOR_S,
basename, ".html",
NULL);
g_free (basename);
lowercase_page = g_ascii_strdown (page);
g_free (page);
entry.entry.path = file_proc->menu_path;
entry.entry.accelerator = NULL;
......@@ -114,7 +122,7 @@ file_save_dialog_menu_init (void)
entry.entry.callback_action = 0;
entry.entry.item_type = NULL;
entry.quark_string = NULL;
entry.help_page = help_page;
entry.help_page = lowercase_page;
entry.description = NULL;
menus_create_item_from_full_path (&entry, NULL, file_proc);
......
......@@ -377,16 +377,18 @@ static InfoDialog *info_window_auto = NULL;
static gchar *
info_window_title (GDisplay *gdisp)
{
const gchar *basename;
gchar *title;
gchar *basename;
gchar *title;
basename = g_basename (gimp_image_filename (gdisp->gimage));
basename = g_path_get_basename (gimp_image_filename (gdisp->gimage));
title = g_strdup_printf (_("Info: %s-%d.%d"),
basename,
gimp_image_get_ID (gdisp->gimage),
gdisp->instance);
g_free (basename);
return title;
}
......
......@@ -535,31 +535,38 @@ module_db_browser_new (void)
static gboolean
valid_module_name (const gchar *filename)
{
const gchar *basename;
gint len;
gchar *basename;
gint len;
basename = g_basename (filename);
basename = g_path_get_basename (filename);
len = strlen (basename);
#if !defined(G_OS_WIN32) && !defined(G_WITH_CYGWIN) && !defined(__EMX__)
if (len < 3 + 1 + 3)
return FALSE;
goto no_module;
if (strncmp (basename, "lib", 3))
return FALSE;
goto no_module;
if (strcmp (basename + len - 3, ".so"))