Updated copyright text/header in most source files.
[geda-gaf/peter-b.git] / utils / gschlas / g_rc.c
blob6dfeb037cb08a933fbd079e0ef50a9d4231193c2
1 /* gEDA - GPL Electronic Design Automation
2 * gschlas - gEDA Load and Save
3 * Copyright (C) 2002-2010 Ales Hvezda
4 * Copyright (C) 2002-2010 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., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include <config.h>
22 #include <version.h>
24 #include <stdio.h>
25 #include <ctype.h>
26 #include <sys/stat.h>
27 #ifdef HAVE_STRING_H
28 #include <string.h>
29 #endif
30 #ifdef HAVE_STDLIB_H
31 #include <stdlib.h>
32 #endif
33 #ifdef HAVE_UNISTD_H
34 #include <unistd.h>
35 #endif
37 #include <libgeda/libgeda.h>
39 #include "../include/globals.h"
40 #include "../include/i_vars.h"
41 #include "../include/prototype.h"
43 #ifdef HAVE_LIBDMALLOC
44 #include <dmalloc.h>
45 #endif
47 SCM g_rc_gschlas_version(SCM version)
50 SCM_ASSERT (scm_is_string (version), version,
51 SCM_ARG1, "gschlas-version");
54 if (g_strcasecmp (SCM_STRING_CHARS (version), PACKAGE_DATE_VERSION) != 0) {
55 fprintf(stderr,
56 "You are running gEDA/gaf version [%s%s.%s],\n",
57 PREPEND_VERSION_STRING, PACKAGE_DOTTED_VERSION,
58 PACKAGE_DATE_VERSION);
59 fprintf(stderr,
60 "but you have a version [%s] gschlasrc file:\n[%s]\n",
61 SCM_STRING_CHARS (version), rc_filename);
62 fprintf(stderr,
63 "Please be sure that you have the latest rc file.\n");
64 return SCM_BOOL_F;
67 return SCM_BOOL_T;
71 SCM
72 g_rc_force_boundingbox(SCM mode)
74 static const vstbl_entry mode_table[] = {
75 {TRUE, "enabled"},
76 {FALSE, "disabled"}
79 RETURN_G_RC_MODE("force-boundingbox", default_force_boundingbox, 2);
83 /*************************** GUILE end done *********************************/