libgeda: Remove some exit() calls and assertions.
[geda-gaf/peter-b.git] / libgeda / src / libgeda.c
blobbe41a13964e86aef0ca8c1150abde866dd6df6d0
1 /* gEDA - GPL Electronic Design Automation
2 * libgeda - gEDA's library
3 * Copyright (C) 1998, 1999, 2000 Kazu Hirata / Ales Hvezda
4 * Copyright (C) 1998-2010 Ales Hvezda
5 * Copyright (C) 1998-2010 gEDA Contributors (see ChangeLog for details)
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #include <config.h>
23 #include <stdio.h>
24 #ifdef HAVE_STRING_H
25 #include <string.h>
26 #endif
27 #ifdef HAVE_STRARG_H
28 #include <stdarg.h>
29 #endif
30 #ifdef HAVE_STDLIB_H
31 #include <stdlib.h>
32 #endif
34 #include "libgeda_priv.h"
35 #include "libgeda/libgedaguile.h"
37 #ifdef HAVE_LIBDMALLOC
38 #include <dmalloc.h>
39 #endif
41 /*! \brief Perform runtime initialization of libgeda library.
42 * \par Function Description
43 * This function is responsible for making sure that any runtime
44 * initialization is done for all the libgeda routines. It should
45 * be called before any other libgeda functions are called.
48 void libgeda_init(void)
50 #ifdef ENABLE_NLS
51 /* Initialise gettext */
52 bindtextdomain (LIBGEDA_GETTEXT_DOMAIN, LOCALEDIR);
53 bind_textdomain_codeset(LIBGEDA_GETTEXT_DOMAIN, "UTF-8");
54 #endif
56 /* Initialise gobject */
57 g_type_init ();
59 s_path_sys_data ();
60 s_path_sys_config ();
62 s_clib_init();
63 s_slib_init();
64 s_menu_init();
65 s_attrib_init();
66 s_color_init();
68 g_register_libgeda_funcs();
69 g_register_libgeda_dirs();
71 edascm_init ();