summaryrefslogtreecommitdiff
path: root/doc/ref/api-data.texi
AgeCommit message (Collapse)AuthorFilesLines
2017-03-01Document 'scm_to_uintptr_t' and 'scm_from_uintptr_t'.Ludovic Courtès1-1/+3
* doc/ref/api-data.texi (Integers): Document them.
2017-02-27Explain why no native accessors for `s8' and `u8' existDiogo F. S. Ramos1-2/+3
* doc/ref/api-data.texi: Instead of saying it is obvious, explain why no native endianness accessors exist for the `s8' and `u8' variants.
2017-01-09Final names for new array functionsDaniel Llorens1-64/+92
Globally rename (array-from* -> array-slice), (array-from -> array-cell-ref), (array-amend! -> array-cell-set!), (array-for-each-cell -> array-slice-for-each).
2016-11-23Document new array functions, with provisional namesDaniel Llorens1-0/+165
* doc/ref/api-data.texi: New section 'Arrays as arrays of arrays'. Document array-from, array-from*, array-amend!, array-for-each-cell, array-for-each-cell-in-order.
2016-11-22Merge api-{data,compound}.texiAndy Wingo1-513/+4481
* doc/ref/api-compound.texi: Remove. * doc/ref/api-data.texi: Fold "Compound Data Types" and "Simple Data Types" into just "Data Types". The distinction didn't work. * doc/ref/guile.texi: * doc/ref/Makefile.am: * doc/ref/srfi-modules.texi: Adapt.
2016-08-07Documentation fixesEthan Stefan Day1-9/+9
* doc/ref/api-compound.texi: * doc/ref/api-control.texi: * doc/ref/api-data.texi: Fix typos and clarify.
2016-06-24Fix typo about `keywords' read optionAndy Wingo1-1/+1
* doc/ref/api-data.texi (Keyword Read Syntax): Fix typo. Thanks to Glenn Michaels for the report and fix.
2016-06-08Big ports documentation updateAndy Wingo1-2/+2
* doc/ref/api-io.texi: Update to document ports more thoroughly. Still some work needed. * doc/ref/r6rs.texi: Move ports documentation back to r6rs.texi, now that Guile has a more thorough binary/textual I/O story, heavily based on R6RS. * doc/ref/api-control.texi: * doc/ref/api-data.texi: * doc/ref/api-options.texi: * doc/ref/misc-modules.texi: * doc/ref/posix.texi: * doc/ref/srfi-modules.texi: Update references.
2016-05-22Implement 'string-utf8-length' and 'scm_c_string_utf8_length'.Mark H Weaver1-1/+7
* libguile/strings.c (utf8_length, scm_c_string_utf8_length) (scm_string_utf8_length): New functions. * libguile/strings.h (scm_c_string_utf8_length, scm_string_utf8_length): New prototypes. * doc/ref/api-data.texi (Bytevectors as Strings): Add docs. * doc/ref/guile.texi: Update manual copyright date to 2015. * test-suite/tests/strings.test (string-utf8-length): Add tests.
2015-01-22Merge commit '5af307de43e4b65eec7f235b48a8908f2a00f134'Andy Wingo1-2/+6
Conflicts: test-suite/tests/reader.test
2014-10-01read: Accept "\(" in string literals.Mark H Weaver1-2/+6
Suggested by David Kastrup <dak@gnu.org> in <http://bugs.gnu.org/13644>. * libguile/read.c (scm_read_string_like_syntax): Accept "\(" as equivalent to "(". * doc/ref/api-data.texi (String Syntax): Document it. * test-suite/tests/reader.test ("reading"): Add test.
2014-09-29Add (ice-9 unicode) moduleAndy Wingo1-0/+18
* libguile/unicode.c: * libguile/unicode.h: * test-suite/tests/unicode.test: * module/ice-9/unicode.scm: New files. * module/Makefile.am: * libguile/Makefile.am: * test-suite/Makefile.am: * libguile/init.c: Wire new files into the build. * doc/ref/api-data.texi: Add docs.
2014-09-12Add (ice-9 unicode) moduleAndy Wingo1-0/+18
* libguile/unicode.c: * libguile/unicode.h: * test-suite/tests/unicode.test: * module/ice-9/unicode.scm: New files. * module/Makefile.am: * libguile/Makefile.am: * test-suite/Makefile.am: * libguile/init.c: Wire new files into the build. * doc/ref/api-data.texi: Add docs.
2014-04-25Merge branch 'stable-2.0'v2.1.0Mark H Weaver1-0/+12
Conflicts: GUILE-VERSION NEWS guile-readline/ice-9/readline.scm libguile/async.c libguile/backtrace.c libguile/deprecated.h libguile/gc-malloc.c libguile/gdbint.c libguile/init.c libguile/ioext.c libguile/mallocs.c libguile/print.c libguile/rw.c libguile/scmsigs.c libguile/script.c libguile/simpos.c libguile/snarf.h libguile/strports.c libguile/threads.c libguile/vm-i-scheme.c libguile/vm-i-system.c module/srfi/srfi-18.scm test-suite/Makefile.am test-suite/standalone/test-num2integral.c
2014-03-17Documentation tweaks for the 'r7rs-symbols' read/print options.Mark H Weaver1-0/+12
* doc/ref/api-data.texi (Symbol Read Syntax): Mention the 'r7rs-symbols' print option, and provide example code to enable both the read and print options. Add 'r7rs-symbols' to the concept index.
2014-03-16Doc and NEWS updatesAndy Wingo1-0/+4
* NEWS: Update section on dynamic stacks. Add link for intptr interfaces. * doc/ref/api-data.texi (Integers): Add intptr interfaces.
2014-01-14Merge branch 'stable-2.0'Mark H Weaver1-0/+10
Conflicts: libguile/print.c libguile/read.c test-suite/tests/print.test
2014-01-14read: Support R7RS |...| symbol notation.Mark H Weaver1-0/+10
* libguile/private-options.h (SCM_R7RS_SYMBOLS_P): New macro. (SCM_N_READ_OPTIONS): Increment. * libguile/read.c (scm_read_opts): Add entry for 'r7rs-symbols'. (t_read_opts): Add field for 'r7rs_symbols_p'. (scm_read_string_like_syntax): New function based on earlier 'scm_read_string' that handles either string literals or R7RS quoted symbols (delimited by vertical bars), depending on the value of 'chr'. (scm_read_string): Reimplement based on 'scm_read_string_like_syntax'. (scm_read_r7rs_symbol): New static function. * doc/ref/api-data.texi (Symbol Read Syntax): Briefly describe the R7RS symbol syntax, mention the 'r7rs-symbols' read option, and give some examples. * doc/ref/api-evaluation.texi (Scheme Read): Mention the 'r7rs-symbols' read option. * test-suite/tests/reader.test ("reading"): Add test.
2014-01-14Merge branch 'stable-2.0'Mark H Weaver1-3/+11
Conflicts: libguile/chars.c libguile/read.c test-suite/tests/reader.test
2014-01-14Recognize 'escape' character name, per R7RS.Mark H Weaver1-0/+3
* libguile/chars.c (scm_r7rs_charnames, scm_r7rs_charnums): New static constants. (SCM_N_R7RS_CHARNAMES): New macro. (scm_i_charname, scm_i_charname_to_char): Adapt to new R7RS char names. * doc/ref/api-data.texi (Characters): Document #\escape. * test-suite/tests/reader.test ("reading"): Add test.
2014-01-14read: Accept "\|" in string literals.Mark H Weaver1-3/+7
* libguile/read.c (scm_read_string): Accept "\|" in string literals. * doc/ref/api-data.texi (String Syntax): Add "\|" to the list of supported backslash escapes. * test-suite/tests/reader.test ("reading"): Add test.
2014-01-14read: Support R7RS '#true' and '#false' syntax for booleans.Mark H Weaver1-0/+1
* libguile/read.c (try_read_ci_chars): New static function. (scm_read_boolean, scm_read_array): Use 'try_read_ci_chars'. * doc/ref/api-data.texi (Booleans): Update docs. * test-suite/tests/reader.test ("reading"): Add tests.
2014-01-09Merge branch 'stable-2.0'Mark H Weaver1-4/+23
Conflicts: module/system/vm/traps.scm test-suite/tests/peval.test
2014-01-08Implement 'exact-integer?' and 'scm_is_exact_integer'.Mark H Weaver1-2/+21
* libguile/numbers.c (scm_exact_integer_p, scm_is_exact_integer): New procedures. (scm_integer_p): Improve docstring. * libguile/numbers.h (scm_exact_integer_p, scm_is_exact_integer): New prototypes. * doc/ref/api-data.texi (Integers): Add docs. * test-suite/tests/numbers.test ("exact-integer?"): Add tests.
2014-01-08Fix doc that incorrectly claimed (integer? +inf.0) => #t.Mark H Weaver1-2/+2
Fixes <http://bugs.gnu.org/16356>. Reported by Zefram <zefram@fysh.org>. * doc/ref/api-data.texi (Integers): Add docs. Fix outdated example that incorrectly showed (integer? +inf.0) => #t.
2013-04-14Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver1-14/+82
Conflicts: GUILE-VERSION libguile/array-map.c libguile/fports.h libguile/gc.h libguile/inline.h libguile/ports.c libguile/ports.h libguile/print.c libguile/r6rs-ports.c libguile/read.c test-suite/tests/00-socket.test
2013-04-06Fix the recommendations for conversion of C string constants.Mark H Weaver1-11/+13
* doc/ref/api-data.texi (Conversion to/from C, Symbol Primitives, Keyword Procedures): Fix the recommendations for conversion of C string constants. The encoding of the source code is irrelevant in modern compilers. What is relevant is the execution character set. Both GCC and clang use UTF-8 by default, so recommend the 'scm_from_utf8_*' functions when the argument is a C string constant. Also fix the broken texinfo markup for 'scm_from_*_symbol' that prevented them from being listed in the index.
2013-04-06Implement 'scm_c_bind_keyword_arguments'.Mark H Weaver1-0/+66
* libguile/keywords.c (scm_keyword_argument_error): New variable. (scm_c_bind_keyword_arguments): New API function. * libguile/keywords.h (enum scm_keyword_arguments_flags): New enum. (scm_t_keyword_arguments_flags): New typedef. (scm_c_bind_keyword_arguments): New prototype. * doc/ref/api-data.texi (Coding With Keywords, Keyword Procedures): Add documentation. * test-suite/standalone/test-scm-c-bind-keyword-arguments.c: New file. * test-suite/standalone/Makefile.am: Add test-scm-c-bind-keyword-arguments test.
2013-04-01Fix broken texinfo markup in (ice-9 iconv) docs.Mark H Weaver1-3/+3
* doc/ref/api-data.texi (Representing Strings as Bytes): Fix broken @deffn syntax.
2013-04-01Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver1-1/+1
Conflicts: libguile/r6rs-ports.c
2013-04-01Fix typos in 'string-join' docs: 'string-infix' -> 'strict-infix'.Mark H Weaver1-1/+1
* doc/ref/api-data.texi (String Constructors): In definition of 'string-join', change 'string-infix' -> 'strict-infix'. * libguile/srfi-13.c (scm_string_join): In docstring, change 'string-infix' -> 'strict-infix'.
2013-03-28Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver1-31/+49
Conflicts: configure.ac libguile/deprecated.c libguile/deprecated.h libguile/filesys.h libguile/fluids.c libguile/fports.c libguile/gc.c libguile/guile.c libguile/numbers.c libguile/objcodes.c libguile/r6rs-ports.c libguile/smob.c libguile/socket.c libguile/threads.h module/language/scheme/decompile-tree-il.scm module/language/tree-il/peval.scm test-suite/tests/syncase.test
2013-03-15fix doc buildAndy Wingo1-2/+2
* doc/ref/api-data.texi (Bitwise Operations): Don't use @-commands in @math. Fixes doc build. * doc/ref/api-macros.texi (Syntax Rules): Fix example result.
2013-03-12Add 'round-ash', a rounding arithmetic shift operatorMark H Weaver1-12/+30
* libguile/numbers.c (left_shift_exact_integer, floor_right_shift_exact_integer, round_right_shift_exact_integer): New static functions. (scm_round_ash): New procedure. (scm_ash): Reimplement in terms of 'left_shift_exact_integer' and 'floor_right_shift_exact_integer'. * libguile/numbers.h: Add prototype for scm_round_ash. Rename the second argument of 'scm_ash' from 'cnt' to 'count'. * test-suite/tests/numbers.test (round-ash, ash): Add new unified testing framework for 'ash' and 'round-ash'. Previously, the tests for 'ash' were not very comprehensive; for example, they did not include a single test where the number to be shifted was a bignum. * doc/ref/api-data.texi (Bitwise Operations): Add documentation for 'round-ash'. Improve documentation for `ash'.
2013-03-10excise use of "iff" in the manualJason Earl1-19/+19
* doc/ref/api-compound.texi: * doc/ref/api-control.texi: * doc/ref/api-data.texi: * doc/ref/api-macros.texi: * doc/ref/api-modules.texi: * doc/ref/api-procedures.texi: * doc/ref/api-scheduling.texi: * doc/ref/api-smobs.texi: * doc/ref/api-undocumented.texi: * doc/ref/api-utility.texi: * doc/ref/compiler.texi: * doc/ref/intro.texi: * doc/ref/scheme-using.texi: * doc/ref/sxml.texi: * doc/ref/web.texi: Change uses of "iff" to "if, otherwise". Fixes bug 10302.
2013-02-25Revert "random-state-from-platform: simplify pid conditional, and clarify docs."Mark H Weaver1-3/+3
This reverts commit 08904661a2b1c6d461b2f5abfe3226a4023453fb.
2013-02-24random-state-from-platform: simplify pid conditional, and clarify docs.Mark H Weaver1-3/+3
* libguile/random.c (random_state_of_last_resort): Simplify optional inclusion of PID in the random state. Clarify in the comments that the PID is only included where scm_getpid is present. * doc/ref/api-data.texi (Random): Clarify that 'random-state-from-platform' includes the PID in the random state only if scm_getpid is present.
2013-02-18Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo1-12/+16
Conflicts: libguile/array-handle.c libguile/deprecated.h libguile/inline.c libguile/inline.h module/ice-9/deprecated.scm module/language/tree-il/peval.scm
2013-02-18deprecate generalized vectors in favor of arraysAndy Wingo1-10/+12
* libguile/generalized-arrays.h: * libguile/generalized-arrays.c (scm_c_array_length): (scm_array_length): New functions. * module/ice-9/deprecated.scm: * libguile/generalized-vectors.c: * libguile/generalized-vectors.h: * libguile/deprecated.h: * libguile/deprecated.c (scm_generalized_vector_p) (scm_generalized_vector_length, scm_generalized_vector_ref) (scm_generalized_vector_set_x, scm_generalized_vector_to_list): Deprecate. * libguile/uniform.c (scm_uniform_vector_to_list): Use scm_array_to_list. * module/ice-9/boot-9.scm (case): Arrays are generalized vectors. * module/srfi/srfi-4/gnu.scm (define-any->vector): Use the array functions instead of the generalized-vector functions. * test-suite/tests/arrays.test: Remove generalized-vector->list test; covered by array->list test. * test-suite/tests/bitvectors.test: * test-suite/tests/bytevectors.test: * test-suite/tests/srfi-4.test: Adapt to test using array interfaces instead of generalized-vector interfaces. * doc/ref/api-compound.texi: Remove generalized vector docs. * doc/ref/api-data.texi: * doc/ref/srfi-modules.texi: Adapt.
2013-02-02Add scm_from_ptrdiff_t and scm_to_ptrdiff_t.Mark H Weaver1-2/+4
* libguile/numbers.h (scm_from_ptrdiff_t, scm_to_ptrdiff_t): New macros (function aliases). * doc/ref/api-data.texi: Add docs.
2013-01-15add scm_from_port_string and friendsAndy Wingo1-0/+13
* doc/ref/api-data.texi (Conversion to/from C): * libguile/strings.h: * libguile/strings.c (scm_from_port_string, scm_from_port_stringn): (scm_to_port_string, scm_to_port_stringn): New functions. * guile-readline/readline.c (internal_readline): * libguile/strports.c (scm_strport_to_string): * libguile/read.c (scm_read_number, scm_read_mixed_case_symbol): (scm_read_number_and_radix, scm_read_character): Use the new functions.
2013-01-11Change iconv procedures to take optional instead of keyword argAndy Wingo1-10/+16
* module/ice-9/iconv.scm (call-with-encoded-output-string): (string->bytevector, bytevector->string): Take an optional instead of a keyword argument. * doc/ref/api-data.texi (Representing Strings as Bytes): Adapt docs to change, and fix a number of errors. Thanks to Ludovic Courtès for the pointers. * test-suite/tests/iconv.test ("wide non-ascii string"): Add a test for the 'substitute path.
2013-01-11add bytevector->string and string->bytevector in new (ice-9 iconv) moduleAndy Wingo1-4/+76
* module/Makefile.am: * module/ice-9/iconv.scm: New module implementing procedures to encode and decode representations of strings as bytes. * test-suite/Makefile.am: * test-suite/tests/iconv.test: Add tests. * doc/ref/api-data.texi: Add docs.
2012-10-12In string-split, add support for character sets and predicates.Daniel Hartwig1-5/+17
* libguile/srfi-13.c (string-split): Add support for splitting on character sets and predicates, like string-index and others. * test-suite/tests/strings.test (string-split): Add tests covering the new argument types. * doc/ref/api-data.texi (string-split): Update. Signed-off-by: Mark H Weaver <mhw@netris.org>
2012-03-04Remove documentation of internal static string comparison functionsMark H Weaver1-10/+0
* doc/ref/api-data.texi (String Comparison): Remove documentation for scm_i_string{,_ci}_{equal,less,leq,gr,geq}_p, which are not only internal functions but static, and thus unusable by external code.
2012-02-04Improve consistency of definitions of C functions in manual.Bake Timmons1-6/+6
* doc/ref/api-compound.texi * doc/ref/api-evaluation.texi * doc/ref/api-foreign.texi * doc/ref/api-io.texi * doc/ref/posix.texi * doc/ref/srfi-modules.texi: Add missing parentheses and commas to definitions of C functions. * doc/ref/api-data.texi: Change from @deffn to @deftypefn for C function with arguments not of SCM type.
2012-02-04Make notation for Scheme repeated arguments more consistent in manual.Bake Timmons1-75/+82
* doc/ref/api-compound.texi * doc/ref/api-control.texi * doc/ref/api-data.texi * doc/ref/api-debug.texi * doc/ref/api-evaluation.texi * doc/ref/api-macros.texi * doc/ref/api-memory.texi * doc/ref/api-modules.texi * doc/ref/api-procedures.texi * doc/ref/api-regex.texi * doc/ref/api-scheduling.texi * doc/ref/api-utility.texi * doc/ref/goops.texi * doc/ref/match.texi * doc/ref/misc-modules.texi * doc/ref/posix.texi * doc/ref/r6rs.texi * doc/ref/scheme-using.texi * doc/ref/srfi-modules.texi * doc/ref/sxml-match.texi: Make notation for Scheme repeated arguments more consistent in manual.
2012-02-02Make consistent the usage of variable names in the function definitions ↵Bake Timmons1-9/+9
found in the Texinfo docs. * doc/r5rs/r5rs.texi: * doc/ref/api-compound.texi: * doc/ref/api-data.texi: * doc/ref/api-debug.texi: * doc/ref/api-evaluation.texi: * doc/ref/api-io.texi: * doc/ref/api-modules.texi: * doc/ref/api-procedures.texi: * doc/ref/api-scheduling.texi: * doc/ref/api-smobs.texi: * doc/ref/compiler.texi: * doc/ref/misc-modules.texi: * doc/ref/posix.texi: * doc/ref/scheme-using.texi: * doc/ref/srfi-modules.texi: * doc/ref/vm.texi: * doc/ref/web.texi: * doc/sources/env.texi: Make usage of variable names of function definitions more consistent.
2012-02-01Update srfi-14 character sets to Unicode 6.1Mike Gran1-1/+1
* libguile/srfi-14.i.c (cs_lower_case_ranges, cs_lower_case) (cs_upper_case_ranges, cs_upper_case, cs_letter_ranges, cs_letter) (cs_digit_ranges, cs_digit, cs_letter_plus_digit_ranges, cs_letter_plus_digit) (cs_graphic_ranges, cs_graphic, cs_printing_ranges, cs_printing) (cs_punctuation_ranges, cs_punctuation, cs_symbol_ranges, cs_symbol) (cs_designated_ranges, cs_designated): modified * doc/ref/api-data.texi: modified
2012-01-21Add `random-state-from-platform' and `scm_i_random_bytes_from_platform'Mark H Weaver1-19/+13
* libguile/random.c (scm_random_state_from_platform): New procedure. (scm_i_random_bytes_from_platform): New internal function. * libguile/random.h (scm_random_state_from_platform, scm_i_random_bytes_from_platform): Add prototypes. * doc/ref/api-data.texi (Random): Add documentation.