libgeda
|
00001 /* gEDA - GPL Electronic Design Automation 00002 * libgeda - gEDA's library - Scheme API 00003 * Copyright (C) 2010-2012 Peter Brett <peter@peter-b.co.uk> 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA 00018 */ 00019 00024 #include <config.h> 00025 00026 #include "libgeda_priv.h" 00027 #include "libgedaguile_priv.h" 00028 00030 static int init_called = 0; 00031 00032 SCM_GLOBAL_SYMBOL (edascm_object_state_sym, "object-state"); 00033 00038 static void * 00039 edascm_init_impl (void *data) 00040 { 00041 #include "scheme_init.x" 00042 00043 edascm_init_smob (); 00044 edascm_init_toplevel (); 00045 edascm_init_object (); 00046 edascm_init_complex (); 00047 edascm_init_page (); 00048 edascm_init_attrib (); 00049 edascm_init_os (); 00050 edascm_init_deprecated (); 00051 return NULL; 00052 } 00053 00060 void 00061 edascm_init () 00062 { 00063 if (init_called) return; 00064 init_called = 1; 00065 00066 scm_with_guile (edascm_init_impl, NULL); 00067 }