gsymcheck

g_rc.c

Go to the documentation of this file.
00001 /* gEDA - GPL Electronic Design Automation
00002  * gsymcheck - gEDA Symbol Check 
00003  * Copyright (C) 1998-2010 Ales Hvezda
00004  * Copyright (C) 1998-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 #include <missing.h>
00024 #include <version.h>
00025 
00026 #include <stdio.h>
00027 #include <ctype.h>
00028 #include <sys/stat.h>
00029 #ifdef HAVE_STRING_H
00030 #include <string.h>
00031 #endif
00032 #ifdef HAVE_STDLIB_H
00033 #include <stdlib.h>
00034 #endif
00035 #ifdef HAVE_UNISTD_H
00036 #include <unistd.h>
00037 #endif
00038 
00039 #include <libgeda/libgeda.h>
00040 
00041 #include "../include/struct.h"
00042 #include "../include/globals.h"
00043 #include "../include/i_vars.h"
00044 #include "../include/prototype.h"
00045 
00046 SCM g_rc_gsymcheck_version(SCM scm_version)
00047 {
00048   char *version;
00049   SCM ret = SCM_BOOL_T;
00050 
00051   SCM_ASSERT (scm_is_string (scm_version), scm_version,
00052           SCM_ARG1, "gsymcheck-version");
00053 
00054   version = scm_to_utf8_string (scm_version);
00055   if (g_strcasecmp (version, PACKAGE_DATE_VERSION) != 0) {
00056     fprintf(stderr,
00057             "You are running gEDA/gaf version [%s%s.%s],\n",
00058             PREPEND_VERSION_STRING, PACKAGE_DOTTED_VERSION, PACKAGE_DATE_VERSION);
00059     fprintf(stderr,
00060             "but you have a version [%s] gsymcheckrc file:\n[%s]\n",
00061             version, rc_filename);
00062     fprintf(stderr,
00063             "Please be sure that you have the latest rc file.\n");
00064     ret = SCM_BOOL_F;
00065   }
00066 
00067   free (version);
00068   return ret;
00069 }
00070 
00071 /*************************** GUILE end done *********************************/
 All Data Structures Files Functions Variables Typedefs Defines