missing NULL terminator in set_config_x
[geda-gaf.git] / utils / gschlas / g_register.c
blob85b67881ef0c333e5e296ea08b1c3156dbd2f1b7
1 /* gEDA - GPL Electronic Design Automation
2 * gschlas - gEDA Load and Save
3 * Copyright (C) 2002-2010 Ales Hvezda
4 * Copyright (C) 2002-2020 gEDA Contributors (see ChangeLog for details)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02111-1301 USA.
22 #include <config.h>
24 #include <stdio.h>
25 #include <sys/stat.h>
26 #ifdef HAVE_STDLIB_H
27 #include <stdlib.h>
28 #endif
29 #ifdef HAVE_ASSERT_H
30 #include <assert.h>
31 #endif
32 #ifdef HAVE_UNISTD_H
33 #include <unistd.h>
34 #endif
36 #include <libgeda/libgeda.h>
38 #include "../include/prototype.h"
42 /*! \brief Register Scheme functions
44 * This function registers the Scheme functions required to use
45 * gschlas. They are mostly unnecessary, except for reading in the gschlasrc
46 * file at the beginning of the prog which gives the library search paths.
48 void
49 g_register_funcs(void)
51 /* general functions */
52 scm_c_define_gsubr ("quit", 0, 0, 0, g_quit);
53 scm_c_define_gsubr ("exit", 0, 0, 0, g_quit);
55 /* gschlas functions */
56 scm_c_define_gsubr ("gschlas-version", 1, 0, 0, g_rc_gschlas_version);
60 /*! \brief Scheme function to quit the application
62 * Quit the application from within Scheme.
64 SCM
65 g_quit(void)
67 gschlas_quit();
68 exit(0);