* keywords.c, keywords.h (scm_c_make_keyword): New function.
authorMikael Djurfeldt <djurfeldt@nada.kth.se>
Wed, 23 Jun 1999 11:16:09 +0000 (11:16 +0000)
committerMikael Djurfeldt <djurfeldt@nada.kth.se>
Wed, 23 Jun 1999 11:16:09 +0000 (11:16 +0000)
(We should remove the use of the prefix '-'.)

libguile/keywords.c
libguile/keywords.h

index 821624c..dce5aee 100644 (file)
@@ -112,6 +112,18 @@ scm_make_keyword_from_dash_symbol (symbol)
   return SCM_CDR (vcell);
 }
 
+SCM
+scm_c_make_keyword (char *s)
+{
+  SCM vcell;
+  char *buf = scm_must_malloc (strlen (s) + 2, "keyword");
+  buf[0] = '-';
+  strcpy (buf + 1, s);
+  vcell = scm_sysintern0 (buf);
+  scm_must_free (buf);
+  return scm_make_keyword_from_dash_symbol (SCM_CAR (vcell));
+}
+
 SCM_PROC(s_keyword_p, "keyword?", 1, 0, 0, scm_keyword_p);
 
 SCM
index 48ad424..6c122b8 100644 (file)
@@ -55,9 +55,10 @@ extern int scm_tc16_keyword;
 \f
 
 
-extern SCM scm_make_keyword_from_dash_symbol SCM_P ((SCM symbol));
-extern SCM scm_keyword_p SCM_P ((SCM obj));
-extern SCM scm_keyword_dash_symbol SCM_P ((SCM keyword));
-extern void scm_init_keywords SCM_P ((void));
+extern SCM scm_make_keyword_from_dash_symbol (SCM symbol);
+extern SCM scm_c_make_keyword (char *s);
+extern SCM scm_keyword_p (SCM obj);
+extern SCM scm_keyword_dash_symbol (SCM keyword);
+extern void scm_init_keywords (void);
 
 #endif  /* KEYWORDSH */