Ran make update-po in gschem in prep for a new release (v1.5.4)
[geda-gaf/peter-b.git] / gattrib / src / g_register.c
blob9662adab6f91d6b5a4024df13844553728b36baf
1 /* gEDA - GPL Electronic Design Automation
2 * gattrib -- gEDA component and net attribute manipulation using spreadsheet.
3 * Copyright (C) 2003-2008 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., 59 Temple Place, Suite 330, Boston, MA 02111 USA
19 /*! \file
20 * \brief Functions to register Scheme functions
22 * Functions to register Scheme functions
25 #include <config.h>
27 #include <stdio.h>
28 #include <sys/stat.h>
29 #ifdef HAVE_STDLIB_H
30 #include <stdlib.h>
31 #endif
32 #ifdef HAVE_ASSERT_H
33 #include <assert.h>
34 #endif
35 #ifdef HAVE_UNISTD_H
36 #include <unistd.h>
37 #endif
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
49 #include <dmalloc.h>
50 #endif
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.
77 SCM g_quit(void)
79 #ifdef DEBUG
80 printf("In g_quit, calling exit(0)\n");
81 #endif
83 gattrib_quit(0);
84 /* exit(0); */ /* Necessary? */
86 /* we don't really get here, but otherwise gcc complains */
87 return SCM_BOOL_F;