LilyPond-Ruby 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/etc/fonts/conf.d/10-hinting-slight.conf +15 -0
- data/etc/fonts/conf.d/10-scale-bitmap-fonts.conf +83 -0
- data/etc/fonts/conf.d/11-lcdfilter-default.conf +17 -0
- data/etc/fonts/conf.d/20-unhint-small-vera.conf +49 -0
- data/etc/fonts/conf.d/30-metric-aliases.conf +637 -0
- data/etc/fonts/conf.d/40-nonlatin.conf +332 -0
- data/etc/fonts/conf.d/45-generic.conf +136 -0
- data/etc/fonts/conf.d/45-latin.conf +301 -0
- data/etc/fonts/conf.d/48-spacing.conf +16 -0
- data/etc/fonts/conf.d/49-sansserif.conf +22 -0
- data/etc/fonts/conf.d/50-user.conf +16 -0
- data/etc/fonts/conf.d/51-local.conf +7 -0
- data/etc/fonts/conf.d/60-generic.conf +64 -0
- data/etc/fonts/conf.d/60-latin.conf +88 -0
- data/etc/fonts/conf.d/65-fonts-persian.conf +418 -0
- data/etc/fonts/conf.d/65-nonlatin.conf +228 -0
- data/etc/fonts/conf.d/69-unifont.conf +28 -0
- data/etc/fonts/conf.d/80-delicious.conf +19 -0
- data/etc/fonts/conf.d/90-synthetic.conf +64 -0
- data/etc/fonts/conf.d/README +23 -0
- data/etc/fonts/fonts.conf +101 -0
- data/etc/relocate/fontconfig.reloc +2 -0
- data/etc/relocate/guile.reloc +2 -0
- data/etc/relocate/libexec.reloc +1 -0
- data/lib/guile/2.2/ccache/ice-9/and-let-star.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/arrays.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/atomic.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/binary-ports.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/boot-9.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/buffered-input.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/calling.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/channel.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/command-line.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/common-list.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/control.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/curried-definitions.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/debug.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/deprecated.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/documentation.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/eval-string.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/eval.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/expect.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/fdes-finalizers.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/format.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/ftw.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/futures.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/gap-buffer.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/getopt-long.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/hash-table.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/hcons.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/history.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/i18n.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/iconv.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/lineio.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/list.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/local-eval.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/ls.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/mapping.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/match.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/networking.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/null.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/occam-channel.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/optargs.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/cache.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/codegen.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/simplify-tree.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/string-peg.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/using-parsers.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/poe.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/poll.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/popen.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/ports.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/posix.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/pretty-print.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/psyntax-pp.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/q.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/r5rs.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/rdelim.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/receive.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/regex.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/runq.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/rw.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/safe-r5rs.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/safe.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/sandbox.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/save-stack.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/scm-style-repl.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/serialize.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/session.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/slib.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/stack-catch.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/streams.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/string-fun.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/suspendable-ports.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/syncase.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/textual-ports.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/threads.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/time.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/top-repl.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/unicode.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/vlist.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/weak-vector.go +0 -0
- data/lib/guile/2.2/ccache/language/brainfuck/compile-scheme.go +0 -0
- data/lib/guile/2.2/ccache/language/brainfuck/compile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/brainfuck/parse.go +0 -0
- data/lib/guile/2.2/ccache/language/brainfuck/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/bytecode/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/bytecode.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/closure-conversion.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/compile-bytecode.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/constructors.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/contification.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/cse.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/dce.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/effects-analysis.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/elide-values.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/handle-interrupts.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/intmap.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/intset.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/licm.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/optimize.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/peel-loops.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/primitives.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/prune-bailouts.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/prune-top-level-scopes.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/reify-primitives.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/renumber.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/rotate-loops.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/self-references.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/simplify.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/slot-allocation.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/specialize-numbers.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/specialize-primcalls.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/split-rec.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/type-checks.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/type-fold.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/types.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/utils.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/verify.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/with-cps.go +0 -0
- data/lib/guile/2.2/ccache/language/cps.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/array.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/base.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/compile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/function.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/impl.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/parse.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/tokenize.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/bindings.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/boot.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/compile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/falias.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/lexer.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/parser.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/runtime/function-slot.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/runtime/value-slot.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/runtime.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/scheme/compile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/scheme/decompile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/scheme/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/analyze.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/canonicalize.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/compile-cps.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/debug.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/effects.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/fix-letrec.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/optimize.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/peval.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/primitives.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/value/spec.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/accessors.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/active-slot.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/composite-slot.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/describe.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/internal.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/save.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/simple.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/stklos.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/arithmetic/bitwise.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/arithmetic/fixnums.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/arithmetic/flonums.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/base.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/bytevectors.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/conditions.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/control.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/enums.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/eval.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/exceptions.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/files.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/hashtables.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/io/ports.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/io/simple.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/lists.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/mutable-pairs.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/mutable-strings.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/programs.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/r5rs.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/records/inspection.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/records/procedural.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/records/syntactic.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/sorting.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/syntax-case.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/unicode.go +0 -0
- data/lib/guile/2.2/ccache/rnrs.go +0 -0
- data/lib/guile/2.2/ccache/scripts/api-diff.go +0 -0
- data/lib/guile/2.2/ccache/scripts/autofrisk.go +0 -0
- data/lib/guile/2.2/ccache/scripts/compile.go +0 -0
- data/lib/guile/2.2/ccache/scripts/disassemble.go +0 -0
- data/lib/guile/2.2/ccache/scripts/display-commentary.go +0 -0
- data/lib/guile/2.2/ccache/scripts/doc-snarf.go +0 -0
- data/lib/guile/2.2/ccache/scripts/frisk.go +0 -0
- data/lib/guile/2.2/ccache/scripts/generate-autoload.go +0 -0
- data/lib/guile/2.2/ccache/scripts/help.go +0 -0
- data/lib/guile/2.2/ccache/scripts/lint.go +0 -0
- data/lib/guile/2.2/ccache/scripts/list.go +0 -0
- data/lib/guile/2.2/ccache/scripts/punify.go +0 -0
- data/lib/guile/2.2/ccache/scripts/read-rfc822.go +0 -0
- data/lib/guile/2.2/ccache/scripts/read-scheme-source.go +0 -0
- data/lib/guile/2.2/ccache/scripts/read-text-outline.go +0 -0
- data/lib/guile/2.2/ccache/scripts/scan-api.go +0 -0
- data/lib/guile/2.2/ccache/scripts/snarf-check-and-output-texi.go +0 -0
- data/lib/guile/2.2/ccache/scripts/snarf-guile-m4-docs.go +0 -0
- data/lib/guile/2.2/ccache/scripts/summarize-guile-TODO.go +0 -0
- data/lib/guile/2.2/ccache/scripts/use2dot.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-1.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-10.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-11.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-111.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-13.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-14.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-16.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-17.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-18.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-19.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-2.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-26.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-27.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-28.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-31.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-34.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-35.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-37.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-38.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-39.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-4/gnu.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-4.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-41.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-42.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-43.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-45.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-6.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-60.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-64.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-67.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-69.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-71.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-8.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-88.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-9/gnu.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-9.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-98.go +0 -0
- data/lib/guile/2.2/ccache/statprof.go +0 -0
- data/lib/guile/2.2/ccache/sxml/apply-templates.go +0 -0
- data/lib/guile/2.2/ccache/sxml/fold.go +0 -0
- data/lib/guile/2.2/ccache/sxml/match.go +0 -0
- data/lib/guile/2.2/ccache/sxml/simple.go +0 -0
- data/lib/guile/2.2/ccache/sxml/ssax/input-parse.go +0 -0
- data/lib/guile/2.2/ccache/sxml/ssax.go +0 -0
- data/lib/guile/2.2/ccache/sxml/transform.go +0 -0
- data/lib/guile/2.2/ccache/sxml/xpath.go +0 -0
- data/lib/guile/2.2/ccache/system/base/ck.go +0 -0
- data/lib/guile/2.2/ccache/system/base/compile.go +0 -0
- data/lib/guile/2.2/ccache/system/base/lalr.go +0 -0
- data/lib/guile/2.2/ccache/system/base/language.go +0 -0
- data/lib/guile/2.2/ccache/system/base/message.go +0 -0
- data/lib/guile/2.2/ccache/system/base/pmatch.go +0 -0
- data/lib/guile/2.2/ccache/system/base/syntax.go +0 -0
- data/lib/guile/2.2/ccache/system/base/target.go +0 -0
- data/lib/guile/2.2/ccache/system/base/types.go +0 -0
- data/lib/guile/2.2/ccache/system/foreign-object.go +0 -0
- data/lib/guile/2.2/ccache/system/foreign.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/command.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/common.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/coop-server.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/debug.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/error-handling.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/repl.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/server.go +0 -0
- data/lib/guile/2.2/ccache/system/syntax.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/assembler.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/coverage.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/debug.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/disassembler.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/dwarf.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/elf.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/frame.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/inspect.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/linker.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/loader.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/program.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/trace.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/trap-state.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/traps.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/vm.go +0 -0
- data/lib/guile/2.2/ccache/system/xref.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/docbook.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/html.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/indexing.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/plain-text.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/reflection.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/serialize.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/string-utils.go +0 -0
- data/lib/guile/2.2/ccache/texinfo.go +0 -0
- data/lib/guile/2.2/ccache/web/client.go +0 -0
- data/lib/guile/2.2/ccache/web/http.go +0 -0
- data/lib/guile/2.2/ccache/web/request.go +0 -0
- data/lib/guile/2.2/ccache/web/response.go +0 -0
- data/lib/guile/2.2/ccache/web/server/http.go +0 -0
- data/lib/guile/2.2/ccache/web/server.go +0 -0
- data/lib/guile/2.2/ccache/web/uri.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/accreg.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/auto-beam.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/autochange.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/backend-library.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/bar-line.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/breath.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/c++.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/chord-entry.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/chord-ignatzek-names.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/chord-name.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/clip-region.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/color.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/curried-definitions.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-context-properties.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-event-classes.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-grob-interfaces.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-grob-properties.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-grobs.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-markup-commands.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-music-callbacks.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-music-display-methods.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-music-properties.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-music-types.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-note-names.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-stencil-commands.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-woodwind-diagrams.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/display-lily.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/display-woodwind-diagrams.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/file-cache.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/flag-styles.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/font-encodings.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/font.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/framework-cairo.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/framework-ps.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/framework-svg.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/fret-diagrams.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/graphviz.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/harp-pedals.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/layout-beam.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/layout-slur.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/lily-library.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/lily.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/ly-syntax-constructors.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/markup-macros.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/markup.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/midi.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/modal-transforms.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/music-functions.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/output-lib.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/output-ps.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/output-svg.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/page.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/paper-system.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/paper.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/parser-clef.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/parser-ly-from-scheme.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/part-combiner.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/predefined-fretboards.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/ps-to-png.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/scheme-engravers.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/scheme-performers.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/script.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/skyline.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/song-util.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/song.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/stencil.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/tablature.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/time-signature-settings.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/time-signature.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/titling.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/to-xml.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/translation-functions.go +0 -0
- data/share/emacs/site-lisp/lilypond-font-lock.el +208 -0
- data/share/emacs/site-lisp/lilypond-indent.el +605 -0
- data/share/emacs/site-lisp/lilypond-init.el +21 -0
- data/share/emacs/site-lisp/lilypond-mode.el +1204 -0
- data/share/emacs/site-lisp/lilypond-song.el +556 -0
- data/share/emacs/site-lisp/lilypond-what-beat.el +279 -0
- data/share/emacs/site-lisp/lilypond-words.el +1428 -0
- data/share/guile/2.2/guile-procedures.txt +8860 -0
- data/share/guile/2.2/ice-9/and-let-star.scm +73 -0
- data/share/guile/2.2/ice-9/arrays.scm +70 -0
- data/share/guile/2.2/ice-9/atomic.scm +38 -0
- data/share/guile/2.2/ice-9/binary-ports.scm +53 -0
- data/share/guile/2.2/ice-9/boot-9.scm +4131 -0
- data/share/guile/2.2/ice-9/buffered-input.scm +109 -0
- data/share/guile/2.2/ice-9/calling.scm +326 -0
- data/share/guile/2.2/ice-9/channel.scm +170 -0
- data/share/guile/2.2/ice-9/command-line.scm +477 -0
- data/share/guile/2.2/ice-9/common-list.scm +278 -0
- data/share/guile/2.2/ice-9/control.scm +110 -0
- data/share/guile/2.2/ice-9/curried-definitions.scm +57 -0
- data/share/guile/2.2/ice-9/debug.scm +25 -0
- data/share/guile/2.2/ice-9/deprecated.scm +93 -0
- data/share/guile/2.2/ice-9/documentation.scm +203 -0
- data/share/guile/2.2/ice-9/eval-string.scm +90 -0
- data/share/guile/2.2/ice-9/eval.scm +723 -0
- data/share/guile/2.2/ice-9/expect.scm +171 -0
- data/share/guile/2.2/ice-9/fdes-finalizers.scm +25 -0
- data/share/guile/2.2/ice-9/format.scm +1626 -0
- data/share/guile/2.2/ice-9/ftw.scm +564 -0
- data/share/guile/2.2/ice-9/futures.scm +308 -0
- data/share/guile/2.2/ice-9/gap-buffer.scm +283 -0
- data/share/guile/2.2/ice-9/getopt-long.scm +371 -0
- data/share/guile/2.2/ice-9/hash-table.scm +45 -0
- data/share/guile/2.2/ice-9/hcons.scm +80 -0
- data/share/guile/2.2/ice-9/history.scm +65 -0
- data/share/guile/2.2/ice-9/i18n.scm +531 -0
- data/share/guile/2.2/ice-9/iconv.scm +95 -0
- data/share/guile/2.2/ice-9/lineio.scm +115 -0
- data/share/guile/2.2/ice-9/list.scm +36 -0
- data/share/guile/2.2/ice-9/local-eval.scm +261 -0
- data/share/guile/2.2/ice-9/ls.scm +94 -0
- data/share/guile/2.2/ice-9/mapping.scm +118 -0
- data/share/guile/2.2/ice-9/match.scm +59 -0
- data/share/guile/2.2/ice-9/match.upstream.scm +917 -0
- data/share/guile/2.2/ice-9/networking.scm +94 -0
- data/share/guile/2.2/ice-9/null.scm +34 -0
- data/share/guile/2.2/ice-9/occam-channel.scm +261 -0
- data/share/guile/2.2/ice-9/optargs.scm +381 -0
- data/share/guile/2.2/ice-9/peg/cache.scm +45 -0
- data/share/guile/2.2/ice-9/peg/codegen.scm +359 -0
- data/share/guile/2.2/ice-9/peg/simplify-tree.scm +97 -0
- data/share/guile/2.2/ice-9/peg/string-peg.scm +273 -0
- data/share/guile/2.2/ice-9/peg/using-parsers.scm +116 -0
- data/share/guile/2.2/ice-9/peg.scm +42 -0
- data/share/guile/2.2/ice-9/poe.scm +116 -0
- data/share/guile/2.2/ice-9/poll.scm +172 -0
- data/share/guile/2.2/ice-9/popen.scm +178 -0
- data/share/guile/2.2/ice-9/ports.scm +566 -0
- data/share/guile/2.2/ice-9/posix.scm +75 -0
- data/share/guile/2.2/ice-9/pretty-print.scm +483 -0
- data/share/guile/2.2/ice-9/psyntax-pp.scm +3542 -0
- data/share/guile/2.2/ice-9/psyntax.scm +3326 -0
- data/share/guile/2.2/ice-9/q.scm +153 -0
- data/share/guile/2.2/ice-9/quasisyntax.scm +136 -0
- data/share/guile/2.2/ice-9/r5rs.scm +45 -0
- data/share/guile/2.2/ice-9/r6rs-libraries.scm +242 -0
- data/share/guile/2.2/ice-9/rdelim.scm +208 -0
- data/share/guile/2.2/ice-9/receive.scm +26 -0
- data/share/guile/2.2/ice-9/regex.scm +229 -0
- data/share/guile/2.2/ice-9/runq.scm +241 -0
- data/share/guile/2.2/ice-9/rw.scm +27 -0
- data/share/guile/2.2/ice-9/safe-r5rs.scm +145 -0
- data/share/guile/2.2/ice-9/safe.scm +34 -0
- data/share/guile/2.2/ice-9/sandbox.scm +1399 -0
- data/share/guile/2.2/ice-9/save-stack.scm +58 -0
- data/share/guile/2.2/ice-9/scm-style-repl.scm +279 -0
- data/share/guile/2.2/ice-9/serialize.scm +114 -0
- data/share/guile/2.2/ice-9/session.scm +530 -0
- data/share/guile/2.2/ice-9/slib.scm +33 -0
- data/share/guile/2.2/ice-9/stack-catch.scm +47 -0
- data/share/guile/2.2/ice-9/streams.scm +168 -0
- data/share/guile/2.2/ice-9/string-fun.scm +280 -0
- data/share/guile/2.2/ice-9/suspendable-ports.scm +788 -0
- data/share/guile/2.2/ice-9/syncase.scm +37 -0
- data/share/guile/2.2/ice-9/textual-ports.scm +70 -0
- data/share/guile/2.2/ice-9/threads.scm +392 -0
- data/share/guile/2.2/ice-9/time.scm +58 -0
- data/share/guile/2.2/ice-9/top-repl.scm +78 -0
- data/share/guile/2.2/ice-9/unicode.scm +26 -0
- data/share/guile/2.2/ice-9/vlist.scm +595 -0
- data/share/guile/2.2/ice-9/weak-vector.scm +31 -0
- data/share/guile/2.2/language/brainfuck/compile-scheme.scm +123 -0
- data/share/guile/2.2/language/brainfuck/compile-tree-il.scm +184 -0
- data/share/guile/2.2/language/brainfuck/parse.scm +95 -0
- data/share/guile/2.2/language/brainfuck/spec.scm +43 -0
- data/share/guile/2.2/language/bytecode/spec.scm +42 -0
- data/share/guile/2.2/language/bytecode.scm +104 -0
- data/share/guile/2.2/language/cps/closure-conversion.scm +848 -0
- data/share/guile/2.2/language/cps/compile-bytecode.scm +610 -0
- data/share/guile/2.2/language/cps/constructors.scm +106 -0
- data/share/guile/2.2/language/cps/contification.scm +448 -0
- data/share/guile/2.2/language/cps/cse.scm +414 -0
- data/share/guile/2.2/language/cps/dce.scm +363 -0
- data/share/guile/2.2/language/cps/effects-analysis.scm +597 -0
- data/share/guile/2.2/language/cps/elide-values.scm +88 -0
- data/share/guile/2.2/language/cps/handle-interrupts.scm +69 -0
- data/share/guile/2.2/language/cps/intmap.scm +765 -0
- data/share/guile/2.2/language/cps/intset.scm +830 -0
- data/share/guile/2.2/language/cps/licm.scm +308 -0
- data/share/guile/2.2/language/cps/optimize.scm +135 -0
- data/share/guile/2.2/language/cps/peel-loops.scm +287 -0
- data/share/guile/2.2/language/cps/primitives.scm +141 -0
- data/share/guile/2.2/language/cps/prune-bailouts.scm +86 -0
- data/share/guile/2.2/language/cps/prune-top-level-scopes.scm +63 -0
- data/share/guile/2.2/language/cps/reify-primitives.scm +179 -0
- data/share/guile/2.2/language/cps/renumber.scm +217 -0
- data/share/guile/2.2/language/cps/rotate-loops.scm +239 -0
- data/share/guile/2.2/language/cps/self-references.scm +79 -0
- data/share/guile/2.2/language/cps/simplify.scm +274 -0
- data/share/guile/2.2/language/cps/slot-allocation.scm +1058 -0
- data/share/guile/2.2/language/cps/spec.scm +51 -0
- data/share/guile/2.2/language/cps/specialize-numbers.scm +724 -0
- data/share/guile/2.2/language/cps/specialize-primcalls.scm +87 -0
- data/share/guile/2.2/language/cps/split-rec.scm +174 -0
- data/share/guile/2.2/language/cps/type-checks.scm +72 -0
- data/share/guile/2.2/language/cps/type-fold.scm +455 -0
- data/share/guile/2.2/language/cps/types.scm +1826 -0
- data/share/guile/2.2/language/cps/utils.scm +550 -0
- data/share/guile/2.2/language/cps/verify.scm +304 -0
- data/share/guile/2.2/language/cps/with-cps.scm +145 -0
- data/share/guile/2.2/language/cps.scm +358 -0
- data/share/guile/2.2/language/ecmascript/array.scm +121 -0
- data/share/guile/2.2/language/ecmascript/base.scm +251 -0
- data/share/guile/2.2/language/ecmascript/compile-tree-il.scm +576 -0
- data/share/guile/2.2/language/ecmascript/function.scm +78 -0
- data/share/guile/2.2/language/ecmascript/impl.scm +169 -0
- data/share/guile/2.2/language/ecmascript/parse.scm +352 -0
- data/share/guile/2.2/language/ecmascript/spec.scm +37 -0
- data/share/guile/2.2/language/ecmascript/tokenize.scm +513 -0
- data/share/guile/2.2/language/elisp/bindings.scm +107 -0
- data/share/guile/2.2/language/elisp/boot.el +617 -0
- data/share/guile/2.2/language/elisp/compile-tree-il.scm +812 -0
- data/share/guile/2.2/language/elisp/falias.scm +47 -0
- data/share/guile/2.2/language/elisp/lexer.scm +430 -0
- data/share/guile/2.2/language/elisp/parser.scm +222 -0
- data/share/guile/2.2/language/elisp/runtime/function-slot.scm +63 -0
- data/share/guile/2.2/language/elisp/runtime/value-slot.scm +24 -0
- data/share/guile/2.2/language/elisp/runtime.scm +153 -0
- data/share/guile/2.2/language/elisp/spec.scm +43 -0
- data/share/guile/2.2/language/scheme/compile-tree-il.scm +33 -0
- data/share/guile/2.2/language/scheme/decompile-tree-il.scm +796 -0
- data/share/guile/2.2/language/scheme/spec.scm +63 -0
- data/share/guile/2.2/language/tree-il/analyze.scm +1568 -0
- data/share/guile/2.2/language/tree-il/canonicalize.scm +82 -0
- data/share/guile/2.2/language/tree-il/compile-cps.scm +1149 -0
- data/share/guile/2.2/language/tree-il/debug.scm +246 -0
- data/share/guile/2.2/language/tree-il/effects.scm +591 -0
- data/share/guile/2.2/language/tree-il/fix-letrec.scm +314 -0
- data/share/guile/2.2/language/tree-il/optimize.scm +43 -0
- data/share/guile/2.2/language/tree-il/peval.scm +1669 -0
- data/share/guile/2.2/language/tree-il/primitives.scm +630 -0
- data/share/guile/2.2/language/tree-il/spec.scm +46 -0
- data/share/guile/2.2/language/tree-il.scm +630 -0
- data/share/guile/2.2/language/value/spec.scm +30 -0
- data/share/guile/2.2/oop/goops/accessors.scm +72 -0
- data/share/guile/2.2/oop/goops/active-slot.scm +63 -0
- data/share/guile/2.2/oop/goops/composite-slot.scm +83 -0
- data/share/guile/2.2/oop/goops/describe.scm +189 -0
- data/share/guile/2.2/oop/goops/internal.scm +30 -0
- data/share/guile/2.2/oop/goops/save.scm +874 -0
- data/share/guile/2.2/oop/goops/simple.scm +30 -0
- data/share/guile/2.2/oop/goops/stklos.scm +74 -0
- data/share/guile/2.2/oop/goops.scm +3176 -0
- data/share/guile/2.2/rnrs/arithmetic/bitwise.scm +92 -0
- data/share/guile/2.2/rnrs/arithmetic/fixnums.scm +291 -0
- data/share/guile/2.2/rnrs/arithmetic/flonums.scm +203 -0
- data/share/guile/2.2/rnrs/base.scm +291 -0
- data/share/guile/2.2/rnrs/bytevectors.scm +83 -0
- data/share/guile/2.2/rnrs/conditions.scm +225 -0
- data/share/guile/2.2/rnrs/control.scm +22 -0
- data/share/guile/2.2/rnrs/enums.scm +152 -0
- data/share/guile/2.2/rnrs/eval.scm +39 -0
- data/share/guile/2.2/rnrs/exceptions.scm +276 -0
- data/share/guile/2.2/rnrs/files.scm +96 -0
- data/share/guile/2.2/rnrs/hashtables.scm +190 -0
- data/share/guile/2.2/rnrs/io/ports.scm +554 -0
- data/share/guile/2.2/rnrs/io/simple.scm +167 -0
- data/share/guile/2.2/rnrs/lists.scm +55 -0
- data/share/guile/2.2/rnrs/mutable-pairs.scm +23 -0
- data/share/guile/2.2/rnrs/mutable-strings.scm +23 -0
- data/share/guile/2.2/rnrs/programs.scm +22 -0
- data/share/guile/2.2/rnrs/r5rs.scm +34 -0
- data/share/guile/2.2/rnrs/records/inspection.scm +81 -0
- data/share/guile/2.2/rnrs/records/procedural.scm +289 -0
- data/share/guile/2.2/rnrs/records/syntactic.scm +248 -0
- data/share/guile/2.2/rnrs/sorting.scm +27 -0
- data/share/guile/2.2/rnrs/syntax-case.scm +68 -0
- data/share/guile/2.2/rnrs/unicode.scm +104 -0
- data/share/guile/2.2/rnrs.scm +289 -0
- data/share/guile/2.2/scripts/api-diff.scm +179 -0
- data/share/guile/2.2/scripts/autofrisk.scm +218 -0
- data/share/guile/2.2/scripts/compile.scm +273 -0
- data/share/guile/2.2/scripts/disassemble.scm +38 -0
- data/share/guile/2.2/scripts/display-commentary.scm +67 -0
- data/share/guile/2.2/scripts/doc-snarf.scm +439 -0
- data/share/guile/2.2/scripts/frisk.scm +290 -0
- data/share/guile/2.2/scripts/generate-autoload.scm +144 -0
- data/share/guile/2.2/scripts/help.scm +188 -0
- data/share/guile/2.2/scripts/lint.scm +318 -0
- data/share/guile/2.2/scripts/list.scm +91 -0
- data/share/guile/2.2/scripts/punify.scm +87 -0
- data/share/guile/2.2/scripts/read-rfc822.scm +131 -0
- data/share/guile/2.2/scripts/read-scheme-source.scm +282 -0
- data/share/guile/2.2/scripts/read-text-outline.scm +253 -0
- data/share/guile/2.2/scripts/scan-api.scm +223 -0
- data/share/guile/2.2/scripts/snarf-check-and-output-texi.scm +303 -0
- data/share/guile/2.2/scripts/snarf-guile-m4-docs.scm +86 -0
- data/share/guile/2.2/scripts/summarize-guile-TODO.scm +213 -0
- data/share/guile/2.2/scripts/use2dot.scm +110 -0
- data/share/guile/2.2/srfi/srfi-1.scm +1061 -0
- data/share/guile/2.2/srfi/srfi-10.scm +89 -0
- data/share/guile/2.2/srfi/srfi-11.scm +146 -0
- data/share/guile/2.2/srfi/srfi-111.scm +37 -0
- data/share/guile/2.2/srfi/srfi-13.scm +132 -0
- data/share/guile/2.2/srfi/srfi-14.scm +99 -0
- data/share/guile/2.2/srfi/srfi-16.scm +51 -0
- data/share/guile/2.2/srfi/srfi-17.scm +174 -0
- data/share/guile/2.2/srfi/srfi-18.scm +382 -0
- data/share/guile/2.2/srfi/srfi-19.scm +1470 -0
- data/share/guile/2.2/srfi/srfi-2.scm +31 -0
- data/share/guile/2.2/srfi/srfi-26.scm +66 -0
- data/share/guile/2.2/srfi/srfi-27.scm +96 -0
- data/share/guile/2.2/srfi/srfi-28.scm +34 -0
- data/share/guile/2.2/srfi/srfi-31.scm +35 -0
- data/share/guile/2.2/srfi/srfi-34.scm +84 -0
- data/share/guile/2.2/srfi/srfi-35.scm +351 -0
- data/share/guile/2.2/srfi/srfi-37.scm +234 -0
- data/share/guile/2.2/srfi/srfi-38.scm +207 -0
- data/share/guile/2.2/srfi/srfi-39.scm +55 -0
- data/share/guile/2.2/srfi/srfi-4/gnu.scm +80 -0
- data/share/guile/2.2/srfi/srfi-4.scm +118 -0
- data/share/guile/2.2/srfi/srfi-41.scm +505 -0
- data/share/guile/2.2/srfi/srfi-42/ec.scm +1053 -0
- data/share/guile/2.2/srfi/srfi-42.scm +66 -0
- data/share/guile/2.2/srfi/srfi-43.scm +1077 -0
- data/share/guile/2.2/srfi/srfi-45.scm +93 -0
- data/share/guile/2.2/srfi/srfi-6.scm +29 -0
- data/share/guile/2.2/srfi/srfi-60.scm +73 -0
- data/share/guile/2.2/srfi/srfi-64/testing.scm +1040 -0
- data/share/guile/2.2/srfi/srfi-64.scm +55 -0
- data/share/guile/2.2/srfi/srfi-67/compare.scm +686 -0
- data/share/guile/2.2/srfi/srfi-67.scm +88 -0
- data/share/guile/2.2/srfi/srfi-69.scm +336 -0
- data/share/guile/2.2/srfi/srfi-71.scm +267 -0
- data/share/guile/2.2/srfi/srfi-8.scm +31 -0
- data/share/guile/2.2/srfi/srfi-88.scm +53 -0
- data/share/guile/2.2/srfi/srfi-9/gnu.scm +168 -0
- data/share/guile/2.2/srfi/srfi-9.scm +351 -0
- data/share/guile/2.2/srfi/srfi-98.scm +44 -0
- data/share/guile/2.2/statprof.scm +988 -0
- data/share/guile/2.2/sxml/apply-templates.scm +102 -0
- data/share/guile/2.2/sxml/fold.scm +250 -0
- data/share/guile/2.2/sxml/match.scm +75 -0
- data/share/guile/2.2/sxml/simple.scm +408 -0
- data/share/guile/2.2/sxml/ssax/input-parse.scm +180 -0
- data/share/guile/2.2/sxml/ssax.scm +265 -0
- data/share/guile/2.2/sxml/sxml-match.ss +1181 -0
- data/share/guile/2.2/sxml/transform.scm +298 -0
- data/share/guile/2.2/sxml/upstream/SSAX.scm +3235 -0
- data/share/guile/2.2/sxml/upstream/SXML-tree-trans.scm +249 -0
- data/share/guile/2.2/sxml/upstream/SXPath-old.scm +1216 -0
- data/share/guile/2.2/sxml/upstream/assert.scm +35 -0
- data/share/guile/2.2/sxml/upstream/input-parse.scm +326 -0
- data/share/guile/2.2/sxml/xpath.scm +493 -0
- data/share/guile/2.2/system/base/ck.scm +55 -0
- data/share/guile/2.2/system/base/compile.scm +282 -0
- data/share/guile/2.2/system/base/lalr.scm +51 -0
- data/share/guile/2.2/system/base/lalr.upstream.scm +2096 -0
- data/share/guile/2.2/system/base/language.scm +119 -0
- data/share/guile/2.2/system/base/message.scm +238 -0
- data/share/guile/2.2/system/base/pmatch.scm +68 -0
- data/share/guile/2.2/system/base/syntax.scm +299 -0
- data/share/guile/2.2/system/base/target.scm +152 -0
- data/share/guile/2.2/system/base/types.scm +561 -0
- data/share/guile/2.2/system/foreign-object.scm +91 -0
- data/share/guile/2.2/system/foreign.scm +200 -0
- data/share/guile/2.2/system/repl/command.scm +946 -0
- data/share/guile/2.2/system/repl/common.scm +263 -0
- data/share/guile/2.2/system/repl/coop-server.scm +200 -0
- data/share/guile/2.2/system/repl/debug.scm +210 -0
- data/share/guile/2.2/system/repl/describe.scm +347 -0
- data/share/guile/2.2/system/repl/error-handling.scm +183 -0
- data/share/guile/2.2/system/repl/repl.scm +233 -0
- data/share/guile/2.2/system/repl/server.scm +332 -0
- data/share/guile/2.2/system/syntax.scm +33 -0
- data/share/guile/2.2/system/vm/assembler.scm +2614 -0
- data/share/guile/2.2/system/vm/coverage.scm +351 -0
- data/share/guile/2.2/system/vm/debug.scm +766 -0
- data/share/guile/2.2/system/vm/disassembler.scm +658 -0
- data/share/guile/2.2/system/vm/dwarf.scm +1852 -0
- data/share/guile/2.2/system/vm/elf.scm +1042 -0
- data/share/guile/2.2/system/vm/frame.scm +485 -0
- data/share/guile/2.2/system/vm/inspect.scm +188 -0
- data/share/guile/2.2/system/vm/linker.scm +732 -0
- data/share/guile/2.2/system/vm/loader.scm +27 -0
- data/share/guile/2.2/system/vm/program.scm +312 -0
- data/share/guile/2.2/system/vm/trace.scm +121 -0
- data/share/guile/2.2/system/vm/trap-state.scm +302 -0
- data/share/guile/2.2/system/vm/traps.scm +608 -0
- data/share/guile/2.2/system/vm/vm.scm +32 -0
- data/share/guile/2.2/system/xref.scm +369 -0
- data/share/guile/2.2/texinfo/docbook.scm +240 -0
- data/share/guile/2.2/texinfo/html.scm +279 -0
- data/share/guile/2.2/texinfo/indexing.scm +75 -0
- data/share/guile/2.2/texinfo/plain-text.scm +322 -0
- data/share/guile/2.2/texinfo/reflection.scm +585 -0
- data/share/guile/2.2/texinfo/serialize.scm +300 -0
- data/share/guile/2.2/texinfo/string-utils.scm +410 -0
- data/share/guile/2.2/texinfo.scm +1263 -0
- data/share/guile/2.2/web/client.scm +513 -0
- data/share/guile/2.2/web/http.scm +2043 -0
- data/share/guile/2.2/web/request.scm +326 -0
- data/share/guile/2.2/web/response.scm +379 -0
- data/share/guile/2.2/web/server/http.scm +183 -0
- data/share/guile/2.2/web/server.scm +397 -0
- data/share/guile/2.2/web/uri.scm +552 -0
- data/share/lilypond/2.24.1/fontconfig/0bd3dc0958fa2205aaaa8ebb13e2872b-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/188ac73a183f12857f63bb60a4a6d603-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/32b6488e5b8292a2e95c79d947e009e8-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/3830d5c3ddfd5cd38a049b759396e72e-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/3f7329c5293ffd510edef78f73874cfd-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/4c599c202bc5c08e2d34565a40eac3b2-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/57e423e26b20ab21d0f2f29c145174c3-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/826f6b6ef79022e2eac8af26bf4b62f2-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/945677eb7aeaf62f1d50efc3fb3ec7d8-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/95530828ff6c81d309f8258d8d02a23e-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/CACHEDIR.TAG +4 -0
- data/share/lilypond/2.24.1/fontconfig/bf3b770c553c462765856025a94f1ce6-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/c855463f699352c367813e37f3f70ea7-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/d3e5c4ee2ceb1fc347f91d4cefc53bc0-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/d589a48862398ed80a3d6066f4f56f4c-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/d82eb4fd963d448e2fcb7d7b793b5df3-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/e13b20fdb08344e0e664864cc2ede53d-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/e52a45a1c8c8fe895fc0fc8c4e6999b8-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/f1f2465696798768e9653f19e17ccdc8-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fonts/00-lilypond-fonts.conf +99 -0
- data/share/lilypond/2.24.1/fonts/99-lilypond-fonts.conf +28 -0
- data/share/lilypond/2.24.1/fonts/otf/C059-BdIta.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/C059-Bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/C059-Italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/C059-Roman.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusMonoPS-Bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusMonoPS-BoldItalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusMonoPS-Italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusMonoPS-Regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusSans-Bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusSans-BoldItalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusSans-Italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusSans-Regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-11.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-13.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-14.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-16.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-18.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-20.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-23.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-26.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-brace.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyrecursor-bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyrecursor-bolditalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyrecursor-italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyrecursor-regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreheros-bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreheros-bolditalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreheros-italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreheros-regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreschola-bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreschola-bolditalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreschola-italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreschola-regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/source/common-modules-and-initialization.mf +26 -0
- data/share/lilypond/2.24.1/fonts/source/debugging-settings.mf +14 -0
- data/share/lilypond/2.24.1/fonts/source/declare-autometric-parameters.mf +9 -0
- data/share/lilypond/2.24.1/fonts/source/feta-accidentals.mf +58 -0
- data/share/lilypond/2.24.1/fonts/source/feta-accordion.mf +575 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet-generic.mf +16 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-arrow.mf +114 -0
- data/share/lilypond/2.24.1/fonts/source/feta-arrowheads.mf +171 -0
- data/share/lilypond/2.24.1/fonts/source/feta-autometric.mf +303 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-a.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-b.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-c.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-d.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-e.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-f.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-g.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-generic.mf +47 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-h.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-i.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces.mf +125 -0
- data/share/lilypond/2.24.1/fonts/source/feta-brackettips.mf +100 -0
- data/share/lilypond/2.24.1/fonts/source/feta-clefs.mf +963 -0
- data/share/lilypond/2.24.1/fonts/source/feta-dots.mf +37 -0
- data/share/lilypond/2.24.1/fonts/source/feta-dynamics.mf +891 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags-generic.mf +17 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags.mf +926 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flats.mf +668 -0
- data/share/lilypond/2.24.1/fonts/source/feta-macros.mf +506 -0
- data/share/lilypond/2.24.1/fonts/source/feta-naturals.mf +223 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads-generic.mf +17 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads.mf +2642 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-numbers.mf +1677 -0
- data/share/lilypond/2.24.1/fonts/source/feta-other-generic.mf +27 -0
- data/share/lilypond/2.24.1/fonts/source/feta-params.mf +323 -0
- data/share/lilypond/2.24.1/fonts/source/feta-parenthesis.mf +63 -0
- data/share/lilypond/2.24.1/fonts/source/feta-pedals.mf +355 -0
- data/share/lilypond/2.24.1/fonts/source/feta-rests.mf +890 -0
- data/share/lilypond/2.24.1/fonts/source/feta-scripts.mf +2206 -0
- data/share/lilypond/2.24.1/fonts/source/feta-sharps.mf +524 -0
- data/share/lilypond/2.24.1/fonts/source/feta-sori-koron.mf +325 -0
- data/share/lilypond/2.24.1/fonts/source/feta-ties.mf +72 -0
- data/share/lilypond/2.24.1/fonts/source/feta-timesignatures.mf +119 -0
- data/share/lilypond/2.24.1/fonts/source/feta-trills.mf +321 -0
- data/share/lilypond/2.24.1/fonts/source/feta11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta20.mf +7 -0
- data/share/lilypond/2.24.1/fonts/source/feta23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-accidentals.mf +483 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-clefs.mf +1636 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-custodes.mf +503 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-dots.mf +62 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-flags.mf +319 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-macros.mf +225 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads-generic.mf +16 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads.mf +2191 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-other-generic.mf +24 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-rests.mf +428 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-scripts.mf +284 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-timesignatures.mf +402 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-11.svg +2525 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-11.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-13.svg +2530 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-13.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-14.svg +2526 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-14.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-16.svg +2523 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-16.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-18.svg +2519 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-18.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-20.svg +2512 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-20.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-23.svg +2506 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-23.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-26.svg +2510 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-26.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-brace.svg +1757 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-brace.woff +0 -0
- data/share/lilypond/2.24.1/ly/Welcome_to_LilyPond.ly +45 -0
- data/share/lilypond/2.24.1/ly/arabic.ly +185 -0
- data/share/lilypond/2.24.1/ly/articulate.ly +1013 -0
- data/share/lilypond/2.24.1/ly/bagpipe.ly +368 -0
- data/share/lilypond/2.24.1/ly/base-tkit.ly +135 -0
- data/share/lilypond/2.24.1/ly/catalan.ly +23 -0
- data/share/lilypond/2.24.1/ly/chord-modifiers-init.ly +63 -0
- data/share/lilypond/2.24.1/ly/chord-repetition-init.ly +60 -0
- data/share/lilypond/2.24.1/ly/context-mods-init.ly +119 -0
- data/share/lilypond/2.24.1/ly/declarations-init.ly +167 -0
- data/share/lilypond/2.24.1/ly/deutsch.ly +23 -0
- data/share/lilypond/2.24.1/ly/drumpitch-init.ly +366 -0
- data/share/lilypond/2.24.1/ly/dynamic-scripts-init.ly +54 -0
- data/share/lilypond/2.24.1/ly/english.ly +23 -0
- data/share/lilypond/2.24.1/ly/engraver-init.ly +1619 -0
- data/share/lilypond/2.24.1/ly/espanol.ly +23 -0
- data/share/lilypond/2.24.1/ly/event-listener.ly +241 -0
- data/share/lilypond/2.24.1/ly/festival.ly +38 -0
- data/share/lilypond/2.24.1/ly/generate-documentation.ly +7 -0
- data/share/lilypond/2.24.1/ly/grace-init.ly +56 -0
- data/share/lilypond/2.24.1/ly/graphviz-init.ly +174 -0
- data/share/lilypond/2.24.1/ly/gregorian.ly +268 -0
- data/share/lilypond/2.24.1/ly/guile-debugger.ly +55 -0
- data/share/lilypond/2.24.1/ly/hel-arabic.ly +307 -0
- data/share/lilypond/2.24.1/ly/init.ly +96 -0
- data/share/lilypond/2.24.1/ly/italiano.ly +23 -0
- data/share/lilypond/2.24.1/ly/lilypond-book-preamble.ly +47 -0
- data/share/lilypond/2.24.1/ly/lyrics-tkit.ly +68 -0
- data/share/lilypond/2.24.1/ly/makam.ly +166 -0
- data/share/lilypond/2.24.1/ly/midi-init.ly +59 -0
- data/share/lilypond/2.24.1/ly/music-functions-init.ly +2254 -0
- data/share/lilypond/2.24.1/ly/nederlands.ly +23 -0
- data/share/lilypond/2.24.1/ly/norsk.ly +23 -0
- data/share/lilypond/2.24.1/ly/paper-defaults-init.ly +188 -0
- data/share/lilypond/2.24.1/ly/performer-init.ly +398 -0
- data/share/lilypond/2.24.1/ly/persian.ly +335 -0
- data/share/lilypond/2.24.1/ly/piano-tkit.ly +61 -0
- data/share/lilypond/2.24.1/ly/portugues.ly +23 -0
- data/share/lilypond/2.24.1/ly/predefined-fretboards-init.ly +78 -0
- data/share/lilypond/2.24.1/ly/predefined-guitar-fretboards.ly +506 -0
- data/share/lilypond/2.24.1/ly/predefined-guitar-ninth-fretboards.ly +75 -0
- data/share/lilypond/2.24.1/ly/predefined-mandolin-fretboards.ly +876 -0
- data/share/lilypond/2.24.1/ly/predefined-ukulele-fretboards.ly +1285 -0
- data/share/lilypond/2.24.1/ly/property-init.ly +858 -0
- data/share/lilypond/2.24.1/ly/satb.ly +214 -0
- data/share/lilypond/2.24.1/ly/scale-definitions-init.ly +117 -0
- data/share/lilypond/2.24.1/ly/scheme-sandbox.ly +39 -0
- data/share/lilypond/2.24.1/ly/script-init.ly +94 -0
- data/share/lilypond/2.24.1/ly/spanners-init.ly +146 -0
- data/share/lilypond/2.24.1/ly/ssaattbb.ly +335 -0
- data/share/lilypond/2.24.1/ly/staff-tkit.ly +182 -0
- data/share/lilypond/2.24.1/ly/string-tunings-init.ly +94 -0
- data/share/lilypond/2.24.1/ly/suomi.ly +23 -0
- data/share/lilypond/2.24.1/ly/svenska.ly +23 -0
- data/share/lilypond/2.24.1/ly/swing.ly +362 -0
- data/share/lilypond/2.24.1/ly/text-replacements.ly +150 -0
- data/share/lilypond/2.24.1/ly/titling-init.ly +150 -0
- data/share/lilypond/2.24.1/ly/toc-init.ly +182 -0
- data/share/lilypond/2.24.1/ly/turkish-makam.ly +609 -0
- data/share/lilypond/2.24.1/ly/vlaams.ly +23 -0
- data/share/lilypond/2.24.1/ly/vocal-tkit.ly +103 -0
- data/share/lilypond/2.24.1/ly/voice-tkit.ly +34 -0
- data/share/lilypond/2.24.1/ps/encodingdefs.ps +2611 -0
- data/share/lilypond/2.24.1/ps/lilyponddefs.ps +49 -0
- data/share/lilypond/2.24.1/ps/music-drawing-routines.ps +329 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_base.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_docbook.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_html.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_latex.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_snippets.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_texinfo.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/convertrules.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/langdefs.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/lilylib.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/midi.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/musicexp.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/musicxml.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/musicxml2ly_conversion.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/utilities.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/book_base.py +331 -0
- data/share/lilypond/2.24.1/python/book_docbook.py +154 -0
- data/share/lilypond/2.24.1/python/book_html.py +178 -0
- data/share/lilypond/2.24.1/python/book_latex.py +373 -0
- data/share/lilypond/2.24.1/python/book_snippets.py +1052 -0
- data/share/lilypond/2.24.1/python/book_texinfo.py +437 -0
- data/share/lilypond/2.24.1/python/convertrules.py +4764 -0
- data/share/lilypond/2.24.1/python/langdefs.py +131 -0
- data/share/lilypond/2.24.1/python/lilylib.py +141 -0
- data/share/lilypond/2.24.1/python/midi.py +212 -0
- data/share/lilypond/2.24.1/python/musicexp.py +2781 -0
- data/share/lilypond/2.24.1/python/musicxml.py +1905 -0
- data/share/lilypond/2.24.1/python/musicxml2ly_conversion.py +80 -0
- data/share/lilypond/2.24.1/python/utilities.py +280 -0
- data/share/lilypond/2.24.1/scm/lily/accreg.scm +579 -0
- data/share/lilypond/2.24.1/scm/lily/auto-beam.scm +163 -0
- data/share/lilypond/2.24.1/scm/lily/autochange.scm +100 -0
- data/share/lilypond/2.24.1/scm/lily/backend-library.scm +593 -0
- data/share/lilypond/2.24.1/scm/lily/bar-line.scm +1281 -0
- data/share/lilypond/2.24.1/scm/lily/breath.scm +74 -0
- data/share/lilypond/2.24.1/scm/lily/c++.scm +174 -0
- data/share/lilypond/2.24.1/scm/lily/chord-entry.scm +278 -0
- data/share/lilypond/2.24.1/scm/lily/chord-ignatzek-names.scm +304 -0
- data/share/lilypond/2.24.1/scm/lily/chord-name.scm +217 -0
- data/share/lilypond/2.24.1/scm/lily/clip-region.scm +87 -0
- data/share/lilypond/2.24.1/scm/lily/color.scm +757 -0
- data/share/lilypond/2.24.1/scm/lily/curried-definitions.scm +68 -0
- data/share/lilypond/2.24.1/scm/lily/define-context-properties.scm +939 -0
- data/share/lilypond/2.24.1/scm/lily/define-event-classes.scm +142 -0
- data/share/lilypond/2.24.1/scm/lily/define-grob-interfaces.scm +640 -0
- data/share/lilypond/2.24.1/scm/lily/define-grob-properties.scm +1647 -0
- data/share/lilypond/2.24.1/scm/lily/define-grobs.scm +4027 -0
- data/share/lilypond/2.24.1/scm/lily/define-markup-commands.scm +5737 -0
- data/share/lilypond/2.24.1/scm/lily/define-music-callbacks.scm +257 -0
- data/share/lilypond/2.24.1/scm/lily/define-music-display-methods.scm +1350 -0
- data/share/lilypond/2.24.1/scm/lily/define-music-properties.scm +242 -0
- data/share/lilypond/2.24.1/scm/lily/define-music-types.scm +983 -0
- data/share/lilypond/2.24.1/scm/lily/define-note-names.scm +1421 -0
- data/share/lilypond/2.24.1/scm/lily/define-stencil-commands.scm +71 -0
- data/share/lilypond/2.24.1/scm/lily/define-woodwind-diagrams.scm +1215 -0
- data/share/lilypond/2.24.1/scm/lily/display-lily.scm +315 -0
- data/share/lilypond/2.24.1/scm/lily/display-woodwind-diagrams.scm +1985 -0
- data/share/lilypond/2.24.1/scm/lily/document-backend.scm +307 -0
- data/share/lilypond/2.24.1/scm/lily/document-context-mods.scm +98 -0
- data/share/lilypond/2.24.1/scm/lily/document-functions.scm +169 -0
- data/share/lilypond/2.24.1/scm/lily/document-identifiers.scm +76 -0
- data/share/lilypond/2.24.1/scm/lily/document-markup.scm +158 -0
- data/share/lilypond/2.24.1/scm/lily/document-music.scm +146 -0
- data/share/lilypond/2.24.1/scm/lily/document-outside-staff-priorities.scm +40 -0
- data/share/lilypond/2.24.1/scm/lily/document-paper-sizes.scm +71 -0
- data/share/lilypond/2.24.1/scm/lily/document-translation.scm +318 -0
- data/share/lilypond/2.24.1/scm/lily/document-type-predicates.scm +85 -0
- data/share/lilypond/2.24.1/scm/lily/documentation-generate.scm +259 -0
- data/share/lilypond/2.24.1/scm/lily/documentation-lib.scm +207 -0
- data/share/lilypond/2.24.1/scm/lily/file-cache.scm +28 -0
- data/share/lilypond/2.24.1/scm/lily/flag-styles.scm +249 -0
- data/share/lilypond/2.24.1/scm/lily/font-encodings.scm +1242 -0
- data/share/lilypond/2.24.1/scm/lily/font.scm +303 -0
- data/share/lilypond/2.24.1/scm/lily/framework-cairo.scm +26 -0
- data/share/lilypond/2.24.1/scm/lily/framework-ps.scm +896 -0
- data/share/lilypond/2.24.1/scm/lily/framework-svg.scm +172 -0
- data/share/lilypond/2.24.1/scm/lily/fret-diagrams.scm +1261 -0
- data/share/lilypond/2.24.1/scm/lily/graphviz.scm +78 -0
- data/share/lilypond/2.24.1/scm/lily/guile-debugger.scm +90 -0
- data/share/lilypond/2.24.1/scm/lily/harp-pedals.scm +172 -0
- data/share/lilypond/2.24.1/scm/lily/hyphenate-internal-words.scm +51 -0
- data/share/lilypond/2.24.1/scm/lily/layout-beam.scm +73 -0
- data/share/lilypond/2.24.1/scm/lily/layout-slur.scm +45 -0
- data/share/lilypond/2.24.1/scm/lily/lily-library.scm +1446 -0
- data/share/lilypond/2.24.1/scm/lily/lily-sort.scm +116 -0
- data/share/lilypond/2.24.1/scm/lily/lily.scm +929 -0
- data/share/lilypond/2.24.1/scm/lily/ly-syntax-constructors.scm +374 -0
- data/share/lilypond/2.24.1/scm/lily/markup-macros.scm +493 -0
- data/share/lilypond/2.24.1/scm/lily/markup.scm +126 -0
- data/share/lilypond/2.24.1/scm/lily/midi.scm +258 -0
- data/share/lilypond/2.24.1/scm/lily/modal-transforms.scm +337 -0
- data/share/lilypond/2.24.1/scm/lily/music-functions.scm +2878 -0
- data/share/lilypond/2.24.1/scm/lily/output-lib.scm +3377 -0
- data/share/lilypond/2.24.1/scm/lily/output-ps.scm +335 -0
- data/share/lilypond/2.24.1/scm/lily/output-svg.scm +684 -0
- data/share/lilypond/2.24.1/scm/lily/page.scm +321 -0
- data/share/lilypond/2.24.1/scm/lily/paper-system.scm +271 -0
- data/share/lilypond/2.24.1/scm/lily/paper.scm +376 -0
- data/share/lilypond/2.24.1/scm/lily/parser-clef.scm +205 -0
- data/share/lilypond/2.24.1/scm/lily/parser-ly-from-scheme.scm +170 -0
- data/share/lilypond/2.24.1/scm/lily/part-combiner.scm +998 -0
- data/share/lilypond/2.24.1/scm/lily/predefined-fretboards.scm +54 -0
- data/share/lilypond/2.24.1/scm/lily/ps-to-png.scm +182 -0
- data/share/lilypond/2.24.1/scm/lily/scheme-engravers.scm +1813 -0
- data/share/lilypond/2.24.1/scm/lily/scheme-performers.scm +126 -0
- data/share/lilypond/2.24.1/scm/lily/script.scm +416 -0
- data/share/lilypond/2.24.1/scm/lily/skyline.scm +25 -0
- data/share/lilypond/2.24.1/scm/lily/song-util.scm +191 -0
- data/share/lilypond/2.24.1/scm/lily/song.scm +853 -0
- data/share/lilypond/2.24.1/scm/lily/stencil.scm +998 -0
- data/share/lilypond/2.24.1/scm/lily/tablature.scm +392 -0
- data/share/lilypond/2.24.1/scm/lily/time-signature-settings.scm +473 -0
- data/share/lilypond/2.24.1/scm/lily/time-signature.scm +35 -0
- data/share/lilypond/2.24.1/scm/lily/titling.scm +99 -0
- data/share/lilypond/2.24.1/scm/lily/to-xml.scm +254 -0
- data/share/lilypond/2.24.1/scm/lily/translation-functions.scm +1169 -0
- data/share/lilypond/2.24.1/vim/compiler/lilypond.vim +36 -0
- data/share/lilypond/2.24.1/vim/ftdetect/lilypond.vim +4 -0
- data/share/lilypond/2.24.1/vim/ftplugin/lilypond.vim +91 -0
- data/share/lilypond/2.24.1/vim/indent/lilypond.vim +79 -0
- data/share/lilypond/2.24.1/vim/syntax/lilypond-words +1408 -0
- data/share/lilypond/2.24.1/vim/syntax/lilypond-words.vim +3 -0
- data/share/lilypond/2.24.1/vim/syntax/lilypond.vim +104 -0
- data/share/locale/ca/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/cs/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/da/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/de/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/el/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/eo/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/es/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/fi/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/fr/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/it/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/ja/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/nl/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/ru/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/sv/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/tr/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/uk/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/vi/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/zh_CN/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/zh_TW/LC_MESSAGES/lilypond.mo +0 -0
- metadata +1108 -1
|
@@ -0,0 +1,1470 @@
|
|
|
1
|
+
;;; srfi-19.scm --- Time/Date Library
|
|
2
|
+
|
|
3
|
+
;; Copyright (C) 2001-2003, 2005-2011, 2014, 2016-2018
|
|
4
|
+
;; Free Software Foundation, Inc.
|
|
5
|
+
;;
|
|
6
|
+
;; This library is free software; you can redistribute it and/or
|
|
7
|
+
;; modify it under the terms of the GNU Lesser General Public
|
|
8
|
+
;; License as published by the Free Software Foundation; either
|
|
9
|
+
;; version 3 of the License, or (at your option) any later version.
|
|
10
|
+
;;
|
|
11
|
+
;; This library is distributed in the hope that it will be useful,
|
|
12
|
+
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14
|
+
;; Lesser General Public License for more details.
|
|
15
|
+
;;
|
|
16
|
+
;; You should have received a copy of the GNU Lesser General Public
|
|
17
|
+
;; License along with this library; if not, write to the Free Software
|
|
18
|
+
;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
19
|
+
|
|
20
|
+
;;; Author: Rob Browning <rlb@cs.utexas.edu>
|
|
21
|
+
;;; Originally from SRFI reference implementation by Will Fitzgerald.
|
|
22
|
+
|
|
23
|
+
;;; Commentary:
|
|
24
|
+
|
|
25
|
+
;; This module is fully documented in the Guile Reference Manual.
|
|
26
|
+
|
|
27
|
+
;;; Code:
|
|
28
|
+
|
|
29
|
+
;; FIXME: I haven't checked a decent amount of this code for potential
|
|
30
|
+
;; performance improvements, but I suspect that there may be some
|
|
31
|
+
;; substantial ones to be realized, esp. in the later "parsing" half
|
|
32
|
+
;; of the file, by rewriting the code with use of more Guile native
|
|
33
|
+
;; functions that do more work in a "chunk".
|
|
34
|
+
;;
|
|
35
|
+
;; FIXME: mkoeppe: Time zones are treated a little simplistic in
|
|
36
|
+
;; SRFI-19; they are only a numeric offset. Thus, printing time zones
|
|
37
|
+
;; (LOCALE-PRINT-TIME-ZONE) can't be implemented sensibly. The
|
|
38
|
+
;; functions taking an optional TZ-OFFSET should be extended to take a
|
|
39
|
+
;; symbolic time-zone (like "CET"); this string should be stored in
|
|
40
|
+
;; the DATE structure.
|
|
41
|
+
|
|
42
|
+
(define-module (srfi srfi-19)
|
|
43
|
+
#:use-module (srfi srfi-1)
|
|
44
|
+
#:use-module (srfi srfi-6)
|
|
45
|
+
#:use-module (srfi srfi-8)
|
|
46
|
+
#:use-module (srfi srfi-9)
|
|
47
|
+
#:autoload (ice-9 rdelim) (read-line)
|
|
48
|
+
#:use-module (ice-9 i18n)
|
|
49
|
+
#:replace (current-time)
|
|
50
|
+
#:export (;; Constants
|
|
51
|
+
time-duration
|
|
52
|
+
time-monotonic
|
|
53
|
+
time-process
|
|
54
|
+
time-tai
|
|
55
|
+
time-thread
|
|
56
|
+
time-utc
|
|
57
|
+
;; Current time and clock resolution
|
|
58
|
+
current-date
|
|
59
|
+
current-julian-day
|
|
60
|
+
current-modified-julian-day
|
|
61
|
+
time-resolution
|
|
62
|
+
;; Time object and accessors
|
|
63
|
+
make-time
|
|
64
|
+
time?
|
|
65
|
+
time-type
|
|
66
|
+
time-nanosecond
|
|
67
|
+
time-second
|
|
68
|
+
set-time-type!
|
|
69
|
+
set-time-nanosecond!
|
|
70
|
+
set-time-second!
|
|
71
|
+
copy-time
|
|
72
|
+
;; Time comparison procedures
|
|
73
|
+
time<=?
|
|
74
|
+
time<?
|
|
75
|
+
time=?
|
|
76
|
+
time>=?
|
|
77
|
+
time>?
|
|
78
|
+
;; Time arithmetic procedures
|
|
79
|
+
time-difference
|
|
80
|
+
time-difference!
|
|
81
|
+
add-duration
|
|
82
|
+
add-duration!
|
|
83
|
+
subtract-duration
|
|
84
|
+
subtract-duration!
|
|
85
|
+
;; Date object and accessors
|
|
86
|
+
make-date
|
|
87
|
+
date?
|
|
88
|
+
date-nanosecond
|
|
89
|
+
date-second
|
|
90
|
+
date-minute
|
|
91
|
+
date-hour
|
|
92
|
+
date-day
|
|
93
|
+
date-month
|
|
94
|
+
date-year
|
|
95
|
+
date-zone-offset
|
|
96
|
+
date-year-day
|
|
97
|
+
date-week-day
|
|
98
|
+
date-week-number
|
|
99
|
+
;; Time/Date/Julian Day/Modified Julian Day converters
|
|
100
|
+
date->julian-day
|
|
101
|
+
date->modified-julian-day
|
|
102
|
+
date->time-monotonic
|
|
103
|
+
date->time-tai
|
|
104
|
+
date->time-utc
|
|
105
|
+
julian-day->date
|
|
106
|
+
julian-day->time-monotonic
|
|
107
|
+
julian-day->time-tai
|
|
108
|
+
julian-day->time-utc
|
|
109
|
+
modified-julian-day->date
|
|
110
|
+
modified-julian-day->time-monotonic
|
|
111
|
+
modified-julian-day->time-tai
|
|
112
|
+
modified-julian-day->time-utc
|
|
113
|
+
time-monotonic->date
|
|
114
|
+
time-monotonic->julian-day
|
|
115
|
+
time-monotonic->modified-julian-day
|
|
116
|
+
time-monotonic->time-tai
|
|
117
|
+
time-monotonic->time-tai!
|
|
118
|
+
time-monotonic->time-utc
|
|
119
|
+
time-monotonic->time-utc!
|
|
120
|
+
time-tai->date
|
|
121
|
+
time-tai->julian-day
|
|
122
|
+
time-tai->modified-julian-day
|
|
123
|
+
time-tai->time-monotonic
|
|
124
|
+
time-tai->time-monotonic!
|
|
125
|
+
time-tai->time-utc
|
|
126
|
+
time-tai->time-utc!
|
|
127
|
+
time-utc->date
|
|
128
|
+
time-utc->julian-day
|
|
129
|
+
time-utc->modified-julian-day
|
|
130
|
+
time-utc->time-monotonic
|
|
131
|
+
time-utc->time-monotonic!
|
|
132
|
+
time-utc->time-tai
|
|
133
|
+
time-utc->time-tai!
|
|
134
|
+
;; Date to string/string to date converters.
|
|
135
|
+
date->string
|
|
136
|
+
string->date))
|
|
137
|
+
|
|
138
|
+
(cond-expand-provide (current-module) '(srfi-19))
|
|
139
|
+
|
|
140
|
+
(define time-tai 'time-tai)
|
|
141
|
+
(define time-utc 'time-utc)
|
|
142
|
+
(define time-monotonic 'time-monotonic)
|
|
143
|
+
(define time-thread 'time-thread)
|
|
144
|
+
(define time-process 'time-process)
|
|
145
|
+
(define time-duration 'time-duration)
|
|
146
|
+
|
|
147
|
+
;; FIXME: do we want to add gc time?
|
|
148
|
+
;; (define time-gc 'time-gc)
|
|
149
|
+
|
|
150
|
+
;;-- LOCALE dependent constants
|
|
151
|
+
|
|
152
|
+
;; See date->string
|
|
153
|
+
(define locale-date-time-format "~a ~b ~d ~H:~M:~S~z ~Y")
|
|
154
|
+
(define locale-short-date-format "~m/~d/~y")
|
|
155
|
+
(define locale-time-format "~H:~M:~S")
|
|
156
|
+
(define iso-8601-date-time-format "~Y-~m-~dT~H:~M:~S~z")
|
|
157
|
+
|
|
158
|
+
;;-- Miscellaneous Constants.
|
|
159
|
+
;;-- only the utc-epoch-in-jd might need changing if
|
|
160
|
+
;; a different epoch is used.
|
|
161
|
+
|
|
162
|
+
(define nano 1000000000) ; nanoseconds in a second
|
|
163
|
+
(define sid 86400) ; seconds in a day
|
|
164
|
+
(define sihd 43200) ; seconds in a half day
|
|
165
|
+
(define utc-epoch-in-jd 4881175/2) ; julian day number for 'the epoch'
|
|
166
|
+
|
|
167
|
+
;; FIXME: should this be something other than misc-error?
|
|
168
|
+
(define (time-error caller type value)
|
|
169
|
+
(if value
|
|
170
|
+
(throw 'misc-error caller "TIME-ERROR type ~A: ~S" (list type value) #f)
|
|
171
|
+
(throw 'misc-error caller "TIME-ERROR type ~A" (list type) #f)))
|
|
172
|
+
|
|
173
|
+
;; A table of leap seconds
|
|
174
|
+
;; See ftp://maia.usno.navy.mil/ser7/tai-utc.dat
|
|
175
|
+
;; and update as necessary.
|
|
176
|
+
;; this procedures reads the file in the above
|
|
177
|
+
;; format and creates the leap second table
|
|
178
|
+
;; it also calls the almost standard, but not R5 procedures read-line
|
|
179
|
+
;; & open-input-string
|
|
180
|
+
;; ie (set! leap-second-table (read-tai-utc-date "tai-utc.dat"))
|
|
181
|
+
|
|
182
|
+
(define (read-tai-utc-data filename)
|
|
183
|
+
(define (convert-jd jd)
|
|
184
|
+
(* (- (inexact->exact jd) utc-epoch-in-jd) sid))
|
|
185
|
+
(define (convert-sec sec)
|
|
186
|
+
(inexact->exact sec))
|
|
187
|
+
(let ((port (open-input-file filename))
|
|
188
|
+
(table '()))
|
|
189
|
+
(let loop ((line (read-line port)))
|
|
190
|
+
(if (not (eof-object? line))
|
|
191
|
+
(begin
|
|
192
|
+
(let* ((data (read (open-input-string
|
|
193
|
+
(string-append "(" line ")"))))
|
|
194
|
+
(year (car data))
|
|
195
|
+
(jd (cadddr (cdr data)))
|
|
196
|
+
(secs (cadddr (cdddr data))))
|
|
197
|
+
(if (>= year 1972)
|
|
198
|
+
(set! table (cons
|
|
199
|
+
(cons (convert-jd jd) (convert-sec secs))
|
|
200
|
+
table)))
|
|
201
|
+
(loop (read-line port))))))
|
|
202
|
+
table))
|
|
203
|
+
|
|
204
|
+
;; each entry is (tai seconds since epoch . # seconds to subtract for utc)
|
|
205
|
+
;; note they go higher to lower, and end in 1972.
|
|
206
|
+
(define leap-second-table
|
|
207
|
+
'((1483228800 . 37)
|
|
208
|
+
(1435708800 . 36)
|
|
209
|
+
(1341100800 . 35)
|
|
210
|
+
(1230768000 . 34)
|
|
211
|
+
(1136073600 . 33)
|
|
212
|
+
(915148800 . 32)
|
|
213
|
+
(867715200 . 31)
|
|
214
|
+
(820454400 . 30)
|
|
215
|
+
(773020800 . 29)
|
|
216
|
+
(741484800 . 28)
|
|
217
|
+
(709948800 . 27)
|
|
218
|
+
(662688000 . 26)
|
|
219
|
+
(631152000 . 25)
|
|
220
|
+
(567993600 . 24)
|
|
221
|
+
(489024000 . 23)
|
|
222
|
+
(425865600 . 22)
|
|
223
|
+
(394329600 . 21)
|
|
224
|
+
(362793600 . 20)
|
|
225
|
+
(315532800 . 19)
|
|
226
|
+
(283996800 . 18)
|
|
227
|
+
(252460800 . 17)
|
|
228
|
+
(220924800 . 16)
|
|
229
|
+
(189302400 . 15)
|
|
230
|
+
(157766400 . 14)
|
|
231
|
+
(126230400 . 13)
|
|
232
|
+
(94694400 . 12)
|
|
233
|
+
(78796800 . 11)
|
|
234
|
+
(63072000 . 10)))
|
|
235
|
+
|
|
236
|
+
(define (read-leap-second-table filename)
|
|
237
|
+
(set! leap-second-table (read-tai-utc-data filename)))
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
(define (utc->tai utc-seconds)
|
|
241
|
+
(let loop ((table leap-second-table))
|
|
242
|
+
(cond ((null? table)
|
|
243
|
+
utc-seconds)
|
|
244
|
+
((>= utc-seconds (caar table))
|
|
245
|
+
(+ utc-seconds (cdar table)))
|
|
246
|
+
(else
|
|
247
|
+
(loop (cdr table))))))
|
|
248
|
+
|
|
249
|
+
(define (tai->utc tai-seconds)
|
|
250
|
+
(let loop ((table leap-second-table))
|
|
251
|
+
(cond ((null? table)
|
|
252
|
+
tai-seconds)
|
|
253
|
+
((>= tai-seconds (+ (caar table) (cdar table)))
|
|
254
|
+
(- tai-seconds (cdar table)))
|
|
255
|
+
(else
|
|
256
|
+
(loop (cdr table))))))
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
;;; the TIME structure; creates the accessors, too.
|
|
260
|
+
|
|
261
|
+
(define-record-type time
|
|
262
|
+
(make-time-unnormalized type nanosecond second)
|
|
263
|
+
time?
|
|
264
|
+
(type time-type set-time-type!)
|
|
265
|
+
(nanosecond time-nanosecond set-time-nanosecond!)
|
|
266
|
+
(second time-second set-time-second!))
|
|
267
|
+
|
|
268
|
+
(define (copy-time time)
|
|
269
|
+
(make-time (time-type time) (time-nanosecond time) (time-second time)))
|
|
270
|
+
|
|
271
|
+
(define (split-real r)
|
|
272
|
+
(if (integer? r)
|
|
273
|
+
(values (inexact->exact r) 0)
|
|
274
|
+
(let ((l (truncate r)))
|
|
275
|
+
(values (inexact->exact l) (- r l)))))
|
|
276
|
+
|
|
277
|
+
(define (time-normalize! t)
|
|
278
|
+
(let ((s (time-second t))
|
|
279
|
+
(ns (time-nanosecond t)))
|
|
280
|
+
(when (>= (abs (time-nanosecond t))
|
|
281
|
+
nano)
|
|
282
|
+
(let ((s* (+ s (inexact->exact
|
|
283
|
+
(truncate-quotient ns nano))))
|
|
284
|
+
(ns* (truncate-remainder ns nano)))
|
|
285
|
+
(set-time-second! t s*)
|
|
286
|
+
(set-time-nanosecond! t ns*)))
|
|
287
|
+
(cond ((and (positive? s) (negative? ns))
|
|
288
|
+
(set-time-second! t (- s 1))
|
|
289
|
+
(set-time-nanosecond! t (+ ns nano)))
|
|
290
|
+
((and (negative? s) (positive? ns))
|
|
291
|
+
(set-time-second! t (+ s 1))
|
|
292
|
+
(set-time-nanosecond! t (- ns nano))))
|
|
293
|
+
t))
|
|
294
|
+
|
|
295
|
+
(define (make-time type nanosecond second)
|
|
296
|
+
(time-normalize! (make-time-unnormalized type nanosecond second)))
|
|
297
|
+
|
|
298
|
+
;;; current-time
|
|
299
|
+
|
|
300
|
+
;;; specific time getters.
|
|
301
|
+
|
|
302
|
+
(define (current-time-utc)
|
|
303
|
+
;; Resolution is microseconds.
|
|
304
|
+
(let ((tod (gettimeofday)))
|
|
305
|
+
(make-time time-utc (* (cdr tod) 1000) (car tod))))
|
|
306
|
+
|
|
307
|
+
(define (current-time-tai)
|
|
308
|
+
;; Resolution is microseconds.
|
|
309
|
+
(let* ((tod (gettimeofday))
|
|
310
|
+
(sec (car tod))
|
|
311
|
+
(usec (cdr tod)))
|
|
312
|
+
(make-time time-tai
|
|
313
|
+
(* usec 1000)
|
|
314
|
+
(utc->tai sec))))
|
|
315
|
+
|
|
316
|
+
;;(define (current-time-ms-time time-type proc)
|
|
317
|
+
;; (let ((current-ms (proc)))
|
|
318
|
+
;; (make-time time-type
|
|
319
|
+
;; (quotient current-ms 10000)
|
|
320
|
+
;; (* (remainder current-ms 1000) 10000))))
|
|
321
|
+
|
|
322
|
+
;; -- we define it to be the same as TAI.
|
|
323
|
+
;; A different implemention of current-time-monotonic
|
|
324
|
+
;; will require rewriting all of the time-monotonic converters,
|
|
325
|
+
;; of course.
|
|
326
|
+
|
|
327
|
+
(define (current-time-monotonic)
|
|
328
|
+
;; Guile monotonic and TAI times are the same.
|
|
329
|
+
(let ((tai (current-time-tai)))
|
|
330
|
+
(make-time time-monotonic
|
|
331
|
+
(time-nanosecond tai)
|
|
332
|
+
(time-second tai))))
|
|
333
|
+
|
|
334
|
+
(define (current-time-thread)
|
|
335
|
+
(time-error 'current-time-thread 'unsupported-clock-type 'time-thread))
|
|
336
|
+
|
|
337
|
+
(define ns-per-guile-tick (/ 1000000000 internal-time-units-per-second))
|
|
338
|
+
|
|
339
|
+
(define (current-time-process)
|
|
340
|
+
(let ((run-time (get-internal-run-time)))
|
|
341
|
+
(make-time
|
|
342
|
+
time-process
|
|
343
|
+
(* (remainder run-time internal-time-units-per-second)
|
|
344
|
+
ns-per-guile-tick)
|
|
345
|
+
(quotient run-time internal-time-units-per-second))))
|
|
346
|
+
|
|
347
|
+
;;(define (current-time-gc)
|
|
348
|
+
;; (current-time-ms-time time-gc current-gc-milliseconds))
|
|
349
|
+
|
|
350
|
+
(define (current-time . clock-type)
|
|
351
|
+
(let ((clock-type (if (null? clock-type) time-utc (car clock-type))))
|
|
352
|
+
(cond
|
|
353
|
+
((eq? clock-type time-tai) (current-time-tai))
|
|
354
|
+
((eq? clock-type time-utc) (current-time-utc))
|
|
355
|
+
((eq? clock-type time-monotonic) (current-time-monotonic))
|
|
356
|
+
((eq? clock-type time-thread) (current-time-thread))
|
|
357
|
+
((eq? clock-type time-process) (current-time-process))
|
|
358
|
+
;; ((eq? clock-type time-gc) (current-time-gc))
|
|
359
|
+
(else (time-error 'current-time 'invalid-clock-type clock-type)))))
|
|
360
|
+
|
|
361
|
+
;; -- Time Resolution
|
|
362
|
+
;; This is the resolution of the clock in nanoseconds.
|
|
363
|
+
;; This will be implementation specific.
|
|
364
|
+
|
|
365
|
+
(define (time-resolution . clock-type)
|
|
366
|
+
(let ((clock-type (if (null? clock-type) time-utc (car clock-type))))
|
|
367
|
+
(case clock-type
|
|
368
|
+
((time-tai) 1000)
|
|
369
|
+
((time-utc) 1000)
|
|
370
|
+
((time-monotonic) 1000)
|
|
371
|
+
((time-process) ns-per-guile-tick)
|
|
372
|
+
;; ((eq? clock-type time-thread) 1000)
|
|
373
|
+
;; ((eq? clock-type time-gc) 10000)
|
|
374
|
+
(else (time-error 'time-resolution 'invalid-clock-type clock-type)))))
|
|
375
|
+
|
|
376
|
+
;; -- Time comparisons
|
|
377
|
+
|
|
378
|
+
(define (time-compare-check t1 t2 caller)
|
|
379
|
+
(unless (and (time? t1) (time? t2)
|
|
380
|
+
(eq? (time-type t1) (time-type t2)))
|
|
381
|
+
(time-error caller 'incompatible-time-types (cons t1 t2))))
|
|
382
|
+
|
|
383
|
+
(define (time=? t1 t2)
|
|
384
|
+
;; Arrange tests for speed and presume that t1 and t2 are actually times.
|
|
385
|
+
;; also presume it will be rare to check two times of different types.
|
|
386
|
+
(time-compare-check t1 t2 'time=?)
|
|
387
|
+
(and (= (time-second t1) (time-second t2))
|
|
388
|
+
(= (time-nanosecond t1) (time-nanosecond t2))))
|
|
389
|
+
|
|
390
|
+
(define (time>? t1 t2)
|
|
391
|
+
(time-compare-check t1 t2 'time>?)
|
|
392
|
+
(or (> (time-second t1) (time-second t2))
|
|
393
|
+
(and (= (time-second t1) (time-second t2))
|
|
394
|
+
(> (time-nanosecond t1) (time-nanosecond t2)))))
|
|
395
|
+
|
|
396
|
+
(define (time<? t1 t2)
|
|
397
|
+
(time-compare-check t1 t2 'time<?)
|
|
398
|
+
(or (< (time-second t1) (time-second t2))
|
|
399
|
+
(and (= (time-second t1) (time-second t2))
|
|
400
|
+
(< (time-nanosecond t1) (time-nanosecond t2)))))
|
|
401
|
+
|
|
402
|
+
(define (time>=? t1 t2)
|
|
403
|
+
(time-compare-check t1 t2 'time>=?)
|
|
404
|
+
(or (> (time-second t1) (time-second t2))
|
|
405
|
+
(and (= (time-second t1) (time-second t2))
|
|
406
|
+
(>= (time-nanosecond t1) (time-nanosecond t2)))))
|
|
407
|
+
|
|
408
|
+
(define (time<=? t1 t2)
|
|
409
|
+
(time-compare-check t1 t2 'time<=?)
|
|
410
|
+
(or (< (time-second t1) (time-second t2))
|
|
411
|
+
(and (= (time-second t1) (time-second t2))
|
|
412
|
+
(<= (time-nanosecond t1) (time-nanosecond t2)))))
|
|
413
|
+
|
|
414
|
+
;; -- Time arithmetic
|
|
415
|
+
|
|
416
|
+
;; XXX In the following comparison procedures, the SRFI-19 reference
|
|
417
|
+
;; implementation raises an error in case of unequal time types.
|
|
418
|
+
|
|
419
|
+
(define (time-difference! time1 time2)
|
|
420
|
+
(time-compare-check time1 time2 'time-difference!)
|
|
421
|
+
(let ((sec-diff (- (time-second time1) (time-second time2)))
|
|
422
|
+
(nsec-diff (- (time-nanosecond time1) (time-nanosecond time2))))
|
|
423
|
+
(set-time-type! time1 time-duration)
|
|
424
|
+
(set-time-second! time1 sec-diff)
|
|
425
|
+
(set-time-nanosecond! time1 nsec-diff)
|
|
426
|
+
(time-normalize! time1)))
|
|
427
|
+
|
|
428
|
+
(define (time-difference time1 time2)
|
|
429
|
+
(let ((result (copy-time time1)))
|
|
430
|
+
(time-difference! result time2)))
|
|
431
|
+
|
|
432
|
+
(define (add-duration! t duration)
|
|
433
|
+
(if (not (eq? (time-type duration) time-duration))
|
|
434
|
+
(time-error 'add-duration! 'not-duration duration)
|
|
435
|
+
(let ((sec-plus (+ (time-second t) (time-second duration)))
|
|
436
|
+
(nsec-plus (+ (time-nanosecond t) (time-nanosecond duration))))
|
|
437
|
+
(set-time-second! t sec-plus)
|
|
438
|
+
(set-time-nanosecond! t nsec-plus)
|
|
439
|
+
(time-normalize! t))))
|
|
440
|
+
|
|
441
|
+
(define (add-duration t duration)
|
|
442
|
+
(let ((result (copy-time t)))
|
|
443
|
+
(add-duration! result duration)))
|
|
444
|
+
|
|
445
|
+
(define (subtract-duration! t duration)
|
|
446
|
+
(if (not (eq? (time-type duration) time-duration))
|
|
447
|
+
(time-error 'subtract-duration! 'not-duration duration)
|
|
448
|
+
(let ((sec-minus (- (time-second t) (time-second duration)))
|
|
449
|
+
(nsec-minus (- (time-nanosecond t) (time-nanosecond duration))))
|
|
450
|
+
(set-time-second! t sec-minus)
|
|
451
|
+
(set-time-nanosecond! t nsec-minus)
|
|
452
|
+
(time-normalize! t))))
|
|
453
|
+
|
|
454
|
+
(define (subtract-duration time1 duration)
|
|
455
|
+
(let ((result (copy-time time1)))
|
|
456
|
+
(subtract-duration! result duration)))
|
|
457
|
+
|
|
458
|
+
;; -- Converters between types.
|
|
459
|
+
|
|
460
|
+
(define (priv:time-tai->time-utc! time-in time-out caller)
|
|
461
|
+
(if (not (eq? (time-type time-in) time-tai))
|
|
462
|
+
(time-error caller 'incompatible-time-types time-in))
|
|
463
|
+
(set-time-type! time-out time-utc)
|
|
464
|
+
(set-time-nanosecond! time-out (time-nanosecond time-in))
|
|
465
|
+
(set-time-second! time-out (tai->utc (time-second time-in)))
|
|
466
|
+
time-out)
|
|
467
|
+
|
|
468
|
+
(define (time-tai->time-utc time-in)
|
|
469
|
+
(priv:time-tai->time-utc! time-in (make-time-unnormalized #f #f #f) 'time-tai->time-utc))
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
(define (time-tai->time-utc! time-in)
|
|
473
|
+
(priv:time-tai->time-utc! time-in time-in 'time-tai->time-utc!))
|
|
474
|
+
|
|
475
|
+
(define (priv:time-utc->time-tai! time-in time-out caller)
|
|
476
|
+
(if (not (eq? (time-type time-in) time-utc))
|
|
477
|
+
(time-error caller 'incompatible-time-types time-in))
|
|
478
|
+
(set-time-type! time-out time-tai)
|
|
479
|
+
(set-time-nanosecond! time-out (time-nanosecond time-in))
|
|
480
|
+
(set-time-second! time-out (utc->tai (time-second time-in)))
|
|
481
|
+
time-out)
|
|
482
|
+
|
|
483
|
+
(define (time-utc->time-tai time-in)
|
|
484
|
+
(priv:time-utc->time-tai! time-in (make-time-unnormalized #f #f #f) 'time-utc->time-tai))
|
|
485
|
+
|
|
486
|
+
(define (time-utc->time-tai! time-in)
|
|
487
|
+
(priv:time-utc->time-tai! time-in time-in 'time-utc->time-tai!))
|
|
488
|
+
|
|
489
|
+
;; -- these depend on time-monotonic having the same definition as time-tai!
|
|
490
|
+
(define (time-monotonic->time-utc time-in)
|
|
491
|
+
(if (not (eq? (time-type time-in) time-monotonic))
|
|
492
|
+
(time-error 'time-monotonic->time-utc
|
|
493
|
+
'incompatible-time-types time-in))
|
|
494
|
+
(let ((ntime (copy-time time-in)))
|
|
495
|
+
(set-time-type! ntime time-tai)
|
|
496
|
+
(priv:time-tai->time-utc! ntime ntime 'time-monotonic->time-utc)))
|
|
497
|
+
|
|
498
|
+
(define (time-monotonic->time-utc! time-in)
|
|
499
|
+
(if (not (eq? (time-type time-in) time-monotonic))
|
|
500
|
+
(time-error 'time-monotonic->time-utc!
|
|
501
|
+
'incompatible-time-types time-in))
|
|
502
|
+
(set-time-type! time-in time-tai)
|
|
503
|
+
(priv:time-tai->time-utc! time-in time-in 'time-monotonic->time-utc))
|
|
504
|
+
|
|
505
|
+
(define (time-monotonic->time-tai time-in)
|
|
506
|
+
(if (not (eq? (time-type time-in) time-monotonic))
|
|
507
|
+
(time-error 'time-monotonic->time-tai
|
|
508
|
+
'incompatible-time-types time-in))
|
|
509
|
+
(let ((ntime (copy-time time-in)))
|
|
510
|
+
(set-time-type! ntime time-tai)
|
|
511
|
+
ntime))
|
|
512
|
+
|
|
513
|
+
(define (time-monotonic->time-tai! time-in)
|
|
514
|
+
(if (not (eq? (time-type time-in) time-monotonic))
|
|
515
|
+
(time-error 'time-monotonic->time-tai!
|
|
516
|
+
'incompatible-time-types time-in))
|
|
517
|
+
(set-time-type! time-in time-tai)
|
|
518
|
+
time-in)
|
|
519
|
+
|
|
520
|
+
(define (time-utc->time-monotonic time-in)
|
|
521
|
+
(if (not (eq? (time-type time-in) time-utc))
|
|
522
|
+
(time-error 'time-utc->time-monotonic
|
|
523
|
+
'incompatible-time-types time-in))
|
|
524
|
+
(let ((ntime (priv:time-utc->time-tai! time-in (make-time-unnormalized #f #f #f)
|
|
525
|
+
'time-utc->time-monotonic)))
|
|
526
|
+
(set-time-type! ntime time-monotonic)
|
|
527
|
+
ntime))
|
|
528
|
+
|
|
529
|
+
(define (time-utc->time-monotonic! time-in)
|
|
530
|
+
(if (not (eq? (time-type time-in) time-utc))
|
|
531
|
+
(time-error 'time-utc->time-monotonic!
|
|
532
|
+
'incompatible-time-types time-in))
|
|
533
|
+
(let ((ntime (priv:time-utc->time-tai! time-in time-in
|
|
534
|
+
'time-utc->time-monotonic!)))
|
|
535
|
+
(set-time-type! ntime time-monotonic)
|
|
536
|
+
ntime))
|
|
537
|
+
|
|
538
|
+
(define (time-tai->time-monotonic time-in)
|
|
539
|
+
(if (not (eq? (time-type time-in) time-tai))
|
|
540
|
+
(time-error 'time-tai->time-monotonic
|
|
541
|
+
'incompatible-time-types time-in))
|
|
542
|
+
(let ((ntime (copy-time time-in)))
|
|
543
|
+
(set-time-type! ntime time-monotonic)
|
|
544
|
+
ntime))
|
|
545
|
+
|
|
546
|
+
(define (time-tai->time-monotonic! time-in)
|
|
547
|
+
(if (not (eq? (time-type time-in) time-tai))
|
|
548
|
+
(time-error 'time-tai->time-monotonic!
|
|
549
|
+
'incompatible-time-types time-in))
|
|
550
|
+
(set-time-type! time-in time-monotonic)
|
|
551
|
+
time-in)
|
|
552
|
+
|
|
553
|
+
;; -- Date Structures
|
|
554
|
+
|
|
555
|
+
;; FIXME: to be really safe, perhaps we should normalize the
|
|
556
|
+
;; seconds/nanoseconds/minutes coming in to make-date...
|
|
557
|
+
|
|
558
|
+
(define-record-type date
|
|
559
|
+
(make-date nanosecond second minute
|
|
560
|
+
hour day month
|
|
561
|
+
year
|
|
562
|
+
zone-offset)
|
|
563
|
+
date?
|
|
564
|
+
(nanosecond date-nanosecond set-date-nanosecond!)
|
|
565
|
+
(second date-second set-date-second!)
|
|
566
|
+
(minute date-minute set-date-minute!)
|
|
567
|
+
(hour date-hour set-date-hour!)
|
|
568
|
+
(day date-day set-date-day!)
|
|
569
|
+
(month date-month set-date-month!)
|
|
570
|
+
(year date-year set-date-year!)
|
|
571
|
+
(zone-offset date-zone-offset set-date-zone-offset!))
|
|
572
|
+
|
|
573
|
+
;; gives the julian day which starts at noon.
|
|
574
|
+
(define (encode-julian-day-number day month year)
|
|
575
|
+
(let* ((a (quotient (- 14 month) 12))
|
|
576
|
+
(y (- (+ year 4800) a (if (negative? year) -1 0)))
|
|
577
|
+
(m (- (+ month (* 12 a)) 3)))
|
|
578
|
+
(+ day
|
|
579
|
+
(quotient (+ (* 153 m) 2) 5)
|
|
580
|
+
(* 365 y)
|
|
581
|
+
(floor-quotient y 4)
|
|
582
|
+
(- (floor-quotient y 100))
|
|
583
|
+
(floor-quotient y 400)
|
|
584
|
+
-32045)))
|
|
585
|
+
|
|
586
|
+
;; gives the seconds/date/month/year
|
|
587
|
+
(define (decode-julian-day-number jdn)
|
|
588
|
+
(let* ((days (inexact->exact (floor jdn)))
|
|
589
|
+
(a (+ days 32044))
|
|
590
|
+
(b (floor-quotient (+ (* 4 a) 3) 146097))
|
|
591
|
+
(c (- a (floor-quotient (* 146097 b) 4)))
|
|
592
|
+
(d (floor-quotient (+ (* 4 c) 3) 1461))
|
|
593
|
+
(e (- c (floor-quotient (* 1461 d) 4)))
|
|
594
|
+
(m (floor-quotient (+ (* 5 e) 2) 153))
|
|
595
|
+
(y (+ (* 100 b) d -4800 (quotient m 10))))
|
|
596
|
+
(values ; seconds date month year
|
|
597
|
+
(* (- jdn days) sid)
|
|
598
|
+
(+ e (- (quotient (+ (* 153 m) 2) 5)) 1)
|
|
599
|
+
(+ m 3 (* -12 (quotient m 10)))
|
|
600
|
+
(if (>= 0 y) (- y 1) y))))
|
|
601
|
+
|
|
602
|
+
;; relies on the fact that we named our time zone accessor
|
|
603
|
+
;; differently from MzScheme's....
|
|
604
|
+
;; This should be written to be OS specific.
|
|
605
|
+
|
|
606
|
+
(define (local-tz-offset utc-time)
|
|
607
|
+
;; SRFI 19 uses seconds East, but 'tm:gmtoff' returns seconds West.
|
|
608
|
+
(- (tm:gmtoff (localtime (time-second utc-time)))))
|
|
609
|
+
|
|
610
|
+
;; special thing -- ignores nanos
|
|
611
|
+
(define (time->julian-day-number seconds tz-offset)
|
|
612
|
+
(+ (/ (+ seconds tz-offset sihd)
|
|
613
|
+
sid)
|
|
614
|
+
utc-epoch-in-jd))
|
|
615
|
+
|
|
616
|
+
(define (tai-before-leap-second? second)
|
|
617
|
+
(any (lambda (x)
|
|
618
|
+
(= second (+ (car x) (cdr x) -1)))
|
|
619
|
+
leap-second-table))
|
|
620
|
+
|
|
621
|
+
(define* (time-utc->date time #:optional (tz-offset
|
|
622
|
+
(local-tz-offset time)))
|
|
623
|
+
(if (not (eq? (time-type time) time-utc))
|
|
624
|
+
(time-error 'time-utc->date 'incompatible-time-types time))
|
|
625
|
+
(let* ((nanoseconds (+ (time-nanosecond time)
|
|
626
|
+
(* nano (time-second time))))
|
|
627
|
+
(jdn (time->julian-day-number (floor-quotient nanoseconds nano)
|
|
628
|
+
tz-offset)))
|
|
629
|
+
(call-with-values (lambda () (decode-julian-day-number jdn))
|
|
630
|
+
(lambda (secs date month year)
|
|
631
|
+
;; secs is a real because jdn is a real in Guile;
|
|
632
|
+
;; but it is conceptionally an integer.
|
|
633
|
+
(let* ((int-secs (inexact->exact (round secs)))
|
|
634
|
+
(hours (quotient int-secs (* 60 60)))
|
|
635
|
+
(rem (remainder int-secs (* 60 60)))
|
|
636
|
+
(minutes (quotient rem 60))
|
|
637
|
+
(seconds (remainder rem 60)))
|
|
638
|
+
(make-date (floor-remainder nanoseconds nano)
|
|
639
|
+
seconds
|
|
640
|
+
minutes
|
|
641
|
+
hours
|
|
642
|
+
date
|
|
643
|
+
month
|
|
644
|
+
year
|
|
645
|
+
tz-offset))))))
|
|
646
|
+
|
|
647
|
+
(define (time-tai->date time . tz-offset)
|
|
648
|
+
(if (not (eq? (time-type time) time-tai))
|
|
649
|
+
(time-error 'time-tai->date 'incompatible-time-types time))
|
|
650
|
+
(if (tai-before-leap-second? (time-second time))
|
|
651
|
+
;; If it's *right* before the leap, we must handle this case to
|
|
652
|
+
;; avoid the information lost when converting to UTC. We subtract
|
|
653
|
+
;; a second before conversion, and then effectively add it back
|
|
654
|
+
;; after conversion by setting the second field to 60.
|
|
655
|
+
(let ((d (apply time-utc->date
|
|
656
|
+
(subtract-duration! (time-tai->time-utc time)
|
|
657
|
+
(make-time time-duration 0 1))
|
|
658
|
+
tz-offset)))
|
|
659
|
+
(set-date-second! d 60)
|
|
660
|
+
d)
|
|
661
|
+
(apply time-utc->date (time-tai->time-utc time) tz-offset)))
|
|
662
|
+
|
|
663
|
+
(define (time-monotonic->date time . tz-offset)
|
|
664
|
+
(if (not (eq? (time-type time) time-monotonic))
|
|
665
|
+
(time-error 'time-monotonic->date 'incompatible-time-types time))
|
|
666
|
+
(apply time-tai->date (time-monotonic->time-tai time) tz-offset))
|
|
667
|
+
|
|
668
|
+
(define (date->time-utc date)
|
|
669
|
+
(let* ((jdays (- (encode-julian-day-number (date-day date)
|
|
670
|
+
(date-month date)
|
|
671
|
+
(date-year date))
|
|
672
|
+
utc-epoch-in-jd))
|
|
673
|
+
;; jdays is an integer plus 1/2,
|
|
674
|
+
(jdays-1/2 (inexact->exact (- jdays 1/2))))
|
|
675
|
+
(make-time
|
|
676
|
+
time-utc
|
|
677
|
+
(date-nanosecond date)
|
|
678
|
+
(+ (* jdays-1/2 24 60 60)
|
|
679
|
+
(* (date-hour date) 60 60)
|
|
680
|
+
(* (date-minute date) 60)
|
|
681
|
+
(date-second date)
|
|
682
|
+
(- (date-zone-offset date))))))
|
|
683
|
+
|
|
684
|
+
(define (date->time-tai d)
|
|
685
|
+
(if (= (date-second d) 60)
|
|
686
|
+
(subtract-duration! (time-utc->time-tai! (date->time-utc d))
|
|
687
|
+
(make-time time-duration 0 1))
|
|
688
|
+
(time-utc->time-tai! (date->time-utc d))))
|
|
689
|
+
|
|
690
|
+
(define (date->time-monotonic d)
|
|
691
|
+
(if (= (date-second d) 60)
|
|
692
|
+
(subtract-duration! (time-utc->time-monotonic! (date->time-utc d))
|
|
693
|
+
(make-time time-duration 0 1))
|
|
694
|
+
(time-utc->time-monotonic! (date->time-utc d))))
|
|
695
|
+
|
|
696
|
+
(define (leap-year? year)
|
|
697
|
+
(let ((y (if (negative? year) (+ year 1) year)))
|
|
698
|
+
(and (zero? (modulo y 4))
|
|
699
|
+
(or (not (zero? (modulo y 100)))
|
|
700
|
+
(zero? (modulo y 400))))))
|
|
701
|
+
|
|
702
|
+
;; Map 1-based month number M to number of days in the year before the
|
|
703
|
+
;; start of month M (in a non-leap year).
|
|
704
|
+
(define month-assoc '((1 . 0) (2 . 31) (3 . 59) (4 . 90)
|
|
705
|
+
(5 . 120) (6 . 151) (7 . 181) (8 . 212)
|
|
706
|
+
(9 . 243) (10 . 273) (11 . 304) (12 . 334)))
|
|
707
|
+
|
|
708
|
+
(define (year-day day month year)
|
|
709
|
+
(let ((days-pr (assoc month month-assoc)))
|
|
710
|
+
(if (not days-pr)
|
|
711
|
+
(time-error 'date-year-day 'invalid-month-specification month))
|
|
712
|
+
(if (and (leap-year? year) (> month 2))
|
|
713
|
+
(+ day (cdr days-pr) 1)
|
|
714
|
+
(+ day (cdr days-pr)))))
|
|
715
|
+
|
|
716
|
+
(define (date-year-day date)
|
|
717
|
+
(year-day (date-day date) (date-month date) (date-year date)))
|
|
718
|
+
|
|
719
|
+
;; from calendar faq
|
|
720
|
+
(define (week-day day month year)
|
|
721
|
+
(let* ((yy (if (negative? year) (+ year 1) year))
|
|
722
|
+
(a (quotient (- 14 month) 12))
|
|
723
|
+
(y (- yy a))
|
|
724
|
+
(m (+ month (* 12 a) -2)))
|
|
725
|
+
(modulo (+ day
|
|
726
|
+
y
|
|
727
|
+
(floor-quotient y 4)
|
|
728
|
+
(- (floor-quotient y 100))
|
|
729
|
+
(floor-quotient y 400)
|
|
730
|
+
(floor-quotient (* 31 m) 12))
|
|
731
|
+
7)))
|
|
732
|
+
|
|
733
|
+
(define (date-week-day date)
|
|
734
|
+
(week-day (date-day date) (date-month date) (date-year date)))
|
|
735
|
+
|
|
736
|
+
(define (days-before-first-week date day-of-week-starting-week)
|
|
737
|
+
(let* ((first-day (make-date 0 0 0 0
|
|
738
|
+
1
|
|
739
|
+
1
|
|
740
|
+
(date-year date)
|
|
741
|
+
#f))
|
|
742
|
+
(fdweek-day (date-week-day first-day)))
|
|
743
|
+
(modulo (- day-of-week-starting-week fdweek-day)
|
|
744
|
+
7)))
|
|
745
|
+
|
|
746
|
+
;; The "-1" here is a fix for the reference implementation, to make a new
|
|
747
|
+
;; week start on the given day-of-week-starting-week. date-year-day returns
|
|
748
|
+
;; a day starting from 1 for 1st Jan.
|
|
749
|
+
;;
|
|
750
|
+
(define (date-week-number date day-of-week-starting-week)
|
|
751
|
+
(floor-quotient (- (date-year-day date)
|
|
752
|
+
1
|
|
753
|
+
(days-before-first-week date day-of-week-starting-week))
|
|
754
|
+
7))
|
|
755
|
+
|
|
756
|
+
(define (current-date . tz-offset)
|
|
757
|
+
(let ((time (current-time time-utc)))
|
|
758
|
+
(time-utc->date
|
|
759
|
+
time
|
|
760
|
+
(if (null? tz-offset)
|
|
761
|
+
(local-tz-offset time)
|
|
762
|
+
(car tz-offset)))))
|
|
763
|
+
|
|
764
|
+
;; given a 'two digit' number, find the year within 50 years +/-
|
|
765
|
+
(define (natural-year n)
|
|
766
|
+
(let* ((current-year (date-year (current-date)))
|
|
767
|
+
(current-century (* (quotient current-year 100) 100)))
|
|
768
|
+
(cond
|
|
769
|
+
((>= n 100) n)
|
|
770
|
+
((< n 0) n)
|
|
771
|
+
((<= (- (+ current-century n) current-year) 50) (+ current-century n))
|
|
772
|
+
(else (+ (- current-century 100) n)))))
|
|
773
|
+
|
|
774
|
+
(define (date->julian-day date)
|
|
775
|
+
(let ((nanosecond (date-nanosecond date))
|
|
776
|
+
(second (date-second date))
|
|
777
|
+
(minute (date-minute date))
|
|
778
|
+
(hour (date-hour date))
|
|
779
|
+
(day (date-day date))
|
|
780
|
+
(month (date-month date))
|
|
781
|
+
(year (date-year date))
|
|
782
|
+
(offset (date-zone-offset date)))
|
|
783
|
+
(+ (encode-julian-day-number day month year)
|
|
784
|
+
(- 1/2)
|
|
785
|
+
(+ (/ (+ (- offset)
|
|
786
|
+
(* hour 60 60)
|
|
787
|
+
(* minute 60)
|
|
788
|
+
second
|
|
789
|
+
(/ nanosecond nano))
|
|
790
|
+
sid)))))
|
|
791
|
+
|
|
792
|
+
(define (date->modified-julian-day date)
|
|
793
|
+
(- (date->julian-day date)
|
|
794
|
+
4800001/2))
|
|
795
|
+
|
|
796
|
+
(define (time-utc->julian-day time)
|
|
797
|
+
(if (not (eq? (time-type time) time-utc))
|
|
798
|
+
(time-error 'time-utc->julian-day 'incompatible-time-types time))
|
|
799
|
+
(+ (/ (+ (time-second time) (/ (time-nanosecond time) nano))
|
|
800
|
+
sid)
|
|
801
|
+
utc-epoch-in-jd))
|
|
802
|
+
|
|
803
|
+
(define (time-utc->modified-julian-day time)
|
|
804
|
+
(- (time-utc->julian-day time)
|
|
805
|
+
4800001/2))
|
|
806
|
+
|
|
807
|
+
(define (time-tai->julian-day time)
|
|
808
|
+
(if (not (eq? (time-type time) time-tai))
|
|
809
|
+
(time-error 'time-tai->julian-day 'incompatible-time-types time))
|
|
810
|
+
(+ (/ (+ (tai->utc (time-second time))
|
|
811
|
+
(/ (time-nanosecond time) nano))
|
|
812
|
+
sid)
|
|
813
|
+
utc-epoch-in-jd))
|
|
814
|
+
|
|
815
|
+
(define (time-tai->modified-julian-day time)
|
|
816
|
+
(- (time-tai->julian-day time)
|
|
817
|
+
4800001/2))
|
|
818
|
+
|
|
819
|
+
;; this is the same as time-tai->julian-day
|
|
820
|
+
(define (time-monotonic->julian-day time)
|
|
821
|
+
(if (not (eq? (time-type time) time-monotonic))
|
|
822
|
+
(time-error 'time-monotonic->julian-day 'incompatible-time-types time))
|
|
823
|
+
(+ (/ (+ (tai->utc (time-second time))
|
|
824
|
+
(/ (time-nanosecond time) nano))
|
|
825
|
+
sid)
|
|
826
|
+
utc-epoch-in-jd))
|
|
827
|
+
|
|
828
|
+
(define (time-monotonic->modified-julian-day time)
|
|
829
|
+
(- (time-monotonic->julian-day time)
|
|
830
|
+
4800001/2))
|
|
831
|
+
|
|
832
|
+
(define (julian-day->time-utc jdn)
|
|
833
|
+
(let ((secs (* sid (- jdn utc-epoch-in-jd))))
|
|
834
|
+
(receive (seconds parts)
|
|
835
|
+
(split-real secs)
|
|
836
|
+
(make-time time-utc
|
|
837
|
+
(* parts nano)
|
|
838
|
+
seconds))))
|
|
839
|
+
|
|
840
|
+
(define (julian-day->time-tai jdn)
|
|
841
|
+
(time-utc->time-tai! (julian-day->time-utc jdn)))
|
|
842
|
+
|
|
843
|
+
(define (julian-day->time-monotonic jdn)
|
|
844
|
+
(time-utc->time-monotonic! (julian-day->time-utc jdn)))
|
|
845
|
+
|
|
846
|
+
(define (julian-day->date jdn . tz-offset)
|
|
847
|
+
(let* ((time (julian-day->time-utc jdn))
|
|
848
|
+
(offset (if (null? tz-offset)
|
|
849
|
+
(local-tz-offset time)
|
|
850
|
+
(car tz-offset))))
|
|
851
|
+
(time-utc->date time offset)))
|
|
852
|
+
|
|
853
|
+
(define (modified-julian-day->date jdn . tz-offset)
|
|
854
|
+
(apply julian-day->date (+ jdn 4800001/2)
|
|
855
|
+
tz-offset))
|
|
856
|
+
|
|
857
|
+
(define (modified-julian-day->time-utc jdn)
|
|
858
|
+
(julian-day->time-utc (+ jdn 4800001/2)))
|
|
859
|
+
|
|
860
|
+
(define (modified-julian-day->time-tai jdn)
|
|
861
|
+
(julian-day->time-tai (+ jdn 4800001/2)))
|
|
862
|
+
|
|
863
|
+
(define (modified-julian-day->time-monotonic jdn)
|
|
864
|
+
(julian-day->time-monotonic (+ jdn 4800001/2)))
|
|
865
|
+
|
|
866
|
+
(define (current-julian-day)
|
|
867
|
+
(time-utc->julian-day (current-time time-utc)))
|
|
868
|
+
|
|
869
|
+
(define (current-modified-julian-day)
|
|
870
|
+
(time-utc->modified-julian-day (current-time time-utc)))
|
|
871
|
+
|
|
872
|
+
;; returns a string rep. of number N, of minimum LENGTH, padded with
|
|
873
|
+
;; character PAD-WITH. If PAD-WITH is #f, no padding is done, and it's
|
|
874
|
+
;; as if number->string was used. if string is longer than or equal
|
|
875
|
+
;; in length to LENGTH, it's as if number->string was used.
|
|
876
|
+
|
|
877
|
+
(define (padding n pad-with length)
|
|
878
|
+
(let* ((str (number->string n))
|
|
879
|
+
(str-len (string-length str)))
|
|
880
|
+
(if (or (>= str-len length)
|
|
881
|
+
(not pad-with))
|
|
882
|
+
str
|
|
883
|
+
(string-append (make-string (- length str-len) pad-with) str))))
|
|
884
|
+
|
|
885
|
+
(define (last-n-digits i n)
|
|
886
|
+
(abs (remainder i (expt 10 n))))
|
|
887
|
+
|
|
888
|
+
(define (locale-abbr-weekday n) (locale-day-short (+ 1 n)))
|
|
889
|
+
(define (locale-long-weekday n) (locale-day (+ 1 n)))
|
|
890
|
+
(define locale-abbr-month locale-month-short)
|
|
891
|
+
(define locale-long-month locale-month)
|
|
892
|
+
|
|
893
|
+
(define (date-reverse-lookup needle haystack-ref haystack-len
|
|
894
|
+
same?)
|
|
895
|
+
;; Lookup NEEDLE (a string) using HAYSTACK-REF (a one argument procedure
|
|
896
|
+
;; that returns a string corresponding to the given index) by passing it
|
|
897
|
+
;; indices lower than HAYSTACK-LEN.
|
|
898
|
+
(let loop ((index 1))
|
|
899
|
+
(cond ((> index haystack-len) #f)
|
|
900
|
+
((same? needle (haystack-ref index))
|
|
901
|
+
index)
|
|
902
|
+
(else (loop (+ index 1))))))
|
|
903
|
+
|
|
904
|
+
(define (locale-abbr-weekday->index string)
|
|
905
|
+
(date-reverse-lookup string locale-day-short 7 string=?))
|
|
906
|
+
|
|
907
|
+
(define (locale-long-weekday->index string)
|
|
908
|
+
(date-reverse-lookup string locale-day 7 string=?))
|
|
909
|
+
|
|
910
|
+
(define (locale-abbr-month->index string)
|
|
911
|
+
(date-reverse-lookup string locale-abbr-month 12 string=?))
|
|
912
|
+
|
|
913
|
+
(define (locale-long-month->index string)
|
|
914
|
+
(date-reverse-lookup string locale-long-month 12 string=?))
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
;; FIXME: mkoeppe: Put a symbolic time zone in the date structs.
|
|
918
|
+
;; Print it here instead of the numerical offset if available.
|
|
919
|
+
(define (locale-print-time-zone date port)
|
|
920
|
+
(tz-printer (date-zone-offset date) port))
|
|
921
|
+
|
|
922
|
+
(define (locale-am-string/pm hr)
|
|
923
|
+
(if (> hr 11) (locale-pm-string) (locale-am-string)))
|
|
924
|
+
|
|
925
|
+
(define (tz-printer offset port)
|
|
926
|
+
(cond
|
|
927
|
+
((= offset 0) (display "Z" port))
|
|
928
|
+
((negative? offset) (display "-" port))
|
|
929
|
+
(else (display "+" port)))
|
|
930
|
+
(if (not (= offset 0))
|
|
931
|
+
(let ((hours (abs (quotient offset (* 60 60))))
|
|
932
|
+
(minutes (abs (quotient (remainder offset (* 60 60)) 60))))
|
|
933
|
+
(display (padding hours #\0 2) port)
|
|
934
|
+
(display (padding minutes #\0 2) port))))
|
|
935
|
+
|
|
936
|
+
;; A table of output formatting directives.
|
|
937
|
+
;; the first time is the format char.
|
|
938
|
+
;; the second is a procedure that takes the date, a padding character
|
|
939
|
+
;; (which might be #f), and the output port.
|
|
940
|
+
;;
|
|
941
|
+
(define directives
|
|
942
|
+
(list
|
|
943
|
+
(cons #\~ (lambda (date pad-with port)
|
|
944
|
+
(display #\~ port)))
|
|
945
|
+
(cons #\a (lambda (date pad-with port)
|
|
946
|
+
(display (locale-abbr-weekday (date-week-day date))
|
|
947
|
+
port)))
|
|
948
|
+
(cons #\A (lambda (date pad-with port)
|
|
949
|
+
(display (locale-long-weekday (date-week-day date))
|
|
950
|
+
port)))
|
|
951
|
+
(cons #\b (lambda (date pad-with port)
|
|
952
|
+
(display (locale-abbr-month (date-month date))
|
|
953
|
+
port)))
|
|
954
|
+
(cons #\B (lambda (date pad-with port)
|
|
955
|
+
(display (locale-long-month (date-month date))
|
|
956
|
+
port)))
|
|
957
|
+
(cons #\c (lambda (date pad-with port)
|
|
958
|
+
(display (date->string date locale-date-time-format) port)))
|
|
959
|
+
(cons #\d (lambda (date pad-with port)
|
|
960
|
+
(display (padding (date-day date)
|
|
961
|
+
#\0 2)
|
|
962
|
+
port)))
|
|
963
|
+
(cons #\D (lambda (date pad-with port)
|
|
964
|
+
(display (date->string date "~m/~d/~y") port)))
|
|
965
|
+
(cons #\e (lambda (date pad-with port)
|
|
966
|
+
(display (padding (date-day date)
|
|
967
|
+
#\Space 2)
|
|
968
|
+
port)))
|
|
969
|
+
(cons #\f (lambda (date pad-with port)
|
|
970
|
+
(receive (s ns) (floor/ (+ (* (date-second date) nano)
|
|
971
|
+
(date-nanosecond date))
|
|
972
|
+
nano)
|
|
973
|
+
(display (number->string s) port)
|
|
974
|
+
(display (locale-decimal-point) port)
|
|
975
|
+
(let ((str (padding ns #\0 9)))
|
|
976
|
+
(display (substring str 0 1) port)
|
|
977
|
+
(display (string-trim-right str #\0 1) port)))))
|
|
978
|
+
(cons #\h (lambda (date pad-with port)
|
|
979
|
+
(display (date->string date "~b") port)))
|
|
980
|
+
(cons #\H (lambda (date pad-with port)
|
|
981
|
+
(display (padding (date-hour date)
|
|
982
|
+
pad-with 2)
|
|
983
|
+
port)))
|
|
984
|
+
(cons #\I (lambda (date pad-with port)
|
|
985
|
+
(let ((hr (date-hour date)))
|
|
986
|
+
(if (> hr 12)
|
|
987
|
+
(display (padding (- hr 12)
|
|
988
|
+
pad-with 2)
|
|
989
|
+
port)
|
|
990
|
+
(display (padding hr
|
|
991
|
+
pad-with 2)
|
|
992
|
+
port)))))
|
|
993
|
+
(cons #\j (lambda (date pad-with port)
|
|
994
|
+
(display (padding (date-year-day date)
|
|
995
|
+
pad-with 3)
|
|
996
|
+
port)))
|
|
997
|
+
(cons #\k (lambda (date pad-with port)
|
|
998
|
+
(display (padding (date-hour date)
|
|
999
|
+
#\Space 2)
|
|
1000
|
+
port)))
|
|
1001
|
+
(cons #\l (lambda (date pad-with port)
|
|
1002
|
+
(let ((hr (if (> (date-hour date) 12)
|
|
1003
|
+
(- (date-hour date) 12) (date-hour date))))
|
|
1004
|
+
(display (padding hr #\Space 2)
|
|
1005
|
+
port))))
|
|
1006
|
+
(cons #\m (lambda (date pad-with port)
|
|
1007
|
+
(display (padding (date-month date)
|
|
1008
|
+
pad-with 2)
|
|
1009
|
+
port)))
|
|
1010
|
+
(cons #\M (lambda (date pad-with port)
|
|
1011
|
+
(display (padding (date-minute date)
|
|
1012
|
+
pad-with 2)
|
|
1013
|
+
port)))
|
|
1014
|
+
(cons #\n (lambda (date pad-with port)
|
|
1015
|
+
(newline port)))
|
|
1016
|
+
(cons #\N (lambda (date pad-with port)
|
|
1017
|
+
(display (padding (date-nanosecond date)
|
|
1018
|
+
pad-with 9)
|
|
1019
|
+
port)))
|
|
1020
|
+
(cons #\p (lambda (date pad-with port)
|
|
1021
|
+
(display (locale-am-string/pm (date-hour date)) port)))
|
|
1022
|
+
(cons #\r (lambda (date pad-with port)
|
|
1023
|
+
(display (date->string date "~I:~M:~S ~p") port)))
|
|
1024
|
+
(cons #\s (lambda (date pad-with port)
|
|
1025
|
+
(display (time-second (date->time-utc date)) port)))
|
|
1026
|
+
(cons #\S (lambda (date pad-with port)
|
|
1027
|
+
(if (> (date-nanosecond date)
|
|
1028
|
+
nano)
|
|
1029
|
+
(display (padding (+ (date-second date) 1)
|
|
1030
|
+
pad-with 2)
|
|
1031
|
+
port)
|
|
1032
|
+
(display (padding (date-second date)
|
|
1033
|
+
pad-with 2)
|
|
1034
|
+
port))))
|
|
1035
|
+
(cons #\t (lambda (date pad-with port)
|
|
1036
|
+
(display #\Tab port)))
|
|
1037
|
+
(cons #\T (lambda (date pad-with port)
|
|
1038
|
+
(display (date->string date "~H:~M:~S") port)))
|
|
1039
|
+
(cons #\U (lambda (date pad-with port)
|
|
1040
|
+
(if (> (days-before-first-week date 0) 0)
|
|
1041
|
+
(display (padding (+ (date-week-number date 0) 1)
|
|
1042
|
+
#\0 2) port)
|
|
1043
|
+
(display (padding (date-week-number date 0)
|
|
1044
|
+
#\0 2) port))))
|
|
1045
|
+
(cons #\V (lambda (date pad-with port)
|
|
1046
|
+
(display (padding (date-week-number date 1)
|
|
1047
|
+
#\0 2) port)))
|
|
1048
|
+
(cons #\w (lambda (date pad-with port)
|
|
1049
|
+
(display (date-week-day date) port)))
|
|
1050
|
+
(cons #\x (lambda (date pad-with port)
|
|
1051
|
+
(display (date->string date locale-short-date-format) port)))
|
|
1052
|
+
(cons #\X (lambda (date pad-with port)
|
|
1053
|
+
(display (date->string date locale-time-format) port)))
|
|
1054
|
+
(cons #\W (lambda (date pad-with port)
|
|
1055
|
+
(if (> (days-before-first-week date 1) 0)
|
|
1056
|
+
(display (padding (+ (date-week-number date 1) 1)
|
|
1057
|
+
#\0 2) port)
|
|
1058
|
+
(display (padding (date-week-number date 1)
|
|
1059
|
+
#\0 2) port))))
|
|
1060
|
+
(cons #\y (lambda (date pad-with port)
|
|
1061
|
+
(display (padding (last-n-digits
|
|
1062
|
+
(date-year date) 2)
|
|
1063
|
+
pad-with
|
|
1064
|
+
2)
|
|
1065
|
+
port)))
|
|
1066
|
+
(cons #\Y (lambda (date pad-with port)
|
|
1067
|
+
(let* ((yy (date-year date))
|
|
1068
|
+
(y (if (negative? yy) (+ yy 1) yy)))
|
|
1069
|
+
(unless (<= 0 y 9999)
|
|
1070
|
+
(display (if (negative? y) #\- #\+) port))
|
|
1071
|
+
(display (padding (abs y) pad-with 4) port))))
|
|
1072
|
+
(cons #\z (lambda (date pad-with port)
|
|
1073
|
+
(tz-printer (date-zone-offset date) port)))
|
|
1074
|
+
(cons #\Z (lambda (date pad-with port)
|
|
1075
|
+
(locale-print-time-zone date port)))
|
|
1076
|
+
(cons #\1 (lambda (date pad-with port)
|
|
1077
|
+
(display (date->string date "~Y-~m-~d") port)))
|
|
1078
|
+
(cons #\2 (lambda (date pad-with port)
|
|
1079
|
+
(display (date->string date "~H:~M:~S~z") port)))
|
|
1080
|
+
(cons #\3 (lambda (date pad-with port)
|
|
1081
|
+
(display (date->string date "~H:~M:~S") port)))
|
|
1082
|
+
(cons #\4 (lambda (date pad-with port)
|
|
1083
|
+
(display (date->string date "~Y-~m-~dT~H:~M:~S~z") port)))
|
|
1084
|
+
(cons #\5 (lambda (date pad-with port)
|
|
1085
|
+
(display (date->string date "~Y-~m-~dT~H:~M:~S") port)))))
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
(define (get-formatter char)
|
|
1089
|
+
(let ((associated (assoc char directives)))
|
|
1090
|
+
(if associated (cdr associated) #f)))
|
|
1091
|
+
|
|
1092
|
+
(define (date-printer date index format-string str-len port)
|
|
1093
|
+
(if (< index str-len)
|
|
1094
|
+
(let ((current-char (string-ref format-string index)))
|
|
1095
|
+
(if (not (char=? current-char #\~))
|
|
1096
|
+
(begin
|
|
1097
|
+
(display current-char port)
|
|
1098
|
+
(date-printer date (+ index 1) format-string str-len port))
|
|
1099
|
+
(if (= (+ index 1) str-len) ; bad format string.
|
|
1100
|
+
(time-error 'date-printer 'bad-date-format-string
|
|
1101
|
+
format-string)
|
|
1102
|
+
(let ((pad-char? (string-ref format-string (+ index 1))))
|
|
1103
|
+
(cond
|
|
1104
|
+
((char=? pad-char? #\-)
|
|
1105
|
+
(if (= (+ index 2) str-len) ; bad format string.
|
|
1106
|
+
(time-error 'date-printer
|
|
1107
|
+
'bad-date-format-string
|
|
1108
|
+
format-string)
|
|
1109
|
+
(let ((formatter (get-formatter
|
|
1110
|
+
(string-ref format-string
|
|
1111
|
+
(+ index 2)))))
|
|
1112
|
+
(if (not formatter)
|
|
1113
|
+
(time-error 'date-printer
|
|
1114
|
+
'bad-date-format-string
|
|
1115
|
+
format-string)
|
|
1116
|
+
(begin
|
|
1117
|
+
(formatter date #f port)
|
|
1118
|
+
(date-printer date
|
|
1119
|
+
(+ index 3)
|
|
1120
|
+
format-string
|
|
1121
|
+
str-len
|
|
1122
|
+
port))))))
|
|
1123
|
+
|
|
1124
|
+
((char=? pad-char? #\_)
|
|
1125
|
+
(if (= (+ index 2) str-len) ; bad format string.
|
|
1126
|
+
(time-error 'date-printer
|
|
1127
|
+
'bad-date-format-string
|
|
1128
|
+
format-string)
|
|
1129
|
+
(let ((formatter (get-formatter
|
|
1130
|
+
(string-ref format-string
|
|
1131
|
+
(+ index 2)))))
|
|
1132
|
+
(if (not formatter)
|
|
1133
|
+
(time-error 'date-printer
|
|
1134
|
+
'bad-date-format-string
|
|
1135
|
+
format-string)
|
|
1136
|
+
(begin
|
|
1137
|
+
(formatter date #\Space port)
|
|
1138
|
+
(date-printer date
|
|
1139
|
+
(+ index 3)
|
|
1140
|
+
format-string
|
|
1141
|
+
str-len
|
|
1142
|
+
port))))))
|
|
1143
|
+
(else
|
|
1144
|
+
(let ((formatter (get-formatter
|
|
1145
|
+
(string-ref format-string
|
|
1146
|
+
(+ index 1)))))
|
|
1147
|
+
(if (not formatter)
|
|
1148
|
+
(time-error 'date-printer
|
|
1149
|
+
'bad-date-format-string
|
|
1150
|
+
format-string)
|
|
1151
|
+
(begin
|
|
1152
|
+
(formatter date #\0 port)
|
|
1153
|
+
(date-printer date
|
|
1154
|
+
(+ index 2)
|
|
1155
|
+
format-string
|
|
1156
|
+
str-len
|
|
1157
|
+
port))))))))))))
|
|
1158
|
+
|
|
1159
|
+
|
|
1160
|
+
(define (date->string date . format-string)
|
|
1161
|
+
(let ((str-port (open-output-string))
|
|
1162
|
+
(fmt-str (if (null? format-string) "~c" (car format-string))))
|
|
1163
|
+
(date-printer date 0 fmt-str (string-length fmt-str) str-port)
|
|
1164
|
+
(get-output-string str-port)))
|
|
1165
|
+
|
|
1166
|
+
(define (char->int ch)
|
|
1167
|
+
(case ch
|
|
1168
|
+
((#\0) 0)
|
|
1169
|
+
((#\1) 1)
|
|
1170
|
+
((#\2) 2)
|
|
1171
|
+
((#\3) 3)
|
|
1172
|
+
((#\4) 4)
|
|
1173
|
+
((#\5) 5)
|
|
1174
|
+
((#\6) 6)
|
|
1175
|
+
((#\7) 7)
|
|
1176
|
+
((#\8) 8)
|
|
1177
|
+
((#\9) 9)
|
|
1178
|
+
(else (time-error 'char->int 'bad-date-template-string
|
|
1179
|
+
(list "Non-integer character" ch)))))
|
|
1180
|
+
|
|
1181
|
+
;; read an integer upto n characters long on port; upto -> #f is any length
|
|
1182
|
+
(define (integer-reader upto port)
|
|
1183
|
+
(let loop ((accum 0) (nchars 0))
|
|
1184
|
+
(let ((ch (peek-char port)))
|
|
1185
|
+
(if (or (eof-object? ch)
|
|
1186
|
+
(not (char-numeric? ch))
|
|
1187
|
+
(and upto (>= nchars upto)))
|
|
1188
|
+
accum
|
|
1189
|
+
(loop (+ (* accum 10) (char->int (read-char port)))
|
|
1190
|
+
(+ nchars 1))))))
|
|
1191
|
+
|
|
1192
|
+
(define (make-integer-reader upto)
|
|
1193
|
+
(lambda (port)
|
|
1194
|
+
(integer-reader upto port)))
|
|
1195
|
+
|
|
1196
|
+
;; read an fractional integer upto n characters long on port; upto -> #f if any length
|
|
1197
|
+
;;
|
|
1198
|
+
;; The return value is normalized to upto decimal places. For example, if upto is 9 and
|
|
1199
|
+
;; the string read is "123", the return value is 123000000.
|
|
1200
|
+
(define (fractional-integer-reader upto port)
|
|
1201
|
+
(define (accum-int port accum nchars)
|
|
1202
|
+
(let ((ch (peek-char port)))
|
|
1203
|
+
(if (or (eof-object? ch)
|
|
1204
|
+
(not (char-numeric? ch))
|
|
1205
|
+
(and upto (>= nchars upto)))
|
|
1206
|
+
(* accum (expt 10 (- upto nchars)))
|
|
1207
|
+
(accum-int port (+ (* accum 10) (char->int (read-char port))) (+ nchars 1)))))
|
|
1208
|
+
(accum-int port 0 0))
|
|
1209
|
+
|
|
1210
|
+
(define (make-fractional-integer-reader upto)
|
|
1211
|
+
(lambda (port)
|
|
1212
|
+
(fractional-integer-reader upto port)))
|
|
1213
|
+
|
|
1214
|
+
;; read *exactly* n characters and convert to integer; could be padded
|
|
1215
|
+
(define (integer-reader-exact n port)
|
|
1216
|
+
(let ((padding-ok #t))
|
|
1217
|
+
(define (accum-int port accum nchars)
|
|
1218
|
+
(let ((ch (peek-char port)))
|
|
1219
|
+
(cond
|
|
1220
|
+
((>= nchars n) accum)
|
|
1221
|
+
((eof-object? ch)
|
|
1222
|
+
(time-error 'string->date 'bad-date-template-string
|
|
1223
|
+
"Premature ending to integer read."))
|
|
1224
|
+
((char-numeric? ch)
|
|
1225
|
+
(set! padding-ok #f)
|
|
1226
|
+
(accum-int port
|
|
1227
|
+
(+ (* accum 10) (char->int (read-char port)))
|
|
1228
|
+
(+ nchars 1)))
|
|
1229
|
+
(padding-ok
|
|
1230
|
+
(read-char port) ; consume padding
|
|
1231
|
+
(accum-int port accum (+ nchars 1)))
|
|
1232
|
+
(else ; padding where it shouldn't be
|
|
1233
|
+
(time-error 'string->date 'bad-date-template-string
|
|
1234
|
+
"Non-numeric characters in integer read.")))))
|
|
1235
|
+
(accum-int port 0 0)))
|
|
1236
|
+
|
|
1237
|
+
|
|
1238
|
+
(define (make-integer-exact-reader n)
|
|
1239
|
+
(lambda (port)
|
|
1240
|
+
(integer-reader-exact n port)))
|
|
1241
|
+
|
|
1242
|
+
(define (zone-reader port)
|
|
1243
|
+
(let ((offset 0)
|
|
1244
|
+
(positive? #f))
|
|
1245
|
+
(let ((ch (read-char port)))
|
|
1246
|
+
(if (eof-object? ch)
|
|
1247
|
+
(time-error 'string->date 'bad-date-template-string
|
|
1248
|
+
(list "Invalid time zone +/-" ch)))
|
|
1249
|
+
(if (or (char=? ch #\Z) (char=? ch #\z))
|
|
1250
|
+
0
|
|
1251
|
+
(begin
|
|
1252
|
+
(cond
|
|
1253
|
+
((char=? ch #\+) (set! positive? #t))
|
|
1254
|
+
((char=? ch #\-) (set! positive? #f))
|
|
1255
|
+
(else
|
|
1256
|
+
(time-error 'string->date 'bad-date-template-string
|
|
1257
|
+
(list "Invalid time zone +/-" ch))))
|
|
1258
|
+
(let ((ch (read-char port)))
|
|
1259
|
+
(if (eof-object? ch)
|
|
1260
|
+
(time-error 'string->date 'bad-date-template-string
|
|
1261
|
+
(list "Invalid time zone number" ch)))
|
|
1262
|
+
(set! offset (* (char->int ch)
|
|
1263
|
+
10 60 60)))
|
|
1264
|
+
(let ((ch (read-char port)))
|
|
1265
|
+
(if (eof-object? ch)
|
|
1266
|
+
(time-error 'string->date 'bad-date-template-string
|
|
1267
|
+
(list "Invalid time zone number" ch)))
|
|
1268
|
+
(set! offset (+ offset (* (char->int ch)
|
|
1269
|
+
60 60))))
|
|
1270
|
+
(let ((ch (read-char port)))
|
|
1271
|
+
(if (eof-object? ch)
|
|
1272
|
+
(time-error 'string->date 'bad-date-template-string
|
|
1273
|
+
(list "Invalid time zone number" ch)))
|
|
1274
|
+
(set! offset (+ offset (* (char->int ch)
|
|
1275
|
+
10 60))))
|
|
1276
|
+
(let ((ch (read-char port)))
|
|
1277
|
+
(if (eof-object? ch)
|
|
1278
|
+
(time-error 'string->date 'bad-date-template-string
|
|
1279
|
+
(list "Invalid time zone number" ch)))
|
|
1280
|
+
(set! offset (+ offset (* (char->int ch)
|
|
1281
|
+
60))))
|
|
1282
|
+
(if positive? offset (- offset)))))))
|
|
1283
|
+
|
|
1284
|
+
;; looking at a char, read the char string, run thru indexer, return index
|
|
1285
|
+
(define (locale-reader port indexer)
|
|
1286
|
+
|
|
1287
|
+
(define (read-char-string result)
|
|
1288
|
+
(let ((ch (peek-char port)))
|
|
1289
|
+
(if (char-alphabetic? ch)
|
|
1290
|
+
(read-char-string (cons (read-char port) result))
|
|
1291
|
+
(list->string (reverse! result)))))
|
|
1292
|
+
|
|
1293
|
+
(let* ((str (read-char-string '()))
|
|
1294
|
+
(index (indexer str)))
|
|
1295
|
+
(if index index (time-error 'string->date
|
|
1296
|
+
'bad-date-template-string
|
|
1297
|
+
(list "Invalid string for " indexer)))))
|
|
1298
|
+
|
|
1299
|
+
(define (make-locale-reader indexer)
|
|
1300
|
+
(lambda (port)
|
|
1301
|
+
(locale-reader port indexer)))
|
|
1302
|
+
|
|
1303
|
+
(define (make-char-id-reader char)
|
|
1304
|
+
(lambda (port)
|
|
1305
|
+
(if (char=? char (read-char port))
|
|
1306
|
+
char
|
|
1307
|
+
(time-error 'string->date
|
|
1308
|
+
'bad-date-template-string
|
|
1309
|
+
"Invalid character match."))))
|
|
1310
|
+
|
|
1311
|
+
;; A List of formatted read directives.
|
|
1312
|
+
;; Each entry is a list.
|
|
1313
|
+
;; 1. the character directive;
|
|
1314
|
+
;; a procedure, which takes a character as input & returns
|
|
1315
|
+
;; 2. #t as soon as a character on the input port is acceptable
|
|
1316
|
+
;; for input,
|
|
1317
|
+
;; 3. a port reader procedure that knows how to read the current port
|
|
1318
|
+
;; for a value. Its one parameter is the port.
|
|
1319
|
+
;; 4. an optional action procedure, that takes the value (from 3.) and
|
|
1320
|
+
;; some object (here, always the date) and (probably) side-effects it.
|
|
1321
|
+
;; If no action is required, as with ~A, this element may be #f.
|
|
1322
|
+
|
|
1323
|
+
(define read-directives
|
|
1324
|
+
(let ((ireader4 (make-integer-reader 4))
|
|
1325
|
+
(ireader2 (make-integer-reader 2))
|
|
1326
|
+
(fireader9 (make-fractional-integer-reader 9))
|
|
1327
|
+
(eireader2 (make-integer-exact-reader 2))
|
|
1328
|
+
(locale-reader-abbr-weekday (make-locale-reader
|
|
1329
|
+
locale-abbr-weekday->index))
|
|
1330
|
+
(locale-reader-long-weekday (make-locale-reader
|
|
1331
|
+
locale-long-weekday->index))
|
|
1332
|
+
(locale-reader-abbr-month (make-locale-reader
|
|
1333
|
+
locale-abbr-month->index))
|
|
1334
|
+
(locale-reader-long-month (make-locale-reader
|
|
1335
|
+
locale-long-month->index))
|
|
1336
|
+
(char-fail (lambda (ch) #t)))
|
|
1337
|
+
|
|
1338
|
+
(list
|
|
1339
|
+
(list #\~ char-fail (make-char-id-reader #\~) #f)
|
|
1340
|
+
(list #\a char-alphabetic? locale-reader-abbr-weekday #f)
|
|
1341
|
+
(list #\A char-alphabetic? locale-reader-long-weekday #f)
|
|
1342
|
+
(list #\b char-alphabetic? locale-reader-abbr-month
|
|
1343
|
+
(lambda (val object)
|
|
1344
|
+
(set-date-month! object val)))
|
|
1345
|
+
(list #\B char-alphabetic? locale-reader-long-month
|
|
1346
|
+
(lambda (val object)
|
|
1347
|
+
(set-date-month! object val)))
|
|
1348
|
+
(list #\d char-numeric? ireader2 (lambda (val object)
|
|
1349
|
+
(set-date-day!
|
|
1350
|
+
object val)))
|
|
1351
|
+
(list #\e char-fail eireader2 (lambda (val object)
|
|
1352
|
+
(set-date-day! object val)))
|
|
1353
|
+
(list #\h char-alphabetic? locale-reader-abbr-month
|
|
1354
|
+
(lambda (val object)
|
|
1355
|
+
(set-date-month! object val)))
|
|
1356
|
+
(list #\H char-numeric? ireader2 (lambda (val object)
|
|
1357
|
+
(set-date-hour! object val)))
|
|
1358
|
+
(list #\k char-fail eireader2 (lambda (val object)
|
|
1359
|
+
(set-date-hour! object val)))
|
|
1360
|
+
(list #\m char-numeric? ireader2 (lambda (val object)
|
|
1361
|
+
(set-date-month! object val)))
|
|
1362
|
+
(list #\M char-numeric? ireader2 (lambda (val object)
|
|
1363
|
+
(set-date-minute!
|
|
1364
|
+
object val)))
|
|
1365
|
+
(list #\N char-numeric? fireader9 (lambda (val object)
|
|
1366
|
+
(set-date-nanosecond!
|
|
1367
|
+
object val)))
|
|
1368
|
+
(list #\S char-numeric? ireader2 (lambda (val object)
|
|
1369
|
+
(set-date-second! object val)))
|
|
1370
|
+
(list #\y char-fail eireader2
|
|
1371
|
+
(lambda (val object)
|
|
1372
|
+
(set-date-year! object (natural-year val))))
|
|
1373
|
+
|
|
1374
|
+
;; XXX FIXME: Support the extended year format used by
|
|
1375
|
+
;; 'date->string' when the year is not in the range 0-9999.
|
|
1376
|
+
(list #\Y char-numeric? ireader4 (lambda (val object)
|
|
1377
|
+
(set-date-year! object val)))
|
|
1378
|
+
|
|
1379
|
+
(list #\z (lambda (c)
|
|
1380
|
+
(or (char=? c #\Z)
|
|
1381
|
+
(char=? c #\z)
|
|
1382
|
+
(char=? c #\+)
|
|
1383
|
+
(char=? c #\-)))
|
|
1384
|
+
zone-reader (lambda (val object)
|
|
1385
|
+
(set-date-zone-offset! object val))))))
|
|
1386
|
+
|
|
1387
|
+
(define (priv:string->date date index format-string str-len port template-string)
|
|
1388
|
+
(define (skip-until port skipper)
|
|
1389
|
+
(let ((ch (peek-char port)))
|
|
1390
|
+
(if (eof-object? ch)
|
|
1391
|
+
(time-error 'string->date 'bad-date-format-string template-string)
|
|
1392
|
+
(if (not (skipper ch))
|
|
1393
|
+
(begin (read-char port) (skip-until port skipper))))))
|
|
1394
|
+
(if (< index str-len)
|
|
1395
|
+
(let ((current-char (string-ref format-string index)))
|
|
1396
|
+
(if (not (char=? current-char #\~))
|
|
1397
|
+
(let ((port-char (read-char port)))
|
|
1398
|
+
(if (or (eof-object? port-char)
|
|
1399
|
+
(not (char=? current-char port-char)))
|
|
1400
|
+
(time-error 'string->date
|
|
1401
|
+
'bad-date-format-string template-string))
|
|
1402
|
+
(priv:string->date date
|
|
1403
|
+
(+ index 1)
|
|
1404
|
+
format-string
|
|
1405
|
+
str-len
|
|
1406
|
+
port
|
|
1407
|
+
template-string))
|
|
1408
|
+
;; otherwise, it's an escape, we hope
|
|
1409
|
+
(if (> (+ index 1) str-len)
|
|
1410
|
+
(time-error 'string->date
|
|
1411
|
+
'bad-date-format-string template-string)
|
|
1412
|
+
(let* ((format-char (string-ref format-string (+ index 1)))
|
|
1413
|
+
(format-info (assoc format-char read-directives)))
|
|
1414
|
+
(if (not format-info)
|
|
1415
|
+
(time-error 'string->date
|
|
1416
|
+
'bad-date-format-string template-string)
|
|
1417
|
+
(begin
|
|
1418
|
+
(let ((skipper (cadr format-info))
|
|
1419
|
+
(reader (caddr format-info))
|
|
1420
|
+
(actor (cadddr format-info)))
|
|
1421
|
+
(skip-until port skipper)
|
|
1422
|
+
(let ((val (reader port)))
|
|
1423
|
+
(if (eof-object? val)
|
|
1424
|
+
(time-error 'string->date
|
|
1425
|
+
'bad-date-format-string
|
|
1426
|
+
template-string)
|
|
1427
|
+
(if actor (actor val date))))
|
|
1428
|
+
(priv:string->date date
|
|
1429
|
+
(+ index 2)
|
|
1430
|
+
format-string
|
|
1431
|
+
str-len
|
|
1432
|
+
port
|
|
1433
|
+
template-string))))))))))
|
|
1434
|
+
|
|
1435
|
+
(define (string->date input-string template-string)
|
|
1436
|
+
(define (date-ok? date)
|
|
1437
|
+
(and (date-nanosecond date)
|
|
1438
|
+
(date-second date)
|
|
1439
|
+
(date-minute date)
|
|
1440
|
+
(date-hour date)
|
|
1441
|
+
(date-day date)
|
|
1442
|
+
(date-month date)
|
|
1443
|
+
(date-year date)
|
|
1444
|
+
(date-zone-offset date)))
|
|
1445
|
+
(let ((newdate (make-date 0 0 0 0 #f #f #f #f)))
|
|
1446
|
+
(priv:string->date newdate
|
|
1447
|
+
0
|
|
1448
|
+
template-string
|
|
1449
|
+
(string-length template-string)
|
|
1450
|
+
(open-input-string input-string)
|
|
1451
|
+
template-string)
|
|
1452
|
+
(if (not (date-zone-offset newdate))
|
|
1453
|
+
(begin
|
|
1454
|
+
;; this is necessary to get DST right -- as far as we can
|
|
1455
|
+
;; get it right (think of the double/missing hour in the
|
|
1456
|
+
;; night when we are switching between normal time and DST).
|
|
1457
|
+
(set-date-zone-offset! newdate
|
|
1458
|
+
(local-tz-offset
|
|
1459
|
+
(make-time time-utc 0 0)))
|
|
1460
|
+
(set-date-zone-offset! newdate
|
|
1461
|
+
(local-tz-offset
|
|
1462
|
+
(date->time-utc newdate)))))
|
|
1463
|
+
(if (date-ok? newdate)
|
|
1464
|
+
newdate
|
|
1465
|
+
(time-error
|
|
1466
|
+
'string->date
|
|
1467
|
+
'bad-date-format-string
|
|
1468
|
+
(list "Incomplete date read. " newdate template-string)))))
|
|
1469
|
+
|
|
1470
|
+
;;; srfi-19.scm ends here
|