1996-07-25 22:56:11 +00:00
|
|
|
|
/* classes: src_files */
|
|
|
|
|
|
|
2000-06-12 12:28:24 +00:00
|
|
|
|
/* Copyright (C) 1994, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
|
|
any later version.
|
|
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
1997-05-26 22:34:48 +00:00
|
|
|
|
along with this software; see the file COPYING. If not, write to the
|
|
|
|
|
|
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
|
|
|
|
02111-1307 USA */
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
1999-12-12 02:36:16 +00:00
|
|
|
|
/* Software engineering face-lift by Greg J. Badros, 11-Dec-1999,
|
|
|
|
|
|
gjb@cs.washington.edu, http://www.cs.washington.edu/homes/gjb */
|
|
|
|
|
|
|
|
|
|
|
|
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
2000-04-21 14:16:44 +00:00
|
|
|
|
#include "libguile/_scm.h"
|
|
|
|
|
|
#include "libguile/chars.h"
|
|
|
|
|
|
#include "libguile/strings.h"
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
2000-04-21 14:16:44 +00:00
|
|
|
|
#include "libguile/validate.h"
|
|
|
|
|
|
#include "libguile/strop.h"
|
|
|
|
|
|
#include "libguile/read.h" /*For SCM_CASE_INSENSITIVE_P*/
|
* strings.h: don't use SCM_P. don't include <string.h>.
* error.c, gh_data.c, ports.c, script.c, strop.c: include <string.h>.
* strings.c (scm_string_ref): make the 2nd argument compulsory.
previously it defaulted to zero for no good reason that I can see.
use a local variable for SCM_INUM (k). replace
SCM_VALIDATE_INUM_DEF with SCM_VALIDATE_INUM_COPY.
(scm_makfromstr): cosmetic changes.
(scm_string): Accept only chars in the list, not strings, for
conformance to R5RS (particularly for list->string, which is
supposed to be the inverse of string->list.) remove
SCM_DEFER_INTS/SCM_ALLOW_INTS, which is unnecessary since
scm_makstr handles the cell allocation. when reporting wrong-type
arg, don't report the position as 1.
* posix.c (scm_init_posix): intern PIPE_BUF if it's defined.
* boot-9.scm (find-and-link-dynamic-module): pass strings, not symbols,
to string-append.
2000-01-31 18:29:56 +00:00
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_STRING_H
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
2000-01-27 01:35:16 +00:00
|
|
|
|
/*
|
2000-01-27 18:00:06 +00:00
|
|
|
|
xSCM_DEFINE (scm_i_index, "i-index", 2, 2, 0,
|
2000-01-27 01:35:16 +00:00
|
|
|
|
(SCM str, SCM chr, SCM frm, SCM to),
|
|
|
|
|
|
"@deftypefn {Internal C Function} {static int} scm_i_index (SCM *@var{str}, \n"
|
|
|
|
|
|
"SCM @var{chr}, int @var{direction}, SCM @var{sub_start}, SCM @var{sub_end}, char *@var{why})
|
|
|
|
|
|
"This is a workhorse function that performs either an @code{index} or\n"
|
2000-11-28 18:22:23 +00:00
|
|
|
|
"@code{rindex} function, depending on the value of @var{direction}."
|
2000-01-27 01:35:16 +00:00
|
|
|
|
*/
|
1997-02-04 05:27:57 +00:00
|
|
|
|
/* implements index if direction > 0 otherwise rindex. */
|
|
|
|
|
|
static int
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
scm_i_index (SCM *str, SCM chr, int direction, SCM sub_start,
|
|
|
|
|
|
SCM sub_end, const char *why)
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
|
|
|
|
|
unsigned char * p;
|
|
|
|
|
|
int x;
|
1997-02-04 05:27:57 +00:00
|
|
|
|
int lower;
|
|
|
|
|
|
int upper;
|
1996-07-25 22:56:11 +00:00
|
|
|
|
int ch;
|
|
|
|
|
|
|
2000-10-30 11:42:26 +00:00
|
|
|
|
SCM_ASSERT (SCM_STRINGP (*str), *str, SCM_ARG1, why);
|
2000-03-02 20:54:43 +00:00
|
|
|
|
SCM_ASSERT (SCM_CHARP (chr), chr, SCM_ARG2, why);
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
2000-04-03 08:47:51 +00:00
|
|
|
|
if (SCM_FALSEP (sub_start))
|
1996-07-25 22:56:11 +00:00
|
|
|
|
sub_start = SCM_MAKINUM (0);
|
1997-02-04 05:27:57 +00:00
|
|
|
|
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
SCM_ASSERT (SCM_INUMP (sub_start), sub_start, SCM_ARG3, why);
|
1997-02-04 05:27:57 +00:00
|
|
|
|
lower = SCM_INUM (sub_start);
|
2000-10-30 11:42:26 +00:00
|
|
|
|
if (lower < 0 || lower > SCM_STRING_LENGTH (*str))
|
1997-02-04 05:27:57 +00:00
|
|
|
|
scm_out_of_range (why, sub_start);
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
2000-04-03 08:47:51 +00:00
|
|
|
|
if (SCM_FALSEP (sub_end))
|
2000-10-30 11:42:26 +00:00
|
|
|
|
sub_end = SCM_MAKINUM (SCM_STRING_LENGTH (*str));
|
1997-02-04 05:27:57 +00:00
|
|
|
|
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
SCM_ASSERT (SCM_INUMP (sub_end), sub_end, SCM_ARG4, why);
|
1997-02-04 05:27:57 +00:00
|
|
|
|
upper = SCM_INUM (sub_end);
|
2000-10-30 11:42:26 +00:00
|
|
|
|
if (upper < SCM_INUM (sub_start) || upper > SCM_STRING_LENGTH (*str))
|
1997-02-04 05:27:57 +00:00
|
|
|
|
scm_out_of_range (why, sub_end);
|
|
|
|
|
|
|
|
|
|
|
|
if (direction > 0)
|
|
|
|
|
|
{
|
2000-11-22 11:20:03 +00:00
|
|
|
|
p = SCM_STRING_UCHARS (*str) + lower;
|
2000-03-02 20:54:43 +00:00
|
|
|
|
ch = SCM_CHAR (chr);
|
1997-02-04 05:27:57 +00:00
|
|
|
|
|
|
|
|
|
|
for (x = SCM_INUM (sub_start); x < upper; ++x, ++p)
|
|
|
|
|
|
if (*p == ch)
|
|
|
|
|
|
return x;
|
|
|
|
|
|
}
|
1996-07-25 22:56:11 +00:00
|
|
|
|
else
|
1997-02-04 05:27:57 +00:00
|
|
|
|
{
|
2000-11-22 11:20:03 +00:00
|
|
|
|
p = upper - 1 + SCM_STRING_UCHARS (*str);
|
2000-03-02 20:54:43 +00:00
|
|
|
|
ch = SCM_CHAR (chr);
|
1997-02-04 05:27:57 +00:00
|
|
|
|
for (x = upper - 1; x >= lower; --x, --p)
|
|
|
|
|
|
if (*p == ch)
|
|
|
|
|
|
return x;
|
|
|
|
|
|
}
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_string_index, "string-index", 2, 2, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
|
(SCM str, SCM chr, SCM frm, SCM to),
|
* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
|
|
|
|
"Return the index of the first occurrence of @var{chr} in @var{str}. The\n"
|
|
|
|
|
|
"optional integer arguments @var{frm} and @var{to} limit the search to\n"
|
|
|
|
|
|
"a portion of the string. This procedure essentially implements the\n"
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"@code{index} or @code{strchr} functions from the C library.\n\n"
|
|
|
|
|
|
"(qdocs:) Returns the index of @var{char} in @var{str}, or @code{#f} if the\n"
|
|
|
|
|
|
"@var{char} isn't in @var{str}. If @var{frm} is given and not @code{#f},\n"
|
|
|
|
|
|
"it is used as the starting index; if @var{to} is given and not @var{#f},\n"
|
|
|
|
|
|
"it is used as the ending index (exclusive).\n\n"
|
|
|
|
|
|
"@example\n"
|
2000-08-12 22:15:55 +00:00
|
|
|
|
"(string-index \"weiner\" #\\e)\n"
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"@result{} 1\n\n"
|
2000-08-12 22:15:55 +00:00
|
|
|
|
"(string-index \"weiner\" #\\e 2)\n"
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"@result{} 4\n\n"
|
2000-08-12 22:15:55 +00:00
|
|
|
|
"(string-index \"weiner\" #\\e 2 4)\n"
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"@result{} #f\n"
|
|
|
|
|
|
"@end example")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_string_index
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
|
|
|
|
|
int pos;
|
|
|
|
|
|
|
2000-04-03 08:47:51 +00:00
|
|
|
|
if (SCM_UNBNDP (frm))
|
1996-07-25 22:56:11 +00:00
|
|
|
|
frm = SCM_BOOL_F;
|
2000-04-03 08:47:51 +00:00
|
|
|
|
if (SCM_UNBNDP (to))
|
1996-07-25 22:56:11 +00:00
|
|
|
|
to = SCM_BOOL_F;
|
1999-12-12 02:36:16 +00:00
|
|
|
|
pos = scm_i_index (&str, chr, 1, frm, to, FUNC_NAME);
|
1996-07-25 22:56:11 +00:00
|
|
|
|
return (pos < 0
|
|
|
|
|
|
? SCM_BOOL_F
|
|
|
|
|
|
: SCM_MAKINUM (pos));
|
|
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_string_rindex, "string-rindex", 2, 2, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
|
(SCM str, SCM chr, SCM frm, SCM to),
|
* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
|
|
|
|
"Like @code{string-index}, but search from the right of the string rather\n"
|
|
|
|
|
|
"than from the left. This procedure essentially implements the\n"
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"@code{rindex} or @code{strrchr} functions from the C library.\n\n"
|
|
|
|
|
|
"(qdocs:) The same as @code{string-index}, except it gives the rightmost occurance\n"
|
|
|
|
|
|
"of @var{char} in the range [@var{frm}, @var{to}-1], which defaults to\n"
|
|
|
|
|
|
"the entire string.\n\n"
|
|
|
|
|
|
"@example\n"
|
2000-08-12 22:15:55 +00:00
|
|
|
|
"(string-rindex \"weiner\" #\\e)\n"
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"@result{} 4\n\n"
|
2000-08-12 22:15:55 +00:00
|
|
|
|
"(string-rindex \"weiner\" #\\e 2 4)\n"
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"@result{} #f\n\n"
|
2000-08-12 22:15:55 +00:00
|
|
|
|
"(string-rindex \"weiner\" #\\e 2 5)\n"
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"@result{} 4\n"
|
|
|
|
|
|
"@end example")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_string_rindex
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
|
|
|
|
|
int pos;
|
|
|
|
|
|
|
2000-04-03 08:47:51 +00:00
|
|
|
|
if (SCM_UNBNDP (frm))
|
1996-07-25 22:56:11 +00:00
|
|
|
|
frm = SCM_BOOL_F;
|
2000-04-03 08:47:51 +00:00
|
|
|
|
if (SCM_UNBNDP (to))
|
1996-07-25 22:56:11 +00:00
|
|
|
|
to = SCM_BOOL_F;
|
1999-12-12 02:36:16 +00:00
|
|
|
|
pos = scm_i_index (&str, chr, -1, frm, to, FUNC_NAME);
|
1996-07-25 22:56:11 +00:00
|
|
|
|
return (pos < 0
|
|
|
|
|
|
? SCM_BOOL_F
|
|
|
|
|
|
: SCM_MAKINUM (pos));
|
|
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
|
|
|
|
|
|
1997-11-20 04:40:02 +00:00
|
|
|
|
|
1999-12-12 02:36:16 +00:00
|
|
|
|
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);
|
1997-11-20 04:40:02 +00:00
|
|
|
|
|
2000-01-27 01:35:16 +00:00
|
|
|
|
/*
|
|
|
|
|
|
@defun substring-move-left! str1 start1 end1 str2 start2
|
|
|
|
|
|
@end defun
|
|
|
|
|
|
@deftypefn {C Function} SCM scm_substring_move_left_x (SCM @var{str1}, SCM @var{start1}, SCM @var{end1}, SCM @var{str2}, SCM @var{start2})
|
|
|
|
|
|
[@strong{Note:} 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
|
|
|
|
|
|
@var{start2}. Allows overlapping strings.
|
|
|
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
|
(define x (make-string 10 #\a))
|
|
|
|
|
|
(define y "bcd")
|
|
|
|
|
|
(substring-move-left! x 2 5 y 0)
|
|
|
|
|
|
y
|
|
|
|
|
|
@result{} "aaa"
|
|
|
|
|
|
|
|
|
|
|
|
x
|
|
|
|
|
|
@result{} "aaaaaaaaaa"
|
|
|
|
|
|
|
|
|
|
|
|
(define y "bcdefg")
|
|
|
|
|
|
(substring-move-left! x 2 5 y 0)
|
|
|
|
|
|
y
|
|
|
|
|
|
@result{} "aaaefg"
|
|
|
|
|
|
|
|
|
|
|
|
(define y "abcdefg")
|
|
|
|
|
|
(substring-move-left! y 2 5 y 3)
|
|
|
|
|
|
y
|
|
|
|
|
|
@result{} "abccccg"
|
|
|
|
|
|
@end example
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
@defun substring-move-right! str1 start1 end1 str2 start2
|
|
|
|
|
|
@end defun
|
|
|
|
|
|
@deftypefn {C Function} SCM scm_substring_move_right_x (SCM @var{str1}, SCM @var{start1}, SCM @var{end1}, SCM @var{str2}, SCM @var{start2})
|
|
|
|
|
|
[@strong{Note:} 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.
|
|
|
|
|
|
@example
|
|
|
|
|
|
(define y "abcdefg")
|
|
|
|
|
|
(substring-move-right! y 2 5 y 0)
|
|
|
|
|
|
y
|
|
|
|
|
|
@result{} "ededefg"
|
|
|
|
|
|
|
|
|
|
|
|
(define y "abcdefg")
|
|
|
|
|
|
(substring-move-right! y 2 5 y 3)
|
|
|
|
|
|
y
|
|
|
|
|
|
@result{} "abccdeg"
|
|
|
|
|
|
@end example
|
|
|
|
|
|
*/
|
* __scm.h, alist.c, alist.h, append.c, append.h, appinit.c,
arbiters.c, arbiters.h, async.c, async.h, boolean.c, boolean.h,
chars.c, chars.h, continuations.c, continuations.h, debug.c,
debug.h, dynwind.c, dynwind.h, eq.c, eq.h, error.c, eval.c,
eval.h, extchrs.c, extchrs.h, fdsocket.c, fdsocket.h, filesys.c,
filesys.h, fports.c, fports.h, gc.c, gdb_interface.h, gdbint.c,
gdbint.h, genio.c, genio.h, gscm.c, gscm.h, gsubr.c, gsubr.h,
hash.c, hash.h, hashtab.c, hashtab.h, init.c, ioext.c, ioext.h,
kw.c, kw.h, libguile.h, mallocs.c, mallocs.h, markers.c,
markers.h, mbstrings.c, mbstrings.h, numbers.c, numbers.h,
objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
procprop.h, procs.c, procs.h, ramap.c, ramap.h, read.c, read.h,
root.c, scmsigs.c, scmsigs.h, sequences.c, sequences.h, simpos.c,
simpos.h, smob.c, socket.c, socket.h, srcprop.c, srcprop.h,
stackchk.c, stackchk.h, stime.c, stime.h, strings.c, strings.h,
strop.c, strop.h, strorder.c, strorder.h, strports.c, strports.h,
struct.c, struct.h, symbols.c, symbols.h, tag.c, tag.h, unif.c,
unif.h, variable.c, variable.h, vectors.c, vectors.h, version.c,
version.h, vports.c, vports.h, weaks.c, weaks.h: Use SCM_P to
declare functions with prototypes. (Patch thanks to Marius
Vollmer.)
1996-10-14 01:33:50 +00:00
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_substring_move_x, "substring-move!", 5, 0, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
|
(SCM str1, SCM start1, SCM end1, SCM str2, SCM start2),
|
2000-09-02 23:23:16 +00:00
|
|
|
|
"@deffnx primitive substring-move-left! str1 start1 end1 str2 start2\n"
|
|
|
|
|
|
"@deffnx primitive substring-move-right! str1 start1 end1 str2 start2\n"
|
* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
|
|
|
|
"Copy the substring of @var{str1} bounded by @var{start1} and @var{end1}\n"
|
|
|
|
|
|
"into @var{str2} beginning at position @var{end2}.\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.")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_substring_move_x
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
long s1, s2, e, len;
|
|
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_VALIDATE_STRING (1,str1);
|
|
|
|
|
|
SCM_VALIDATE_INUM_COPY (2,start1,s1);
|
|
|
|
|
|
SCM_VALIDATE_INUM_COPY (3,end1,e);
|
|
|
|
|
|
SCM_VALIDATE_STRING (4,str2);
|
|
|
|
|
|
SCM_VALIDATE_INUM_COPY (5,start2,s2);
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
len = e - s1;
|
1999-12-12 02:36:16 +00:00
|
|
|
|
SCM_ASSERT_RANGE (3,end1,len >= 0);
|
2000-10-09 14:37:36 +00:00
|
|
|
|
SCM_ASSERT_RANGE (2,start1,s1 <= SCM_STRING_LENGTH (str1) && s1 >= 0);
|
|
|
|
|
|
SCM_ASSERT_RANGE (5,start2,s2 <= SCM_STRING_LENGTH (str2) && s2 >= 0);
|
|
|
|
|
|
SCM_ASSERT_RANGE (3,end1,e <= SCM_STRING_LENGTH (str1) && e >= 0);
|
|
|
|
|
|
SCM_ASSERT_RANGE (5,start2,len+s2 <= SCM_STRING_LENGTH (str2));
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
2000-09-22 17:17:55 +00:00
|
|
|
|
SCM_SYSCALL(memmove((void *)(&(SCM_STRING_CHARS(str2)[s2])),
|
|
|
|
|
|
(void *)(&(SCM_STRING_CHARS(str1)[s1])),
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
len));
|
|
|
|
|
|
|
1999-05-09 09:12:35 +00:00
|
|
|
|
return scm_return_first(SCM_UNSPECIFIED, str1, str2);
|
1996-07-25 22:56:11 +00:00
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_substring_fill_x, "substring-fill!", 4, 0, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
|
(SCM str, SCM start, SCM end, SCM fill),
|
* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
|
|
|
|
"Change every character in @var{str} between @var{start} and @var{end} to\n"
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"@var{fill-char}.\n\n"
|
|
|
|
|
|
"(qdocs:) Destructively fills @var{str}, from @var{start} to @var{end}, with @var{fill}.\n\n"
|
|
|
|
|
|
"@example\n"
|
|
|
|
|
|
"(define y \"abcdefg\")\n"
|
2000-08-12 22:15:55 +00:00
|
|
|
|
"(substring-fill! y 1 3 #\\r)\n"
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"y\n"
|
|
|
|
|
|
"@result{} \"arrdefg\"\n"
|
|
|
|
|
|
"@end example")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_substring_fill_x
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
|
|
|
|
|
long i, e;
|
|
|
|
|
|
char c;
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_VALIDATE_STRING (1,str);
|
|
|
|
|
|
SCM_VALIDATE_INUM_COPY (2,start,i);
|
|
|
|
|
|
SCM_VALIDATE_INUM_COPY (3,end,e);
|
2000-03-02 20:54:43 +00:00
|
|
|
|
SCM_VALIDATE_CHAR_COPY (4,fill,c);
|
2000-10-09 14:37:36 +00:00
|
|
|
|
SCM_ASSERT_RANGE (2,start,i <= SCM_STRING_LENGTH (str) && i >= 0);
|
|
|
|
|
|
SCM_ASSERT_RANGE (3,end,e <= SCM_STRING_LENGTH (str) && e >= 0);
|
2000-09-22 17:17:55 +00:00
|
|
|
|
while (i<e) SCM_STRING_CHARS (str)[i++] = c;
|
1996-07-25 22:56:11 +00:00
|
|
|
|
return SCM_UNSPECIFIED;
|
|
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_string_null_p, "string-null?", 1, 0, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
|
(SCM str),
|
* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
|
|
|
|
"Return @code{#t} if @var{str}'s length is nonzero, and @code{#f}\n"
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"otherwise.\n\n"
|
|
|
|
|
|
"(qdocs:) Returns @code{#t} if @var{str} is empty, else returns @code{#f}.\n\n"
|
|
|
|
|
|
"@example\n"
|
|
|
|
|
|
"(string-null? \"\")\n"
|
|
|
|
|
|
"@result{} #t\n\n"
|
|
|
|
|
|
"(string-null? y)\n"
|
|
|
|
|
|
"@result{} #f\n"
|
|
|
|
|
|
"@end example")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_string_null_p
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
2000-10-30 11:42:26 +00:00
|
|
|
|
SCM_VALIDATE_STRING (1,str);
|
|
|
|
|
|
return SCM_NEGATE_BOOL (SCM_STRING_LENGTH (str));
|
1996-07-25 22:56:11 +00:00
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_string_to_list, "string->list", 1, 0, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
|
(SCM str),
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"@samp{String->list} returns a newly allocated list of the\n"
|
|
|
|
|
|
"characters that make up the given string. @samp{List->string}\n"
|
|
|
|
|
|
"returns a newly allocated string formed from the characters in the list\n"
|
|
|
|
|
|
"@var{list}, which must be a list of characters. @samp{String->list}\n"
|
|
|
|
|
|
"and @samp{list->string} are\n"
|
|
|
|
|
|
"inverses so far as @samp{equal?} is concerned. (r5rs)")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_string_to_list
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
|
|
|
|
|
long i;
|
|
|
|
|
|
SCM res = SCM_EOL;
|
|
|
|
|
|
unsigned char *src;
|
2000-10-30 11:42:26 +00:00
|
|
|
|
SCM_VALIDATE_STRING (1,str);
|
2000-11-22 11:20:03 +00:00
|
|
|
|
src = SCM_STRING_UCHARS (str);
|
2000-10-30 11:42:26 +00:00
|
|
|
|
for (i = SCM_STRING_LENGTH (str)-1;i >= 0;i--) res = scm_cons (SCM_MAKE_CHAR (src[i]), res);
|
1996-07-25 22:56:11 +00:00
|
|
|
|
return res;
|
|
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
2001-01-26 18:04:32 +00:00
|
|
|
|
/* Helper function for the string copy and string conversion functions.
|
|
|
|
|
|
* No argument checking is performed. */
|
|
|
|
|
|
static SCM
|
|
|
|
|
|
string_copy (SCM str)
|
|
|
|
|
|
{
|
|
|
|
|
|
return scm_makfromstr (SCM_STRING_CHARS (str), SCM_STRING_LENGTH (str), 0);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_string_copy, "string-copy", 1, 0, 0,
|
2001-01-26 18:04:32 +00:00
|
|
|
|
(SCM str),
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"Returns a newly allocated copy of the given @var{string}. (r5rs)")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_string_copy
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
2000-10-25 11:01:03 +00:00
|
|
|
|
SCM_VALIDATE_STRING (1, str);
|
2001-01-26 18:04:32 +00:00
|
|
|
|
|
|
|
|
|
|
return string_copy (str);
|
1996-07-25 22:56:11 +00:00
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_string_fill_x, "string-fill!", 2, 0, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
|
(SCM str, SCM chr),
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"Stores @var{char} in every element of the given @var{string} and returns an\n"
|
|
|
|
|
|
"unspecified value. (r5rs)")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_string_fill_x
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
|
|
|
|
|
register char *dst, c;
|
|
|
|
|
|
register long k;
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_VALIDATE_STRING_COPY (1,str,dst);
|
2000-03-02 20:54:43 +00:00
|
|
|
|
SCM_VALIDATE_CHAR_COPY (2,chr,c);
|
2000-10-09 14:37:36 +00:00
|
|
|
|
for (k = SCM_STRING_LENGTH (str)-1;k >= 0;k--) dst[k] = c;
|
1996-07-25 22:56:11 +00:00
|
|
|
|
return SCM_UNSPECIFIED;
|
|
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
2001-01-26 18:04:32 +00:00
|
|
|
|
|
|
|
|
|
|
/* Helper function for the string uppercase conversion functions.
|
|
|
|
|
|
* No argument checking is performed. */
|
|
|
|
|
|
static SCM
|
|
|
|
|
|
string_upcase_x (SCM v)
|
|
|
|
|
|
{
|
|
|
|
|
|
unsigned long k;
|
|
|
|
|
|
|
|
|
|
|
|
for (k = 0; k < SCM_STRING_LENGTH (v); ++k)
|
|
|
|
|
|
SCM_STRING_UCHARS (v) [k] = scm_upcase (SCM_STRING_UCHARS (v) [k]);
|
|
|
|
|
|
|
|
|
|
|
|
return v;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_string_upcase_x, "string-upcase!", 1, 0, 0,
|
2001-01-26 18:04:32 +00:00
|
|
|
|
(SCM str),
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"Destructively upcase every character in @code{str}.\n\n"
|
|
|
|
|
|
"(qdocs:) Converts each element in @var{str} to upper case.\n\n"
|
|
|
|
|
|
"@example\n"
|
|
|
|
|
|
"(string-upcase! y)\n"
|
|
|
|
|
|
"@result{} \"ARRDEFG\"\n\n"
|
|
|
|
|
|
"y\n"
|
|
|
|
|
|
"@result{} \"ARRDEFG\"\n"
|
|
|
|
|
|
"@end example")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_string_upcase_x
|
1997-02-06 07:05:08 +00:00
|
|
|
|
{
|
2001-01-26 18:04:32 +00:00
|
|
|
|
SCM_VALIDATE_STRING (1, str);
|
2000-09-26 22:15:13 +00:00
|
|
|
|
|
2001-01-26 18:04:32 +00:00
|
|
|
|
return string_upcase_x (str);
|
1997-02-06 07:05:08 +00:00
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
1997-02-06 07:05:08 +00:00
|
|
|
|
|
2001-01-26 18:04:32 +00:00
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_string_upcase, "string-upcase", 1, 0, 0,
|
2001-01-26 18:04:32 +00:00
|
|
|
|
(SCM str),
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"Upcase every character in @code{str}.")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_string_upcase
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
{
|
2001-01-26 18:04:32 +00:00
|
|
|
|
SCM_VALIDATE_STRING (1, str);
|
|
|
|
|
|
|
|
|
|
|
|
return string_upcase_x (string_copy (str));
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
|
2001-01-26 18:04:32 +00:00
|
|
|
|
|
|
|
|
|
|
/* Helper function for the string lowercase conversion functions.
|
|
|
|
|
|
* No argument checking is performed. */
|
|
|
|
|
|
static SCM
|
|
|
|
|
|
string_downcase_x (SCM v)
|
|
|
|
|
|
{
|
|
|
|
|
|
unsigned long k;
|
|
|
|
|
|
|
|
|
|
|
|
for (k = 0; k < SCM_STRING_LENGTH (v); ++k)
|
|
|
|
|
|
SCM_STRING_UCHARS (v) [k] = scm_downcase (SCM_STRING_UCHARS (v) [k]);
|
|
|
|
|
|
|
|
|
|
|
|
return v;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_string_downcase_x, "string-downcase!", 1, 0, 0,
|
2001-01-26 18:04:32 +00:00
|
|
|
|
(SCM str),
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"Destructively downcase every character in @code{str}.\n\n"
|
|
|
|
|
|
"(qdocs:) Converts each element in @var{str} to lower case.\n\n"
|
|
|
|
|
|
"@example\n"
|
|
|
|
|
|
"y\n"
|
|
|
|
|
|
"@result{} \"ARRDEFG\"\n\n"
|
|
|
|
|
|
"(string-downcase! y)\n"
|
|
|
|
|
|
"@result{} \"arrdefg\"\n\n"
|
|
|
|
|
|
"y\n"
|
|
|
|
|
|
"@result{} \"arrdefg\"\n"
|
|
|
|
|
|
"@end example")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_string_downcase_x
|
1997-02-06 07:05:08 +00:00
|
|
|
|
{
|
2001-01-26 18:04:32 +00:00
|
|
|
|
SCM_VALIDATE_STRING (1, str);
|
2000-09-26 22:15:13 +00:00
|
|
|
|
|
2001-01-26 18:04:32 +00:00
|
|
|
|
return string_downcase_x (str);
|
1997-02-06 07:05:08 +00:00
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
2001-01-26 18:04:32 +00:00
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_string_downcase, "string-downcase", 1, 0, 0,
|
2001-01-26 18:04:32 +00:00
|
|
|
|
(SCM str),
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"Downcase every character in @code{str}.")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_string_downcase
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
{
|
2001-01-26 18:04:32 +00:00
|
|
|
|
SCM_VALIDATE_STRING (1, str);
|
|
|
|
|
|
|
|
|
|
|
|
return string_downcase_x (string_copy (str));
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
|
2001-01-26 18:04:32 +00:00
|
|
|
|
|
|
|
|
|
|
/* Helper function for the string capitalization functions.
|
|
|
|
|
|
* No argument checking is performed. */
|
|
|
|
|
|
static SCM
|
|
|
|
|
|
string_capitalize_x (SCM str)
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
{
|
2000-01-27 01:35:16 +00:00
|
|
|
|
char *sz;
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
int i, len, in_word=0;
|
2001-01-26 18:04:32 +00:00
|
|
|
|
|
2000-10-09 14:37:36 +00:00
|
|
|
|
len = SCM_STRING_LENGTH(str);
|
2000-09-22 17:17:55 +00:00
|
|
|
|
sz = SCM_STRING_CHARS (str);
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
for(i=0; i<len; i++) {
|
2000-03-02 20:54:43 +00:00
|
|
|
|
if(SCM_NFALSEP(scm_char_alphabetic_p(SCM_MAKE_CHAR(sz[i])))) {
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
if(!in_word) {
|
2000-01-27 01:35:16 +00:00
|
|
|
|
sz[i] = scm_upcase(sz[i]);
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
in_word = 1;
|
|
|
|
|
|
} else {
|
2000-01-27 01:35:16 +00:00
|
|
|
|
sz[i] = scm_downcase(sz[i]);
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else in_word = 0;
|
|
|
|
|
|
}
|
2000-01-27 01:35:16 +00:00
|
|
|
|
return str;
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
}
|
2001-01-26 18:04:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SCM_DEFINE (scm_string_capitalize_x, "string-capitalize!", 1, 0, 0,
|
|
|
|
|
|
(SCM str),
|
|
|
|
|
|
"Destructively capitalize every character in @code{str}.")
|
|
|
|
|
|
#define FUNC_NAME s_scm_string_capitalize_x
|
|
|
|
|
|
{
|
|
|
|
|
|
SCM_VALIDATE_STRING (1, str);
|
|
|
|
|
|
|
|
|
|
|
|
return string_capitalize_x (str);
|
|
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
|
2001-01-26 18:04:32 +00:00
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_string_capitalize, "string-capitalize", 1, 0, 0,
|
2001-01-26 18:04:32 +00:00
|
|
|
|
(SCM str),
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"Capitalize every character in @code{str}.")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_string_capitalize
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
{
|
2001-01-26 18:04:32 +00:00
|
|
|
|
SCM_VALIDATE_STRING (1, str);
|
|
|
|
|
|
|
|
|
|
|
|
return string_capitalize_x (string_copy (str));
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
|
2001-01-26 18:04:32 +00:00
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_string_ci_to_symbol, "string-ci->symbol", 1, 0, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
|
(SCM str),
|
2000-01-27 01:35:16 +00:00
|
|
|
|
"Return the symbol whose name is @var{str}, downcased in necessary(???).")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_string_ci_to_symbol
|
* strop.c (scm_string_capitalize_x, scm_string_capitalize): new
functions; capitalize the first letter of each word in the
argument string, and downcase the rest.
(scm_string_ci_to_symbol): string->symbol, such that the same
symbol is returned for any argument where the only difference
between strings is in capitalization.
(scm_string_upcase, scm_string_downcase): non-destructive
versions.
* strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to use memmove.
* strop.c (scm_i_index): removed the pos arguments (it's only
called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
SCM_ARG4).
* strop.h: fixed prototypes.
* * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
changed to have 5 required args, rather than 2 required, and 3 required
rest args. Also modified to allow str1 & str2 to overlap.
(scm_substring_fill_x): changed to 4 args, rather than 2 args and
2 required rest args.
1999-05-09 08:22:11 +00:00
|
|
|
|
{
|
|
|
|
|
|
return scm_string_to_symbol (SCM_CASE_INSENSITIVE_P
|
|
|
|
|
|
? scm_string_downcase(str)
|
|
|
|
|
|
: str);
|
|
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
* __scm.h, alist.c, alist.h, append.c, append.h, appinit.c,
arbiters.c, arbiters.h, async.c, async.h, boolean.c, boolean.h,
chars.c, chars.h, continuations.c, continuations.h, debug.c,
debug.h, dynwind.c, dynwind.h, eq.c, eq.h, error.c, eval.c,
eval.h, extchrs.c, extchrs.h, fdsocket.c, fdsocket.h, filesys.c,
filesys.h, fports.c, fports.h, gc.c, gdb_interface.h, gdbint.c,
gdbint.h, genio.c, genio.h, gscm.c, gscm.h, gsubr.c, gsubr.h,
hash.c, hash.h, hashtab.c, hashtab.h, init.c, ioext.c, ioext.h,
kw.c, kw.h, libguile.h, mallocs.c, mallocs.h, markers.c,
markers.h, mbstrings.c, mbstrings.h, numbers.c, numbers.h,
objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
procprop.h, procs.c, procs.h, ramap.c, ramap.h, read.c, read.h,
root.c, scmsigs.c, scmsigs.h, sequences.c, sequences.h, simpos.c,
simpos.h, smob.c, socket.c, socket.h, srcprop.c, srcprop.h,
stackchk.c, stackchk.h, stime.c, stime.h, strings.c, strings.h,
strop.c, strop.h, strorder.c, strorder.h, strports.c, strports.h,
struct.c, struct.h, symbols.c, symbols.h, tag.c, tag.h, unif.c,
unif.h, variable.c, variable.h, vectors.c, vectors.h, version.c,
version.h, vports.c, vports.h, weaks.c, weaks.h: Use SCM_P to
declare functions with prototypes. (Patch thanks to Marius
Vollmer.)
1996-10-14 01:33:50 +00:00
|
|
|
|
|
1996-07-25 22:56:11 +00:00
|
|
|
|
void
|
|
|
|
|
|
scm_init_strop ()
|
|
|
|
|
|
{
|
* alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
continuations.c, debug-malloc.c, debug.c, dynl.c, dynwind.c,
environments.c, eq.c, error.c, eval.c, evalext.c, feature.c,
filesys.c, fluids.c, fports.c, gc.c, goops.c, guardians.c, hash.c,
hashtab.c, hooks.c, ioext.c, iselect.c, keywords.c, lang.c,
list.c, load.c, macros.c, modules.c, net_db.c, numbers.c,
objects.c, objprop.c, options.c, pairs.c, ports.c, posix.c,
print.c, procprop.c, procs.c, properties.c, ramap.c, random.c,
read.c, regex-posix.c, root.c, scmsigs.c, script.c, simpos.c,
socket.c, sort.c, srcprop.c, stackchk.c, stacks.c, stime.c,
strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c,
tag.c, threads.c, throw.c, unif.c, variable.c, vectors.c,
version.c, vports.c, weaks.c: Makes sure the snarfer output
inclusion is disabled when the snarfer is run on the file. Thanks
to Lars J. Aas!
* Makefile.am: Install guile-procedures.txt in version-specific
directory to enable multiple installed guile versions. Suggested
by Karl M. Hegbloom <karlheg@debian.org, patch by Matthias Koeppe.
2000-11-17 16:25:05 +00:00
|
|
|
|
#ifndef SCM_MAGIC_SNARFER
|
2000-04-21 14:16:44 +00:00
|
|
|
|
#include "libguile/strop.x"
|
* alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
continuations.c, debug-malloc.c, debug.c, dynl.c, dynwind.c,
environments.c, eq.c, error.c, eval.c, evalext.c, feature.c,
filesys.c, fluids.c, fports.c, gc.c, goops.c, guardians.c, hash.c,
hashtab.c, hooks.c, ioext.c, iselect.c, keywords.c, lang.c,
list.c, load.c, macros.c, modules.c, net_db.c, numbers.c,
objects.c, objprop.c, options.c, pairs.c, ports.c, posix.c,
print.c, procprop.c, procs.c, properties.c, ramap.c, random.c,
read.c, regex-posix.c, root.c, scmsigs.c, script.c, simpos.c,
socket.c, sort.c, srcprop.c, stackchk.c, stacks.c, stime.c,
strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c,
tag.c, threads.c, throw.c, unif.c, variable.c, vectors.c,
version.c, vports.c, weaks.c: Makes sure the snarfer output
inclusion is disabled when the snarfer is run on the file. Thanks
to Lars J. Aas!
* Makefile.am: Install guile-procedures.txt in version-specific
directory to enable multiple installed guile versions. Suggested
by Karl M. Hegbloom <karlheg@debian.org, patch by Matthias Koeppe.
2000-11-17 16:25:05 +00:00
|
|
|
|
#endif
|
1996-07-25 22:56:11 +00:00
|
|
|
|
}
|
2000-03-19 19:01:16 +00:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
Local Variables:
|
|
|
|
|
|
c-file-style: "gnu"
|
|
|
|
|
|
End:
|
|
|
|
|
|
*/
|