guile-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile/guile-core/libguile strop.h strop.c


From: Marius Vollmer
Subject: guile/guile-core/libguile strop.h strop.c
Date: Tue, 13 Nov 2001 10:46:29 -0500

CVSROOT:        /cvs
Module name:    guile
Changes by:     Marius Vollmer <address@hidden> 01/11/13 10:46:29

Modified files:
        guile-core/libguile: strop.h strop.c 

Log message:
        (scm_substring_move_left_x, scm_substring_move_right_x): Removed.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/strop.h.diff?cvsroot=OldCVS&tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/strop.c.diff?cvsroot=OldCVS&tr1=1.65&tr2=1.66&r1=text&r2=text

Patches:
Index: guile/guile-core/libguile/strop.c
diff -u guile/guile-core/libguile/strop.c:1.65 
guile/guile-core/libguile/strop.c:1.66
--- guile/guile-core/libguile/strop.c:1.65      Sun Nov 11 15:49:24 2001
+++ guile/guile-core/libguile/strop.c   Tue Nov 13 10:46:29 2001
@@ -181,83 +181,11 @@
 }
 #undef FUNC_NAME
 
-
-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);
-
-/*
address@hidden substring-move-left! str1 start1 end1 str2 start2
address@hidden defun
address@hidden {C Function} SCM scm_substring_move_left_x (SCM @var{str1}, SCM 
@var{start1}, SCM @var{end1}, SCM @var{str2}, SCM @var{start2})
address@hidden:} this is only valid if you've applied the strop patch].
-
-Moves a substring of @var{str1}, from @var{start1} to @var{end1}
-(@var{end1} is exclusive), into @var{str2}, starting at
address@hidden Allows overlapping strings.
-
address@hidden
-(define x (make-string 10 #\a))
-(define y "bcd")
-(substring-move-left! x 2 5 y 0)
-y
address@hidden "aaa"
-
-x
address@hidden "aaaaaaaaaa"
-
-(define y "bcdefg")
-(substring-move-left! x 2 5 y 0)
-y
address@hidden "aaaefg"
-
-(define y "abcdefg")
-(substring-move-left! y 2 5 y 3)
-y
address@hidden "abccccg"
address@hidden lisp
-*/
-
-/*
address@hidden substring-move-right! str1 start1 end1 str2 start2
address@hidden defun
address@hidden {C Function} SCM scm_substring_move_right_x (SCM @var{str1}, SCM 
@var{start1}, SCM @var{end1}, SCM @var{str2}, SCM @var{start2})
address@hidden:} this is only valid if you've applied the strop patch, if
-it hasn't made it into the guile tree].
-
-Does much the same thing as @code{substring-move-left!}, except it
-starts moving at the end of the sequence, rather than the beginning.
address@hidden
-(define y "abcdefg")
-(substring-move-right! y 2 5 y 0)
-y
address@hidden "ededefg"
-
-(define y "abcdefg")
-(substring-move-right! y 2 5 y 3)
-y
address@hidden "abccdeg"
address@hidden lisp
-*/
-
 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;
Index: guile/guile-core/libguile/strop.h
diff -u guile/guile-core/libguile/strop.h:1.15 
guile/guile-core/libguile/strop.h:1.16
--- guile/guile-core/libguile/strop.h:1.15      Thu Nov  1 19:19:11 2001
+++ guile/guile-core/libguile/strop.h   Tue Nov 13 10:46:29 2001
@@ -69,9 +69,6 @@
 SCM_API SCM scm_string_split (SCM str, SCM chr);
 SCM_API SCM scm_string_ci_to_symbol (SCM v);
 
-#define scm_substring_move_left_x scm_substring_move_x
-#define scm_substring_move_right_x scm_substring_move_x
-
 #endif  /* SCM_STROP_H */
 
 /*



reply via email to

[Prev in Thread] Current Thread [Next in Thread]