Enlightenment CVS committal
Author : tsauerbeck
Project : misc
Module : embrace
Dir : misc/embrace/src
Modified Files:
main.c
Log Message:
added ltdl sanity checks
===================================================================
RCS file: /cvsroot/enlightenment/misc/embrace/src/main.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- main.c 1 Mar 2004 20:02:58 -0000 1.1
+++ main.c 23 Mar 2004 19:43:38 -0000 1.2
@@ -1,5 +1,5 @@
/*
- * $Id: main.c,v 1.1 2004/03/01 20:02:58 tsauerbeck Exp $
+ * $Id: main.c,v 1.2 2004/03/23 19:43:38 tsauerbeck Exp $
*
* Copyright (C) 2004 Embrace project.
*
@@ -41,7 +41,7 @@
return 1;
}
-static void init ()
+static bool init ()
{
char path[PATH_MAX * 2 + 2];
@@ -53,12 +53,22 @@
ecore_event_handler_add (ECORE_EVENT_SIGNAL_EXIT, on_signal_exit,
NULL);
- lt_dlinit ();
+ if (lt_dlinit ()) {
+ fprintf (stderr, "Cannot initialize LTDL!\n");
+ return false;
+ }
/* set plugin search path */
snprintf (path, sizeof (path), "%s/.e/apps/" PACKAGE "/plugins:"
PLUGIN_DIR, getenv ("HOME"));
- lt_dlsetsearchpath (path);
+
+ if (lt_dlsetsearchpath (path)) {
+ fprintf (stderr, "Cannot set LTDL search path to '%s'!\n",
+ path);
+ return false;
+ }
+
+ return true;
}
static void shutdown ()
@@ -72,9 +82,10 @@
int main (int argc, const char **argv)
{
- Embrace *e;
+ Embrace *e = NULL;
- init ();
+ if (!init ())
+ BAIL_OUT ();
if (!(e = embrace_new ())) {
fprintf (stderr, "Out of memory!\n");
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs