├── .dir-locals.el ├── .gitignore ├── .gnuploadrc ├── .x-sc_GPL_version ├── .x-sc_avoid_if_before_free ├── .x-sc_bindtextdomain ├── .x-sc_cast_of_alloca_return_value ├── .x-sc_cast_of_argument_to_free ├── .x-sc_error_message_period ├── .x-sc_error_message_uppercase ├── .x-sc_error_message_warn_fatal ├── .x-sc_m4_quote_check ├── .x-sc_makefile_check ├── .x-sc_obsolete_symbols ├── .x-sc_program_name ├── .x-sc_prohibit_S_IS_definition ├── .x-sc_prohibit_atoi_atof ├── .x-sc_prohibit_doubled_word ├── .x-sc_prohibit_have_config_h ├── .x-sc_prohibit_magic_number_exit ├── .x-sc_prohibit_path_max_allocation ├── .x-sc_prohibit_strcmp ├── ABOUT-NLS ├── ANNOUNCE ├── AUTHORS ├── COPYING ├── COPYING.LESSER ├── ChangeLog ├── ChangeLog-2008 ├── GNUmakefile ├── GUILE-VERSION ├── HACKING ├── LICENSE ├── Makefile.am ├── NEWS ├── NEWS.guile-vm ├── README ├── README.guile-vm ├── THANKS ├── THANKS.guile-vm ├── acinclude.m4 ├── am ├── ChangeLog-2008 ├── Makefile.am ├── README ├── guilec ├── maintainer-dirs └── snarf ├── autogen.sh ├── benchmark-guile.in ├── benchmark-suite ├── ChangeLog-2008 ├── Makefile.am ├── README ├── benchmark-suite │ └── lib.scm ├── benchmarks │ ├── 0-reference.bm │ ├── arithmetic.bm │ ├── bytevectors.bm │ ├── chars.bm │ ├── continuations.bm │ ├── hash.bm │ ├── if.bm │ ├── logand.bm │ ├── ports.bm │ ├── r6rs-arithmetic.bm │ ├── read.bm │ ├── srfi-1.bm │ ├── srfi-13.bm │ ├── strings.bm │ ├── structs.bm │ ├── subr.bm │ ├── uniform-vector-read.bm │ ├── vectors.bm │ ├── vlists.bm │ └── write.bm ├── guile-benchmark └── results │ └── neil-arudy ├── benchmark ├── lib.scm └── measure.scm ├── build-aux ├── .gitignore ├── announce-gen ├── config.rpath ├── gendocs.sh ├── git-version-gen ├── gitlog-to-changelog ├── gnu-web-doc-update ├── gnupload ├── snippet │ ├── _Noreturn.h │ ├── arg-nonnull.h │ ├── c++defs.h │ └── warn-on-use.h ├── useless-if-before-free └── vc-list-files ├── cfg.mk ├── check-guile.in ├── config.rpath ├── configure.ac ├── doc ├── .gitignore ├── BUGS ├── ChangeLog-2008 ├── ChangeLog-guile-doc ├── Makefile.am ├── NEWS ├── README ├── THANKS ├── gendocs_template ├── gendocs_template_min ├── goops.mail ├── groupings.alist ├── guile-api.alist ├── guile.1 ├── hacks.el ├── maint │ ├── ChangeLog-2008 │ ├── README │ ├── docstring.el │ └── guile.texi ├── r5rs │ ├── ChangeLog-2008 │ ├── Makefile.am │ └── r5rs.texi ├── recipe-guidelines.txt ├── ref │ ├── .gitignore │ ├── ChangeLog-2008 │ ├── ChangeLog-goops-2008 │ ├── ChangeLog-guile-doc-ref │ ├── Makefile.am │ ├── api-binding.texi │ ├── api-compound.texi │ ├── api-control.texi │ ├── api-coverage.texi │ ├── api-data.texi │ ├── api-debug.texi │ ├── api-deprecated.texi │ ├── api-evaluation.texi │ ├── api-foreign.texi │ ├── api-i18n.texi │ ├── api-init.texi │ ├── api-io.texi │ ├── api-lalr.texi │ ├── api-languages.texi │ ├── api-macros.texi │ ├── api-memory.texi │ ├── api-modules.texi │ ├── api-options.texi │ ├── api-overview.texi │ ├── api-procedures.texi │ ├── api-regex.texi │ ├── api-scheduling.texi │ ├── api-scm.texi │ ├── api-smobs.texi │ ├── api-snarf.texi │ ├── api-undocumented.texi │ ├── api-utility.texi │ ├── api.txt │ ├── compiler.texi │ ├── curried.texi │ ├── data-rep.texi │ ├── effective-version.texi.in │ ├── expect.texi │ ├── fdl.texi │ ├── gds.dia │ ├── gds.eps │ ├── gds.pdf │ ├── gds.txt │ ├── goops-tutorial.texi │ ├── goops.texi │ ├── guile-invoke.texi │ ├── guile.texi │ ├── hierarchy.dot │ ├── hierarchy.eps │ ├── hierarchy.pdf │ ├── hierarchy.png │ ├── hierarchy.txt │ ├── history.texi │ ├── indices.texi │ ├── intro.texi │ ├── libguile-autoconf.texi │ ├── libguile-concepts.texi │ ├── libguile-extensions.texi │ ├── libguile-linking.texi │ ├── libguile-parallel.texi │ ├── libguile-program.texi │ ├── libguile-smobs.texi │ ├── libguile-snarf.texi │ ├── match.texi │ ├── misc-modules.texi │ ├── mod-getopt-long.texi │ ├── mop.text │ ├── new-docstrings.texi │ ├── posix.texi │ ├── preface.texi │ ├── r6rs.texi │ ├── repl-modules.texi │ ├── scheme-ideas.texi │ ├── scheme-indices.texi │ ├── scheme-intro.texi │ ├── scheme-reading.texi │ ├── scheme-scripts.texi │ ├── scheme-using.texi │ ├── scheme.dia │ ├── scheme.eps │ ├── scheme.pdf │ ├── scheme.txt │ ├── scsh.texi │ ├── slib.texi │ ├── srfi-modules.texi │ ├── statprof.texi │ ├── sxml-match.texi │ ├── sxml.texi │ ├── texinfo.texi │ ├── tools.texi │ ├── tour.texi │ ├── vm.texi │ └── web.texi ├── release.org ├── texinfo.tex ├── use-cases.fig └── use-cases.txt ├── emacs ├── ChangeLog-2008 ├── Makefile.am ├── README ├── gud-guile.el ├── guile-c.el ├── guile-emacs.scm ├── guile-scheme.el ├── guile.el ├── multistring.el ├── patch.el ├── ppexpand.el └── update-changelog.el ├── examples ├── ChangeLog-2008 ├── Makefile.am ├── README ├── box-dynamic-module │ ├── README │ ├── box-mixed.scm │ ├── box-module.scm │ └── box.c ├── box-dynamic │ ├── README │ └── box.c ├── box-module │ ├── README │ └── box.c ├── box │ ├── README │ └── box.c ├── check.test ├── compat │ ├── acconfig.h │ ├── acinclude.m4 │ ├── compat.h │ └── configure.in ├── modules │ ├── README │ ├── main │ ├── module-0.scm │ ├── module-1.scm │ └── module-2.scm ├── safe │ ├── README │ ├── evil.scm │ ├── safe │ └── untrusted.scm ├── scripts │ ├── README │ ├── fact │ ├── hello │ └── simple-hello.scm └── web │ ├── debug-sxml.scm │ └── hello.scm ├── gc-benchmarks ├── Makefile.am ├── gc-profile.scm ├── gcbench.scm ├── guile-test.scm ├── larceny │ ├── GPL │ ├── README │ ├── dumb.sch │ ├── dummy.sch │ ├── dynamic-input-large.sch │ ├── dynamic-input-small.sch │ ├── dynamic.sch │ ├── earley.sch │ ├── gcbench.sch │ ├── gcold.scm │ ├── graphs.sch │ ├── lattice.sch │ ├── nboyer.sch │ ├── nucleic2.sch │ ├── perm.sch │ ├── run-benchmark.chez │ ├── sboyer.sch │ ├── softscheme.sch │ ├── twobit-input-long.sch │ ├── twobit-input-short.sch │ ├── twobit-smaller.sch │ └── twobit.sch ├── loop.scm ├── run-benchmark.scm └── string.scm ├── gdbinit ├── gnulib-local ├── build-aux │ └── git-version-gen.diff ├── lib │ ├── localcharset.c.diff │ └── localcharset.h.diff └── m4 │ └── clock_time.m4.diff ├── guile-readline ├── ChangeLog-2008 ├── LIBGUILEREADLINE-VERSION ├── Makefile.am ├── ice-9 │ └── readline.scm ├── readline.c └── readline.h ├── lib ├── Makefile.am ├── accept.c ├── alignof.h ├── alloca.c ├── alloca.in.h ├── arpa_inet.in.h ├── asnprintf.c ├── assure.h ├── basename-lgpl.c ├── binary-io.c ├── binary-io.h ├── bind.c ├── btowc.c ├── byteswap.in.h ├── c-ctype.c ├── c-ctype.h ├── c-strcase.h ├── c-strcasecmp.c ├── c-strcaseeq.h ├── c-strncasecmp.c ├── canonicalize-lgpl.c ├── ceil.c ├── close.c ├── config.charset ├── connect.c ├── copysign.c ├── dirent.in.h ├── dirfd.c ├── dirname-lgpl.c ├── dirname.h ├── dosname.h ├── dup2.c ├── duplocale.c ├── errno.in.h ├── fcntl.in.h ├── fd-hook.c ├── fd-hook.h ├── float+.h ├── float.c ├── float.in.h ├── flock.c ├── floor.c ├── frexp.c ├── fstat.c ├── fsync.c ├── full-read.c ├── full-read.h ├── full-write.c ├── full-write.h ├── gai_strerror.c ├── getaddrinfo.c ├── getlogin.c ├── getpeername.c ├── getsockname.c ├── getsockopt.c ├── gettext.h ├── gettimeofday.c ├── glthread │ └── lock.h ├── hard-locale.c ├── hard-locale.h ├── iconv.c ├── iconv.in.h ├── iconv_close.c ├── iconv_open-aix.gperf ├── iconv_open-aix.h ├── iconv_open-hpux.gperf ├── iconv_open-hpux.h ├── iconv_open-irix.gperf ├── iconv_open-irix.h ├── iconv_open-osf.gperf ├── iconv_open-osf.h ├── iconv_open-solaris.gperf ├── iconv_open-solaris.h ├── iconv_open.c ├── iconveh.h ├── ignore-value.h ├── inet_ntop.c ├── inet_pton.c ├── intprops.h ├── isfinite.c ├── isinf.c ├── isnan.c ├── isnand-nolibm.h ├── isnand.c ├── isnanf-nolibm.h ├── isnanf.c ├── isnanl-nolibm.h ├── isnanl.c ├── itold.c ├── langinfo.in.h ├── libunistring.valgrind ├── link.c ├── listen.c ├── localcharset.c ├── localcharset.h ├── locale.in.h ├── localeconv.c ├── log.c ├── log1p.c ├── lstat.c ├── malloc.c ├── malloca.c ├── malloca.h ├── malloca.valgrind ├── math.c ├── math.in.h ├── mbrtowc.c ├── mbsinit.c ├── mbtowc-impl.h ├── mbtowc.c ├── memchr.c ├── memchr.valgrind ├── mkdir.c ├── mkostemp.c ├── mktime-internal.h ├── mktime.c ├── msvc-inval.c ├── msvc-inval.h ├── msvc-nothrow.c ├── msvc-nothrow.h ├── netdb.in.h ├── netinet_in.in.h ├── nl_langinfo.c ├── nproc.c ├── nproc.h ├── open.c ├── pathmax.h ├── pipe.c ├── pipe2.c ├── poll.c ├── poll.in.h ├── printf-args.c ├── printf-args.h ├── printf-parse.c ├── printf-parse.h ├── putenv.c ├── raise.c ├── read.c ├── readlink.c ├── recv.c ├── recvfrom.c ├── ref-add.sin ├── ref-del.sin ├── regcomp.c ├── regex.c ├── regex.h ├── regex_internal.c ├── regex_internal.h ├── regexec.c ├── rename.c ├── rmdir.c ├── round.c ├── safe-read.c ├── safe-read.h ├── safe-write.c ├── safe-write.h ├── same-inode.h ├── secure_getenv.c ├── select.c ├── send.c ├── sendto.c ├── setenv.c ├── setsockopt.c ├── shutdown.c ├── signal.in.h ├── signbitd.c ├── signbitf.c ├── signbitl.c ├── size_max.h ├── snprintf.c ├── socket.c ├── sockets.c ├── sockets.h ├── stat-time.c ├── stat-time.h ├── stat.c ├── stdalign.in.h ├── stdbool.in.h ├── stddef.in.h ├── stdint.in.h ├── stdio.in.h ├── stdlib.in.h ├── strdup.c ├── streq.h ├── strftime.c ├── strftime.h ├── striconveh.c ├── striconveh.h ├── string.in.h ├── stripslash.c ├── sys_file.in.h ├── sys_select.in.h ├── sys_socket.c ├── sys_socket.in.h ├── sys_stat.in.h ├── sys_time.in.h ├── sys_times.in.h ├── sys_types.in.h ├── sys_uio.in.h ├── tempname.c ├── tempname.h ├── time-internal.h ├── time.in.h ├── time_r.c ├── time_rz.c ├── timegm.c ├── times.c ├── trunc.c ├── unistd.c ├── unistd.in.h ├── unsetenv.c ├── vasnprintf.c ├── vasnprintf.h ├── verify.h ├── vsnprintf.c ├── w32sock.h ├── wchar.in.h ├── wcrtomb.c ├── wctype-h.c ├── wctype.in.h ├── write.c ├── xsize.c └── xsize.h ├── libguile.h ├── libguile ├── .gitignore ├── ChangeLog-1996-1999 ├── ChangeLog-2000 ├── ChangeLog-2008 ├── ChangeLog-scm ├── ChangeLog-srfi ├── ChangeLog-threads ├── Makefile.am ├── __scm.h ├── _scm.h ├── alist.c ├── alist.h ├── arbiters.c ├── arbiters.h ├── array-handle.c ├── array-handle.h ├── array-map.c ├── array-map.h ├── arrays.c ├── arrays.h ├── async.c ├── async.h ├── backtrace.c ├── backtrace.h ├── bdw-gc.h ├── bitvectors.c ├── bitvectors.h ├── boolean.c ├── boolean.h ├── bytevectors.c ├── bytevectors.h ├── c-tokenize.lex ├── chars.c ├── chars.h ├── continuations.c ├── continuations.h ├── control.c ├── control.h ├── conv-integer.i.c ├── conv-uinteger.i.c ├── cpp-E.syms ├── cpp-SIG.syms ├── debug-malloc.c ├── debug-malloc.h ├── debug.c ├── debug.h ├── deprecated.c ├── deprecated.h ├── deprecation.c ├── deprecation.h ├── dynl.c ├── dynl.h ├── dynwind.c ├── dynwind.h ├── eq.c ├── eq.h ├── error.c ├── error.h ├── eval.c ├── eval.h ├── evalext.c ├── evalext.h ├── expand.c ├── expand.h ├── extensions.c ├── extensions.h ├── feature.c ├── feature.h ├── filesys.c ├── filesys.h ├── finalizers.c ├── finalizers.h ├── fluids.c ├── fluids.h ├── foreign.c ├── foreign.h ├── fports.c ├── fports.h ├── frames.c ├── frames.h ├── gc-malloc.c ├── gc.c ├── gc.h ├── gdb_interface.h ├── gdbint.c ├── gdbint.h ├── gen-scmconfig.c ├── gen-scmconfig.h.in ├── generalized-arrays.c ├── generalized-arrays.h ├── generalized-vectors.c ├── generalized-vectors.h ├── gettext.c ├── gettext.h ├── goops.c ├── goops.h ├── gsubr.c ├── gsubr.h ├── guardians.c ├── guardians.h ├── guile-func-name-check ├── guile-snarf-docs.in ├── guile-snarf.awk.in ├── guile-snarf.in ├── guile.c ├── hash.c ├── hash.h ├── hashtab.c ├── hashtab.h ├── hooks.c ├── hooks.h ├── i18n.c ├── i18n.h ├── init.c ├── init.h ├── inline.c ├── inline.h ├── instructions.c ├── instructions.h ├── ioext.c ├── ioext.h ├── iselect.h ├── keywords.c ├── keywords.h ├── libgettext.h ├── libguile-2.0-gdb.scm ├── libguile.map ├── list.c ├── list.h ├── load.c ├── load.h ├── locale-categories.h ├── macros.c ├── macros.h ├── mallocs.c ├── mallocs.h ├── memmove.c ├── memoize.c ├── memoize.h ├── modules.c ├── modules.h ├── net_db.c ├── net_db.h ├── null-threads.c ├── null-threads.h ├── numbers.c ├── numbers.h ├── objcodes.c ├── objcodes.h ├── objprop.c ├── objprop.h ├── options.c ├── options.h ├── pairs.c ├── pairs.h ├── poll.c ├── poll.h ├── ports-internal.h ├── ports.c ├── ports.h ├── posix-w32.c ├── posix-w32.h ├── posix.c ├── posix.h ├── print.c ├── print.h ├── private-gc.h ├── private-options.h ├── procprop.c ├── procprop.h ├── procs.c ├── procs.h ├── programs.c ├── programs.h ├── promises.c ├── promises.h ├── pthread-threads.h ├── quicksort.i.c ├── r6rs-ports.c ├── r6rs-ports.h ├── random.c ├── random.h ├── rdelim.c ├── rdelim.h ├── read.c ├── read.h ├── regex-posix.c ├── regex-posix.h ├── remaining-docs-needed ├── root.c ├── root.h ├── run-test ├── rw.c ├── rw.h ├── scmconfig.h.top ├── scmsigs.c ├── scmsigs.h ├── script.c ├── script.h ├── simpos.c ├── simpos.h ├── smob.c ├── smob.h ├── snarf.h ├── socket.c ├── socket.h ├── sort.c ├── sort.h ├── srcprop.c ├── srcprop.h ├── srfi-1.c ├── srfi-1.h ├── srfi-13.c ├── srfi-13.h ├── srfi-14.c ├── srfi-14.h ├── srfi-14.i.c ├── srfi-4.c ├── srfi-4.h ├── srfi-60.c ├── srfi-60.h ├── stackchk.c ├── stackchk.h ├── stacks.c ├── stacks.h ├── stime.c ├── stime.h ├── strerror.c ├── strings.c ├── strings.h ├── strorder.c ├── strorder.h ├── strports.c ├── strports.h ├── struct.c ├── struct.h ├── symbols.c ├── symbols.h ├── tags.h ├── texi-fragments-to-docstrings ├── threads.c ├── threads.h ├── throw.c ├── throw.h ├── trees.c ├── trees.h ├── unicode.c ├── unicode.h ├── unidata_to_charset.pl ├── uniform.c ├── uniform.h ├── validate.h ├── values.c ├── values.h ├── variable.c ├── variable.h ├── vectors.c ├── vectors.h ├── version.c ├── version.h.in ├── vm-engine.c ├── vm-engine.h ├── vm-expand.h ├── vm-i-loader.c ├── vm-i-scheme.c ├── vm-i-system.c ├── vm.c ├── vm.h ├── vports.c ├── vports.h ├── weaks.c └── weaks.h ├── m4 ├── .gitignore ├── 00gnulib.m4 ├── ChangeLog-2008 ├── absolute-header.m4 ├── alloca.m4 ├── arpa_inet_h.m4 ├── autobuild.m4 ├── btowc.m4 ├── byteswap.m4 ├── canonicalize.m4 ├── ceil.m4 ├── check-math-lib.m4 ├── clock_time.m4 ├── close.m4 ├── codeset.m4 ├── configmake.m4 ├── copysign.m4 ├── dirent_h.m4 ├── dirfd.m4 ├── dirname.m4 ├── double-slash-root.m4 ├── dup2.m4 ├── duplocale.m4 ├── eealloc.m4 ├── environ.m4 ├── errno_h.m4 ├── exponentd.m4 ├── exponentf.m4 ├── exponentl.m4 ├── extensions.m4 ├── extern-inline.m4 ├── fcntl-o.m4 ├── fcntl_h.m4 ├── flexmember.m4 ├── float_h.m4 ├── flock.m4 ├── floor.m4 ├── fpieee.m4 ├── frexp.m4 ├── fstat.m4 ├── fsync.m4 ├── func.m4 ├── getaddrinfo.m4 ├── getlogin.m4 ├── gettimeofday.m4 ├── glibc21.m4 ├── gnulib-cache.m4 ├── gnulib-common.m4 ├── gnulib-comp.m4 ├── gnulib-tool.m4 ├── hard-locale.m4 ├── hostent.m4 ├── iconv.m4 ├── iconv_h.m4 ├── iconv_open-utf.m4 ├── iconv_open.m4 ├── include_next.m4 ├── inet_ntop.m4 ├── inet_pton.m4 ├── intmax_t.m4 ├── inttypes_h.m4 ├── isfinite.m4 ├── isinf.m4 ├── isnan.m4 ├── isnand.m4 ├── isnanf.m4 ├── isnanl.m4 ├── labels-as-values.m4 ├── langinfo_h.m4 ├── largefile.m4 ├── ld-version-script.m4 ├── ldexp.m4 ├── lib-ld.m4 ├── lib-link.m4 ├── lib-prefix.m4 ├── libunistring.m4 ├── link.m4 ├── localcharset.m4 ├── locale-fr.m4 ├── locale-ja.m4 ├── locale-zh.m4 ├── locale_h.m4 ├── localeconv.m4 ├── log.m4 ├── log1p.m4 ├── longlong.m4 ├── lstat.m4 ├── malloc.m4 ├── malloca.m4 ├── math_h.m4 ├── mathfunc.m4 ├── mbrtowc.m4 ├── mbsinit.m4 ├── mbstate_t.m4 ├── mbtowc.m4 ├── memchr.m4 ├── mkdir.m4 ├── mkostemp.m4 ├── mktime.m4 ├── mmap-anon.m4 ├── mode_t.m4 ├── msvc-inval.m4 ├── msvc-nothrow.m4 ├── multiarch.m4 ├── netdb_h.m4 ├── netinet_in_h.m4 ├── nl_langinfo.m4 ├── nocrash.m4 ├── nproc.m4 ├── off_t.m4 ├── open.m4 ├── pathmax.m4 ├── pipe.m4 ├── pipe2.m4 ├── poll.m4 ├── poll_h.m4 ├── printf.m4 ├── putenv.m4 ├── raise.m4 ├── read.m4 ├── readlink.m4 ├── regex.m4 ├── rename.m4 ├── rmdir.m4 ├── round.m4 ├── safe-read.m4 ├── safe-write.m4 ├── secure_getenv.m4 ├── select.m4 ├── servent.m4 ├── setenv.m4 ├── signal_h.m4 ├── signbit.m4 ├── size_max.m4 ├── snprintf.m4 ├── socketlib.m4 ├── sockets.m4 ├── socklen.m4 ├── sockpfaf.m4 ├── ssize_t.m4 ├── stat-time.m4 ├── stat.m4 ├── stdalign.m4 ├── stdbool.m4 ├── stddef_h.m4 ├── stdint.m4 ├── stdint_h.m4 ├── stdio_h.m4 ├── stdlib_h.m4 ├── strdup.m4 ├── strftime.m4 ├── string_h.m4 ├── sys_file_h.m4 ├── sys_select_h.m4 ├── sys_socket_h.m4 ├── sys_stat_h.m4 ├── sys_time_h.m4 ├── sys_times_h.m4 ├── sys_types_h.m4 ├── sys_uio_h.m4 ├── tempname.m4 ├── time_h.m4 ├── time_r.m4 ├── time_rz.m4 ├── timegm.m4 ├── times.m4 ├── tm_gmtoff.m4 ├── trunc.m4 ├── unistd_h.m4 ├── vasnprintf.m4 ├── visibility.m4 ├── vsnprintf.m4 ├── warn-on-use.m4 ├── warnings.m4 ├── wchar_h.m4 ├── wchar_t.m4 ├── wcrtomb.m4 ├── wctype_h.m4 ├── wint_t.m4 ├── write.m4 └── xsize.m4 ├── maint.mk ├── meta ├── ChangeLog-2008 ├── Makefile.am ├── build-env.in ├── gdb-uninstalled-guile.in ├── guild.in ├── guile-2.0-uninstalled.pc.in ├── guile-2.0.pc.in ├── guile-config.in ├── guile.in ├── guile.m4 └── uninstalled-env.in ├── module ├── Makefile.am ├── ice-9 │ ├── ChangeLog-2008 │ ├── README │ ├── and-let-star.scm │ ├── arrays.scm │ ├── binary-ports.scm │ ├── boot-9.scm │ ├── buffered-input.scm │ ├── calling.scm │ ├── channel.scm │ ├── command-line.scm │ ├── common-list.scm │ ├── compile-psyntax.scm │ ├── control.scm │ ├── curried-definitions.scm │ ├── debug.scm │ ├── deprecated.scm │ ├── documentation.scm │ ├── eval-string.scm │ ├── eval.scm │ ├── expect.scm │ ├── format.scm │ ├── ftw.scm │ ├── futures.scm │ ├── gap-buffer.scm │ ├── getopt-long.scm │ ├── hash-table.scm │ ├── hcons.scm │ ├── history.scm │ ├── i18n.scm │ ├── iconv.scm │ ├── lineio.scm │ ├── list.scm │ ├── local-eval.scm │ ├── ls.scm │ ├── mapping.scm │ ├── match.scm │ ├── match.upstream.scm │ ├── networking.scm │ ├── null.scm │ ├── occam-channel.scm │ ├── optargs.scm │ ├── poe.scm │ ├── poll.scm │ ├── popen.scm │ ├── posix.scm │ ├── pretty-print.scm │ ├── psyntax-pp.scm │ ├── psyntax.scm │ ├── q.scm │ ├── quasisyntax.scm │ ├── r4rs.scm │ ├── r5rs.scm │ ├── r6rs-libraries.scm │ ├── rdelim.scm │ ├── receive.scm │ ├── regex.scm │ ├── runq.scm │ ├── rw.scm │ ├── safe-r5rs.scm │ ├── safe.scm │ ├── save-stack.scm │ ├── scm-style-repl.scm │ ├── serialize.scm │ ├── session.scm │ ├── slib.scm │ ├── stack-catch.scm │ ├── streams.scm │ ├── string-fun.scm │ ├── syncase.scm │ ├── test.scm │ ├── threads.scm │ ├── time.scm │ ├── top-repl.scm │ ├── unicode.scm │ ├── vlist.scm │ └── weak-vector.scm ├── language │ ├── assembly.scm │ ├── assembly │ │ ├── compile-bytecode.scm │ │ ├── decompile-bytecode.scm │ │ ├── disassemble.scm │ │ └── spec.scm │ ├── brainfuck │ │ ├── compile-scheme.scm │ │ ├── compile-tree-il.scm │ │ ├── parse.scm │ │ └── spec.scm │ ├── bytecode │ │ └── spec.scm │ ├── ecmascript │ │ ├── array.scm │ │ ├── base.scm │ │ ├── compile-tree-il.scm │ │ ├── function.scm │ │ ├── impl.scm │ │ ├── parse.scm │ │ ├── spec.scm │ │ └── tokenize.scm │ ├── elisp │ │ ├── README │ │ ├── bindings.scm │ │ ├── compile-tree-il.scm │ │ ├── lexer.scm │ │ ├── parser.scm │ │ ├── runtime.scm │ │ ├── runtime │ │ │ ├── function-slot.scm │ │ │ ├── macros.scm │ │ │ ├── subrs.scm │ │ │ └── value-slot.scm │ │ └── spec.scm │ ├── glil.scm │ ├── glil │ │ ├── compile-assembly.scm │ │ └── spec.scm │ ├── objcode.scm │ ├── objcode │ │ └── spec.scm │ ├── scheme │ │ ├── compile-tree-il.scm │ │ ├── decompile-tree-il.scm │ │ └── spec.scm │ ├── tree-il.scm │ ├── tree-il │ │ ├── analyze.scm │ │ ├── canonicalize.scm │ │ ├── compile-glil.scm │ │ ├── cse.scm │ │ ├── debug.scm │ │ ├── effects.scm │ │ ├── fix-letrec.scm │ │ ├── inline.scm │ │ ├── optimize.scm │ │ ├── peval.scm │ │ ├── primitives.scm │ │ └── spec.scm │ └── value │ │ └── spec.scm ├── oop │ ├── ChangeLog-2008 │ ├── goops.scm │ └── goops │ │ ├── accessors.scm │ │ ├── active-slot.scm │ │ ├── compile.scm │ │ ├── composite-slot.scm │ │ ├── describe.scm │ │ ├── dispatch.scm │ │ ├── internal.scm │ │ ├── save.scm │ │ ├── simple.scm │ │ ├── stklos.scm │ │ └── util.scm ├── rnrs.scm ├── rnrs │ ├── arithmetic │ │ ├── bitwise.scm │ │ ├── fixnums.scm │ │ └── flonums.scm │ ├── base.scm │ ├── bytevectors.scm │ ├── conditions.scm │ ├── control.scm │ ├── enums.scm │ ├── eval.scm │ ├── exceptions.scm │ ├── files.scm │ ├── hashtables.scm │ ├── io │ │ ├── ports.scm │ │ └── simple.scm │ ├── lists.scm │ ├── mutable-pairs.scm │ ├── mutable-strings.scm │ ├── programs.scm │ ├── r5rs.scm │ ├── records │ │ ├── inspection.scm │ │ ├── procedural.scm │ │ └── syntactic.scm │ ├── sorting.scm │ ├── syntax-case.scm │ └── unicode.scm ├── scripts │ ├── ChangeLog-2008 │ ├── README │ ├── api-diff.scm │ ├── autofrisk.scm │ ├── compile.scm │ ├── disassemble.scm │ ├── display-commentary.scm │ ├── doc-snarf.scm │ ├── frisk.scm │ ├── generate-autoload.scm │ ├── help.scm │ ├── lint.scm │ ├── list.scm │ ├── punify.scm │ ├── read-rfc822.scm │ ├── read-scheme-source.scm │ ├── read-text-outline.scm │ ├── scan-api.scm │ ├── snarf-check-and-output-texi.scm │ ├── snarf-guile-m4-docs.scm │ ├── summarize-guile-TODO.scm │ └── use2dot.scm ├── srfi │ ├── Makefile.am │ ├── srfi-1.scm │ ├── srfi-10.scm │ ├── srfi-11.scm │ ├── srfi-111.scm │ ├── srfi-13.scm │ ├── srfi-14.scm │ ├── srfi-16.scm │ ├── srfi-17.scm │ ├── srfi-18.scm │ ├── srfi-19.scm │ ├── srfi-2.scm │ ├── srfi-26.scm │ ├── srfi-27.scm │ ├── srfi-28.scm │ ├── srfi-31.scm │ ├── srfi-34.scm │ ├── srfi-35.scm │ ├── srfi-37.scm │ ├── srfi-38.scm │ ├── srfi-39.scm │ ├── srfi-4.scm │ ├── srfi-4 │ │ └── gnu.scm │ ├── srfi-41.scm │ ├── srfi-42.scm │ ├── srfi-42 │ │ └── ec.scm │ ├── srfi-43.scm │ ├── srfi-45.scm │ ├── srfi-6.scm │ ├── srfi-60.scm │ ├── srfi-64.scm │ ├── srfi-64 │ │ └── testing.scm │ ├── srfi-67.scm │ ├── srfi-67 │ │ └── compare.scm │ ├── srfi-69.scm │ ├── srfi-8.scm │ ├── srfi-88.scm │ ├── srfi-9.scm │ ├── srfi-9 │ │ └── gnu.scm │ └── srfi-98.scm ├── statprof.scm ├── sxml │ ├── apply-templates.scm │ ├── fold.scm │ ├── match.scm │ ├── simple.scm │ ├── ssax.scm │ ├── ssax │ │ └── input-parse.scm │ ├── sxml-match.ss │ ├── transform.scm │ ├── upstream │ │ ├── COPYING.SSAX │ │ ├── SSAX.scm │ │ ├── SXML-tree-trans.scm │ │ ├── SXPath-old.scm │ │ ├── assert.scm │ │ └── input-parse.scm │ └── xpath.scm ├── system │ ├── base │ │ ├── ck.scm │ │ ├── compile.scm │ │ ├── lalr.scm │ │ ├── lalr.upstream.scm │ │ ├── language.scm │ │ ├── message.scm │ │ ├── pmatch.scm │ │ ├── syntax.scm │ │ ├── target.scm │ │ └── types.scm │ ├── foreign.scm │ ├── repl │ │ ├── command.scm │ │ ├── common.scm │ │ ├── coop-server.scm │ │ ├── debug.scm │ │ ├── describe.scm │ │ ├── error-handling.scm │ │ ├── repl.scm │ │ └── server.scm │ ├── vm │ │ ├── coverage.scm │ │ ├── frame.scm │ │ ├── inspect.scm │ │ ├── instruction.scm │ │ ├── objcode.scm │ │ ├── program.scm │ │ ├── trace.scm │ │ ├── trap-state.scm │ │ ├── traps.scm │ │ └── vm.scm │ └── xref.scm ├── texinfo.scm ├── texinfo │ ├── docbook.scm │ ├── html.scm │ ├── indexing.scm │ ├── plain-text.scm │ ├── reflection.scm │ ├── serialize.scm │ └── string-utils.scm └── web │ ├── client.scm │ ├── http.scm │ ├── request.scm │ ├── response.scm │ ├── server.scm │ ├── server │ └── http.scm │ └── uri.scm └── test-suite ├── ChangeLog-2008 ├── Makefile.am ├── README ├── guile-test ├── lalr ├── common-test.scm ├── glr-test.scm ├── run-guile-test.sh ├── test-glr-associativity.scm ├── test-glr-basics-01.scm ├── test-glr-basics-02.scm ├── test-glr-basics-03.scm ├── test-glr-basics-04.scm ├── test-glr-basics-05.scm ├── test-glr-script-expression.scm ├── test-glr-single-expressions.scm ├── test-lr-associativity-01.scm ├── test-lr-associativity-02.scm ├── test-lr-associativity-03.scm ├── test-lr-associativity-04.scm ├── test-lr-basics-01.scm ├── test-lr-basics-02.scm ├── test-lr-basics-03.scm ├── test-lr-basics-04.scm ├── test-lr-basics-05.scm ├── test-lr-error-recovery-01.scm ├── test-lr-error-recovery-02.scm ├── test-lr-no-clause.scm ├── test-lr-script-expression.scm └── test-lr-single-expressions.scm ├── standalone ├── .gitignore ├── Makefile.am ├── README ├── test-asmobs ├── test-asmobs-lib.c ├── test-bad-identifiers ├── test-command-line-encoding ├── test-command-line-encoding2 ├── test-conversion.c ├── test-extensions ├── test-extensions-lib.c ├── test-fast-slot-ref.in ├── test-ffi ├── test-ffi-lib.c ├── test-guild-compile ├── test-guile-snarf ├── test-import-order ├── test-import-order-a.scm ├── test-import-order-b.scm ├── test-import-order-c.scm ├── test-import-order-d.scm ├── test-language ├── test-language.el ├── test-language.js ├── test-list.c ├── test-loose-ends.c ├── test-mb-regexp ├── test-num2integral.c ├── test-pthread-create-secondary.c ├── test-pthread-create.c ├── test-require-extension ├── test-round.c ├── test-scm-c-bind-keyword-arguments.c ├── test-scm-c-read.c ├── test-scm-spawn-thread.c ├── test-scm-take-locale-symbol.c ├── test-scm-take-u8vector.c ├── test-scm-to-latin1-string.c ├── test-scm-values.c ├── test-scm-with-guile.c ├── test-smob-mark-race.c ├── test-smob-mark.c ├── test-srfi-4.c ├── test-system-cmds ├── test-unwind.c ├── test-use-srfi.in └── test-with-guile-module.c ├── test-suite └── lib.scm ├── tests ├── 00-initial-env.test ├── 00-repl-server.test ├── 00-socket.test ├── alist.test ├── and-let-star.test ├── arbiters.test ├── arrays.test ├── asm-to-bytecode.test ├── bit-operations.test ├── bitvectors.test ├── brainfuck.test ├── bytevectors.test ├── c-api.test ├── chars.test ├── coding.test ├── common-list.test ├── compiler.test ├── continuations.test ├── control.test ├── coverage.test ├── cse.test ├── curried-definitions.test ├── ecmascript.test ├── elisp-compiler.test ├── elisp-reader.test ├── elisp.test ├── encoding-escapes.test ├── encoding-iso88591.test ├── encoding-iso88597.test ├── encoding-utf8.test ├── eval-string.test ├── eval.test ├── exceptions.test ├── filesys.test ├── fluids.test ├── foreign.test ├── format.test ├── fractions.test ├── ftw.test ├── future.test ├── gc.test ├── getopt-long.test ├── goops.test ├── guardians.test ├── hash.test ├── hooks.test ├── i18n.test ├── iconv.test ├── import.test ├── interp.test ├── keywords.test ├── list.test ├── load.test ├── match.test ├── match.test.upstream ├── modules.test ├── multilingual.nottest ├── net-db.test ├── numbers.test ├── optargs.test ├── options.test ├── pairs.test ├── parameters.test ├── peval.test ├── poe.test ├── popen-child.scm ├── popen.test ├── ports.test ├── posix.test ├── print.test ├── procprop.test ├── procs.test ├── q.test ├── r4rs.test ├── r5rs_pitfall.test ├── r6rs-arithmetic-bitwise.test ├── r6rs-arithmetic-fixnums.test ├── r6rs-arithmetic-flonums.test ├── r6rs-base.test ├── r6rs-conditions.test ├── r6rs-control.test ├── r6rs-enums.test ├── r6rs-eval.test ├── r6rs-exceptions.test ├── r6rs-files.test ├── r6rs-hashtables.test ├── r6rs-lists.test ├── r6rs-ports.test ├── r6rs-records-inspection.test ├── r6rs-records-procedural.test ├── r6rs-records-syntactic.test ├── r6rs-unicode.test ├── ramap.test ├── rdelim.test ├── reader.test ├── receive.test ├── records.test ├── regexp.test ├── rnrs-libraries.test ├── rnrs-test-a.scm ├── session.test ├── signals.test ├── sort.test ├── srcprop.test ├── srfi-1.test ├── srfi-10.test ├── srfi-105.test ├── srfi-11.test ├── srfi-111.test ├── srfi-13.test ├── srfi-14.test ├── srfi-17.test ├── srfi-18.test ├── srfi-19.test ├── srfi-2.test ├── srfi-26.test ├── srfi-27.test ├── srfi-31.test ├── srfi-34.test ├── srfi-35.test ├── srfi-37.test ├── srfi-38.test ├── srfi-39.test ├── srfi-4.test ├── srfi-41.test ├── srfi-42.test ├── srfi-43.test ├── srfi-45.test ├── srfi-6.test ├── srfi-60.test ├── srfi-64-test.scm ├── srfi-64.test ├── srfi-67.test ├── srfi-69.test ├── srfi-88.test ├── srfi-9.test ├── srfi-98.test ├── statprof.test ├── streams.test ├── strings.test ├── structs.test ├── sxml-match-tests.ss ├── sxml.fold.test ├── sxml.match.test ├── sxml.simple.test ├── sxml.ssax.test ├── sxml.transform.test ├── sxml.xpath.test ├── symbols.test ├── syncase.test ├── syntax.test ├── texinfo.docbook.test ├── texinfo.html.test ├── texinfo.serialize.test ├── texinfo.string-utils.test ├── texinfo.test ├── threads.test ├── time.test ├── tree-il.test ├── types.test ├── unicode.test ├── vectors.test ├── version.test ├── vlist.test ├── weaks.test ├── web-client.test ├── web-http.test ├── web-request.test ├── web-response.test └── web-uri.test └── vm ├── Makefile.am ├── run-vm-tests.scm ├── t-basic-contructs.scm ├── t-call-cc.scm ├── t-catch.scm ├── t-closure.scm ├── t-closure2.scm ├── t-closure3.scm ├── t-closure4.scm ├── t-do-loop.scm ├── t-global-bindings.scm ├── t-literal-integers.scm ├── t-macros.scm ├── t-macros2.scm ├── t-map.scm ├── t-match.scm ├── t-mutual-toplevel-defines.scm ├── t-or.scm ├── t-proc-with-setter.scm ├── t-quasiquote.scm ├── t-records.scm └── t-values.scm /.dir-locals.el: -------------------------------------------------------------------------------- 1 | ;; Per-directory local variables for GNU Emacs 23 and later. 2 | 3 | ((nil . ((fill-column . 72) 4 | (tab-width . 8))) 5 | (c-mode . ((c-file-style . "gnu"))) 6 | (scheme-mode 7 | . ((indent-tabs-mode . nil) 8 | (eval . (put 'pass-if 'scheme-indent-function 1)) 9 | (eval . (put 'pass-if-exception 'scheme-indent-function 2)) 10 | (eval . (put 'pass-if-equal 'scheme-indent-function 2)) 11 | (eval . (put 'with-test-prefix 'scheme-indent-function 1)) 12 | (eval . (put 'with-code-coverage 'scheme-indent-function 1)) 13 | (eval . (put 'with-statprof 'scheme-indent-function 1)))) 14 | (emacs-lisp-mode . ((indent-tabs-mode . nil))) 15 | (texinfo-mode . ((indent-tabs-mode . nil) 16 | (fill-column . 72)))) 17 | -------------------------------------------------------------------------------- /.gnuploadrc: -------------------------------------------------------------------------------- 1 | --user ludo@gnu.org 2 | -------------------------------------------------------------------------------- /.x-sc_GPL_version: -------------------------------------------------------------------------------- 1 | ^lib/ 2 | ^gc-benchmarks/ 3 | ^libguile/libgettext.h 4 | ^libguile/mkstemp.c 5 | -------------------------------------------------------------------------------- /.x-sc_avoid_if_before_free: -------------------------------------------------------------------------------- 1 | ^lib/ 2 | -------------------------------------------------------------------------------- /.x-sc_bindtextdomain: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /.x-sc_cast_of_alloca_return_value: -------------------------------------------------------------------------------- 1 | ^lib/ 2 | -------------------------------------------------------------------------------- /.x-sc_cast_of_argument_to_free: -------------------------------------------------------------------------------- 1 | ^libguile/stime.c 2 | -------------------------------------------------------------------------------- /.x-sc_error_message_period: -------------------------------------------------------------------------------- 1 | ^gc-benchmarks/ 2 | -------------------------------------------------------------------------------- /.x-sc_error_message_uppercase: -------------------------------------------------------------------------------- 1 | ^libguile/ 2 | ^guile-readline/ 3 | ^gc-benchmarks/ 4 | ^emacs/ 5 | ^NEWS 6 | ^doc/ 7 | ^test-suite/tests/ports.test 8 | -------------------------------------------------------------------------------- /.x-sc_error_message_warn_fatal: -------------------------------------------------------------------------------- 1 | ^module/ice-9/match.scm 2 | -------------------------------------------------------------------------------- /.x-sc_m4_quote_check: -------------------------------------------------------------------------------- 1 | m4/absolute-header.m4 2 | m4/* 3 | -------------------------------------------------------------------------------- /.x-sc_makefile_check: -------------------------------------------------------------------------------- 1 | lib(guile)?/ 2 | guile-readline/ 3 | srfi/ 4 | -------------------------------------------------------------------------------- /.x-sc_obsolete_symbols: -------------------------------------------------------------------------------- 1 | doc/* 2 | lib/flock.c 3 | lib/fcntl.in.h 4 | libguile/filesys.c 5 | libguile/ChangeLog-2008 6 | -------------------------------------------------------------------------------- /.x-sc_program_name: -------------------------------------------------------------------------------- 1 | test-suite/* 2 | examples/* 3 | doc/example-smob/* 4 | libguile/gen-scmconfig.c 5 | * 6 | -------------------------------------------------------------------------------- /.x-sc_prohibit_S_IS_definition: -------------------------------------------------------------------------------- 1 | lib/* 2 | -------------------------------------------------------------------------------- /.x-sc_prohibit_atoi_atof: -------------------------------------------------------------------------------- 1 | lib/* 2 | libguile/win32-socket.c 3 | -------------------------------------------------------------------------------- /.x-sc_prohibit_doubled_word: -------------------------------------------------------------------------------- 1 | ^AUTHORS 2 | ^gc-benchmarks/larceny/ 3 | ^module/ice-9/format.scm 4 | ^module/ice-9/match.upstream.scm 5 | ^module/sxml/upstream 6 | compile.scm 7 | ChangeLog 8 | -------------------------------------------------------------------------------- /.x-sc_prohibit_have_config_h: -------------------------------------------------------------------------------- 1 | libguile/* 2 | srfi/* 3 | test-suite/* 4 | guile-readline/* 5 | lib/* 6 | -------------------------------------------------------------------------------- /.x-sc_prohibit_magic_number_exit: -------------------------------------------------------------------------------- 1 | configure.ac 2 | NEWS 3 | doc/ref/api-init.texi 4 | libguile/ChangeLog* 5 | m4/* 6 | -------------------------------------------------------------------------------- /.x-sc_prohibit_path_max_allocation: -------------------------------------------------------------------------------- 1 | libguile/win32-socket.c 2 | lib/stat.c 3 | -------------------------------------------------------------------------------- /.x-sc_prohibit_strcmp: -------------------------------------------------------------------------------- 1 | m4/* 2 | lib/* 3 | test-suite/* 4 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | -*- text -*- 2 | 3 | Starting from September 1st, 2008, the Guile project no longer stores 4 | change logs in `ChangeLog' files. Instead, changes are detailed in the 5 | version control system's logs. They can be seen by downloading a copy 6 | of the Git repository: 7 | 8 | $ git clone git://git.sv.gnu.org/guile.git 9 | $ git whatchanged 10 | 11 | Alternatively, they can be seen on the web, using the Gitweb interface 12 | at: 13 | 14 | http://git.sv.gnu.org/gitweb/?p=guile.git 15 | 16 | Change logs up to September 1st, 2008, are still available in the files 17 | named `ChangeLog-2008'. 18 | -------------------------------------------------------------------------------- /GUILE-VERSION: -------------------------------------------------------------------------------- 1 | # -*-shell-script-*- 2 | 3 | # Note: `GUILE_VERSION' is defined in `configure.ac' using `git-version-gen'. 4 | GUILE_MAJOR_VERSION=2 5 | GUILE_MINOR_VERSION=0 6 | GUILE_MICRO_VERSION=13 7 | 8 | GUILE_EFFECTIVE_VERSION=2.0 9 | 10 | 11 | # All of the shared lib versioning info. Right now, for this to work 12 | # properly, you'll also need to add AC_SUBST calls to the right place 13 | # in configure.in, add the right -version-info statement to your 14 | # Makefile.am The only library not handled here is 15 | # guile-readline/libguile-readline. It is handled in 16 | # ./guile-readline/LIBGUILEREADLINE-VERSION. 17 | 18 | # See libtool info pages for more information on how and when to 19 | # change these. 20 | 21 | LIBGUILE_INTERFACE_CURRENT=30 22 | LIBGUILE_INTERFACE_REVISION=1 23 | LIBGUILE_INTERFACE_AGE=8 24 | LIBGUILE_INTERFACE="${LIBGUILE_INTERFACE_CURRENT}:${LIBGUILE_INTERFACE_REVISION}:${LIBGUILE_INTERFACE_AGE}" 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Guile is covered under the terms of the GNU Lesser General Public 2 | License, version 3 or later. See COPYING.LESSER and COPYING. 3 | -------------------------------------------------------------------------------- /README.guile-vm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/README.guile-vm -------------------------------------------------------------------------------- /THANKS.guile-vm: -------------------------------------------------------------------------------- 1 | Guile VM was inspired by QScheme, librep, and Objective Caml. 2 | -------------------------------------------------------------------------------- /am/ChangeLog-2008: -------------------------------------------------------------------------------- 1 | 2002-04-10 Rob Browning 2 | 3 | * .cvsignore: add Makefile and Makefile.in. 4 | 5 | 2002-04-01 Thien-Thi Nguyen 6 | 7 | * maintainer-dirs: Remove "if MAINTAINER_MODE" conditional. 8 | 9 | 2002-03-30 Thien-Thi Nguyen 10 | 11 | * maintainer-dirs: New file. 12 | 13 | * Makefile.am (am_frags): Add "maintainer-dirs". 14 | 15 | 2002-02-26 Thien-Thi Nguyen 16 | 17 | * pre-inst-guile, Makefile.am, README: New files. 18 | 19 | -------------------------------------------------------------------------------- /am/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with Automake to create Makefile.in 2 | ## 3 | ## Copyright (C) 2002, 2006, 2008 Free Software Foundation, Inc. 4 | ## 5 | ## This file is part of GUILE. 6 | ## 7 | ## GUILE is free software; you can redistribute it and/or modify it 8 | ## under the terms of the GNU Lesser General Public License as 9 | ## published by the Free Software Foundation; either version 3, or 10 | ## (at your option) any later version. 11 | ## 12 | ## GUILE is distributed in the hope that it will be useful, but 13 | ## WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ## GNU Lesser General Public License for more details. 16 | ## 17 | ## You should have received a copy of the GNU Lesser General Public 18 | ## License along with GUILE; see the file COPYING.LESSER. If not, 19 | ## write to the Free Software Foundation, Inc., 51 Franklin Street, 20 | ## Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | AUTOMAKE_OPTIONS = gnu 23 | 24 | am_frags = maintainer-dirs guilec 25 | 26 | EXTRA_DIST = $(am_frags) ChangeLog-2008 27 | 28 | ## Makefile.am ends here 29 | -------------------------------------------------------------------------------- /am/README: -------------------------------------------------------------------------------- 1 | data directory: automake frags 2 | 3 | do not name files using extension ".am", as automake is overzealous sometimes. 4 | -------------------------------------------------------------------------------- /am/guilec: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | GOBJECTS = $(SOURCES:%.scm=%.go) 3 | 4 | GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat 5 | 6 | moddir = $(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)/$(modpath) 7 | nobase_mod_DATA = $(SOURCES) $(NOCOMP_SOURCES) 8 | ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/ccache/$(modpath) 9 | nobase_ccache_DATA = $(GOBJECTS) 10 | EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES) 11 | ETAGS_ARGS = $(SOURCES) $(NOCOMP_SOURCES) 12 | 13 | CLEANFILES = $(GOBJECTS) 14 | 15 | # Make sure source files are installed first, so that the mtime of 16 | # installed compiled files is greater than that of installed source 17 | # files. See 18 | # 19 | # for details. 20 | guile_install_go_files = install-nobase_ccacheDATA 21 | $(guile_install_go_files): install-nobase_modDATA 22 | 23 | AM_V_GUILEC = $(AM_V_GUILEC_$(V)) 24 | AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY)) 25 | AM_V_GUILEC_0 = @echo " GUILEC" $@; 26 | 27 | SUFFIXES = .scm .go 28 | .scm.go: 29 | $(AM_V_GUILEC)GUILE_INSTALL_LOCALE=1 GUILE_AUTO_COMPILE=0 \ 30 | $(top_builddir)/meta/build-env \ 31 | guild compile --target="$(host)" $(GUILE_WARNINGS) \ 32 | -L "$(abs_srcdir)" -L "$(abs_builddir)" \ 33 | -L "$(abs_top_srcdir)/guile-readline" \ 34 | -o "$@" "$<" 35 | -------------------------------------------------------------------------------- /am/snarf: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | 3 | GUILE_SNARF = $(top_builddir)/libguile/guile-snarf 4 | 5 | AM_V_SNARF = $(AM_V_SNARF_$(V)) 6 | AM_V_SNARF_ = $(AM_V_SNARF_$(AM_DEFAULT_VERBOSITY)) 7 | AM_V_SNARF_0 = @echo " SNARF " $@; 8 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Usage: sh -x ./autogen.sh 3 | 4 | set -e 5 | 6 | [ -f GUILE-VERSION ] || { 7 | echo "autogen.sh: run this command only at the top of guile-core." 8 | exit 1 9 | } 10 | 11 | ###################################################################### 12 | ### announce build tool versions 13 | echo "" 14 | autoconf --version 15 | echo "" 16 | automake --version 17 | echo "" 18 | 19 | # Typical MacOS X installations rename 'libtoolize' to 'glibtoolize', so 20 | # adjust to that. 21 | if test "`uname -s`" = "Darwin"; then 22 | glibtoolize --version 23 | else 24 | libtoolize --version 25 | fi 26 | 27 | echo "" 28 | ${M4:-m4} --version 29 | echo "" 30 | flex --version 31 | echo "" 32 | 33 | ###################################################################### 34 | ### update infrastructure 35 | 36 | autoreconf -i --force --verbose 37 | 38 | echo "Now run configure and make." 39 | -------------------------------------------------------------------------------- /benchmark-suite/Makefile.am: -------------------------------------------------------------------------------- 1 | SCM_BENCHMARKS = benchmarks/0-reference.bm \ 2 | benchmarks/arithmetic.bm \ 3 | benchmarks/bytevectors.bm \ 4 | benchmarks/chars.bm \ 5 | benchmarks/continuations.bm \ 6 | benchmarks/hash.bm \ 7 | benchmarks/if.bm \ 8 | benchmarks/logand.bm \ 9 | benchmarks/ports.bm \ 10 | benchmarks/r6rs-arithmetic.bm \ 11 | benchmarks/read.bm \ 12 | benchmarks/srfi-1.bm \ 13 | benchmarks/srfi-13.bm \ 14 | benchmarks/structs.bm \ 15 | benchmarks/subr.bm \ 16 | benchmarks/uniform-vector-read.bm \ 17 | benchmarks/vectors.bm \ 18 | benchmarks/vlists.bm \ 19 | benchmarks/write.bm \ 20 | benchmarks/strings.bm 21 | 22 | EXTRA_DIST = guile-benchmark benchmark-suite/lib.scm \ 23 | $(SCM_BENCHMARKS) \ 24 | ChangeLog-2008 25 | -------------------------------------------------------------------------------- /benchmark-suite/README: -------------------------------------------------------------------------------- 1 | This directory contains some benchmarks for Guile, and some generic 2 | benchmarking support code. 3 | 4 | To run these benchmarks, you will need a version of Guile more recent 5 | than 15 Feb 1999 --- the benchmarks use the (ice-9 and-let*) and 6 | (ice-9 getopt-long) modules, which were added to Guile around then. 7 | 8 | For information about how to run the benchmark suite, read the usage 9 | instructions in the comments at the top of the guile-benchmark script. 10 | 11 | You can reference the file `lib.scm' from your own code as the module 12 | (benchmark-suite lib); it also has comments at the top and before each 13 | function explaining what's going on. 14 | 15 | Please write more Guile benchmarks, and send them to bug-guile@gnu.org. 16 | We'll merge them into the distribution. All benchmark suites must be 17 | licensed for our use under the GPL, but I don't think we're going to 18 | collect assignment papers for them. 19 | -------------------------------------------------------------------------------- /benchmark-suite/benchmarks/0-reference.bm: -------------------------------------------------------------------------------- 1 | 2 | (define-module (benchmarks 0-reference) 3 | :use-module (benchmark-suite lib)) 4 | 5 | (benchmark "reference benchmark for iteration counts" 330000 6 | #t) 7 | -------------------------------------------------------------------------------- /benchmark-suite/benchmarks/continuations.bm: -------------------------------------------------------------------------------- 1 | 2 | (define-module (benchmarks continuations) 3 | :use-module (benchmark-suite lib)) 4 | 5 | (define (callee continuation) 6 | (continuation #t)) 7 | 8 | (benchmark "call/cc" 12000 9 | (call-with-current-continuation callee)) 10 | -------------------------------------------------------------------------------- /benchmark-suite/benchmarks/logand.bm: -------------------------------------------------------------------------------- 1 | 2 | (define-module (benchmarks logand) 3 | :use-module (benchmark-suite lib)) 4 | 5 | (define bignum (1- (expt 2 128))) 6 | 7 | (let* ((i 0)) 8 | (benchmark "bignum" 130000 9 | (logand i bignum) 10 | (set! i (+ i 1)))) 11 | -------------------------------------------------------------------------------- /build-aux/.gitignore: -------------------------------------------------------------------------------- 1 | link-warning.h 2 | -------------------------------------------------------------------------------- /build-aux/snippet/_Noreturn.h: -------------------------------------------------------------------------------- 1 | #if !defined _Noreturn && __STDC_VERSION__ < 201112 2 | # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ 3 | || 0x5110 <= __SUNPRO_C) 4 | # define _Noreturn __attribute__ ((__noreturn__)) 5 | # elif 1200 <= _MSC_VER 6 | # define _Noreturn __declspec (noreturn) 7 | # else 8 | # define _Noreturn 9 | # endif 10 | #endif 11 | -------------------------------------------------------------------------------- /build-aux/snippet/arg-nonnull.h: -------------------------------------------------------------------------------- 1 | /* A C macro for declaring that specific arguments must not be NULL. 2 | Copyright (C) 2009-2016 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify it 5 | under the terms of the GNU General Public License as published 6 | by the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . */ 16 | 17 | /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools 18 | that the values passed as arguments n, ..., m must be non-NULL pointers. 19 | n = 1 stands for the first argument, n = 2 for the second argument etc. */ 20 | #ifndef _GL_ARG_NONNULL 21 | # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 22 | # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) 23 | # else 24 | # define _GL_ARG_NONNULL(params) 25 | # endif 26 | #endif 27 | -------------------------------------------------------------------------------- /cfg.mk: -------------------------------------------------------------------------------- 1 | old_NEWS_hash = d41d8cd98f00b204e9800998ecf8427e 2 | git-version-gen-tag-sed-script := \ 3 | 's/^release_\([0-9]\+\)-\([0-9]\+\)-\([0-9]\+\)/v\1.\2\.\3/g' 4 | 5 | local-checks-to-skip := \ 6 | sc_makefile_at_at_check \ 7 | sc_prohibit_HAVE_MBRTOWC \ 8 | sc_prohibit_empty_lines_at_EOF \ 9 | sc_prohibit_have_config_h \ 10 | sc_prohibit_safe_read_without_use \ 11 | sc_prohibit_stat_st_blocks 12 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | stamp-vti 2 | -------------------------------------------------------------------------------- /doc/BUGS: -------------------------------------------------------------------------------- 1 | 2 | Known Guile documentation bugs -*- outline -*- 3 | 4 | * The building of HTML docs is dependent on GNU Make 5 | 6 | This is because the Makefile.am's for the Guile reference manual and 7 | tutorial use a $(shell ...) command to list the set of HTML files to 8 | install. 9 | 10 | Probably this will not be fixed until Automake gains proper HTML doc 11 | support. On the other hand, if we've overlooked a more 12 | version-independent way of achieving the same thing, please let us 13 | know. 14 | -------------------------------------------------------------------------------- /doc/README: -------------------------------------------------------------------------------- 1 | This directory contains documentation on the Guile core. -*-text-*- 2 | 3 | The documentation consists of the following manuals. 4 | 5 | - The Guile Tutorial (guile-tut.texi) contains a tutorial introduction 6 | to using Guile. 7 | 8 | - The Guile Reference Manual (guile.texi) contains (or is intended to 9 | contain) reference documentation on all aspects of Guile. 10 | 11 | - The Revised^5 Report on the Algorithmic Language Scheme (r5rs.texi). 12 | 13 | Please be aware that this is all very much work in progress (apart 14 | from the Revised^5 Report). Bug reports and contributions are 15 | welcome! 16 | 17 | The `sources' directory includes some stuff relevant to the Guile 18 | reference manual, and which may eventually be folded in to it. It's 19 | not immediately relevant, however, which is why it's not in this 20 | directory. 21 | 22 | The Revised^4 Report (r4rs.texi) is no longer in this distribution, as 23 | it is completely superseded by the Revised^5 Report. If you need to 24 | consult R4RS, it is still widely available, for example at 25 | http://www-swiss.ai.mit.edu/projects/info/SchemeDocs/r4rs/. 26 | -------------------------------------------------------------------------------- /doc/THANKS: -------------------------------------------------------------------------------- 1 | Many thanks to the following people for contributing to the Guile 2 | manuals! 3 | 4 | Proofreading, bug reports and patches from: 5 | Chris Bitmead 6 | Christopher Cramer 7 | Marcus Daniels 8 | Dirk Herrmann 9 | Dale P. Smith 10 | Steve Tell 11 | Lee Thomas 12 | Masao Uebayashi 13 | Joel Weber 14 | Keith Wright 15 | 16 | New entries from: 17 | Per Bothner 18 | Martin Grabmueller 19 | Thien Thi Nguyen 20 | -------------------------------------------------------------------------------- /doc/hacks.el: -------------------------------------------------------------------------------- 1 | ;;;; hacks.el --- a few functions to help me work on the manual 2 | ;;;; Jim Blandy --- October 1998 3 | 4 | (defun jh-exemplify-region (start end) 5 | (interactive "r") 6 | (save-excursion 7 | (save-restriction 8 | (narrow-to-region start end) 9 | 10 | ;; Texinfo doesn't handle tabs well. 11 | (untabify (point-min) (point-max)) 12 | 13 | ;; Quote any characters special to texinfo. 14 | (goto-char (point-min)) 15 | (while (re-search-forward "[{}@]" nil t) 16 | (replace-match "@\\&"))))) 17 | -------------------------------------------------------------------------------- /doc/r5rs/ChangeLog-2008: -------------------------------------------------------------------------------- 1 | 2004-11-05 Marius Vollmer 2 | 3 | * r5rs.texi: Use @ifnottex instead of @ifinfo around the "Top" 4 | node declaration so that html can be generated. Use only lower 5 | case inside @sc. Move editors outside of author table, which 6 | looks better in html. 7 | 8 | 2001-08-27 Neil Jerram 9 | 10 | * Makefile.am (TEXINFO_TEX): Added; avoids shipping multiple copies of 11 | texinfo.tex in a single distribution. 12 | 13 | 2001-08-27 Neil Jerram 14 | 15 | The change log for files in this directory continues backwards 16 | from 2001-08-27 in ../ChangeLog, as all the Guile documentation 17 | prior to this date was contained in a single directory. 18 | -------------------------------------------------------------------------------- /doc/r5rs/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with Automake to create Makefile.in 2 | ## 3 | ## Copyright (C) 1998, 2006, 2008 Free Software Foundation, Inc. 4 | ## 5 | ## This file is part of GUILE. 6 | ## 7 | ## GUILE is free software; you can redistribute it and/or modify it 8 | ## under the terms of the GNU Lesser General Public License as 9 | ## published by the Free Software Foundation; either version 3, or 10 | ## (at your option) any later version. 11 | ## 12 | ## GUILE is distributed in the hope that it will be useful, but 13 | ## WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ## GNU Lesser General Public License for more details. 16 | ## 17 | ## You should have received a copy of the GNU Lesser General Public 18 | ## License along with GUILE; see the file COPYING.LESSER. If not, 19 | ## write to the Free Software Foundation, Inc., 51 Franklin Street, 20 | ## Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | AUTOMAKE_OPTIONS = gnu 23 | 24 | info_TEXINFOS = r5rs.texi 25 | 26 | EXTRA_DIST = ChangeLog-2008 27 | -------------------------------------------------------------------------------- /doc/ref/.gitignore: -------------------------------------------------------------------------------- 1 | autoconf-macros.texi 2 | effective-version.texi 3 | guile.html 4 | -------------------------------------------------------------------------------- /doc/ref/ChangeLog-goops-2008: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/doc/ref/ChangeLog-goops-2008 -------------------------------------------------------------------------------- /doc/ref/effective-version.texi.in: -------------------------------------------------------------------------------- 1 | @set EFFECTIVE-VERSION @GUILE_EFFECTIVE_VERSION@ 2 | -------------------------------------------------------------------------------- /doc/ref/gds.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/doc/ref/gds.dia -------------------------------------------------------------------------------- /doc/ref/gds.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/doc/ref/gds.pdf -------------------------------------------------------------------------------- /doc/ref/gds.txt: -------------------------------------------------------------------------------- 1 | +----------------+ 2 | | Program #1 | 3 | | | 4 | | +------------+ | 5 | | | GDS Client |-_ 6 | | +------------+ |-_ +-------------------+ 7 | +----------------+ -_TCP | Emacs | 8 | -_ | | 9 | -_+------------+ | +---------------+ | 10 | _| GDS Server |-----| GDS Interface | | 11 | +----------------+ _- +------------+ | +---------------+ | 12 | | Program #2 | _- +-------------------+ 13 | | | _- TCP 14 | | +------------+ _- 15 | | | GDS Client |-| 16 | | +------------+ | 17 | +----------------+ 18 | -------------------------------------------------------------------------------- /doc/ref/goops-tutorial.texi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/doc/ref/goops-tutorial.texi -------------------------------------------------------------------------------- /doc/ref/hierarchy.dot: -------------------------------------------------------------------------------- 1 | /* 2 | * Process this file with graphviz to produce hierarchy.[png,eps] 3 | * e.g. dot hierarchy.dot -Tpng > hierarchy.png 4 | */ 5 | digraph hierarchy { 6 | graph [rankdir="BT"]; 7 | node [shape="none"]; 8 | F -> D 9 | F -> E 10 | D -> A 11 | E -> A 12 | D -> B 13 | E -> C 14 | A -> "" 15 | B -> "" 16 | C -> "" 17 | "" -> "" 18 | "" -> "" 19 | "" -> "" 20 | "" -> "" -> "" -> "" -> "" 21 | } 22 | -------------------------------------------------------------------------------- /doc/ref/hierarchy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/doc/ref/hierarchy.pdf -------------------------------------------------------------------------------- /doc/ref/hierarchy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/doc/ref/hierarchy.png -------------------------------------------------------------------------------- /doc/ref/hierarchy.txt: -------------------------------------------------------------------------------- 1 | 2 | / \\\_____________________ 3 | / \\___________ \ 4 | / \ \ \ 5 | 6 | / | \ | 7 | / | \ | 8 | A B C 9 | |\__/__ | | 10 | \ / \ / | 11 | D E 12 | \ / | 13 | F | 14 | 15 | -------------------------------------------------------------------------------- /doc/ref/scheme-indices.texi: -------------------------------------------------------------------------------- 1 | @c -*-texinfo-*- 2 | @c This is part of the GNU Guile Reference Manual. 3 | @c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004 4 | @c Free Software Foundation, Inc. 5 | @c See the file guile.texi for copying conditions. 6 | 7 | @page 8 | @node R5RS Index 9 | @unnumbered R5RS Index 10 | 11 | @printindex rn 12 | 13 | 14 | @c Local Variables: 15 | @c TeX-master: "guile.texi" 16 | @c End: 17 | -------------------------------------------------------------------------------- /doc/ref/scheme-intro.texi: -------------------------------------------------------------------------------- 1 | @c -*-texinfo-*- 2 | @c This is part of the GNU Guile Reference Manual. 3 | @c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004 4 | @c Free Software Foundation, Inc. 5 | @c See the file guile.texi for copying conditions. 6 | 7 | @node Guile Scheme 8 | @section Guile's Implementation of Scheme 9 | 10 | Guile's core language is Scheme, which is specified and described in the 11 | series of reports known as @dfn{RnRS}. @dfn{RnRS} is shorthand for the 12 | @iftex 13 | @dfn{Revised$^n$ Report on the Algorithmic Language Scheme}. 14 | @end iftex 15 | @ifnottex 16 | @dfn{Revised^n Report on the Algorithmic Language Scheme}. 17 | @end ifnottex 18 | Guile complies fully with R5RS (@pxref{Top, 19 | ,Introduction,r5rs,R5RS}), and implements some aspects of R6RS. 20 | 21 | Guile also has many extensions that go beyond these reports. Some of 22 | the areas where Guile extends R5RS are: 23 | 24 | @itemize @bullet 25 | @item 26 | Guile's interactive documentation system 27 | 28 | @item 29 | Guile's support for POSIX-compliant network programming 30 | 31 | @item 32 | GOOPS -- Guile's framework for object oriented programming. 33 | @end itemize 34 | 35 | 36 | @c Local Variables: 37 | @c TeX-master: "guile.texi" 38 | @c End: 39 | -------------------------------------------------------------------------------- /doc/ref/scheme-reading.texi: -------------------------------------------------------------------------------- 1 | @c -*-texinfo-*- 2 | @c This is part of the GNU Guile Reference Manual. 3 | @c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2011 4 | @c Free Software Foundation, Inc. 5 | @c See the file guile.texi for copying conditions. 6 | 7 | @node Further Reading 8 | @section Further Reading 9 | 10 | @itemize @bullet 11 | 12 | @item 13 | The website @url{http://www.schemers.org/} is a good starting point for 14 | all things Scheme. 15 | 16 | @item 17 | Dorai Sitaram's online Scheme tutorial, @dfn{Teach Yourself Scheme in 18 | Fixnum Days}, at 19 | @url{http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme.html}. 20 | Includes a nice explanation of continuations. 21 | 22 | @item 23 | The complete text of @dfn{Structure and Interpretation of Computer 24 | Programs}, the classic introduction to computer science and Scheme by 25 | Hal Abelson, Jerry Sussman and Julie Sussman, is now available online at 26 | @url{http://mitpress.mit.edu/sicp/sicp.html}. This site also provides 27 | teaching materials related to the book, and all the source code used in 28 | the book, in a form suitable for loading and running. 29 | @end itemize 30 | 31 | 32 | @c Local Variables: 33 | @c TeX-master: "guile.texi" 34 | @c End: 35 | -------------------------------------------------------------------------------- /doc/ref/scheme.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/doc/ref/scheme.dia -------------------------------------------------------------------------------- /doc/ref/scheme.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/doc/ref/scheme.pdf -------------------------------------------------------------------------------- /doc/ref/scheme.txt: -------------------------------------------------------------------------------- 1 | scheme 2 | ^ 3 | | 4 | .-----+-----. 5 | | | 6 | cmuscheme xscheme 7 | ^ 8 | | 9 | .-----+-----. 10 | | | 11 | Quack GDS 12 | -------------------------------------------------------------------------------- /doc/ref/scsh.texi: -------------------------------------------------------------------------------- 1 | @c -*-texinfo-*- 2 | @c This is part of the GNU Guile Reference Manual. 3 | @c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2010 4 | @c Free Software Foundation, Inc. 5 | @c See the file guile.texi for copying conditions. 6 | 7 | @node The Scheme shell (scsh) 8 | @section The Scheme shell (scsh) 9 | @cindex SCSH 10 | @cindex Scheme Shell 11 | 12 | An incomplete port of the Scheme shell (scsh) was once available for 13 | Guile as a separate package. However this code has bitrotten 14 | somewhat. The pieces are available in Guile's legacy CVS repository, 15 | which may be browsed at 16 | @url{http://cvs.savannah.gnu.org/viewvc/guile/guile-scsh/?root=guile}. 17 | 18 | For information about scsh see 19 | @url{http://www.scsh.net/}. 20 | 21 | This bitrotting is a bit of a shame, as there is a good deal of 22 | well-written Scheme code in scsh. Adopting this code and porting it to 23 | current Guile should be an educational experience, in addition to 24 | providing something of value to Guile folks. 25 | -------------------------------------------------------------------------------- /doc/use-cases.txt: -------------------------------------------------------------------------------- 1 | +-------------------+ 2 | | Guile | 3 | O | | 4 | -+- | .---------------. | 5 | | -------->| Hack On Guile | | 6 | / \ \ | `---------------' | O 7 | Guile Developer | .---------------. | -+- 8 | \ | | Write Scripts |<------ | 9 | O \ | `---------------' | / \ 10 | -+- `--->.---------------. | Scheme Programmer 11 | | -------->| Write Guile | | 12 | / \ .-->| Extensions | | 13 | Extension / | `---------------' | O 14 | Developer / | .---------------. | -+- 15 | / | | Use Guile App |<------ | 16 | O / | `---------------' | / \ 17 | -+- / | .---------------. | Application User 18 | | -------->| Embed Guile | | 19 | / \ | `---------------' | 20 | Application | | 21 | Developer | | 22 | +-------------------+ 23 | -------------------------------------------------------------------------------- /emacs/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. 2 | ## 3 | ## Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 4 | ## 5 | ## This file is part of GUILE. 6 | ## 7 | ## GUILE is free software; you can redistribute it and/or modify it 8 | ## under the terms of the GNU Lesser General Public License as 9 | ## published by the Free Software Foundation; either version 3, or 10 | ## (at your option) any later version. 11 | ## 12 | ## GUILE is distributed in the hope that it will be useful, but 13 | ## WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | ## GNU Lesser General Public License for more details. 16 | ## 17 | ## You should have received a copy of the GNU Lesser General Public 18 | ## License along with GUILE; see the file COPYING.LESSER. If not, 19 | ## write to the Free Software Foundation, Inc., 51 Franklin Street, 20 | ## Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | AUTOMAKE_OPTIONS = gnu 23 | 24 | ETAGS_ARGS = ChangeLog-2008 25 | -------------------------------------------------------------------------------- /emacs/README: -------------------------------------------------------------------------------- 1 | Index 2 | 3 | gud-guile.el --- Support for debugging guile internals 4 | guile-c.el --- Guile C editing commands 5 | guile-scheme.el --- Guile Scheme editing mode 6 | guile.el --- Emacs Guile interface 7 | multistring.el --- editing multiline strings. 8 | patch.el --- mail/apply a patch 9 | ppexpand.el --- temporarily expanding macros in a pretty way. 10 | update-changelog.el --- stitch rcs2log output to ChangeLog 11 | 12 | Generated using: for f in *.el ; do sed -e 's/^....//g' -e '1q' $f ; done 13 | -------------------------------------------------------------------------------- /examples/box-dynamic-module/box-module.scm: -------------------------------------------------------------------------------- 1 | ;;; examples/box-dynamic-module/box-module.scm -- Scheme module exporting 2 | ;;; some functionality from the shared library libbox-module. 3 | 4 | ;;; Commentary: 5 | 6 | ;;; This is the Scheme part of the dynamic library module (box-module). 7 | ;;; When you do a (use-modules (box-module)) in this directory, 8 | ;;; this file gets loaded and will load the compiled extension. 9 | 10 | ;;; Code: 11 | 12 | ;;; Author: Martin Grabmueller 13 | ;;; Date: 2001-06-06 14 | 15 | (define-module (box-module)) 16 | 17 | ;; First, load the library. 18 | ;; 19 | (load-extension "libbox-module" "scm_init_box") 20 | 21 | ;; Then export the procedures which should be visible to module users. 22 | ;; 23 | (export make-box box-ref box-set!) 24 | 25 | ;;; End of file. 26 | -------------------------------------------------------------------------------- /examples/box/README: -------------------------------------------------------------------------------- 1 | -*- outline -*- 2 | 3 | * Overview 4 | 5 | This directory includes an example program for extending Guile with a 6 | new (and even useful) data type. 7 | 8 | 9 | * Build Instructions 10 | 11 | To build the example, simply type 12 | 13 | make box 14 | 15 | in this directory. 16 | 17 | The resulting `box' program is a Guile interpreter which has one 18 | additional data type called `box'. 19 | 20 | 21 | * The Box Data Type 22 | 23 | A box is simply an object for storing one other object in. It can be 24 | used for passing parameters by reference, for example. You simply 25 | store an object into a box, pass it to another procedure which can 26 | store a new object into it and thus return a value via the box. 27 | 28 | 29 | ** Usage 30 | 31 | Box objects are created with `make-box', set with `box-set!' and 32 | examined with `box-ref'. See the following example session for usage 33 | details: 34 | 35 | 36 | ** Example Session 37 | 38 | $ ./box 39 | guile> (define b (make-box)) 40 | guile> b 41 | # 42 | guile> (box-set! b '(list of values)) 43 | guile> b 44 | # 45 | guile> (box-ref b) 46 | (list of values) 47 | guile> (quit) 48 | $ 49 | -------------------------------------------------------------------------------- /examples/compat/acconfig.h: -------------------------------------------------------------------------------- 1 | #undef HAVE_SCM_T_BITS 2 | -------------------------------------------------------------------------------- /examples/compat/acinclude.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([GUILE_COMPAT], 2 | [guile_compat_save_CFLAGS="$CFLAGS" 3 | guile_compat_save_LIBS="$LIBS" 4 | CFLAGS="$GUILE_CFLAGS" 5 | LIBS="$GUILE_LDFLAGS" 6 | AC_CHECK_FUNCS([scm_c_define_module scm_c_read_string scm_gc_protect_object scm_list_1 scm_c_register_extension scm_make_real scm_num2double scm_c_define_gsubr]) 7 | AC_MSG_CHECKING(for scm_t_bits) 8 | AC_CACHE_VAL(ac_cv_have_scm_t_bits, 9 | [AC_TRY_COMPILE([#include ], 10 | [scm_t_bits a;], 11 | ac_cv_have_scm_t_bits=yes, 12 | ac_cv_have_scm_t_bits=no)]) 13 | AC_MSG_RESULT($ac_cv_have_scm_t_bits) 14 | if test $ac_cv_have_scm_t_bits = yes; then 15 | AC_DEFINE([HAVE_SCM_T_BITS]) 16 | fi 17 | LIBS="$guile_compat_save_LIBS" 18 | CFLAGS="$guile_compat_save_CFLAGS"]) 19 | -------------------------------------------------------------------------------- /examples/compat/configure.in: -------------------------------------------------------------------------------- 1 | ### BEGIN compatibility checks ### 2 | 3 | AC_CHECK_FUNCS(scm_c_define_module scm_c_read_string scm_gc_protect_object scm_list_1) 4 | 5 | AC_MSG_CHECKING(for scm_t_bits) 6 | AC_CACHE_VAL(ac_cv_have_scm_t_bits, 7 | [AC_TRY_COMPILE([#include ], 8 | [scm_t_bits a;], 9 | ac_cv_have_scm_t_bits=yes, ac_cv_have_scm_t_bits=no)]) 10 | AC_MSG_RESULT($ac_cv_have_scm_t_bits) 11 | if test $ac_cv_have_scm_t_bits = yes; then 12 | AC_DEFINE(HAVE_SCM_T_BITS) 13 | fi 14 | 15 | ### END compatibility checks ### 16 | -------------------------------------------------------------------------------- /examples/modules/README: -------------------------------------------------------------------------------- 1 | -*- outline -*- 2 | 3 | * Overview 4 | 5 | This directory includes examples which show how to write and use Guile 6 | modules in Scheme programs. 7 | 8 | The descriptions below assume that you have a working copy of Guile 9 | installed and available with the standard installation prefix 10 | `/usr/local'. 11 | 12 | 13 | * Included Examples 14 | 15 | 16 | ** main 17 | 18 | The main program, which uses the modules described below to perform 19 | some actions. Module usage and selective importing as well as 20 | renaming is demonstrated here.n 21 | 22 | $ ./main 23 | 24 | or 25 | 26 | guile -s main 27 | 28 | ** module-0.scm, module-1.scm, module-2.scm 29 | 30 | Two modules which export several procedure, some of which have the 31 | same names (so that renaming/selection is required for proper 32 | importing). 33 | -------------------------------------------------------------------------------- /examples/modules/module-0.scm: -------------------------------------------------------------------------------- 1 | ;;; examples/modules/module-0.scm -- Module system demo. 2 | 3 | ;;; Commentary: 4 | 5 | ;;; Module 0 of the module demo program. 6 | 7 | ;;; Author: Martin Grabmueller 8 | ;;; Date: 2001-05-29 9 | 10 | ;;; Code: 11 | 12 | (define-module (module-0)) 13 | 14 | (export foo bar) 15 | 16 | (define (foo) 17 | (display "module-0 foo") 18 | (newline)) 19 | 20 | (define (bar) 21 | (display "module-0 bar") 22 | (newline)) 23 | 24 | ;;; End of file. 25 | -------------------------------------------------------------------------------- /examples/modules/module-1.scm: -------------------------------------------------------------------------------- 1 | ;;; examples/modules/module-1.scm -- Module system demo. 2 | 3 | ;;; Commentary: 4 | 5 | ;;; Module 1 of the module demo program. 6 | 7 | ;;; Author: Martin Grabmueller 8 | ;;; Date: 2001-05-29 9 | 10 | ;;; Code: 11 | 12 | (define-module (module-1)) 13 | 14 | (export foo bar) 15 | 16 | (define (foo) 17 | (display "module-1 foo") 18 | (newline)) 19 | 20 | (define (bar) 21 | (display "module-1 bar") 22 | (newline)) 23 | 24 | ;;; End of file. 25 | -------------------------------------------------------------------------------- /examples/modules/module-2.scm: -------------------------------------------------------------------------------- 1 | ;;; examples/modules/module-2.scm -- Module system demo. 2 | 3 | ;;; Commentary: 4 | 5 | ;;; Module 2 of the module demo program. 6 | 7 | ;;; Author: Martin Grabmueller 8 | ;;; Date: 2001-05-29 9 | 10 | ;;; Code: 11 | 12 | (define-module (module-2)) 13 | 14 | (export foo bar braz) 15 | 16 | (define (foo) 17 | (display "module-2 foo") 18 | (newline)) 19 | 20 | (define (bar) 21 | (display "module-2 bar") 22 | (newline)) 23 | 24 | (define (braz) 25 | (display "module-2 braz") 26 | (newline)) 27 | 28 | ;;; End of file. 29 | -------------------------------------------------------------------------------- /examples/safe/README: -------------------------------------------------------------------------------- 1 | -*- outline -*- 2 | 3 | * Overview 4 | 5 | This directory includes examples which show how to create and use safe 6 | environments for safe (sand-boxed) execution of Scheme programs. 7 | 8 | *Note* that the files in this directory are only suitable for 9 | demonstration purposes, if you have to implement safe evaluation 10 | mechanisms in important environments, you will have to do more than 11 | shown here -- for example disabling input/output operations. 12 | 13 | The descriptions below assume that you have a working copy of Guile 14 | installed and available with the standard installation prefix 15 | `/usr/local'. 16 | 17 | * Included Examples 18 | 19 | 20 | ** safe 21 | 22 | The main program, which executes the Scheme code in a file given on 23 | the command line in a safe environment. The following command will 24 | do that with the file `untrusted.scm' (see below.) 25 | 26 | $ ./safe untrusted.scm 27 | 28 | or 29 | 30 | guile -s safe untrusted.scm 31 | 32 | ** untrusted.scm 33 | 34 | This file contains some Scheme code, which will be executed in a 35 | safe environment by the `safe' script. 36 | 37 | ** evil.scm 38 | 39 | This file also contains Scheme code, but it tries to do evil things. 40 | Evaluating this with the `safe' script will abort on those evil 41 | actions. 42 | -------------------------------------------------------------------------------- /examples/safe/evil.scm: -------------------------------------------------------------------------------- 1 | ;;; examples/safe/evil.scm -- Evil Scheme file to be run in a safe 2 | ;;; environment. 3 | 4 | ;;; Commentary: 5 | 6 | ;;; This is an example file to be evaluated by the `safe' program in 7 | ;;; this directory. This program, unlike the `untrusted.scm' (which 8 | ;;; is untrusted, but a really nice fellow though), tries to do evil 9 | ;;; things and will thus break in a safe environment. 10 | ;;; 11 | ;;; *Note* that the files in this directory are only suitable for 12 | ;;; demonstration purposes, if you have to implement safe evaluation 13 | ;;; mechanisms in important environments, you will have to do more 14 | ;;; than shown here -- for example disabling input/output operations. 15 | 16 | ;;; Author: Martin Grabmueller 17 | ;;; Date: 2001-05-30 18 | 19 | ;;; Code: 20 | 21 | (define passwd (open-input-file "/etc/passwd")) 22 | 23 | (let lp ((ch (read-char passwd))) 24 | (if (not (eof-object? ch)) 25 | (lp (read-char passwd)))) 26 | 27 | ;;; End of file. 28 | -------------------------------------------------------------------------------- /examples/safe/untrusted.scm: -------------------------------------------------------------------------------- 1 | ;;; examples/safe/untrusted.scm -- Scheme file to be run in a safe 2 | ;;; environment. 3 | 4 | ;;; Commentary: 5 | 6 | ;;; This is an example file to be evaluated by the `safe' program in 7 | ;;; this directory. 8 | ;;; 9 | ;;; *Note* that the files in this directory are only suitable for 10 | ;;; demonstration purposes, if you have to implement safe evaluation 11 | ;;; mechanisms in important environments, you will have to do more 12 | ;;; than shown here -- for example disabling input/output operations. 13 | 14 | ;;; Author: Martin Grabmueller 15 | ;;; Date: 2001-05-30 16 | 17 | ;;; Code: 18 | 19 | ;; fact -- the everlasting factorial function... 20 | ;; 21 | (define (fact n) 22 | (if (< n 2) 23 | 1 24 | (* n (fact (- n 1))))) 25 | 26 | ;; Display the factorial of 0..9 to the terminal. 27 | ;; 28 | (do ((x 0 (+ x 1))) 29 | ((= x 11)) 30 | (display (fact x)) 31 | (newline)) 32 | 33 | ;;; End of file. 34 | -------------------------------------------------------------------------------- /examples/scripts/README: -------------------------------------------------------------------------------- 1 | -*- outline -*- 2 | 3 | * Overview 4 | 5 | This directory includes examples which show how to write scripts using 6 | Guile. 7 | 8 | The descriptions below assume that you have a working copy of Guile 9 | installed and available with the standard installation prefix 10 | `/usr/local'. 11 | 12 | * Included Examples 13 | 14 | 15 | ** simple-hello.scm 16 | 17 | The simplest "Hello World!" program for Guile. Run it like this: 18 | 19 | $ guile -s simple-hello.scm 20 | 21 | ** hello 22 | 23 | An advanced version of the script above, with command line handling 24 | for the important options --help and --version. Run it like this: 25 | 26 | ./hello 27 | 28 | or 29 | 30 | guile -s hello 31 | 32 | ** fact 33 | 34 | Command-line factorial calculator. Run it like this: 35 | 36 | ./fact 5 37 | 38 | to calculate the factorial of 5. 39 | -------------------------------------------------------------------------------- /examples/scripts/simple-hello.scm: -------------------------------------------------------------------------------- 1 | ;;; Commentary: 2 | 3 | ;;; This is the famous Hello-World-program, written for Guile. 4 | ;;; 5 | ;;; For an advanced version, see the script `hello' in the same 6 | ;;; directory. 7 | 8 | ;;; Author: Martin Grabmueller 9 | ;;; Date: 2001-05-29 10 | 11 | ;;; Code: 12 | 13 | (display "Hello, World!") 14 | (newline) 15 | 16 | ;;; End of file. 17 | -------------------------------------------------------------------------------- /examples/web/hello.scm: -------------------------------------------------------------------------------- 1 | ;;; Commentary: 2 | 3 | ;;; A simple web server that responds to all requests with the eponymous 4 | ;;; string. Visit http://localhost:8080 to test. 5 | 6 | ;;; Code: 7 | 8 | (use-modules (web server)) 9 | 10 | ;; A handler receives two values as arguments: the request object, and 11 | ;; the request body. It returns two values also: the response object, 12 | ;; and the response body. 13 | ;; 14 | ;; In this simple example we don't actually access the request object, 15 | ;; but if we wanted to, we would use the procedures from the `(web 16 | ;; request)' module. If there is no body given in the request, the body 17 | ;; argument will be false. 18 | ;; 19 | ;; To create a response object, use the `build-response' procedure from 20 | ;; `(web response)'. Here we take advantage of a shortcut, in which we 21 | ;; return an alist of headers for the response instead of returning a 22 | ;; proper response object. In this case, a response object will be made 23 | ;; for us with a 200 OK status. 24 | ;; 25 | (define (handler request body) 26 | (values '((content-type . (text/plain))) 27 | "Hello, World!")) 28 | 29 | (run-server handler) 30 | -------------------------------------------------------------------------------- /gc-benchmarks/guile-test.scm: -------------------------------------------------------------------------------- 1 | (set! %load-path (cons (string-append (getenv "HOME") "/src/guile") 2 | %load-path)) 3 | 4 | (load "../test-suite/guile-test") 5 | 6 | (main `("guile-test" 7 | "--test-suite" ,(string-append (getenv "HOME") 8 | "/src/guile/test-suite/tests") 9 | "--log-file" ",,test-suite.log")) 10 | -------------------------------------------------------------------------------- /gc-benchmarks/larceny/dumb.sch: -------------------------------------------------------------------------------- 1 | ; Dumb benchmark to test the reporting of words marked during gc. 2 | ; Example: (foo 1000000) 3 | 4 | (define (ballast bytes) 5 | (do ((bytes bytes (- bytes 8)) 6 | (x '() (cons bytes x))) 7 | ((zero? bytes) x))) 8 | 9 | (define (words-benchmark bytes0 bytes1) 10 | (let ((x (ballast bytes0))) 11 | (do ((bytes1 bytes1 (- bytes1 8))) 12 | ((not (positive? bytes1)) 13 | (car (last-pair x))) 14 | (cons (car x) bytes1)))) 15 | 16 | (define (foo n) 17 | (collect) 18 | (display-memstats (memstats)) 19 | (run-benchmark "foo" (lambda () (words-benchmark 1000000 n)) 1) 20 | (display-memstats (memstats))) 21 | 22 | -------------------------------------------------------------------------------- /gc-benchmarks/larceny/dummy.sch: -------------------------------------------------------------------------------- 1 | ; Dummy benchmark (for testing) 2 | ; 3 | ; $Id: dummy.sch,v 1.2 1999/07/12 18:03:37 lth Exp $ 4 | 5 | (define (dummy-benchmark . args) 6 | (run-benchmark "dummy" 7 | 1 8 | (lambda () 9 | (collect) 10 | (display "This is the dummy benchmark!") 11 | (newline) 12 | (display "My arguments are: ") 13 | (display args) 14 | (newline) 15 | args) 16 | (lambda (result) 17 | (equal? result args)))) 18 | 19 | ; eof 20 | -------------------------------------------------------------------------------- /gc-benchmarks/loop.scm: -------------------------------------------------------------------------------- 1 | (let loop ((i 10000000)) 2 | (and (> i 0) 3 | (loop (1- i)))) 4 | 5 | -------------------------------------------------------------------------------- /gc-benchmarks/string.scm: -------------------------------------------------------------------------------- 1 | ;;; From from http://www.ccs.neu.edu/home/will/Twobit/KVW/string.txt . 2 | ; string test 3 | ; (try 100000) 4 | 5 | (define s "abcdef") 6 | 7 | (define (grow) 8 | (set! s (string-append "123" s "456" s "789")) 9 | (set! s (string-append 10 | (substring s (quotient (string-length s) 2) (string-length s)) 11 | (substring s 0 (+ 1 (quotient (string-length s) 2))))) 12 | s) 13 | 14 | (define (trial n) 15 | (do ((i 0 (+ i 1))) 16 | ((> (string-length s) n) (string-length s)) 17 | (grow))) 18 | 19 | (define (try n) 20 | (do ((i 0 (+ i 1))) 21 | ((>= i 10) (string-length s)) 22 | (set! s "abcdef") 23 | (trial n))) 24 | 25 | (try 50000000) -------------------------------------------------------------------------------- /gnulib-local/lib/localcharset.h.diff: -------------------------------------------------------------------------------- 1 | Add a variant of `locale_charset' that returns its result based solely on 2 | information from the environment. See 3 | http://lists.gnu.org/archive/html/guile-devel/2011-11/msg00040.html for the 4 | rationale. 5 | 6 | diff --git a/lib/localcharset.h b/lib/localcharset.h 7 | index 8907ccd..43e976f 100644 8 | --- a/lib/localcharset.h 9 | +++ b/lib/localcharset.h 10 | @@ -32,6 +32,12 @@ extern "C" { 11 | name. */ 12 | extern const char * locale_charset (void); 13 | 14 | +/* Same as above, but only look at environment variables, avoiding calls to 15 | + `setlocale', `nl_langinfo', etc. See 16 | + for 17 | + the rationale. */ 18 | +extern const char * environ_locale_charset (void); 19 | + 20 | 21 | #ifdef __cplusplus 22 | } 23 | -------------------------------------------------------------------------------- /guile-readline/LIBGUILEREADLINE-VERSION: -------------------------------------------------------------------------------- 1 | # -*-shell-script-*- 2 | 3 | # This file contains the shared library versioning information. Right 4 | # now, for this to work properly, you'll also need to add AC_SUBST 5 | # calls to the right place in configure.in, add the right 6 | # -version-info statement to your Makefile.am, and add a call to 7 | # source this file from configure.in. Later we may automate more of 8 | # this. 9 | 10 | LIBGUILEREADLINE_MAJOR=18 11 | LIBGUILEREADLINE_INTERFACE_CURRENT=18 12 | LIBGUILEREADLINE_INTERFACE_REVISION=0 13 | LIBGUILEREADLINE_INTERFACE_AGE=0 14 | LIBGUILEREADLINE_INTERFACE="${LIBGUILEREADLINE_INTERFACE_CURRENT}:${LIBGUILEREADLINE_INTERFACE_REVISION}:${LIBGUILEREADLINE_INTERFACE_AGE}" 15 | -------------------------------------------------------------------------------- /lib/asnprintf.c: -------------------------------------------------------------------------------- 1 | /* Formatted output to strings. 2 | Copyright (C) 1999, 2002, 2006, 2009-2016 Free Software Foundation, Inc. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as published by 6 | the Free Software Foundation; either version 2, or (at your option) 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License along 15 | with this program; if not, see . */ 16 | 17 | #include 18 | 19 | /* Specification. */ 20 | #include "vasnprintf.h" 21 | 22 | #include 23 | 24 | char * 25 | asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) 26 | { 27 | va_list args; 28 | char *result; 29 | 30 | va_start (args, format); 31 | result = vasnprintf (resultbuf, lengthp, format, args); 32 | va_end (args); 33 | return result; 34 | } 35 | -------------------------------------------------------------------------------- /lib/binary-io.c: -------------------------------------------------------------------------------- 1 | #include 2 | #define BINARY_IO_INLINE _GL_EXTERN_INLINE 3 | #include "binary-io.h" 4 | typedef int dummy; 5 | -------------------------------------------------------------------------------- /lib/btowc.c: -------------------------------------------------------------------------------- 1 | /* Convert unibyte character to wide character. 2 | Copyright (C) 2008, 2010-2016 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2008. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation; either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include 22 | 23 | #include 24 | #include 25 | 26 | wint_t 27 | btowc (int c) 28 | { 29 | if (c != EOF) 30 | { 31 | char buf[1]; 32 | wchar_t wc; 33 | 34 | buf[0] = c; 35 | if (mbtowc (&wc, buf, 1) >= 0) 36 | return wc; 37 | } 38 | return WEOF; 39 | } 40 | -------------------------------------------------------------------------------- /lib/c-ctype.c: -------------------------------------------------------------------------------- 1 | #include 2 | #define C_CTYPE_INLINE _GL_EXTERN_INLINE 3 | #include "c-ctype.h" 4 | -------------------------------------------------------------------------------- /lib/copysign.c: -------------------------------------------------------------------------------- 1 | /* Copy sign into another 'double' number. 2 | Copyright (C) 2011-2016 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as published by 6 | the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | /* Specification. */ 20 | #include 21 | 22 | double 23 | copysign (double x, double y) 24 | { 25 | return (signbit (x) != signbit (y) ? - x : x); 26 | } 27 | -------------------------------------------------------------------------------- /lib/full-read.c: -------------------------------------------------------------------------------- 1 | /* An interface to read that retries after partial reads and interrupts. 2 | Copyright (C) 2002-2003, 2009-2016 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as published by 6 | the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #define FULL_READ 18 | #include "full-write.c" 19 | -------------------------------------------------------------------------------- /lib/full-read.h: -------------------------------------------------------------------------------- 1 | /* An interface to read() that reads all it is asked to read. 2 | 3 | Copyright (C) 2002, 2009-2016 Free Software Foundation, Inc. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation; either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Read COUNT bytes at BUF to descriptor FD, retrying if interrupted 21 | or if partial reads occur. Return the number of bytes successfully 22 | read, setting errno if that is less than COUNT. errno = 0 means EOF. */ 23 | extern size_t full_read (int fd, void *buf, size_t count); 24 | -------------------------------------------------------------------------------- /lib/full-write.h: -------------------------------------------------------------------------------- 1 | /* An interface to write() that writes all it is asked to write. 2 | 3 | Copyright (C) 2002-2003, 2009-2016 Free Software Foundation, Inc. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation; either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | 26 | /* Write COUNT bytes at BUF to descriptor FD, retrying if interrupted 27 | or if partial writes occur. Return the number of bytes successfully 28 | written, setting errno if that is less than COUNT. */ 29 | extern size_t full_write (int fd, const void *buf, size_t count); 30 | 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /lib/hard-locale.h: -------------------------------------------------------------------------------- 1 | /* Determine whether a locale is hard. 2 | 3 | Copyright (C) 1999, 2003-2004, 2009-2016 Free Software Foundation, Inc. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation; either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #ifndef HARD_LOCALE_H_ 19 | # define HARD_LOCALE_H_ 1 20 | 21 | # include 22 | 23 | bool hard_locale (int); 24 | 25 | #endif /* HARD_LOCALE_H_ */ 26 | -------------------------------------------------------------------------------- /lib/iconv_open-aix.gperf: -------------------------------------------------------------------------------- 1 | struct mapping { int standard_name; const char vendor_name[10 + 1]; }; 2 | %struct-type 3 | %language=ANSI-C 4 | %define slot-name standard_name 5 | %define hash-function-name mapping_hash 6 | %define lookup-function-name mapping_lookup 7 | %readonly-tables 8 | %global-table 9 | %define word-array-name mappings 10 | %pic 11 | %% 12 | # On AIX 5.1, look in /usr/lib/nls/loc/uconvTable. 13 | ISO-8859-1, "ISO8859-1" 14 | ISO-8859-2, "ISO8859-2" 15 | ISO-8859-3, "ISO8859-3" 16 | ISO-8859-4, "ISO8859-4" 17 | ISO-8859-5, "ISO8859-5" 18 | ISO-8859-6, "ISO8859-6" 19 | ISO-8859-7, "ISO8859-7" 20 | ISO-8859-8, "ISO8859-8" 21 | ISO-8859-9, "ISO8859-9" 22 | ISO-8859-15, "ISO8859-15" 23 | CP437, "IBM-437" 24 | CP850, "IBM-850" 25 | CP852, "IBM-852" 26 | CP856, "IBM-856" 27 | CP857, "IBM-857" 28 | CP861, "IBM-861" 29 | CP865, "IBM-865" 30 | CP869, "IBM-869" 31 | ISO-8859-13, "IBM-921" 32 | CP922, "IBM-922" 33 | CP932, "IBM-932" 34 | CP943, "IBM-943" 35 | CP1046, "IBM-1046" 36 | CP1124, "IBM-1124" 37 | CP1125, "IBM-1125" 38 | CP1129, "IBM-1129" 39 | CP1252, "IBM-1252" 40 | GB2312, "IBM-eucCN" 41 | EUC-JP, "IBM-eucJP" 42 | EUC-KR, "IBM-eucKR" 43 | EUC-TW, "IBM-eucTW" 44 | BIG5, "big5" 45 | -------------------------------------------------------------------------------- /lib/iconv_open-irix.gperf: -------------------------------------------------------------------------------- 1 | struct mapping { int standard_name; const char vendor_name[10 + 1]; }; 2 | %struct-type 3 | %language=ANSI-C 4 | %define slot-name standard_name 5 | %define hash-function-name mapping_hash 6 | %define lookup-function-name mapping_lookup 7 | %readonly-tables 8 | %global-table 9 | %define word-array-name mappings 10 | %pic 11 | %% 12 | # On IRIX 6.5, look in /usr/lib/iconv and /usr/lib/international/encodings. 13 | ISO-8859-1, "ISO8859-1" 14 | ISO-8859-2, "ISO8859-2" 15 | ISO-8859-3, "ISO8859-3" 16 | ISO-8859-4, "ISO8859-4" 17 | ISO-8859-5, "ISO8859-5" 18 | ISO-8859-6, "ISO8859-6" 19 | ISO-8859-7, "ISO8859-7" 20 | ISO-8859-8, "ISO8859-8" 21 | ISO-8859-9, "ISO8859-9" 22 | ISO-8859-15, "ISO8859-15" 23 | KOI8-R, "KOI8" 24 | CP855, "DOS855" 25 | CP1251, "WIN1251" 26 | GB2312, "eucCN" 27 | EUC-JP, "eucJP" 28 | EUC-KR, "eucKR" 29 | EUC-TW, "eucTW" 30 | SHIFT_JIS, "sjis" 31 | TIS-620, "TIS620" 32 | -------------------------------------------------------------------------------- /lib/iconv_open-osf.gperf: -------------------------------------------------------------------------------- 1 | struct mapping { int standard_name; const char vendor_name[10 + 1]; }; 2 | %struct-type 3 | %language=ANSI-C 4 | %define slot-name standard_name 5 | %define hash-function-name mapping_hash 6 | %define lookup-function-name mapping_lookup 7 | %readonly-tables 8 | %global-table 9 | %define word-array-name mappings 10 | %pic 11 | %% 12 | # On OSF/1 5.1, look in /usr/lib/nls/loc/iconv. 13 | ISO-8859-1, "ISO8859-1" 14 | ISO-8859-2, "ISO8859-2" 15 | ISO-8859-3, "ISO8859-3" 16 | ISO-8859-4, "ISO8859-4" 17 | ISO-8859-5, "ISO8859-5" 18 | ISO-8859-6, "ISO8859-6" 19 | ISO-8859-7, "ISO8859-7" 20 | ISO-8859-8, "ISO8859-8" 21 | ISO-8859-9, "ISO8859-9" 22 | ISO-8859-15, "ISO8859-15" 23 | CP437, "cp437" 24 | CP775, "cp775" 25 | CP850, "cp850" 26 | CP852, "cp852" 27 | CP855, "cp855" 28 | CP857, "cp857" 29 | CP861, "cp861" 30 | CP862, "cp862" 31 | CP865, "cp865" 32 | CP866, "cp866" 33 | CP869, "cp869" 34 | CP874, "cp874" 35 | CP949, "KSC5601" 36 | CP1250, "cp1250" 37 | CP1251, "cp1251" 38 | CP1252, "cp1252" 39 | CP1253, "cp1253" 40 | CP1254, "cp1254" 41 | CP1255, "cp1255" 42 | CP1256, "cp1256" 43 | CP1257, "cp1257" 44 | CP1258, "cp1258" 45 | EUC-JP, "eucJP" 46 | EUC-KR, "eucKR" 47 | EUC-TW, "eucTW" 48 | BIG5, "big5" 49 | SHIFT_JIS, "SJIS" 50 | TIS-620, "TACTIS" 51 | -------------------------------------------------------------------------------- /lib/iconv_open-solaris.gperf: -------------------------------------------------------------------------------- 1 | struct mapping { int standard_name; const char vendor_name[10 + 1]; }; 2 | %struct-type 3 | %language=ANSI-C 4 | %define slot-name standard_name 5 | %define hash-function-name mapping_hash 6 | %define lookup-function-name mapping_lookup 7 | %readonly-tables 8 | %global-table 9 | %define word-array-name mappings 10 | %pic 11 | %% 12 | # On Solaris 10, look in the "iconv -l" output. Some aliases are advertised but 13 | # not actually supported by the iconv() function and by the 'iconv' program. 14 | # For example: 15 | # $ echo abc | iconv -f 646 -t ISO-8859-1 16 | # Not supported 646 to ISO-8859-1 17 | # $ echo abc | iconv -f 646 -t ISO8859-1 18 | $ abc 19 | ASCII, "646" 20 | ISO-8859-1, "ISO8859-1" 21 | ISO-8859-2, "ISO8859-2" 22 | ISO-8859-3, "ISO8859-3" 23 | ISO-8859-4, "ISO8859-4" 24 | ISO-8859-5, "ISO8859-5" 25 | ISO-8859-6, "ISO8859-6" 26 | ISO-8859-7, "ISO8859-7" 27 | ISO-8859-8, "ISO8859-8" 28 | ISO-8859-9, "ISO8859-9" 29 | ISO-8859-15, "ISO8859-15" 30 | CP1251, "ansi-1251" 31 | -------------------------------------------------------------------------------- /lib/isinf.c: -------------------------------------------------------------------------------- 1 | /* Test for positive or negative infinity. 2 | Copyright (C) 2007-2016 Free Software Foundation, Inc. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as published by 6 | the Free Software Foundation; either version 2, or (at your option) 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License along 15 | with this program; if not, see . */ 16 | 17 | /* Written by Ben Pfaff , 2008. */ 18 | 19 | #include 20 | 21 | #include 22 | 23 | int 24 | gl_isinff (float x) 25 | { 26 | return x < -FLT_MAX || x > FLT_MAX; 27 | } 28 | 29 | int 30 | gl_isinfd (double x) 31 | { 32 | return x < -DBL_MAX || x > DBL_MAX; 33 | } 34 | 35 | int 36 | gl_isinfl (long double x) 37 | { 38 | return x < -LDBL_MAX || x > LDBL_MAX; 39 | } 40 | -------------------------------------------------------------------------------- /lib/isnand-nolibm.h: -------------------------------------------------------------------------------- 1 | /* Test for NaN that does not need libm. 2 | Copyright (C) 2007-2016 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as published by 6 | the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #if HAVE_ISNAND_IN_LIBC 18 | /* Get declaration of isnan macro. */ 19 | # include 20 | # if __GNUC__ >= 4 21 | /* GCC 4.0 and newer provides three built-ins for isnan. */ 22 | # undef isnand 23 | # define isnand(x) __builtin_isnan ((double)(x)) 24 | # else 25 | # undef isnand 26 | # define isnand(x) isnan ((double)(x)) 27 | # endif 28 | #else 29 | /* Test whether X is a NaN. */ 30 | # undef isnand 31 | # define isnand rpl_isnand 32 | extern int isnand (double x); 33 | #endif 34 | -------------------------------------------------------------------------------- /lib/isnand.c: -------------------------------------------------------------------------------- 1 | /* Test for NaN that does not need libm. 2 | Copyright (C) 2008-2016 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as published by 6 | the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | /* Written by Bruno Haible , 2008. */ 18 | 19 | #include "isnan.c" 20 | -------------------------------------------------------------------------------- /lib/isnanf.c: -------------------------------------------------------------------------------- 1 | /* Test for NaN that does not need libm. 2 | Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as published by 6 | the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | /* Written by Bruno Haible , 2007. */ 18 | 19 | #define USE_FLOAT 20 | #include "isnan.c" 21 | -------------------------------------------------------------------------------- /lib/isnanl.c: -------------------------------------------------------------------------------- 1 | /* Test for NaN that does not need libm. 2 | Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as published by 6 | the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | /* Written by Bruno Haible , 2007. */ 18 | 19 | #define USE_LONG_DOUBLE 20 | #include "isnan.c" 21 | -------------------------------------------------------------------------------- /lib/itold.c: -------------------------------------------------------------------------------- 1 | /* Replacement for 'int' to 'long double' conversion routine. 2 | Copyright (C) 2011-2016 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2011. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation; either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include 22 | 23 | void 24 | _Qp_itoq (long double *result, int a) 25 | { 26 | /* Convert from 'int' to 'double', then from 'double' to 'long double'. */ 27 | *result = (double) a; 28 | } 29 | -------------------------------------------------------------------------------- /lib/libunistring.valgrind: -------------------------------------------------------------------------------- 1 | # Suppress valgrind messages in an installed libunistring. 2 | 3 | # Suppress a valgrind message about use of uninitialized memory in freea(). 4 | # This use is OK because it provides only a speedup. 5 | { 6 | libunistring_freea 7 | Memcheck:Cond 8 | fun:libunistring_freea 9 | } 10 | -------------------------------------------------------------------------------- /lib/log.c: -------------------------------------------------------------------------------- 1 | /* Logarithm. 2 | Copyright (C) 2012-2016 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as published by 6 | the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | /* Specification. */ 20 | #include 21 | 22 | double 23 | log (double x) 24 | #undef log 25 | { 26 | if (x <= 0.0) 27 | { 28 | /* Work around the OSF/1 5.1 bug. */ 29 | if (x == 0.0) 30 | /* Return -Infinity. */ 31 | return -1.0 / 0.0; 32 | /* Work around the NetBSD 5.1, Solaris 11 2011-11 bug. */ 33 | else /* x < 0.0 */ 34 | /* Return NaN. */ 35 | return 0.0 / 0.0; 36 | } 37 | return log (x); 38 | } 39 | -------------------------------------------------------------------------------- /lib/malloca.valgrind: -------------------------------------------------------------------------------- 1 | # Suppress a valgrind message about use of uninitialized memory in freea(). 2 | # This use is OK because it provides only a speedup. 3 | { 4 | freea 5 | Memcheck:Cond 6 | fun:freea 7 | } 8 | -------------------------------------------------------------------------------- /lib/math.c: -------------------------------------------------------------------------------- 1 | #include 2 | #define _GL_MATH_INLINE _GL_EXTERN_INLINE 3 | #include "math.h" 4 | typedef int dummy; 5 | -------------------------------------------------------------------------------- /lib/mbtowc.c: -------------------------------------------------------------------------------- 1 | /* Convert multibyte character to wide character. 2 | Copyright (C) 2011-2016 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2011. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation; either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | #include 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | #include "mbtowc-impl.h" 27 | -------------------------------------------------------------------------------- /lib/memchr.valgrind: -------------------------------------------------------------------------------- 1 | # Suppress a valgrind message about use of uninitialized memory in memchr(). 2 | # POSIX states that when the character is found, memchr must not read extra 3 | # bytes in an overestimated length (for example, where memchr is used to 4 | # implement strnlen). However, we use a safe word read to provide a speedup. 5 | { 6 | memchr-value4 7 | Memcheck:Value4 8 | fun:rpl_memchr 9 | } 10 | { 11 | memchr-value8 12 | Memcheck:Value8 13 | fun:rpl_memchr 14 | } 15 | -------------------------------------------------------------------------------- /lib/ref-add.sin: -------------------------------------------------------------------------------- 1 | # Add this package to a list of references stored in a text file. 2 | # 3 | # Copyright (C) 2000, 2009-2016 Free Software Foundation, Inc. 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public License as published by 7 | # the Free Software Foundation; either version 2, or (at your option) 8 | # any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public License along 16 | # with this program; if not, see . 17 | # 18 | # Written by Bruno Haible . 19 | # 20 | /^# Packages using this file: / { 21 | s/# Packages using this file:// 22 | ta 23 | :a 24 | s/ @PACKAGE@ / @PACKAGE@ / 25 | tb 26 | s/ $/ @PACKAGE@ / 27 | :b 28 | s/^/# Packages using this file:/ 29 | } 30 | -------------------------------------------------------------------------------- /lib/ref-del.sin: -------------------------------------------------------------------------------- 1 | # Remove this package from a list of references stored in a text file. 2 | # 3 | # Copyright (C) 2000, 2009-2016 Free Software Foundation, Inc. 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public License as published by 7 | # the Free Software Foundation; either version 2, or (at your option) 8 | # any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public License along 16 | # with this program; if not, see . 17 | # 18 | # Written by Bruno Haible . 19 | # 20 | /^# Packages using this file: / { 21 | s/# Packages using this file:// 22 | s/ @PACKAGE@ / / 23 | s/^/# Packages using this file:/ 24 | } 25 | -------------------------------------------------------------------------------- /lib/safe-write.c: -------------------------------------------------------------------------------- 1 | /* An interface to write that retries after interrupts. 2 | Copyright (C) 2002, 2009-2016 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as published by 6 | the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #define SAFE_WRITE 18 | #include "safe-read.c" 19 | -------------------------------------------------------------------------------- /lib/same-inode.h: -------------------------------------------------------------------------------- 1 | /* Determine whether two stat buffers refer to the same file. 2 | 3 | Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation; either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #ifndef SAME_INODE_H 19 | # define SAME_INODE_H 1 20 | 21 | # ifdef __VMS 22 | # define SAME_INODE(a, b) \ 23 | ((a).st_ino[0] == (b).st_ino[0] \ 24 | && (a).st_ino[1] == (b).st_ino[1] \ 25 | && (a).st_ino[2] == (b).st_ino[2] \ 26 | && (a).st_dev == (b).st_dev) 27 | # else 28 | # define SAME_INODE(a, b) \ 29 | ((a).st_ino == (b).st_ino \ 30 | && (a).st_dev == (b).st_dev) 31 | # endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /lib/size_max.h: -------------------------------------------------------------------------------- 1 | /* size_max.h -- declare SIZE_MAX through system headers 2 | Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc. 3 | Written by Simon Josefsson. 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation; either version 2, or (at your option) 8 | any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program; if not, see . */ 17 | 18 | #ifndef GNULIB_SIZE_MAX_H 19 | #define GNULIB_SIZE_MAX_H 20 | 21 | /* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */ 22 | # include 23 | /* Get SIZE_MAX declaration on systems like glibc 2. */ 24 | # if HAVE_STDINT_H 25 | # include 26 | # endif 27 | /* On systems where these include files don't define it, SIZE_MAX is defined 28 | in config.h. */ 29 | 30 | #endif /* GNULIB_SIZE_MAX_H */ 31 | -------------------------------------------------------------------------------- /lib/stat-time.c: -------------------------------------------------------------------------------- 1 | #include 2 | #define _GL_STAT_TIME_INLINE _GL_EXTERN_INLINE 3 | #include "stat-time.h" 4 | -------------------------------------------------------------------------------- /lib/strftime.h: -------------------------------------------------------------------------------- 1 | /* declarations for strftime.c 2 | 3 | Copyright (C) 2002, 2004, 2008-2016 Free Software Foundation, Inc. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation; either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | /* Just like strftime, but with two more arguments: 25 | POSIX requires that strftime use the local timezone information. 26 | Use the timezone __TZ instead. Use __NS as the number of 27 | nanoseconds in the %N directive. */ 28 | size_t nstrftime (char *, size_t, char const *, struct tm const *, 29 | timezone_t __tz, int __ns); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /lib/sys_socket.c: -------------------------------------------------------------------------------- 1 | #include 2 | #define _GL_SYS_SOCKET_INLINE _GL_EXTERN_INLINE 3 | #include "sys/socket.h" 4 | typedef int dummy; 5 | -------------------------------------------------------------------------------- /lib/unistd.c: -------------------------------------------------------------------------------- 1 | #include 2 | #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE 3 | #include "unistd.h" 4 | typedef int dummy; 5 | -------------------------------------------------------------------------------- /lib/wctype-h.c: -------------------------------------------------------------------------------- 1 | /* Normally this would be wctype.c, but that name's already taken. */ 2 | #include 3 | #define _GL_WCTYPE_INLINE _GL_EXTERN_INLINE 4 | #include "wctype.h" 5 | -------------------------------------------------------------------------------- /lib/xsize.c: -------------------------------------------------------------------------------- 1 | #include 2 | #define XSIZE_INLINE _GL_EXTERN_INLINE 3 | #include "xsize.h" 4 | -------------------------------------------------------------------------------- /libguile/.gitignore: -------------------------------------------------------------------------------- 1 | c-tokenize.c 2 | cpp-E.c 3 | cpp-SIG.c 4 | gen-scmconfig 5 | gen-scmconfig.h 6 | guile 7 | guile-func-name-check 8 | guile-procedures.texi 9 | guile-snarf 10 | guile-snarf-docs 11 | guile_filter_doc_snarfage 12 | libpath.h 13 | scmconfig.h 14 | version.h 15 | vm-i-*.i 16 | *.NEW 17 | -------------------------------------------------------------------------------- /libguile/ChangeLog-1996-1999: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/libguile/ChangeLog-1996-1999 -------------------------------------------------------------------------------- /libguile/cpp-SIG.syms: -------------------------------------------------------------------------------- 1 | SIGABRT 2 | SIGALRM 3 | SIGBREAK 4 | SIGBUS 5 | SIGCHLD 6 | SIGCLD 7 | SIGCONT 8 | SIGEMT 9 | SIGFPE 10 | SIGHUP 11 | SIGILL 12 | SIGINFO 13 | SIGINT 14 | SIGIO 15 | SIGIOT 16 | SIGKILL 17 | SIGLOST 18 | SIGPIPE 19 | SIGPOLL 20 | SIGPROF 21 | SIGPWR 22 | SIGQUIT 23 | SIGRTMAX 24 | SIGRTMIN 25 | SIGSEGV 26 | SIGSTKFLT 27 | SIGSTKSZ 28 | SIGSTOP 29 | SIGSYS 30 | SIGTERM 31 | SIGTRAP 32 | SIGTSTP 33 | SIGTTIN 34 | SIGTTOU 35 | SIGUNUSED 36 | SIGURG 37 | SIGUSR1 38 | SIGUSR2 39 | SIGVTALRM 40 | SIGWINCH 41 | SIGXCPU 42 | SIGXFSZ 43 | -------------------------------------------------------------------------------- /libguile/gdbint.h: -------------------------------------------------------------------------------- 1 | /* classes: h_files */ 2 | 3 | #ifndef SCM_GDBINT_H 4 | #define SCM_GDBINT_H 5 | 6 | /* Copyright (C) 1996,2000, 2006, 2008 Free Software Foundation, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public License 10 | * as published by the Free Software Foundation; either version 3 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 21 | * 02110-1301 USA 22 | */ 23 | 24 | 25 | 26 | #include "libguile/__scm.h" 27 | 28 | 29 | 30 | SCM_API int scm_print_carefully_p; 31 | 32 | SCM_INTERNAL void scm_init_gdbint (void); 33 | 34 | #endif /* SCM_GDBINT_H */ 35 | 36 | /* 37 | Local Variables: 38 | c-file-style: "gnu" 39 | End: 40 | */ 41 | -------------------------------------------------------------------------------- /libguile/guardians.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/libguile/guardians.c -------------------------------------------------------------------------------- /libguile/inline.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001, 2006, 2008, 2011, 2013 Free Software Foundation, Inc. 2 | * 3 | * This library is free software; you can redistribute it and/or 4 | * modify it under the terms of the GNU Lesser General Public License 5 | * as published by the Free Software Foundation; either version 3 of 6 | * the License, or (at your option) any later version. 7 | * 8 | * This library is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public 14 | * License along with this library; if not, write to the Free Software 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 16 | * 02110-1301 USA 17 | */ 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #define SCM_IMPLEMENT_INLINES 1 24 | #define SCM_INLINE_C_IMPLEMENTING_INLINES 1 25 | #include "libguile/inline.h" 26 | #include "libguile/array-handle.h" 27 | #include "libguile/gc.h" 28 | #include "libguile/smob.h" 29 | -------------------------------------------------------------------------------- /libguile/memmove.c: -------------------------------------------------------------------------------- 1 | /* Wrapper to implement ANSI C's memmove using BSD's bcopy. */ 2 | /* This function is in the public domain. --Per Bothner. */ 3 | 4 | 5 | #include 6 | 7 | #ifdef __STDC__ 8 | #define PTR void * 9 | #define CPTR const void * 10 | PTR memmove (PTR, CPTR, size_t); 11 | #else 12 | #define PTR char * 13 | #define CPTR char * 14 | PTR memmove (); 15 | #endif 16 | 17 | PTR 18 | memmove (PTR s1, CPTR s2, size_t n) 19 | { 20 | bcopy (s2, s1, n); 21 | return s1; 22 | } 23 | 24 | /* 25 | Local Variables: 26 | c-file-style: "gnu" 27 | End: 28 | */ 29 | -------------------------------------------------------------------------------- /libguile/poll.h: -------------------------------------------------------------------------------- 1 | /* classes: h_files */ 2 | 3 | #ifndef SCM_POLL_H 4 | #define SCM_POLL_H 5 | 6 | /* Copyright (C) 2010 Free Software Foundation, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public License 10 | * as published by the Free Software Foundation; either version 3 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 21 | * 02110-1301 USA 22 | */ 23 | 24 | 25 | 26 | #include "libguile/__scm.h" 27 | 28 | 29 | 30 | SCM_INTERNAL void scm_register_poll (void); 31 | 32 | #endif /* SCM_POLL_H */ 33 | 34 | /* 35 | Local Variables: 36 | c-file-style: "gnu" 37 | End: 38 | */ 39 | -------------------------------------------------------------------------------- /libguile/remaining-docs-needed: -------------------------------------------------------------------------------- 1 | #!/bin/sh - 2 | grep '^[ ]*""' *.c | awk -F: '{ print $1 }' | uniq -c 3 | -------------------------------------------------------------------------------- /libguile/run-test: -------------------------------------------------------------------------------- 1 | #!/bin/sh - 2 | # Run the guile-test script using the guile binary from this directory 3 | cd ../test-suite 4 | ../libguile/guile -e main -s guile-test "$@" 5 | -------------------------------------------------------------------------------- /libguile/scmconfig.h.top: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2003, 2006 Free Software Foundation, Inc. 2 | * 3 | * This library is free software; you can redistribute it and/or 4 | * modify it under the terms of the GNU Lesser General Public License 5 | * as published by the Free Software Foundation; either version 3 of 6 | * the License, or (at your option) any later version. 7 | * 8 | * This library is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public 14 | * License along with this library; if not, write to the Free Software 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 16 | * 02110-1301 USA 17 | */ 18 | -------------------------------------------------------------------------------- /libguile/strerror.c: -------------------------------------------------------------------------------- 1 | /* Turning errno values into English error messages. 2 | Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 2000, 2001, 2006 Free Software Foundation, Inc. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public License 6 | as published by the Free Software Foundation; either version 3 of 7 | the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 | 02110-1301 USA 18 | */ 19 | 20 | char * 21 | strerror (int errnum) 22 | { 23 | extern char *sys_errlist[]; 24 | extern int sys_nerr; 25 | 26 | if (errnum >= 0 && errnum < sys_nerr) 27 | return sys_errlist[errnum]; 28 | return (char *) "Unknown error"; 29 | } 30 | 31 | /* 32 | Local Variables: 33 | c-file-style: "gnu" 34 | End: 35 | */ 36 | -------------------------------------------------------------------------------- /libguile/trees.h: -------------------------------------------------------------------------------- 1 | /* classes: h_files */ 2 | 3 | #ifndef SCM_TREES_H 4 | #define SCM_TREES_H 5 | 6 | /* Copyright (C) 2009 7 | * Free Software Foundation, Inc. 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public License 11 | * as published by the Free Software Foundation; either version 3 of 12 | * the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 22 | * 02110-1301 USA 23 | */ 24 | 25 | 26 | 27 | #include "libguile/__scm.h" 28 | 29 | 30 | 31 | SCM_API SCM scm_copy_tree (SCM obj); 32 | 33 | 34 | 35 | /* Guile internal functions */ 36 | 37 | SCM_INTERNAL void scm_init_trees (void); 38 | 39 | #endif /* SCM_TREES_H */ 40 | 41 | /* 42 | Local Variables: 43 | c-file-style: "gnu" 44 | End: 45 | */ 46 | -------------------------------------------------------------------------------- /libguile/unicode.h: -------------------------------------------------------------------------------- 1 | /* classes: h_files */ 2 | 3 | #ifndef SCM_UNICODE_H 4 | #define SCM_UNICODE_H 5 | 6 | /* Copyright (C) 2014 Free Software Foundation, Inc. 7 | * 8 | * This library is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library. If not, see 20 | * . 21 | */ 22 | 23 | 24 | 25 | #include "libguile/__scm.h" 26 | 27 | SCM_INTERNAL SCM scm_formal_name_to_char (SCM); 28 | SCM_INTERNAL SCM scm_char_to_formal_name (SCM); 29 | SCM_INTERNAL void scm_init_unicode (void); 30 | 31 | #endif /* SCM_UNICODE_H */ 32 | 33 | /* 34 | Local Variables: 35 | c-file-style: "gnu" 36 | End: 37 | */ 38 | -------------------------------------------------------------------------------- /libguile/vports.h: -------------------------------------------------------------------------------- 1 | /* classes: h_files */ 2 | 3 | #ifndef SCM_VPORTS_H 4 | #define SCM_VPORTS_H 5 | 6 | /* Copyright (C) 1995,1996,2000, 2006, 2008 Free Software Foundation, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public License 10 | * as published by the Free Software Foundation; either version 3 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 21 | * 02110-1301 USA 22 | */ 23 | 24 | 25 | 26 | #include "libguile/__scm.h" 27 | 28 | 29 | 30 | SCM_API SCM scm_make_soft_port (SCM pv, SCM modes); 31 | SCM_INTERNAL void scm_init_vports (void); 32 | 33 | #endif /* SCM_VPORTS_H */ 34 | 35 | /* 36 | Local Variables: 37 | c-file-style: "gnu" 38 | End: 39 | */ 40 | -------------------------------------------------------------------------------- /m4/.gitignore: -------------------------------------------------------------------------------- 1 | /libtool.m4 2 | /lt*.m4 3 | -------------------------------------------------------------------------------- /m4/ChangeLog-2008: -------------------------------------------------------------------------------- 1 | 2008-01-30 Ludovic Courtès 2 | 3 | * gnulib-cache.m4 (gl_MODULES): Add `extensions' explicitly 4 | since we rely on it, e.g., for `srfi-14.c'. 5 | 6 | 2008-01-18 Neil Jerram 7 | 8 | * gnulib-cache.m4: Recent gnulib adds gl_PO_BASE and gl_PO_DOMAIN 9 | lines to this file. 10 | 11 | 2007-10-24 Neil Jerram 12 | 13 | * .cvsignore: Commit to CVS. 14 | 15 | 2007-07-29 Ludovic Courtès 16 | 17 | * gnulib-cache.m4: New file. 18 | 19 | 20 | ;; Local Variables: 21 | ;; coding: utf-8 22 | ;; End: 23 | 24 | 25 | -------------------------------------------------------------------------------- /m4/autobuild.m4: -------------------------------------------------------------------------------- 1 | # autobuild.m4 serial 7 2 | dnl Copyright (C) 2004, 2006-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Simon Josefsson 8 | 9 | # Usage: AB_INIT([MODE]). 10 | AC_DEFUN([AB_INIT], 11 | [ 12 | AC_REQUIRE([AC_CANONICAL_BUILD]) 13 | AC_REQUIRE([AC_CANONICAL_HOST]) 14 | 15 | if test -z "$AB_PACKAGE"; then 16 | AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE} 17 | fi 18 | AC_MSG_NOTICE([autobuild project... $AB_PACKAGE]) 19 | 20 | if test -z "$AB_VERSION"; then 21 | AB_VERSION=${PACKAGE_VERSION:-$VERSION} 22 | fi 23 | AC_MSG_NOTICE([autobuild revision... $AB_VERSION]) 24 | 25 | hostname=`hostname` 26 | if test "$hostname"; then 27 | AC_MSG_NOTICE([autobuild hostname... $hostname]) 28 | fi 29 | 30 | ifelse([$1],[],,[AC_MSG_NOTICE([autobuild mode... $1])]) 31 | 32 | date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ` 33 | if test "$?" != 0; then 34 | date=`date` 35 | fi 36 | if test "$date"; then 37 | AC_MSG_NOTICE([autobuild timestamp... $date]) 38 | fi 39 | ]) 40 | -------------------------------------------------------------------------------- /m4/byteswap.m4: -------------------------------------------------------------------------------- 1 | # byteswap.m4 serial 4 2 | dnl Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl Written by Oskar Liljeblad. 8 | 9 | AC_DEFUN([gl_BYTESWAP], 10 | [ 11 | dnl Prerequisites of lib/byteswap.in.h. 12 | AC_CHECK_HEADERS([byteswap.h], [ 13 | BYTESWAP_H='' 14 | ], [ 15 | BYTESWAP_H='byteswap.h' 16 | ]) 17 | AC_SUBST([BYTESWAP_H]) 18 | AM_CONDITIONAL([GL_GENERATE_BYTESWAP_H], [test -n "$BYTESWAP_H"]) 19 | ]) 20 | -------------------------------------------------------------------------------- /m4/check-math-lib.m4: -------------------------------------------------------------------------------- 1 | # check-math-lib.m4 serial 4 2 | dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | dnl 7 | dnl gl_CHECK_MATH_LIB (VARIABLE, EXPRESSION [, EXTRA-CODE]) 8 | dnl 9 | dnl Sets the shell VARIABLE according to the libraries needed by EXPRESSION 10 | dnl to compile and link: to the empty string if no extra libraries are needed, 11 | dnl to "-lm" if -lm is needed, or to "missing" if it does not compile and 12 | dnl link either way. 13 | dnl 14 | dnl Example: gl_CHECK_MATH_LIB([ROUNDF_LIBM], [x = roundf (x);]) 15 | AC_DEFUN([gl_CHECK_MATH_LIB], [ 16 | save_LIBS=$LIBS 17 | $1=missing 18 | for libm in "" "-lm"; do 19 | LIBS="$save_LIBS $libm" 20 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ 21 | #ifndef __NO_MATH_INLINES 22 | # define __NO_MATH_INLINES 1 /* for glibc */ 23 | #endif 24 | #include 25 | $3 26 | double x;]], 27 | [$2])], 28 | [$1=$libm 29 | break]) 30 | done 31 | LIBS=$save_LIBS 32 | ]) 33 | -------------------------------------------------------------------------------- /m4/close.m4: -------------------------------------------------------------------------------- 1 | # close.m4 serial 8 2 | dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_CLOSE], 8 | [ 9 | AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 10 | AC_REQUIRE([gl_MSVC_INVAL]) 11 | if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 12 | REPLACE_CLOSE=1 13 | fi 14 | m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [ 15 | gl_PREREQ_SYS_H_WINSOCK2 16 | if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then 17 | dnl Even if the 'socket' module is not used here, another part of the 18 | dnl application may use it and pass file descriptors that refer to 19 | dnl sockets to the close() function. So enable the support for sockets. 20 | REPLACE_CLOSE=1 21 | fi 22 | ]) 23 | dnl Replace close() for supporting the gnulib-defined fchdir() function, 24 | dnl to keep fchdir's bookkeeping up-to-date. 25 | m4_ifdef([gl_FUNC_FCHDIR], [ 26 | if test $REPLACE_CLOSE = 0; then 27 | gl_TEST_FCHDIR 28 | if test $HAVE_FCHDIR = 0; then 29 | REPLACE_CLOSE=1 30 | fi 31 | fi 32 | ]) 33 | ]) 34 | -------------------------------------------------------------------------------- /m4/codeset.m4: -------------------------------------------------------------------------------- 1 | # codeset.m4 serial 5 (gettext-0.18.2) 2 | dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016 Free Software Foundation, 3 | dnl Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | 8 | dnl From Bruno Haible. 9 | 10 | AC_DEFUN([AM_LANGINFO_CODESET], 11 | [ 12 | AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], 13 | [AC_LINK_IFELSE( 14 | [AC_LANG_PROGRAM( 15 | [[#include ]], 16 | [[char* cs = nl_langinfo(CODESET); return !cs;]])], 17 | [am_cv_langinfo_codeset=yes], 18 | [am_cv_langinfo_codeset=no]) 19 | ]) 20 | if test $am_cv_langinfo_codeset = yes; then 21 | AC_DEFINE([HAVE_LANGINFO_CODESET], [1], 22 | [Define if you have and nl_langinfo(CODESET).]) 23 | fi 24 | ]) 25 | -------------------------------------------------------------------------------- /m4/copysign.m4: -------------------------------------------------------------------------------- 1 | # copysign.m4 serial 1 2 | dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_COPYSIGN], 8 | [ 9 | AC_REQUIRE([gl_MATH_H_DEFAULTS]) 10 | 11 | dnl Determine COPYSIGN_LIBM. 12 | gl_MATHFUNC([copysign], [double], [(double, double)]) 13 | if test $gl_cv_func_copysign_no_libm = no \ 14 | && test $gl_cv_func_copysign_in_libm = no; then 15 | HAVE_COPYSIGN=0 16 | COPYSIGN_LIBM= 17 | fi 18 | AC_SUBST([COPYSIGN_LIBM]) 19 | ]) 20 | -------------------------------------------------------------------------------- /m4/dirname.m4: -------------------------------------------------------------------------------- 1 | #serial 10 -*- autoconf -*- 2 | dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_DIRNAME], 8 | [ 9 | AC_REQUIRE([gl_DIRNAME_LGPL]) 10 | ]) 11 | 12 | AC_DEFUN([gl_DIRNAME_LGPL], 13 | [ 14 | dnl Prerequisites of lib/dirname.h. 15 | AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) 16 | 17 | dnl No prerequisites of lib/basename-lgpl.c, lib/dirname-lgpl.c, 18 | dnl lib/stripslash.c. 19 | ]) 20 | -------------------------------------------------------------------------------- /m4/eealloc.m4: -------------------------------------------------------------------------------- 1 | # eealloc.m4 serial 3 2 | dnl Copyright (C) 2003, 2009-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_EEALLOC], 8 | [ 9 | AC_REQUIRE([gl_EEMALLOC]) 10 | AC_REQUIRE([gl_EEREALLOC]) 11 | ]) 12 | 13 | AC_DEFUN([gl_EEMALLOC], 14 | [ 15 | _AC_FUNC_MALLOC_IF( 16 | [gl_cv_func_malloc_0_nonnull=1], 17 | [gl_cv_func_malloc_0_nonnull=0]) 18 | AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull], 19 | [If malloc(0) is != NULL, define this to 1. Otherwise define this 20 | to 0.]) 21 | ]) 22 | 23 | AC_DEFUN([gl_EEREALLOC], 24 | [ 25 | _AC_FUNC_REALLOC_IF( 26 | [gl_cv_func_realloc_0_nonnull=1], 27 | [gl_cv_func_realloc_0_nonnull=0]) 28 | AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull], 29 | [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this 30 | to 0.]) 31 | ]) 32 | -------------------------------------------------------------------------------- /m4/flock.m4: -------------------------------------------------------------------------------- 1 | # flock.m4 serial 3 2 | dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_FLOCK], 8 | [ 9 | AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS]) 10 | AC_CHECK_FUNCS_ONCE([flock]) 11 | if test $ac_cv_func_flock = no; then 12 | HAVE_FLOCK=0 13 | fi 14 | ]) 15 | 16 | dnl Prerequisites of lib/flock.c. 17 | AC_DEFUN([gl_PREREQ_FLOCK], 18 | [ 19 | AC_CHECK_FUNCS_ONCE([fcntl]) 20 | AC_CHECK_HEADERS_ONCE([unistd.h]) 21 | 22 | dnl Do we have a POSIX fcntl lock implementation? 23 | AC_CHECK_MEMBERS([struct flock.l_type],[],[],[[#include ]]) 24 | ]) 25 | -------------------------------------------------------------------------------- /m4/fstat.m4: -------------------------------------------------------------------------------- 1 | # fstat.m4 serial 4 2 | dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_FSTAT], 8 | [ 9 | AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) 10 | 11 | AC_REQUIRE([gl_MSVC_INVAL]) 12 | if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 13 | REPLACE_FSTAT=1 14 | fi 15 | 16 | AC_REQUIRE([gl_HEADER_SYS_STAT_H]) 17 | if test $WINDOWS_64_BIT_ST_SIZE = 1; then 18 | REPLACE_FSTAT=1 19 | fi 20 | 21 | dnl Replace fstat() for supporting the gnulib-defined open() on directories. 22 | m4_ifdef([gl_FUNC_FCHDIR], [ 23 | gl_TEST_FCHDIR 24 | if test $HAVE_FCHDIR = 0; then 25 | case "$gl_cv_func_open_directory_works" in 26 | *yes) ;; 27 | *) 28 | REPLACE_FSTAT=1 29 | ;; 30 | esac 31 | fi 32 | ]) 33 | ]) 34 | 35 | # Prerequisites of lib/fstat.c. 36 | AC_DEFUN([gl_PREREQ_FSTAT], [:]) 37 | -------------------------------------------------------------------------------- /m4/fsync.m4: -------------------------------------------------------------------------------- 1 | # fsync.m4 serial 2 2 | dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_FSYNC], 8 | [ 9 | AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 10 | AC_CHECK_FUNCS_ONCE([fsync]) 11 | if test $ac_cv_func_fsync = no; then 12 | HAVE_FSYNC=0 13 | fi 14 | ]) 15 | 16 | # Prerequisites of lib/fsync.c. 17 | AC_DEFUN([gl_PREREQ_FSYNC], [:]) 18 | -------------------------------------------------------------------------------- /m4/func.m4: -------------------------------------------------------------------------------- 1 | # func.m4 serial 2 2 | dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | # Written by Simon Josefsson 8 | 9 | AC_DEFUN([gl_FUNC], 10 | [ 11 | AC_CACHE_CHECK([whether __func__ is available], [gl_cv_var_func], 12 | AC_COMPILE_IFELSE( 13 | [AC_LANG_PROGRAM([[]], [[const char *str = __func__;]])], 14 | [gl_cv_var_func=yes], 15 | [gl_cv_var_func=no])) 16 | if test "$gl_cv_var_func" != yes; then 17 | AC_DEFINE([__func__], [""], 18 | [Define as a replacement for the ISO C99 __func__ variable.]) 19 | fi 20 | ]) 21 | -------------------------------------------------------------------------------- /m4/getlogin.m4: -------------------------------------------------------------------------------- 1 | # getlogin.m4 serial 3 2 | dnl Copyright (C) 2010-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_GETLOGIN], 8 | [ 9 | AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 10 | AC_CHECK_FUNCS_ONCE([getlogin]) 11 | if test $ac_cv_func_getlogin = no; then 12 | HAVE_GETLOGIN=0 13 | fi 14 | ]) 15 | -------------------------------------------------------------------------------- /m4/glibc21.m4: -------------------------------------------------------------------------------- 1 | # glibc21.m4 serial 5 2 | dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 Free Software Foundation, 3 | dnl Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | 8 | # Test for the GNU C Library, version 2.1 or newer, or uClibc. 9 | # From Bruno Haible. 10 | 11 | AC_DEFUN([gl_GLIBC21], 12 | [ 13 | AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc], 14 | [ac_cv_gnu_library_2_1], 15 | [AC_EGREP_CPP([Lucky], 16 | [ 17 | #include 18 | #ifdef __GNU_LIBRARY__ 19 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) 20 | Lucky GNU user 21 | #endif 22 | #endif 23 | #ifdef __UCLIBC__ 24 | Lucky user 25 | #endif 26 | ], 27 | [ac_cv_gnu_library_2_1=yes], 28 | [ac_cv_gnu_library_2_1=no]) 29 | ] 30 | ) 31 | AC_SUBST([GLIBC21]) 32 | GLIBC21="$ac_cv_gnu_library_2_1" 33 | ] 34 | ) 35 | -------------------------------------------------------------------------------- /m4/hard-locale.m4: -------------------------------------------------------------------------------- 1 | # hard-locale.m4 serial 8 2 | dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl No prerequisites of lib/hard-locale.c. 8 | AC_DEFUN([gl_HARD_LOCALE], 9 | [ 10 | : 11 | ]) 12 | -------------------------------------------------------------------------------- /m4/inttypes_h.m4: -------------------------------------------------------------------------------- 1 | # inttypes_h.m4 serial 10 2 | dnl Copyright (C) 1997-2004, 2006, 2008-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Paul Eggert. 8 | 9 | # Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, 10 | # doesn't clash with , and declares uintmax_t. 11 | 12 | AC_DEFUN([gl_AC_HEADER_INTTYPES_H], 13 | [ 14 | AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], 15 | [AC_COMPILE_IFELSE( 16 | [AC_LANG_PROGRAM( 17 | [[ 18 | #include 19 | #include 20 | ]], 21 | [[uintmax_t i = (uintmax_t) -1; return !i;]])], 22 | [gl_cv_header_inttypes_h=yes], 23 | [gl_cv_header_inttypes_h=no])]) 24 | if test $gl_cv_header_inttypes_h = yes; then 25 | AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], 26 | [Define if exists, doesn't clash with , 27 | and declares uintmax_t. ]) 28 | fi 29 | ]) 30 | -------------------------------------------------------------------------------- /m4/labels-as-values.m4: -------------------------------------------------------------------------------- 1 | dnl check for gcc's "labels as values" feature 2 | AC_DEFUN([AC_C_LABELS_AS_VALUES], 3 | [AC_CACHE_CHECK([labels as values], ac_cv_labels_as_values, 4 | [AC_TRY_COMPILE([ 5 | int foo(int); 6 | int foo(i) 7 | int i; { 8 | static void *label[] = { &&l1, &&l2 }; 9 | goto *label[i]; 10 | l1: return 1; 11 | l2: return 2; 12 | } 13 | ], 14 | [int i;], 15 | ac_cv_labels_as_values=yes, 16 | ac_cv_labels_as_values=no)]) 17 | if test "$ac_cv_labels_as_values" = yes; then 18 | AC_DEFINE([HAVE_LABELS_AS_VALUES], [], 19 | [Define if compiler supports gcc's "labels as values" (aka computed goto) 20 | feature, used to speed up instruction dispatch in the interpreter.]) 21 | fi 22 | ]) 23 | -------------------------------------------------------------------------------- /m4/localcharset.m4: -------------------------------------------------------------------------------- 1 | # localcharset.m4 serial 7 2 | dnl Copyright (C) 2002, 2004, 2006, 2009-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_LOCALCHARSET], 8 | [ 9 | dnl Prerequisites of lib/localcharset.c. 10 | AC_REQUIRE([AM_LANGINFO_CODESET]) 11 | AC_REQUIRE([gl_FCNTL_O_FLAGS]) 12 | AC_CHECK_DECLS_ONCE([getc_unlocked]) 13 | 14 | dnl Prerequisites of the lib/Makefile.am snippet. 15 | AC_REQUIRE([AC_CANONICAL_HOST]) 16 | AC_REQUIRE([gl_GLIBC21]) 17 | ]) 18 | -------------------------------------------------------------------------------- /m4/localeconv.m4: -------------------------------------------------------------------------------- 1 | # localeconv.m4 serial 1 2 | dnl Copyright (C) 2012-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_LOCALECONV], 8 | [ 9 | AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) 10 | AC_REQUIRE([gl_LOCALE_H]) 11 | 12 | if test $REPLACE_STRUCT_LCONV = 1; then 13 | REPLACE_LOCALECONV=1 14 | fi 15 | ]) 16 | 17 | # Prerequisites of lib/localeconv.c. 18 | AC_DEFUN([gl_PREREQ_LOCALECONV], 19 | [ 20 | AC_CHECK_MEMBERS([struct lconv.decimal_point], [], [], 21 | [[#include ]]) 22 | ]) 23 | -------------------------------------------------------------------------------- /m4/malloca.m4: -------------------------------------------------------------------------------- 1 | # malloca.m4 serial 1 2 | dnl Copyright (C) 2003-2004, 2006-2007, 2009-2016 Free Software Foundation, 3 | dnl Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | 8 | AC_DEFUN([gl_MALLOCA], 9 | [ 10 | dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables 11 | dnl @ALLOCA@ and @LTALLOCA@. 12 | dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies. 13 | AC_REQUIRE([gl_EEMALLOC]) 14 | AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) 15 | ]) 16 | -------------------------------------------------------------------------------- /m4/mbtowc.m4: -------------------------------------------------------------------------------- 1 | # mbtowc.m4 serial 2 2 | dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_MBTOWC], 8 | [ 9 | AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) 10 | 11 | if false; then 12 | REPLACE_MBTOWC=1 13 | fi 14 | ]) 15 | 16 | # Prerequisites of lib/mbtowc.c. 17 | AC_DEFUN([gl_PREREQ_MBTOWC], [ 18 | : 19 | ]) 20 | -------------------------------------------------------------------------------- /m4/mkostemp.m4: -------------------------------------------------------------------------------- 1 | # mkostemp.m4 serial 2 2 | dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_MKOSTEMP], 8 | [ 9 | AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) 10 | 11 | dnl Persuade glibc to declare mkostemp(). 12 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 13 | 14 | AC_CHECK_FUNCS_ONCE([mkostemp]) 15 | if test $ac_cv_func_mkostemp != yes; then 16 | HAVE_MKOSTEMP=0 17 | fi 18 | ]) 19 | 20 | # Prerequisites of lib/mkostemp.c. 21 | AC_DEFUN([gl_PREREQ_MKOSTEMP], 22 | [ 23 | ]) 24 | -------------------------------------------------------------------------------- /m4/msvc-inval.m4: -------------------------------------------------------------------------------- 1 | # msvc-inval.m4 serial 1 2 | dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_MSVC_INVAL], 8 | [ 9 | AC_CHECK_FUNCS_ONCE([_set_invalid_parameter_handler]) 10 | if test $ac_cv_func__set_invalid_parameter_handler = yes; then 11 | HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 12 | AC_DEFINE([HAVE_MSVC_INVALID_PARAMETER_HANDLER], [1], 13 | [Define to 1 on MSVC platforms that have the "invalid parameter handler" 14 | concept.]) 15 | else 16 | HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 17 | fi 18 | AC_SUBST([HAVE_MSVC_INVALID_PARAMETER_HANDLER]) 19 | ]) 20 | -------------------------------------------------------------------------------- /m4/msvc-nothrow.m4: -------------------------------------------------------------------------------- 1 | # msvc-nothrow.m4 serial 1 2 | dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_MSVC_NOTHROW], 8 | [ 9 | AC_REQUIRE([gl_MSVC_INVAL]) 10 | ]) 11 | -------------------------------------------------------------------------------- /m4/netinet_in_h.m4: -------------------------------------------------------------------------------- 1 | # netinet_in_h.m4 serial 5 2 | dnl Copyright (C) 2006-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_HEADER_NETINET_IN], 8 | [ 9 | AC_CACHE_CHECK([whether is self-contained], 10 | [gl_cv_header_netinet_in_h_selfcontained], 11 | [ 12 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], 13 | [gl_cv_header_netinet_in_h_selfcontained=yes], 14 | [gl_cv_header_netinet_in_h_selfcontained=no]) 15 | ]) 16 | if test $gl_cv_header_netinet_in_h_selfcontained = yes; then 17 | NETINET_IN_H='' 18 | else 19 | NETINET_IN_H='netinet/in.h' 20 | AC_CHECK_HEADERS([netinet/in.h]) 21 | gl_CHECK_NEXT_HEADERS([netinet/in.h]) 22 | if test $ac_cv_header_netinet_in_h = yes; then 23 | HAVE_NETINET_IN_H=1 24 | else 25 | HAVE_NETINET_IN_H=0 26 | fi 27 | AC_SUBST([HAVE_NETINET_IN_H]) 28 | fi 29 | AC_SUBST([NETINET_IN_H]) 30 | AM_CONDITIONAL([GL_GENERATE_NETINET_IN_H], [test -n "$NETINET_IN_H"]) 31 | ]) 32 | -------------------------------------------------------------------------------- /m4/off_t.m4: -------------------------------------------------------------------------------- 1 | # off_t.m4 serial 1 2 | dnl Copyright (C) 2012-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl Check whether to override the 'off_t' type. 8 | dnl Set WINDOWS_64_BIT_OFF_T. 9 | 10 | AC_DEFUN([gl_TYPE_OFF_T], 11 | [ 12 | m4_ifdef([gl_LARGEFILE], [ 13 | AC_REQUIRE([gl_LARGEFILE]) 14 | ], [ 15 | WINDOWS_64_BIT_OFF_T=0 16 | ]) 17 | AC_SUBST([WINDOWS_64_BIT_OFF_T]) 18 | ]) 19 | -------------------------------------------------------------------------------- /m4/pathmax.m4: -------------------------------------------------------------------------------- 1 | # pathmax.m4 serial 10 2 | dnl Copyright (C) 2002-2003, 2005-2006, 2009-2016 Free Software Foundation, 3 | dnl Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | 8 | AC_DEFUN([gl_PATHMAX], 9 | [ 10 | dnl Prerequisites of lib/pathmax.h. 11 | AC_CHECK_HEADERS_ONCE([sys/param.h]) 12 | ]) 13 | 14 | # Expands to a piece of C program that defines PATH_MAX in the same way as 15 | # "pathmax.h" will do. 16 | AC_DEFUN([gl_PATHMAX_SNIPPET], [[ 17 | /* Arrange to define PATH_MAX, like "pathmax.h" does. */ 18 | #if HAVE_UNISTD_H 19 | # include 20 | #endif 21 | #include 22 | #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN 23 | # include 24 | #endif 25 | #if !defined PATH_MAX && defined MAXPATHLEN 26 | # define PATH_MAX MAXPATHLEN 27 | #endif 28 | #ifdef __hpux 29 | # undef PATH_MAX 30 | # define PATH_MAX 1024 31 | #endif 32 | #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ 33 | # undef PATH_MAX 34 | # define PATH_MAX 260 35 | #endif 36 | ]]) 37 | 38 | # Prerequisites of gl_PATHMAX_SNIPPET. 39 | AC_DEFUN([gl_PATHMAX_SNIPPET_PREREQ], 40 | [ 41 | AC_CHECK_HEADERS_ONCE([unistd.h sys/param.h]) 42 | ]) 43 | -------------------------------------------------------------------------------- /m4/pipe.m4: -------------------------------------------------------------------------------- 1 | # pipe.m4 serial 2 2 | dnl Copyright (C) 2010-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_PIPE], 8 | [ 9 | AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 10 | 11 | AC_CHECK_FUNCS_ONCE([pipe]) 12 | if test $ac_cv_func_pipe != yes; then 13 | HAVE_PIPE=0 14 | fi 15 | ]) 16 | -------------------------------------------------------------------------------- /m4/pipe2.m4: -------------------------------------------------------------------------------- 1 | # pipe2.m4 serial 2 2 | dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_PIPE2], 8 | [ 9 | AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 10 | 11 | dnl Persuade glibc to declare pipe2(). 12 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 13 | 14 | AC_CHECK_FUNCS_ONCE([pipe2]) 15 | if test $ac_cv_func_pipe2 != yes; then 16 | HAVE_PIPE2=0 17 | fi 18 | ]) 19 | -------------------------------------------------------------------------------- /m4/raise.m4: -------------------------------------------------------------------------------- 1 | # raise.m4 serial 3 2 | dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_RAISE], 8 | [ 9 | AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) 10 | AC_REQUIRE([AC_CANONICAL_HOST]) 11 | AC_REQUIRE([gl_MSVC_INVAL]) 12 | AC_CHECK_FUNCS([raise]) 13 | if test $ac_cv_func_raise = no; then 14 | HAVE_RAISE=0 15 | else 16 | if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 17 | REPLACE_RAISE=1 18 | fi 19 | m4_ifdef([gl_SIGNALBLOCKING], [ 20 | gl_SIGNALBLOCKING 21 | if test $HAVE_POSIX_SIGNALBLOCKING = 0; then 22 | m4_ifdef([gl_SIGNAL_SIGPIPE], [ 23 | gl_SIGNAL_SIGPIPE 24 | if test $gl_cv_header_signal_h_SIGPIPE != yes; then 25 | REPLACE_RAISE=1 26 | fi 27 | ], [:]) 28 | fi 29 | ]) 30 | fi 31 | ]) 32 | 33 | # Prerequisites of lib/raise.c. 34 | AC_DEFUN([gl_PREREQ_RAISE], [:]) 35 | -------------------------------------------------------------------------------- /m4/read.m4: -------------------------------------------------------------------------------- 1 | # read.m4 serial 4 2 | dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_READ], 8 | [ 9 | AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 10 | AC_REQUIRE([gl_MSVC_INVAL]) 11 | if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 12 | REPLACE_READ=1 13 | fi 14 | dnl This ifdef is just an optimization, to avoid performing a configure 15 | dnl check whose result is not used. It does not make the test of 16 | dnl GNULIB_UNISTD_H_NONBLOCKING or GNULIB_NONBLOCKING redundant. 17 | m4_ifdef([gl_NONBLOCKING_IO], [ 18 | gl_NONBLOCKING_IO 19 | if test $gl_cv_have_nonblocking != yes; then 20 | REPLACE_READ=1 21 | fi 22 | ]) 23 | ]) 24 | 25 | # Prerequisites of lib/read.c. 26 | AC_DEFUN([gl_PREREQ_READ], [:]) 27 | -------------------------------------------------------------------------------- /m4/safe-read.m4: -------------------------------------------------------------------------------- 1 | # safe-read.m4 serial 6 2 | dnl Copyright (C) 2002-2003, 2005-2006, 2009-2016 Free Software Foundation, 3 | dnl Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | 8 | # Prerequisites of lib/safe-read.c. 9 | AC_DEFUN([gl_PREREQ_SAFE_READ], 10 | [ 11 | AC_REQUIRE([gt_TYPE_SSIZE_T]) 12 | ]) 13 | -------------------------------------------------------------------------------- /m4/safe-write.m4: -------------------------------------------------------------------------------- 1 | # safe-write.m4 serial 4 2 | dnl Copyright (C) 2002, 2005-2006, 2009-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | # Prerequisites of lib/safe-write.c. 8 | AC_DEFUN([gl_PREREQ_SAFE_WRITE], 9 | [ 10 | gl_PREREQ_SAFE_READ 11 | ]) 12 | -------------------------------------------------------------------------------- /m4/secure_getenv.m4: -------------------------------------------------------------------------------- 1 | # Look up an environment variable more securely. 2 | dnl Copyright 2013-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_SECURE_GETENV], 8 | [ 9 | dnl Persuade glibc to declare secure_getenv(). 10 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 11 | 12 | AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) 13 | AC_CHECK_FUNCS_ONCE([secure_getenv]) 14 | if test $ac_cv_func_secure_getenv = no; then 15 | HAVE_SECURE_GETENV=0 16 | fi 17 | ]) 18 | 19 | # Prerequisites of lib/secure_getenv.c. 20 | AC_DEFUN([gl_PREREQ_SECURE_GETENV], [ 21 | AC_CHECK_FUNCS([__secure_getenv]) 22 | if test $ac_cv_func___secure_getenv = no; then 23 | AC_CHECK_FUNCS([issetugid]) 24 | fi 25 | AC_CHECK_FUNCS_ONCE([getuid geteuid getgid getegid]) 26 | ]) 27 | -------------------------------------------------------------------------------- /m4/sockets.m4: -------------------------------------------------------------------------------- 1 | # sockets.m4 serial 7 2 | dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_SOCKETS], 8 | [ 9 | AC_REQUIRE([AC_C_INLINE]) 10 | AC_REQUIRE([gl_SOCKETLIB]) 11 | gl_PREREQ_SOCKETS 12 | ]) 13 | 14 | # Prerequisites of lib/sockets.c. 15 | AC_DEFUN([gl_PREREQ_SOCKETS], [ 16 | : 17 | ]) 18 | -------------------------------------------------------------------------------- /m4/ssize_t.m4: -------------------------------------------------------------------------------- 1 | # ssize_t.m4 serial 5 (gettext-0.18.2) 2 | dnl Copyright (C) 2001-2003, 2006, 2010-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | dnl Test whether ssize_t is defined. 9 | 10 | AC_DEFUN([gt_TYPE_SSIZE_T], 11 | [ 12 | AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t], 13 | [AC_COMPILE_IFELSE( 14 | [AC_LANG_PROGRAM( 15 | [[#include ]], 16 | [[int x = sizeof (ssize_t *) + sizeof (ssize_t); 17 | return !x;]])], 18 | [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])]) 19 | if test $gt_cv_ssize_t = no; then 20 | AC_DEFINE([ssize_t], [int], 21 | [Define as a signed type of the same size as size_t.]) 22 | fi 23 | ]) 24 | -------------------------------------------------------------------------------- /m4/stdint_h.m4: -------------------------------------------------------------------------------- 1 | # stdint_h.m4 serial 9 2 | dnl Copyright (C) 1997-2004, 2006, 2008-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Paul Eggert. 8 | 9 | # Define HAVE_STDINT_H_WITH_UINTMAX if exists, 10 | # doesn't clash with , and declares uintmax_t. 11 | 12 | AC_DEFUN([gl_AC_HEADER_STDINT_H], 13 | [ 14 | AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], 15 | [AC_COMPILE_IFELSE( 16 | [AC_LANG_PROGRAM( 17 | [[#include 18 | #include ]], 19 | [[uintmax_t i = (uintmax_t) -1; return !i;]])], 20 | [gl_cv_header_stdint_h=yes], 21 | [gl_cv_header_stdint_h=no])]) 22 | if test $gl_cv_header_stdint_h = yes; then 23 | AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], 24 | [Define if exists, doesn't clash with , 25 | and declares uintmax_t. ]) 26 | fi 27 | ]) 28 | -------------------------------------------------------------------------------- /m4/strdup.m4: -------------------------------------------------------------------------------- 1 | # strdup.m4 serial 13 2 | 3 | dnl Copyright (C) 2002-2016 Free Software Foundation, Inc. 4 | 5 | dnl This file is free software; the Free Software Foundation 6 | dnl gives unlimited permission to copy and/or distribute it, 7 | dnl with or without modifications, as long as this notice is preserved. 8 | 9 | AC_DEFUN([gl_FUNC_STRDUP], 10 | [ 11 | AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) 12 | AC_CHECK_FUNCS_ONCE([strdup]) 13 | AC_CHECK_DECLS_ONCE([strdup]) 14 | if test $ac_cv_have_decl_strdup = no; then 15 | HAVE_DECL_STRDUP=0 16 | fi 17 | ]) 18 | 19 | AC_DEFUN([gl_FUNC_STRDUP_POSIX], 20 | [ 21 | AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) 22 | AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) 23 | AC_CHECK_FUNCS_ONCE([strdup]) 24 | if test $ac_cv_func_strdup = yes; then 25 | if test $gl_cv_func_malloc_posix != yes; then 26 | REPLACE_STRDUP=1 27 | fi 28 | fi 29 | AC_CHECK_DECLS_ONCE([strdup]) 30 | if test $ac_cv_have_decl_strdup = no; then 31 | HAVE_DECL_STRDUP=0 32 | fi 33 | ]) 34 | 35 | # Prerequisites of lib/strdup.c. 36 | AC_DEFUN([gl_PREREQ_STRDUP], [:]) 37 | -------------------------------------------------------------------------------- /m4/strftime.m4: -------------------------------------------------------------------------------- 1 | # serial 33 2 | 3 | # Copyright (C) 1996-1997, 1999-2007, 2009-2016 Free Software Foundation, Inc. 4 | # 5 | # This file is free software; the Free Software Foundation 6 | # gives unlimited permission to copy and/or distribute it, 7 | # with or without modifications, as long as this notice is preserved. 8 | 9 | # Written by Jim Meyering and Paul Eggert. 10 | 11 | AC_DEFUN([gl_FUNC_GNU_STRFTIME], 12 | [ 13 | gl_FUNC_STRFTIME 14 | ]) 15 | 16 | # These are the prerequisite macros for GNU's strftime.c replacement. 17 | AC_DEFUN([gl_FUNC_STRFTIME], 18 | [ 19 | # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. 20 | AC_REQUIRE([AC_STRUCT_TIMEZONE]) 21 | 22 | AC_REQUIRE([gl_TM_GMTOFF]) 23 | 24 | AC_CHECK_FUNCS_ONCE([tzset]) 25 | 26 | AC_DEFINE([my_strftime], [nstrftime], 27 | [Define to the name of the strftime replacement function.]) 28 | ]) 29 | -------------------------------------------------------------------------------- /m4/sys_file_h.m4: -------------------------------------------------------------------------------- 1 | # Configure a replacement for . 2 | # serial 6 3 | 4 | # Copyright (C) 2008-2016 Free Software Foundation, Inc. 5 | # This file is free software; the Free Software Foundation 6 | # gives unlimited permission to copy and/or distribute it, 7 | # with or without modifications, as long as this notice is preserved. 8 | 9 | # Written by Richard W.M. Jones. 10 | 11 | AC_DEFUN([gl_HEADER_SYS_FILE_H], 12 | [ 13 | AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS]) 14 | 15 | dnl is always overridden, because of GNULIB_POSIXCHECK. 16 | gl_CHECK_NEXT_HEADERS([sys/file.h]) 17 | 18 | if test $ac_cv_header_sys_file_h = yes; then 19 | HAVE_SYS_FILE_H=1 20 | else 21 | HAVE_SYS_FILE_H=0 22 | fi 23 | AC_SUBST([HAVE_SYS_FILE_H]) 24 | 25 | dnl Check for declarations of anything we want to poison if the 26 | dnl corresponding gnulib module is not in use. 27 | gl_WARN_ON_USE_PREPARE([[#include 28 | ]], [flock]) 29 | ]) 30 | 31 | AC_DEFUN([gl_HEADER_SYS_FILE_MODULE_INDICATOR], 32 | [ 33 | AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS]) 34 | gl_MODULE_INDICATOR_SET_VARIABLE([$1]) 35 | ]) 36 | 37 | AC_DEFUN([gl_HEADER_SYS_FILE_H_DEFAULTS], 38 | [ 39 | GNULIB_FLOCK=0; AC_SUBST([GNULIB_FLOCK]) 40 | HAVE_FLOCK=1; AC_SUBST([HAVE_FLOCK]) 41 | ]) 42 | -------------------------------------------------------------------------------- /m4/sys_types_h.m4: -------------------------------------------------------------------------------- 1 | # sys_types_h.m4 serial 5 2 | dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN_ONCE([gl_SYS_TYPES_H], 8 | [ 9 | AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) 10 | gl_NEXT_HEADERS([sys/types.h]) 11 | 12 | dnl Ensure the type pid_t gets defined. 13 | AC_REQUIRE([AC_TYPE_PID_T]) 14 | 15 | dnl Ensure the type mode_t gets defined. 16 | AC_REQUIRE([AC_TYPE_MODE_T]) 17 | 18 | dnl Whether to override the 'off_t' type. 19 | AC_REQUIRE([gl_TYPE_OFF_T]) 20 | ]) 21 | 22 | AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], 23 | [ 24 | ]) 25 | -------------------------------------------------------------------------------- /m4/sys_uio_h.m4: -------------------------------------------------------------------------------- 1 | # sys_uio_h.m4 serial 1 2 | dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_HEADER_SYS_UIO], 8 | [ 9 | AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS]) 10 | dnl is always overridden, because of GNULIB_POSIXCHECK. 11 | gl_CHECK_NEXT_HEADERS([sys/uio.h]) 12 | if test $ac_cv_header_sys_uio_h = yes; then 13 | HAVE_SYS_UIO_H=1 14 | else 15 | HAVE_SYS_UIO_H=0 16 | fi 17 | AC_SUBST([HAVE_SYS_UIO_H]) 18 | ]) 19 | 20 | AC_DEFUN([gl_SYS_UIO_MODULE_INDICATOR], 21 | [ 22 | dnl Use AC_REQUIRE here, so that the default settings are expanded once only. 23 | AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS]) 24 | gl_MODULE_INDICATOR_SET_VARIABLE([$1]) 25 | dnl Define it also as a C macro, for the benefit of the unit tests. 26 | gl_MODULE_INDICATOR_FOR_TESTS([$1]) 27 | ]) 28 | 29 | AC_DEFUN([gl_SYS_UIO_H_DEFAULTS], 30 | [ 31 | ]) 32 | -------------------------------------------------------------------------------- /m4/tempname.m4: -------------------------------------------------------------------------------- 1 | #serial 5 2 | 3 | # Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc. 4 | # This file is free software; the Free Software Foundation 5 | # gives unlimited permission to copy and/or distribute it, 6 | # with or without modifications, as long as this notice is preserved. 7 | 8 | # glibc provides __gen_tempname as a wrapper for mk[ds]temp. Expose 9 | # it as a public API, and provide it on systems that are lacking. 10 | AC_DEFUN([gl_FUNC_GEN_TEMPNAME], 11 | [ 12 | gl_PREREQ_TEMPNAME 13 | ]) 14 | 15 | # Prerequisites of lib/tempname.c. 16 | AC_DEFUN([gl_PREREQ_TEMPNAME], 17 | [ 18 | : 19 | ]) 20 | -------------------------------------------------------------------------------- /m4/time_rz.m4: -------------------------------------------------------------------------------- 1 | dnl Time zone functions: tzalloc, localtime_rz, etc. 2 | 3 | dnl Copyright (C) 2015-2016 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | 8 | dnl Written by Paul Eggert. 9 | 10 | AC_DEFUN([gl_TIME_RZ], 11 | [ 12 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 13 | AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) 14 | AC_REQUIRE([AC_STRUCT_TIMEZONE]) 15 | AC_CHECK_FUNCS_ONCE([tzset]) 16 | 17 | AC_CHECK_TYPES([timezone_t], [], [], [[#include ]]) 18 | if test "$ac_cv_type_timezone_t" = yes; then 19 | HAVE_TIMEZONE_T=1 20 | fi 21 | ]) 22 | -------------------------------------------------------------------------------- /m4/timegm.m4: -------------------------------------------------------------------------------- 1 | # timegm.m4 serial 11 2 | dnl Copyright (C) 2003, 2007, 2009-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_TIMEGM], 8 | [ 9 | AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) 10 | AC_REQUIRE([gl_FUNC_MKTIME]) 11 | REPLACE_TIMEGM=0 12 | AC_CHECK_FUNCS_ONCE([timegm]) 13 | if test $ac_cv_func_timegm = yes; then 14 | if test $gl_cv_func_working_mktime = no; then 15 | # Assume that timegm is buggy if mktime is. 16 | REPLACE_TIMEGM=1 17 | fi 18 | else 19 | HAVE_TIMEGM=0 20 | fi 21 | ]) 22 | 23 | # Prerequisites of lib/timegm.c. 24 | AC_DEFUN([gl_PREREQ_TIMEGM], [ 25 | : 26 | ]) 27 | -------------------------------------------------------------------------------- /m4/times.m4: -------------------------------------------------------------------------------- 1 | # times.m4 serial 2 2 | dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_TIMES], 8 | [ 9 | AC_REQUIRE([gl_SYS_TIMES_H_DEFAULTS]) 10 | AC_CHECK_FUNCS_ONCE([times]) 11 | if test $ac_cv_func_times = no; then 12 | HAVE_TIMES=0 13 | fi 14 | ]) 15 | -------------------------------------------------------------------------------- /m4/tm_gmtoff.m4: -------------------------------------------------------------------------------- 1 | # tm_gmtoff.m4 serial 3 2 | dnl Copyright (C) 2002, 2009-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_TM_GMTOFF], 8 | [ 9 | AC_CHECK_MEMBER([struct tm.tm_gmtoff], 10 | [AC_DEFINE([HAVE_TM_GMTOFF], [1], 11 | [Define if struct tm has the tm_gmtoff member.])], 12 | , 13 | [#include ]) 14 | ]) 15 | -------------------------------------------------------------------------------- /m4/wchar_t.m4: -------------------------------------------------------------------------------- 1 | # wchar_t.m4 serial 4 (gettext-0.18.2) 2 | dnl Copyright (C) 2002-2003, 2008-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | dnl Test whether has the 'wchar_t' type. 9 | dnl Prerequisite: AC_PROG_CC 10 | 11 | AC_DEFUN([gt_TYPE_WCHAR_T], 12 | [ 13 | AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], 14 | [AC_COMPILE_IFELSE( 15 | [AC_LANG_PROGRAM( 16 | [[#include 17 | wchar_t foo = (wchar_t)'\0';]], 18 | [[]])], 19 | [gt_cv_c_wchar_t=yes], 20 | [gt_cv_c_wchar_t=no])]) 21 | if test $gt_cv_c_wchar_t = yes; then 22 | AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) 23 | fi 24 | ]) 25 | -------------------------------------------------------------------------------- /m4/wint_t.m4: -------------------------------------------------------------------------------- 1 | # wint_t.m4 serial 5 (gettext-0.18.2) 2 | dnl Copyright (C) 2003, 2007-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | dnl Test whether has the 'wint_t' type. 9 | dnl Prerequisite: AC_PROG_CC 10 | 11 | AC_DEFUN([gt_TYPE_WINT_T], 12 | [ 13 | AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], 14 | [AC_COMPILE_IFELSE( 15 | [AC_LANG_PROGRAM( 16 | [[ 17 | /* Tru64 with Desktop Toolkit C has a bug: must be included before 18 | . 19 | BSD/OS 4.0.1 has a bug: , and must be included 20 | before . */ 21 | #include 22 | #include 23 | #include 24 | #include 25 | wint_t foo = (wchar_t)'\0';]], 26 | [[]])], 27 | [gt_cv_c_wint_t=yes], 28 | [gt_cv_c_wint_t=no])]) 29 | if test $gt_cv_c_wint_t = yes; then 30 | AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) 31 | fi 32 | ]) 33 | -------------------------------------------------------------------------------- /m4/write.m4: -------------------------------------------------------------------------------- 1 | # write.m4 serial 5 2 | dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_WRITE], 8 | [ 9 | AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 10 | AC_REQUIRE([gl_MSVC_INVAL]) 11 | if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 12 | REPLACE_WRITE=1 13 | fi 14 | dnl This ifdef is just an optimization, to avoid performing a configure 15 | dnl check whose result is not used. It does not make the test of 16 | dnl GNULIB_UNISTD_H_SIGPIPE or GNULIB_SIGPIPE redundant. 17 | m4_ifdef([gl_SIGNAL_SIGPIPE], [ 18 | gl_SIGNAL_SIGPIPE 19 | if test $gl_cv_header_signal_h_SIGPIPE != yes; then 20 | REPLACE_WRITE=1 21 | fi 22 | ]) 23 | m4_ifdef([gl_NONBLOCKING_IO], [ 24 | gl_NONBLOCKING_IO 25 | if test $gl_cv_have_nonblocking != yes; then 26 | REPLACE_WRITE=1 27 | fi 28 | ]) 29 | ]) 30 | 31 | # Prerequisites of lib/write.c. 32 | AC_DEFUN([gl_PREREQ_WRITE], [:]) 33 | -------------------------------------------------------------------------------- /m4/xsize.m4: -------------------------------------------------------------------------------- 1 | # xsize.m4 serial 5 2 | dnl Copyright (C) 2003-2004, 2008-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_XSIZE], 8 | [ 9 | dnl Prerequisites of lib/xsize.h. 10 | AC_REQUIRE([gl_SIZE_MAX]) 11 | AC_CHECK_HEADERS([stdint.h]) 12 | ]) 13 | -------------------------------------------------------------------------------- /meta/guile-2.0-uninstalled.pc.in: -------------------------------------------------------------------------------- 1 | builddir=@abs_top_builddir@ 2 | srcdir=@abs_top_srcdir@ 3 | 4 | Name: GNU Guile (uninstalled) 5 | Description: GNU's Ubiquitous Intelligent Language for Extension (uninstalled) 6 | Version: @GUILE_VERSION@ 7 | Libs: -L${builddir}/libguile -lguile-@GUILE_EFFECTIVE_VERSION@ @BDW_GC_LIBS@ 8 | Libs.private: @LIB_CLOCK_GETTIME@ @LIBGMP@ @LIBLTDL@ @LIBFFI_LIBS@ \ 9 | @LIBUNISTRING@ @GUILE_LIBS@ @LIBICONV@ @LIBINTL@ @LIBSOCKET@ \ 10 | @SERVENT_LIB@ @HOSTENT_LIB@ @GETADDRINFO_LIB@ @INET_NTOP_LIB@ \ 11 | @INET_PTON_LIB@ 12 | Cflags: -I${srcdir} -I${builddir} @GUILE_CFLAGS@ @BDW_GC_CFLAGS@ 13 | -------------------------------------------------------------------------------- /meta/guile-2.0.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | bindir=@bindir@ 4 | libdir=@libdir@ 5 | includedir=@includedir@ 6 | datarootdir=@datarootdir@ 7 | datadir=@datadir@ 8 | pkgdatadir=@datadir@/guile 9 | pkgincludedir=@includedir@/guile 10 | 11 | sitedir=@sitedir@ 12 | extensiondir=@libdir@/guile/@GUILE_EFFECTIVE_VERSION@/extensions 13 | libguileinterface=@LIBGUILE_INTERFACE@ 14 | 15 | # Actual name of the 'guile' and 'guild' programs. This is 16 | # particularly useful when '--program-transform-name' or similar has 17 | # been used. 18 | guild=${bindir}/@guild@ 19 | guile=${bindir}/@guile@ 20 | 21 | Name: GNU Guile 22 | Description: GNU's Ubiquitous Intelligent Language for Extension 23 | Version: @GUILE_VERSION@ 24 | Libs: -L${libdir} -lguile-@GUILE_EFFECTIVE_VERSION@ @BDW_GC_LIBS@ 25 | Libs.private: @LIB_CLOCK_GETTIME@ @LIBGMP@ @LIBLTDL@ @LIBFFI_LIBS@ \ 26 | @LIBUNISTRING@ @GUILE_LIBS@ @LIBICONV@ @LIBINTL@ @LIBSOCKET@ \ 27 | @SERVENT_LIB@ @HOSTENT_LIB@ @GETADDRINFO_LIB@ @INET_NTOP_LIB@ \ 28 | @INET_PTON_LIB@ 29 | Cflags: -I${pkgincludedir}/@GUILE_EFFECTIVE_VERSION@ @GUILE_CFLAGS@ @BDW_GC_CFLAGS@ 30 | -------------------------------------------------------------------------------- /module/ice-9/README: -------------------------------------------------------------------------------- 1 | This directory contains various bits of Guile Scheme code. 2 | Most of these are packaged as modules, with foo.scm implementing 3 | the module `(ice-9 foo)'. 4 | 5 | The non-module files are: 6 | 7 | boot-9.scm -- loaded on guile startup 8 | implements module system + lots of other stuff 9 | arrays.scm -- loaded by boot-9.scm 10 | networking.scm -- loaded by boot-9.scm 11 | posix.scm -- loaded by boot-9.scm 12 | r4rs.scm -- loaded by boot-9.scm 13 | -------------------------------------------------------------------------------- /module/ice-9/arrays.scm: -------------------------------------------------------------------------------- 1 | ;;; installed-scm-file 2 | 3 | ;;;; Copyright (C) 1999, 2001, 2004, 2006 Free Software Foundation, Inc. 4 | ;;;; 5 | ;;;; This library is free software; you can redistribute it and/or 6 | ;;;; modify it under the terms of the GNU Lesser General Public 7 | ;;;; License as published by the Free Software Foundation; either 8 | ;;;; version 3 of the License, or (at your option) any later version. 9 | ;;;; 10 | ;;;; This library is distributed in the hope that it will be useful, 11 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;;;; Lesser General Public License for more details. 14 | ;;;; 15 | ;;;; You should have received a copy of the GNU Lesser General Public 16 | ;;;; License along with this library; if not, write to the Free Software 17 | ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | ;;;; 19 | 20 | (define (array-shape a) 21 | (map (lambda (ind) (if (number? ind) (list 0 (+ -1 ind)) ind)) 22 | (array-dimensions a))) 23 | -------------------------------------------------------------------------------- /module/ice-9/debug.scm: -------------------------------------------------------------------------------- 1 | ;;;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2006, 2010 Free Software Foundation 2 | ;;;; 3 | ;;;; This library is free software; you can redistribute it and/or 4 | ;;;; modify it under the terms of the GNU Lesser General Public 5 | ;;;; License as published by the Free Software Foundation; either 6 | ;;;; version 3 of the License, or (at your option) any later version. 7 | ;;;; 8 | ;;;; This library is distributed in the hope that it will be useful, 9 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | ;;;; Lesser General Public License for more details. 12 | ;;;; 13 | ;;;; You should have received a copy of the GNU Lesser General Public 14 | ;;;; License along with this library; if not, write to the Free Software 15 | ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | ;;;; 17 | ;;;; The author can be reached at djurfeldt@nada.kth.se 18 | ;;;; Mikael Djurfeldt, SANS/NADA KTH, 10044 STOCKHOLM, SWEDEN 19 | ;;;; 20 | 21 | 22 | (define-module (ice-9 debug)) 23 | 24 | (issue-deprecation-warning 25 | "(ice-9 debug) is deprecated. Use (system vm trace) for tracing.") 26 | -------------------------------------------------------------------------------- /module/ice-9/null.scm: -------------------------------------------------------------------------------- 1 | ;;;; Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. 2 | ;;;; 3 | ;;;; This library is free software; you can redistribute it and/or 4 | ;;;; modify it under the terms of the GNU Lesser General Public 5 | ;;;; License as published by the Free Software Foundation; either 6 | ;;;; version 3 of the License, or (at your option) any later version. 7 | ;;;; 8 | ;;;; This library is distributed in the hope that it will be useful, 9 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | ;;;; Lesser General Public License for more details. 12 | ;;;; 13 | ;;;; You should have received a copy of the GNU Lesser General Public 14 | ;;;; License along with this library; if not, write to the Free Software 15 | ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | ;;;; 17 | 18 | ;;;; The null environment - only syntactic bindings 19 | 20 | (define-module (ice-9 null) 21 | :re-export-syntax (define quote lambda if set! 22 | 23 | cond case and or 24 | 25 | let let* letrec 26 | 27 | begin do 28 | 29 | delay 30 | 31 | quasiquote 32 | 33 | define-syntax 34 | let-syntax letrec-syntax)) 35 | -------------------------------------------------------------------------------- /module/ice-9/receive.scm: -------------------------------------------------------------------------------- 1 | ;;;; SRFI-8 2 | 3 | ;;; Copyright (C) 2000, 2001, 2004, 2006, 2010, 2011 Free Software Foundation, Inc. 4 | ;;; 5 | ;;;; This library is free software; you can redistribute it and/or 6 | ;;;; modify it under the terms of the GNU Lesser General Public 7 | ;;;; License as published by the Free Software Foundation; either 8 | ;;;; version 3 of the License, or (at your option) any later version. 9 | ;;;; 10 | ;;;; This library is distributed in the hope that it will be useful, 11 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;;;; Lesser General Public License for more details. 14 | ;;;; 15 | ;;;; You should have received a copy of the GNU Lesser General Public 16 | ;;;; License along with this library; if not, write to the Free Software 17 | ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | (define-module (ice-9 receive) 20 | #:export (receive)) 21 | 22 | (define-syntax-rule (receive vars vals . body) 23 | (call-with-values (lambda () vals) 24 | (lambda vars . body))) 25 | 26 | (cond-expand-provide (current-module) '(srfi-8)) 27 | -------------------------------------------------------------------------------- /module/ice-9/rw.scm: -------------------------------------------------------------------------------- 1 | ;;; installed-scm-file 2 | 3 | ;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. 4 | ;;;; 5 | ;;;; This library is free software; you can redistribute it and/or 6 | ;;;; modify it under the terms of the GNU Lesser General Public 7 | ;;;; License as published by the Free Software Foundation; either 8 | ;;;; version 3 of the License, or (at your option) any later version. 9 | ;;;; 10 | ;;;; This library is distributed in the hope that it will be useful, 11 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;;;; Lesser General Public License for more details. 14 | ;;;; 15 | ;;;; You should have received a copy of the GNU Lesser General Public 16 | ;;;; License along with this library; if not, write to the Free Software 17 | ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | ;;;; 19 | 20 | 21 | ;;; This is the Scheme part of (ice-9 rw), which is a subset of 22 | ;;; (scsh rw). 23 | 24 | (define-module (ice-9 rw) 25 | :export (read-string!/partial write-string/partial)) 26 | 27 | (%init-rw-builtins) 28 | -------------------------------------------------------------------------------- /module/ice-9/unicode.scm: -------------------------------------------------------------------------------- 1 | ;; unicode 2 | 3 | ;;;; Copyright (C) 2014 Free Software Foundation, Inc. 4 | ;;;; 5 | ;;;; This library is free software: you can redistribute it and/or modify 6 | ;;;; it under the terms of the GNU Lesser General Public License as 7 | ;;;; published by the Free Software Foundation, either version 3 of the 8 | ;;;; License, or (at your option) any later version. 9 | ;;;; 10 | ;;;; This library is distributed in the hope that it will be useful, 11 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ;;;; GNU Lesser General Public License for more details. 14 | ;;;; 15 | ;;;; You should have received a copy of the GNU Lesser General Public 16 | ;;;; License along with this library. If not, see 17 | ;;;; . 18 | ;;;; 19 | 20 | (define-module (ice-9 unicode) 21 | #:export (formal-name->char 22 | char->formal-name)) 23 | 24 | (eval-when (expand load eval) 25 | (load-extension (string-append "libguile-" (effective-version)) 26 | "scm_init_unicode")) 27 | -------------------------------------------------------------------------------- /module/language/elisp/runtime/value-slot.scm: -------------------------------------------------------------------------------- 1 | ;;; Guile Emacs Lisp 2 | 3 | ;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. 4 | ;;; 5 | ;;; This library is free software; you can redistribute it and/or 6 | ;;; modify it under the terms of the GNU Lesser General Public 7 | ;;; License as published by the Free Software Foundation; either 8 | ;;; version 3 of the License, or (at your option) any later version. 9 | ;;; 10 | ;;; This library is distributed in the hope that it will be useful, 11 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;;; Lesser General Public License for more details. 14 | ;;; 15 | ;;; You should have received a copy of the GNU Lesser General Public 16 | ;;; License along with this library; if not, write to the Free Software 17 | ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | ;;; Code: 20 | 21 | (define-module (language elisp runtime value-slot)) 22 | 23 | ;;; This module contains the value-slots of elisp symbols. 24 | -------------------------------------------------------------------------------- /module/language/tree-il/inline.scm: -------------------------------------------------------------------------------- 1 | ;;; a simple inliner 2 | 3 | ;; Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. 4 | 5 | ;;;; This library is free software; you can redistribute it and/or 6 | ;;;; modify it under the terms of the GNU Lesser General Public 7 | ;;;; License as published by the Free Software Foundation; either 8 | ;;;; version 3 of the License, or (at your option) any later version. 9 | ;;;; 10 | ;;;; This library is distributed in the hope that it will be useful, 11 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;;;; Lesser General Public License for more details. 14 | ;;;; 15 | ;;;; You should have received a copy of the GNU Lesser General Public 16 | ;;;; License along with this library; if not, write to the Free Software 17 | ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | (define-module (language tree-il inline) 20 | #:export (inline!)) 21 | 22 | (define (inline! x) 23 | (issue-deprecation-warning 24 | "`inline!' is deprecated. Use (language tree-il peval) instead.") 25 | x) 26 | -------------------------------------------------------------------------------- /module/language/value/spec.scm: -------------------------------------------------------------------------------- 1 | ;;; Guile Lowlevel Intermediate Language 2 | 3 | ;; Copyright (C) 2001, 2010, 2013 Free Software Foundation, Inc. 4 | 5 | ;;;; This library is free software; you can redistribute it and/or 6 | ;;;; modify it under the terms of the GNU Lesser General Public 7 | ;;;; License as published by the Free Software Foundation; either 8 | ;;;; version 3 of the License, or (at your option) any later version. 9 | ;;;; 10 | ;;;; This library is distributed in the hope that it will be useful, 11 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;;;; Lesser General Public License for more details. 14 | ;;;; 15 | ;;;; You should have received a copy of the GNU Lesser General Public 16 | ;;;; License along with this library; if not, write to the Free Software 17 | ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | ;;; Code: 20 | 21 | (define-module (language value spec) 22 | #:use-module (system base language) 23 | #:export (value)) 24 | 25 | (define-language value 26 | #:title "Values" 27 | #:reader #f 28 | #:printer write 29 | #:for-humans? #f 30 | ) 31 | -------------------------------------------------------------------------------- /module/oop/goops/compile.scm: -------------------------------------------------------------------------------- 1 | ;;;; Copyright (C) 1999, 2001, 2006, 2009, 2015 Free Software Foundation, Inc. 2 | ;;;; 3 | ;;;; This library is free software; you can redistribute it and/or 4 | ;;;; modify it under the terms of the GNU Lesser General Public 5 | ;;;; License as published by the Free Software Foundation; either 6 | ;;;; version 3 of the License, or (at your option) any later version. 7 | ;;;; 8 | ;;;; This library is distributed in the hope that it will be useful, 9 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | ;;;; Lesser General Public License for more details. 12 | ;;;; 13 | ;;;; You should have received a copy of the GNU Lesser General Public 14 | ;;;; License along with this library; if not, write to the Free Software 15 | ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | ;;;; 17 | 18 | 19 | (define-module (oop goops compile) 20 | #:use-module (oop goops internal) 21 | #:re-export (compute-cmethod)) 22 | -------------------------------------------------------------------------------- /module/oop/goops/simple.scm: -------------------------------------------------------------------------------- 1 | ;;; installed-scm-file 2 | 3 | ;;;; Copyright (C) 2005, 2006, 2010, 2011 Free Software Foundation, Inc. 4 | ;;;; 5 | ;;;; This library is free software; you can redistribute it and/or 6 | ;;;; modify it under the terms of the GNU Lesser General Public 7 | ;;;; License as published by the Free Software Foundation; either 8 | ;;;; version 3 of the License, or (at your option) any later version. 9 | ;;;; 10 | ;;;; This library is distributed in the hope that it will be useful, 11 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;;;; Lesser General Public License for more details. 14 | ;;;; 15 | ;;;; You should have received a copy of the GNU Lesser General Public 16 | ;;;; License along with this library; if not, write to the Free Software 17 | ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | ;;;; 19 | 20 | 21 | (define-module (oop goops simple) 22 | :use-module (oop goops accessors) 23 | :export (define-class) 24 | :no-backtrace) 25 | 26 | (define-syntax-rule (define-class arg ...) 27 | (define-class-with-accessors-keywords arg ...)) 28 | 29 | (module-use! (module-public-interface (current-module)) 30 | (resolve-interface '(oop goops))) 31 | -------------------------------------------------------------------------------- /module/rnrs/control.scm: -------------------------------------------------------------------------------- 1 | ;;; control.scm --- The R6RS control structures library 2 | 3 | ;; Copyright (C) 2010, 2012 Free Software Foundation, Inc. 4 | ;; 5 | ;; This library is free software; you can redistribute it and/or 6 | ;; modify it under the terms of the GNU Lesser General Public 7 | ;; License as published by the Free Software Foundation; either 8 | ;; version 3 of the License, or (at your option) any later version. 9 | ;; 10 | ;; This library is distributed in the hope that it will be useful, 11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;; Lesser General Public License for more details. 14 | ;; 15 | ;; You should have received a copy of the GNU Lesser General Public 16 | ;; License along with this library; if not, write to the Free Software 17 | ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | 20 | (library (rnrs control (6)) 21 | (export when unless do case-lambda) 22 | (import (only (guile) when unless do case-lambda))) 23 | -------------------------------------------------------------------------------- /module/rnrs/mutable-pairs.scm: -------------------------------------------------------------------------------- 1 | ;;; mutable-pairs.scm --- The R6RS mutable pair library 2 | 3 | ;; Copyright (C) 2010 Free Software Foundation, Inc. 4 | ;; 5 | ;; This library is free software; you can redistribute it and/or 6 | ;; modify it under the terms of the GNU Lesser General Public 7 | ;; License as published by the Free Software Foundation; either 8 | ;; version 3 of the License, or (at your option) any later version. 9 | ;; 10 | ;; This library is distributed in the hope that it will be useful, 11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;; Lesser General Public License for more details. 14 | ;; 15 | ;; You should have received a copy of the GNU Lesser General Public 16 | ;; License along with this library; if not, write to the Free Software 17 | ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | 20 | 21 | (library (rnrs mutable-pairs (6)) 22 | (export set-car! set-cdr!) 23 | (import (only (guile) set-car! set-cdr!))) 24 | -------------------------------------------------------------------------------- /module/rnrs/mutable-strings.scm: -------------------------------------------------------------------------------- 1 | ;;; mutable-strings.scm --- The R6RS mutable string library 2 | 3 | ;; Copyright (C) 2010 Free Software Foundation, Inc. 4 | ;; 5 | ;; This library is free software; you can redistribute it and/or 6 | ;; modify it under the terms of the GNU Lesser General Public 7 | ;; License as published by the Free Software Foundation; either 8 | ;; version 3 of the License, or (at your option) any later version. 9 | ;; 10 | ;; This library is distributed in the hope that it will be useful, 11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;; Lesser General Public License for more details. 14 | ;; 15 | ;; You should have received a copy of the GNU Lesser General Public 16 | ;; License along with this library; if not, write to the Free Software 17 | ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | 20 | 21 | (library (rnrs mutable-strings (6)) 22 | (export string-set! string-fill!) 23 | (import (only (guile) string-set! string-fill!))) 24 | -------------------------------------------------------------------------------- /module/rnrs/programs.scm: -------------------------------------------------------------------------------- 1 | ;;; programs.scm --- The R6RS process management library 2 | 3 | ;; Copyright (C) 2010 Free Software Foundation, Inc. 4 | ;; 5 | ;; This library is free software; you can redistribute it and/or 6 | ;; modify it under the terms of the GNU Lesser General Public 7 | ;; License as published by the Free Software Foundation; either 8 | ;; version 3 of the License, or (at your option) any later version. 9 | ;; 10 | ;; This library is distributed in the hope that it will be useful, 11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;; Lesser General Public License for more details. 14 | ;; 15 | ;; You should have received a copy of the GNU Lesser General Public 16 | ;; License along with this library; if not, write to the Free Software 17 | ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | 20 | (library (rnrs programs (6)) 21 | (export command-line exit) 22 | (import (only (guile) command-line exit))) 23 | -------------------------------------------------------------------------------- /module/rnrs/sorting.scm: -------------------------------------------------------------------------------- 1 | ;;; sorting.scm --- The R6RS sorting library 2 | 3 | ;; Copyright (C) 2010 Free Software Foundation, Inc. 4 | ;; 5 | ;; This library is free software; you can redistribute it and/or 6 | ;; modify it under the terms of the GNU Lesser General Public 7 | ;; License as published by the Free Software Foundation; either 8 | ;; version 3 of the License, or (at your option) any later version. 9 | ;; 10 | ;; This library is distributed in the hope that it will be useful, 11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;; Lesser General Public License for more details. 14 | ;; 15 | ;; You should have received a copy of the GNU Lesser General Public 16 | ;; License along with this library; if not, write to the Free Software 17 | ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | 20 | (library (rnrs sorting (6)) 21 | (export list-sort vector-sort vector-sort!) 22 | (import (rnrs base (6)) 23 | (only (guile) *unspecified* stable-sort sort!)) 24 | 25 | (define (list-sort proc list) (stable-sort list proc)) 26 | (define (vector-sort proc vector) (stable-sort vector proc)) 27 | (define (vector-sort! proc vector) (sort! vector proc) *unspecified*)) 28 | -------------------------------------------------------------------------------- /module/scripts/compile.scm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/module/scripts/compile.scm -------------------------------------------------------------------------------- /module/srfi/srfi-2.scm: -------------------------------------------------------------------------------- 1 | ;;; srfi-2.scm --- and-let* 2 | 3 | ;; Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc. 4 | ;; 5 | ;; This library is free software; you can redistribute it and/or 6 | ;; modify it under the terms of the GNU Lesser General Public 7 | ;; License as published by the Free Software Foundation; either 8 | ;; version 3 of the License, or (at your option) any later version. 9 | ;; 10 | ;; This library is distributed in the hope that it will be useful, 11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;; Lesser General Public License for more details. 14 | ;; 15 | ;; You should have received a copy of the GNU Lesser General Public 16 | ;; License along with this library; if not, write to the Free Software 17 | ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | ;;; Commentary: 20 | 21 | ;; This module is fully documented in the Guile Reference Manual. 22 | 23 | ;;; Code: 24 | 25 | (define-module (srfi srfi-2) 26 | :use-module (ice-9 and-let-star) 27 | :re-export-syntax (and-let*)) 28 | 29 | (cond-expand-provide (current-module) '(srfi-2)) 30 | 31 | ;;; srfi-2.scm ends here 32 | -------------------------------------------------------------------------------- /module/srfi/srfi-8.scm: -------------------------------------------------------------------------------- 1 | ;;; srfi-8.scm --- receive 2 | 3 | ;; Copyright (C) 2000, 2001, 2002, 2006 Free Software Foundation, Inc. 4 | ;; 5 | ;; This library is free software; you can redistribute it and/or 6 | ;; modify it under the terms of the GNU Lesser General Public 7 | ;; License as published by the Free Software Foundation; either 8 | ;; version 3 of the License, or (at your option) any later version. 9 | ;; 10 | ;; This library is distributed in the hope that it will be useful, 11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;; Lesser General Public License for more details. 14 | ;; 15 | ;; You should have received a copy of the GNU Lesser General Public 16 | ;; License along with this library; if not, write to the Free Software 17 | ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | ;;; Commentary: 20 | 21 | ;; This module is fully documented in the Guile Reference Manual. 22 | 23 | ;;; Code: 24 | 25 | (define-module (srfi srfi-8) 26 | :use-module (ice-9 receive) 27 | :re-export-syntax (receive)) 28 | 29 | (cond-expand-provide (current-module) '(srfi-8)) 30 | 31 | ;;; srfi-8.scm ends here 32 | -------------------------------------------------------------------------------- /module/sxml/upstream/COPYING.SSAX: -------------------------------------------------------------------------------- 1 | The files in this directory are imported directly from upstream SSAX, 2 | and are in the public domain. 3 | -------------------------------------------------------------------------------- /module/system/vm/instruction.scm: -------------------------------------------------------------------------------- 1 | ;;; Guile VM instructions 2 | 3 | ;; Copyright (C) 2001, 2010 Free Software Foundation, Inc. 4 | 5 | ;;; This library is free software; you can redistribute it and/or 6 | ;;; modify it under the terms of the GNU Lesser General Public 7 | ;;; License as published by the Free Software Foundation; either 8 | ;;; version 3 of the License, or (at your option) any later version. 9 | ;;; 10 | ;;; This library is distributed in the hope that it will be useful, 11 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;;; Lesser General Public License for more details. 14 | ;;; 15 | ;;; You should have received a copy of the GNU Lesser General Public 16 | ;;; License along with this library; if not, write to the Free Software 17 | ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | ;;; Code: 20 | 21 | (define-module (system vm instruction) 22 | #:export (instruction-list 23 | instruction? instruction-length 24 | instruction-pops instruction-pushes 25 | instruction->opcode opcode->instruction)) 26 | 27 | (load-extension (string-append "libguile-" (effective-version)) 28 | "scm_init_instructions") 29 | -------------------------------------------------------------------------------- /module/system/vm/objcode.scm: -------------------------------------------------------------------------------- 1 | ;;; Guile VM object code 2 | 3 | ;; Copyright (C) 2001, 2010 Free Software Foundation, Inc. 4 | 5 | ;;; This library is free software; you can redistribute it and/or 6 | ;;; modify it under the terms of the GNU Lesser General Public 7 | ;;; License as published by the Free Software Foundation; either 8 | ;;; version 3 of the License, or (at your option) any later version. 9 | ;;; 10 | ;;; This library is distributed in the hope that it will be useful, 11 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;;; Lesser General Public License for more details. 14 | ;;; 15 | ;;; You should have received a copy of the GNU Lesser General Public 16 | ;;; License along with this library; if not, write to the Free Software 17 | ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | ;;; Code: 20 | 21 | (define-module (system vm objcode) 22 | #:export (objcode? objcode-meta 23 | bytecode->objcode objcode->bytecode 24 | load-objcode write-objcode 25 | word-size byte-order)) 26 | 27 | (load-extension (string-append "libguile-" (effective-version)) 28 | "scm_init_objcodes") 29 | -------------------------------------------------------------------------------- /test-suite/lalr/run-guile-test.sh: -------------------------------------------------------------------------------- 1 | # guile-test.sh -- 2 | # 3 | 4 | for item in \ 5 | test-glr-basics-01.scm \ 6 | test-glr-basics-02.scm \ 7 | test-glr-basics-03.scm \ 8 | test-glr-basics-04.scm \ 9 | test-glr-basics-05.scm \ 10 | test-glr-associativity.scm \ 11 | test-glr-script-expression.scm \ 12 | test-glr-single-expressions.scm \ 13 | \ 14 | test-lr-basics-01.scm \ 15 | test-lr-basics-02.scm \ 16 | test-lr-basics-03.scm \ 17 | test-lr-basics-04.scm \ 18 | test-lr-basics-05.scm \ 19 | test-lr-error-recovery-01.scm \ 20 | test-lr-error-recovery-02.scm \ 21 | test-lr-no-clause.scm \ 22 | test-lr-associativity-01.scm \ 23 | test-lr-script-expression.scm \ 24 | test-lr-single-expressions.scm 25 | do 26 | printf "\n\n*** Running $item\n" 27 | guile $item 28 | done 29 | 30 | ### end of file 31 | -------------------------------------------------------------------------------- /test-suite/lalr/test-glr-basics-01.scm: -------------------------------------------------------------------------------- 1 | ;;; test-lr-basics-01.scm -- 2 | ;; 3 | ;;A grammar that only accept a single terminal as input. It refuses the 4 | ;;end-of-input as first token. 5 | ;; 6 | 7 | (load "common-test.scm") 8 | 9 | (define (doit . tokens) 10 | (let* ((lexer (make-lexer tokens)) 11 | (parser (lalr-parser (expect: 0) 12 | (driver: glr) 13 | (A) 14 | (e (A) : $1)))) 15 | (parser lexer error-handler))) 16 | 17 | (check 18 | (doit (make-lexical-token 'A #f 1)) 19 | => '(1)) 20 | 21 | (check 22 | (doit) 23 | => '()) 24 | 25 | (check 26 | ;;Parse correctly the first A and reduce it. The second A triggers 27 | ;;an error which empties the stack and consumes all the input 28 | ;;tokens. Finally, an unexpected end-of-input error is returned 29 | ;;because EOI is invalid as first token after the start. 30 | (doit (make-lexical-token 'A #f 1) 31 | (make-lexical-token 'A #f 2) 32 | (make-lexical-token 'A #f 3)) 33 | => '()) 34 | 35 | ;;; end of file 36 | -------------------------------------------------------------------------------- /test-suite/lalr/test-glr-basics-02.scm: -------------------------------------------------------------------------------- 1 | ;;; test-lr-basics-02.scm -- 2 | ;; 3 | ;;A grammar that only accept a single terminal or the EOI. 4 | ;; 5 | 6 | (load "common-test.scm") 7 | 8 | (define (doit . tokens) 9 | (let ((parser (lalr-parser (expect: 0) 10 | (driver: glr) 11 | (A) 12 | (e (A) : $1 13 | () : 0)))) 14 | (parser (make-lexer tokens) error-handler))) 15 | 16 | (check 17 | (doit) 18 | => '(0)) 19 | 20 | (check 21 | (doit (make-lexical-token 'A #f 1)) 22 | => '(1)) 23 | 24 | (check 25 | (doit (make-lexical-token 'A #f 1) 26 | (make-lexical-token 'A #f 2) 27 | (make-lexical-token 'A #f 3)) 28 | => '()) 29 | 30 | ;;; end of file 31 | -------------------------------------------------------------------------------- /test-suite/lalr/test-glr-basics-03.scm: -------------------------------------------------------------------------------- 1 | ;;; test-lr-basics-03.scm -- 2 | ;; 3 | ;;A grammar that accepts fixed sequences of a single terminal or the 4 | ;;EOI. 5 | 6 | (load "common-test.scm") 7 | 8 | (define (doit . tokens) 9 | (let ((parser (lalr-parser (expect: 0) 10 | (driver: glr) 11 | (A) 12 | (e (A) : (list $1) 13 | (A A) : (list $1 $2) 14 | (A A A) : (list $1 $2 $3) 15 | () : 0)))) 16 | (parser (make-lexer tokens) error-handler))) 17 | 18 | (check 19 | (doit (make-lexical-token 'A #f 1)) 20 | => '((1))) 21 | 22 | (check 23 | (doit (make-lexical-token 'A #f 1) 24 | (make-lexical-token 'A #f 2)) 25 | => '((1 2))) 26 | 27 | (check 28 | (doit (make-lexical-token 'A #f 1) 29 | (make-lexical-token 'A #f 2) 30 | (make-lexical-token 'A #f 3)) 31 | => '((1 2 3))) 32 | 33 | (check 34 | (doit) 35 | => '(0)) 36 | 37 | ;;; end of file 38 | -------------------------------------------------------------------------------- /test-suite/lalr/test-glr-basics-04.scm: -------------------------------------------------------------------------------- 1 | ;;; test-lr-basics-04.scm -- 2 | ;; 3 | ;;A grammar accepting a sequence of equal tokens of arbitrary length. 4 | ;;The return value is the value of the last parsed token. 5 | 6 | 7 | (load "common-test.scm") 8 | 9 | (define (doit . tokens) 10 | (let ((parser (lalr-parser (expect: 0) 11 | (driver: glr) 12 | (A) 13 | (e (e A) : $2 14 | (A) : $1 15 | () : 0)))) 16 | (parser (make-lexer tokens) error-handler))) 17 | 18 | (check 19 | (doit) 20 | => '(0)) 21 | 22 | (check 23 | ;;Two results because there is a shift/reduce conflict, so two 24 | ;;processes are generated. 25 | (doit (make-lexical-token 'A #f 1)) 26 | => '(1 1)) 27 | 28 | (check 29 | ;;Two results because there is a shift/reduce conflict, so two 30 | ;;processes are generated. Notice that the rules: 31 | ;; 32 | ;; (e A) (A) 33 | ;; 34 | ;;generate only one conflict when the second "A" comes. The third 35 | ;;"A" comes when the state is inside the rule "(e A)", so there is 36 | ;;no conflict. 37 | ;; 38 | (doit (make-lexical-token 'A #f 1) 39 | (make-lexical-token 'A #f 2) 40 | (make-lexical-token 'A #f 3)) 41 | => '(3 3)) 42 | 43 | ;;; end of file 44 | -------------------------------------------------------------------------------- /test-suite/lalr/test-glr-basics-05.scm: -------------------------------------------------------------------------------- 1 | ;;; test-lr-basics-05.scm -- 2 | ;; 3 | ;;A grammar accepting a sequence of equal tokens of arbitrary length. 4 | ;;The return value is the list of values. 5 | ;; 6 | 7 | (load "common-test.scm") 8 | 9 | (define (doit . tokens) 10 | (let ((parser (lalr-parser (expect: 0) 11 | (driver: glr) 12 | (A) 13 | (e (e A) : (cons $2 $1) 14 | (A) : (list $1) 15 | () : (list 0))))) 16 | (parser (make-lexer tokens) error-handler))) 17 | 18 | (check 19 | (doit) 20 | => '((0))) 21 | 22 | (check 23 | (doit (make-lexical-token 'A #f 1)) 24 | => '((1 0) 25 | (1))) 26 | 27 | (check 28 | (doit (make-lexical-token 'A #f 1) 29 | (make-lexical-token 'A #f 2)) 30 | => '((2 1 0) 31 | (2 1))) 32 | 33 | (check 34 | (doit (make-lexical-token 'A #f 1) 35 | (make-lexical-token 'A #f 2) 36 | (make-lexical-token 'A #f 3)) 37 | => '((3 2 1 0) 38 | (3 2 1))) 39 | 40 | ;;; end of file 41 | -------------------------------------------------------------------------------- /test-suite/lalr/test-lr-basics-01.scm: -------------------------------------------------------------------------------- 1 | ;;; test-lr-basics-01.scm -- 2 | ;; 3 | ;;A grammar that only accept a single terminal as input. It refuses the 4 | ;;end-of-input as first token. 5 | ;; 6 | 7 | (load "common-test.scm") 8 | 9 | (define (doit . tokens) 10 | (let* ((lexer (make-lexer tokens)) 11 | (parser (lalr-parser (expect: 0) 12 | (A) 13 | (e (A) : $1)))) 14 | (parser lexer error-handler))) 15 | 16 | (check 17 | (doit (make-lexical-token 'A #f 1)) 18 | => 1) 19 | 20 | (check 21 | (let ((r (doit))) 22 | (cons r *error*)) 23 | => '(#f (error-handler "Syntax error: unexpected end of input"))) 24 | 25 | (check 26 | ;;Parse correctly the first A and reduce it. The second A triggers 27 | ;;an error which empties the stack and consumes all the input 28 | ;;tokens. Finally, an unexpected end-of-input error is returned 29 | ;;because EOI is invalid as first token after the start. 30 | (let ((r (doit (make-lexical-token 'A #f 1) 31 | (make-lexical-token 'A #f 2) 32 | (make-lexical-token 'A #f 3)))) 33 | (cons r *error*)) 34 | => '(#f 35 | (error-handler "Syntax error: unexpected end of input") 36 | (error-handler "Syntax error: unexpected token : " . A))) 37 | 38 | ;;; end of file 39 | -------------------------------------------------------------------------------- /test-suite/lalr/test-lr-basics-02.scm: -------------------------------------------------------------------------------- 1 | ;;; test-lr-basics-02.scm -- 2 | ;; 3 | ;;A grammar that only accept a single terminal or the EOI. 4 | ;; 5 | 6 | (load "common-test.scm") 7 | 8 | (define (doit . tokens) 9 | (let ((parser (lalr-parser (expect: 0) 10 | (A) 11 | (e (A) : $1 12 | () : 0)))) 13 | (parser (make-lexer tokens) error-handler))) 14 | 15 | (check 16 | (doit) 17 | => 0) 18 | 19 | (check 20 | (doit (make-lexical-token 'A #f 1)) 21 | => 1) 22 | 23 | (check 24 | ;;Parse correctly the first A and reduce it. The second A triggers 25 | ;;an error which empties the stack and consumes all the input 26 | ;;tokens. Finally, the end-of-input token is correctly parsed. 27 | (let ((r (doit (make-lexical-token 'A #f 1) 28 | (make-lexical-token 'A #f 2) 29 | (make-lexical-token 'A #f 3)))) 30 | (cons r *error*)) 31 | => '(0 (error-handler "Syntax error: unexpected token : " . A))) 32 | 33 | ;;; end of file 34 | -------------------------------------------------------------------------------- /test-suite/lalr/test-lr-basics-03.scm: -------------------------------------------------------------------------------- 1 | ;;; test-lr-basics-03.scm -- 2 | ;; 3 | ;;A grammar that accepts fixed sequences of a single terminal or the 4 | ;;EOI. 5 | 6 | (load "common-test.scm") 7 | 8 | (define (doit . tokens) 9 | (let ((parser (lalr-parser (expect: 0) 10 | (A) 11 | (e (A) : (list $1) 12 | (A A) : (list $1 $2) 13 | (A A A) : (list $1 $2 $3) 14 | () : 0)))) 15 | (parser (make-lexer tokens) error-handler))) 16 | 17 | (check 18 | (doit (make-lexical-token 'A #f 1)) 19 | => '(1)) 20 | 21 | (check 22 | (doit (make-lexical-token 'A #f 1) 23 | (make-lexical-token 'A #f 2)) 24 | => '(1 2)) 25 | 26 | (check 27 | (doit (make-lexical-token 'A #f 1) 28 | (make-lexical-token 'A #f 2) 29 | (make-lexical-token 'A #f 3)) 30 | => '(1 2 3)) 31 | 32 | (check 33 | (doit) 34 | => 0) 35 | 36 | ;;; end of file 37 | -------------------------------------------------------------------------------- /test-suite/lalr/test-lr-basics-04.scm: -------------------------------------------------------------------------------- 1 | ;;; test-lr-basics-04.scm -- 2 | ;; 3 | ;;A grammar accepting a sequence of equal tokens of arbitrary length. 4 | ;;The return value is the value of the last parsed token. 5 | 6 | 7 | (load "common-test.scm") 8 | 9 | (define (doit . tokens) 10 | (let ((parser (lalr-parser (expect: 0) 11 | (A) 12 | (e (e A) : $2 13 | (A) : $1 14 | () : 0)))) 15 | (parser (make-lexer tokens) error-handler))) 16 | 17 | (check 18 | (doit) 19 | => 0) 20 | 21 | (check 22 | (doit (make-lexical-token 'A #f 1)) 23 | => 1) 24 | 25 | (check 26 | (doit (make-lexical-token 'A #f 1) 27 | (make-lexical-token 'A #f 2) 28 | (make-lexical-token 'A #f 3)) 29 | => 3) 30 | 31 | ;;; end of file 32 | -------------------------------------------------------------------------------- /test-suite/lalr/test-lr-basics-05.scm: -------------------------------------------------------------------------------- 1 | ;;; test-lr-basics-05.scm -- 2 | ;; 3 | ;;A grammar accepting a sequence of equal tokens of arbitrary length. 4 | ;;The return value is the list of values. 5 | ;; 6 | 7 | (load "common-test.scm") 8 | 9 | (define (doit . tokens) 10 | (let ((parser (lalr-parser (expect: 0) 11 | (A) 12 | (e (e A) : (cons $2 $1) 13 | (A) : (list $1) 14 | () : 0)))) 15 | (parser (make-lexer tokens) error-handler))) 16 | 17 | (check 18 | (doit) 19 | => 0) 20 | 21 | (check 22 | (doit (make-lexical-token 'A #f 1)) 23 | => '(1)) 24 | 25 | (check 26 | (doit (make-lexical-token 'A #f 1) 27 | (make-lexical-token 'A #f 2)) 28 | => '(2 1)) 29 | 30 | (check 31 | (doit (make-lexical-token 'A #f 1) 32 | (make-lexical-token 'A #f 2) 33 | (make-lexical-token 'A #f 3)) 34 | => '(3 2 1)) 35 | 36 | ;;; end of file 37 | -------------------------------------------------------------------------------- /test-suite/lalr/test-lr-no-clause.scm: -------------------------------------------------------------------------------- 1 | ;;; test-lr-no-clause.scm -- 2 | ;; 3 | 4 | (load "common-test.scm") 5 | 6 | (define (doit . tokens) 7 | (let ((parser (lalr-parser (expect: 0) 8 | (NUMBER COMMA NEWLINE) 9 | 10 | (lines (lines line) : (list $2) 11 | (line) : (list $1)) 12 | (line (NEWLINE) : #\newline 13 | (NUMBER NEWLINE) : $1 14 | ;;this is a rule with no semantic action 15 | (COMMA NUMBER NEWLINE))))) 16 | (parser (make-lexer tokens) error-handler))) 17 | 18 | (check 19 | ;;correct input 20 | (doit (make-lexical-token 'NUMBER #f 1) 21 | (make-lexical-token 'NEWLINE #f #\newline)) 22 | => '(1)) 23 | 24 | (check 25 | ;;correct input with comma, which is a rule with no client form 26 | (doit (make-lexical-token 'COMMA #f #\,) 27 | (make-lexical-token 'NUMBER #f 1) 28 | (make-lexical-token 'NEWLINE #f #\newline)) 29 | => '(#(line-3 #\, 1 #\newline))) 30 | 31 | (check 32 | ;;correct input with comma, which is a rule with no client form 33 | (doit (make-lexical-token 'NUMBER #f 1) 34 | (make-lexical-token 'NEWLINE #f #\newline) 35 | (make-lexical-token 'COMMA #f #\,) 36 | (make-lexical-token 'NUMBER #f 2) 37 | (make-lexical-token 'NEWLINE #f #\newline)) 38 | => '(#(line-3 #\, 2 #\newline))) 39 | 40 | ;;; end of file 41 | -------------------------------------------------------------------------------- /test-suite/standalone/.gitignore: -------------------------------------------------------------------------------- 1 | /test-conversion 2 | /test-gh 3 | /test-list 4 | /test-num2integral 5 | /test-round 6 | /test-unwind 7 | /test-with-guile-module 8 | /test-use-srfi 9 | /test-scm-with-guile 10 | /test-scm-c-read 11 | /test-fast-slot-ref 12 | /test-scm-take-locale-symbol 13 | /test-scm-take-u8vector 14 | /test-loose-ends 15 | /test-srfi-1 16 | -------------------------------------------------------------------------------- /test-suite/standalone/README: -------------------------------------------------------------------------------- 1 | -*-text-*- 2 | 3 | These tests use the standard automake TESTS mechanism. Tests should 4 | be listed in TESTS in Makefile.am, and should exit with 0 on success, 5 | non-zero on failure, and 77 if the result should be ignored. See the 6 | automake info pages for more information. 7 | 8 | If you want to use a scheme script, prefix it as follows: 9 | 10 | #!/bin/sh 11 | exec guile -s "$0" "$@" 12 | !# 13 | 14 | Makefile.am will arrange for all tests (scripts or executables) to be 15 | run under uninstalled-env so that the PATH, LD_LIBRARY_PATH, and 16 | GUILE_LOAD_PATH will be augmented appropriately. 17 | 18 | The Makefile.am has an example of creating a shared library to be used 19 | from a test scheme script as well. 20 | 21 | You can also create standalone executables that include your own code, 22 | are linked against libguile, and that run a given test script (or 23 | scripts). One way to do this is to create the binary, make sure it 24 | calls scm_shell (argc, argv) as its final action, and put this bit at 25 | the top of your test script: 26 | 27 | #!./my-test-binary -s 28 | !# 29 | 30 | -------------------------------------------------------------------------------- /test-suite/standalone/test-command-line-encoding: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Choose a UTF-8 locale. The locale doesn't have to be available on the 4 | # system since `environ_locale_charset' does not actually try to set it. 5 | LC_ALL="en_US.UTF-8" 6 | export LC_ALL 7 | unset LANG 8 | unset LC_CTYPE 9 | 10 | exec guile -q -s "$0" "λ" 11 | !# 12 | 13 | ;; Make sure our first argument is a lower-case lambda. 14 | ;; 15 | ;; Up to Guile 2.0.3 included, command-line arguments would not be converted 16 | ;; according to the locale settings; see 17 | ;; for 18 | ;; details. 19 | (exit (string=? (cadr (program-arguments)) "λ")) 20 | 21 | ;; Local Variables: 22 | ;; mode: scheme 23 | ;; coding: utf-8 24 | ;; End: 25 | -------------------------------------------------------------------------------- /test-suite/standalone/test-command-line-encoding2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Choose a locale name that lacks a dot followed by the encoding name. 4 | # This should not confuse `environ_locale_charset'. 5 | # See for the original bug report. 6 | LC_ALL="en_US" 7 | export LC_ALL 8 | unset LANG 9 | unset LC_CTYPE 10 | 11 | exec guile -q -s "$0" "hello" 12 | !# 13 | 14 | ;; Make sure our argument was suitable decoded. 15 | (exit (string=? (cadr (program-arguments)) "hello")) 16 | 17 | ;; Local Variables: 18 | ;; mode: scheme 19 | ;; coding: iso-8859-1 20 | ;; End: 21 | -------------------------------------------------------------------------------- /test-suite/standalone/test-extensions: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec guile -q -s "$0" "$@" 3 | !# 4 | 5 | (load-extension (string-append (getenv "builddir") "/libtest-extensions") 6 | "libtest_extensions_init") 7 | (load-extension (string-append (getenv "builddir") "/libtest-extensions") 8 | "libtest_extensions_init2") 9 | 10 | (or (= init2-count 1) 11 | (error "init2 called more or less than one time")) 12 | 13 | 14 | ;; Local Variables: 15 | ;; mode: scheme 16 | ;; End: -------------------------------------------------------------------------------- /test-suite/standalone/test-guild-compile: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This -*- sh -*- script tests whether 'guild compile' leaves traces 4 | # behind it upon SIGINT. 5 | 6 | source="t-guild-compile-$$" 7 | target="$source.go" 8 | 9 | trap 'rm -f "$source" "$target"' EXIT 10 | 11 | cat > "$source"<&2 37 | rm "$target"* 38 | kill "$pid" 39 | exit 1 40 | fi 41 | done 42 | 43 | if test -f "$target" 44 | then 45 | echo "error: '$target' produced" >&2 46 | exit 1 47 | fi 48 | -------------------------------------------------------------------------------- /test-suite/standalone/test-guile-snarf: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Test the `guile-snarf' tool. 4 | 5 | # Strip the first line, like GNU `tail -n +2' does, but in a portable 6 | # way (`tail' on Solaris 10 doesn't support `-n +2' for instance.) 7 | strip_first_line () 8 | { 9 | read line 10 | while read line 11 | do 12 | echo "$line" 13 | done 14 | } 15 | 16 | snarf () 17 | { 18 | # GNU cpp emits a comment on the first line, which shows what 19 | # arguments it was passed. Strip this line. 20 | echo "$1" | guile-snarf - | strip_first_line | tr -d ' \t\n' 21 | } 22 | 23 | snarf_test () 24 | { 25 | x=`snarf "$1"` 26 | if [ x"$x" != x"$2" ]; then 27 | echo "Incorrect output: expected \"$2\", but got \"$x\"" 28 | exit 1 29 | fi 30 | } 31 | 32 | snarf_test "^^a^:^" "a;" 33 | snarf_test " ^ ^ b ^ : ^ " "b;" 34 | snarf_test "c\n^^d^:^\ne" "d;" 35 | snarf_test "f^^g^:^h" "g;" 36 | snarf_test "^^i^:^j^^k^:^" "i;k;" 37 | snarf_test "l^^m" "" 38 | snarf_test "n^:^o" "" 39 | -------------------------------------------------------------------------------- /test-suite/standalone/test-import-order: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec guile -q -L "$srcdir" -s "$0" "$@" 3 | !# 4 | 5 | (define-module (base) 6 | #:export (push! order)) 7 | 8 | (define order '()) 9 | (define (push!) 10 | (set! order `(,@order ,(module-name (current-module))))) 11 | 12 | (define-module (test-1) 13 | #:use-module (base) 14 | #:use-module (test-import-order-a) 15 | #:use-module (test-import-order-b)) 16 | 17 | (use-modules (test-import-order-c) (test-import-order-d)) 18 | 19 | (if (not (equal? order 20 | '((test-import-order-a) 21 | (test-import-order-b) 22 | (test-import-order-c) 23 | (test-import-order-d)))) 24 | (begin 25 | (format (current-error-port) "Unexpected import order: ~a" order) 26 | (exit 1)) 27 | (exit 0)) 28 | 29 | ;; Local Variables: 30 | ;; mode: scheme 31 | ;; End: -------------------------------------------------------------------------------- /test-suite/standalone/test-import-order-a.scm: -------------------------------------------------------------------------------- 1 | (define-module (test-import-order-a) 2 | #:use-module (base)) 3 | 4 | (push!) 5 | -------------------------------------------------------------------------------- /test-suite/standalone/test-import-order-b.scm: -------------------------------------------------------------------------------- 1 | (define-module (test-import-order-b) 2 | #:use-module (base)) 3 | 4 | (push!) 5 | -------------------------------------------------------------------------------- /test-suite/standalone/test-import-order-c.scm: -------------------------------------------------------------------------------- 1 | (define-module (test-import-order-c) 2 | #:use-module (base)) 3 | 4 | (push!) 5 | -------------------------------------------------------------------------------- /test-suite/standalone/test-import-order-d.scm: -------------------------------------------------------------------------------- 1 | (define-module (test-import-order-d) 2 | #:use-module (base)) 3 | 4 | (push!) 5 | -------------------------------------------------------------------------------- /test-suite/standalone/test-language: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # Make sure that code passed as `-c' or `-l' is evaluted using the 6 | # right language. 7 | 8 | # The default language in effect until `--language' is encountered is 9 | # Scheme. 10 | guile -c "(exit (= 3 (apply + '(1 2))))" --language=elisp 11 | 12 | if guile -c "(= (funcall (symbol-function '+) 1 2) 3)" 2> /dev/null 13 | then false; else true; fi 14 | 15 | guile --language=elisp -c "(= (funcall (symbol-function '+) 1 2) 3)" 16 | guile --language=ecmascript -c '(function (x) { return x * x; })(2);' 17 | 18 | # Same with `-l'. 19 | guile --no-auto-compile -l "$top_srcdir/module/ice-9/q.scm" -c 1 20 | guile --no-auto-compile \ 21 | -l "$top_srcdir/module/ice-9/q.scm" \ 22 | --language=elisp \ 23 | -l "$srcdir/test-language.el" \ 24 | --language=ecmascript \ 25 | -l "$srcdir/test-language.js" \ 26 | --language=scheme \ 27 | -c 1 28 | -------------------------------------------------------------------------------- /test-suite/standalone/test-language.el: -------------------------------------------------------------------------------- 1 | ;; Sample Elisp code for `test-language'. 2 | 3 | (defun fib (n) 4 | "Anything but a fib." 5 | (if (<= n 1) 6 | n 7 | (+ (fib (- n 1)) 8 | (fib (- n 2))))) 9 | 10 | (or (= 13 (fib 7)) 11 | (error "Something's wrong!")) 12 | -------------------------------------------------------------------------------- /test-suite/standalone/test-language.js: -------------------------------------------------------------------------------- 1 | /* Sample ECMAscript code for `test-language'. */ 2 | 3 | function fib (n) 4 | { 5 | if (n <= 1) 6 | return n; 7 | else 8 | return fib (n - 1) + fib (n - 2); 9 | } 10 | 11 | if (fib (7) != 13) 12 | error ("Something's wrong!"); 13 | -------------------------------------------------------------------------------- /test-suite/standalone/test-require-extension: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # expect these to throw errors, if they succeed it's wrong 6 | # 7 | # (Note the syntax "! guile -c ..." isn't used here, because that doesn't 8 | # work on Solaris 10.) 9 | # 10 | guile -q -c '(require-extension 7)' 2>/dev/null && exit 1 11 | guile -q -c '(require-extension (blarg))' 2>/dev/null && exit 1 12 | guile -q -c '(require-extension (srfi "foo"))' 2>/dev/null && exit 1 13 | 14 | # expect these to succeed 15 | guile -q -c '(require-extension (srfi 1)) (exit (procedure? take-right))' 16 | guile -q -c '(require-extension (srfi))' 17 | 18 | exit 0 19 | -------------------------------------------------------------------------------- /test-suite/standalone/test-system-cmds: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec guile -q -s "$0" "$@" 3 | !# 4 | 5 | (define (test-system-cmd) 6 | (if (not (boolean? (system))) 7 | (begin 8 | (simple-format 9 | #t 10 | "test-system-cmds: (system) did not return a boolean\n") 11 | (exit 1))) 12 | 13 | ;; Note: Use double quotes since simple quotes are not supported by 14 | ;; `cmd.exe' on Windows. 15 | (let ((rs (status:exit-val (system "guile -c \"(exit 42)\"")))) 16 | (if (not (= 42 rs)) 17 | (begin 18 | (simple-format 19 | #t 20 | "test-system-cmds: system exit status was ~S rather than 42\n" 21 | rs) 22 | (exit 1))))) 23 | 24 | (define (test-system*-cmd) 25 | (let ((rs (status:exit-val (system* "guile" "-c" "(exit 42)")))) 26 | (if (not (= 42 rs)) 27 | (begin 28 | (simple-format 29 | #t 30 | "test-system-cmds: system* exit status was ~S rather than 42\n" 31 | rs) 32 | (exit 1))))) 33 | 34 | (if (defined? 'system) 35 | (test-system-cmd)) 36 | 37 | (if (defined? 'system*) 38 | (test-system*-cmd)) 39 | 40 | (exit 0) 41 | 42 | ;; Local Variables: 43 | ;; mode: scheme 44 | ;; End: 45 | -------------------------------------------------------------------------------- /test-suite/tests/encoding-iso88591.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/test-suite/tests/encoding-iso88591.test -------------------------------------------------------------------------------- /test-suite/tests/encoding-iso88597.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/test-suite/tests/encoding-iso88597.test -------------------------------------------------------------------------------- /test-suite/tests/keywords.test: -------------------------------------------------------------------------------- 1 | ;;;; keywords.test --- Keywords. -*- mode: scheme; coding: utf-8; -*- 2 | ;;;; 3 | ;;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. 4 | ;;;; 5 | ;;;; This library is free software; you can redistribute it and/or 6 | ;;;; modify it under the terms of the GNU Lesser General Public 7 | ;;;; License as published by the Free Software Foundation; either 8 | ;;;; version 3 of the License, or (at your option) any later version. 9 | ;;;; 10 | ;;;; This library is distributed in the hope that it will be useful, 11 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;;;; Lesser General Public License for more details. 14 | ;;;; 15 | ;;;; You should have received a copy of the GNU Lesser General Public 16 | ;;;; License along with this library; if not, write to the Free Software 17 | ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | (define-module (test-keywords) 20 | :use-module (test-suite lib)) 21 | 22 | 23 | (with-test-prefix "keywords" 24 | (pass-if "printing" 25 | (string=? (with-output-to-string (lambda () (write #:this))) 26 | "#:this"))) 27 | -------------------------------------------------------------------------------- /test-suite/tests/options.test: -------------------------------------------------------------------------------- 1 | ;;;; options.test --- test suite for options interface -*- scheme -*- 2 | ;;;; 3 | ;;;; Copyright (C) 2002, 2006, 2010 Free Software Foundation, Inc. 4 | ;;;; 5 | ;;;; This library is free software; you can redistribute it and/or 6 | ;;;; modify it under the terms of the GNU Lesser General Public 7 | ;;;; License as published by the Free Software Foundation; either 8 | ;;;; version 3 of the License, or (at your option) any later version. 9 | ;;;; 10 | ;;;; This library is distributed in the hope that it will be useful, 11 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;;;; Lesser General Public License for more details. 14 | ;;;; 15 | ;;;; You should have received a copy of the GNU Lesser General Public 16 | ;;;; License along with this library; if not, write to the Free Software 17 | ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | (define-module (test-suite options-test) 20 | #:use-module (test-suite lib)) 21 | 22 | (with-test-prefix "options" 23 | 24 | (pass-if "setting an option doesn't reset other options" 25 | (begin 26 | (debug-enable 'backwards) 27 | (debug-set! depth 555) 28 | (->bool (memq 'backwards (debug-options)))))) 29 | -------------------------------------------------------------------------------- /test-suite/tests/popen-child.scm: -------------------------------------------------------------------------------- 1 | (close-port (current-input-port)) 2 | (let loop () 3 | (display "closed\n" (current-error-port)) 4 | (force-output (current-error-port)) 5 | (loop)) 6 | -------------------------------------------------------------------------------- /test-suite/tests/r6rs-eval.test: -------------------------------------------------------------------------------- 1 | ;;; r6rs-eval.test --- Test suite for R6RS (rnrs eval) 2 | 3 | ;; Copyright (C) 2010 Free Software Foundation, Inc. 4 | ;; 5 | ;; This library is free software; you can redistribute it and/or 6 | ;; modify it under the terms of the GNU Lesser General Public 7 | ;; License as published by the Free Software Foundation; either 8 | ;; version 3 of the License, or (at your option) any later version. 9 | ;; 10 | ;; This library is distributed in the hope that it will be useful, 11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;; Lesser General Public License for more details. 14 | ;; 15 | ;; You should have received a copy of the GNU Lesser General Public 16 | ;; License along with this library; if not, write to the Free Software 17 | ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | 20 | (define-module (test-suite test-rnrs-eval) 21 | :use-module ((rnrs eval) :version (6)) 22 | :use-module (test-suite lib)) 23 | 24 | (with-test-prefix "environment" 25 | (pass-if "simple" 26 | (eqv? (eval '(eval:car (eval:cons 2 4)) 27 | (environment '(prefix (only (rnrs base) car cons) eval:))) 28 | 2))) 29 | -------------------------------------------------------------------------------- /test-suite/tests/receive.test: -------------------------------------------------------------------------------- 1 | ;;;; receive.test --- Test suite for Guile receive module. -*- scheme -*- 2 | ;;;; 3 | ;;;; Copyright (C) 2004, 2006 Free Software Foundation, Inc. 4 | ;;;; 5 | ;;;; This library is free software; you can redistribute it and/or 6 | ;;;; modify it under the terms of the GNU Lesser General Public 7 | ;;;; License as published by the Free Software Foundation; either 8 | ;;;; version 3 of the License, or (at your option) any later version. 9 | ;;;; 10 | ;;;; This library is distributed in the hope that it will be useful, 11 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;;;; Lesser General Public License for more details. 14 | ;;;; 15 | ;;;; You should have received a copy of the GNU Lesser General Public 16 | ;;;; License along with this library; if not, write to the Free Software 17 | ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | (define-module (test-suite test-receive) 20 | #:use-module (test-suite lib) 21 | #:use-module (ice-9 receive)) 22 | 23 | ;;; 24 | ;;; receive 25 | ;;; 26 | 27 | (with-test-prefix "receive" 28 | 29 | (pass-if "cond-expand srfi-8" 30 | (cond-expand (srfi-8 #t) 31 | (else #f)))) 32 | -------------------------------------------------------------------------------- /test-suite/tests/rnrs-test-a.scm: -------------------------------------------------------------------------------- 1 | ;;; test of defining rnrs libraries 2 | 3 | ;; Copyright (C) 2010, 2012 Free Software Foundation, Inc. 4 | ;; 5 | ;; This library is free software; you can redistribute it and/or 6 | ;; modify it under the terms of the GNU Lesser General Public 7 | ;; License as published by the Free Software Foundation; either 8 | ;; version 3 of the License, or (at your option) any later version. 9 | ;; 10 | ;; This library is distributed in the hope that it will be useful, 11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;; Lesser General Public License for more details. 14 | ;; 15 | ;; You should have received a copy of the GNU Lesser General Public 16 | ;; License along with this library; if not, write to the Free Software 17 | ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | 20 | (library (tests rnrs-test-a) 21 | (export double) 22 | (import (guile)) 23 | 24 | (define (double x) 25 | (* x 2))) 26 | -------------------------------------------------------------------------------- /test-suite/tests/signals.test: -------------------------------------------------------------------------------- 1 | ;;;; signals.test --- test suite for Guile's signal functions -*- scheme -*- 2 | ;;;; 3 | ;;;; Copyright (C) 2009 Free Software Foundation, Inc. 4 | ;;;; 5 | ;;;; This library is free software; you can redistribute it and/or 6 | ;;;; modify it under the terms of the GNU Lesser General Public 7 | ;;;; License as published by the Free Software Foundation; either 8 | ;;;; version 3 of the License, or (at your option) any later version. 9 | ;;;; 10 | ;;;; This library is distributed in the hope that it will be useful, 11 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ;;;; Lesser General Public License for more details. 14 | ;;;; 15 | ;;;; You should have received a copy of the GNU Lesser General Public 16 | ;;;; License along with this library; if not, write to the Free 17 | ;;;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | ;;;; Boston, MA 02110-1301 USA 19 | 20 | (define-module (test-suite test-signals) 21 | #:use-module (test-suite lib)) 22 | 23 | (with-test-prefix "sigaction" 24 | 25 | (pass-if-exception "handler arg is an invalid integer" 26 | exception:out-of-range 27 | (sigaction SIGINT 51)) 28 | 29 | ) 30 | -------------------------------------------------------------------------------- /test-suite/tests/srfi-14.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/test-suite/tests/srfi-14.test -------------------------------------------------------------------------------- /test-suite/tests/unicode.test: -------------------------------------------------------------------------------- 1 | ;;;; unicode.test -*- scheme -*- 2 | ;;;; 3 | ;;;; Copyright (C) 2014 Free Software Foundation, Inc. 4 | ;;;; 5 | ;;;; This library is free software: you can redistribute it and/or modify 6 | ;;;; it under the terms of the GNU Lesser General Public License as 7 | ;;;; published by the Free Software Foundation, either version 3 of the 8 | ;;;; License, or (at your option) any later version. 9 | ;;;; 10 | ;;;; This library is distributed in the hope that it will be useful, 11 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ;;;; GNU Lesser General Public License for more details. 14 | ;;;; 15 | ;;;; You should have received a copy of the GNU Lesser General Public 16 | ;;;; License along with this library. If not, see 17 | ;;;; . 18 | ;;;; 19 | 20 | (define-module (test-suite test-unicode) 21 | #:use-module (test-suite lib) 22 | #:use-module (ice-9 unicode)) 23 | 24 | (pass-if-equal "LATIN SMALL LETTER A" (char->formal-name #\a)) 25 | (pass-if-equal #\a (formal-name->char "LATIN SMALL LETTER A")) 26 | 27 | (pass-if-equal #f (char->formal-name #\nul)) 28 | (pass-if-equal #f (formal-name->char "not a known formal name")) 29 | -------------------------------------------------------------------------------- /test-suite/vm/t-basic-contructs.scm: -------------------------------------------------------------------------------- 1 | ;;; Basic RnRS constructs. 2 | 3 | (and (eq? 2 (begin (+ 2 4) 5 2)) 4 | ((lambda (x y) 5 | (and (eq? x 1) (eq? y 2) 6 | (begin 7 | (set! x 11) (set! y 22) 8 | (and (eq? x 11) (eq? y 22))))) 9 | 1 2) 10 | (let ((x 1) (y 3)) 11 | (and (eq? x 1) (eq? y 3))) 12 | (let loop ((x #t)) 13 | (if (not x) 14 | #t 15 | (loop #f)))) 16 | 17 | -------------------------------------------------------------------------------- /test-suite/vm/t-call-cc.scm: -------------------------------------------------------------------------------- 1 | (let ((set-counter2 #f)) 2 | (define (get-counter2) 3 | (call/cc 4 | (lambda (k) 5 | (set! set-counter2 k) 6 | 1))) 7 | (define (loop counter1) 8 | (let ((counter2 (get-counter2))) 9 | (set! counter1 (1+ counter1)) 10 | (cond ((not (= counter1 counter2)) 11 | (error "bad call/cc behaviour" counter1 counter2)) 12 | ((> counter1 10) 13 | #t) 14 | (else 15 | (set-counter2 (1+ counter2)))))) 16 | (loop 0)) 17 | 18 | (let* ((next #f) 19 | (counter 0) 20 | (result (call/cc 21 | (lambda (k) 22 | (set! next k) 23 | 1)))) 24 | (set! counter (+ 1 counter)) 25 | (cond ((not (= counter result)) 26 | (error "bad call/cc behaviour" counter result)) 27 | ((> counter 10) 28 | #t) 29 | (else 30 | (next (+ 1 counter))))) 31 | -------------------------------------------------------------------------------- /test-suite/vm/t-catch.scm: -------------------------------------------------------------------------------- 1 | ;; Test that nonlocal exits of the VM work. 2 | 3 | (begin 4 | (define (foo thunk) 5 | (catch #t thunk (lambda args args))) 6 | (foo 7 | (lambda () 8 | (let ((a 'one)) 9 | (1+ a))))) 10 | 11 | -------------------------------------------------------------------------------- /test-suite/vm/t-closure.scm: -------------------------------------------------------------------------------- 1 | (define func 2 | (let ((x 2)) 3 | (lambda () 4 | (let ((x++ (+ 1 x))) 5 | (set! x x++) 6 | x++)))) 7 | 8 | (list (func) (func) (func)) 9 | -------------------------------------------------------------------------------- /test-suite/vm/t-closure2.scm: -------------------------------------------------------------------------------- 1 | 2 | (define (uid) 3 | (let* ((x 2) 4 | (do-uid (lambda () 5 | (let ((x++ (+ 1 x))) 6 | (set! x x++) 7 | x++)))) 8 | (do-uid))) 9 | 10 | (list (uid) (uid) (uid)) 11 | -------------------------------------------------------------------------------- /test-suite/vm/t-closure3.scm: -------------------------------------------------------------------------------- 1 | (define (stuff) 2 | (let* ((x 2) 3 | (chbouib (lambda (z) 4 | (+ 7 z x)))) 5 | (chbouib 77))) 6 | 7 | (stuff) 8 | -------------------------------------------------------------------------------- /test-suite/vm/t-closure4.scm: -------------------------------------------------------------------------------- 1 | (define (extract-symbols exp) 2 | (define (process x out cont) 3 | (cond ((pair? x) 4 | (process (car x) 5 | out 6 | (lambda (car-x out) 7 | ;; used to have a bug here whereby `x' was 8 | ;; modified in the self-tail-recursion to (process 9 | ;; (cdr x) ...), because we didn't allocate fresh 10 | ;; externals when doing self-tail-recursion. 11 | (process (cdr x) 12 | out 13 | (lambda (cdr-x out) 14 | (cont (cons car-x cdr-x) 15 | out)))))) 16 | ((symbol? x) 17 | (cont x (cons x out))) 18 | (else 19 | (cont x out)))) 20 | (process exp '() (lambda (x out) out))) 21 | 22 | (extract-symbols '(a b . c)) 23 | -------------------------------------------------------------------------------- /test-suite/vm/t-do-loop.scm: -------------------------------------------------------------------------------- 1 | (let ((n+ 0)) 2 | (do ((n- 5 (1- n-)) 3 | (n+ n+ (1+ n+))) 4 | ((= n- 0)) 5 | (format #f "n- = ~a~%" n-))) 6 | -------------------------------------------------------------------------------- /test-suite/vm/t-global-bindings.scm: -------------------------------------------------------------------------------- 1 | ;; Are global bindings reachable at run-time? This relies on the 2 | ;; `object-ref' and `object-set' instructions. 3 | 4 | (begin 5 | 6 | (define the-binding "hello") 7 | 8 | ((lambda () the-binding)) 9 | 10 | ((lambda () (set! the-binding "world"))) 11 | 12 | ((lambda () the-binding))) 13 | 14 | -------------------------------------------------------------------------------- /test-suite/vm/t-literal-integers.scm: -------------------------------------------------------------------------------- 1 | ;; Check whether literal integers are correctly signed. 2 | 3 | (and (= 4294967295 (- (expt 2 32) 1)) ;; unsigned 4 | (= -2147483648 (- (expt 2 31))) ;; signed 5 | (= 2147483648 (expt 2 31))) ;; unsigned 6 | -------------------------------------------------------------------------------- /test-suite/vm/t-macros.scm: -------------------------------------------------------------------------------- 1 | ;; Are built-in macros well-expanded at compilation-time? 2 | 3 | (false-if-exception (+ 2 2)) 4 | (read-options) 5 | -------------------------------------------------------------------------------- /test-suite/vm/t-macros2.scm: -------------------------------------------------------------------------------- 1 | ;; Are macros well-expanded at compilation-time? 2 | 3 | (defmacro minus-binary (a b) 4 | `(- ,a ,b)) 5 | 6 | (define-macro (plus . args) 7 | `(let ((res (+ ,@args))) 8 | ;;(format #t "plus -> ~a~%" res) 9 | res)) 10 | 11 | 12 | (plus (let* ((x (minus-binary 12 7)) ;; 5 13 | (y (minus-binary x 1))) ;; 4 14 | (plus x y 5)) ;; 14 15 | 12 ;; 26 16 | (expt 2 3)) ;; => 34 17 | 18 | -------------------------------------------------------------------------------- /test-suite/vm/t-map.scm: -------------------------------------------------------------------------------- 1 | ; Currently, map is a C function, so this is a way of testing that the 2 | ; VM is reentrant. 3 | 4 | (begin 5 | 6 | (define (square x) 7 | (* x x)) 8 | 9 | (map (lambda (x) (square x)) 10 | '(1 2 3))) 11 | -------------------------------------------------------------------------------- /test-suite/vm/t-match.scm: -------------------------------------------------------------------------------- 1 | ;;; Pattern matching with `(ice-9 match)'. 2 | ;;; 3 | 4 | (use-modules (ice-9 match) 5 | (srfi srfi-9)) ;; record type (FIXME: See `t-records.scm') 6 | 7 | (define-record-type 8 | (%make-stuff chbouib) 9 | stuff? 10 | (chbouib stuff:chbouib stuff:set-chbouib!)) 11 | 12 | (define (matches? obj) 13 | ; (format #t "matches? ~a~%" obj) 14 | (match obj 15 | (($ ) #t) 16 | ; (blurps #t) 17 | ("hello" #t) 18 | (else #f))) 19 | 20 | 21 | ;(format #t "go!~%") 22 | (and (matches? (%make-stuff 12)) 23 | (matches? (%make-stuff 7)) 24 | (matches? "hello") 25 | ; (matches? 'blurps) 26 | (not (matches? 66))) 27 | -------------------------------------------------------------------------------- /test-suite/vm/t-mutual-toplevel-defines.scm: -------------------------------------------------------------------------------- 1 | (define (even? x) 2 | (or (zero? x) 3 | (not (odd? (1- x))))) 4 | 5 | (define (odd? x) 6 | (not (even? (1- x)))) 7 | 8 | (even? 20) 9 | -------------------------------------------------------------------------------- /test-suite/vm/t-or.scm: -------------------------------------------------------------------------------- 1 | ;; all the different permutations of or 2 | (list 3 | ;; not in tail position, no args 4 | (or) 5 | ;; not in tail position, one arg 6 | (or 'what) 7 | (or #f) 8 | ;; not in tail position, two arg 9 | (or 'what 'where) 10 | (or #f 'where) 11 | (or #f #f) 12 | (or 'what #f) 13 | ;; not in tail position, value discarded 14 | (begin (or 'what (error "two")) 'two) 15 | ;; in tail position (within the lambdas) 16 | ((lambda () 17 | (or))) 18 | ((lambda () 19 | (or 'what))) 20 | ((lambda () 21 | (or #f))) 22 | ((lambda () 23 | (or 'what 'where))) 24 | ((lambda () 25 | (or #f 'where))) 26 | ((lambda () 27 | (or #f #f))) 28 | ((lambda () 29 | (or 'what #f)))) 30 | -------------------------------------------------------------------------------- /test-suite/vm/t-proc-with-setter.scm: -------------------------------------------------------------------------------- 1 | (define the-struct (vector 1 2)) 2 | 3 | (define get/set 4 | (make-procedure-with-setter 5 | (lambda (struct name) 6 | (case name 7 | ((first) (vector-ref struct 0)) 8 | ((second) (vector-ref struct 1)) 9 | (else #f))) 10 | (lambda (struct name val) 11 | (case name 12 | ((first) (vector-set! struct 0 val)) 13 | ((second) (vector-set! struct 1 val)) 14 | (else #f))))) 15 | 16 | (and (eq? (vector-ref the-struct 0) (get/set the-struct 'first)) 17 | (eq? (vector-ref the-struct 1) (get/set the-struct 'second)) 18 | (begin 19 | (set! (get/set the-struct 'second) 77) 20 | (eq? (vector-ref the-struct 1) (get/set the-struct 'second)))) 21 | -------------------------------------------------------------------------------- /test-suite/vm/t-quasiquote.scm: -------------------------------------------------------------------------------- 1 | (list 2 | `() 3 | `foo 4 | `(foo) 5 | `(foo bar) 6 | `(1 2) 7 | (let ((x 1)) `,x) 8 | (let ((x 1)) `(,x)) 9 | (let ((x 1)) ``(,x)) 10 | (let ((head '(a b)) 11 | (tail 'c)) 12 | `(,@head . ,tail))) 13 | -------------------------------------------------------------------------------- /test-suite/vm/t-records.scm: -------------------------------------------------------------------------------- 1 | ;;; SRFI-9 Records. 2 | ;;; 3 | 4 | (use-modules (srfi srfi-9)) 5 | 6 | (define-record-type 7 | (%make-stuff chbouib) 8 | stuff? 9 | (chbouib stuff:chbouib stuff:set-chbouib!)) 10 | 11 | 12 | (and (stuff? (%make-stuff 12)) 13 | (= 7 (stuff:chbouib (%make-stuff 7))) 14 | (not (stuff? 12))) 15 | -------------------------------------------------------------------------------- /test-suite/vm/t-values.scm: -------------------------------------------------------------------------------- 1 | (list (call-with-values 2 | (lambda () (values 1 2)) 3 | (lambda (x y) (cons x y))) 4 | 5 | ;; the start-stack forces a bounce through the interpreter 6 | (call-with-values 7 | (lambda () (start-stack 'foo (values 1 2))) 8 | list) 9 | 10 | (call-with-values 11 | (lambda () (apply values '(1))) 12 | list)) 13 | 14 | --------------------------------------------------------------------------------