1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

202 commits

Author SHA1 Message Date
Ralf Wildenhues
ecb8733562 docs: fix typos in manual, and a couple in code comments.
* doc/ref/api-binding.texi, doc/ref/api-compound.texi,
doc/ref/api-control.texi, doc/ref/api-debug.texi,
doc/ref/api-io.texi, doc/ref/api-macros.texi,
doc/ref/api-procedures.texi, doc/ref/api-scheduling.texi,
doc/ref/api-undocumented.texi, doc/ref/api-utility.texi,
doc/ref/compiler.texi, doc/ref/goops.texi,
doc/ref/libguile-concepts.texi, doc/ref/misc-modules.texi,
doc/ref/posix.texi, doc/ref/r6rs.texi, doc/ref/slib.texi,
doc/ref/srfi-modules.texi, doc/ref/sxml-match.texi,
doc/ref/tools.texi, doc/ref/vm.texi, doc/ref/web.texi,
doc/sources/env.texi, doc/sources/jimb-org.texi,
doc/sources/scheme-concepts.texi, doc/sources/unix.texi,
module/ice-9/optargs.scm: Fix typos.
* doc/r4rs/r5rs.texi: Likewise.  Do not capitalize code symbols
even at the start of a sentence.
* doc/ref/api-data.texi: Likewise.  Also, remove executable bit.
2011-02-09 22:28:49 +00:00
Mark H Weaver
c721848287 Support non-real complex numbers with inexact zero imaginary part
Add the ability to represent non-real complex numbers whose imaginary
part is an _inexact_ zero (0.0 or -0.0), per R6RS.  Previously, such
numbers were immediately changed into inexact reals.

* libguile/numbers.c: Remove from the list of `General assumptions' in
  numbers.c that objects satisfying SCM_COMPLEXP() have a non-zero
  complex component.  This is no longer true.  Also add a warning
  about another unrelated assumption that is not entirely correct
  (that floor(r) == r implies that mpz_set_d will DTRT; it won't
  if r is infinite).

  (icmplx2str): Always print the imaginary part, even if it is zero.
  Also handle a negative zero imaginary part more gracefully.  It
  now prints 0.0-0.0i, where previously it would print 0.0+-0.0i.

  (mem2ureal): Replace scm_from_double (0.0) with flo0.

  (scm_c_make_rectangular): Always create non-real complex numbers.
  Previously it would create inexact reals if the specified imaginary
  part was zero.

  (scm_make_rectangular): If the imaginary part is an _exact_ 0, return
  the real part unchanged (possibly exact), otherwise return a non-real
  complex number (possibly with an inexact zero imaginary part).
  Previously, it would return an inexact real number whenever the
  imaginary part was any kind of zero.

  (scm_make_polar): If the magnitude is an exact 0, return an exact 0.
  If the angle is an exact 0, return the magnitude unchanged (possibly
  exact).  Otherwise return a non-real complex number (possibly with an
  inexact zero imaginary part).  Previously, it would return a real
  number whenever the imaginary part was any kind of zero.

  (scm_imag_part): Return an exact 0 if applied to a real number.
  Previously it would return an inexact zero if applied to an inexact
  real number.

  (scm_inexact_to_exact): Accept complex numbers with inexact zero
  imaginary part.  In that case, simply use the real part and ignore the
  imaginary part.  Essentially we coerce the inexact zero imaginary part
  to an exact 0.

* test-suite/tests/numbers.test: Add many test cases, and modify
  existing tests as needed to reflect these changes.  Also add a new
  internal predicate: `almost-real-nan?' which tests for a non-real
  complex number with zero imaginary part whose real part is a NaN.

* doc/ref/api-data.texi (Complex Numbers): Update description of complex
  numbers to reflect these changes: non-real complex numbers in Guile
  need not have non-zero imaginary part.  Also, each part of a complex
  number may be any inexact real, not just rationals as was previously
  stated.  Explicitly mention that each part may be an infinity, a NaN,
  or a signed zero.

  (Complex Number Operations): Change the formal parameter names of
  `make-polar' from `x' and `y' to `mag' and `ang'.

* NEWS: Add news entries.
2011-02-02 21:34:01 +01:00
Mark H Weaver
654b2823be Improve discussion of exactness propagation in manual
* doc/ref/api-data.texi (Exact and Inexact Numbers): Improve the
  discussion of exactness propagation.  Mention that there are
  exceptions to the rule that calculations involving inexact numbers
  must product an inexact result.
2011-02-01 21:14:18 +01:00
Mark H Weaver
ac6ce16bc9 Rename {euclidean,centered}_quo_rem to {euclidean,centered}_divide
* libguile/numbers.c (euclidean_quo_rem): Rename to euclidean_divide.
  (centered_quo_rem): Rename to {euclidean,centered}_divide.

* libguile/numbers.h: Rename euclidean_quo_rem to euclidean_divide and
  centered_quo_rem to centered_divide.

* doc/ref/api-data.texi: Rename euclidean_quo_rem to euclidean_divide and
  centered_quo_rem to centered_divide.
2011-01-31 20:22:42 +01:00
Mark H Weaver
ff62c16828 Add two new sets of fast quotient and remainder operators
* libguile/numbers.c (scm_euclidean_quo_and_rem, scm_euclidean_quotient,
  scm_euclidean_remainder, scm_centered_quo_and_rem,
  scm_centered_quotient, scm_centered_remainder): New extensible
  procedures `euclidean/', `euclidean-quotient', `euclidean-remainder',
  `centered/', `centered-quotient', `centered-remainder'.

* libguile/numbers.h: Add function prototypes.

* module/rnrs/base.scm: Remove incorrect stub implementations of `div',
  `mod', `div-and-mod', `div0', `mod0', and `div0-and-mod0'.  Instead do
  renaming imports of `euclidean-quotient', `euclidean-remainder',
  `euclidean/', `centered-quotient', `centered-remainder', and
  `centered/', which are equivalent to the R6RS operators.

* module/rnrs/arithmetic/fixnums.scm (fxdiv, fxmod, fxdiv-and-mod,
  fxdiv0, fxmod0, fxdiv0-and-mod0): Remove redundant checks for division
  by zero and unnecessary complexity.
  (fx+/carry): Remove unneeded calls to `inexact->exact'.

* module/rnrs/arithmetic/flonums.scm (fldiv, flmod, fldiv-and-mod,
  fldiv0, flmod0, fldiv0-and-mod0): Remove redundant checks for division
  by zero and unnecessary complexity.  Remove unneeded calls to
  `inexact->exact' and `exact->inexact'

* test-suite/tests/numbers.test: (test-eqv?): New internal predicate for
  comparing numerical outputs with expected values.

  Add extensive test code for `euclidean/', `euclidean-quotient',
  `euclidean-remainder', `centered/', `centered-quotient',
  `centered-remainder'.

* test-suite/tests/r6rs-arithmetic-fixnums.test: Fix some broken test
  cases, and remove `unresolved' test markers for `fxdiv', `fxmod',
  `fxdiv-and-mod', `fxdiv0', `fxmod0', and `fxdiv0-and-mod0'.

* test-suite/tests/r6rs-arithmetic-flonums.test: Remove `unresolved'
  test markers for `fldiv', `flmod', `fldiv-and-mod', `fldiv0',
  `flmod0', and `fldiv0-and-mod0'.

* doc/ref/api-data.texi (Arithmetic): Document `euclidean/',
  `euclidean-quotient', `euclidean-remainder', `centered/',
  `centered-quotient', and `centered-remainder'.

  (Operations on Integer Values): Add cross-references to `euclidean/'
  et al, from `quotient', `remainder', and `modulo'.

* doc/ref/r6rs.texi (rnrs base): Improve documentation for `div', `mod',
  `div-and-mod', `div0', `mod0', and `div0-and-mod0'.  Add
  cross-references to `euclidean/' et al.

* NEWS: Add NEWS entry.
2011-01-30 23:00:38 +01:00
Mark H Weaver
c960e55600 Infinities and NaNs are no longer rational
* libguile/numbers.c (scm_rational_p): Return #f for infinities and
  NaNs, per R6RS.  Previously it returned #t for real infinities
  and NaNs.  They are still considered real by scm_real `real?'
  however, per R6RS.  Also simplify the code.

  (scm_real_p): New implementation to reflect the fact that the
  rationals and reals are no longer the same set.  Previously it just
  called scm_rational_p.

  (scm_integer_p): Simplify the code.

* test-suite/tests/numbers.test: Add test cases for `rational?'
  and `real?' applied to infinities and NaNs.

* doc/ref/api-data.texi (Real and Rational Numbers): Update docs to
  reflect the fact that infinities and NaNs are no longer rational, and
  that `real?'  no longer implies `rational?'.  Improve discussion of
  infinities and NaNs.

* NEWS: Add NEWS entries, and combine with an earlier entry about
  infinities no longer being integers.
2011-01-30 13:08:53 +01:00
Andy Wingo
10391e06e0 domain of inf?, finite?, nan? is the real numbers
* libguile/numbers.c (scm_inf_p, scm_finite_p, scm_nan_p): The domain of
  these functions is the real numbers.  Error on other input.

* doc/ref/api-data.texi (Reals and Rationals): Update the documentation
  accordingly.

* test-suite/tests/numbers.test ("finite?", "inf?"): Update tests.
2011-01-28 13:43:37 +01:00
Mark H Weaver
7112615f73 Implement finite?' in core and fix R6RS finite?' and `infinite?'
* libguile/numbers.c (scm_finite_p): Add new predicate `finite?' from
  R6RS to guile core, which returns #t if and only if its argument is
  neither infinite nor a NaN.  Note that this is not the same as (not
  (inf? x)) or (not (infinite? x)), since NaNs are neither finite nor
  infinite.

* test-suite/tests/numbers.test: Add test cases for `finite?'.

* module/rnrs/base.scm: Import `inf?' as `infinite?' instead of
  reimplementing it.  Previously, the R6RS implementation of
  `infinite?' did not detect non-real complex infinities, nor did it
  throw exceptions for non-numbers.  (Note that NaNs _are_ considered
  numbers by scheme, despite their name).

  Import `finite?' instead of reimplementing it.  Previously, the R6RS
  implementation of `finite?' returned #t for both NaNs and non-real
  complex infinities, in violation of R6RS.

* NEWS: Add NEWS entries, and reorganize existing numerics-related
  entries together under one subheading.

* doc/ref/api-data.texi (Real and Rational Numbers): Add docs for
  `finite?' and scm_finite_p.
2011-01-28 12:21:14 +01:00
Julian Graham
c5fc8f8c56 Additional documentation for symbol manipulation functions.
* doc/ref/api-data.texi (Symbol Primitives): Document `symbol',
  `list->symbol', and `symbol-append'.
2011-01-26 03:32:48 -05:00
Ludovic Courtès
647dc1ac23 Add `scm_{to,from}_utf32_string'.
* libguile/strings.c (scm_from_utf32_string, scm_from_utf32_stringn,
  scm_to_utf32_string, scm_to_utf32_stringn): New functions.

* libguile/strings.h (scm_from_utf32_string, scm_from_utf32_stringn,
  scm_to_utf32_string, scm_to_utf32_stringn): New declarations.

* doc/ref/api-data.texi (Conversion to/from C): Document
  `scm_{to,from}_{utf8,utf32}_stringn'.
2011-01-26 00:29:50 +01:00
Andy Wingo
8e43ed5d0b infinities are no longer integers
* libguile/numbers.c (scm_is_integer): Infinities are not integers, per
  the R6RS.
  (scm_even_p, scm_odd_p): Passing an infinity to even? or odd? is an
  error.

* test-suite/tests/numbers.test ("integer?"): Adapt test.
  ("expt"): Add tests for +inf.0 and -inf.0 exponents.

* NEWS: Add NEWS entries.
2011-01-23 00:06:24 +01:00
Andy Wingo
c869f0c157 document hungry-eol-escapes
* doc/ref/api-data.texi (String Syntax): Document hungry-eol-escapes.
* doc/ref/api-evaluation.texi (Scheme Read):
* doc/ref/api-options.texi (Runtime Options): Update read-options 'help
  output.
2011-01-21 09:24:36 +01:00
Ludovic Courtès
bf7c2e964e Improve doc of string-index', string-index-right', and `string-rindex'.
Suggested by Noah Lavine <noah.b.lavine@gmail.com>.

* doc/ref/api-data.texi (String Searching): Mention the return value of
  `string-index', `string-index-right', and `string-rindex' when no
  match is found.

* libguile/srfi-13.c (scm_string_index, scm_string_index_right,
  scm_string_rindex): Adjust docstring accordingly.
2011-01-04 18:08:58 +01:00
Andy Wingo
9fe717e23c fix string-filter and string-delete argument order
* libguile/srfi-13.h:
* libguile/srfi-13.c (scm_string_filter, scm_string_delete): Swap
  char_pred and s argument order, to comply with SRFI-13. There is a
  back-compat shim that will detect programs that used the old,
  erroneous interface, while giving a warning.

* doc/ref/api-data.texi: Update docs.
2010-11-19 17:08:36 +01:00
Neil Jerram
a136ada69b Add ref to new location for regex doc
* doc/ref/api-data.texi: Add ref to new location for regex doc.  Also
  correct other refs to say section rather than chapter.
2010-10-31 08:27:56 +00:00
Neil Jerram
96ca59d839 Promote regex doc out of the `Simple Data Types' section
Because that probably isn't where people will look for it.
Thanks to Noah Lavine for the idea.

* doc/ref/api-regex.texi (Regular Expressions): New file, containing
  the regex doc (promoted one level) that used to be in api-data.texi.

* doc/ref/guile.texi (API Reference): Include new file, and add menu
  entry for the new section.

* THANKS: Add Noah.
2010-10-31 08:24:28 +00:00
Andy Wingo
1518f64948 move read and print options docs to the procedures they parameterize
* doc/ref/api-evaluation.texi (Scheme Read): Fold all reader options
  docs into this section. Undocument read-options-interface.
  (Scheme Write): New section for `write' and `display', and the print
  options. print-enable/print-disable are not documented, as there are
  no boolean print options. print-options-interface is likewise
  undocumented.

* doc/ref/api-options.texi: Remove discussion of options in
  general. Move read options to Scheme Read, and print options to Scheme
  Write.

* doc/ref/api-io.texi (Reading): Link to Scheme Read.
  (Writing): Move write and display to Scheme Write, and link there.

* doc/ref/srfi-modules.texi:
* doc/ref/api-debug.texi:
* doc/ref/api-data.texi: Update xrefs.
2010-10-01 11:09:28 +02:00
Michael Gran
cf313a947b Provide non-locale C/Scheme string conversion functions
* doc/ref/api-data.texi: document scm_to_stringn, scm_from_stringn,
  scm_to_latin1_stringn, and scm_from_latin1_stringn
* libguile/strings.h (scm_to_stringn): make public
  (scm_to_latin1_stringn): new declaration
  (scm_from_latin1_stringn): new declaration
* libguile/strings.c (scm_to_latin1_stringn): new function
  (scm_from_latin1_stringn): new function
2010-09-12 08:29:31 -07:00
Andy Wingo
1d454874c1 update docs
* doc/ref/api-data.texi:
* libguile/random.c: Update datum->random-state and random-state->datum
  docs.
2010-07-26 15:12:42 +02:00
Andreas Rottmann
77b139121d Allow exposing of random number generator state
Now the random number generator state can be obtained in external
(i.e. `read'/`write'-able) form via the new procedure
`random-state->external'.  An externalized state can be reinstantiated by
calling `external->random-state'.

* libguile/random.c (scm_i_init_rstate_scm, scm_i_expose_rstate): New
  internal functions.
* libguile/random.c (scm_c_make_rstate_scm, scm_external_to_random_state,
  scm_random_state_to_external): New public functions.
* libguile/random.h: Add prototypes for the above functions.

* libguile/random.h (scm_t_rng): Add new fields `init_rstate_scm' and
  `expose_rstate'.
* libguile/random.c (scm_init_random): Initialize the new fields in
  `scm_the_rng'.
2010-07-26 15:00:49 +02:00
Michael Gran
0f3a70cfa8 Enable character hex escapes by default
R6RS character hex escapes do not conflict with legacy Guile octal
character escapes, so they can be enabled by default.

* libguile/read.c (scm_read_character): modified
* test-suite/tests/reader.test: modify character escape tests
* doc/ref/api-data.texi: modified
* doc/ref/api-options.texi: modified
2010-07-17 04:16:57 -07:00
Andy Wingo
07d22c0259 rename (rnrs bytevector) to (rnrs bytevectors)
* module/rnrs/bytevectors.scm: Rename to (rnrs bytevectors), from (rnrs
  bytevector), to match the name from the R6RS.

* benchmark-suite/benchmarks/bytevectors.bm:
* doc/ref/api-data.texi:
* doc/ref/api-foreign.texi:
* libguile/bytevectors.c:
* module/6/rnrs.scm:
* module/language/assembly.scm:
* module/language/assembly/compile-bytecode.scm:
* module/language/assembly/decompile-bytecode.scm:
* module/language/glil/compile-assembly.scm:
* module/language/tree-il/primitives.scm:
* module/srfi/srfi-4.scm:
* module/srfi/srfi-4/gnu.scm:
* module/system/foreign.scm:
* test-suite/standalone/test-ffi:
* test-suite/tests/asm-to-bytecode.test:
* test-suite/tests/bytevectors.test:
* test-suite/tests/foreign.test:
* test-suite/tests/r6rs-ports.test: Update all referrers.
2010-06-01 13:26:11 +02:00
Neil Jerram
26b9f90900 Merge branch 'master' into wip-manual-2
Conflicts:

	doc/ref/api-procedures.texi
	doc/ref/misc-modules.texi

(Caused by me removing `@page' from a couple of sections that have been modified
by others.)
2010-04-10 13:32:42 +01:00
Andy Wingo
e4955559c6 A start at syntax-rules docs
* doc/ref/api-macros.texi: New file, documenting macros. Removed some
  old cruft, and started documenting hygienic macros.

* doc/ref/api-procedures.texi: Moved macro things out of here.

* doc/ref/guile.texi: Separate macros from procedures.

* doc/ref/api-data.texi: Update some xrefs.

* doc/ref/Makefile.am: Add api-macros.texi.
2010-03-18 23:39:44 +01:00
Ludovic Courtès
d3b5628c6d doc: Remove obsolete reference to the lack of Unicode support.
* doc/ref/api-data.texi (Bytevectors as Strings): Remove obsolete
  footnote on the lack of Unicode support.

* test-suite/tests/bytevectors.test ("2.9 Operations on
  Strings")["string->utf8 [latin-1]", "utf8->string [latin-1]"]: Remove
  use of `with-latin1-locale'.
  ["string->utf32 [Greek]"]: New tests.
2010-03-14 23:41:10 +01:00
Ludovic Courtès
524aa8ae68 Fix documentation of the string->utf' and utf->string' functions.
* doc/ref/api-data.texi (Bytevectors as Strings): Describe optional
  parameter of `string->utf{16,32}' and `utf{16,32}->string'.
2010-02-10 00:40:01 +01:00
Michael Gran
5b6b22e8ea Move string internals description in ref doc
* doc/ref/api-data.texi: move string internals section
2010-01-18 07:07:34 -08:00
Michael Gran
67af975c0b String ref doc updates for case and conversion
* doc/ref/api-data.texi: clarifications on Alphabetic Case Mapping and
  Conversion To/From C.
2010-01-17 20:10:15 -08:00
Michael Gran
d85ae24dfb Document string-bytes-per-char and %string-dump
* doc/ref/api-data.texi (String Internals): new subsubsection.  Document
  string-bytes-per-char and %string-dump.
2010-01-17 15:25:40 -08:00
Michael Gran
6ea3048785 Document R6RS hex escapes
* doc/ref/api-data.texi (Characters, String Syntax): document r6rs hex
  escapes

* doc/ref/api-options.texi (Reader Options): document r6rs-hex-escapes
  reader option
2010-01-13 07:26:10 -08:00
Michael Gran
67a4a16d8e Add R6RS backspace string escape
R6RS suggests that '\b' should be a string escape for the backspace
character.

* libguile/read.c (scm_read_string): parse backspace escape

* test-suite/tests/strings.test (R6RS backslash escapes): new test
  (Guile extensions backslash escapes): remove R6RS escapes from test.

* doc/ref/api-data.texi (Strings): document new string escape
2010-01-10 15:41:37 -08:00
Michael Gran
15b6a6b284 Add R6RS character names
R6RS adds new names for some of the control characters.

* libguile/chars.c (scm_r6rs_charnames, scm_r6rs_charnums)
  (SCM_N_R6RS_CHARNAMES): new character name constants
  (scm_alt_charnames, scm_alt_charnums): modified to remove duplicates
  (scm_i_charname, scm_i_charname_to_char): use new constants

* test-suite/tests/chars.test (R5RS character names, R6RS character names):
  new tests

* doc/ref/api-data.texi (Characters): updated
2010-01-10 15:16:55 -08:00
Andy Wingo
27219b32c7 update uniform vector docs
* doc/ref/api-compound.texi (Uniform Numeric Vectors): Make a subsection
  of "Vectors", and link out to SRFI-4, where the main text has been
  moved.

* doc/ref/api-data.texi (Bytevectors as Uniform Vectors): New section.

* doc/ref/srfi-modules.texi (SRFI-4): Move body of uniform vector docs
  here. Discuss new module separation. Discuss relation to bytevectors.
2010-01-07 23:30:02 +01:00
Julian Graham
edb7bb4766 Support for Unicode string normalization functions
* libguile/strings.c, libguile/strings.h (normalize_str,
  scm_string_normalize_nfc, scm_string_normalize_nfd, scm_normalize_nfkc,
  scm_string_normalize_nfkd): New functions.
* test-suite/tests/strings.test: Unit tests for `string-normalize-nfc',
  `string-normalize-nfd', `string-normalize-nfkc', and
  `string-normalize-nfkd'.
* doc/ref/api-data.texi (String Comparison): Documentation for normalization
  functions.
2010-01-03 01:08:37 -05:00
Michael Gran
a1dcb961a6 Add documentation for scm_c_upcase et al
* doc/ref/api-data.texi: document scm_c_upcase, scm_c_downcase,
  scm_c_titlecase, and scm_t_wchar
2009-12-28 15:26:10 -08:00
Neil Jerram
3323ec063c Automatic manual updates following libguile docstring changes
Affecting the following procedures:

* doc/ref/api-compound.texi (Uniform Numeric Vectors):
  uniform-array-read!

* doc/ref/api-data.texi (Complex): make-rectangular, string=?,
  string<?, string<=?, string>?, string>=?, string-ci=?, string-ci<?,
  string-ci<=?, string-ci>?, string-ci>=?, string-append/shared

* doc/ref/api-evaluation.texi (Reader Extensions): read-hash-extend

* doc/ref/api-procedures.texi (Procedures with Setters): procedure,
  macro?, macro-type

* doc/ref/api-undocumented.texi: module-import-interface,
  %method-more-specific?

* doc/ref/new-docstrings.texi: uniform-array->bytevector,
  %start-stack, guardian-destroyed?, guardian-greedy?,
  destroy-guardian!, gc-dump, gc-disable, gc-enable,
  make-generalized-vector, set-primitive-generic!, nl-langinfo,
  %warn-autocompilation-enabled, make-syncase-macro,
  make-extended-syncase-macro, syncase-macro-type,
  syncase-macro-binding, memoize-expression, unmemoize-expression,
  memoized-expression-typecode, memoized-expression-data,
  memoized-typecode, memoize-variable-access!, module-local-variable,
  module-variable, eval-closure-module, module-transformer,
  module-public-interface, define!, module-reverse-lookup, cddr,
  make-promise, %get-stack-size, %string-dump, %symbol-dump,
  string-bytes-per-char, uniform-vector-element-type,
  uniform-vector-element-size, canonicalize-path, getrlimit, setrlimit

* doc/maint/guile.texi: Corresponding tracking updates.
2009-12-27 23:24:09 +00:00
Julian Graham
0ca3a342d1 Support for Unicode general categories
* libguile/chars.c, libguile/chars.h (scm_char_general_category): New function.
* test-suite/tests/chars.test: Unit tests for `char-general-category'.
* doc/ref/api-data.texi (Characters): Documentation for
  `char-general-category'.
2009-12-24 11:55:47 -05:00
Julian Graham
820f33aaed Improved support for Unicode title case in Guile's string and character APIs.
* doc/ref/api-data.texi (Characters): Documentation for `char-titlecase'.
* doc/ref/api-i18n.texi (Character Case Mapping): Documentation for
  `char-locale-titlecase' and `string-locale-titlecase'.

* libguile/chars.c, libguile/chars.h (scm_char_titlecase, scm_c_titlecase): New
  functions.

* libguile/i18n.c, libguile/i18n.h (chr_to_case, scm_char_locale_titlecase,
  str_to_case, scm_string_locale_titlecase): New functions.
* libguile/i18n.c (scm_char_locale_downcase, scm_char_locale_upcase,
  scm_string_locale_downcase, scm_string_locale_upcase): Refactor to share code
  via chr_to_case and str_to_case, as appropriate.
* module/ice-9/i18n.scm (char-locale-title-case, string-locale-titlecase): New
  functions.

* libguile/srfi-13.c (string_titlecase_x): Use uc_totitle instead of uc_toupper.

* test-suite/tests/chars.test: Tests for `char-titlecase'.
* test-suite/tests/i18n.test: Tests for `char-locale-titlecase' and
  `string-locale-titlecase'.
* test-suite/tests/srfi-13.test: Tests for `string-titlecase'.
2009-12-22 00:19:56 -05:00
Neil Jerram
2a7758fe23 Remove page breaks except before new chapters and indices
* doc/ref/api-binding.texi, 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-i18n.texi, doc/ref/api-io.texi, doc/ref/api-memory.texi,
  doc/ref/api-modules.texi, doc/ref/api-options.texi,
  doc/ref/api-overview.texi, doc/ref/api-procedures.texi,
  doc/ref/api-scheduling.texi, doc/ref/api-smobs.texi,
  doc/ref/api-translation.texi, doc/ref/api-utility.texi,
  doc/ref/expect.texi, doc/ref/libguile-concepts.texi,
  doc/ref/libguile-program.texi, doc/ref/misc-modules.texi,
  doc/ref/repl-modules.texi, doc/ref/scheme-debugging.texi,
  doc/ref/scheme-reading.texi, doc/ref/scheme-scripts.texi,
  doc/ref/script-getopt.texi, doc/ref/scsh.texi,
  doc/ref/srfi-modules.texi: Remove @page before @section.
2009-12-19 00:58:54 +00:00
Brian Gough
72b3aa56af more typo fixes
More spelling corrections and fixes for doubled words (e.g. "the the")

--
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/

>From 7be02beedc739c32cce2c8ec8f4ac814c994a13f Mon Sep 17 00:00:00 2001
From: Brian Gough <bjg@gnu.org>
Date: Mon, 14 Dec 2009 22:06:22 +0000
Subject: [PATCH] fix various documentation typos (spelling & doubled words)
2009-12-18 00:53:34 +00:00
Andy Wingo
d84765da44 remove "primitive numerics" from the docs
* doc/ref/api-data.texi: Update for $sin deprecation.
2009-12-03 15:27:35 +01:00
Michael Gran
28cc8dac2f Doc updates for Unicode string escapes and port encodings
* NEWS: string and port changes

* doc/ref/api-data.texi: string escapes and string-ci

* doc/ref/api-io.texi: port encoding functions
2009-09-04 07:55:05 -07:00
Michael Gran
be3eb25c64 Doc updates for srfi-14 character sets
* NEWS: updates for srfi-14 character sets

* doc/ref/api-data.texi: update char-set section and some spellchecking
2009-09-03 09:03:53 -07:00
Michael Gran
bb15a36c25 Update docs and docstrings for Unicode characters
* doc/ref/api-data.texi: more info about characters and codepoints

* libguile/chars.c: replace 'code point' with 'Unicode code point' in
  docstrings
2009-09-03 08:48:23 -07:00
Michael Gran
3f12aedb50 Update docs for Unicode characters
* NEWS: add note about Unicode characters

* doc/ref/api-data.texi: update Characters subsection

* libguile/chars.c: update docstrings to match manual
2009-08-30 16:55:52 -07:00
Neil Jerram
aba0dff5f7 In general, use @lisp in preference to @smalllisp
because it looks better in the DVI output.  Exceptions are

- wide examples, which would cause overfull hboxes if they
  used the bigger @lisp font

- very large examples, which may look too big at the @lisp size.
2009-08-09 15:04:08 +01:00
Neil Jerram
45867c2ace Fix overfull hboxes 2009-08-04 12:10:16 +01:00
Andy Wingo
5fa2deb3f7 minor doc tweaks
* doc/ref/api-compound.texi: Generalized vector doc fixups.

* doc/ref/api-data.texi: Minor fixes to bytevector docs.
2009-06-26 12:42:10 +02:00
Ludovic Courtès
438974d08d Make bytevectors accessible using the generalized-vector API.
As a side effect, this allows compilation of literal bytevectors
("#vu8(...)"), which gets done by the generic array handling
of the GLIL->assembly compiler.

* doc/ref/api-compound.texi (Generalized Vectors): Mention bytevectors.
  (Arrays, Array Syntax): Likewise.

* doc/ref/api-data.texi (Bytevectors as Generalized Vectors): New node.

* libguile/bytevectors.c (scm_i_bytevector_generalized_set_x): New.

* libguile/bytevectors.h (scm_i_bytevector_generalized_set_x): New
  declaration.

* libguile/srfi-4.c (scm_i_generalized_vector_type,
  scm_array_handle_uniform_element_size,
  scm_array_handle_uniform_writable_elements): Add support for
  bytevectors.

* libguile/unif.c (type_creator_table): Add `vu8'.
  (bytevector_ref, bytevector_set): New functions.
  (memoize_ref, memoize_set): Add support for bytevectors.

* libguile/vectors.c (scm_is_generalized_vector,
  scm_c_generalized_vector_length, scm_c_generalized_vector_ref,
  scm_c_generalized_vector_set_x): Add support for bytevectors.

* test-suite/tests/bytevectors.test ("Generalized Vectors"): New test
  set.
2009-06-22 01:09:39 +02:00
Ludovic Courtès
404bb5f87b bytevectors: Add a C-friendly API.
* doc/ref/api-data.texi (Bytevector Manipulation): Add
  `scm_is_bytevector ()', `scm_c_bytevector_length ()',
  `scm_c_bytevector_length ()', and `scm_c_bytevector_set_x ()'.

* libguile/bytevectors.c (scm_is_bytevector, scm_c_bytevector_length,
  scm_c_bytevector_ref, scm_c_bytevector_set_x): New functions.
  (scm_bytevector_p): Use `scm_is_bytevector ()'.
  (scm_bytevector_length): Use `scm_c_bytevector_length ()'.

* libguile/bytevectors.h (scm_is_bytevector, scm_c_bytevector_length,
  scm_c_bytevector_ref, scm_c_bytevector_set_x): New declarations.
2009-06-22 01:05:43 +02:00