/* gEDA - GPL Electronic Design Automation * libgeda - gEDA's Library * Copyright (C) 1998-2004 Ales V. Hvezda * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA */ #include #include #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_ASSERT_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #include #include #include "defines.h" #include "struct.h" #include "globals.h" #include "o_types.h" #include "colors.h" #include "i_vars.h" #include "prototype.h" #ifdef HAVE_LIBDMALLOC #include #endif /*! \brief */ struct gsubr_t { char* name; int req; int opt; int rst; SCM (*fnc)(); }; /*! \brief */ static struct gsubr_t libgeda_funcs[] = { { "component-library", 1, 0, 0, g_rc_component_library }, { "component-library-search", 1, 0, 0, g_rc_component_library_search }, { "source-library", 1, 0, 0, g_rc_source_library }, { "source-library-search", 1, 0, 0, g_rc_source_library_search }, { "world-size", 3, 0, 0, g_rc_world_size }, { "reset-component-library", 0, 0, 0, g_rc_reset_component_library }, { "reset-source-library", 0, 0, 0, g_rc_reset_source_library }, { "default-series-name", 1, 0, 0, g_rc_default_series_name }, { "untitled-name", 1, 0, 0, g_rc_untitled_name }, { "scheme-directory", 1, 0, 0, g_rc_scheme_directory }, { "bitmap-directory", 1, 0, 0, g_rc_bitmap_directory }, { "font-directory", 1, 0, 0, g_rc_font_directory }, { "bus-ripper-symname", 1, 0, 0, g_rc_bus_ripper_symname }, { "postscript-prolog", 1, 0, 0, g_rc_postscript_prolog }, { "map-font-character-to-file", 2, 0, 0, g_rc_map_font_character_to_file }, { "always-promote-attributes",1, 0, 0, g_rc_always_promote_attributes }, { NULL, 0, 0, 0, NULL } }; /*! \brief Register all libgeda functions with scheme. * \par Function Description * Creates g_subr_t objects to make g_rc_* functions that are defined * in g_rc.c visible to Scheme. */ void g_register_libgeda_funcs (void) { struct gsubr_t *tmp = libgeda_funcs; while (tmp->name != NULL) { scm_c_define_gsubr (tmp->name, tmp->req, tmp->opt, tmp->rst, tmp->fnc); tmp++; } }