1 /* gEDA - GPL Electronic Design Automation
2 * gattrib -- gEDA component and net attribute manipulation using spreadsheet.
3 * Copyright (C) 2003-2010 Stuart D. Brorson.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 * \brief Functions to register Scheme functions
22 * Functions to register Scheme functions
39 /*------------------------------------------------------------------
40 * Gattrib specific includes
41 *------------------------------------------------------------------*/
42 #include <libgeda/libgeda.h> /* geda library fcns */
43 #include "../include/struct.h" /* typdef and struct declarations */
44 #include "../include/prototype.h" /* function prototypes */
45 #include "../include/globals.h"
46 #include "../include/i_vars.h"
48 #ifdef HAVE_LIBDMALLOC
52 /* GtkWidget *w_main; */
55 /* ---------------------------------------------------------------------- */
56 /*! \brief Register Scheme functions
58 * This function registers the Scheme functions required to use
59 * gattrib. They are mostly unnecessary, except for reading in the gattribrc
60 * file at the beginning of the prog which gives the library search paths.
62 void g_register_funcs(void)
64 /* general functions */
65 scm_c_define_gsubr ("quit", 0, 0, 0, g_quit
);
66 scm_c_define_gsubr ("exit", 0, 0, 0, g_quit
);
68 /* gattrib functions */
69 scm_c_define_gsubr ("gattrib-version", 1, 0, 0, g_rc_gattrib_version
);
73 /*! \brief Scheme function to quit the application
75 * Quit the application from within Scheme.
80 printf("In g_quit, calling exit(0)\n");
84 /* exit(0); */ /* Necessary? */
86 /* we don't really get here, but otherwise gcc complains */