From 52d145bcbbcef66c051f0a280d69b4e0c6e8cf63 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Tue, 13 Nov 2001 15:19:57 +0000 Subject: [PATCH] (scm_substring_move_left_x, scm_substring_move_right_x): Deprecated. --- libguile/strop.c | 19 ++++--------------- libguile/strop.h | 4 ++++ 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/libguile/strop.c b/libguile/strop.c index 82b150179..93e82f088 100644 --- a/libguile/strop.c +++ b/libguile/strop.c @@ -181,6 +181,7 @@ SCM_DEFINE (scm_string_rindex, "string-rindex", 2, 2, 0, } #undef FUNC_NAME +#if SCM_DEBUG_DEPRECATED == 0 SCM_REGISTER_PROC(s_substring_move_left_x, "substring-move-left!", 5, 0, 0, scm_substring_move_x); SCM_REGISTER_PROC(s_substring_move_right_x, "substring-move-right!", 5, 0, 0, scm_substring_move_x); @@ -239,25 +240,13 @@ y @end lisp */ +#endif + SCM_DEFINE (scm_substring_move_x, "substring-move!", 5, 0, 0, (SCM str1, SCM start1, SCM end1, SCM str2, SCM start2), - "@deffnx primitive substring-move-left! str1 start1 end1 str2 start2\n" - "@deffnx primitive substring-move-right! str1 start1 end1 str2 start2\n" "Copy the substring of @var{str1} bounded by @var{start1} and @var{end1}\n" "into @var{str2} beginning at position @var{start2}.\n" - "@code{substring-move-right!} begins copying from the rightmost character\n" - "and moves left, and @code{substring-move-left!} copies from the leftmost\n" - "character moving right.\n\n" - "It is useful to have two functions that copy in different directions so\n" - "that substrings can be copied back and forth within a single string. If\n" - "you wish to copy text from the left-hand side of a string to the\n" - "right-hand side of the same string, and the source and destination\n" - "overlap, you must be careful to copy the rightmost characters of the\n" - "text first, to avoid clobbering your data. Hence, when @var{str1} and\n" - "@var{str2} are the same string, you should use\n" - "@code{substring-move-right!} when moving text from left to right, and\n" - "@code{substring-move-left!} otherwise. If @code{str1} and @samp{str2}\n" - "are different strings, it does not matter which function you use.") + "@var{str1} and @var{str2} can be the same string.") #define FUNC_NAME s_scm_substring_move_x { long s1, s2, e, len; diff --git a/libguile/strop.h b/libguile/strop.h index 14b079849..8e12b4362 100644 --- a/libguile/strop.h +++ b/libguile/strop.h @@ -67,9 +67,13 @@ extern SCM scm_string_capitalize (SCM v); extern SCM scm_string_split (SCM str, SCM chr); extern SCM scm_string_ci_to_symbol (SCM v); +#if SCM_DEBUG_DEPRECATED == 0 + #define scm_substring_move_left_x scm_substring_move_x #define scm_substring_move_right_x scm_substring_move_x +#endif + #endif /* STROPH */ /*