From 30e2f85555b1b6728bbc7c7435ccc426fff69aee Mon Sep 17 00:00:00 2001 From: Ivan Stankovic Date: Thu, 16 Jun 2011 21:42:24 +0100 Subject: [PATCH] gschem: g_rc_gschem_version: remove use of deprecated SCM_STRING_CHARS Reviewed-by: Peter TB Brett --- gschem/src/g_rc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gschem/src/g_rc.c b/gschem/src/g_rc.c index 04e8e8d7e..1ac52c45b 100644 --- a/gschem/src/g_rc.c +++ b/gschem/src/g_rc.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include +#include #include #include @@ -62,21 +63,23 @@ void g_rc_parse_gtkrc() * \par Function Description * */ -SCM g_rc_gschem_version(SCM version) +SCM g_rc_gschem_version(SCM scm_version) { SCM ret; + char *version; - SCM_ASSERT (scm_is_string (version), version, + SCM_ASSERT (scm_is_string (scm_version), scm_version, SCM_ARG1, "gschem-version"); - if (g_strcasecmp (SCM_STRING_CHARS (version), PACKAGE_DATE_VERSION) != 0) { + version = scm_to_utf8_string (scm_version); + if (g_strcasecmp (version, PACKAGE_DATE_VERSION) != 0) { fprintf(stderr, "You are running gEDA/gaf version [%s%s.%s],\n", PREPEND_VERSION_STRING, PACKAGE_DOTTED_VERSION, PACKAGE_DATE_VERSION); fprintf(stderr, "but you have a version [%s] gschemrc file:\n[%s]\n", - SCM_STRING_CHARS (version), rc_filename); + version, rc_filename); fprintf(stderr, "Please be sure that you have the latest rc file.\n"); ret = SCM_BOOL_F; @@ -84,6 +87,7 @@ SCM g_rc_gschem_version(SCM version) ret = SCM_BOOL_T; } + free(version); return ret; } -- 2.11.4.GIT