diff options
Diffstat (limited to 'doc/ref/api-data.texi')
-rw-r--r-- | doc/ref/api-data.texi | 189 |
1 files changed, 98 insertions, 91 deletions
diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi index bcfbae365..4fc11c81d 100644 --- a/doc/ref/api-data.texi +++ b/doc/ref/api-data.texi @@ -695,10 +695,10 @@ value, including the special values @samp{+nan.0}, @samp{+inf.0} and @deffn {Scheme Procedure} complex? z @deffnx {C Function} scm_complex_p (z) -Return @code{#t} if @var{x} is a complex number, @code{#f} +Return @code{#t} if @var{z} is a complex number, @code{#f} otherwise. Note that the sets of real, rational and integer values form subsets of the set of complex numbers, i.e.@: the -predicate will also be fulfilled if @var{x} is a real, +predicate will also be fulfilled if @var{z} is a real, rational or integer number. @end deffn @@ -2324,22 +2324,22 @@ Return @code{#t} if @var{obj} is a character set, @code{#f} otherwise. @end deffn -@deffn {Scheme Procedure} char-set= . char_sets +@deffn {Scheme Procedure} char-set= char_set @dots{} @deffnx {C Function} scm_char_set_eq (char_sets) Return @code{#t} if all given character sets are equal. @end deffn -@deffn {Scheme Procedure} char-set<= . char_sets +@deffn {Scheme Procedure} char-set<= char_set @dots{} @deffnx {C Function} scm_char_set_leq (char_sets) -Return @code{#t} if every character set @var{cs}i is a subset -of character set @var{cs}i+1. +Return @code{#t} if every character set @var{char_set}i is a subset +of character set @var{char_set}i+1. @end deffn @deffn {Scheme Procedure} char-set-hash cs [bound] @deffnx {C Function} scm_char_set_hash (cs, bound) Compute a hash value for the character set @var{cs}. If @var{bound} is given and non-zero, it restricts the -returned value to the range 0 @dots{} @var{bound - 1}. +returned value to the range 0 @dots{} @var{bound} - 1. @end deffn @c =================================================================== @@ -2443,8 +2443,8 @@ Return a newly allocated character set containing all characters in @var{cs}. @end deffn -@deffn {Scheme Procedure} char-set . rest -@deffnx {C Function} scm_char_set (rest) +@deffn {Scheme Procedure} char-set chr @dots{} +@deffnx {C Function} scm_char_set (chrs) Return a character set containing all given characters. @end deffn @@ -2607,26 +2607,26 @@ such as union, complement, intersection etc. All of these procedures provide side-effecting variants, which modify their character set argument(s). -@deffn {Scheme Procedure} char-set-adjoin cs . rest -@deffnx {C Function} scm_char_set_adjoin (cs, rest) +@deffn {Scheme Procedure} char-set-adjoin cs chr @dots{} +@deffnx {C Function} scm_char_set_adjoin (cs, chrs) Add all character arguments to the first argument, which must be a character set. @end deffn -@deffn {Scheme Procedure} char-set-delete cs . rest -@deffnx {C Function} scm_char_set_delete (cs, rest) +@deffn {Scheme Procedure} char-set-delete cs chr @dots{} +@deffnx {C Function} scm_char_set_delete (cs, chrs) Delete all character arguments from the first argument, which must be a character set. @end deffn -@deffn {Scheme Procedure} char-set-adjoin! cs . rest -@deffnx {C Function} scm_char_set_adjoin_x (cs, rest) +@deffn {Scheme Procedure} char-set-adjoin! cs chr @dots{} +@deffnx {C Function} scm_char_set_adjoin_x (cs, chrs) Add all character arguments to the first argument, which must be a character set. @end deffn -@deffn {Scheme Procedure} char-set-delete! cs . rest -@deffnx {C Function} scm_char_set_delete_x (cs, rest) +@deffn {Scheme Procedure} char-set-delete! cs chr @dots{} +@deffnx {C Function} scm_char_set_delete_x (cs, chrs) Delete all character arguments from the first argument, which must be a character set. @end deffn @@ -2642,28 +2642,28 @@ characters). It may be helpful to modify the output of @code{char-set-complement} by computing its intersection with the set of designated code points, @code{char-set:designated}. -@deffn {Scheme Procedure} char-set-union . rest -@deffnx {C Function} scm_char_set_union (rest) +@deffn {Scheme Procedure} char-set-union cs @dots{} +@deffnx {C Function} scm_char_set_union (char_sets) Return the union of all argument character sets. @end deffn -@deffn {Scheme Procedure} char-set-intersection . rest -@deffnx {C Function} scm_char_set_intersection (rest) +@deffn {Scheme Procedure} char-set-intersection cs @dots{} +@deffnx {C Function} scm_char_set_intersection (char_sets) Return the intersection of all argument character sets. @end deffn -@deffn {Scheme Procedure} char-set-difference cs1 . rest -@deffnx {C Function} scm_char_set_difference (cs1, rest) +@deffn {Scheme Procedure} char-set-difference cs1 cs @dots{} +@deffnx {C Function} scm_char_set_difference (cs1, char_sets) Return the difference of all argument character sets. @end deffn -@deffn {Scheme Procedure} char-set-xor . rest -@deffnx {C Function} scm_char_set_xor (rest) +@deffn {Scheme Procedure} char-set-xor cs @dots{} +@deffnx {C Function} scm_char_set_xor (char_sets) Return the exclusive-or of all argument character sets. @end deffn -@deffn {Scheme Procedure} char-set-diff+intersection cs1 . rest -@deffnx {C Function} scm_char_set_diff_plus_intersection (cs1, rest) +@deffn {Scheme Procedure} char-set-diff+intersection cs1 cs @dots{} +@deffnx {C Function} scm_char_set_diff_plus_intersection (cs1, char_sets) Return the difference and the intersection of all argument character sets. @end deffn @@ -2673,28 +2673,28 @@ character sets. Return the complement of the character set @var{cs}. @end deffn -@deffn {Scheme Procedure} char-set-union! cs1 . rest -@deffnx {C Function} scm_char_set_union_x (cs1, rest) +@deffn {Scheme Procedure} char-set-union! cs1 cs @dots{} +@deffnx {C Function} scm_char_set_union_x (cs1, char_sets) Return the union of all argument character sets. @end deffn -@deffn {Scheme Procedure} char-set-intersection! cs1 . rest -@deffnx {C Function} scm_char_set_intersection_x (cs1, rest) +@deffn {Scheme Procedure} char-set-intersection! cs1 cs @dots{} +@deffnx {C Function} scm_char_set_intersection_x (cs1, char_sets) Return the intersection of all argument character sets. @end deffn -@deffn {Scheme Procedure} char-set-difference! cs1 . rest -@deffnx {C Function} scm_char_set_difference_x (cs1, rest) +@deffn {Scheme Procedure} char-set-difference! cs1 cs @dots{} +@deffnx {C Function} scm_char_set_difference_x (cs1, char_sets) Return the difference of all argument character sets. @end deffn -@deffn {Scheme Procedure} char-set-xor! cs1 . rest -@deffnx {C Function} scm_char_set_xor_x (cs1, rest) +@deffn {Scheme Procedure} char-set-xor! cs1 cs @dots{} +@deffnx {C Function} scm_char_set_xor_x (cs1, char_sets) Return the exclusive-or of all argument character sets. @end deffn -@deffn {Scheme Procedure} char-set-diff+intersection! cs1 cs2 . rest -@deffnx {C Function} scm_char_set_diff_plus_intersection_x (cs1, cs2, rest) +@deffn {Scheme Procedure} char-set-diff+intersection! cs1 cs2 cs @dots{} +@deffnx {C Function} scm_char_set_diff_plus_intersection_x (cs1, cs2, char_sets) Return the difference and the intersection of all argument character sets. @end deffn @@ -2714,7 +2714,7 @@ useful, several predefined character set variables exist. These character sets are locale independent and are not recomputed upon a @code{setlocale} call. They contain characters from the whole range of Unicode code points. For instance, @code{char-set:letter} -contains about 94,000 characters. +contains about 100,000 characters. @defvr {Scheme Variable} char-set:lower-case @defvrx {C Variable} scm_char_set_lower_case @@ -3099,7 +3099,7 @@ reverse order. Return a newly allocated string of length @var{k}. If @var{chr} is given, then all elements of the string are initialized to @var{chr}, otherwise the contents -of the @var{string} are unspecified. +of the string are unspecified. @end deffn @deftypefn {C Function} SCM scm_c_make_string (size_t len, SCM chr) @@ -3118,7 +3118,7 @@ produce the corresponding string element. The order in which @deffn {Scheme Procedure} string-join ls [delimiter [grammar]] @deffnx {C Function} scm_string_join (ls, delimiter, grammar) Append the string in the string list @var{ls}, using the string -@var{delim} as a delimiter between the elements of @var{ls}. +@var{delimiter} as a delimiter between the elements of @var{ls}. @var{grammar} is a symbol which specifies how the delimiter is placed between the strings, and defaults to the symbol @code{infix}. @@ -3279,7 +3279,7 @@ Return all but the last @var{n} characters of @var{s}. @deffnx {C Function} scm_string_pad (s, len, chr, start, end) @deffnx {C Function} scm_string_pad_right (s, len, chr, start, end) Take characters @var{start} to @var{end} from the string @var{s} and -either pad with @var{char} or truncate them to give @var{len} +either pad with @var{chr} or truncate them to give @var{len} characters. @code{string-pad} pads or truncates on the left, so for example @@ -3404,11 +3404,11 @@ comparison. See @xref{Text Collation, the @code{(ice-9 i18n)} module}, for locale-dependent string comparison. @rnindex string=? -@deffn {Scheme Procedure} string=? [s1 [s2 . rest]] +@deffn {Scheme Procedure} string=? s1 s2 s3 @dots{} @deffnx {C Function} scm_i_string_equal_p (s1, s2, rest) -Lexicographic equality predicate; return @code{#t} if the two -strings are the same length and contain the same characters in -the same positions, otherwise return @code{#f}. +Lexicographic equality predicate; return @code{#t} if all strings are +the same length and contain the same characters in the same positions, +otherwise return @code{#f}. The procedure @code{string-ci=?} treats upper and lower case letters as though they were the same character, but @@ -3417,72 +3417,80 @@ characters. @end deffn @rnindex string<? -@deffn {Scheme Procedure} string<? [s1 [s2 . rest]] +@deffn {Scheme Procedure} string<? s1 s2 s3 @dots{} @deffnx {C Function} scm_i_string_less_p (s1, s2, rest) -Lexicographic ordering predicate; return @code{#t} if @var{s1} -is lexicographically less than @var{s2}. +Lexicographic ordering predicate; return @code{#t} if, for every pair of +consecutive string arguments @var{str_i} and @var{str_i+1}, @var{str_i} is +lexicographically less than @var{str_i+1}. @end deffn @rnindex string<=? -@deffn {Scheme Procedure} string<=? [s1 [s2 . rest]] +@deffn {Scheme Procedure} string<=? s1 s2 s3 @dots{} @deffnx {C Function} scm_i_string_leq_p (s1, s2, rest) -Lexicographic ordering predicate; return @code{#t} if @var{s1} -is lexicographically less than or equal to @var{s2}. +Lexicographic ordering predicate; return @code{#t} if, for every pair of +consecutive string arguments @var{str_i} and @var{str_i+1}, @var{str_i} is +lexicographically less than or equal to @var{str_i+1}. @end deffn @rnindex string>? -@deffn {Scheme Procedure} string>? [s1 [s2 . rest]] +@deffn {Scheme Procedure} string>? s1 s2 s3 @dots{} @deffnx {C Function} scm_i_string_gr_p (s1, s2, rest) -Lexicographic ordering predicate; return @code{#t} if @var{s1} -is lexicographically greater than @var{s2}. +Lexicographic ordering predicate; return @code{#t} if, for every pair of +consecutive string arguments @var{str_i} and @var{str_i+1}, @var{str_i} is +lexicographically greater than @var{str_i+1}. @end deffn @rnindex string>=? -@deffn {Scheme Procedure} string>=? [s1 [s2 . rest]] +@deffn {Scheme Procedure} string>=? s1 s2 s3 @dots{} @deffnx {C Function} scm_i_string_geq_p (s1, s2, rest) -Lexicographic ordering predicate; return @code{#t} if @var{s1} -is lexicographically greater than or equal to @var{s2}. +Lexicographic ordering predicate; return @code{#t} if, for every pair of +consecutive string arguments @var{str_i} and @var{str_i+1}, @var{str_i} is +lexicographically greater than or equal to @var{str_i+1}. @end deffn @rnindex string-ci=? -@deffn {Scheme Procedure} string-ci=? [s1 [s2 . rest]] +@deffn {Scheme Procedure} string-ci=? s1 s2 s3 @dots{} @deffnx {C Function} scm_i_string_ci_equal_p (s1, s2, rest) Case-insensitive string equality predicate; return @code{#t} if -the two strings are the same length and their component +all strings are the same length and their component characters match (ignoring case) at each position; otherwise return @code{#f}. @end deffn @rnindex string-ci<? -@deffn {Scheme Procedure} string-ci<? [s1 [s2 . rest]] +@deffn {Scheme Procedure} string-ci<? s1 s2 s3 @dots{} @deffnx {C Function} scm_i_string_ci_less_p (s1, s2, rest) -Case insensitive lexicographic ordering predicate; return -@code{#t} if @var{s1} is lexicographically less than @var{s2} +Case insensitive lexicographic ordering predicate; return @code{#t} if, +for every pair of consecutive string arguments @var{str_i} and +@var{str_i+1}, @var{str_i} is lexicographically less than @var{str_i+1} regardless of case. @end deffn @rnindex string<=? -@deffn {Scheme Procedure} string-ci<=? [s1 [s2 . rest]] +@deffn {Scheme Procedure} string-ci<=? s1 s2 s3 @dots{} @deffnx {C Function} scm_i_string_ci_leq_p (s1, s2, rest) -Case insensitive lexicographic ordering predicate; return -@code{#t} if @var{s1} is lexicographically less than or equal -to @var{s2} regardless of case. +Case insensitive lexicographic ordering predicate; return @code{#t} if, +for every pair of consecutive string arguments @var{str_i} and +@var{str_i+1}, @var{str_i} is lexicographically less than or equal to +@var{str_i+1} regardless of case. @end deffn @rnindex string-ci>? -@deffn {Scheme Procedure} string-ci>? [s1 [s2 . rest]] +@deffn {Scheme Procedure} string-ci>? s1 s2 s3 @dots{} @deffnx {C Function} scm_i_string_ci_gr_p (s1, s2, rest) -Case insensitive lexicographic ordering predicate; return -@code{#t} if @var{s1} is lexicographically greater than -@var{s2} regardless of case. +Case insensitive lexicographic ordering predicate; return @code{#t} if, +for every pair of consecutive string arguments @var{str_i} and +@var{str_i+1}, @var{str_i} is lexicographically greater than +@var{str_i+1} regardless of case. @end deffn @rnindex string-ci>=? -@deffn {Scheme Procedure} string-ci>=? [s1 [s2 . rest]] +@deffn {Scheme Procedure} string-ci>=? s1 s2 s3 @dots{} @deffnx {C Function} scm_i_string_ci_geq_p (s1, s2, rest) -Case insensitive lexicographic ordering predicate; return -@code{#t} if @var{s1} is lexicographically greater than or -equal to @var{s2} regardless of case. +Case insensitive lexicographic ordering predicate; return @code{#t} if, +for every pair of consecutive string arguments @var{str_i} and +@var{str_i+1}, @var{str_i} is lexicographically greater than or equal to +@var{str_i+1} regardless of case. @end deffn @deffn {Scheme Procedure} string-compare s1 s2 proc_lt proc_eq proc_gt [start1 [end1 [start2 [end2]]]] @@ -3587,12 +3595,12 @@ case-insensitively. @deffn {Scheme Procedure} string-hash s [bound [start [end]]] @deffnx {C Function} scm_substring_hash (s, bound, start, end) -Compute a hash value for @var{S}. The optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound). +Compute a hash value for @var{s}. The optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound). @end deffn @deffn {Scheme Procedure} string-hash-ci s [bound [start [end]]] @deffnx {C Function} scm_substring_hash_ci (s, bound, start, end) -Compute a hash value for @var{S}. The optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound). +Compute a hash value for @var{s}. The optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound). @end deffn Because the same visual appearance of an abstract Unicode character can @@ -3934,10 +3942,10 @@ operate on. The return value is unspecified. @end deffn @rnindex string-append -@deffn {Scheme Procedure} string-append . args +@deffn {Scheme Procedure} string-append arg @dots{} @deffnx {C Function} scm_string_append (args) Return a newly allocated string whose characters form the -concatenation of the given strings, @var{args}. +concatenation of the given strings, @var{arg} @enddots{}. @example (let ((h "hello ")) @@ -3946,17 +3954,16 @@ concatenation of the given strings, @var{args}. @end example @end deffn -@deffn {Scheme Procedure} string-append/shared . rest -@deffnx {C Function} scm_string_append_shared (rest) +@deffn {Scheme Procedure} string-append/shared arg @dots{} +@deffnx {C Function} scm_string_append_shared (args) Like @code{string-append}, but the result may share memory with the argument strings. @end deffn @deffn {Scheme Procedure} string-concatenate ls @deffnx {C Function} scm_string_concatenate (ls) -Append the elements of @var{ls} (which must be strings) -together into a single string. Guaranteed to return a freshly -allocated string. +Append the elements (which must be strings) of @var{ls} together into a +single string. Guaranteed to return a freshly allocated string. @end deffn @deffn {Scheme Procedure} string-concatenate-reverse ls [final_string [end]] @@ -5181,9 +5188,9 @@ Return a newly allocated symbol made from a list of characters. @end deffn @rnindex symbol-append -@deffn {Scheme Procedure} symbol-append . args +@deffn {Scheme Procedure} symbol-append arg @dots{} Return a newly allocated symbol whose characters form the -concatenation of the given symbols, @var{args}. +concatenation of the given symbols, @var{arg} @enddots{}. @example (let ((h 'hello)) @@ -5253,15 +5260,15 @@ When you want to do more from C, you should convert between symbols and strings using @code{scm_symbol_to_string} and @code{scm_string_to_symbol} and work with the strings. -@deffn {C Function} scm_from_latin1_symbol (const char *name) -@deffnx {C Function} scm_from_utf8_symbol (const char *name) +@deftypefn {C Function} scm_from_latin1_symbol (const char *name) +@deftypefnx {C Function} scm_from_utf8_symbol (const char *name) Construct and return a Scheme symbol whose name is specified by the null-terminated C string @var{name}. These are appropriate when the C string is hard-coded in the source code. -@end deffn +@end deftypefn -@deffn {C Function} scm_from_locale_symbol (const char *name) -@deffnx {C Function} scm_from_locale_symboln (const char *name, size_t len) +@deftypefn {C Function} scm_from_locale_symbol (const char *name) +@deftypefnx {C Function} scm_from_locale_symboln (const char *name, size_t len) Construct and return a Scheme symbol whose name is specified by @var{name}. For @code{scm_from_locale_symbol}, @var{name} must be null terminated; for @code{scm_from_locale_symboln} the length of @var{name} is @@ -5271,7 +5278,7 @@ Note that these functions should @emph{not} be used when @var{name} is a C string constant, because there is no guarantee that the current locale will match that of the source code. In such cases, use @code{scm_from_latin1_symbol} or @code{scm_from_utf8_symbol}. -@end deffn +@end deftypefn @deftypefn {C Function} SCM scm_take_locale_symbol (char *str) @deftypefnx {C Function} SCM scm_take_locale_symboln (char *str, size_t len) |