gattrib
|
00001 /* gEDA - GPL Electronic Design Automation 00002 * gattrib -- gEDA component and net attribute manipulation using spreadsheet. 00003 * Copyright (C) 2003-2010 Stuart D. Brorson. 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 */ 00025 #include <config.h> 00026 00027 #include <stdio.h> 00028 #include <sys/stat.h> 00029 #ifdef HAVE_STDLIB_H 00030 #include <stdlib.h> 00031 #endif 00032 #ifdef HAVE_ASSERT_H 00033 #include <assert.h> 00034 #endif 00035 #ifdef HAVE_UNISTD_H 00036 #include <unistd.h> 00037 #endif 00038 00039 /*------------------------------------------------------------------ 00040 * Gattrib specific includes 00041 *------------------------------------------------------------------*/ 00042 #include <libgeda/libgeda.h> /* geda library fcns */ 00043 #include "../include/struct.h" /* typdef and struct declarations */ 00044 #include "../include/prototype.h" /* function prototypes */ 00045 #include "../include/globals.h" 00046 #include "../include/i_vars.h" 00047 00048 #ifdef HAVE_LIBDMALLOC 00049 #include <dmalloc.h> 00050 #endif 00051 00052 /* GtkWidget *w_main; */ 00053 00054 00055 /* ---------------------------------------------------------------------- */ 00062 void g_register_funcs(void) 00063 { 00064 /* general functions */ 00065 scm_c_define_gsubr ("quit", 0, 0, 0, g_quit); 00066 scm_c_define_gsubr ("exit", 0, 0, 0, g_quit); 00067 00068 /* gattrib functions */ 00069 scm_c_define_gsubr ("gattrib-version", 1, 0, 0, g_rc_gattrib_version); 00070 00071 } 00072 00077 SCM g_quit(void) 00078 { 00079 #ifdef DEBUG 00080 printf("In g_quit, calling exit(0)\n"); 00081 #endif 00082 00083 gattrib_quit(0); 00084 /* exit(0); */ /* Necessary? */ 00085 00086 /* we don't really get here, but otherwise gcc complains */ 00087 return SCM_BOOL_F; 00088 } 00089