mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-23 04:50:28 +02:00
(scm_substring_move_left_x, scm_substring_move_right_x): Deprecated.
This commit is contained in:
parent
4d6444b86a
commit
52d145bcbb
2 changed files with 8 additions and 15 deletions
|
@ -181,6 +181,7 @@ SCM_DEFINE (scm_string_rindex, "string-rindex", 2, 2, 0,
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#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_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);
|
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
|
@end lisp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
SCM_DEFINE (scm_substring_move_x, "substring-move!", 5, 0, 0,
|
SCM_DEFINE (scm_substring_move_x, "substring-move!", 5, 0, 0,
|
||||||
(SCM str1, SCM start1, SCM end1, SCM str2, SCM start2),
|
(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"
|
"Copy the substring of @var{str1} bounded by @var{start1} and @var{end1}\n"
|
||||||
"into @var{str2} beginning at position @var{start2}.\n"
|
"into @var{str2} beginning at position @var{start2}.\n"
|
||||||
"@code{substring-move-right!} begins copying from the rightmost character\n"
|
"@var{str1} and @var{str2} can be the same string.")
|
||||||
"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.")
|
|
||||||
#define FUNC_NAME s_scm_substring_move_x
|
#define FUNC_NAME s_scm_substring_move_x
|
||||||
{
|
{
|
||||||
long s1, s2, e, len;
|
long s1, s2, e, len;
|
||||||
|
|
|
@ -67,9 +67,13 @@ extern SCM scm_string_capitalize (SCM v);
|
||||||
extern SCM scm_string_split (SCM str, SCM chr);
|
extern SCM scm_string_split (SCM str, SCM chr);
|
||||||
extern SCM scm_string_ci_to_symbol (SCM v);
|
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_left_x scm_substring_move_x
|
||||||
#define scm_substring_move_right_x scm_substring_move_x
|
#define scm_substring_move_right_x scm_substring_move_x
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* STROPH */
|
#endif /* STROPH */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue