SCM_API SCM scm_read_0str (char *expr);
SCM_API SCM scm_eval_0str (const char *expr);
+SCM_API char *scm_i_object_chars (SCM);
+
+#define SCM_CHARS(x) scm_i_object_chars(x)
+#define SCM_UCHARS(x) ((unsigned char *)SCM_CHARS(x))
+
+SCM_API long scm_i_object_length (SCM);
+
+#define SCM_LENGTH(x) scm_i_object_length(x)
+
#define scm_strhash(str, len, n) (scm_string_hash ((str), (len)) % (n))
SCM_API SCM scm_sym2ovcell_soft (SCM sym, SCM obarray);
*/
SCM_API char *scm_c_substring2str (SCM obj, char *str, size_t start, size_t len);
+SCM_API char *scm_c_symbol2str (SCM obj, char *str, size_t *lenp);
+
/* Deprecated because the names belong to what is now
scm_truncate_number and scm_round_number.
*/
SCM_API double scm_truncate (double x);
SCM_API double scm_round (double x);
+/* Deprecated because we don't want people to access the internal
+ representation of strings directly.
+*/
+
+#define SCM_VALIDATE_STRING_COPY(pos, str, cvar) \
+ do { \
+ SCM_ASSERT (SCM_STRINGP (str), str, pos, FUNC_NAME); \
+ cvar = SCM_STRING_CHARS(str); \
+ } while (0)
+
+/* validate a string and optional start/end arguments which default to
+ 0/string-len. this is unrelated to the old shared substring
+ support, so please do not deprecate it :) */
+#define SCM_VALIDATE_SUBSTRING_SPEC_COPY(pos_str, str, c_str, \
+ pos_start, start, c_start,\
+ pos_end, end, c_end) \
+ do {\
+ SCM_VALIDATE_STRING_COPY (pos_str, str, c_str);\
+ c_start = SCM_UNBNDP(start)? 0 : scm_to_size_t (start);\
+ c_end = SCM_UNBNDP(end)? SCM_STRING_LENGTH(str) : scm_to_size_t (end);\
+ SCM_ASSERT_RANGE (pos_start, start,\
+ 0 <= c_start \
+ && (size_t) c_start <= SCM_STRING_LENGTH (str));\
+ SCM_ASSERT_RANGE (pos_end, end,\
+ c_start <= c_end \
+ && (size_t) c_end <= SCM_STRING_LENGTH (str));\
+ } while (0)
+
+/* Deprecated because we don't want people to access the internals of
+ symbols directly.
+*/
+
+SCM_API char *SCM_SYMBOL_CHARS (SCM sym);
+SCM_API size_t SCM_SYMBOL_LENGTH (SCM sym);
+
+/* Deprecated because the macros used to evaluate the arguments more
+ than once and because the symbol of a keyword now has no dash.
+*/
+
+SCM_API int SCM_KEYWORDP (SCM obj);
+SCM_API SCM SCM_KEYWORDSYM (SCM keyword);
+
+/* Deprecated because we don't want to hand out unprotected pointers
+ to arrays, vectors, etc. */
+
+#define SCM_VECTOR_MAX_LENGTH ((1L << 24) - 1)
+
+SCM_API int SCM_VECTORP (SCM x);
+SCM_API unsigned long SCM_VECTOR_LENGTH (SCM x);
+SCM_API const SCM *SCM_VELTS (SCM x);
+SCM_API SCM *SCM_WRITABLE_VELTS (SCM x);
+SCM_API SCM SCM_VECTOR_REF (SCM x, size_t idx);
+SCM_API void SCM_VECTOR_SET (SCM x, size_t idx, SCM val);
+SCM_API SCM scm_vector_equal_p (SCM x, SCM y);
+
void scm_i_init_deprecated (void);
#endif