utils

g_register.c

Go to the documentation of this file.
00001 /* gEDA - GPL Electronic Design Automation
00002  * gschlas - gEDA Load and Save
00003  * Copyright (C) 2002-2010 Ales Hvezda
00004  * Copyright (C) 2002-2010 gEDA Contributors (see ChangeLog for details)
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00019  * MA 02111-1301 USA.
00020  */
00021 
00022 #include <config.h>
00023 
00024 #include <stdio.h>
00025 #include <sys/stat.h>
00026 #ifdef HAVE_STDLIB_H
00027 #include <stdlib.h>
00028 #endif
00029 #ifdef HAVE_ASSERT_H
00030 #include <assert.h>
00031 #endif
00032 #ifdef HAVE_UNISTD_H
00033 #include <unistd.h> 
00034 #endif
00035 
00036 #include <libgeda/libgeda.h>
00037 
00038 #include "../include/prototype.h"
00039 
00040 #ifdef HAVE_LIBDMALLOC
00041 #include <dmalloc.h>
00042 #endif
00043 
00044 void
00045 g_register_funcs(void)
00046 {
00047   /* general functions */
00048   scm_c_define_gsubr ("quit", 0, 0, 0, g_quit);
00049   scm_c_define_gsubr ("exit", 0, 0, 0, g_quit);
00050 
00051   /* gsymcheckrc functions */
00052   scm_c_define_gsubr ("gschlas-version", 1, 0, 0, g_rc_gschlas_version);
00053   scm_c_define_gsubr ("force-boundingbox", 1, 0, 0, g_rc_force_boundingbox);
00054 }
00055 
00056 SCM
00057 g_quit(void)
00058 {
00059   gschlas_quit();
00060   exit(0);
00061 }
00062 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines