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

31 commits

Author SHA1 Message Date
Morgan Smith
c7d170c5d1
Fix typos throughout codebase.
* NEWS:
* README:
* doc/r5rs/r5rs.texi:
* doc/ref/api-data.texi:
* doc/ref/api-debug.texi:
* doc/ref/api-evaluation.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/libguile-concepts.texi:
* doc/ref/posix.texi:
* doc/ref/srfi-modules.texi:
* doc/ref/vm.texi:
* doc/ref/web.texi:
* examples/box-dynamic-module/box.c:
* examples/box-dynamic/box.c:
* examples/box-module/box.c:
* examples/box/box.c:
* examples/safe/safe:
* examples/scripts/README:
* examples/scripts/hello:
* gc-benchmarks/larceny/twobit-input-long.sch:
* gc-benchmarks/larceny/twobit-smaller.sch:
* gc-benchmarks/larceny/twobit.sch:
* libguile/expand.c:
* libguile/load.c:
* libguile/net_db.c:
* libguile/scmsigs.c:
* libguile/srfi-14.c:
* libguile/threads.c:
* meta/guile.m4:
* module/ice-9/match.upstream.scm:
* module/ice-9/ports.scm:
* module/language/cps/graphs.scm:
* module/scripts/doc-snarf.scm:
* module/srfi/srfi-19.scm:
* module/system/repl/command.scm:
* test-suite/tests/srfi-18.test:
Fix typos.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-07-16 22:09:01 +02:00
Mark H Weaver
2980b66f6f SRFI-19: Rename 'tai-epoch-in-jd' to 'utc-epoch-in-jd'.
* module/srfi/srfi-19.scm: Rename 'tai-epoch-in-jd' to
'utc-epoch-in-jd', to reflect its actual meaning and usage.
2019-06-18 05:15:07 -04:00
Daniel Llorens
f74cfce4f1 Support ~N in SRFI-19 string->date
* module/srfi/srfi-19.scm (fractional-integer-reader,
  make-fractional-integer-reader): From reference implementation.
  (reader-directives): Handle #\N, from reference implementation.
* test-suite/tests/srfi-19: Add tests for string->date ~N.
* doc/ref/srfi-modules.texi (string->date): Add line for ~N.
2018-12-11 22:44:34 +01:00
Mark H Weaver
9f285187fe SRFI-19: Minor refactor of leap second table lookups.
* module/srfi/srfi-19.scm (leap-second-delta): Replace with ...
(utc->tai): ... this.
(leap-second-neg-delta): Replace with ...
(tai->utc): ... this.
(current-time-tai, priv:time-tai->time-utc!, priv:time-utc->time-tai!)
(time-tai->julian-day, time-monotonic->julian-day): Adapt accordingly.
2018-10-24 01:14:26 -04:00
Mark H Weaver
ac1fa8dba4 SRFI-19: time-utc->date: Support non-integer nanoseconds values.
* module/srfi/srfi-19.scm (time-utc->date): Use 'floor-remainder'
instead of 'modulo'.
2018-10-24 01:14:26 -04:00
Mark H Weaver
c9d903b6e4 SRFI-19: Check for incompatible types in time comparisons.
Fixes <https://bugs.gnu.org/26163>.
Reported by Zefram <zefram@fysh.org>.

* module/srfi/srfi-19.scm (time-compare-check): New procedure.
(time=?): Use 'time-compare-check' to check the arguments and raise an
error in case of mismatched types.  Previously, mismatched types would
cause time=? to return #f.
(time>?, time<?, time>=?, time<=?, time-difference!): Use
'time-compare-check' to check the arguments.
2018-10-21 19:42:38 -04:00
Mark H Weaver
437e1aa036 SRFI-19: Fix normalization of seconds and nanoseconds in time records.
Fixes <https://bugs.gnu.org/26162>.
Reported by Zefram <zefram@fysh.org>.

* module/srfi/srfi-19.scm (time-normalize!): Rewrite.
* test-suite/tests/srfi-19.test: Add tests.
2018-10-21 19:25:45 -04:00
Mark H Weaver
a58c7abd72 SRFI-19: Fix handling of negative years and negative julian days.
Fixes <https://bugs.gnu.org/21906>.
Mitigates <https://bugs.gnu.org/21903> and <https://bugs.gnu.org/21904>.
Reported by: Zefram <zefram@fysh.org>.

* module/srfi/srfi-19.scm (encode-julian-day-number)
(decode-julian-day-number, date-week-number): Use 'floor-quotient'
instead of 'quotient', and 'floor' instead of 'truncate', where
appropriate.
(time-utc->date): Ensure that the 'nanoseconds' field of the returned
date is non-negative.
(leap-year): Handle negative years properly, and reformulate the
computation.
(week-day): Handle negative years properly.  Use 'floor-quotient'
instead of 'quotient' where appropriate.
(directives): In the handler for '~Y' format escapes, improve the
handling of years outside of the range 0-9999.
(read-directives): Add a FIXME comment to fix the '~Y' reader to handle
years outside of the range 0-9999.
* test-suite/tests/srfi-19.test: Import (srfi srfi-1).  Use Guile's
modern keyword notation in the 'define-module' form.  Add more tests.
2018-10-20 23:15:51 -04:00
Mark H Weaver
5106377a34 SRFI-19: Fix TAI->UTC conversions, leap second handling, etc.
Fixes <https://bugs.gnu.org/21911>.
Fixes <https://bugs.gnu.org/22034>.
Fixes <https://bugs.gnu.org/21902>.
Partially fixes <https://bugs.gnu.org/21904>.
Reported by Zefram <zefram@fysh.org>.

* doc/ref/srfi-modules.texi (SRFI-19 Introduction): Fix the definitions
of Julian Day and Modified Julian Day.  Give the correct full names of
UTC and TAI.
* module/srfi/srfi-19.scm: Import (srfi srfi-1).  Use modern Guile
keyword syntax in the 'define-module' form.
(leap-second-neg-delta): New procedure, derived from a similar procedure
in the latest upstream SRFI-19 reference implementation.
(priv:time-tai->time-utc!, time-tai->julian-day)
(time-monotonic->julian-day): Use 'leap-second-neg-delta'.
(local-tz-offset): Fix comment.
(leap-second?): Remove.
(tai-before-leap-second?): New procedure, derived from upstream SRFI-19.
(time-utc->date): Use 'define*' to handle the optional argument.  Remove
the leap second handling, following upstream SRFI-19.
(time-tai->date): Rewrite in terms of 'time-utc->date'.  Add special
leap second handling, following upstream SRFI-19.
(time-monotonic->date): Rewrite in terms of 'time-tai->date'.
(date->time-tai, date->time-monotonic): Add special leap second
handling, following upstream SRFI-19.
(directives): In the entry for the "~Y" escape in 'date->string', pad
the year field to 4 characters, following upstream SRFI-19.
* test-suite/tests/srfi-19.test: Add tests.
2018-10-20 17:23:39 -04:00
Mark H Weaver
3845343cf3 Fix typos, indentation and error reporting in SRFI-19.
* module/srfi/srfi-19.scm: Fix typos in comments, indentation, and pass
the correct 'caller' name to 'time-error' in several places.
2018-10-16 04:20:47 -04:00
Mark H Weaver
49c090d850 Update SRFI-19 leap second table.
* module/srfi/srfi-19.scm (leap-second-table): Update to include the
leap second on 1 January 2017.
2018-10-16 02:50:30 -04:00
Ludovic Courtès
71f536c3d8 srfi-19: Remove unused procedure.
* module/srfi/srfi-19.scm (date->broken-down-time): Remove.
2018-07-24 12:07:03 +02:00
Ludovic Courtès
886ac3e2ab SRFI-19: Swap seconds and nanoseconds in 'current-time-monotonic'.
* module/srfi/srfi-19.scm (current-time-monotonic): Swap the 2nd and 3rd
arguments.  Fixes a regression introduced in
commit b11e2922c3.
2017-04-22 01:01:32 +02:00
Andy Wingo
4b39c1a9e5 Fix date->string ~f operator to not emit leading zeros
* module/srfi/srfi-19.scm (directives): Format ~f without leading
  zeroes.  Fixes https://bugs.gnu.org/26260.
* test-suite/tests/srfi-19.test ("SRFI date/time library"): Add test.
2017-04-19 15:42:03 +02:00
Andrew Moss
1978085b22 Fixed bug: ~N mishandles small nanoseconds value
Fixes <http://bugs.gnu.org/26261>.
Reported by Zefram <zefram@fysh.org>.

* module/srfi/srfi-19.scm ("define directives"): N padding increased from 7 to 9

* test-suite/tests/srfi-19.test ("date->string"): New test.
2017-04-19 15:13:09 +02:00
Andy Wingo
b11e2922c3 SRFI-19 current-time-monotonic returns time of right type
* module/srfi/srfi-19.scm (current-time-monotonic): Actually return a
  time with the correct type.  Fixes #26329.
2017-04-19 15:08:46 +02:00
Mark H Weaver
994b7d70e6 SRFI-19: Update the table of leap seconds.
* module/srfi/srfi-19.scm (leap-second-table): Update to include the
  most recent leap second.
2016-05-22 20:02:37 +02:00
Mark H Weaver
bf0d59e54d SRFI-19: Update the table of leap seconds.
* module/srfi/srfi-19.scm (leap-second-table): Update to include the two
  most recent leap seconds.
2014-03-03 17:31:51 -05:00
Ian Price
d6bd182618 ISO 8601 time format specifies zero padding for hours, not blank padding.
* doc/ref/srfi-modules.texi ("SRFI-19 Date to string"): Fix iso 8601 format strings.
* module/srfi/srfi-19.scm (directives): Fix iso 8601 format strings.
2012-08-27 00:10:44 +02:00
Andy Wingo
abab34ce4d srfi-19 refactor
* module/srfi/srfi-19.scm (priv:locale-number-separator, priv:locale-am)
  (priv:locale-am): Inline definitions.

  Strip priv: prefix from module vars, as it's unnecessary, except for
  in a couple cases.
2011-08-04 12:53:07 +02:00
Andy Wingo
d68a81e038 recommend #:replace
* doc/ref/api-modules.texi (Creating Guile Modules): Update text to
  recommend #:replace.
* module/srfi/srfi-19.scm (current-time): #:replace.
2010-07-17 13:31:06 +02:00
Ludovic Courtès
bf943698b6 Fix SRFI-19 exports.
* module/srfi/srfi-19.scm: Export `time-monotonic->julian-day' and
  `time-monotonic->modified-julian-day'.  Remove obscure `current-time'
  hack.  Use `(define-module :export ...)' instead of `(export ...)'.
2010-01-11 01:21:14 +01:00
Ludovic Courtès
6734191c68 Remove unused top-level variables.
* module/ice-9/runq.scm (fork-strips): Remove.

* module/language/assembly.scm (*block-alignment*): Remove.

* module/language/assembly/disassemble.scm (disassemble-objects,
  simplify): Remove.

* module/srfi/srfi-18.scm (mutex-owners): Remove.

* module/srfi/srfi-19.scm (leap-year?): Remove.

* module/system/base/compile.scm (dsu-sort): Remove.

* module/texinfo.scm (ascii->char): Remove.

* module/texinfo/html.scm (ignored?): Remove.

* module/texinfo/indexing.scm (def-name): Remove.

* module/texinfo/plain-text.scm (ignore): Remove.
2010-01-11 01:21:14 +01:00
Ludovic Courtès
5658035c9c Fix typos leading to wrong argument counts.
* module/ice-9/channel.scm (eval): Fix number of arguments to
  `guile:eval'.

* module/oop/goops/save.scm (write-readably): Fix number of arguments to
  `write-array'.

* module/srfi/srfi-19.scm (priv:char->int): Fix number of arguments to
  `priv:time-error'.
2009-11-07 19:24:49 +01:00
Ludovic Courtès
84012ef4b1 Fix typos leading to unbound variable references.
* module/ice-9/session.scm (help): Fix unbound reference to `env'.

* module/system/vm/program.scm (program-property): Fix typo.

* module/system/vm/frame.scm: Add missing `#:use-module (system vm
  objcode)'.

* module/system/repl/command.scm (guile:load): New.
  (load): Use either `primitive-load' or `load'.

* module/srfi/srfi-18.scm (thread-sleep!): Fix typo.

* module/srfi/srfi-19.scm: Use `(ice-9 rdelim)'.
  (date->broken-down-time, priv:year-day, priv:char->int): Fix typo.
  (time-*->time-*, time-*->time-*!): Fix reference to unbound variable
  `caller'.

* module/oop/goops.scm (bound-check-get): Fix typo.

* module/language/glil/compile-assembly.scm (glil->assembly): Fix typo.

* module/language/glil.scm (parse-glil): Fix typo.

* module/language/ecmascript/base.scm (object->value/string,
  object->value/number, ->number): Fix typos.

* module/language/assembly/disassemble.scm (disassemble-free-vars): Fix
  typo.
2009-10-22 22:57:25 +02:00
Ludovic Courtès
a2ca725212 Remove unused variables in ice-9/goops/srfi/scripts.
* module/ice-9/boot-9.scm (scm-style-repl)[-abort]: Remove.

* module/oop/goops.scm (class)[slot-defs]: Remove.
  (compute-slot-accessors)[name]: Remove.
  (compute-get-n-set)[env]: Remove.

* module/oop/goops/active-slot.scm (compute-get-n-set)[env, name]:
  Remove.

* module/oop/goops/dispatch.scm (cache-try-hash!)[max-misses]: Remove.

* module/oop/goops/save.scm (make-mapper)[dims]: Remove.

* module/scripts/autofrisk.scm (>>checks)[prog]: Remove.

* module/srfi/srfi-19.scm (priv:read-directives)[ireaderf, eireader4]:
  Remove.
2009-09-21 00:24:08 +02:00
Neil Jerram
83ba2d3750 Complete changing license to LGPLv3+
(Still guile-readline to do, but that will all be GPLv3+.)
2009-06-17 22:30:26 +01:00
Andy Wingo
78bae3d6fa fix mismerge on srfi-19.scm
* module/srfi/srfi-19.scm (priv:locale-abbr-weekday->index): Whoops, fix
  broken manual merge on srfi-19.scm.
2009-01-12 21:45:37 +01:00
Andy Wingo
c32929d14d Merge commit 'origin/master' into vm
Conflicts:

	.gitignore
	guile-tools.in
	srfi/srfi-19.scm
2009-01-12 21:36:39 +01:00
Andy Wingo
0a283d1b0b avoid delivering 0 values to 1-valued continuations in srfi-19
* module/srfi/srfi-19.scm: Some parts of this code used a strange idiom,
  `(values)', to indicate that a procedure did nothing. However, quoth
  R5RS:

     Except for continuations created by the `call-with-values'
     procedure, all continuations take exactly one value.

  Indeed the VM indicated this error. I reworked the code to avoid these
  cases.
2008-11-01 14:28:24 +01:00
Andy Wingo
ea93465de7 move scm srfi files to module/srfi, and compile them.
* .gitignore: Add gdb-pre-inst-guile.

* configure.in: Add module/srfi/Makefile.

* module/Makefile.am: Add srfi/.

* module/srfi/: SRFI scheme files moved here, and compiled.

* srfi/Makefile.am: Remove the bits about the scheme files.
2008-11-01 13:49:23 +01:00
Renamed from srfi/srfi-19.scm (Browse further)