2024-06-03  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Release 0.26.1.
	* configure (VERSION): Bump to 0.26.1.
	* configure.sh (VERSION): Likewise.
	* mes/module/mes/repl.mes (welcome): Update copyright years.

	doc: Add `ANNOUNCE-0.26.1.
	* doc/announce/ANNOUNCE-0.26.1: New file.

	doc: Update `NEWS'.
	* NEWS (Changes in 0.26.1 since 0.26): New section.

2024-01-20  Janneke Nieuwenhuizen  <janneke@gnu.org>

	doc: Update `AUTHORS'.
	* AUTHORS: Mention Andrius' position-indepedent x86_64 code.  Fix typo.

2024-06-05  Janneke Nieuwenhuizen  <janneke@gnu.org>

	lib: readdir: Cleanup.
	* lib/linux/readdir.c (readdir): Cleanups.

2024-06-02  Ekaitz Zarraga  <ekaitz@elenq.tech>

	lib: Define va_args for tinycc mob.
	In TinyCC (mob) there's a program that generates all the variable
	argument control code.  We don't use it in our bootstrapping system so
	we need to provide the headers for that ourselves.  We had the support
	done for 927, so just removing the version limit makes the support
	available for TinyCC (mob) too.

	* include/stdarg.h[__TINYC__]: Remove < 928 version selection.

2024-06-01  Andrius Štikonas  <andrius@stikonas.eu>

	lib: Add putenv stub.
	* lib/stub/putenv.c: New file.
	* build-aux/configure-lib.sh (libc_tcc_SOURCES): Add it.
	* include/stdlib.h (putenv): New declaration.

2024-06-02  Andrius Štikonas  <andrius@stikonas.eu>

	RISC-V: lib: Fixes for setjmp/longjmp.
	The a0 register had been clobbered by val and subsequent loads were
	failing.  Implementing it inside C function causes various other issues,
	such as compiler adding wrong return address after we loaded one from
	buffer.

	* lib/riscv64-mes-gcc/setjmp.c (longjmp): Remove function; Implement
	with single toplevel ASM statement catering for MesCC, TinyCC, and GCC.
	(setjmp): Likewise.

2024-05-24  Janneke Nieuwenhuizen  <janneke@gnu.org>

	Revert "RISC-V: lib: Fixes for setjmp/longjmp."
	Not ready yet; breaks bootstrappable-tcc.

	This reverts commit c769a09ff2f88ebd3c3d3ed72847e8cbe5192cc5.

2024-06-04  Janneke Nieuwenhuizen  <janneke@gnu.org>

	lib: realpath: Return NAME if file exists.
	Still a stub; not resolving symlinks, but possibly friendlier when
	bootstrapping.

	* lib/stub/realpath.c (realpath): Return NAME if it exists.

2024-05-04  Andrius Štikonas  <andrius@stikonas.eu>

	lib: Add realpath stub.
	* lib/stub/realpath.c: New file.
	* build-aux/configure-lib.sh (libc_tcc_SOURCES): Add it.
	* include/stdlib.h (realpath): New declaration.

2024-06-05  Janneke Nieuwenhuizen  <janneke@gnu.org>

	lib: Add pathconf.
	* lib/posix/pathconf.c: New file.
	* include/unistd.h (pathconf): New declaration.
	(_PC_NAME_MAX, _PC_NAME_MAX): New defines.
	* build-aux/configure-lib.sh (libc_gnu_SOURCES): Add pathconf.

2024-05-15  Andrius Štikonas  <andrius@stikonas.eu>

	RISC-V: lib: Fixes for setjmp/longjmp.
	The a0 register had been clobbered by val and subsequent loads were
	failing.

	* lib/riscv64-mes-gcc/setjmp.c (longjmp): Use extended assembly, avoid
	clobbering a0.

2024-04-25  Janneke Nieuwenhuizen  <janneke@gnu.org>

	mes: Remove unused nyacc/lalr.mes.
	* mes/module/nyacc/lalr.mes: This is not currently used, and includes
	the non-bootstrappable psyntax.mes, which creates confusion.

2024-04-16  Ekaitz Zarraga  <ekaitz@elenq.tech>

	RISC-V: lib: Fixes for setjmp/longjmp.
	HAVE_FLOAT_ASM defines if there's assembly support for float
	instructions.

	HAVE_FLOAT defines if there's floating point arithmetic support.

	This is important for TinyCC because the assembler and the C compiler
	are split. TinyCC can HAVE_FLOAT but no assembler support for them.

	* lib/riscv64-mes-gcc/setjmp.c: Use HAVE_FLOAT_ASM/HAVE_FLOAT instead of
	__riscv_float_abi_soft.
	* lib/riscv64-mes-tcc/setjmp.c: Remove

2024-04-16  Ekaitz Zarraga  <ekaitz@elenq.tech>

	Revert "lib: Add missing (empty) crt files for RISC-V." partially
	The new RISC-V assembly backend in bootstrappable-tcc makes this
	obsolete.

	This reverts commit 4c2a25dae891fa5612f206fd2990d72b8bc63374.

2024-04-16  Ekaitz Zarraga  <ekaitz@elenq.tech>

	Revert "riscv64: Add support for tcc."
	The new RISC-V assembly backend in bootstrappable-tcc makes this
	obsolete.

	This reverts commit d695a8d06aeb50a40b344226b51cfa6c509b3c7a.

2024-04-16  Ekaitz Zarraga  <ekaitz@elenq.tech>

	Revert "riscv64: Simplify assembly constructs not supported by tcc."
	The new RISC-V assembly backend in bootstrappable-tcc makes this
	obsolete.

	This reverts commit e5b99625c9c57f99d3e67dfee45e47fcece96f8b.

2024-04-16  Ekaitz Zarraga  <ekaitz@elenq.tech>

	Revert "riscv64: Fix arguments of _start function in tcc."
	The new RISC-V assembly backend in bootstrappable-tcc makes this
	obsolete.

	This reverts commit 3a20be10cc5b6a0bc71f749711ebfe77dd335b1c.

2024-04-16  Ekaitz Zarraga  <ekaitz@elenq.tech>

	Revert "build: Add support for TCC in RISC-V."
	The new RISC-V assembly backend in bootstrappable-tcc makes this
	obsolete.

	This reverts commit 0d3c4ddc4bcb57db690ee8ebab106fa6fda75823.

2024-04-16  Ekaitz Zarraga  <ekaitz@elenq.tech>

	RISC-V: lib: make long jumps to __init_io and main
	`jalr` only supports 20 bit offsets that happened not to be enough when
	building large programs.  The jumps fell too short and that caused a
	segfault.  Making a C call instead, lets the compiler use an `auipc` +
	`jalr` combination, enabling longer jumps.

	* lib/linux/riscv64-mes-gcc/crt1.c (__init_io, main): Move out of
	extended asm to take advantage of call relocations.

2024-03-05  Ekaitz Zarraga  <ekaitz@elenq.tech>

	lib: Fix struct stat's fields for riscv64.
	We detected this behavior when building `make` with `tcc` during the
	bootstrapping process.  That resulting `make` rebuilt the files, even if
	they were just built.

	This problem broke the whole Guix bootstrapping process as the `check`
	phase was rebuilt in the `build` step because the `make` program was
	rebuilding everything by mistake.  This wouldn't be that much of a
	problem if it wasn't that the phase that patches the shebangs on the
	generated files is run after `check` and not after the "re-check" that
	was triggered during the `build` phase.  That made every generated file
	that was using `/usr/bin/sh` to explode.

	Other architectures (x86_64 is the most suspicious one) may have the
	same issue.

	NOTE: We used `musl` as a reference, but we have different field names,
	which ones should we keep?

	    Ours:                              Musl:
	      time_t         st_atime;           long st_atime_sec;
	      unsigned long  st_atime_usec;      long st_atime_nsec;
	      time_t         st_mtime;           long st_mtime_sec;
	      unsigned long  st_mtime_usec;      long st_mtime_nsec;
	      time_t         st_ctime;           long st_ctime_sec;
	      unsigned long  st_ctime_usec;      long st_ctime_nsec;

	* include/linux/riscv64/kernel-stat.h (struct stat): Introduce padding
	and fix field lengths.

2024-04-13  Michael Forney  <mforney@mforney.org>

	mescc: Fix length calculation of initialized array with unspecified length.
	Consider the following definition:

	    char a[] = {1, 2, 3};

	The initializer is parsed as

	    ((initzer (initzer-list
	        (initzer (p-expr (fixed "1")))
	        (initzer (p-expr (fixed "2")))
	        (initzer (p-expr (fixed "3"))))))

	so (cadar init) is

	    (initzer-list
	        (initzer (p-expr (fixed "1")))
	        (initzer (p-expr (fixed "2")))
	        (initzer (p-expr (fixed "3"))))

	We want to determine the number of items in the initializer, which
	is (length (cdadar init)), not (length (cadar init)).

	Using cadar causes the length of the array to be one too large and
	incorrect evaluation of sizeof.

	* module/mescc/compile.scm (init-declr->info): Fix length calculation
	of initialized array with unspecified length.

2024-04-13  Michael Forney  <mforney@mforney.org>

	mescc: Implement ast->type for comma-expr.
	This fixes code like

	    int x;
	    x = (1, 0);

	* module/mescc/compile.scm (ast->type): Implement ast->type for
	comma-expr.
	* build-aux/check-mescc.sh (xfail_tests): Remove
	86-comma-operator-types.

2024-04-13  Michael Forney  <mforney@mforney.org>

	lib: Fix buffer underflow with large integer in ntoab.
	With base == 8, -2^63 is converted as -1000000000000000000000, which
	is 24 bytes long (including terminating nul), so we need at least
	this much space in the __itoa_buf.

	* lib/mes/ntoab.c (ntoab): Allocate enough space for longest string, and
	update assert with lowest possible base.  Don't decrement pointer below
	start of buffer, even temporarily.

2024-04-14  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Whitespace nitpicks.
	* build-aux/build-scaffold.sh: Use C-c C-\ to outline continuation backslashes.

2024-04-02  Michael Forney  <mforney@mforney.org>

	build: Pass LDFLAGS when linking test programs in scaffold step.
	The system gcc may default to building PIE executables (if configured
	with --enable-default-pie). This results in broken test binaries:

	  /bin/gcc -nostdlib -g lib/linux/x86_64-mes-gcc/hello-mes.S -o hello-mes
	  /bin/ld: /tmp/ccDIHhGp.o: warning: relocation in read-only section `.text'
	  /bin/ld: warning: creating DT_TEXTREL in a PIE
	  build-aux/build-scaffold.sh: line 92: 11246 Segmentation fault      ./hello-mes
	    => 139

	* build-aux/build-scaffold.sh: Pass LDFLAGS when linking.

2024-03-05  Ekaitz Zarraga  <ekaitz@elenq.tech>

	lib: Fix intmax_t and uintmax_t for 64 bit.
	* include/stdint.h (uintmax_t, intmax_t)[__x86_64__
	|| __riscv_xlen == 64]: New typedefs using long as base type.

	lib: Make CHAR_MAX dependent on signedness of char.
	* include/stdint.h (CHAR_MIN): Assign according to char signedness.
	(CHAR_MAX): Likewise.

2024-02-27  Ekaitz Zarraga  <ekaitz@elenq.tech>

	tests: Add 86-comma-operator-types.c.
	The comma operator works when comparing values but not when it needs to
	deduce the type of the result.  This test checks that.

	* lib/tests/scaffold/86-comma-operator-types.c: New file.
	* build-aux/check-mescc.sh (tcc_tests): Add it.
	(xfail_tests): Likewise.

2024-02-24  Ekaitz Zarraga  <ekaitz@elenq.tech>

	lib: Add ucontext_t for all architectures.
	ucontext_t is used by `tcc -run` and it affects the compilation process
	of that.  If we don't have the data structures defined the build process
	of tcc-mob later in the chain fails.  We don't use the `-run` option for
	anything in the bootstrapping process, but as we do `ONE_SOURCE` that
	affect our building process.  The cleanest solution is to add the proper
	support here and forget about it.

	This commit copies the code from musl libc, using the GNU_SOURCE part of
	the `#ifdef`s in there as that's what tcc expects.  We can do better but
	the goal of the commit is to make the bare minimum.

	* include/signal.h (ucontext_t): Move current i386 support to...
	* include/gnu/x86/signal.h: ...this new file.
	* include/linux/x86/signal.h,
	include/linux/x86_64/signal.h,
	include/linux/arm/signal.h,
	include/linux/riscv64/signal.h: New files.
	* simple.sh: Add support for multiple signal.h files.
	* configure.sh: Likewise.
	* configure: Likewise.

2024-01-23  Andrius Štikonas  <andrius@stikonas.eu>

	mescc: Use long-r when extending unsigned 4-byte integers.
	TODO: This breaks 16-cast, 17-compare-unsigned-le in x86_64.

	* module/mescc/compile.scm (convert-r0): use long-r instead of
	long-signed-r.
	* build-aux/check-mescc.sh (xfail_tests)[x86_64 && MesCC]: Add 16-cast,
	17-compare-unsigned-le.

2024-01-20  Andrius Štikonas  <andrius@stikonas.eu>

	x86_64: Generate position independent binaries.
	The UEFI bootstrap does not provide memory management, so position
	independent code is very helpful there.

	* lib/x86_64-mes/x86_64.M1 (lea____$i32(%rip),%rax,
	lea____$i32(%rip),%rdi, lea____$i32(%rip),%r10, mov____%ax,(%r10),
	mov____%eax,(%r10), mov____%edi,(%r10), mov____%rax,(%r10),
	mov____(%r10),%rax, mov____(%r10),%rdi, push___%r10): Add new M1
	defines.
	(mov____%rax,0x32, movl___%eax,0x32, movl___%edi,0x32, movw___%ax,0x32,
	movw___%di,0x32 push___$i32): Remove.
	* module/mescc/x86_64/as.scm (x86_64:label->arg, x86_64:label->r,
	x86_64:label-mem->r, x86_64:label-mem-add, x86_64:r->label,
	x86_64:r->byte-label, x86_64:r->word-label, x86_64:r->long-label): : Use
	offsets instead of absolute addresses.
	* module/mescc/M1.scm (info->M1): Add additional matches for #:offset

2024-01-28  Andrius Štikonas  <andrius@stikonas.eu>

	lib: Fix getdents64 syscall.
	getdents64 syscall returns slightly different dirent struct.

	* include/linux/x86_64/syscall.h (SYS_getdents): Remove define.
	(getdents64): Add define.
	* lib/linux/getdents.c (getdents): Prioritize getdents64 syscall.
	* include/dirent.h (struct dirent): Adjust for getdents64 syscall.
	* include/linux/x86/syscall.h [__SIZEOF_LONG_LONG__ == 8]
	(SYS_getdents64): This breaks 90-readdir.c; comment-out.
	* include/linux/arm/syscall.h [__SIZEOF_LONG_LONG__ == 8]
	(SYS_getdents64): Likewise, comment-out.

2024-01-30  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	ARM: mescc: Avoid segfault with signed shift in 60-math-itoa.
	This fixes

	    $ mescc-lib/lib/tests/scaffold/60-math-itoa
	    t: i = INT_MAX
	    t: i = 2147483646
	    Segmentation fault

	* module/mescc/armv4/as.scm (armv4:instructions): Use armv4r0>>r1 for
	r0>>r1-signed too.

2024-01-29  Janneke Nieuwenhuizen  <janneke@gnu.org>

	ARM: build: Move 67-m1-overflow-check to XFAIL.
	* build-aux/check-mescc.sh: Add 67-m1-overflow-check to XFAIL.

	ARM: build: Move 17-compare-rotated to XFAIL.
	* build-aux/check-mescc.sh: Add XFAIL block for arm and add
	17-compare-rotated in it.

2024-01-28  Janneke Nieuwenhuizen  <janneke@gnu.org>

	ARM: Update arm_defs for M2-Planet-1.11.0.
	* lib/m2/arm/arm_defs.M1: Update from M2Libc.

2024-01-21  Ekaitz Zarraga  <ekaitz@elenq.tech>

	RISC-V: tests: 68-truncate-shift. Fix asm syntax.
	RISC-V uses `#' as line comment character.

	* lib/tests/scaffold/68-truncate-shift.c: Replace `asm' calls' comment
	symbol with `#' in RISC-V.

2024-01-23  Timothy Sample  <samplet@ngyro.com>

	mes: srfi-43: Fix 'vector-fold'.
	* mes/module/srfi/srfi-43.scm (vector-fold): Change '=>' to '>='.

2024-01-11  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Support ./configure.sh without --host during bootstrap.
	Reported and suggested by efraim via IRC.

	* configure.sh (host): Do not require gcc (or CC) to be present.

2023-12-23  Ekaitz Zarraga  <ekaitz@elenq.tech>

	mescc: Don't run mescc:main twice.
	Since 0.26, some people noticed mescc was running twice per file in mes.
	This commit fixes that behaviour.

	Discussed here:
	<https://lists.gnu.org/archive/html/bug-mes/2023-12/msg00008.html>

	* scripts/mescc.scm.in: Remove mescc:main from cond-expand to avoid
	running mescc:main twice in mes.

2023-12-23  Timothy Sample  <samplet@ngyro.com>

	mescc: Fix running without modules.
	This is a follow up to commit
	    8e731e414f18ce17d4147e316f15f08be34ca67c
	    mescc: Remove delusions of bytevectors.

	* mes/module/mescc/bytevectors.mes: Delete file.
	* mes/module/mescc/as.mes: Do not import it.

2023-12-19  Janneke Nieuwenhuizen  <janneke@gnu.org>

	repl: Have ,use load Guile-style modules.
	* mes/module/mes/repl.mes (repl): Use resolve-interface instead of
	mes-load-module-env,

2023-12-19  Janneke Nieuwenhuizen  <janneke@gnu.org>

	kaem: Add workaround for Gash.
	This avoids Gash's %bootstrap-guile to run with a broken
	GUILE_LOAD_PATH, breaking on `mes/module/ice-9/regex.scm'.

	* kaem.run (GUILE_LOAD_PATH): Set to /fubar before calling cp.

2023-12-19  Janneke Nieuwenhuizen  <janneke@gnu.org>

	mes: Fixup regex.
	This is a follow-up to commit
	    ca4b6df7b3c5e3778780204191a90045fceb1ab4
	    mes: Add regex support.

	* mes/module/ice-9/regex.scm ("pregexp.upstream.scm"): Use
	include-from-path on relative file name.

2024-01-29  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Remove riscv32-linux-mes from supported systems.
	* configure (main): System riscv32-linux-mes is not supported.

2024-06-05  Janneke Nieuwenhuizen  <janneke@gnu.org>

	lib: tests: Resurrect 90-stat.c.
	* lib/tests/io/90-stat.c[__i386__ || __arm__] (stat): Remove.

2024-06-05  Janneke Nieuwenhuizen  <janneke@gnu.org>

	lib: test: Resurrect 90-fseek.c.
	This is a follow-up to commit
	    c1f93c1d7127a1287e5d936b5493ac4cec4e9525
	    doc: Use HTTPS.

	* lib/tests/stdio/90-fseek.c (main): Update size of COPYING.

2024-06-05  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Resurrect running individual tests with test-c.sh.
	* build-aux/test-c.sh (CPPFLAGS, LDFLAGS): Set if CPPFLAGS are unset.

	build: Do not skip gnu_tests unless --with-bootstrap.
	* build-aux/check-mescc.sh (TESTS): Only skip gnu_tests when $bootstrap
	== true.

2024-01-29  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Support for BOOT_TESTS=.., MES_TESTS=.., MESCC_TESTS=...
	This is a follow-up to commit
	    0db5bc48f5b0d2052c20a463ee03d94acd484a5c
	    build: Support make check TESTS=... XFAIL=... for mescc tests.

	* build-aux/check-boot.sh (TESTS): Allow override with BOOT_TESTS.
	(XFAIL_TESTS): Allow override  with BOOT_XFAIL_TESTS.
	* HACKING (TESTING): Document it.
	* build-aux/check-mes.sh (TESTS): Allow override with MES_TESTS.
	(XFAIL_TESTS): Allow override with MES_XFAIL_TESTS.
	* build-aux/check-mescc.sh (TESTS): Allow override with MESCC_TESTS.
	(XFAIL_TESTS): Allow override with MESCC_XFAIL_TESTS.
	* build-aux/config.sh.in,
	* export.make: Export them.

2024-06-05  Janneke Nieuwenhuizen  <janneke@gnu.org>

	lib: linux: signal: Fix compile warning.
	This is a follow-up to commit
	    cc33607653db12dcffd40fb1dc77c0cd2bc5ef19
	    lib: General Linux RISC-V64 syscall support.

	* lib/linux/signal.c (signal)[__i386__]: Cast return value to
	sighandler_t.

2024-06-05  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Also compile mes-0.scm.
	* build-aux/build-guile.sh (SCM_FILES): Add mes-0.scm.

2024-06-05  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Remove bytevectors.scm.
	This is a follow-up to commit
	    8e731e414f18ce17d4147e316f15f08be34ca67c
	    mescc: Remove delusions of bytevectors.

	* build-aux/build-guile.sh (SCM_FILES): Remove
	module/mescc/bytevectors.scm.

2023-12-02  Janneke Nieuwenhuizen  <janneke@gnu.org>

	doc: Post-release update.
	* build-aux/GNUmakefile.in (--previous-version): Update to 0.26.
	* doc/announce/ANNOUNCE-0.26: Update checksums.  Typos.

	guix: mes: Update to 0.26.
	* guix/git/mes.scm (mes)[source]: Update to 0.26.

	build: Releease 0.26.
	* configure (VERSION): Bump to 0.26.
	* configure.sh (VERSION): Likewise.

	doc: Add `ANNOUNCE-0.26'.
	* doc/announce/ANNOUNCE-0.26: New file.

	doc: Update `NEWS'.
	* NEWS (Changes in 0.26 sirce 0.25.1): New section.

	doc: Update `AUTHORS'.
	* AUTHORS: Add Timothy Sample.
	* mes/module/mes/repl.mes (welcome): Likewise.

	mes: Move uname to core.
	* src/mescc-posix.c (uname_): Move to...
	* src/posix.c (uname_): ...here, refactor using...
	* include/mes/mes.h (__uts): ...this new global.
	* src/mescc-builtins.c: Move registration to...
	* src/builtins.c (mes_builtins): ...here.
	* include/mes/mescc-builtins.h (uname_): Move declaration...
	* include/mes/builtins.h (uname_): ...here.
	* kaem.run: Add include/sys/utsname.h, lib/linux/uname.c.

	core: Support uname.
	* src/mescc-posix.c (uname_): New function.
	* include/mes/mescc-builtins.h (uname_): Declare it.
	* src/mescc-builtins.c: Register it.

	lib: Support uname.
	* include/sys/utsname.h,
	lib/linux/uname.c,
	lib/stub/uname.c: New files.
	* build-aux/configure-lib.sh (libc_SOURCES): Add appropriate uname.c
	* include/linux/arm/syscall.h (SYS_newuname): New define.
	* include/linux/riscv64/syscall.h (SYS_newuname): New define.
	* include/linux/x86/syscall.h (SYS_newuname): New define.
	* include/linux/x86_64/syscall.h (SYS_newuname): New define.
	* simple.make (M2_SOURCES): Add lib/linux/uname.c.
	* simple.sh (compiler): Likewise.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: Enable modules by default.
	* src/mes.c (open_boot): Use "boot-5.scm" as the default boot.
	(try_open_boot): Fix debug messages accordingly.

	tests: Mark psyntax as expected to fail.
	* build-aux/check-mes.sh (TESTS): Move 'tests/psyntax.test'...
	(XFAIL_TESTS): ...here.

	mescc: Remove delusions of bytevectors.
	* module/mescc/bytevectors.scm: Delete file.
	* module/mescc/as.scm (int->bv64, int->bv32, int->bv16)
	(int->bv8): Make a list directly.

	mes: Add 'the-eof-object' to the root module.
	* mes/module/mes/boot-5.scm: Add 'the-eof-object' to the root
	module.

	mes: Add 'sort' to the root module.
	* mes/module/mes/boot-5.scm: Add 'sort' to the root module.

	mes: srfi-1: Add 'append-reverse!'.
	* mes/module/srfi/srfi-1.scm (append-reverse!): New procedure.

	mes: Add 'symlink'.
	* src/mescc-posix.c (symlink_): New procedure.
	* include/mes/mescc-builtins.h: Declare it.
	* src/mescc-builtins.c: Initialize it.

	lib: Move 'symlink' to plain libc.
	* lib/stub/symlink.c: New file.
	* build-aux/configure-lib.sh
	(libc_gnu_SOURCES) [$mes_kernel = linux]: Move
	'lib/linux/symlink.c'...
	(libc_SOURCES) [$mes_kernel = linux]: ...here.
	(libc_SOURCES) [$mes_kernel = gnu]: Add 'lib/stub/symlink.c'.
	* simple.sh: Add 'lib/linux/symlink.c' to the Mes C lib build.

	mes: Add 'link'.
	* src/mescc-posix.c (link_): New procedure.
	* include/mes/mescc-builtins.h: Declare it.
	* src/mescc-builtins.c: Initialize it.

	lib: Move 'link' to plain libc.
	* lib/stub/link.c: New file.
	* build-aux/configure-lib.sh
	(libc_gnu_SOURCES) [$mes_kernel = linux]: Move 'lib/linux/link.c'...
	(libc_SOURCES) [$mes_kernel = linux]: ...here.
	(libc_SOURCES) [$mes_kernel = gnu]: Add 'lib/stub/link.c'.
	* simple.sh: Add 'lib/linux/link.c' to the Mes C lib build.

	mes: reader: Support '#\fs'.
	* src/reader.c (reader_read_character): Handle '#\fs'.

	mes: Add 'sleep'.
	* src/mescc-posix.c (sleep_): New procedure.
	* include/mes/mescc-builtins.h: Declare it.
	* src/mescc-builtins.c: Initialize it.

	lib: Move 'nanosleep' to plain libc.
	* lib/stub/nanosleep.c: New file.
	* build-aux/configure-lib.sh
	(libc_gnu_SOURCES) [$mes_kernel = linux]: Move
	'lib/linux/nanosleep.c'...
	(libc_SOURCES) [$mes_kernel = linux]: ...here.
	(libc_SOURCES) [$mes_kernel = gnu]: Add 'lib/stub/nanosleep.c'.
	* simple.sh: Add 'lib/linux/nanosleep.c' to the Mes C lib build.

	mes: regex: Fix 'fold-matches'.
	* mes/module/ice-9/regex.scm (fold-matches): Deal with empty strings
	and matches, and use the 'regexp/notbol' flag to only match "^" at
	the beginning of the string.

	mes: regex: Support 'notbol' and 'noteol' flags.
	* mes/module/ice-9/pregexp.upstream.scm (notbol?): New procedure.
	(noteol?): New procedure.
	(pregexp-match-positions-aux): Add a 'flags' argument and use it
	when interpreting ':bos' and ':eos' forms.
	(pregexp-match-positions): Accept an optional 'flags' argument and
	pass it through to 'pregexp-match-positions-aux'.
	* mes/module/ice-9/regex.scm (regexp/notbol): New variable.
	(regexp/noteol): New variable.
	(regexp-exec): Do not error on nonzero 'flags', but rather pass them
	though to pregexp.

	mes: srfi-43: Add 'vector-fold'.
	* mes/module/srfi/srfi-43.scm (vector-fold): New procedure.

	mes: boot-5: Define 'close-port' earlier.
	* mes/module/mes/boot-5.scm (close-port): Check and define before
	importing '(mes guile)'.

	mes: regex: Handle "basic" regular expressions.
	* mes/module/ice-9/regex.scm (make-regexp): Process flags; when
	needed, convert the pattern from "basic" to "extended".
	(bracket-end): New procedure.
	(ere-special?): New procedure.
	(ere-special-escape?): New procedure.
	(bre->ere): New procedure.

	mes: regex: Add 'fold-matches' and 'list-matches'.
	* mes/module/ice-9/regex.scm (fold-matches): New procedure.
	(list-matches): New procedure.

	mes: srfi-13: Improve 'string-fold'.
	* mes/module/srfi/srfi-13.mes (string-fold): Process the 'start' and
	'end' arguments, and do not convert the string to a list.

	mes: srfi-9: gnu: Add 'set-fields'.
	* mes/module/srfi/srfi-9/gnu.scm (set-fields): New syntax.

	mes: srfi-9: gnu: Define immutable setters.
	* mes/module/srfi/srfi-9/gnu-struct.mes
	(define-immutable-record-type): Define setters when needed.
	* mes/module/srfi/srfi-9/gnu-vector.mes
	(define-immutable-record-type): Likewise.

	mes: Add '(rnrs io ports)'.
	* mes/module/rnrs/io/ports.scm: New file.

	mes: Add '(rnrs bytevectors)'.
	* mes/module/rnrs/bytevectors.scm: New file.

	mes: srfi-13: Add 'string-filter'.
	* mes/module/srfi/srfi-13.mes (string-filter): New procedure.

	mes: Add 'utime'.
	* src/mescc-posix.c (utime_): New procedure.
	* include/mes/mescc-builtins.h: Declare it.
	* src/mescc-builtins.c: Initialize it.

	lib: linux: Add 'utimensat'.
	* include/linux/arm/syscall.h (SYS_utimensat): New constant.
	* include/linux/riscv64/syscall.h (SYS_utimensat): New constant.
	* include/linux/x86/syscall.h (SYS_utimensat): New constant.
	* include/linux/x86_64/syscall.h (SYS_utimensat): New constant.
	* lib/linux/utimensat.c: New file.
	* lib/stub/utimensat.c: New file.
	* include/sys/stat.h (utimensat): New declaration.
	* build-aux/configure-lib.sh
	(libc_SOURCES) [$mes_kernel = linux]: Add 'lib/linux/utimensat.c'.
	(libc_SOURCES) [$mes_kernel = gnu]: Add 'lib/stub/utimensat.c'.
	* simple.sh: Add 'lib/linux/utimensat.c' to the Mes C lib build.

	mes: srfi-13: Add 'string-pad'.
	* mes/module/srfi/srfi-13.mes (string-pad): New procedure.
	(string-pad-right): Accept an optional 'chr' argument.

	mes: Make 'string-set!' a built-in.
	* mes/module/mes/scm.mes (string-set!): Remove procedure.
	* src/string.c (string_set_x): New function.
	* include/mes/builtins.h: Declare it.
	* src/builtins.c (mes_builtins): Initialize it.

	mes: getopt-long: Handle "-" as an argument.
	* module/mes/getopt-long.scm (looks-like-an-option): Exclude "-".

	mes: Add basic bytevector support.
	* src/gc.c (make_bytes): Remove the 's' argument.
	(make_string): Adjust accordingly.
	* src/mescc-posix.c (opendir_): Ditto.
	* include/mes/mes.h: Adjust declaration.
	* src/lib.c (make_bytevector): New function.
	(bytevector_u8_ref): New function.
	(bytevector_u8_set_x): New function.
	* include/mes/builtins.h: Declare them.
	* src/builtins.c (mes_builtins): Initialize them.
	* mes/module/mes/scm.mes (bytevector?): New procedure.
	(bytevector-length): New procedure.

	mes: Add 'umask'.
	* include/unistd.h (umask): New declaration.
	* src/mescc-posix.c (umask_): New procedure.
	* include/mes/mescc-builtins.h: Declare it.
	* src/mescc-builtins.c: Initialize it.

	lib: linux: Add 'umask'.
	* include/linux/arm/syscall.h (SYS_umask): New constant.
	* include/linux/x86/syscall.h (SYS_umask): New constant.
	* include/linux/x86_64/syscall.h (SYS_umask): New constant.
	* include/linux/riscv64/syscall.h (SYS_umask): New constant.
	* lib/linux/umask.c: New file.
	* build-aux/configure-lib.sh
	(libc_SOURCES) [$mes_kernel = linux]: Add it.
	(libc_gnu_SOURCES) [$mes_kernel = gnu]: Move 'lib/stub/umask.c'...
	(libc_SOURCES) [$mes_kernel = gnu]: ...here.
	* simple.sh: Add 'lib/linux/umask.c' to the Mes C lib build.

	mes: ftw: Add 'file-system-fold'.
	* mes/module/ice-9/ftw.scm (errno-if-exception): New syntax.
	(file->key): New procedure.
	(file-system-fold): New procedure.
	* AUTHORS: Credit Guile.

	mes: Add 'rmdir'.
	* src/mescc-posix.c (rmdir_): New procedure.
	* include/mes/mescc-builtins.h: Declare it.
	* src/mescc-builtins.c: Initialize it.

	lib: Move 'rmdir' to plain libc.
	* build-aux/configure-lib.sh
	(libc_tcc_SOURCES) [$mes_kernel = linux]: Move 'lib/linux/rmdir.c'...
	(libc_SOURCES) [$mes_kernel = linux]: ...here.
	(libc_tcc_SOURCES) [$mes_kernel = gnu]: Move 'lib/stub/rmdir.c'...
	(libc_SOURCES) [$mes_kernel = gnu]: ...here.
	* simple.sh: Add 'lib/linux/rmdir.c' to the Mes C lib build.

	mes: ftw: Sort output of 'scandir'.
	* mes/module/ice-9/ftw.scm (scandir): Accept an 'entry<?' argument
	and sort the results using it.

	mes: Add a small stub of SRFI 132 (sorting).
	* mes/module/srfi/srfi-43.scm (vector-copy!): New procedure.
	* mes/module/srfi/srfi-132.scm: New file.

	mes: srfi-13: Add 'string>'.
	* mes/module/srfi/srfi-13.mes (string>): New procedure.

	mes: srfi-2: Implement 'and-let*'.
	* mes/module/srfi/srfi-2.scm (and-let*): New syntax.

	mes: regex: Export flag variables.
	* mes/module/ice-9/regex.scm (regexp/icase): New variable.
	(regexp/newline): New variable.
	(regexp/basic): New variable.
	(regexp/extended): New variable.

	mes: Add 'mkdir'.
	* src/mescc-posix.c (mkdir_): New procedure.
	* include/mes/mescc-builtins.h: Declare it.
	* src/mescc-builtins.c: Initialize it.

	lib: Move 'mkdir' to plain libc.
	* lib/stub/mkdir.c: New file.
	* build-aux/configure-lib.sh
	(libc_gnu_SOURCES) [$mes_kernel = linux]: Move 'lib/linux/mkdir.c'...
	(libc_SOURCES) [$mes_kernel = linux]: ...here.
	(libc_SOURCES) [$mes_kernel = gnu]: Add 'lib/stub/mkdir.c'.
	* simple.sh: Add 'lib/linux/mkdir.c' to the Mes C lib build.

	mes: Allow a boolean exit status.
	* src/posix.c (exit_): Allow a boolean (strictly '#t' and '#f') exit
	status.

	mes: Add 'rename-file'.
	* src/mescc-posix.c (rename_file): New procedure.
	* include/mes/mescc-builtins.h: Declare it.
	* src/mescc-builtins.c: Initialize it.

	lib: Move 'rename' to plain libc.
	* lib/stub/rename.c: New file.
	* build-aux/configure-lib.sh
	(libc_gnu_SOURCES) [$mes_kernel = linux]: Move 'lib/linux/rename.c'...
	(libc_SOURCES) [$mes_kernel = linux]: ...here.
	(libc_SOURCES) [$mes_kernel = gnu]: Add 'lib/stub/rename.c'.
	* simple.sh: Add 'lib/linux/rename.c' to the Mes C lib build.
	* include/stdio.h (rename): New declaration.

	mes: Fix 'core:execl' arguments bug.
	* src/posix.c (execl_): Do not use 'file_name' as the first
	argument (the caller is supposed to manage that).
	* mes/module/mes/posix.mes (system*): Adjust accordingly.

	mes: srfi-1: Add 'span'.
	* mes/module/srfi/srfi-1.scm (span): New procedure.

	mes: Add 'stat' and 'lstat'.
	* src/mescc-posix.c (statbuf_to_vector): New function.
	(stat__): New function.
	(stat_): New function.
	(lstat_): New function.
	* include/mes/mescc-builtins.h: Declare 'stat_' and 'lstat_'.
	* src/mescc-builtins.c: Initialize 'stat' and 'lstat'.
	* mes/module/mes/posix.mes (stat:dev): New procedure.
	(stat:ino): New procedure.
	(stat:mode): New procedure.
	(stat:nlink): New procedure.
	(stat:uid): New procedure.
	(stat:gid): New procedure.
	(stat:rdev): New procedure.
	(stat:size): New procedure.
	(stat:atime): New procedure.
	(stat:mtime): New procedure.
	(stat:ctime): New procedure.
	(stat:blksize): New procedure.
	(stat:blocks): New procedure.
	(stat:type): New procedure.
	(stat:perms): New procedure.
	(stat:atimensec): New procedure.
	(stat:mtimensec): New procedure.
	(stat:ctimensec): New procedure.

	lib: Move 'lstat' to plain libc.
	* lib/stub/lstat.c: New file.
	* build-aux/configure-lib.sh
	(libc_gnu_SOURCES) [$mes_kernel = linux]: Move 'lib/linux/lstat.c'...
	(libc_SOURCES) [$mes_kernel = linux]: ...here.
	(libc_SOURCES) [$mes_kernel = gnu]: Add 'lib/stub/lstat.c'.
	* simple.sh: Add 'lib/linux/lstat.c' to the Mes C lib build.
	* include/sys/stat.h (lstat): New declaration.

	lib: Move 'stat' to plain libc.
	* build-aux/configure-lib.sh
	(libc_tcc_SOURCES) [$mes_kernel = linux]: Move 'lib/linux/stat.c'...
	(libc_SOURCES) [$mes_kernel = linux]: ...here.
	(libc_tcc_SOURCES) [$mes_kernel = gnu]: Move 'lib/stub/stat.c'...
	(libc_SOURCES) [$mes_kernel = gnu]: ...here.
	* simple.sh: Add 'lib/linux/stat.c' to the Mes C lib build.

	mes: rdelim: Add 'read-line'.
	* mes/module/ice-9/rdelim.scm (%read-line): New procedure.
	(read-line): New procedure.

	mes: guile: Add some 'call-with-' I/O procedures.
	* mes/module/mes/guile.mes (call-with-port): New procedure.
	(call-with-input-file): New procedure.
	(call-with-input-string): New procedure.
	(call-with-output-file): New procedure.

	mes: srfi-1: Add 'concatenate'.
	* mes/module/srfi/srfi-1.scm (concatenate): New procedure.

	mes: srfi-1: Add 'alist-cons'.
	* mes/module/srfi/srfi-1.scm (alist-cons): New procedure.

	mes: srfi-13: Add 'string-pad-right'.
	* mes/module/srfi/srfi-13.mes (string-pad-right): New procedure.

	mes: srfi-1: Add 'reduce'.
	* mes/module/srfi/srfi-1.scm (reduce): New procedure.

	mes: Add SRFI 37 from Guile.
	* src/hash.c (create_handle_x): New function.
	(hashq_create_handle_x): Simplify using 'create_handle_x'.
	(hash_create_handle_x): New function.
	* include/mes/builtins.h: Declare it.
	* src/builtins.c (mes_builtins): Initialize it.
	* mes/module/srfi/srfi-37.scm: New file.
	* tests/srfi-37.test: New file.
	* build-aux/check-mes.sh (TESTS): Add it.
	* AUTHORS: Add SRFI 37 authorship.

	mes: srfi-13: Add 'string-concatenate-reverse'.
	* mes/module/srfi/srfi-13.mes (string-concatenate-reverse): New
	procedure.

	mes: Add regex support.
	* mes/module/ice-9/pregexp.upstream.scm: New file.
	* AUTHORS: Mention it.
	* mes/module/ice-9/regex.scm: New file.

	mes: guile: Implement more port redirects.
	* mes/module/mes/guile.mes (with-input-from-port): New procedure.
	(with-output-to-port): Reimplement using 'dynamic-wind'.
	(with-error-to-port): New procedure.
	(with-input-from-string): Reimplement using 'with-input-from-port'.
	(with-input-from-file): Reimplement using 'with-input-from-port'.
	(with-output-to-file): Reimplement using 'with-output-to-port'.
	(with-error-to-file): Reimplement using 'with-error-to-port'.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: Increase the file descriptor limit.
	Since the GC doesn't close files, we tend to leak quite a few.

	* include/mes/lib.h (__FILEDES_MAX): Bump to 4096.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	lib: _open3: Error on too many FDs.
	* lib/gnu/_open3.c (_open3): Raise an error if the number of file
	descriptors exceeds __FILEDES_MAX.
	* lib/linux/_open3.c (_open3): Likewise.
	* include/errno.h[__M2__]: Comment-out sys_errlist to avoid M2-Planet
	crash.
	* kaem.run: Include errno.h.

	mes: catch: Unwind stack for handler.
	* mes/module/mes/catch.mes (catch): Make sure the stack is unwound
	before running the handler.
	* tests/catch.test: Add a test.

	mes: Support 'substring' without 'end'.
	* mes/module/mes/scm.mes (substring): Use the string's length as a
	default when no end index is given.

	mes: Make 'list-head' iterative.
	* mes/module/mes/scm.mes (list-head): Reimplement without recursion.

	mes: make 'filter' iterative.
	* mes/module/mes/scm.mes (filter): Reimplement without recursion.
	* mes/module/srfi/srfi-1.mes (filter): Likewise.

	mes: Make 'cons*' and 'append' iterative.
	* mes/module/mes/boot-01.scm (cons*): Reimplement without recursion.
	(append): Likewise.
	* mes/module/mes/boot-02.scm (cons*): Likewise.
	(append): Likewise.
	* mes/module/mes/boot-03.scm (cons*): Likewise.
	(append): Likewise.
	* mes/module/mes/boot-0.scm (cons*): Likewise.
	(append): Likewise.
	* mes/module/mes/boot-5.scm (cons*): Likewise.
	(append): Likewise.

	mes: Remove duplicate definitions from 'boot-03'.
	* mes/module/mes/boot-03.scm: Delete duplicate definitions of
	'cons*', 'apply', and 'append'.
	* mes/module/mes/boot-0.scm: Likewise.
	* mes/module/mes/boot-5.scm: Likewise.

	mes: Make 'map' iterative.
	* mes/module/mes/boot-01.scm (map1): Reimplement without recursion.
	* mes/module/mes/boot-02.scm (map1): Likewise.
	* mes/module/mes/boot-03.scm (map1): Likewise.
	* mes/module/mes/boot-0.scm (map1): Likewise.
	* mes/module/mes/boot-5.scm (map1): Likewise.
	* mes/module/mes/base.mes (map2): New procedure.
	(map3): New procedure.
	(map4): New procedure.
	(map): Reimplement in terms of 'map1', 'map2', etc.

	mes: Implement 'dynamic-wind'.
	* mes/module/mes/scm.mes: Implement 'dynamic-wind' and shadow
	'call-with-current-continuation' so the stack gets properly wound.
	* tests/scm.test: Test it.
	* mes/module/mes/fluids.mes (dynamic-wind): Remove procedure.
	(with-fluid*, with-fluids): Reimplement using 'dynamic-wind'.

	core: Add 'chdir'.
	* include/unistd.h (chdir): New declaration.
	* src/mescc-posix.c (chdir_): New procedure.
	* include/mes/mescc-builtins.h: Declare it.
	* src/mescc-builtins.c: Initialize it.

	lib: Move 'chdir' to plain libc.
	* lib/stub/chdir.c: New file.
	* build-aux/configure-lib.sh
	(libc_gnu_SOURCES) [$mes_kernel = linux]: Move 'lib/linux/chdir.c'...
	(libc_SOURCES) [$mes_kernel = linux]: ...here.
	(libc_SOURCES) [$mes_kernel = gnu]: Add 'lib/stub/chdir.c'.
	* Add 'lib/linux/chdir.c' to the Mes C lib build.

	mes: srfi-14: Add 'char-set:full'.
	* mes/module/srfi/srfi-14.scm (char-set:full): New variable.

	core: Add 'seek'.
	* src/mescc-posix.c (seek): New function.
	* include/mes/mescc-builtins.h (seek): Declare it.
	* src/builtins.c: Include "stdio.h".
	* src/mescc-builtins.c: Add it and its flags.

	core: Expose 'WNOHANG'.
	* src/builtins.c: Include "sys/wait.h".
	* src/mescc-builtins.c: Expose 'WNOHANG'.

	mes: Fix 'execlp' interface.
	* mes/module/mes/posix.mes (execlp): Accept a variable number of
	arguments.
	(system*): Adjust accordingly.

	core: Add 'open' and expose its flags.
	* src/posix.c (open_): New function.
	* include/mes/builtins.h (open_): Declare it.
	* src/builtins.c (mes_builtins): Add it and its M2-supported flags.
	* src/mescc-builtins.c: Add the rest of its flags.
	* kaem.run: Include fnctl.h.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: guile: Remove 'read-line'.
	This procedure is not used, and it clutters up the default
	environment.  Trying to redefine it in an '(ice-9 rdelim)' module
	causes the module system to warn about overriding core bindings, for
	example.

	* mes/module/mes/guile.mes (read-line): Remove procedure.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: Fix 'execl' interface.
	* src/builtins.c (mes_builtins): Rename 'execl' to 'core:execl'.
	* mes/module/mes/posix.mes (execl): New procedure.

	mes: simple-format: Add support for "~%".
	* mes/module/mes/simple-format.mes (simple-format): Turn "~%" into a
	newline.

	mes: srfi-13: Allow charsets in 'string-index'.
	* mes/module/srfi/srfi-13.mes (string-index): Accept a charset as a
	predicate.

	core: Add 'hash-remove!'.
	* src/hash.c (hash_remove_x): New procedure.
	* include/mes/builtins.h: Declare it.
	* src/builtins.c (mes_builtins): Add it.

	core: Add 'close-port'.
	* src/mescc-posix.c (close_port): New procedure.
	* include/mes/mescc-builtins.h: Declare it.
	* src/mescc-builtins.c: Initialize it.
	* mes/module/mes/boot-5.scm (close-port): Only shadow 'close-port'
	if it is not already defined.

	core: Add 'primitive-exit'.
	* src/posix.c (primitive_exit): New procedure.
	* include/mes/builtins.h (primitive_exit): Declare it.
	* src/builtins.c (mes_builtins): Add it.

	core: Add 'pipe'.
	* include/unistd.h (pipe): New declaration.
	* src/mescc-posix.c (pipe_): New procedure.
	* include/mes/mescc-builtins.h: Declare it.
	* src/mescc-builtins.c: Initialize it.

	lib: Move 'pipe' to plain libc.
	* lib/stub/pipe.c: New file.
	* build-aux/configure-lib.sh
	(libc_gnu_SOURCES) [$mes_kernel = linux]: Move 'lib/linux/pipe.c'...
	(libc_SOURCES) [$mes_kernel = linux]: ...here.
	(libc_SOURCES) [$mes_kernel = gnu]: Add 'lib/stub/pipe.c'.
	* simple.sh: Add 'lib/linux/pipe.c' to the Mes C lib build.

	mes: srfi-13: Add 'string-count'.
	* mes/module/srfi/srfi-13.mes (string-count): New procedure.

	mes: srfi-13: Allow charsets in 'string-delete'.
	* mes/module/srfi/srfi-13.mes (string-delete): Accept a charset as a
	predicate.

	mes: srfi-13: Add 'string<'.
	* mes/module/srfi/srfi-13.mes (string<): New procedure.

	mes: srfi-13: Support ranges in 'string-contains'.
	* mes/module/srfi/srfi-13.mes (string=): Compare without
	copying (i.e., no 'substring').
	(string-contains): Support range parameters; reimplement using
	'string='.

	mes: scm: Fix '<=' and '>='.
	* mes/module/mes/scm.mes (<=): Reimplement to fix the semantics when
	given multiple arguments.
	(>=): Likewise.

	mes: match: Improve ellipsis hygiene.
	* mes/module/mes/match.scm (match-gen-ellipses/no-trail): New
	syntax.
	(match-gen-ellipses): Use it instead of a bare template for the "no
	trail" case.
	(match-extract-vars/main): New syntax.
	(match-extract-vars): Use it for the "main" case.

	mes: srfi-1: Add 'drop'.
	* mes/module/srfi/srfi-1.scm (drop): New procedure.

	mes: match: Improve hygiene.
	* mes/module/mes/match.scm (match-two/field): New syntax.
	(match-two/singleton): New syntax.
	(match-two/pair): New syntax.
	(match-two/symbol): New syntax.
	(match-two): Replace some 'syntax-rules' templates with calls to the
	corresponding new syntax.
	* tests/match.test: Add a test.
	* tests/syntax.test: Add an xfail test showing the root problem.

	mes: Beef up 'string-trim' and friends.
	* mes/module/srfi/srfi-13.mes (char-pred->pred): New procedure.
	(string-trim): Accept characters and character sets as predicates,
	and accept 'start' and 'end' arguments.
	(string-trim-right): Likewise.
	(string-trim-both): Likewise.

	core: Fix a call-with-values bug.
	* src/eval-apply.c (eval-apply): If the producer thunk returns one
	value (without a call to 'values'), ensure that only one argument is
	passed to the consumer procedure.
	* tests/cwv.test: Add a test.

	mes: Add a stub for '(ice-9 i18n)'.
	* mes/module/ice-9/i18n.scm: New file.

	mes: Allow ranges for some string procedures.
	* mes/module/mes/scm.mes (string-prefix?): Accept optional 'start'
	and 'end' arguments.
	(string-suffix?): Likewise.
	* mes/module/srfi/srfi-13.mes (string-index): Handle the 'start' and
	'end' arguments.
	(string-rindex): Likewise.

	mes: Add '(ice-9 ftw)'.
	* mes/module/ice-9/ftw.scm: New file.

	core: Add 'openddir', 'closedir', and 'readdir'.
	* src/mescc-posix.c (opendir_): New function.
	(closedir_): New function.
	(readdir_): New function.
	* include/mes/mescc-builtins.h (opendir_, closedir_)
	(readdir_): Declare them.
	* src/mescc-builtins.c: Initialize them.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	lib: Move directory reading to plain libc.
	This change moves the closure of "opendir", "closedir", and
	"readdir" from "libc+gnu" to "libc".

	* lib/dirent/readdir.c: Move this...
	* lib/linux/readdir.c: ...here.
	* lib/stub/fnctl.c: New file.
	* lib/stub/fstat.c: New file.
	* lib/stub/readdir.c: New file.
	* build-aux/configure-lib.sh (libc_gnu_SOURCES): Remove
	'lib/dirent/readdir.c'; move 'lib/dirent/__getdirentries.c',
	'lib/dirent/closedir.c', and 'lib/dirent/opendir.c'...
	(libc_SOURCES): ...here.
	(libc_gnu_SOURCES)[$mes_kernel = linux]: Move 'lib/linux/fnctl.c',
	'lib/linux/fstat.c', 'lib/linux/getdents.c'...
	(libc_SOURCES)[$mes_kernel = linux]: ...here.
	(lib_tcc_SOURCES): Move 'lib/stdlib/calloc.c'...
	(libc_SOURCES): ...here.
	(libc_tcc_SOURCES)[$mes_kernel = linux]: Move 'lib/linux/close.c'...
	(libc_SOURCES)[$mes_kernel = linux]: ...here.
	(libc_tcc_SOURCES)[$mes_kernel = gnu]: Move 'lib/stub/close.c'...
	(libc_SOURCES)[$mes_kernel = gnu]: ...here.
	(libc_SOURCES)[$mes_kernel = gnu]: Add 'lib/stub/fnctl.c',
	'lib/stub/fstat.c', and 'lib/stub/readdir.c'.
	(libc_SOURCES)[$mes_kernel = linux]: Add 'lib/linux/readdir.c'.
	* simple.sh: Add 'lib/dirent/__getdirentries.c',
	'lib/dirent/opendir.c', 'lib/dirent/closedir.c',
	'lib/stdlib/calloc.c', 'lib/linux/close.c', 'lib/linux/fcntl.c',
	'lib/linux/fstat.c', 'lib/linux/getdents.c', and
	'lib/linux/readdir.c' to the Mes C lib build.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: Try to avoid module name collisions.
	The old version of the Guile module system we use puts modules and
	variables in the same namespace.  This can cause collisions if you
	have two modules: "(a)" and "(a eval)".  When resolving "(a eval)",
	the module system looks up the name "eval" in the module "(a)",
	which is bound to the core "eval" procedure.  It then assumes it is
	a module and crashes.  This change sprinkles some "module?" guards
	around to avoid this problem.

	* mes/module/mes/guile-module.mes (make-modules-in): Shadow an
	existing name if it is not bound to a module.
	(resolve-module): Check that 'nested-ref' actually returned a
	module.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	core: Fix variable resolution during expansion.
	* src/eval-apply.c (eval_apply): Ensure that top-level procedure
	definitions are bound in the current module before expansion.
	* tests/base.test: Add a test for nested defines.

	core: Add 'execle'.
	* src/mes.c (__execle_c_env): New variable.
	* include/mes/mes.h (__execle_c_env): Declare it.
	* src/posix.c (execle): New function.
	* include/mes/builtins.h (execle): Declare it.
	* src/builtins.c (mes_builtins): Add it (as 'core:execle').
	* mes/module/mes/posix.mes (execle): New procedure.

	mes: Enable match-let.
	* mes/module/mes/match.scm (match-let/helper): Uncomment and rename
	the 'let' metavariable to '%let' throughout.

	mes: Fix 'hash-fold'.
	* mes/module/mes/scm.mes (hash-fold): Do not cons the result of
	'proc' to 'acc'.

	mes: srfi-1: Add 'drop-while'.
	* mes/module/srfi/srfi-1.scm (drop-while): New procedure.

	mes: Support vectors in syntax-rules.
	* mes/module/mes/syntax.scm (syntax-rules): Support vectors in
	patterns and templates.

	core: Add 'environ'.
	* src/mescc-posix.c (environ_): New function.
	* include/mes/mescc-builtins.h (environ_): Declare it.
	* src/mescc-builtins.c: Initialize it.

	core: Add 'getpid'.
	* src/mescc-posix.c: New file.
	* src/posix.c: Include it.
	* include/mes/mescc-builtins.h: New file.
	* include/mes/builtins.h: Include it.
	* src/mescc-builtins.c: New file.
	* src/builtins.c: Include it.

	mes: Add '(ice-9 receive)'.
	* mes/module/ice-9/receive.scm: New file.

	mes: Add srfi-11.
	* mes/module/srfi/srfi-11.scm: New file.
	* AUTHORS: Note that it comes from Guile.

	mes: srfi-1: Add 'partition'.
	* mes/module/srfi/srfi-1.scm (partition): New procedure.

	mes: srfi-14: Add some missing pieces.
	* mes/module/srfi/srfi-14.scm (char-set:ascii): New variable.
	(char-set:letter+digit): New variable.
	(char-set:letter): New variable.
	(char-set:blank): New variable.
	(char-set:punctuation): New variable.
	(char-set:symbol): New variable.
	(char-set-complement!): New procedure.
	(char-set-union): New procedure.
	(char-set-intersection): New procedure.
	(char-set-difference): New procedure.
	(char-set:graphic): New variable.

	mes: lalr: Add proper module.
	* mes/module/system/base/lalr.scm: New file.

2023-12-02  Janneke Nieuwenhuizen  <janneke@gnu.org>

	core: assert_type.
	* src/lib.c (assert_type): New function.
	* include/mes/mes.h (assert_type): Declare it.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	core: Add a C-only module lookup fast path.
	* include/mes/constants.h (MODULE_OBARRAY): New constant.
	(MODULE_USES): New constant.
	(MODULE_BINDER): New constant.
	* src/module.c (standard-eval-closure): New function.
	(standard_interface_eval_closure): New function.
	(module_make_local_var_x): New function.
	(module_variable): New function.
	(cuurent_module_variable): Use the new functions for lookup if the
	current module's eval-closure is one of two special symbols.
	* include/mes/mes.h: Declare new functions.
	* include/mes/symbols.h (cell_symbol_standard_eval_closure): New
	variable.
	(cell_symbol_standard_interface_eval_closure): New variable.
	(SYMBOL_MAX): Adjust accordingly.
	* src/symbol.c (init_symbols_): Initialize the new symbols.
	* mes/module/mes/guile-module.mes (standard-eval-closure)
	(standard-interface-eval-closure): Return a designated symbol
	instead of an actual closure.

2023-12-02  Janneke Nieuwenhuizen  <janneke@gnu.org>
	    Timothy Sample  <samplet@ngyro.com>.

	mescc: Support running on Mes with modules.
	* scripts/mescc.scm.in: Check if the module system is booted and if
	so, use it to load MesCC code.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: boot-5: Add 'last' and 'close-port'.
	* mes/module/mes/boot-5.scm (last): New procedure.
	(close-port): New procedure.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: Bump default arena size.
	Nobody likes it when the Scheme stack gets corrupted!

	* src/gc.c (gc_init)[!__M2_PLANET__]: Set ARENA_SIZE to 2400000.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: misc: Remove 'guile?' and 'mes?'.
	This fixes/resurrects MES=guile ./pre-inst-env mescc

	* module/mes/misc.scm (guile?): Remove variable.
	(mes?): Remove variable.
	* module/mescc/mescc.scm: Include (mes mes-0).

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: nyacc lang c99 pprint: Make a proper module.
	This converts the existing Mes shim into a proper module.

	* mes/module/nyacc/lang/c99/pprint.scm: New file.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: guile: Add placeholder.
	* mes/module/mes/guile.scm: New file.

	mes: nyacc compat18: Add placeholder.
	* mes/module/nyacc/compat18.scm: New file.

	mescc: preprocess: Remove cond-expand.
	* module/mescc/preprocess.scm: Remove the special case for Mes when
	calling 'insert-progress-monitors'.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: ice-9 getopt-long: Add as an alias.
	This just re-exports symbols from '(mes getopt-long)'.

	* mes/module/ice-9/getopt-long.scm: New file.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: pretty-print: Move to 'ice-9'.
	* mes/module/mes/pretty-print.scm: Rename this...
	* mes/module/ice-9/pretty-print.scm: ...to this.
	* mes/module/mes/pretty-print.mes: Adjust accordingly.
	* AUTHORS: Likewise.

	mes: reader: Support "#\nl" and "#\np".
	* src/reader.c (reader_read_character): Handle the "nl" and "np"
	character names.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mes: sxml fold: Add placeholder.
	* mes/module/sxml/fold.scm: New file.

	mes: srfi-2: Add placeholder.
	* mes/module/srfi/srfi-2.scm: New file.

	mes: ice-9 popen: Add placeholder.
	* mes/module/ice-9/popen.scm: New file.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	tests: Adjust to work with Guile modules.
	* tests/base.test: Do not override 'MES_BOOT' if already set.
	[mes]: Only load "test.scm" if the module system is not booted.
	(lookup-toplevel): Use 'module-variable' if the module system is
	booted.
	* tests/match.test: Import '(ice-9 match)' directly.
	* tests/boot.test: Do not override 'MES_BOOT' if already set.
	* tests/guile-module.test: Likewise.
	* tests/macro.test: Likewise.
	* tests/perform.test: Likewise.
	* tests/quasiquote.test: Likewise.
	* tests/read.test: Likewise.
	* tests/scm.test: Likewise.
	* tests/srfi-0.test: Likewise.
	* tests/srfi-9.test: Likewise.

	mes: srfi-9 gnu: Make a proper module.
	* mes/module/srfi/srfi-9/gnu.scm: New file.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mes: srfi-43: Make a proper module.
	* mes/module/srfi/srfi-43.scm: New file.

	mes: srfi-14: Make a proper module.
	* mes/module/srfi/srfi-14.scm: New file.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: match: Make a proper module.
	* mes/module/ice-9/match.scm: New file.

	mes: Remove SRFI 1 from boot-4.
	* mes/module/mes/boot-0.scm: Do not import 'srfi-1'.
	* mes/module/mes/boot-5.scm: Likewise.
	* mes/module/srfi/srfi-1.scm: Adjust exports accordingly.
	* mes/module/mes/scm.mes (hash-fold): Rewrite avoiding 'fold'.
	* mes/module/mes/guile-module.mes (reverse): New procedure.
	(reverse!): New procedure.

	mes: main: Make a proper module.
	* mes/module/mes/main.scm: New file.
	* mes/module/mes/boot-5.scm: Use it as a module.

	mes: repl: Make a proper module.
	* mes/module/mes/repl.scm: New file.

	mes: optargs: Adjust for new module system.
	* module/mes/optargs.scm: Move this...
	* mes/module/ice-9/optargs.scm: ...here with minor adjustments.
	* mes/module/mes/optargs.mes: Adjust accordingly.
	* tests/optargs.test: Adjust accordingly.
	* mes/module/mes/boot-5.scm: Add '(mes syntax)' to the root module.
	* mes/modules/system/base/pmatch.scm: Export 'pmatch' using
	'#:replace'.

	mes: srfi-9: Make a proper module.
	* mes/module/srfi/srfi-9.scm: New file.

2023-12-02  Timothy Sample  <samplet@ngyro.com>
	    Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mes: srfi-1: Make a proper module.
	* mes/module/srfi/srfi-1.scm: Move this...
	* mes/module/srfi/srfi-1-guile.scm: ...here.
	* mes/module/srfi/srfi-1.mes: Update accordingly.
	* AUTHORS: Likewise.
	* mes/module/srfi/srfi-1.scm: New file.

	mes: Add a Mes-specific 'mes-0' module.
	* mes/module/mes/mes-0.scm: New file.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: boot-03: Define '@' and '@@'.
	* mes/module/mes/boot-03.scm (@, @@): New macros.
	* mes/module/mes/boot-0.scm (@, @@): New macros.
	* mes/module/mes/boot-5.scm (@, @@): New macros.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: check-boot.sh: Allow overriding of TESTS.
	* build-aux/check-boot.sh (TESTS): Rename to...
	(boot_tests): ...this.
	(TESTS): Use boot_tests as fall-back.
	(XFAIL_TESTS): Use empty as fall-back.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: Add Guile-style module support.
	This change adds support for Guile-style modules, but does not
	enable it by default.  It can be enabled by using the 'boot-5' boot
	script.

	* mes/module/mes/guile-module.mes: New file.
	* mes/module/mes/boot-5.mes: New file.
	* mes/module/mes/boot-0.mes (effective-version, include-from-path)
	(define-module, use-modules, effective-version): Move these...
	* mes/module/mes/guile.scm: ...here.
	* mes/module/mes/boot-0.mes: Move '%main' and the command-line
	interface code...
	* mes/module/mes/main.mes: ...to this new file.
	* mes/module/mes/boot-0.mes: Import '(mes guile)' and '(mes main)'.
	* mes/module/ice-9/rdelim.scm: New file.
	* tests/data/bar.scm: New file.
	* tests/data/foo.scm: New file.
	* tests/guile-module.test: New file.
	* build-aux/check-mes.sh (TESTS): Add it.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	core: Add the 'make-binding' builtin.
	* src/eval-apply.c (make_binding): New function.
	* include/mes/builtins.h (make_binding): Declare it.
	* src/builtins.c (mes_builtins): Register it.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	mes: Use a hash table for fluids.
	If 'make-fluid' is a macro that calls 'gensym' directly, any attempt
	to wrap 'make-fluid' will result in only one symbol being produced
	at expansion time.

	* mes/module/mes/fluids.mes (make-fluid): Rewrite to generate a
	symbol at evaluation time, and use that symbol as a key for a hash
	table.
	(fluid?, fluid-ref, fluid-set!): Adjust accordingly.
	(with-fluid*, with-fluids): Use 'fluid-ref' instead of applying a
	fluid directly.
	* tests/fluids.test: Add test.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	core: Bind all free variables during expansion.
	* src/eval-apply.c (expand_variable_): Process internal definitions
	as local variables; ensure all free variables are bound (creating
	bindings if necessary).
	(eval_apply): When evaluating a pair with a binding in its car,
	evaluate the binding before dispatching; when evaluating a binding,
	raise an error if the location does not have a value.
	* src/mes.c (mes_environment): Bind special symbols to themselves.
	* mes/module/mes/boot-0.scm (defined?): Make sure the variable
	actually has a value.
	* mes/module/mes/boot-00.scm (defined?): Likewise.
	* mes/module/mes/boot-01.scm (defined?): Likewise.
	* mes/module/mes/boot-02.scm (defined?): Likewise.
	* mes/module/mes/boot-03.scm (defined?): Likewise.
	* scaffold/boot/60-let-syntax-expanded.scm (defined?): Likewise.

	core: Fix continuations.
	* src/eval-apply.c: Do not add a frame to the GC stack while making
	a continuation.
	* mes/module/mes/catch.mes (catch): Remove workaround.
	* tests/boot.test: Add test.

	core: set!: Check for undefined variables.
	* src/eval-apply.c (set_x): Add the 'define_p' argument and if it is
	not set, signal an error on an undefined variable.
	(eval_apply): When evaluating 'set-x!' forms, leave 'define_p'
	unset; when evaluating 'define' forms, set 'define_p'.
	* include/mes/mes.h (set_x): Adjust declaration accordingly.

2023-12-02  Timothy Sample  <samplet@ngyro.com>
	    Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Make symbol lookup extensible.
	* src/module.c (set_current_module): New function.
	(module_variable): Remove function.
	(module_define_x): Remove function.
	(current_module_variable): New function.
	* src/eval-apply.c (lookup_binding): Replace 'module_variable' with
	'current_module_variable'; add the 'define_p' argument.
	(set_x): Adjust for 'define_p'.
	(lookup_value): Likewise.
	(expand_variable_): Likewise.
	(eval_apply): When evaluating defines, replace 'module_define_x' with
	'lookup_binding' with 'define_p' set.
	* src/gc.c (gc_init)[!__M2_PLANET__]: Double ARENA_SIZE.
	* include/mes/constants.h (MODULE_EVAL_CLOSURE): New constant.
	* include/mes/mes.h (current_module_variable): New declaration.
	(current_module_define_x): New declaration.
	* include/mes/builtins.h (set_current_module): New declaration.
	(lookup_binding): Declare the 'define_p' argument.
	(module_variable): Remove declaration.
	(module_define_x): Remove declaration.
	* src/builtins.c (mes_builtins): Register 'set-current-module';
	remove 'module-variable' and 'module-define!'.
	* mes/module/boot-0.scm (defined?): Do not use 'module-variable'.
	* mes/module/boot-00.scm (defined?): Likewise.
	* mes/module/boot-01.scm (defined?): Likewise.
	* mes/module/boot-02.scm (defined?): Likewise.
	* mes/module/boot-03.scm (defined?): Likewise.
	* scaffold/boot/60-let-syntax-expanded.scm (defined?): Likewise.
	* mes/module/mes/fluids.mes (make-fluid): Do not use
	'module-define!', and wrap fluids in a variable record.
	* tests/macro.test (make-fluid): Likewise.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	core: Do not hold pointers during variable lookup.
	If we want to make variable lookup extensible, we need to call into
	Scheme code during lookup.  This might cause the garbage collector
	to run, invalidating any pointer held by C code.  This change
	updates call sites for variable lookup to avoid holding pointers
	into Scheme data.

	* src/eval-apply.c (expand_variable_): Store expressions and formals
	in GC-managed registers.
	(expand_variable): Initialize registers for 'expand_variable_'.
	(eval_apply): When evaluating 'define' and 'define-macro' forms, do
	not rely on local C variables after calls to 'lookup_binding' or
	'expand_variable'.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	core: Make 'primitive-load' a builtin.
	In addition to simplifying the interpreter, this change ensures that
	'primitive-load' evaluates the loaded file in the top level
	environment.

	* include/mes/symbols.h (cell_symbol_primitive_load): Remove
	variable.
	(cell_vm_begin_primitive_load): Remove variable.
	(cell_vm_begin_expand_primitive_load): Remove variable.
	(SYMBOL_MAX, CELL_SYMBOL_RECORD_TYPE): Adjust accordingly.
	* src/symbol.c (init_symbols): Do not initialize removed variables.
	* src/eval-apply.c (eval_apply): Remove primitive load code.
	(primitive_load): New function.
	* include/mes/builtins.h (primitive_load): Declare it.
	* src/builtins.c (mes_builtins): Initialize it.
	* mes/module/mes/boot-03.scm: Remove duplicate call to
	'primitive-load'.
	* mes/module/mes/boot-0.scm: Adjust how scripts are read; adjust how
	the "--main" option is handled.
	* tests/base/test.test: Add a test.
	* tests/data/load.scm: Set the 'toplevel?' variable to support the
	new test.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	core: Fix internal define bug.
	* src/eval-apply.c (eval_apply): When evaluating 'define', recompute
	the 'global_p' and 'local_p' flags; when evaluating a local
	definition, set the closure directly instead of using 'set_x'.
	* tests/base.test: Add a test.

	srfi-9: Fix record printing.
	* mes/module/srfi/srfi-9-struct.mes (print-record-type): New
	procedure.
	(make-record-type): Add 'printer' as new record type field and use
	'print-record-type' as the struct printer.
	(record-type-printer): New procedure.
	(record-type-fields): Bump index for the 'printer' field.
	(record-constructor): Use the record type printer as the struct
	printer if it is defined.
	(record-printer): Print the record type name instead of the raw
	record type.

	tests: Fix tests to run on Guile.
	* scaffold/boot/17-open-input-string.scm: Test 'current-module' to
	see if we can lookup 'read-string' in a module.
	* scaffold/boot/gc.scm: Skip all tests on Guile.
	* tests/gc.test: Rename 'mes?' to 'mes-core?'; use 'current-module'
	to check if we need to use core Mes procedures; and adjust all tests
	accordingly.
	* tests/scm.test (iota -1): Skip on Guile.
	* tests/vector.test (make-vector): Adjust for Guile.

	core: Add an 'M1' register for the current module.
	* include/mes/mes.h (M1): New variable.
	* src/mes.c (main): Initialize it.
	* src/gc.c (gc_flip): Account for it.
	(gc_): Copy it.
	(gc_dump_state): Dump it.
	* src/test/gc.c (test_setup, main): Initialize it.
	* src/module.c (current_module): New function.
	* src/builtiins.c (mes_builtins): Register it as 'current-module'.
	* include/mes/builtins.h (current_module): Declare it.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	core: Rename the 'current-module' symbol.
	This change renames 'current-module' to 'current-environment'.  This
	will make way for 'current-module' to actually be a module.

	* include/mes/symbols.h (cell_symbol_current_module): Rename this...
	(cell_symbol_current_environment): ...to this.
	* src/eval-apply.c: Adjust accordingly.
	* src/symbol.c: Adjust accordingly, and update the Scheme name to
	'current-environment'.
	* mes/module/mes/base.mes: Adjust accordingly.
	* mes/module/mes/boot-0.scm: Adjust accordingly.
	* mes/module/mes/boot-00.scm: Adjust accordingly.
	* mes/module/mes/boot-01.scm: Adjust accordingly.
	* mes/module/mes/boot-02.scm: Adjust accordingly.
	* mes/module/mes/boot-03.scm: Adjust accordingly.
	* mes/module/mes/display.mes: Adjust accordingly.
	* mes/module/mes/module.mes: Adjust accordingly.
	* mes/module/mes/psyntax-0.mes: Adjust accordingly.
	* mes/module/mes/repl.mes: Adjust accordingly.
	* mes/module/mes/scm.mes: Adjust accordingly.
	* mes/module/srfi/srfi-16.scm: Adjust accordingly.
	* mes/module/srfi/srfi-26.scm: Adjust accordingly.
	* module/mescc/compile.scm: Adjust accordingly.
	* scaffold/boot/17-open-input-string.scm: Adjust accordingly.
	* scaffold/boot/4c-quasiquote.scm: Adjust accordingly.
	* scaffold/boot/4f-string-split.scm: Adjust accordingly.
	* scaffold/boot/50-make-string.scm: Adjust accordingly.
	* scaffold/boot/50-string-join.scm: Adjust accordingly.
	* scaffold/boot/51-module.scm: Adjust accordingly.
	* scaffold/boot/52-define-module.scm: Adjust accordingly.
	* scaffold/boot/60-let-syntax-expanded.scm: Adjust accordingly.
	* scaffold/boot/60-let-syntax.scm: Adjust accordingly.
	* scaffold/gc.scm: Adjust accordingly.
	* tests/gc.test: Adjust accordingly.
	* tests/psyntax.test: Adjust accordingly.

2023-12-02  Timothy Sample  <samplet@ngyro.com>
	    Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Remove '<module>' type.
	This change removes the internal '<module>' record type, and changes
	the initial module to be a plain hash table.

	* src/symbol.c (init_symbols_): Remove 'cell_symbol_module'.
	* include/mes/symbols.h (cell_symbol_module): Remove declaration.
	(CELL_SYMBOL_MAX, CELL_SYMBOL_RECORD_TYPE): Adjust accordingly.
	* src/module.c (make_initial_module): Use a raw hash table instead
	of a struct.
	(module_variable, module_define_x): Adjust accordingly.
	(make_module_type, module_printer): Remove functions.
	* src/builtins.c (mes_builtins): Do not register them.
	* include/mes/builtins.h (make_module_type, module_printer): Remove
	declarations.
	* src/eval-apply.c (eval_apply): Replace 'module_printer' with
	'hash_table_printer'.
	* src/mes.c (main): Likewise, and initialize 'R0' after calling
	'make_initial_module'.

2023-12-02  Janneke Nieuwenhuizen  <janneke@gnu.org>

	simple.sh: Bump arena.
	* simple.sh (MES_MAX_ARENA): Bump to 20000.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	core: Use variables for modules.
	This change introduces a 'lexical?' field for bindings (called
	'lexical_p' and stored in the cdr of the binding cell).  Non-lexical
	bindings handle variables transparently, while lexical bindings do
	not.

	* src/module.c (module_define_x): Wrap value in a variable.
	* include/mes/mes.h (scm): Add 'lexical_p' to the cdr union.
	(set_x): New declaration.
	* src/eval-apply.c (make_binding_): Add a 'lexical_p' argument.
	(lookup_handle): Remove function.
	(lookup_binding): Add function.
	(lookup_value): Use 'lookup_binding' and return the contents of
	variables that are not bound lexically.
	(set_env_x): Remove function.
	(set_x): New function.
	(expand_variable_): Use 'lookup_binding' in place of
	'lookup_handle'.
	(eval_apply): Likewise; use 'set_x' in place of 'set_env_x'; and
	when evaluating a binding, return the contents of variables that are
	not bound lexically.
	* include/mes/builtins.h (set_env_x): Remove declaration.
	* src/builtins.c (mes_builtins): Do not register 'set-env!'.
	* scaffold/boot/53-closure-display.scm (closure)[mes]: Rewrite to
	avoid 'module-variable'.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	core: Implement Guile-style variables.
	* src/variable.c: New file.
	* simple.make (LIBMES_SOURCES): Add it.
	* simple.sh: Add it.
	* build-aux/configure-lib.sh (mes_SOURCES): Add it.
	* build-aux/snarf.sh: Snarf it.
	* kaem.run: Compile it.
	* include/mes/builtins.h (make_variable): New function.
	(variable_p): New function.
	(variable_ref): New function.
	(variable_set_x): New function.
	(variable_printer): New function.
	* src/builtins.c (mes_builtins): Register them.
	* include/mes/mes.h (make_variable_type): New function.
	(scm_variable_type): New variable.
	* src/module.c (make_initial_module): Initialize it.
	* src/gc.c (gc_flip, gc_): Keep track of it.
	* include/mes/symbols.h (cell_symbol_variable): New variable.
	(SYMBOL_MAX): Adjust accordingly.
	* src/symbol.c (init_symbols): Initialize 'cell_symbol_variable'.
	* mes/module/mes/scm.mes (make-undefined-variable): New procedure.
	(variable-bound?): New procedure.
	* tests/variable.test: New file.
	* build-aux/check-mes.sh (TESTS): Add it.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Replace special cell_boot_module with initial-module builtin.
	* src/module.c (initial_module): New builtin.
	* include/mes/builtins.h: Declare it.
	* src/builtins.c (mes_builtins): Register it.
	* include/mes/symbols.h (cell_boot_module): Remove.
	* src/symbol.c (init_symbols_): Update.
	(init_symbols): Likewise.
	* src/eval-apply.c (eval_apply): Likewise.
	(expand_variable_): Likewise.
	* tests/macro.test (make-fluid): Likewise.
	* mes/module/mes/fluids.mes (make-fluid):  Likewise.

2023-12-02  Timothy Sample  <samplet@ngyro.com>
	    Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Refactor name resolution.
	* src/module.c (module_variable): Do not search local bindings.
	(module_ref): Remove function.
	* src/eval-apply.c (lookup_handle): New function.
	(lookup_value): New function.
	(set_env_x, expand_variable_, eval_apply): Use 'lookup-handle' and
	'lookup-value' in place of 'module_variable' and 'module_ref'
	respectively.
	* src/core.c (error): Likewise.
	* include/mes/mes.h (lookup_handle, lookup_value): Add declarations.
	* include/mes/builtins.h (module_ref): Remove declaration.
	* src/builtins.c (mes_builtins): Remove "module-ref".

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	core: Fix printing bindings.
	* src/lib.c (car_): Support taking the car of a binding.
	* mes/module/mes/display.mes (display): Do not use 'list->string'
	when displaying a binding.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	core: Rename variable type to binding.
	This change allows us to use "variable" in the Guile sense, which is
	an anonymous box for storing a value.

	* include/mes/constants.h (TVARIABLE): Rename this...
	(TBINDING): ...to this.
	* include/mes/mes.h (scm): Rename the 'variable' field to 'binding'.
	* include/mes/symbols.h (cell_type_variable): Rename this...
	(cell_type_binding): ...to this.
	* src/gc.c (gc_cellcpy, gc_loop, gc_dump_arena): Adjust accordingly.
	* src/eval-apply.c (make_variable_): Rename this...
	(make_binding_): ...to this.
	(set_env_x, expand_variable_, eval_apply): Adjust accordingly.
	* src/symbol.c (init_symbol): Adjust accordingly and rename the
	'<cell:variable>' symbol to '<cell:binding>'.
	* mes/module/mes/type-0.mes (cell:type-alist): Adjust accordingly.
	(variable?): Rename this...
	(binding?): ...to this.
	* src/display.c (display_helper): Adjust accordingly and print
	"binding" instead of "variable".
	* mes/module/mes/display.mes (display): Likewise.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>
	    Timothy Sample  <samplet@ngyro.com>

	core: Add hashq_create_handle_x.
	* src/hash.c (hash_create_handle_x): New function.
	* include/mes/builtins.h: Declare it.
	* src/builtins.c (mes_builtins): Register it.
	* tests/hash.test: Add a test.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mes: Add hash-for-each.
	* mes/module/mes/scm.mes (hash-for-each): New function.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>
	    Timothy Sample  <samplet@ngyro.com>

	core: Add hash_clear!.
	* src/hash.c (hash_clear_x): New builtin.
	* include/mes/builtins.h: Declare it.
	* src/builtins.c (mes_builtins): Register it.
	* tests/hash.test: Add a test.

	core: Add hash-table?.
	* include/mes/mes.h (scm_hash_table_type): New type.
	* src/hash.c (make_hash_table_type): Rename from make_hash_type, and
	initialize it.
	* src/symbol.c (init_symbols): Add it to environment.
	* tests/hash.test: Add a test.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>
	    Timothy Sample  <samplet@ngyro.com>

	core: Allow non-string hash keys.
	This merely allows adding non-string keys to a hash table and puts them
	non-string keys in bucket 0.  Efficiency is lost.  TODO: calculate a
	proper hash.

	* src/hash.c (hash_): Allow non-string keys in bucket 0.
	* tests/hash.test: Add a test.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mes: Resurrect cell:type-name.
	* mes/module/mes/type-0.mes (cell:type-name): Resurrect.

	mes: Add hash-fold.
	* mes/module/mes/scm.mes (hash-fold): New function.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>
	    Timothy Sample  <samplet@ngyro.com>

	core: Add hash-map->list.
	* src/hash.c (hash_buckets): New function.
	* src/builtins.c (mes_builtins): Initialize it.
	* include/mes/builtins.h: Declare it.
	* mes/module/mes/scm.mes (hash-map->list): New procedure.
	* tests/hash.test: Add a test.
	* tests/gc.test: Bump arena size to handle more built-ins.

2023-12-02  Timothy Sample  <samplet@ngyro.com>

	core: Use 'throw' in 'error' unconditionally.
	I don't understand why the guard was there in the first place.
	Hopefully it's no longer needed.

	* src/core.c (error) [__MESC_MES__ || __M2_PLANET__]: Call 'throw'.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Use exceptions instead of asserts.
	* src/lib.c (assert_num, assert_struct, (assert_range): New functions.
	* include/mes/mes.h: Declare them.
	* src/struct.c (struct_ref_): Use them.
	* src/hash.c (make_hash_table): Use assert_number.
	* mes/module/mes/repl.mes (repl): Whitespace fixes.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>
	    Timothy Sample  <samplet@ngyro.com>

	core: hash: Guile interface compatibility.
	* src/hash.c (hashq_get_handle): Remove the dflt argument.
	(hashq_ref): Rename this...
	(hashq_ref_): ...to this, update for hashq_get_handle, and handle
	the dflt argument directly.
	(hash_ref): Rename this...
	(hash_ref_): ...to this, and fix handling of the dflt argument.
	* include/mes/builtins.h: Update accordingly.
	* src/eval-apply.c (macro_get_handle): Update for hashq_get_handle.
	* src/module.c (module_variable): Likewise.
	* src/builtins.c (mes_builtins): Set hashq-get-handle argument count
	to 2; rename hashq-ref to core:hashq-ref; and rename hash-ref to
	core:hash-ref.
	* mes/module/mes/scm.mes (hashq-ref, hash-ref): New procedures.
	* tests/hash.test: Add some tests.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mes: srfi-9: Guile interface compatibility.
	* tests/srfi-9.test: Convert to bootstrap test, do not use
	mes-use-module.
	* mes/module/srfi/srfi-9-vector.mes: Resurrect.

	mes: srfi-9: Guile interface compatibility.
	* mes/module/srfi/srfi-9-struct.mes (record-type): Rename to...
	(record-type-name): ...this.  Update users.
	(record-type-descriptor): New function.
	* mes/module/srfi/srfi-9/gnu-struct.mes (set-field): Update.
	* tests/srfi-9.test ("make-record-type", "record-constructor",
	"record?", "record-predicate", "zero?", "zero-one", "zero-one-set!",
	"record-type-descriptor", "record-type-name", "record-type-fields"):
	New test.

	mes: srfi-9: Guile interface compatibility.
	* mes/module/srfi/srfi-9-struct.mes (record-field-names): Rename to...
	(record-type-fields): ...this.  Update users.
	* mes/module/srfi/srfi-9-vector.mes (record-type-fields): Likewise.
	* mes/module/srfi/srfi-9/gnu-struct.mes (set-field): Update.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>
	    Timothy Sample  <samplet@ngyro.com>

	core: make-hash-table: Fix optional argument.
	* src/hash.c (make_hash_table): Fix optional argument.
	* src/builtins.c (mes_builtins): Update arity.
	* tests/hash.test: New file.
	* build-aux/check-mes.sh (TESTS): Add it.

2023-12-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mes: srfi-9: Guile interface compatibility.
	* mes/module/srfi/srfi-9-struct.mes (record-getter): Rename to...
	(record-accessor): ..this.  Update users.
	* mes/module/srfi/srfi-9-vector.mes (record-setter): Rename to...
	(record-modifier): ..this.  Update users.
	* mes/module/srfi/srfi-9/gnu-struct.mes: Update.

	mes: srfi-9: Guile interface compatibility.
	* mes/module/srfi/srfi-9-struct.mes (record-constructor): Remove name
	argument, make field-names optional.  Update users.
	* mes/module/srfi/srfi-9-vector.mes: Likewise.
	* mes/module/srfi/srfi-9/gnu-struct.mes: Update.

2023-12-02  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Post-release update.
	* build-aux/GNUmakefile.in (--previous-version): Update to 0.25.1.

	doc: Post-release update.
	* build-aux/GNUmakefile.in (--previous-version): Update to 0.25.1.
	* doc/announce/ANNOUNCE-0.25.1: Update checksums.

	guix: mes: Update to 0.25.1.
	* guix/git/mes.scm (mes)[source]: Update to 0.25.1.

	build: Releease 0.25.1.
	* configure (VERSION): Bump to 0.25.1.
	* configure.sh (VERSION): Likewise.
	* doc/announce/ANNOUNCE-0.25.1: New file.

	doc: Update `NEWS'.
	* NEWS (Changes in 0.25.1 since 0.25): New section.

	guix: mescc-tools: Update to 1.5.2.
	* guix/git/mes.scm (mescc-tools): Update to 1.5.2.
	(arguments): Remove `patch-Kaem/test.sh' phase.

2023-11-27  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Resurrect --srcdir check.
	* scaffold/boot/50-primitive-load.scm (guile): Cater for --srcdir build.
	* build-aux/check-boot.sh: Include config.sh only once.
	* build-aux/check-mescc.sh: Likewise.
	* build-aux/check-mes.sh: Likewise.  Also extend GUILE_LOAD_PATH for
	--srcdir build.
	* build-aux/check.sh.in: Set AM_CPPFLAGS.
	* tests/base.test,
	tests/boot.test,
	tests/macro.test,
	tests/perform.test,
	tests/quasiquote.test,
	tests/scm.test: Prepend "srcdest" environment variable before for
	includes.

	build: Support --srcdir build for kaem too.
	* build-aux/bootstrap.sh.in,
	build-aux/build.sh.in: Add ${srcdest} for kaem scripts.
	* kaem.run,
	scaffold/argv.kaem,
	scaffold/env.kaem,
	scaffold/global-array.kaem,
	scaffold/hello.kaem,
	scaffold/local-array.kaem,
	scaffold/local-static-array.kaem,
	scaffold/main.kaem,
	scaffold/read.kaem: Add ${srcdest} for includes.

2023-11-25  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Resurrect --srcdir build.
	* build-aux/GNUmakefile.in (doc/mes.info): Fix images directory part.
	(doc/images/%.eps): Create output directory.
	(doc/images/%.pdf): Likewise.
	(doc/images/%.png): Likewise.
	* build-aux/build.sh.in: Skip bootstrap/kaem build for --srcdir build.
	Unconditionally prepend "../" to $srcdest, $srcdir.
	* build-aux/cc.sh (compile): Avoid using '..' in for --srcdir build.
	* build-aux/pre-inst-env.in (GUILE_LOAD_PATH): Add ${srcdest}.

2023-11-23  Janneke Nieuwenhuizen  <janneke@gnu.org>

	doc: Update `AUTHORS'.
	* AUTHORS: Mention Ekaitz and their work on riscv.

2023-11-23  Timothy Sample  <samplet@ngyro.com>

	build: Only build tcc-lib if tcc sources exist.
	This is a follow-up to commit
	    0d3c4ddc4bcb57db690ee8ebab106fa6fda75823
	    build: Add support for TCC in RISC-V.

	* build-aux/bootstrap.sh.in: Only build tcc-lib if tcc sources
	exist.

2023-11-23  Timothy Sample  <samplet@ngyro.com>

	lib: Do not define '__raise' if it is a macro.
	See 0e31ee6ef0c285740ff89f99ecef6cd24da3f6bc.

	* lib/stub/__raise.c (__raise): Do not define the function if it is
	already a macro.

2023-11-25  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Also clean stage0 output.
	* build-aux/GNUmakefile.in (clean): Remove m2/ and stage0 output in
	scaffold/.

	build: Build web documentation in doc dir.
	* build-aux/GNUmakefile.in (doc/mes.dvi, doc/mes.pdf, doc/mes.ps):
	Invoke makeinfo in doc dir.
	(web): Invoke gendocs.sh in doc dir.
	(clean): Update accordingly.
	.gitignore: Update accordingly.

2023-11-13  Vagrant Cascadian  <vagrant@debian.org>
	    Janneke Nieuwenhuizen  <janneke@gnu.org>.

	build: Fix clean targets.
	* build-aux/GNUmakefile.in (clean): Remove bin/mes-m2, gcc-lib,
	mescc-lib, and tcc-lib build directories altogether.  Remove
	doc/mes.fls, doc/mes.info, doc/mes.{dvi,pdf,ps}, doc/version.texi.
	Remove doc/web/ directory altogether.
	(distclean): Remove pre-inst-env, include/arch.
	* .gitignore: Ignore /mes.fls.

2023-11-11  Janneke Nieuwenhuizen  <janneke@gnu.org>

	guix: mescc-tools: Build fix for riscv64-linux.
	* gnu/packages/mes.scm (mescc-tools)[source]: Use savannah mirror.
	[arguments]: Update to gexps.  Add
	patch-Kaem/test.sh phase to fix shebang for riscv64-linux/qemu build.

	mes: Fix typo in repl.
	* mes/module/mes/repl.mes (welcome): Remove stray 2022.

2023-11-11  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Post-release update.
	* build-aux/GNUmakefile.in (--previous-version): Update to 0.25.
	* doc/announce/ANNOUNCE-0.25: Run `make sum-announce'.

2023-11-11  Janneke Nieuwenhuizen  <janneke@gnu.org>

	guix: mes: Update to 0.25.
	* guix/git/mes.scm (mes)[source]: Update to 0.25.

2023-11-08  Janneke Nieuwenhuizen  <janneke@gnu.org>

	doc: Update `ROADMAP'.
	* ROADMAP (release 0.x, unsorted): Move done item...
	(DONE): ...here.

2023-11-08  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Release 0.25.
	* configure (VERSION): Bump to 0.25.
	* configure.sh (VERSION): Likewise.
	* mes/module/mes/repl.mes (welcome): Update copyright years.

2023-11-09  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Undo generated ChangeLog change after release.
	* build-aux/GNUmakefile.in (release): Checkout ChangeLog.

2023-07-08  Janneke Nieuwenhuizen  <janneke@gnu.org>

	doc: Add ANNOUNCE-0.25.
	* doc/announce/ANNOUNCE-0.24: Typo.
	* doc/announce/ANNOUNCE-0.25: New file.

	Add .mailmap.
	* .mailmap: New file.

	doc: Update `NEWS'.
	* NEWS (Changes in 0.25 since 0.24.2): New section.

2023-05-02  Janneke Nieuwenhuizen  <janneke@gnu.org>

	doc: Update `AUTHORS'.
	* AUTHORS: Mention RISC-V port.
	* mes/module/mes/repl.mes (welcome): Add Wladimir van der Laan and
	Andrius Štikonas.

2023-07-08  Janneke Nieuwenhuizen  <janneke@gnu.org>

	doc: Update `README'.
	* README: Updates for 0.25.

2023-11-09  Janneke Nieuwenhuizen  <janneke@gnu.org>

	lib: Fix typo in comment.
	* lib/libtcc1.c: Use __TINYC__.

2023-11-05  Ekaitz Zarraga  <ekaitz@elenq.tech>

	build: Add support for TCC in RISC-V.
	For RISC-V TCC needs a modified libc because it doesn't support Extended
	Assembly. This change enables that kind of behavior, letting us select
	the TCC library when it is present.

	* build-aux/bootstrap.sh.in: Add a block to build-source-lib for TCC.
	* build-aux/configure-lib.sh: Guard TCC to remove repeated definitions
	from its libc.
	* build-aux/install.sh.in: Make it install TCC's library, too

2023-11-06  Andrius Štikonas  <andrius@stikonas.eu>

	lib: Fixup for RISC-V64 setjmp for TCC, GNUC.
	* include/setjmp.h (__jmp_buf)[__riscv && (__GNUC__ || __TINYCC__)]: Add
	specific declaration.

2023-11-05  Ekaitz Zarraga  <ekaitz@elenq.tech>

	lib: Add missing (empty) crt files for RISC-V.
	These are needed by the build scripts, but in RISC-V being empty is
	enough.

	* lib/linux/riscv64-mes-gcc/crti.c,
	lib/linux/riscv64-mes-gcc/crtn.c,
	lib/linux/riscv64-mes-tcc/crti.c,
	lib/linux/riscv64-mes-tcc/crtn.c: New files.

2023-11-05  Janneke Nieuwenhuizen  <janneke@gnu.org>

	doc: Bump mescc-tools requirement to 1.5.0.
	* doc/mes.texi (Requirements): Update M2-Planet version to 1.5.0.
	(Bootstrap Requirements): Likewise.
	* INSTALL (Other GNU/Linux): Likewise.

2023-07-08  Janneke Nieuwenhuizen  <janneke@gnu.org>

	doc: Bump M2-Planet requirement to 1.11.0.
	* doc/mes.texi (Requirements): Update M2-Planet version to 1.11.0.
	(Bootstrap Requirements): Likewise.
	* INSTALL (Other GNU/Linux): Likewise.

2023-11-05  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Bump stage0 versions.
	* configure (main): Bump mescc-tools to 1.5.0, m2-planet to 1.11.0.

	guix: m2-planet: Update to 1.11.0.
	* guix/git/mes.scm (m2-planet): Update to 1.11.0.

	guix: mescc-tools: Update to 1.5.0.
	* guix/git/mes.scm (mescc-tools): Update to 1.5.0.

	mescc: Hide assign size ERROR as WARNING behind MESCC_DEBUG.
	* module/mescc/compile.scm (expr->register): Only output inexplicable
	size warning when MESCC_DEBUG environment variable is set.

2023-10-24  Ekaitz Zarraga  <ekaitz@elenq.tech>

	configure.sh: Add 64 bit to RISCV-64.
	* configure.sh: Add 64 bit for mes_cpu == riscv64.

2023-10-25  Andrius Štikonas  <andrius@stikonas.eu>

	lib: Fix va_start macro to work for 64-bit arches.
	* include/stdarg.h (va_start): Fix to point to correct location.

2023-10-18  Ekaitz Zarraga  <ekaitz@elenq.tech>

	test: Move 17-compare-rotated to XFAIL in riscv64.
	* build-aux/check-mescc.sh: Add XFAIL block for riscv64 and add
	17-compare-rotated in it.

2023-10-18  Ekaitz Zarraga  <ekaitz@elenq.tech>

	test: 16-cast.c: Fix for riscv64.
	RISC-V64 has `unsigned char` for `char`, so it failed to build. In amd64
	`char` is `signed char`, so the code wasn't portable.  We have to be
	explicit about the sign of the `char`.

	* lib/test/scaffold/16-cast.c: Add `signed` to `char`.

2023-10-18  Ekaitz Zarraga  <ekaitz@elenq.tech>

	lib: Add setjmp/longjmp for riscv64.
	Note about the -tcc file:

	    HAVE_FLOAT_ASM defines if there's assembly support for float
	    instructions.

	    HAVE_FLOAT defines if there's floating point arithmetic support.

	    This is important for TinyCC because the assembler and the C
	    compiler are split. TinyCC can HAVE_FLOAT but no assembler support
	    for them.

	* lib/riscv64-mes-gcc/setjmp.c,
	lib/riscv64-mes-tcc/setjmp.c: New files.

2023-10-14  Ekaitz Zarraga  <ekaitz@elenq.tech>

	guix: Add riscv64 support.
	* guix/git/mes.scm (mes)[supported-systems]: Add riscv64-linux.
	[native-inputs]: Add riscv64 cross-compiler toolchain.

2023-10-13  Ekaitz Zarraga  <ekaitz@elenq.tech>

	lib: int8_t set to `signed char` instead of `char`.
	`char` signedness is not defined by C standard.  In some architectures
	it's `unsigned` by default (RISC-V), so it's better to be explicit to
	avoid problems.

	* include/stdint.h (int8_t): Use `signed char` instead of `char`.

2023-10-11  Ekaitz Zarraga  <ekaitz@elenq.tech>

	lib: Define va_* for bootstrappable tcc in riscv.
	Bootstrappable TCC needs some extra definitions that upstream TCC
	obtains from `tccdefs.h` in its codebase, which is also injected in the
	binary using a weird trick (see `c2str` in tcc's codebase).

	* include/stdarg.h: Add definitions for variable length arguments.

2023-10-08  Ekaitz Zarraga  <ekaitz@elenq.tech>

	lib: Use GCC compatible stdarg.h for TINYCC.
	* include/stdarg.h: Include __TINYC__ in the GCC style argument control
	via __builtin* family.

2023-10-06  Andrius Štikonas  <andrius@stikonas.eu>

	riscv64: Fix arguments of _start function in tcc.
	* lib/linux/riscv64-mes-tcc/crt1.c (_start): Save and recover stack when
	calling __init_io.

2023-10-06  Andrius Štikonas  <andrius@stikonas.eu>

	riscv64: Simplify assembly constructs not supported by tcc.
	At the moment tcc does not support assembler instructions with C
	expression operands.  As a workaround, read values directly from stack.

	* lib/linux/riscv64-mes-tcc/_exit.c,
	lib/linux/riscv64-mes-tcc/_write.c,
	lib/linux/riscv64-mes-tcc/syscall.c: Use simplified TCC assembly.

2023-09-21  Ekaitz Zarraga  <ekaitz@elenq.tech>

	riscv64: Add support for tcc.
	Adapted from -gcc but make assembly match tcc style assembly where the
	offsets are received as an extra input argument:

	  sw a0, 9(t0)

	Becomes:

	  sw a0, t0, 9

	* lib/linux/riscv64-mes-tcc/_exit.c,
	lib/linux/riscv64-mes-tcc/_write.c,
	lib/linux/riscv64-mes-tcc/crt1.c,
	lib/linux/riscv64-mes-tcc/exit-42.S,
	lib/linux/riscv64-mes-tcc/hello-mes.S,
	lib/linux/riscv64-mes-tcc/syscall-internal.c,
	lib/linux/riscv64-mes-tcc/syscall.c: New files.

2023-09-12  Ekaitz Zarraga  <ekaitz@elenq.tech>

	mescc: Fix switch statements' fallthrough.
	Flattens case structures as nyacc is giving consecutive cases as a
	nested block like:

	    (case testA
	      (case testB
	        (case testC BODY)))

	We convert to:

	    ((case testA (expr-stmt))
	     (case testB (expr-stmt))
	     (case testC BODY))

	And then treat them as independent cases. For the fallthrough we just
	add a jump to each case's body right before its clause (each of the case
	blocks is responsible of adding its own jump to its body):

	        // This doesn't have it because it's the first
	    CASE1:
	        testA
	    CASE1_BODY:

	        goto CASE2_BODY
	    CASE2:
	        testB
	    CASE2_BODY:

	        goto CASE3_BODY
	    CASE3:
	        testB
	    CASE3_BODY:

	This enables complex fallthrough schemes comparing to what was done
	before.

	* module/mescc/compile.scm (ast->info)[switch]{flatten-cases}: New
	variable.
	(ast->info)[switch]{statements}: Use flatten-cases on it.
	(switch->expr): Remove unneeded matchers and add jumps to body.
	* build-aux/check-mescc.sh (xfail-tests): Remove
	lib/tests/scaffold/66-local-char-array.c.

2023-09-11  Ekaitz Zarraga  <ekaitz@elenq.tech>

	lib/tests: Add 44-switch-body-fallthrough-not-default.c.
	This test detects if the fallthrough in a switch statement falls to the
	next case (good) or to the default case (bad).

	* lib/tests/scaffold/44-switch-body-fallthrough-not-default.c: New file.
	* build-aux/check-mescc.sh (mes_tests): Add it.

2023-09-11  Ekaitz Zarraga  <ekaitz@elenq.tech>

	mescc: Add support for signed rotation.
	* module/mescc/compile.scm (expr->register)[rshift, assn-expr]: Add
	signed right-rotation support.
	* lib/arm-mes/arm.M1 (asr): Add instruction.
	* lib/x86-mes/x86.M1 (sar): Add instruction.
	* lib/x86_64-mes/x86_64.M1 (sar): Add instruction.
	* module/mescc/armv4/as.scm (armv4:r0>>r1-signed): New procedure.
	(armv4:instructions): Register it.
	* module/mescc/i386/as.scm (i386:r0>>r1-signed): New procedure.
	(i386:instructions): Register it.
	* module/mescc/riscv64/as.scm (riscv64:r0>>r1-signed): New procedure.
	(riscv64:instructions): Register it.
	* module/mescc/x86_64/as.scm (x86_64:r0>>r1-signed): New procedure.
	(x86_64:instructions): Register it.
	(

2023-09-04  Ekaitz Zarraga  <ekaitz@elenq.tech>

	lib: Make objdump work on binaries in riscv64.
	* lib/linux/riscv64-mes/elf32-header.hex2: Fix header sizes for objdump.

2023-08-27  Janneke Nieuwenhuizen  <janneke@gnu.org>

	Revert "crt1: Move main declaration to mes/lib-mini.h."
	This reverts commit 5b55627e0ccf7c798284a380a20a2eb4d6b9c4c0.

	crt1: Move main declaration to mes/lib-mini.h.
	* include/mes/lib-mini.h (main): New declaration.
	lib/freebsd/x86-mes-gcc/crt1.c (main): Remove declaration.
	lib/freebsd/x86-mes-mescc/crt1.c (main): Remove declaration.
	lib/gnu/x86-mes-gcc/crt1.c (main): Remove declaration.
	lib/linux/arm-mes-gcc/crt1.c (main): Remove declaration.
	lib/linux/arm-mes-m2/crt1.c (main): Remove declaration.
	lib/linux/arm-mes-mescc/crt1.c (main): Remove declaration.
	lib/linux/riscv64-mes-gcc/crt1.c (main): Remove declaration.
	lib/linux/riscv64-mes-m2/crt1.c (main): Remove declaration.
	lib/linux/riscv64-mes-mescc/crt1.c (main): Remove declaration.
	lib/linux/x86-mes-gcc/crt1.c (main): Remove declaration.
	lib/linux/x86-mes-m2/crt1.c (main): Remove declaration.
	lib/linux/x86-mes-mescc/crt1.c (main): Remove declaration.
	lib/linux/x86_64-mes-gcc/crt0.c (main): Remove declaration.
	lib/linux/x86_64-mes-gcc/crt1.c (main): Remove declaration.
	lib/linux/x86_64-mes-m2/crt1.c (main): Remove declaration.
	lib/linux/x86_64-mes-mescc/crt1.c (main): Remove declaration.

2023-08-22  Ekaitz Zarraga  <ekaitz@elenq.tech>

	mescc: Initialize missing struct fields to 0.
	This is a follow-up to commits
	    7a8a2fc517a3c36746cec4b72f3716b92a82f67b
	    mescc: x86_64 support: Refactor to abstracted assembly, add x86_64.

	and

	    c9ba7a619b5d6ae5eabc8295d248f1e448c9eb28
	    mescc: Refactor variable declaration.

	There was a debug "22" leaking in compile.scm.  It should be a "0".

	* module/mescc/compile.scm (init-local): Replace "22" with "0".
	* lib/tests/scaffold/7v-struct-initialize-zeroes.c: New test.
	* build-aux/check-mescc.sh (tcc_tests): Add it.
	(xfail-tests): Remove lib/tests/scaffold/72-typedef-struct-def-local.c.

2023-07-03  Janneke Nieuwenhuizen  <janneke@gnu.org>

	lib/tests: 76-pointer-arithmetic: Cater for RISC-V64.
	* lib/tests/scaffold/76-pointer-arithmetic.c (struct
	foo)[__riscv_xlen==64]: Add __align.

2023-07-02  Janneke Nieuwenhuizen  <janneke@gnu.org>

	riscv64: lib/tests: Skip 70-extern.c for gcc.
	* build-aux/check-mescc.sh (xfail_tests)[gcc && riscv64]: Add
	lib/tests/scaffold/70-extern.c.

2023-05-19  Andrius Štikonas  <andrius@stikonas.eu>

	riscv64: Port to word based mescc-tools.
	* module/mescc/M1.scm (riscv:i-format, riscv:j-format, riscv:u-format):
	New procedures for RISC-V instruction formats.
	(info->M1): Use them to switch from !0xAB to M1
	weird strings 'AB'.
	* module/mescc/riscv64/as.scm,
	lib/linux/riscv64-mes-m2/_exit.c
	ib/linux/riscv64-mes-m2/_write.c,.
	lib/linux/riscv64-mes-m2/crt1.M1,.
	lib/linux/riscv64-mes-m2/syscall.c,.
	lib/linux/riscv64-mes-mescc/_exit.c,.
	lib/linux/riscv64-mes-mescc/_write.c,.
	lib/linux/riscv64-mes-mescc/crt1.c,.
	lib/linux/riscv64-mes-mescc/syscall-internal.c,.
	lib/linux/riscv64-mes-mescc/syscall.c,.
	lib/m2/riscv64/riscv64_defs.M1,.
	lib/riscv64-mes-mescc/setjmp.c,.
	lib/riscv64-mes/riscv64.M1: Switch to riscv64 word-based macros.
	* lib/linux/open.c (open)[!SYS_open]: Add support using openat syscall.
	* include/linux/riscv64/syscall.h (MAKESTRING, MAKESTRING2,
	RISCV_SYSCALL): New macros.

	build: Ignore /m2 build directory.
	* .gitignore: Add /m2.

2023-05-27  Janneke Nieuwenhuizen  <janneke@gnu.org>

	guix: m2-planet: Update to 0.10.0-1-c82fb8c353.
	* guix/git/mes.scm (m2-planet)[source]: Update to
	0.10.0-1-c82fb8c3530e93fd49efe60da785ffff827ea4d.

2023-05-04  Janneke Nieuwenhuizen  <janneke@gnu.org>

	doc: Update `PORTING'.
	* PORTING (Setup environment): Use nyacc 1.00.2.  Prefer git-minimal
	over git to avoid dependencies on subversion and graphic libraries.  Add
	riscv64-linux example.

2023-08-27  Janneke Nieuwenhuizen  <janneke@gnu.org>

	gnu: Update main prototype.
	* lib/gnu/x86-mes-gcc/crt1.c (main): Add parameters.

2023-05-03  Janneke Nieuwenhuizen  <janneke@gnu.org>

	riscv64: lib: Use __init_io.
	* lib/linux/riscv64-mes-gcc/crt1.c (_start): Replace manual initialization
	of __stdin, __stdout, __stderr, and environ with __init_io ().
	* lib/linux/riscv64-mes-mescc/crt1.c (_start): Likewise.

	arm: lib: Use __init_io.
	* lib/linux/arm-mes-gcc/crt1.c (_start): Replace manual initialization
	of __stdin, __stdout, __stderr, and environ with __init_io ().
	* lib/linux/arm-mes-m2/crt1.M1 (_start): Likewise.
	* lib/linux/arm-mes-mescc/crt1.c (_start): Likewise.

	freebsd: lib: Use __init_io.
	* * lib/freebsd/x86-mes-gcc/crt1.c (_start): Replace manual initialization
	of __stdin, __stdout, __stderr, and environ with __init_io ().
	* lib/freebsd/x86-mes-mescc/crt1.c (_start): Likewise.
	* lib/freebsd/x86-mes-gcc/_write.c (SYS_exit): Remove.
	(SYS_write): New define.

	x86_64: lib: Use __init_io.
	* lib/linux/x86_64-mes-gcc/crt1.c (_start): Replace manual initialization
	of __stdin, __stdout, __stderr, and environ with __init_io ().
	* lib/linux/x86_64-mes-m2/crt1.M1 (_start): Likewise.
	* lib/linux/x86_64-mes-mescc/crt1.c (_start): Likewise.

	x86: lib: Use __init_io.
	* build-aux/configure-lib.sh (libc_mini_shared_SOURCES): Add init_io.c.
	* include/mes/lib-mini.h (__init_io): Declare it.
	* lib/linux/x86-mes-gcc/crt1.c (_start): Replace manual initialization
	of __stdin, __stdout, __stderr, and environ with __init_io ().
	* lib/linux/x86-mes-m2/crt1.M1 (_start): Likewise.
	* lib/linux/x86-mes-mescc/crt1.c (_start): Likewise.

	core: Remove duplicate environment initialization.
	* src/mes.c (init): Remove envp parameter.  Remove environment initialization.
	(main): Remove envp parameter.  Update caller.

2023-11-11  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	riscv64: Cater for M2-Planet.
	* kaem.riscv64: New file.

	* lib/linux/riscv64-mes-m2/crt1.M1,
	lib/m2/riscv64/ELF-riscv64.hex2,
	lib/m2/riscv64/riscv64_defs.M1: New files, imported from M2Lib.c
	* lib/linux/riscv64-mes-m2/_exit.c,
	lib/linux/riscv64-mes-m2/_write.c,
	lib/linux/riscv64-mes-m2/crt1.c,
	lib/linux/riscv64-mes-m2/syscall.c: New files, adapted for M2-Planet
	calling convention from ...
	* lib/linux/riscv64-mes-mescc: ...here
	* kaem.run: Move fcntl.h up.  Include signal.h.
	* build-aux/build.sh.in: Also allow kaem build for riscv64.

2023-05-03  Janneke Nieuwenhuizen  <janneke@gnu.org>

	scaffold: Add env.
	* scaffold/env.c,
	scaffold/env.kaem: New files.
	* build-aux/build.sh.in: Use them.

2022-11-15  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	guix: mescc-tools: Add RISCV architectures.
	This is a follow-up to commit
	    79da3fc3e287979f1c28fcedcdef6ff86737a0f8
	    guix: mescc-tools: Update to 1.4.0

	* guix/git/mes.scm (mescc-tools)[supported-systems]: Add riscv32-linux
	and riscv64-linux.

2022-11-13  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Use size 8 for stack.
	Reported by  W. J. van der Laan <laanwj@protonmail.com>.

	* module/mescc/x86_64/as.scm (x86_64:function-locals): Oops, use size 8.

2021-04-23  W. J. van der Laan  <laanwj@protonmail.com>

	lib: Linux riscv64-mes-mescc support.
	* lib/linux/riscv64-mes-mescc/_exit.c,
	lib/linux/riscv64-mes-mescc/_write.c,
	lib/linux/riscv64-mes-mescc/crt1.c,
	lib/linux/riscv64-mes-mescc/syscall-internal.c,
	lib/linux/riscv64-mes-mescc/syscall.c: New files.  These add support for
	building for riscv64-mes-mescc and make it self-hosting.

	lib: Base riscv64-mes-mescc support.
	* lib/riscv64-mes-mescc/setjmp.c: New file.
	(setjmp, longjmp): Implement for RV64.

2021-04-24  W. J. van der Laan  <laanwj@protonmail.com>

	lib: Add RISCV64 instruction macros for M1.
	* lib/riscv64-mes/riscv64.M1: New file.  Add set of instruction macros
	for RV64.  These are all potentially needed by the code generation.  I
	have made no effort yet to minimize the list of instructions for mes+tcc
	compile.

2021-04-23  W. J. van der Laan  <laanwj@protonmail.com>

	mescc: RISC-V64 code generation.
	* mes/module/mescc/mescc.mes: Import riscv64 code generation modules.
	* mes/module/mescc/riscv64/as.mes: Imports for as.mes.
	* mes/module/mescc/riscv64/info.mes: Imports for info.mes.
	* module/mescc/mescc.scm (replace-suffix, arch-get, arch-get-info,
	arch-get-machine, arch-get-m1-macros, .E?, .s?, .o?): Handle riscv64 and
	some stubs for riscv32.
	(arch-get-defines): Add defines for riscv32 and riscv64.
	* module/mescc/riscv64/as.scm: New file: Code generator module for RISC-V64.
	* module/mescc/riscv64/info.scm: New file: Architecture info for RISC-V64.
	* build-aux/build-guile.sh (SCM_FILES): Add them.

2021-04-04  W. J. van der Laan  <laanwj@protonmail.com>

	lib: Make stdarg work for GCC on RISC-V64.
	* include/stdarg.h: GCC on RISC-V always passes arguments in registers.
	Implementing these macros without the use of built-ins would be very
	involved. So use those for now to make printf etc work.

	lib/tests: Take RISC-V into account in size conditionals.
	* lib/tests/scaffold/76-pointer-arithmetic.c (main): Use the right sizes
	in the test for RISC-V architectures.
	* lib/tests/scaffold/7k-for-each-elem.c (main): Same.
	* lib/tests/scaffold/85-sizeof.c: Same.

	lib: General Linux RISC-V64 syscall support.
	* include/linux/riscv32/kernel-stat.h,
	include/linux/riscv64/kernel-stat.h: New files.
	* include/fcntl.h (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR): Add
	necessary constants.
	* include/stdint.h: Integer size defines for RISC-V.
	* include/sys/stat.h: "stat" struct for RISC-V.
	* lib/linux/_open3.c (_open3)[!SYS_open]: Use SYS_openat.
	* lib/linux/access.c (access)[!SYS_access]: Use SYS_faccessat.
	* lib/linux/chmod.c (chmod)[!SYS_chmod]: Use SYS_fchmodat.
	* lib/linux/dup2.c (dup2)[!SYS_dup2]: Use if SYS_dup3.
	* lib/linux/fork.c (fork)[!SYS_fork]: Use SYS_clone.
	* lib/linux/getdents.c (getdents)[!SYS_getdents]: Use SYS_getdents64.
	* lib/linux/link.c (link)[!SYS_link]: Use SYS_linkat.
	* lib/linux/lstat.c (lstat)[!SYS_lstat]: Use SYS_newfstatat.
	* lib/linux/mkdir.c (mkdir)[!SYS_mkdir]: Use SYS_mkdirat.
	* lib/linux/mknod.c (mknod)[!SYS_mknod]: Use SYS_mknodat.
	* lib/linux/pipe.c (pipe)[!SYS_pipe]: Use SYS_pipe2.
	* lib/linux/readlink.c (readlink)[!SYS_readlinkat]: Use SYS_readlinkat.
	* lib/linux/rename.c (rename)[!SYS_rename]: Use SYS_renameat2.
	* lib/linux/rmdir.c (rmdir)[!SYS_rmdir]: Use SYS_unlinkat.
	* lib/linux/signal.c (_restorer_for_siginfo): Remove unused function
	that causes compilation issue.
	* lib/linux/stat.c (stat)[!SYS_stat]: Use SYS_newfstatat.
	* lib/linux/symlink.c (symlink)[!SYS_symlinkat]: Use SYS_symlink.
	* lib/linux/unlink.c (unlink)[!SYS_unlink]: Use SYS_unlinkat.

	lib: Add _sys_call_5 for Linux RISC-V64.
	* include/linux/syscall.h (_sys_call5): Declare 5-argument syscall needed
	for SYS_renameat2, currently only used on RISC-V64.
	* lib/linux/riscv64-mes-gcc/syscall.c (__sys_call5, _sys_call5):
	Implement it.

	lib: Linux riscv64-mes-gcc support.
	* lib/linux/riscv64-mes-gcc/_exit.c,
	lib/linux/riscv64-mes-gcc/_write.c,
	lib/linux/riscv64-mes-gcc/crt1.c,
	lib/linux/riscv64-mes-gcc/syscall-internal.c,
	lib/linux/riscv64-mes-gcc/syscall.c: New files to make it possible
	to compile mes for riscv64-mes-gcc.

	lib: Base riscv64-mes-gcc support (dummy setjmp).
	* lib/riscv64-mes-gcc/setjmp.c: New file.
	(setjmp, longjmp): Add dummy implementations. Implementing these for gcc
	would be very involved, and does not seem necessary to get mescc to
	work.

	lib: Add RISC-V64 Linux syscall numbers header.
	* include/linux/riscv64/syscall.h: New file: list relevant syscall
	number constants.

2022-11-15  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	lib: Document syscalls.
	* include/linux/SYSCALLS: New file.

2021-04-04  W. J. van der Laan  <laanwj@protonmail.com>

	lib: Make Linux scaffold work for RISC-V64.
	* lib/linux/riscv64-mes-gcc/exit-42.S,
	lib/linux/riscv64-mes-gcc/hello-mes.S,
	lib/linux/riscv64-mes/elf64-0exit-42.hex2,
	lib/linux/riscv64-mes/elf64-0header.hex2,
	lib/linux/riscv64-mes/elf64-0hello-mes.hex2,
	lib/linux/riscv64-mes/elf64-body-exit-42.hex2,
	lib/linux/riscv64-mes/elf64-body-hello-mes.hex2,
	lib/linux/riscv64-mes/elf64-footer-single-main.hex2,
	lib/linux/riscv64-mes/elf64-header.hex2: New files.  Makes basic
	scaffold pass on RISC-V64.

2021-04-03  W. J. van der Laan  <laanwj@protonmail.com>

	core: Add RISC-V architecture detection.
	* src/mes.c(mes_environment)[__riscv_xlen == 32]: Set
	architecture to riscv32.
	[__riscv_xlen == 64]: Set architecture to riscv64.

	xlen

2021-04-04  W. J. van der Laan  <laanwj@protonmail.com>

	configure: Recognize RISC-V architectures.
	* configure (main): Classify "riscv64" as 64 bit, allow "redhat" OS
	(somewhat tangential, but important for Fedora RISC-V), allow
	"riscv32-linux-mes" and "riscv64-linux-mes" as system.

2021-04-22  W. J. van der Laan  <laanwj@protonmail.com>

	mescc: Add r0-cmp-r1 instruction.
	This instruction is used to compare two registers and set the flags
	accordingly. In current architectures this is the same as r0-r1, but for
	RISCV it will be different.  RISC-V does not have condition flags so
	(until a better solution) we are going to emulate them there.

	* module/mescc/armv4/as.scm (armv4:instructions): Add r0-cmp-r1 as alias
	of r0-r1.
	* module/mescc/i386/as.scm: Same.
	* module/mescc/x86_64/as.scm: Same.
	* module/mescc/compile.scm (expr->register): Make use of the new
	r0-cmp-r1 instruction.

2023-09-04  Ekaitz Zarraga  <ekaitz@elenq.tech>

	lib: Make objdump work on binaries in x86-linux.
	* lib/linux/x86-mes/elf32-header.hex2: Fix header sizes for objdump.

2023-09-02  Ekaitz Zarraga  <ekaitz@elenq.tech>

	lib: Make objdump work on binaries in x86_64-linux.
	* lib/linux/x86_64-mes/elf64-header.hex2: Fix header sizes for objdump.

2023-07-30  Janneke Nieuwenhuizen  <janneke@gnu.org>

	test: Add 68-truncate-shift.
	* lib/tests/scaffold/68-truncate-shift.c: New file.
	* build-aux/check-mescc.sh (mes_tests): Add it.

	mescc: Consider truncate after each shift operation.
	* module/mescc/compile.scm (expr->register): After lshift and rshift,
	use convert-r0.  Tuncate on largest of default/int or size of first
	operand.

2023-07-12  Andrius Štikonas  <andrius@stikonas.eu>

	mescc: Do not overflow M1 64bit immediates.
	M1 immediates are limited to 31-bit before they become negative.

	* module/mescc/x86_64/as.scm (x86_64:value->r, x86_64:r-cmp-value,
	x86_64:r-long-mem-add, x86_64:r-and): Limit M1 immediate to #x80000000.

	* lib/tests/scaffold/67-m1-overflow-check.c: New test.
	* build-aux/check-mescc.sh (mes_tests): Add it.

2023-07-03  Andrius Štikonas  <andrius@stikonas.eu>

	mescc: Fix hex2:immediate8 to work with mes/m2-compiled mes.
	* module/mescc/M1.scm (hex2:immediate8): Remove mesc? exception.
	(mesc?): Remove.

2023-05-05  Janneke Nieuwenhuizen  <janneke@gnu.org>

	guix: m2-planet: Update to 1.10.0-0.754c5de.
	For 64bit platforms, this fix is essential

	    85dd953 Add padding when loading global ints on 64-bit arches.

	* guix/git/mes.scm (m2-planet): Update to latest git.

2023-07-03  Janneke Nieuwenhuizen  <janneke@gnu.org>

	core: Avoid displaying truncated 64bit values.
	* src/display.c (display_helper): Use `ltoa' instead of `itoa'.

2023-04-30  Andrius Štikonas  <andrius@stikonas.eu>

	lib: Fix x86_64 M2 elf header to work with debug info.
	* lib/m2/x86_64/ELF-x86_64.hex2: Fix e_shoff, e_shentsize, e_shstrndx.

	kaem: Pass --64 to blood_elf on 64-bit arches.
	* kaem.run (blood_elf_flag): New variable with dummy default value to
	support kaem from mescc-tools 1.4.0.
	* kaem.x86_64 (blood_elf_flag): New variable.

2023-04-30  Janneke Nieuwenhuizen  <janneke@gnu.org>

	m2: Add new style x86_64 defines to support M2-Planet 1.11.0.
	* lib/m2/x86_64/x86_64_defs.M1: Add new M1 defines.

2022-11-17  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	x86_64: build: Cater for M2-Planet.
	* build-aux/cflags.sh: Set cc_cpu.
	* build-aux/config.sh.in (cc_cpu): Export.
	* build-aux/export.make (cc_cpu): Likewise.
	* kaem.arm (cc_cpu): New variable.
	* kaem.x86 (cc_cpu): New variable.
	* kaem.run (cc_cpu): New variable.  Define __<cc_cpu>__.
	* scaffold/argv.kaem (cc_cpu): Likewise.  Define __linux__
	* scaffold/global-array.kaem (cc_cpu): Likewise.
	* scaffold/hello.kaem (cc_cpu): Likewise.
	* scaffold/local-array.kaem (cc_cpu): Likewise.
	* scaffold/local-static-array.kaem (cc_cpu): Likewise.
	* scaffold/main.kaem (cc_cpu): Likewise.
	* scaffold/read.kaem (cc_cpu): Likewise.
	* kaem.x86_64: New file.
	lib/m2/x86_64/ELF-x86_64.hex2,
	lib/m2/x86_64/x86_64_defs.M1: New files, imported from M2Libc.
	lib/linux/x86_64-mes-m2/_exit.c,
	lib/linux/x86_64-mes-m2/_write.c,
	lib/linux/x86_64-mes-m2/crt1.M1,
	lib/linux/x86_64-mes-m2/crt1.c,
	lib/linux/x86_64-mes-m2/syscall.c: New files, adapted for M2-Planet
	calling convention from ...
	* lib/linux/x86_64-mes-mescc: ... here.
	* build-aux/build.sh.in: Also allow kaem build for x86_64.
	* include/mes/lib-mini.h[__M2__]: Define as sizeof (void*).
	* include/mes/mes.h[__M2__](M2_CELL_SIZE): Define as sizeof (struct scm).
	* lib/x86_64-mes/x86_64.M1 (add____$i8,%rbp, mov____%rdi,%rbp): New
	defines.
	* src/posix.c (TIME_UNITS_PER_SECOND): Cater for 64bit M2-Planet.

2023-09-09  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Generate reproducible doc/version.texi.
	* build-aux/GNUmakefile.in (doc/version.texi): Use timestamp from git.

	build: Help help2man generate reproducible man-pages.
	* build-aux/GNUmakefile.in (SOURCE_DATE_EPOCH): New variable.
	(MTIME): Use it.

2023-08-30  Janneke Nieuwenhuizen  <janneke@gnu.org>

	lib: tests: 17-compare-unsigned-le: Add case from 7s-unsigned-compare.
	* lib/tests/scaffold/17-compare-unsigned-le.c: Add case from
	7s-unsigned-compare; rewrite to avoid gcc-optimize.

	lib: tests: 17-compare-unsigned-short-le.c: Avoid gcc optimize.
	* lib/tests/scaffold/17-compare-unsigned-short-le.c (main): Change
	comparison with immediate to comparison with variable.

	lib: tests: 17-compare-unsigned-char-le.c: Avoid gcc optimize.
	* lib/tests/scaffold/17-compare-unsigned-char-le.c (main): Change
	comparison with immediate to comparison with variable.

2023-08-29  Ekaitz Zarraga  <ekaitz@elenq.tech>

	lib: tests: Add 17-compare-rotated.
	* lib/tests/scaffold/17-compare-rotated.c: Add file.
	* build-aux/check-mescc.sh (mes_tests): Add it.  Add it to XFAIL_TESTS
	for mescc x86_64.

	lib: tests: Add 16-cast.
	* lib/tests/scaffold/16-cast.c: Add file.
	* build-aux/check-mescc.sh (mes_tests): Add it.

2023-08-28  Janneke Nieuwenhuizen  <janneke@gnu.org>

	lib: tests: 63-struct-cell: Avoid segfault by array overflow with gcc >= 10.
	* lib/tests/scaffold/63-struct-cell.c (g_functions]: Use size 3.

	guix: mes.git: Add gdb.
	* guix/git/mes.scm (mes.git)[native-inputs]: Add gdb.

2023-08-26  Janneke Nieuwenhuizen  <janneke@gnu.org>

	mescc: Remove duplicate include.
	* module/mescc/preprocess.scm (mescc): Remove second (nyacc lang c99
	parser) include.

2023-08-24  Ekaitz Zarraga  <ekaitz@elenq.tech>

	tests: Make tests/vector.test compatible with Guile.
	* mes/module/mes/type-0.mes (unspecified?): New function.
	* tests/vector.test (make-vector): Use it to test equality rather than
	rely on string comparison.

	mes: iota: Make compatible with Guile.
	* mes/module/mes/scm.mes (iota): Throw exception when n < 0.
	* tests/scm.test: Import (mes catch).
	("iota -1"): Rewrite with exception handling.

2023-08-24  Ekaitz Zarraga  <ekaitz@elenq.tech>

	mes: Add %program to mes-compatibility for Guile.
	This fixes running scaffold/boot/gc.scm with Guile.

	* module/mes/guile.scm (%program): Define and export.

2023-08-24  Ekaitz Zarraga  <ekaitz@elenq.tech>

	build: Fix typo causing tcc tests being skipped.
	* build-aux/check-mescc.sh (TESTS): Use $tcc_tests instead of $tcc_test.

2023-07-08  Janneke Nieuwenhuizen  <janneke@gnu.org>

	repl: Fix include, load, use MODULE, and mes-use-module.
	Reported by Irvise via IRC.

	* mes/module/mes/repl.mes (repl)[load-env, mes-load-module-env]: New
	inner defines.
	[use]: Use mes-load-module-env, do not return content of module.
	Special-case 'include' and 'load'.

2023-07-03  Janneke Nieuwenhuizen  <janneke@gnu.org>

	core: Set compiler for M2-Planet.
	This is a follow-up to commit
	    7a6505be6efcae3fe0376a91069c2341a0ca85a7
	    build: Cater for M2-Planet.

	* src/mes.c (mes_environment)[__M2__]: Set compiler to "m2c".

2023-07-02  Janneke Nieuwenhuizen  <janneke@gnu.org>

	lib/tests: Initialize local variable.
	Reuported by Andrius Štikonas <andrius@stikonas.eu> via IRC.

	* lib/tests/assert/50-assert.c (main): Initialize local f.
	* lib/tests/scaffold/21-char-array.c (main): Likewise.

2023-07-01  Janneke Nieuwenhuizen  <janneke@gnu.org>

	mes: Define R_OK as 4.
	Reported by fossy via IRC.

	* mes/module/mes/posix.mes (R_OK): Define as 4.

2023-05-15  Efraim Flashner  <efraim@flashner.co.il>

	build: Fix typo.
	* build-aux/GNUmakefile.in (X86_ARCH_HEADERS): Fix typo

2023-05-21  Emily Trau  <emily@downunderctf.com>

	lib: Define O_TMPFILE for GNU make 4.4.1.
	* include/fcntl.h (O_TMPFILE): New define.

2023-05-03  Janneke Nieuwenhuizen  <janneke@gnu.org>

	build: Drop support for mescc-tools 0.5.2.
	* build-aux/build-scaffold.sh (stage0_cpu_flag): Remove.  Update users.
	* build-aux/cflags.sh (stage0_arch): Remove.
	* build-aux/config.sh.in (numbered_arch): Remove.
	* configure (main): Remove check for numbered-arch?.  Remove
	substitution of @numbered-arch@.
	* configure.sh (numbered_arch): Likewise.
	* module/mescc.scm (%numbered-arch?): Remove.
	(parse-opts): Remove support for --numbered-arch?
	* module/mescc/mescc.scm (mescc:compile): Remove alignment exception for
	numbered-arch?.
	(infos->hex2): Likewise.
	(arch-get-architecture): Remove support for numbered-arch?.
	* scripts/mescc.in (numbered_arch): Remove.
	* scripts/mescc.scm.in (%numbered-arch?): Remove.
	("%numbered_arch"): Remove.

	doc: Update for 0.25.
	* doc/images/gcc-mesboot-graph.dot: Regenerate.
	* doc/mes.texi (Introduction): Whitespace fixes.
	(Full Source Bootstrap): Mention deployment in Guix.
	(Requirements): Update M2-Planet to 1.10.0.
	(Bootstrap Requirements): Likewise.
	(The Mes Bootstrap Process): Update Reduced Binary Bootstrap to Full
	Source Bootstrap.  Update next priority.  Add deployments.
	(Bootstrapping): Add tagline for "Invoking mesar".
	(Full Source Bootstrap Deployments): New subsection.

2023-04-30  Andrius Štikonas  <andrius@stikonas.eu>

	core: Fix a typo in comment.
	* src/gc.c (gc_init): Fix typo.

2022-12-24  Andrius Štikonas  <andrius@stikonas.eu>

	m2: Add new style x86 defines to support M2-Planet 1.11.0.
	* lib/m2/x86/x86_defs.M1: Add new M1 defines.

2023-02-13  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	lib: __assert_fail: Remove M2-Planet workarounds.
	* lib/mes/__assert_fail.c (__assert_fail): Use *file, *function.

2022-11-15  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	lib: linux: Add wait4.
	* lib/linux/waitpid.c (waitpid): Factor-out wait4 call to...
	* lib/linux/wait4.c: ...new file here.
	* include/sys/wait.h (wait4): Add prototype.  Include sys/resource.h.
	* include/sys/resource.h (struct rusage): Remove gratuitous "int" for
	M2-Planet.
	* build-aux/configure-lib.sh (libc_SOURCES): Add it.
	* kaem.run,
	simple.make (M2_SOURCES),
	simple.sh: Likewise.  Also add resource.h.

2022-11-18  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Move M2_PTR_SIZE, M2_CELL_SIZE to include file.
	* lib/posix/getenv.c (M2_PTR_SIZE),
	lib/posix/setenv.c (M2_PTR_SIZE): Move definition...
	* include/mes/lib-mini.h (M2_PTR_SIZE): ...here.
	* src/gc.c (M2_CELL_SIZE),
	src/symbol.c (M2_CELL_SIZE),
	src/test/gc.c (M2_CELL_SIZE),
	src/vector.c (M2_CELL_SIZE): Move definition...
	* include/mes/mes.h (M2_CELL_SIZE): ...here.

2022-11-14  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	kaem: Add kaem.arm and kaem.x86.
	* kaem.arm,
	kaem.x86: New files.

	kaem.run: Remove --bootstrap-mode.
	* include/linux/arm/syscall.h,
	include/linux/x86/syscall.h,
	include/mes/constants.h: Remove CONSTANTs.
	* lib/m2/open.c: Move to...
	* lib/linux/open.c: ...here.  Update to make gcc-compatible.
	* scaffold/argv.kaem: Update accordingly.
	* lib/linux/lseek.c (_leek, lseek): Suport M2-Planet.
	* lib/linux/_open3.c (_open3): Fix cast.
	* lib/linux/waitpid.c (waitpid): Suport M2-Planet.
	* lib/m2/getcwd.c (PATH_MAX): Remove CONSTANT.
	* lib/m2/isatty.c (TCGETS): Remove CONSTANT.
	* lib/mes/ntoab.c: Support M2-Planet.
	* lib/posix/getcwd.c (__getcwd_buf): Remove.
	* lib/posix/getenv.c (M2_PTR_SIZE)[__M2__]: Update to #define.
	* lib/posix/setenv.c: Likewise.
	* lib/stub/__raise.c (SIGABRT): Remove CONSTANT.
	* src/core.c (error): Use __M2__ instead of __M2_PLANET__.
	* src/gc.c (M2_CELL_SIZE)[__M2__]: Update to #define.  Support
	non-bootstrap-mode.
	* src/symbol.c: Likewise.
	* src/vector.c: Likewise.
	* src/posix.c: Likewise.
	(__raise): Move to...
	* include/mes/lib-cc.h (__raise): ...this new file to avoid M2-Planet crash.
	* include/sys/types.h: Include it.
	* lib/mes/div.c (__raise): Remove prototype.
	[__TINYC__ || SYSTEM_LIBC] (__raise): Remove macro.
	* include/mes/lib.h (__raise)[SYSTEM_LIBC]: Remove prototype.
	* kaem.run: Remove --botstrap-mode.  Update source list accordingly.
	* simple.make (M2_PLANET_FLAGS): Remove --bootstrap-mode.
	* simple.make (M2_SOURCES, M2_PLANET_INCLUDES): Update source list
	accordingly.
	* include/sys/types.h (EOF): Move to...
	* include/mes/lib-cccc.h (EOF): ...here, and...
	* include/m2/types.h (EOF): ...here, to avoid M2-Planet crash.

2022-11-04  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	lib: posix/open: Support M2-Planet.
	* lib/posix/open.c (open)[__M2__]: New function.

	lib: linux/_open3: Support M2-Planet.
	* lib/linux/_open3.c (_open3): Use function casting.  Also call
	__ungetc_init.
	* lib/stub/__buffered_read.c: New file.

	kaem: read: Remove --bootstrap-mode.
	* include/mes/lib.h[__M2__](__call_at_exit,abtod,dtoab,ultoa,
	* include/sys/types.h[__M2__]: Fall back to unsigned instead of using
	unsigned long.
	* include/stdio.h[__M2__](fprintf, fscanf, printf, snprintf, sprintf,
	sscanf): Hide prototypes.
	* lib/stdlib/exit.c (exit)[__M2__]: Hide call to __call_at_exit.
	* lib/linux/read.c (read)[__M2__]: Hide debugging.
	* lib/linux/malloc.c (malloc)[__M2__]: Hide alignment.
	__mesabi_umod, __mesabi_udiv, __mesabi_uldiv): Hide prototypes.
	* scaffold/argv.kaem: Use them together with lib/mes/lib-mini.h instead of
	lib/mes/* specializations.  Remove --bootstrap-mode from M2-Planet call.

	kaem: argv: Remove --bootstrap-mode.
	* scaffold/argv.kaem: Use lib/mes/lib-mini.h instead of lib/m2/lib.h.
	Remove --bootstrap-mode from M2-Planet call.

	kaem: hello: Remove --bootstrap-mode.
	* include/mes/lib-mini.h: Remove M2 bootstrap constants.
	[__M2__](size_t): Fall-back to unsigned instead of unsigned long.
	* scaffold/hello.kaem: Use it instead of lib/m2/lib.h.  Remove
	--bootstrap-mode from M2-Planet call.

	kaem: main: Remove --bootstrap-mode.
	* scaffold/main.kaem: Remove --bootstrap-mode from M2-Planet call.

	guix: m2-planet: Update to 1.10.0.
	* guix/git/mes.scm (m2-planet): Update to 1.10.0.
	[supported-systems]: Add riscv32-linux, riscv64-linux.

	lib: mes/write: Rename from mes/mini-write.c
	* lib/mes/mini-write.c: Move to...
	* lib/mes/write.c: ...here.
	* build-aux/configure-lib.sh,
	kaem.run,
	scaffold/argv.kaem,
	scaffold/global-array.kaem,
	scaffold/hello.kaem,
	scaffold/local-array.kaem,
	scaffold/local-static-array.kaem,
	scaffold/read.kaem,
	simple.make,
	simple.sh: Update accordingly.

2022-11-22  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Cater for colliding basename in C sources.
	This is a follow-up to commit
	    f785f8d560a85121c9688f671a8a4921c49616f4
	    build: Fix --with-bootstrap build.

	* build-aux/cc.sh: Retain directory name in object file name.
	* build-aux/bootstrap.sh.in: Likewise.  Compile crt1.c from local
	directory.
	* build-aux/build-lib.sh: Likewise.
	* build-aux/build.sh.in: Remove globals.o hack.

2023-02-13  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	lib/m2: Update syscall includes.
	This is a follow-up to commit
	    bc1fa57851d360abb161c54dce5339ad9d7af7aa
	    lib: stat: Use SYS_stat64 for 32bit platforms.

	* lib/m2/chmod.c: Update to <arch/syscall.sh>.
	* lib/m2/clock_gettime.c: Likewise.
	* lib/m2/read.c: Likewise.

2023-02-13  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Post-release update.
	* build-aux/GNUmakefile.in (--previous-version): Update to 0.24.2.
	* doc/announce/ANNOUNCE-0.24.2: Run `make sum-announce'.

	guix: mes: Update to 0.24.2.
	* guix/git/mes.scm (mes)[source]: Update to 0.24.2.

	build: Release 0.24.2.
	* configure (VERSION): Bump to 0.24.2.
	* configure.sh (VERSION): Likewise.
	* src/symbol.c (MES_VERSION): Likewise.
	* mes/module/mes/repl.mes (welcome): Update copyright years.

	build: Update release procedure.
	* build-aux/GNUmakefile.in: Add `./configure' stage before creating
	tarball.

	doc: Update `ROADMAP'.
	* ROADMAP (release 0.x, unsorted): Add Guile module support, Gash on
	Mes, Guile as a Guix FSB dependency.

	doc: Add `ANNOUNCE-0.24.2'.
	* doc/announce/ANNOUNCE-0.24.2: New file.

	doc: Update `NEWS'.
	* NEWS (Changes in 0.24.2 since 0.24.1): New section.

2023-02-12  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	lib: Fix compile warnings.
	* lib/linux/read.c (read): Add casts.
	* lib/linux/signal.c (signal): Likewise.
	* lib/stdio/vfscanf.c: Include stdlib.h.
	(vfscanf): Add cast.
	* lib/stdlib/mbstowcs.c (mbstowcs): Add cast.

2023-01-31  R. Masters  <grick23@gmail.com>

	lib: Support uppercase hex conversions.
	Uppercase hex number conversions fail for abtol, strtol, strtoul,
	strtoull, atoi, and abtod.

	The following patch fixes it.  This allows tcc to handle assembly
	language, which is necessary to build the Fiwix kernel as part of the
	kernel bootstrapping in progress for the live-bootstrap project.

	* lib/ctype/isxdigit.c (isxdigit): Also allow A-F.
	* lib/mes/abtol.c (abtol): Also cater for A-F.

2023-01-24  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	lib/m2: time: Fix segfault by allocating timeval struct.
	Suggested by Meghan Denny <hello@nektro.net>.

	* lib/m2/time.c (__tv): New global variable.
	(time): Use it to allocate timeval struct.

2022-10-30  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Use HTTPS.
	* COPYING: Replace by new version (which uses HTTPS).
	* HACKING,
	README,
	doc/fdl-1.3.texi,
	doc/mes.texi: Use HTTPS.

2022-10-16  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Update `HACKING'.
	* HACKING (SETUP): Update arm triplet.

2022-10-19  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Fix Guile warnings.
	* module/mescc/mescc.scm (GUILE-with-output-to-file): Remove.n
	(with-output-to-file): Rename to...
	(with-output-to-file*): ...this.
	(mescc:preprocess, mescc:compile, infos->hex2): Update callers.

2022-10-29  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	lib: stat: Use SYS_stat64 for 32bit platforms.
	This fixes <https://debbugs.gnu.org/41264>.

	* include/linux/arm/syscall.h (SYS_stat64, SYS_lstat64,
	SYS_fstat64)[__SIZEOF_LONG_LONG__ == 8]:
	New defines.
	(SYS_stat, SYS_lstat, SYS_fstat)[__SIZEOF_LONG_LONG__ == 8]: Redefine them.
	* include/linux/x86/syscall.h (SYS_stat64, SYS_lstat64,
	SYS_fstat64)[__SIZEOF_LONG_LONG__ == 8]:
	New defines.
	(SYS_stat, SYS_lstat, SYS_fstat)[__SIZEOF_LONG_LONG__ == 8]: Redefine them.
	* include/sys/stat.h (struct stat): Move definition to...
	* include/linux/arm/kernel-stat.h,
	include/linux/m2/kernel-stat.h,
	include/linux/x86/kernel-stat.h,
	include/linux/x86_64/kernel-stat.h: These new files.
	* include/gnu/x86/kernel-stat.h: New file.
	* configure (main): Copy <srcdest>include/<kernel>/<arch>/*.h to
	include/.
	* configure.sh: Likewise.
	* .gitignore: Ignore them.  Add copyright header.
	* build-aux/GNUmakefile.in (X86_ARCH_HEADERS, ARCH_HEADERS): New
	variables.
	(build): Use them.
	(include/arch/%.h, arch-dir): New targets.
	* build-aux/bootstrap.sh.in (AM_CPPFLAGS): Replace
	<srcdest>include/<kernel>/<cpu> with built ../include.
	* build-aux/build.sh.in (AM_CPPFLAGS): Likewise.
	* build-aux/install.sh.in: Also install built include.
	* include/m2/types.h: New file.
	* kaem.run: Use it.
	* simple.sh: Copy kernel-stat.h, syscall.h for kernel/cpu to
	include/arch.

2022-10-26  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	lib: __assert_fail: Update to standard.
	* lib/mes/__assert_fail.c (__assert_fail): Add file, line, function
	parameters.
	* include/assert.h (assert): Update caller.
	(__assert_fail): Update prototype.
	* include/mes/lib.h (__assert_fail): Likewise.
	* lib/mes/assert_msg.c (assert_msg): Likewise.  Include assert.h.

2022-05-05  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	time.c: include sys/time for gettimeofday.
	* lib/linux/time.c: Include <sys/time.h>.

2022-05-04  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	lib: linux/time: Remove SYS_time specialization.
	* lib/linux/time.c (time)[SYS_time]: Remove specialization.
	[!SYS_time && !SYS_gettimeofday]: Remove fallback.

2022-05-03  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	simple.sh: Resurrect.
	* simple.sh: Add src/globals.c, lib/stub/__raise.c.  Use
	lib/linux/malloc.c instead of lib/stdlib/malloc.c.

	simple.make: Resurrect.
	* simple.make (M2_PLANET_FLAGS): Add --bootstrap-mode.
	(M2_SOURCES): Add lib/mes/globals.c.  Use lib/mes/mini-write.c instead
	of lib/mes/write.c.  Use lib/m2/malloc.c instead of lib/stdlib/malloc.c.
	(GCC_SOURCES): Add lib/mes/globals.c
	(check-mescc): Set LIBRARY_PATH.
	(m2): New target.
	(m2/mes-m2.M1): Use it.
	(m2/mes-m2.blood-elf.M1): Likewise.

2022-05-10  Gabriel Wicki  <gabriel@erlikon.ch>

	core: Simplify math expressions.
	* src/gc.c (gc_up_arena): Use division instead of shift.
	(gc_flip): Simplify (free-news) * 1.5.

2022-05-07  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	scaffold: Remove obsolete malloc.
	* scaffold/lib/stdlib/malloc.c: Remove.

2022-09-22  Ekaitz Zarraga  <ekaitz@elenq.tech>

	doc: Fix typos.
	* doc/mes.texi (Invoking mescc): Fix typo.
	* module/mescc.scm (parse-opts): Likewise.

2022-09-21  Ekaitz Zarraga  <ekaitz@elenq.tech>

	mescc: Add X86_64 assembly defines for TinyCC compilation.
	* lib/x86_64-mes/x86_64.M1 ( mov____%si,(%rdi), mov____%sil,(%rdi),
	mov____(%rax),%si, mov____(%rax),%sil): New defines.

2022-10-18  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: When courageous, do build libgetopt and libtcc1.
	* build-aux/build-lib.sh: Move building of libc+gnu and courageous exit
	down.

2022-10-17  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Support bootstrap build without kaem/M2-Planet.
	* configure.sh (M2_PLANET): Typo.  Allow check to fail.
	(KAEM): Allow check to fail.

2022-10-16  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	guix: mes: Update to 0.24.1.
	* guix/git/mes.scm (mes)[source]: Update to 0.24.1.

	doc: Enlarge guix graph bootstrap image.
	* doc/mes.texi (The Mes Bootstrap Process): Use 6in width.

	doc: Typo.
	* doc/announce/ANNOUNCE-0.24.1: Typo.

	doc: Typo.
	* doc/announce/ANNOUNCE-0.24.1 (Subject): Typo.

	doc: Post-release update.
	* doc/announce/ANNOUNCE-0.24.1 (Subject): Update Add gen-announce
	checksums by running `make sum-announce'.
	* build-aux/GNUmakefile.in (--previous-version): Update to 0.24.1.

	guix: mes: Update to 0.24.1.
	* guix/git/mes.scm (mes)[source]: Update to 0.24.1.

2022-10-15  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Release 0.24.1.
	* configure (VERSION): Bump to 0.24.1.
	* configure.sh (VERSION): Likewise.

	doc: Update `ROADMAP'.
	* ROADMAP (release 0.x, unsorted): Add Full Source bootstrap and
	wip-aarch64-bootstrap branch.  Move DONE item...
	(DONE): ...here.

	doc: Add ANNOUNCE-0.24.1.
	* doc/announce/ANNOUNCE-0.24 (Subject): New file.

	doc: Update `NEWS'.
	* NEWS (Changes in 0.24.1 since 0.24): New section.

2022-09-15  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	lib/test: Cater for gcc-12.2.0.
	These inexplicably avoid segfaults with gcc-12.2.0.

	* lib/tests/posix/50-open-read.c (main)[__GNUC__ > 11]: Use malloc
	instead of local allocated string.
	* lib/tests/scaffold/7i-struct-struct.c (main)[__GNUC__ > 11]:
	Initialize all fields of struct.
	* lib/tests/scaffold/t.c (main): Likewise.

2022-06-01  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Update `PORTING'.
	* PORTING (Setup environment): Update guile, gcc-toolchain, pin
	nyacc@1.00.2.

2022-10-07  Rick Masters  <grick23@gmail.com>

	lib: abtol: Fix number digits in hex number conversion.
	After a letter based digit, number based digits are off.

	* lib/mes/abtol.c (abtol): Reset "m" for number based digit.
	* lib/tests/stdlib/70-strtoull.c (main): Test it.
	* lib/tests/stdlib/90-strtol.c (main): Likewise.

2022-09-13  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	ARM: Use explicit remainder in __mesabi_uldiv call.
	This inexplicably fixes a segfault in tcc-boot0.

	* module/mescc/armv4/as.scm (armv4:r0/r1): Instead of using "push 0",
	use explicit slot for remainder.

2022-09-12  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	ARM: Fix unsigned modulo.
	* lib/arm-mes/arm.M1 (mov____%esp,%r3): New macro.
	* module/mescc/armv4/as.scm (armv4:r0%r1): Use it to avoid overwriting
	%r0 before caling __mesabi_uldiv.

2022-09-11  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	test: Add 60-math-modulo.c.
	* lib/tests/scaffold/60-math-modulo.c: New test.
	* build-aux/check-mescc.sh (mes_tests): Add it.

2022-09-13  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	ARM: ntoab: Do not include __mesabi_uldiv for bootstrap tcc.
	* lib/mes/ntoab.c (__mesabi_uldiv): Exclude for tinycc arm bootstrap.

2022-05-21  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Also use stage0_cpu detection in bootstrap.sh build.
	* build-aux/build-scaffold.sh: Include cflags.sh.
	(stage0_cpu): Move to...
	* build-aux/cflags.sh (stage0_cpu): ...here.
	* build-aux/build.sh.in (stage0_cpu): Remove.

2022-05-03  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	kaem: Fix version.
	* src/symbol.c (MES_VERSION): Update to 0.24.

2022-05-14  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Fix configure crashing when no compiler is present.
	Reported by Andrius Štikonas <andrius@stikonas.eu> via IRC.

	* configure (main): Cater for missing cc, actually set m2-planet when
	found.

2022-05-13  Gabriel Wicki  <gabriel@erlikon.ch>

	core: Remove code duplication.
	* src/gc.c (copy_news): Remove copy of copy_cell.
	(gc_copy): Use copy_cell instead.

	core: Remove code duplication.
	* src/gc.c (news_bytes): Remove copy of cell_bytes.
	(gc_copy): Use cell_bytes instead.
	* include/mes/mes.h (news_bytes): Remove prototype.

2022-05-13  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Add publish-local.
	* build-aux/GNUmakefile.in (publish-local): New target.

	doc: Update `README'.
	* README: Update to mention Further Reduced Binary Seed bootstrap.

2022-05-09  Dor Askayo  <dor.askayo@gmail.com>

	Fix definition of S_ISUID.
	* include/sys/stat.h (S_ISUID: Append missing zero.

2022-05-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Fix --with-bootstrap build.
	Reported by Vagrant Cascadian <vagrant@debian.org>.

	* build-aux/build.sh.in: Before building mes using mescc, in bootstrap
	mode, remove globals.o built for lib.

2022-05-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Post-release update.
	* doc/announce/ANNOUNCE-0.24: Add gen-announce checksums.
	* build-aux/GNUmakefile.in (--previous-version): Update to 0.24.  Add
	bug-mes to release announce.

2022-05-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	guix: mes: Update to 0.24.
	* guix/git/mes.scm (mes)[source]: Update to 0.24.

2022-04-30  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Release 0.24.
	* configure (VERSION): Bump to 0.24.
	* configure.sh (VERSION): Likewise.
	* build-aux/GNUmakefile.in (gen-announce): Update previous-version to
	0.23.
	* mes/module/mes/repl.mes (welcome): Update copyright years.

2022-05-01  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Update `ROADMAP'.
	* ROADMAP (release 0.x, unsorted): Move done item...
	(DONE): ...here.

	doc: Add `ANNOUNCE-0.24'.
	* doc/announce/ANNOUNCE-0.24: New file.

2022-04-30  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Update `NEWS'.
	* NEWS (Changes in 0.24 since 0.23): New section.

2019-11-03  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Update `README'.
	* README: Mention Mes can be bootstrapped using M2-Planet.
	Mention Full Source Bootstrap sponsoring by NlNet.

2021-01-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Update 'AUTHORS'.
	* AUTHORS: Mention Jeremiah Orians as co-author on ELF heanders and
	mention M2-Planet imports.  Mention bug fixes by W.J. van der Laan.

2022-04-30  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Update Guix bootstrap status.
	* doc/mes.texi (Bootstrappable Builds): Add reference to Guix.
	(Reduced Binary Seed Bootstrap): Add node and section header.
	(Scheme-only Bootsrap): New section.
	(Full Source Bootstrap): Add node and section header.  Some updates.
	(Stage0): Add node and section header.
	(M2-Planet): New section.
	(The Mes Bootstrap Process): Fix typos, update to current Guix reduced
	binary seed bootstrap status.
	* doc/images/gcc-mesboot-graph.dot: Regenerate.

	doc: Update dependencies, add M2-Planet.
	* INSTALL (Other GNU/Linux): Update mescc-tools requirement, mention
	M2-Planet.
	(Prerequisites): Likewise.
	* doc/mes.texi (Regular Requirements): Likewise.  Rename to...
	(Requirements): ...this.
	(Bootstrap Requirements): Likewise.
	(Building from Git): Mention dependencies on GNU Texinfo, GNU help2man,
	graphviz, and perl.

	doc: Use `guix shell' instead of `guix environment'.
	* HACKING (SETUP): Use `guix shell' instead of `guix environment'.
	* INSTALL (Guix): Likewise.
	* PORTING (Setup environment): Likewise.
	* doc/mes.texi (Building from Git): Likewise.
	* simple.sh: Likewise.
	* guix.scm: Likewise.  Add time-machine with working commit.

2022-05-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Simple signature check for dist and release.
	* build-aux/GNUmakefile.in (check-signature): New target.
	(dist, release): Depend on it.

	build: Add `sum-announce' target.
	* build-aux/GNUmakefile.in (sum-announce): New target.
	(release): Check signature on release commit.

2022-04-30  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	ARM: build: Cater for M2-Planet.
	* include/linux/arm/syscall.h: Add support for M2-Planet.
	* lib/linux/arm-mes-m2/_exit.c,
	lib/linux/arm-mes-m2/_write.c,
	lib/linux/arm-mes-m2/crt1.M1,
	lib/linux/arm-mes-m2/crt1.c,
	lib/linux/arm-mes-m2/syscall.c,
	lib/m2/arm/ELF-arm.hex2,
	lib/m2/arm/arm_defs.M1: New files.
	* build-aux/build.sh.in: Also allow kaem build for ARM.

2022-05-01  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	guix: m2-planet: Update to 1.9.0.
	* guix/git/mes.scm (m2-planet)[source]: Update to 1.9.0.

2022-04-30  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Depend on M2-Planet-1.9.0.
	* configure (main): Bump M2-Planet version to 1.8.0.

2022-05-01  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	guix: mescc-tools: Update to 1.4.0
	* gnu/packages/mes.scm (m2-planet): Update to 1.4.0.
	[native-inputs]: Add which.
	[argument]: Remove patch-prefix stage.

2022-05-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Depend on mescc-tools 1.4.0.
	* configure (main): Check for hex2, M1 1.4.0, and blood-elf 2.0.0.
	* module/mescc/mescc.scm (M1->blood-elf): Use --little-endian with blood-elf call.
	* kaem.run,
	scaffold/argv.kaem,
	scaffold/global-array.kaem,
	scaffold/hello.kaem,
	scaffold/local-array.kaem,
	scaffold/local-static-array.kaem,
	scaffold/main.kaem,
	scaffold/read.kaem,
	simple.make: Likewise.

2022-04-30  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	guix: m2-planet: Update to 1.8.0.
	* guix/git/mes.scm (m2-planet)[source]: Update to 1.8.0.
	[arguments]: Remove patch-prefix stage.
	[home-page]: Fix.

	build: Depend on M2-Planet-1.8.0.
	* configure (main): Bump M2-Planet version to 1.8.0.
	* kaem.run,
	scaffold/argv.kaem,
	scaffold/global-array.kaem,
	scaffold/hello.kaem,
	scaffold/local-array.kaem,
	scaffold/local-static-array.kaem,
	scaffold/main.kaem,
	scaffold/read.kaem:: Use M2-Planet --bootstrap-mode.
	* build-aux/build-scaffold.sh: Remove obsolete --exec_enable.

	guix: Update package inputs to new style.
	* guix/git/mes.scm (m2-planet)[native-inputs]: Use simple list.
	* guix/git/mes.scm (nyacc-0.99): Likewise.
	[inputs]: Use simple list.
	(nyacc): Likewise.
	(mes)[propagated-inputs]: Use simple list.
	[native-inputs]: Use list instead of alist.
	[native-search-paths]: New field.

	Mes C Library: memchr: Avoid compile warning.
	* lib/string/memchr.c (memchr): Cast return to void*.

2021-05-16  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Fix FRAME_SIZE conflict.
	This avoids conflicting with FRAME_SIZE from signal.h.

	* include/mes/constants.h (FRAME_SIZE): Rename to...
	(GC_FRAME_SIZE): ...this.
	(FRAME_PROCEDURE): Rename to...
	(GC_FRAME_PROCEDURE): ...this.
	* src/eval-apply.c (eval_apply): Update accordingly.
	* src/gc.c (gc_push_frame, gc_peek_frame, gc_pop_frame): Update accordingly.
	* src/stack.c (make_frame, make_stack): Update accordingly.

2021-05-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Resurrect gcc-10 support.
	* include/mes/mes.h (g_datadir, g_debug, g_buf, g_continuations,
	g_symbols, g_symbol_max, g_mini, R0, R1, R2, R3, M0, g_macros, g_ports,
	ARENA_SIZE, MAX_ARENA_SIZE, STACK_SIZE, JAM_SIZE, GC_SAFETY, MAX_STRING,
	g_arena, cell_arena, cell_zero, g_free, g_symbol, g_stack_array,
	g_cells, g_news, g_stack, gc_count, gc_start_time, gc_end_time, gc_time,
	__execl_c_argv, __open_boot_buf, __open_boot_file_name, __setenv_buf,
	__reader_read_char_buf, g_start_time, __gettimeofday_time,
	__get_internal_run_time_ts): Declare extern.
	* include/mes/symbols.h ( cell_nil, cell_f, cell_t, cell_dot,
	cell_arrow, cell_undefined, cell_unspecified, cell_closure,
	cell_circular, cell_vm_apply, cell_vm_apply2, cell_vm_begin,
	cell_vm_begin_eval, cell_vm_begin_expand, cell_vm_begin_expand_eval,
	cell_vm_begin_expand_macro, cell_vm_begin_expand_primitive_load,
	cell_vm_begin_primitive_load, cell_vm_begin_read_input_file,
	cell_vm_call_with_current_continuation2, cell_vm_call_with_values2,
	cell_vm_eval, cell_vm_eval2, cell_vm_eval_check_func,
	cell_vm_eval_define, cell_vm_eval_macro_expand_eval,
	cell_vm_eval_macro_expand_expand, cell_vm_eval_pmatch_car,
	cell_vm_eval_pmatch_cdr, cell_vm_eval_set_x, cell_vm_evlis,
	cell_vm_evlis2, cell_vm_evlis3, cell_vm_if, cell_vm_if_expr,
	cell_vm_macro_expand, cell_vm_macro_expand_car,
	cell_vm_macro_expand_cdr, cell_vm_macro_expand_define,
	cell_vm_macro_expand_define_macro, cell_vm_macro_expand_lambda,
	cell_vm_macro_expand_set_x, cell_vm_return, cell_symbol_lambda,
	cell_symbol_begin, cell_symbol_if, cell_symbol_quote,
	cell_symbol_define, cell_symbol_define_macro, cell_symbol_quasiquote,
	cell_symbol_unquote, cell_symbol_unquote_splicing, cell_symbol_syntax,
	cell_symbol_quasisyntax, cell_symbol_unsyntax,
	cell_symbol_unsyntax_splicing, cell_symbol_set_x, cell_symbol_sc_expand,
	cell_symbol_macro_expand, cell_symbol_portable_macro_expand,
	cell_symbol_sc_expander_alist, cell_symbol_call_with_values,
	cell_symbol_call_with_current_continuation, cell_symbol_boot_module,
	cell_symbol_current_module, cell_symbol_primitive_load, cell_symbol_car,
	cell_symbol_cdr, cell_symbol_not_a_number, cell_symbol_not_a_pair,
	cell_symbol_system_error, cell_symbol_throw,
	cell_symbol_unbound_variable, cell_symbol_wrong_number_of_args,
	cell_symbol_wrong_type_arg, cell_symbol_buckets, cell_symbol_builtin,
	cell_symbol_frame, cell_symbol_hashq_table, cell_symbol_module,
	cell_symbol_procedure, cell_symbol_record_type, cell_symbol_size,
	cell_symbol_stack, cell_symbol_argv, cell_symbol_mes_datadir,
	cell_symbol_mes_version, cell_symbol_internal_time_units_per_second,
	cell_symbol_compiler, cell_symbol_arch, cell_symbol_pmatch_car,
	cell_symbol_pmatch_cdr, cell_type_bytes, cell_type_char,
	cell_type_closure, cell_type_continuation, cell_type_function,
	cell_type_keyword, cell_type_macro, cell_type_number, cell_type_pair,
	cell_type_port, cell_type_ref, cell_type_special, cell_type_string,
	cell_type_struct, cell_type_symbol, cell_type_values,
	cell_type_variable, cell_type_vector, cell_type_broken_heart,
	cell_symbol_program, cell_symbol_test): Likewise.
	* src/globals.c: New file.
	* build-aux/configure-lib.sh (mes_SOURCES): Add it.

2021-05-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	guix: m2-planet: Update to 1.7.0-32-gaa3472b.
	This adds support for skipping "extern".

	* guix/git/mes.scm (m2-planet)[source]: Update to 1.7.0-32-gaa3472b.

2021-01-09  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	scaffold: Add local-static-array.c.
	GCC gives

	    12:35:54 janneke@dundal:~/src/mes/wip-m2 [env]
	    $ gcc scaffold/local-static-array.c
	    12:36:01 janneke@dundal:~/src/mes/wip-m2 [env]
	    $ ./a.out
	    hello local static
	    hello local static
	    12:36:04 janneke@dundal:~/src/mes/wip-m2 [env]

	M2-Planet gives

	    12:36:04 janneke@dundal:~/src/mes/wip-m2 [env]
	    $ kaem --verbose --strict --file scaffold/local-static-array.kaem
	     +> M2-Planet --debug --architecture x86 -f lib/mes/globals.c -f lib/linux/x86-mes-m2/mini.c -f lib/mes/mini-write.c -f lib/string/strlen.c -f lib/string/strcpy.c -f lib/mes/eputs.c -f scaffold/local-static-array.c -o scaffold/local-static-array.M1
	    scaffold/local-static-array.c:29:static is not a defined symbol
	    Subprocess error 256
	    ABORTING HARD
	    [1]12:36:07 janneke@dundal:~/src/mes/wip-m2 [env]

	* scaffold/local-static-array.c: New file.
	* scaffold/local-static-array.kaem: New file.

2021-01-09  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	scaffold: Add local-array.c.
	GCC gives

	    12:32:06 janneke@dundal:~/src/mes/wip-m2 [env]
	    $ gcc scaffold/local-array.c
	    12:34:27 janneke@dundal:~/src/mes/wip-m2 [env]
	    $ ./a.out
	    hello local
	    12:34:31 janneke@dundal:~/src/mes/wip-m2 [env]

	M2-Planet gives

	    12:34:31 janneke@dundal:~/src/mes/wip-m2 [env]
	    $ kaem --verbose --strict --file scaffold/local-array.kaem
	     +> M2-Planet --debug --architecture x86 -f lib/mes/globals.c -f lib/linux/x86-mes-m2/mini.c -f lib/mes/mini-write.c -f lib/string/strlen.c -f lib/string/strcpy.c -f lib/mes/eputs.c -f scaffold/local-array.c -o scaffold/local-array.M1
	    scaffold/local-array.c:29:ERROR in collect_local
	    Missing ;
	    Subprocess error 256
	    ABORTING HARD
	    [1]12:34:42 janneke@dundal:~/src/mes/wip-m2 [env]

	* scaffold/local-array.c: New file.
	* scaffold/local-array.kaem: New file.

2021-01-09  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	scaffold: Add global-array.c.
	GCC gives

	    12:30:45 janneke@dundal:~/src/mes/wip-m2 [env]
	    $ gcc scaffold/global-array.c
	    12:31:53 janneke@dundal:~/src/mes/wip-m2 [env]
	    $ ./a.out
	    hello global
	    12:31:54 janneke@dundal:~/src/mes/wip-m2 [env]

	M2-Planet gives

	    12:31:54 janneke@dundal:~/src/mes/wip-m2 [env]
	    $ kaem --verbose --strict --file scaffold/global-array.kaem
	     +> M2-Planet --debug --architecture x86 -f lib/mes/globals.c -f lib/linux/x86-mes-m2/mini.c -f lib/mes/mini-write.c -f lib/string/strlen.c -f lib/string/strcpy.c -f lib/mes/eputs.c -f scaffold/global-array.c -o scaffold/global-array.M1
	    scaffold/global-array.c:20:Received [ in program
	    Subprocess error 256
	    ABORTING HARD
	    [1]12:32:06 janneke@dundal:~/src/mes/wip-m2 [env]

	* scaffold/global-array.c: New file.
	* scaffold/global-array.kaem: New file.

2021-01-01  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Add test hints to `HACKING'.
	* HACKING (TESTING): New section.

2021-01-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	Revert "Mes C Library: m2/execve.c: Remove specialization."
	This fixes

	    gcc-lib/libc+gnu.c: At top level:
	    gcc-lib/libc+gnu.c:2694:1: error: conflicting types for ‘execve’
	     execve (char const *file_name, char **argv, char **env)
	     ^~~~~~
	    In file included from gcc-lib/libc+gnu.c:492:0:
	    include/unistd.h:66:5: note: previous declaration of ‘execve’ was here
	     int execve (char const *file, char *const argv[], char *const env[]);
	         ^~~~~~

	This reverts commit 828c27a073896facdc3a3b24265ee69f0033f58f.

2021-01-01  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	bootstrap: Update M2-Planet x86 definitions from 1.7.0-31-g358b6cf.
	* lib/m2/x86/x86_defs.M1: Update.

	guix: m2-planet: Update to 1.7.0-31-g358b6cf.
	* guix/git/mes.scm (m2-planet)[source]: Update to 1.7.0-31-g358b6cf.

	Revert "Mes C Library: m2/getcwd.c: Remove specialization."
	This reverts commit 37f44ce9453ef5589b1336c981360de16c154999.

	core: Move __getcwd_buf to Mes C Library.
	* include/mes/mes.h (__getcwd_buf): Move to..
	* lib/posix/getcwd.c (__getcwd_buf): ...here.
	(getcwd): Refactor.
	* src/posix.c (getcwd_): Do not use __getcwd_buf.

	bootstrap: Support building with M2-Planet 1.4.
	* lib/m2/x86/x86_defs.M1 (NOP): New define.

2021-01-01  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Only use signed division when numerator is signed.
	Currently, sign-extension (CLTD vs XOR EDX) and signed division (IDIV vs
	DIV) selected by setting "signed?".  See, module/mescc/x86/as.scm.
	Possibly we need a signed? based on numerator and denominator, and
	add a extend-sign? based on the signedness of the numerator?

	* module/mescc/compile.scm (expr->register): Base "signed?" strictly on
	signedness of numerator.

2021-01-01  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Use unsigned type for sizeof expression.
	* module/mescc/compile.scm (ast->type): Use unsigned type for sizeof
	expression.

	mescc: Respect integer literal type suffixes.
	* module/mescc/compile.scm (ast->type): Respect ULL, UL, U, LL, L suffix
	on integer literals.

	core: Use unsigned constants.
	* src/gc.c (FRAME_SIZE, M2_CELL_SIZE): Declare unsigned.
	(gc_init): Use unsigned suffixes for divisions.
	* src/posix.c (TIME_UNITS_PER_SECOND): Declare unsigned.
	(UL1000000000): New constant.
	(seconds_and_nanoseconds_to_long): Use it.
	* src/gc.c (U10, U100): New constants.
	(gc_init): Use them.

	core: Use size_t instead of long for gc sizes.
	* include/mes/mes.h (ARENA_SIZE, MAX_ARENA_SIZE, STACK_SIZE, JAM_SIZE,
	GC_SAFETY, MAX_STRING): Use size_t instead of long.

	core: Avoid Floating point exception dividing negative numbers.
	* src/posix.c (seconds_and_nanoseconds_to_long): Use unsigned division.

2021-01-01  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Avoid Floating point exception dividing negative numbers.
	This fixes

	    kaem --verbose --strict
	    bin/mes-m2 -c '(display (modulo -1 -1))'

	* src/math.c (modulo): Use unsigned division.

2021-01-01  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	bootstrap: Use ./pre-inst-env mescc default.
	* configure.sh: When CC is mescc, M2-Planet or unset, use
	"./pre-inst-env mescc" as default.

2020-12-30  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	tests: string-join: Be noisy.
	* scaffold/boot/50-string-join.scm ("string-join\n"): Avoid exit 0
	without output.

2019-11-16  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mes: simple-format: Use core display.
	* mes/module/mes/simple-format.mes: Do not import (mes display).

2019-11-10  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mes: Resurrect backtraces.
	* mes/module/mes/catch.mes (%eh): Resurrect backtraces.
	(display-frame): New function.
	(display-backtrace): Use it.

	core: Add abort.
	* lib/stub/__raise.c: New file.
	* kaem.run: Use it.
	* src/posix.c (__raise)[SYSTEM_LIBC]: New macro.
	 (abort_): New function: possibly use it.
	* include/mes/builtins.h: Declare it.
	* src/builtins.c (mes_builtins): Register it.

2020-12-30  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mes: Remove PEG.
	PEG is not used and mostly broken.

	* mes/module/mes/peg.mes,
	mes/module/mes/peg/cache.scm,
	mes/module/mes/peg/codegen.scm,
	mes/module/mes/peg/simplify-tree.scm,
	mes/module/mes/peg/string-peg.scm,
	mes/module/mes/peg/using-parsers.scm,
	tests/peg.test: Remove.
	* AUTHORS: Remove mention.

2020-12-30  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	.dir-locals: Add test macro indentation.
	* .dir-locals.el (scheme-mode): Add indentation for pass-if,
	pass-if-not, pass-if-eq, pass-if-equal, expect-fail, pass-if-timeout.

	mescc: Use (format (current-error-port) ...) instead of stderr.
	* module/mescc/M1.scm: Use (format (current-error-port) ...) instead of
	stderr.
	* module/mescc/compile.scm: Likewise.
	* module/mescc/mescc.scm: Likewise.
	* module/mescc/preprocess.scm: Likewise.

2020-12-31  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Add gc-stats.
	* include/mes/mes.h (gc_start_time, gc_end_time, gc_time): New
	variables.
	* src/mes.c (init): Initialize them.
	* src/gc.c: Use them.
	* src/gc.c (gc_stats): New function.
	* include/mes/builtins.h: Declare it.
	* src/builtins.c (mes_builtins): Register it.
	* tests/gc.test: Use it.

2020-12-29  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Avoid Floating point exception dividing negative numbers.
	This fixes

	    kaem --verbose --strict
	    bin/mes-m2 -c '(display (/ -1 1))'

	* src/math.c (divide): Use signed division.

2020-12-29  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	Mes C Library: m2/execve.c: Remove specialization.
	* lib/linux/execve.c (execve): Cater for M2-Planet.
	* lib/m2/execve.c: Remove.
	* kaem.run: Update accordingly.
	* simple.make (M2_SOURCES): Likewise.

	Mes C Library: m2/getcwd.c: Remove specialization.
	* lib/posix/getcwd.c (getcwd): Cater for M2-Planet.
	* lib/m2/getcwd.c: Remove.
	* kaem.run: Update accordingly.
	* simple.make (M2_SOURCES): Likewise.

	Mes C Library: m2/ioctl.c: Remove specialization.
	* lib/stub/ioctl.c (ioctl3): Move to...
	* lib/stub/ioctl3.c: ...new file.
	* lib/m2/ioctl3.c: Move to...
	* lib/linux/ioctl3.c: ...here.
	* include/mes/lib.h (ioctl3): Declare it.
	* lib/m2/isatty.c (isatty): Use it.
	* build-aux/configure-lib.sh (libc_SOURCES): Include it; move
	lib/linux/ioctl.c to ...
	(libc_gnu_SOURCES): ... here.
	* kaem.run: Update accordingly.
	* simple.make (M2_SOURCES): Likewise.
	* simple.sh (compiler): Likewise.

	Mes C Library: m2/ntoab.c: Remove specialization.
	* lib/mes/ntoab.c (__mesabi_uldiv)[__M2_PLANET__ || !(__MESC__ &&
	__arm__)]:  New function.
	* lib/mes/ntoab.c (ntoab): Use it to cater for M2-Planet.
	* lib/m2/ntoab.c: Remove.
	* kaem.run: Update accordingly.
	* simple.make (M2_SOURCES, (M2_TODO): Likewise.

	build: Resurrect simple.sh.
	* simple.sh: Do not attempt to build multiple C files with mescc.
	Update for new and split C files.

	guix: m2-planet: Update to 1.7.0.
	* guix/git/mes.scm (m2-planet)[source]: Update to 1.7.0.
	(native-inputs): Remove gcc-toolchain-7.
	[arguments]: Add CC to make-flags.  Update sha256sum patch.

	core: Prepare for M2-Planet 1.7.0.
	* src/eval-apply.c (expand_variable_, apply_builtin): Declare variables
	at toplevel.
	* src/gc.c (gc_cellcpy, gc_loop, gc_dump_arena): Likewise.
	* src/hash.c (hash_table_printer): Likewise.
	* src/lib.c (equal2_p): Likewise.
	* src/math.c (greater_p, less_p, is_p, minus, plus, divide, multiply,
	logand, logior, logxor): Likewise.
	* src/posix.c (current_input_port, execl_): Likewise.
	* src/reader.c (reader_read_string): Likewise.
	* src/stack.c (make_stack): Likewise.
	* src/string.c (list_to_cstring, bytes_to_list, string_append):
	Likewise.
	* src/struct.c (make_struct): Likewise.
	* src/vector.c (vector_to_list): Likewise.

	mescc: Mes C Library: Prepare for M2-Planet 1.7.0.
	* lib/m2/ntoab.c (ntoab): Declare variables at toplevel.
	* lib/mes/abtol.c (abtol): Likewise.
	* lib/posix/getenv.c (getenv): Likewise.
	* lib/posix/setenv.c (setenv): Likewise.

	mescc: Mes C Library: isatty: Use fixed array size for M2-Planet.
	* lib/m2/isatty.c (struct ktermios)[c_cc]: Hardcode to size 19.

	mescc: Mes C Library: Update M2-Planet macros.
	* lib/m2/x86/x86_defs.M1: Update from M2-Planet 1.7.0.

2020-11-01  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mes: compatibility: Move (mes pmatch) to (system base pmatch).
	* mes/module/system/base/pmatch.scm: Move from mes/pmatch.scm.  Update
	users.

	mes: compatibility: Make base.mes pure guile.
	* mes/module/mes/type-0.mes (procedure?): New function.  Rewrite
	without `cond' from
	* mes/module/mes/base.mes (procedure?): here; Remove.

2020-10-18  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Cater for M2-Planet.
	* configure: Drop MES_SEED, support M2-Planet.
	* kaem.run: Also build bin/mes.
	* build-aux/bootstrap.sh.in: Run kaem bootstrap.
	* build-aux/build.sh.in: Set stage0_cpu.  On x86, run kaem bootstrap.
	Build bin/mes.  Update scripts and users.
	* build-aux/install.sh.in: Install all built bin/mes-* flavours.

	guix: Update M2-Planet to 1fc2aeab483208bd2ba117b21df3894c182470ec.
	* guix/git/mes.scm (m2-planet): Update to 1fc2aeab483208bd2ba117b21df3894c182470ec.
	(native-inputs): Add gcc-toolchain-7.
	* lib/m2/x86/x86_defs.M1: Update from M2-Planet.

	guix: Add m2-planet.
	* guix/git/mes.scm (m2-planet): New variable.

2020-10-18  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Use casting functions.
	Silence all casting errors by using casting functions.

	* src/cc.c (cast_charp_to_scmp, cast_charp_to_scmpp,
	cast_voidp_to_charp, cast_scmp_to_long, cast_scmp_to_charp): New function.
	* src/m2.c (cast_charp_to_scmp, cast_charp_to_scmpp,
	cast_voidp_to_charp, cast_scmp_to_long, cast_scmp_to_charp): New function.
	* include/mes/mes.h: Declare them.
	(struct scm): Add car_value, cdr_value, function.
	(g_continuations): Change to long.
	* src/mes.c: Silence all casting errors by using casting functions.

2020-10-18  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Use casting functions.
	Silence all casting errors by using casting functions.

	* lib/mes/cast.c: New file.
	* build-aux/configure-lib.sh (libmes_SOURCES): Add it.
	* lib/m2/cast.c: New file.
	* kaem.run: Add it.
	* simple.make: Add them both.
	* include/mes/lib.h: Add cast prototypes.
	* include/m2/lib.h: Likewise.
	* lib/linux/_getcwd.c (_getcwd): Use them.
	* lib/linux/access.c (access): Likewise.
	* lib/linux/brk.c (brk): Likewise.
	* lib/linux/chmod.c (chmod): Likewise.
	* lib/linux/clock_gettime.c (clock_gettime): Likewise.
	* lib/linux/gettimeofday.c (gettimeofday): Likewise.
	* lib/linux/unlink.c (unlink): Likewise.
	* lib/mes/fdputc.c (fdputc): Likewise.
	* lib/stdio/putchar.c (putchar): Likewise.
	* lib/linux/malloc.c (malloc): Likewise.

2020-10-18  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Switch to pointer cells.
	Run

	   build-aux/pointer.sh

	* include/mes/macros.h: Remove.
	* src/*.c: Update.
	* include/mes/*.h: Update.
	* simple.make: Update.
	* kaem.run: Update.

2020-09-27  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Update snarfer.
	* build-aux/mes-snarf.scm (symbol->header): Update for pointer cells.
	(snarf-symbols): Likewise.
	(snarf-functions): Likewise.

2020-09-20  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Drop support for number based cells.
	This removes the POINTER_CELLS define and all its references.

	* simple.make (CFLAGS): Remove -D POINTER_CELLS.
	* include/mes/mes.h: Remove #define POINTER_CELLS.
	* include/mes/cc.h: Remove !POINTER_CELLS branches.
	* include/mes/macros.h: Likewise.
	* src/gc.c: Likewise.
	* src/symbol.c: Likewise.
	* src/test/gc.c: Likewise.

2020-09-20  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: gc: Pointer cells: Drop cells->news->cells flipping.
	* src/gc.c (gc_init): Undo doubling of initial memory.
	(gc_init_news)[!GC_NOFLIP]: Remove.
	(gc_)[!GC_NOFLIP]: Remove symbol relocation.
	(gc)[!GC_NOFLIP]: Remove second gc.

	core: gc: Abort upon broken heart failure.
	* src/gc.c (gc_cellcpy, gc_loop): Abort upon broken heart failure.

	core: gc: Enable memory dump debugging.
	* src/gc.c (gc): If MES_DUMP is set, dump arena.  [POINTER_CELLS &&
	!GC_NOFLIP]: Run gc_ twice to enable comparing memory dumps.

2020-09-14  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: gc: Add gc_dump_arena.
	* src/gc.c (dumpc, dumps, gc_dump_register, gc_dump_state,
	gc_dump_stack, gc_dump_arena): New function.

2020-09-13  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Pointer cells: Allow smaller memory footprint using cellcpy.
	* src/gc.c (gc_init)[GC_NOFLIP]: Do not use double sized arena.
	(gc_cellcpy): New function.
	* src/gc.c (gc_flip): Use it, do not flip.
	(gc_init_news)[GC_NOFLIP]: Update.

2020-08-17  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	test/gc: Add three extra gc's.
	* src/test/gc.c (test_gc): Add three extra gc's.

2020-08-16  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	test/gc: struct.
	* src/test/gc.c (test_struct): New function.
	(main): Call it.

	test/gc: vector.
	* src/test/gc.c (test_vector): New function.
	(main): Call it.
	(print_arena): New function.
	(test_gc): Call it.

	test/gc: string.
	* src/test/gc.c (test_string): New function.
	(main): Call it.

	test/gc: list.
	* src/test/gc.c (test_list): New function.
	(main): Call it.

	test/gc: cons.

	test/gc: number.
	* src/test/gc.c (test_number): New function.
	(main): Call it.

	test/gc: empty.
	* src/test/gc.c (test_empty): New function.

2020-08-18  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: eval-apply: Prepare for M2-Planet.
	* src/eval-apply.c (apply_builtin): Split M2-Planet specific and CC
	specifi part off to ..
	* src/cc.c: New file, and
	* build-aux/configure-lib.sh (mes_SOURCES): Add it.
	* src/m2.c: New file.
	* simple.make (MES_SOURCES, M2_SOURCES): Likewise.

2020-08-18  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: display: Prepare for pointer cells, M2-Planet.
	Rewrite C-constructs not supported by M2-Planet

	    if (foo)               -> if (foo != 0)
	    if (!foo)              -> if (foo == 0)
	    ;                      -> 0;
	    // ...                 -> /* ... */

	* src/display.c (display_helper): Use cell_ref.

2020-08-16  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: gc: Prepare for pointer cells, M2-Planet.
	* include/mes/mes.h (cell_zero): Declare.
	* src/gc.c (gc_init): Initialize it.
	(gc_init_news): Likewise.

2020-08-18  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Remove cell_call_with_current_continuation special.
	* include/mes/symbols.h (cell_call_with_current_continuation): Remove.
	* src/eval-apply.c (eval_apply): Update to use
	cell_symbol_call_with_current_continuation.
	* src/symbol.c (init_symbols_): Remove inititialization.

	core: Remove cell_begin special.
	* include/mes/symbols.h (cell_begin): Remove.
	* src/eval-apply.c (eval_apply): Update to use cell_symbol_begin.
	* src/symbol.c (init_symbols_): Remove initialization.

	core: Remove unused symbols.
	* include/mes/symbols.h (cell_symbol_dot, cell_symbol_read_input_file,
	cell_symbol_write, cell_symbol_display): Remove
	* src/symbol.c (init_symbols_): Remove initializations.

	core: builtins: MES_MINI.
	* include/mes/mes.h (g_mini): New global.
	* src/mes.c (init): Initialize it with environment variable MES_MINI.
	* src/builtins.c (mes_builtins): Register a minimal set of builtins
	when g_mini.

2020-08-16  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	boot: Add gc test.
	* scaffold/boot/gc.test: New file.
	* build-aux/check-boot.sh (TESTS): Add it.
	* include/mes/symbols.h (cell_symbol_program): New symbol.
	* src/symbol.c (init_symbols_): Initialize it.
	* src/mes.c (main): Add it to environment.

	test/gc: Add gc inspection test.
	* src/test/gc.c (main): New unit test.
	* simple.make (test-gcc, test-m2): New target to build it.
	* build-aux/pointer.sh: Add it.

	core: make_struct: Avoid creating garbage.
	* src/struct.c (make_struct): Use STRUCT TYPE PRINTER FIELD0 ... FIELDN.

	core: make-vector: Move to core.
	* src/vector.c (make_vector_): Rename from make_vector__.  Add
	parameter.  Fix double allocation.
	(make_vector): Rename from make_vector_.  Use arity n.  Update users.

2020-08-09  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Add M2-Planet support.
	Mes can now be built with M2-Planet by running

	    kaem --verbose --strict

	* include/linux/x86/syscall.h (SYS_getcwd, SYS_dup, SYS_dup2,
	SYS_unlilnk, SYS_gettimeofday, SYS_clock_gettime, SYS_time): Move to
	libc section.  Add M2-Planet constants.
	* include/m2/lib.h (struct timezone, struct timespec): struct timeval):
	Define.  Add M2-Planet flavor prototypes for mes libc.
	* include/mes/m2.h: Remove macros.
	* include/mes/mes.h (g_start_time, __gettimeofday_time,
	__get_internal_run_time_ts): Declare.
	* src/mes.c (init): Initialize them.
	* src/posix.c: Use them.
	* lib/linux/_getcwd.c: Support M2-Planet.
	* lib/linux/access.c: Likewise.
	* lib/linux/chmod.c: Likewise.
	* lib/linux/clock_gettime.c: Likewise.
	* lib/linux/dup.c: Likewise.
	* lib/linux/dup2.c: Likewise.
	* lib/linux/gettimeofday.c: Likewise.
	* lib/linux/read.c: Likewise.
	* lib/linux/unlink.c: Likewise.
	* lib/mes/fdgetc.c: Likewise.
	* lib/mes/fdputc.c: Likewise.
	* lib/posix/getenv.c: Likewise.
	* lib/posix/setenv.c: Likewise.
	* lib/stdlib/realloc.c: Likewise.
	* lib/string/memcmp.c: Likewise.
	* lib/string/memcpy.c: Likewise.
	* lib/m2/abtol.c: New file.
	* lib/m2/chmod.c: New file.
	* lib/m2/clock_gettime.c: New file.
	* lib/m2/execv.c: New file.
	* lib/m2/execve.c: New file.
	* lib/m2/exit.c: New file.
	* lib/m2/getcwd.c: New file.
	* lib/m2/ioctl.c: New file.
	* lib/m2/isatty.c: New file.
	* lib/m2/ntoab.c: New file.
	* lib/m2/strncmp.c: New file.
	* lib/m2/time.c: New file.
	* lib/m2/waitpid.c: New file.
	* simple.make: Use them.  Remove macro preprocessing for M2-Planet.
	* kaem.run: New file.

2020-08-22  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: posix: Prepare for M2-Planet.
	* src/posix.c (access_p): Prepare for M2-Planet.

2020-07-25  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Add waitpid for M2-Planet.
	* lib/m2/waitpid.c: New file.

	mescc: Mes C Library: Add time for M2-Planet.
	* lib/m2/time.c: New file.

	mescc: Mes C Library: Add ntoab for M2-Planet.
	* lib/m2/ntoab.c: New file.

	mescc: Mes C Library: Add isatty for M2-Planet.
	* lib/m2/isatty.c: New file.

	mescc: Mes C Library: Add ioctl for M2-Planet.
	* lib/m2/ioctl.c: New file.

	mescc: Mes C Library: Add getcwd for M2-Planet.
	* lib/m2/getcwd.c: New file.

	mescc: Mes C Library: Add exit for M2-Planet.
	* lib/m2/exit.c: New file.

	mescc: Mes C Library: Add execve for M2-Planet.
	* lib/m2/execve.c: New file.

	mescc: Mes C Library: Add execv for M2-Planet.
	* lib/m2/execv.c: New file.

	mescc: Mes C Library: Add clock_gettime for M2-Planet.
	* lib/m2/clock_gettime.c: New file.

	mescc: Mes C Library: Add chmod for M2-Planet.
	* lib/m2/chmod.c: New file.

2020-07-25  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Add M2-Planet support.
	Mes can now be built with M2-Planet by running

	    kaem --verbose --strict

	* include/linux/x86/syscall.h (SYS_getcwd, SYS_dup, SYS_dup2,
	SYS_unlilnk, SYS_gettimeofday, SYS_clock_gettime, SYS_time): Move to
	libc section.  Add M2-Planet constants.
	* include/m2/lib.h (struct timezone, struct timespec): struct timeval):
	Define.  Add M2-Planet flavor prototypes for mes libc.
	* include/mes/m2.h: Remove macros.
	* include/mes/mes.h (g_start_time, __gettimeofday_time,
	__get_internal_run_time_ts): Declare.
	* src/mes.c (init): Initialize them.
	* src/posix.c: Use them.
	* simple.make: Use them.  Remove macro preprocessing for M2-Planet.
	* kaem.run: New file.

2020-07-25  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Prepare for M2-Planet: realloc.
	* lib/stdlib/realloc.c (realloc): Prepare for M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: fdputc.
	* lib/mes/fdputc.c (fdputc): Prepare for M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: unlink.
	* lib/linux/unlink.c (unlink): Prepare for M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: read.
	* lib/linux/read.c (read): Prepare for M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: gettimeofday.
	* lib/linux/gettimeofday.c (gettimeofday): Prepare for M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: dup2.
	* lib/linux/dup2.c (dup2): Prepare for M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: dup.
	* lib/linux/dup.c (dup): Prepare for M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: clock_gettime.
	* lib/linux/clock_gettime.c (clock_gettime): Prepare for M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: chmod.
	* lib/linux/chmod.c (chmod): Prepare for M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: access.
	* lib/linux/access.c (access): Prepare for M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: _getcwd.
	* lib/linux/_getcwd.c (_getcwd): Prepare for M2-Planet.

2020-07-19  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Split-out stack.c
	* src/lib.c (exit_, frame_printer, make_frame_type, make_frame,
	make_stack_type, make_stack, stack_length, stack_ref_): Move to ..
	* src/posix.c (exit_): Here and to ..
	* src/core.c: New file.
	* build-aux/configure-lib.sh (mes_SOURCES): Add it.
	* simple.make (LIBMES_SOURCES): Likewise.
	* build-aux/snarf.sh: Likewise.
	* include/mes/builtins.h: Update.
	* src/builtins.c (mes_builtins): Update.

	core: Split-out core.c.
	* src/mes.c (assoc_string, car, cdr, list, null_p, eq_p, values, acons,
	length__, length, error, append2, append_reverse, reverse_x_, assq,
	assoc): Move to ...
	* src/core.c: New file.
	* build-aux/configure-lib.sh (mes_SOURCES): Add it.
	* simple.make (MES_SOURCES): Likewise.
	* build-aux/snarf.sh: Likewise.
	* include/mes/builtins.h: Update.
	* src/builtins.c (mes_builtins): Update.

2020-08-01  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Bugfix __ungetc_clear.
	* lib/m2/mes_open.c (mes_open): Remove __ungetc_init ();
	* lib/m2/open.c (open): Likewise.

2020-07-15  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	kaem: scaffold/read.kaem.
	* .gitignore: Update.
	* include/linux/x86/syscall.h: Update for M2-Planet.
	* lib/linux/brk.c (brk): Remove cast for M2-Planet.
	* lib/linux/x86-mes-m2/syscall.c: New file.
	* lib/m2/malloc.c: New file.
	* lib/string/memset.c (memset): Update for M2-Planet.
	* scaffold/read.c: Update for M2-Planet.
	* scaffold/kaem.read: New file.

	kaem: scaffold/argv.kaem.
	* scaffold/argv.c (strcmp): Remove.
	(main): Update.
	* scaffold/argv.kaem: New file.
	lib/x86-mes/x86.M1 (mov____%edi,%ebp, mov____%esp,%edi): New macro.

	kaem: scaffold/hello.kaem.
	* include/m2/lib.h: New file.
	* scaffold/hello.kaem: New file.

	kaem: scaffold/main.kaem.
	* lib/linux/x86-mes-m2/crt1.c,
	lib/linux/x86-mes-m2/crt1.M1,
	lib/linux/x86-mes-m2/_exit.c,
	lib/linux/x86-mes-m2/_write.c: New files.
	* lib/m2/x86/x86_defs.M1: New file.  Import from stage0.
	* lib/m2/x86/ELF-x86.hex2: New file.  Import from M2-Planet.
	* scaffold/main.c: Update for M2-Planet.
	* scaffold/main.kaem: New file.
	* .gitignore: Update.

2020-07-18  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Prepare for M2-Planet: if (foo).
	Rewrite C-constructs not supported by M2-Planet

	    if (foo)              -> if (foo != 0)

	* src/posix.c: Rewrite C-constructs not supported by M2-Planet.
	(current_input_port): Likewise.
	* src/display.c (display_helper): : Likewise.
	* src/eval-apply.c (expand_variable_): : Likewise.
	(eval_apply): : Likewise.
	* src/mes.c (open_boot): : Likewise.
	* src/reader.c (reader_read_identifier_or_number): : Likewise.
	* src/symbols.c (init_symbol): : Likewise.

2020-07-17  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Outline hashq_get_handle, hash_set_x_.
	* src/hash.c (hashq_ref): Use hashq_get_handle.
	(hashq_set_x_): Enable.
	(hash_set_x): Use it.

2020-07-18  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Prepare for M2-Planet: continue.
	Rewrite C-constructs not supported by M2-Planet

	    continue              -> goto LABEL

	* src/eval-apply.c (eval_apply): Add label: begin_expand_while.  Use it
	instead of continue.

2020-07-17  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Prepare for M2-Planet: VALUE/TYPE indirections.
	Rewrite C-constructs not supported by M2-Planet

	    VALUE (CAR (foo))           -> SCM a = CAR (foo); VALUE (a)
	    TYPE (CAR (foo))            -> SCM t = CAR (foo); TYPE (a)

	* src/builtins.c (builtin_function): Use VALUE indirections.
	(builtin_printer): Likewise.
	* src/eval-apply.c (apply_builtin): Likewise.
	(get_macro): Likewise.
	(expand_variable_): Likewise.
	(eval_apply): Likewise.
	* src/hash.c (hashq_get_handle): Likewise.
	(hashq_ref): Likewise.
	(hash_ref): Likewise.
	(hash_set_x): Likewise.
	(hash_table_printer): Likewise.
	* src/math.c (greater_p): Likewise.
	(less_p): Likewise.
	(is_p): Likewise.
	(minus): Likewise.
	(plus): Likewise.
	(divide): Likewise.
	(multiply): Likewise.
	(logand): Likewise.
	(logior): Likewise.
	(logxor): Likewise.
	* src/posix.c (current_input_port): Likewise.
	(set_current_output_port): Likewise.
	* src/reader.c (reader_read_list): Likewise.
	(reader_read_character): Likewise.
	(reader_read_string): Likewise.
	* src/string.c (list_to_cstring): Likewise.
	(read_string): Likewise.

2020-07-16  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Prepare for M2-Planet: M2_CELL_SIZE.
	* src/gc.c (M2_CELL_SIZE): Hack for missing pointer arithmetic in
	M2-Planet.
	(gc_init, alloc, make_cell, gc_up_arena, gc_copy, gc_loop, gc_): Use it.

2020-07-18  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Use unique assert_msg.
	* src/mes.c (error): Use unique assert_msg.

2020-07-16  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: read_string: Prepare for M2-Planet.
	* src/string.c (read_string): Prepare for M2-Planet.

	core: string_equal_p: Prepare for M2-Planet.
	* src/string.c (string_equal_p): Prepare for M2-Planet.

	core: reader_read_block_comment: Prepare for M2-Planet.
	* src/reader.c (reader_read_block_comment): Prepare for M2-Planet.

	core: reader_eat_whitespace: Prepare for M2-Planet.
	* src/reader.c (reader_eat_whitespace): Prepare for M2-Planet.

	core: reader_read_sexp_: Prepare for M2-Planet.
	* src/reader.c (reader_read_sexp_): Prepare for M2-Planet.

	core: reader_read_identifier_or_number: Prepare for M2-Planet.
	* src/reader.c (reader_read_identifier_or_number): Prepare for M2-Planet.

	core: open_output_file: Prepare for M2-Planet.
	* src/posix.c (open_output_file): Prepare for M2-Planet.

	core: current_input_port: Prepare for M2-Planet.
	* src/posix.c (current_input_port): Prepare for M2-Planet.

	core: write_byte: Prepare for M2-Planet.
	* src/posix.c (write_byte): Prepare for M2-Planet.

	core: read_char: Prepare for M2-Planet.
	* src/posix.c (read_char): Prepare for M2-Planet.

	core: last_pair: Prepare for M2-Planet.
	* src/lib.c (last_pair): Prepare for M2-Planet.

	core: memq: Prepare for M2-Planet.
	* src/lib.c (memq): Prepare for M2-Planet.

	core: xassq: Prepare for M2-Planet.
	* src/lib.c (xassq): Prepare for M2-Planet.

	core: hash_cstring: Prepare for M2-Planet.
	* src/hash.c (hash_cstring): Prepare for M2-Planet.

	core: eval_apply: Prepare for M2-Planet.
	* src/eval-apply.c (eval_apply): Prepare for M2-Planet.

	core: apply_builtin: Prepare for M2-Planet.
	* src/eval-apply.c (apply_builtin): Prepare for M2-Planet.

	core: formal_p: Prepare for M2-Planet.
	* src/eval-apply.c (formal_p): Prepare for M2-Planet.

	core: builtin_p: Prepare for M2-Planet.
	* src/builtins.c (builtin_p): Prepare for M2-Planet.

	core: assoc: Prepare for M2-Planet.
	* src/mes.c (assoc): Prepare for M2-Planet.

	core: assq: Prepare for M2-Planet.
	* src/mes.c (assq): Prepare for M2-Planet.

	core: eq_p: Prepare for M2-Planet.
	* src/mes.c (eq_p): Prepare for M2-Planet.

	core: assoc_string: Prepare for M2-Planet.
	src/mes.c (assoc_string): Prepare for M2-Planet.

2020-07-14  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Add pointer.sh.
	* build-aux/pointer.sh: New script.

	core: Prepare for pointer cells.
	* include/mes/cc.h: Prepare for pointer-based cells.
	* include/mes/macros.h[POINTER_CELLS]: Alternative set of macros.
	* include/mes/mes.h (struct scm)[POINTER_CELLS]: Alternative definition.
	* src/gc.c (copy_cell, copy_news): New function.
	* include/mes/mes.h: Declare them.

2020-06-22  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: gc: FRAME_SIZE.
	* src/gc.c (gc_loop, gc_): Use FRAME_SIZE.

	core: gc: Fixes.
	* src/gc.c (gc_init, gc_up_arena, gc_flip): Change to void function.
	Fixes 0 returns.
	(make_bytes): Use plain.
	(make_string): Add 1 to length, for zero-terminated C strings.
	(gc_copy): Use plain bytes length.
	(gc_loop): Manually reformat.

2020-06-16  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Create symbols dynamically.
	* include/mes/symbols.h: New file.
	* include/mes/mes.hh: Include it.
	* include/mes/constants.h: Remove symbol constants.
	* src/symbols.c (init_symbols): Create symbols dynamically.
	* build-aux/mes-snarf.scm (snarf-symbols): Update.

2020-05-19  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Remove CBYTES, CSTRING, NCBYTES macros.
	* src/gc.c (cell_bytes, news_bytes): New function.
	* include/mes/macros.h (CBYTES, CSTRING, NCBYTES): Remove.  Update
	users.
	* include/mes/m2.h: Likewise.

	core: Prepare for conversion to pointer cells.
	* src/posix.c (execl_): Prepare for conversion to pointer cells.

	core: Remove dead macros.
	* include/mes/macros.h (CSTRING_STRUCT, START, LEN): Remove.

2020-05-18  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Remove macros from cell creation: make_char .. make_string.
	* src/gc.c (make_char, make_continuation, make_macro, make_number,
	make_ref, make_string0, make_string_port): New function.
	(make_string): Move from string.c.
	* include/mes/macros.h (MAKE_CHAR, MAKE_CONTINUATION, MAKE_MACRO,
	MAKE_NUMBER, MAKE_REF, MAKE_STRING0, MAKE_STRING_PORT): Remove macro.
	Update users.
	* include/mes/m2.h: Likewise.

	core: Remove macros from cell creation: make_bytes.
	* src/gc.c (bytes_cells, make_bytes): Move from string.c.
	* include/mes/macros.h (MAKE_BYTES0, NAME_SYMBOL): Remove.
	* include/mes/m2.h: Likewise.

2020-05-17  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Remove core:make-cell.
	* src/gc.c (alloc, make_cell, cons): Move from mes.c
	* src/mes.c: (make_cell_): Remove.
	* src/lib.c (char_to_integer, integer_to_char): New function.
	* src/builtins.c (mes_builtins): Add them; remove make_cell_.
	* mes/module/mes/type-0.mes (char->integer, integer->char): Remove.

	core: Refactor display.

	core: Upcase register names.
	* include/mes/mes.h (R0, R1, R2, R3, M0): Rename from lower case.
	Update users.

	core: Split-out symbol.c.
	* src/mes.c (init_symbol, mes_symbols): Move to ..
	* src/symbol.c: New file.
	* build-aux/configure-lib.sh (mes_SOURCES): Add it.
	* simple.make: Likewise.
	* include/mes/mes.h: Declare init_symbols.

	core: Split-out display.c.
	* src/lib.c (display_helper, display_, display_error_, display_port_,
	write_, write_error_, write_port_, fdisplay_): Move to ..
	* src/display.c: New file.
	* build-aux/configure-lib.sh (mes_SOURCES): Add it.
	* simple.make: Likewise.

2020-05-31  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: eval-apply: Fix formal_p.
	* src/eval-apply.c (formal_p): Return boolean.

2020-05-17  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Split-out eval-apply.c.
	* src/mes.c (check_formals, check_apply, pairlis, set_car_x, set_cdr_x,
	set_env_x, call_lambda, make_closure_, make_variable_, macro_get_handle,
	get_macro, macro_set_x, push_cc, add_formals, formal_p,
	expand_variable_, expand_variable, apply_builtin, eval_apply, apply):
	Move to ..
	* src/eval-apply.c: New file.
	* build-aux/configure-lib.sh (mes_SOURCES): Add it.
	* simple.make: Likewise.
	* src/eval.c (assert_defined): Likewise.

2020-05-18  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Update mes-snarf.
	* build-aux/snarf.sh: Support C-style annotations.

2020-05-17  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Prepare for M2-Planet: setenv.
	* lib/posix/setenv.c: Rewrite C-constructs not supported by M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: getenv.
	* lib/posix/getenv.c: Rewrite C-constructs not supported by M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: ntoab.
	* lib/mes/ntoab.c: Rewrite C-constructs not supported by M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: malloc.
	* lib/stdlib/malloc.c: Rewrite C-constructs not supported by M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: fdungetc.
	* lib/mes/fdungetc.c: Rewrite C-constructs not supported by M2-Planet.

2020-06-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Bugfix __ungetc_clear.
	* lib/linux/_open3.c (_open3): Remove __ungetc_init ();
	* lib/mes/mes_open.c (mes_open): Likewise.
	* lib/mes/fdungetc.c (fdungetc): Likewise.
	* lib/mes/fdgetc.c (__ungetc_p, __ungetc_clear, __ungetc_set): Call
	__ungetc_init if buffer is uninitialized.

2020-05-17  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Prepare for M2-Planet: fdgetc.
	* lib/mes/fdgetc.c: Rewrite C-constructs not supported by M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: abtol.
	* lib/mes/abtol.c: Rewrite C-constructs not supported by M2-Planet.

2020-06-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: memcmp: bugfix.
	* lib/string/memcmp.c (memcmp): Bugfix.
	* lib/tests/string/50-memcmp.c: Test it.
	* build-aux/check-mescc.sh (TESTS): Add it.

2020-05-17  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Prepare for M2-Planet: memcmp.
	* lib/string/memcmp.c: Rewrite C-constructs not supported by M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: memcpy.
	* lib/string/memcpy.c: Rewrite C-constructs not supported by M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: memchr.
	* lib/string/memchr.c: Rewrite C-constructs not supported by M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: strncmp.
	* lib/string/strncmp.c: Rewrite C-constructs not supported by M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: strlen.
	* lib/string/strlen.c: : Rewrite C-constructs not supported by M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: strcpy.
	* lib/string/strcpy.c: Rewrite C-constructs not supported by M2-Planet.

	mescc: Mes C Library: Prepare for M2-Planet: strcmp.
	* lib/string/strcmp.c: Rewrite C-constructs not supported by M2-Planet.

2020-05-17  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Prepare for M2-Planet: __assert_fail.
	Rewrite C-constructs not supported by M2-Planet, such as

	    foo ? bar : baz;       -> if (foo) bar; else baz;
	    static char foo[1024]  -> __func_buf = malloc (1024); ... char *foo = __func_buf;
	    *foo                   -> foo[0]
	    foo++                  -> foo = foo + 1   TODO: pointer arithmetic
	    foo += 1;              -> foo = foo + 1
	    for (int foo = ;       -> int foo; for (foo=
	    if (foo)               -> if (foo != 0)
	    if (!foo)              -> if (foo == 0)
	    ;                      -> 0;

	* lib/mes/__assert_fail.c: Rewrite C-constructs not supported by
	M2-Planet.

2020-05-17  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Use assert_msg.
	* src/mes.c: Use assert_msg instead of assert.
	* src/gc.c: Likewise.
	* src/hash.c: Likewise.
	* src/lib.c: Likewise.
	* src/math.c: Likewise.
	* src/module.c: Likewise.
	* src/posix.c: Likewise.
	* src/reader.c: Likewise.
	* src/string.c: Likewise.
	* src/struct.c: Likewise.
	* src/vector.c: Likewise.
	* simple.make (LIB_SOURCES): Add lib/mes/assert_msg.c.

2020-04-19  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Add assert_msg.
	* lib/mes/assert_msg.c: New file.

	core: Prepare for M2-Planet: vector.c.
	* src/vector.c: Rewrite C constructs not supported by M2-Planet.

	core: Prepare for M2-Planet: struct.c.
	* src/struct.c: Rewrite C constructs not supported by M2-Planet.

2020-04-20  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Prepare for M2-Planet: string.c.
	* src/string.c: Rewrite C constructs not supported by M2-Planet.

2020-04-19  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Prepare for M2-Planet: reader.c.
	* src/reader.c: Rewrite C constructs not supported by M2-Planet.

2020-04-20  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Prepare for M2-Planet: posix.c.
	* src/posix.c: Rewrite C constructs not supported by M2-Planet.

	core: Prepare for M2-Planet: module.c.
	* src/module.c: Rewrite C constructs not supported by M2-Planet.

	core: Prepare for M2-Planet: math.c.
	* src/math.c: Rewrite C constructs not supported by M2-Planet.

2020-04-19  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Prepare for M2-Planet: lib.c.
	* src/lib.c: Rewrite C constructs not supported by M2-Planet.

	core: Prepare for M2-Planet: hash.c.
	* src/hash.c: Rewrite C constructs not supported by M2-Planet.

	core: Prepare for M2-Planet: gc.c.
	* src/gc.c: Rewrite C constructs not supported by M2-Planet.

	core: Prepare for M2-Planet: builtins.c.
	* src/builtins.c: Rewrite C constructs not supported by M2-Planet.

2020-04-19  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Prepare for M2-Planet: mes.c.
	Rewrite C-constructs not supported by M2-Planet, such as

	    foo ? bar : baz;       -> if (foo) bar; else baz;
	    static char foo[1024]  -> __func_buf = malloc (1024); ... char *foo = __func_buf;
	    *foo                   -> foo[0]
	    foo++                  -> foo = foo + 1   TODO: pointer arithmetic
	    foo += 1;              -> foo = foo + 1
	    for (int foo = ;       -> int foo; for (foo=
	    if (foo)               -> if (foo != 0)
	    if (!foo)              -> if (foo == 0)
	    ;                      -> 0;
	    // ...                 -> /* ... */

	* src/mes.c: Rewrite C constructs not supported by M2-Planet.
	* include/mes/mes.h (__execl_c_argv, __getcwd_buf, __open_boot_buf,
	__open_boot_file_name, __setenv_buf, __reader_read_char_buf): Declare
	buffers.
	(init): Initialize them.
	* include/mes/macros.h(__M2_PLANET__): Temporary M2 macros.

2020-04-19  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Run indent for M2.
	* src/gc.c: Indented.
	* src/string.c: Likewise.

2020-04-20  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: mes-snarf.scm: Resurrect.
	* build-aux/mes-snarf.scm (snarf-functions): Strip whitespace from
	parameter list.
	(function->source): Use function-scm-name, add (function1_t).
	* build-aux/snarf.sh: Resurrect, combined dump to s, h, c.
	* include/mes/builtins.h:

2020-04-19  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	core: Split-out builtins.c.
	* src/mes.c make_builtin_type, make_builtin, builtin_name,
	builtin_arity, builtin_function, builtin_p, builtin_printer,
	init_builtin, mes_builtins): Move to ..
	* src/builtins.c: New file.
	* build-aux/configure-lib.sh (mes_SOURCES): Add it.
	* build-aux/snarf.sh: Likewise.
	* build-aux/build-mes.sh (mes_sources): Remove.  Include
	configure-lib.sh
	* include/mes/builtins.h: Remove constants.
	* include/mes/mes.h: Add prototypes.
	* include/mes/constants.h (cell_symbol_test): Rename from cell_test.
	* simple.make: New file.

2020-04-22  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: simple.make.
	* simple.make: New file.
	* src/posix.c: Make sure to define EOF.

2020-04-25  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	tests: Add gc.test.
	* tests/gc.test: New file.
	* build-aux/check-mes.sh (TESTS): Add it.
	* scaffold/gc-test.scm: Remove.

2020-12-29  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	guix: mescc-tools: Update to 1.1.0.
	* guix/git/mes.scm (mescc-tools)[source]: Update to 1.1.0.
	[arguments]: Update sha256sum patch.

2022-05-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Depend on mescc-tools 1.0.0.
	* configure (main): Check for hex2, M1, and blood-elf version 1.0.0.

2021-10-10  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Update to mescc-tools-1.0.0 option names.
	* module/mescc/mescc.scm (M1->hex2):  Update to use --little-endian.
	(hex2->elf): Likewise, and --base-address.
	* module/mescc/mescc.scm (hex2->elf): Likewise, and remove
	--exec_enable.

	build: Update to mescc-tools-1.0.0 option names.
	* build-aux/build-scaffold.sh: Update to use --base-address and
	--little-endian.
	* doc/mes.texi (Regular Requirements): Bump mescc-tools to 1.0.1.
	(Bootstrap Requirements): Likewise.  Bump nyacc to 1.00.2.
	* INSTALL (Other GNU/Linux): Bump mescc-tools to 1.0.1.
	(Prerequisites): Likewise.  bump nyacc to 1.00.2.

	guix: mescc-tools: Update to 1.0.1.
	* guix/git/mes.scm (mescc-tools)[source]: Update to 1.0.1.

2021-11-09  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	Relicense imported LGPL v3+ files to GPL v3+.
	Fixes https://savannah.nongnu.org/task/?16067.
	Reported via savannah by Ineiev <ineiev@gnu.org>.

	* mes/module/mes/lalr.scm,
	module/mes/getopt-long.scm,
	module/mes/optargs.scm: Change header to GNU Mes header with GPL v3.

2021-06-14  Andrius Štikonas  <andrius@stikonas.eu>

	doc: Migration to Libera Chat.
	* BOOTSTRAP: Replace Freenode with Libera Chat.
	* ROADMAP: Likewise.
	* doc/mes.texi: Likewise.

2021-05-08  Vagrant Cascadian  <vagrant@reproducible-builds.org>

	configure: Add no-op for "disable-option-checking" option.
	This is a standard option supported in autoconf.

	In Debian systems using recent versions of debhelper this argument is be
	passed to configure by default.  See <https://bugs.debian.org/942813>
	for more information.

	* configure (parse-opts): Ignore disable-option-checking.

2021-05-07  W. J. van der Laan  <laanwj@protonmail.com>

	mescc: Make -m64 work again.
	* module/mescc/mescc.scm (arch-get-machine): Make that -m64 on the command
	line, which sets machine to "64", returns "64" and not "32".

2021-05-02  W. J. van der Laan  <laanwj@protonmail.com>

	lib/tests: Pass int to va_arg instead of char.
	* lib/tests/scaffold/70-stdarg.c (stdarg1, stdarg2, stdarg3): Pass int
	to va_arg instead of char to avoid gcc trap "warning: 'char’ is promoted
	to ‘int’ when passed through ‘...’ [enabled by default] (so you should
	pass ‘int’ not ‘char’ to ‘va_arg’) if this code is reached, the program
	will abort".

	mes: Prevent out-of-bounds access for stack frame 0.
	* src/lib.c (make_frame): Add a check to prevent reads outside of the
	stack when trying to determine the procedure for stack frame 0.

	mescc: Pass --64 to bloodelf for 64 bit machines.
	* module/mescc/mescc.scm (M1->blood-elf): Pass --64 argument to bloodelf
	for 64-bit machines.  This makes it able to generate the correct ELF
	format.

2021-05-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	configure: Do not use GUILD_OPTIMIZE=-O1 for Guile-2.
	This is a follow-up to

	    a0560aff676b0fe8d7d50b365a75ed158347eb3a
	    configure: Use GUILD_OPTIMIZE=-O1 for Guile-3.

	and fixes using Guile-2.0.x, which does not support -O1.

	Reported by W. J. van der Laan <laanwj@protonmail.com>.

	* configure (main): Check for Guile > 2.9.x to set optimization.

2021-05-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: crt: Support more than 255 command line parameters.
	Reported by Paul Dersey <pdersey@gmail.com>.

	* lib/freebsd/x86-mes-gcc/crt1.c (_start): Use mov instead of movzbl for
	argc.
	* lib/linux/x86-mes-gcc/crt0.c (_start): Likewise.
	* lib/linux/x86-mes-gcc/crt1.c (_start): Likewise.
	* lib/freebsd/x86-mes-mescc/crt1.c (_start): Likewise.
	* lib/linux/x86-mes-mescc/crt1.c (_start): Likewise.

2021-05-02  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: malloc.c: Move unix-variant to lib/linux.
	* lib/stdlib/malloc.c: Move to...
	lib/linux/malloc.c: ...here.
	* build-aux/configure-lib.sh (libc_SOURCES): Move malloc.c...
	[linux]: ...here.

2021-05-01  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support --bootstrap build on ARM.
	The ARM port added the `-marm' option to mescc, where previously only
	-m32' (the default) and `-m64' were supported.

	Reported by Vagrant Cascadian <vagrant@reproducible-builds.org>.

	* module/mescc/mescc.scm (arch-get-machine): When machine is "arm",
	return "32".
	* build-aux/build-mes.sh (LIBS)[mescc]: Add -lmescc.

2021-04-21  W. J. van der Laan  <laanwj@protonmail.com>
	    Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mes: Make logand work correctly.
	* src/math.c (logand): Start from -1 instead of 0, so that the bitwise AND-ed
	result is the intersection of bit sets instead of always 0.
	* tests/math.test ("logand", "logand 3"): Test it.

2021-03-14  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Post-release update.
	* README: Update wording.
	* doc/announce/ANNOUNCE-0.23: Likewise.  Add gen-announce checksums.

	guix: mes: Update to 0.23.
	* guix/git/mes.scm (mes)[source]: Update to 0.23.

	build: Release 0.23.
	* configure (VERSION): Bump to 0.23.
	(main): Update mes requirement to 0.22.
	* configure.sh (VERSION): Likewise.

2021-03-14  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Fix broken link in 'README'.
	Reported by Arkadiusz.Ryś <Arkadiusz.Rys@protonmail.com>.

	* README: Fix m2-planet link.

2021-03-14  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Release update.
	* ROADMAP (release 0.x, unsorted): Rewrite, move done items ...
	(DONE): ...here.
	* build-aux/GNUmakefile.in: Update release process.
	(gen-announce): Remove trailing '-'.
	* NEWS (Changes in 0.23 since 0.22): Add section.
	* README: Add armhf-linux, aarch64-linux, NLNet sponsoring, remove
	confusing references to mes-m2 fork.
	* doc/announce/ANNOUNCE-0.23: New file.
	* mes/module/mes/repl.mes: Update copyright years.
	* doc/mes.texi (Porting GNU Mes): Mention that armhf-linux is supported.
	(Regular Requirements): Update.
	* INSTALL (Other GNU/Linux): Likewise.

2021-03-14  Danny Milosavljevic  <dannym@scratchpost.org>

	libtcc1: Fix integer division, modulo and shifting procedures.
	* lib/libtcc1.c (__divdi3): Make parameters integer.
	(__moddi3): Make parameters integer.
	(__udivdi3): Use unsigned division.
	(__umoddi3): Use unsigned modulo.
	(__lshrdi3): Add comment.
	(__ashrdi3): Add comment.

2021-01-23  Danny Milosavljevic  <dannym@scratchpost.org>

	mescc: Mes C Library: Make malloc align the blocks it gives out.
	* include/stddef.h (max_align_t): Add typedef for max_align_t.
	* lib/stdlib/malloc.c (malloc): Align the blocks it gives out to multiples
	of max_align_t.

2021-01-23  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	tests: Update to bin/mes for standalone run.
	* tests/base.test,
	tests/boot.test,
	tests/macro.test,
	tests/perform.test,
	tests/quasiquote.test,
	tests/read.test,
	tests/scm.test,
	tests/srfi-0.test: Default to bin/mes.

	mescc: Mes C Library: div.c: Use only for ARM.
	* build-aux/configure-lib.sh (libmescc_SOURCES): Remove div.c unless
	ARM.

	mescc: Mes C Library: feof: Bugfix for ARM.
	* lib/stdio/feof.c (feof): Use int to compare with EOF.

2021-01-23  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: time.c: Use #if defined.
	This helps resurrect the mes-0.19-based bootstrap.

	* lib/linux/time.c: Use #if defined () instead of plain #if for possibly
	undefined macros.

2021-01-23  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Change --align to --align=functions, --align=globals.
	This makes function alignment optional and disables function alignment
	when using MesCC-Tools 0.5.2 (numbered architecture).

	* module/mescc.scm (parse-opts): Make --align take a value.
	* module/mescc/mescc.scm (mescc:compile, infos->hex2): Parse it and pass
	it as renamed #:align keyword argument to ...
	* module/mescc/M1.scm (infos->M1): ...here.  Rename parameter align? to
	align, pass it to...
	(info->M1): ...here.  Likewise.  Use it to make function alignment
	optional.

2021-01-23  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	libtcc1: Compile float stubs conditionally.
	* lib/libtcc1.c (__floatundidf, __floatundixf, __fixunsxfdi, __fixxfdi,
	__fixsfdi, __fixunsdfdi, __fixunsdfsi, __floatdisf,
	__floatdidf)[!(HAVE_FLOAT_STUB || HAVE_FLOAT)]: Remove.

	libtcc1: Make float stubs weak.
	* lib/libtcc1.c (__floatundidf, __floatundixf, __fixunsxfdi, __fixxfdi,
	__fixsfdi, __fixunsdfdi, __fixunsdfsi, __floatdisf, __floatdidf): Add
	__attribute__ ((weak)).

	mescc: Skip attributes on function definitions.
	* module/mescc/preprocess.scm (ast-strip-attributes): New procedure.
	(c99-input->ast): Use it.

	mescc: Mes C Library: Declare __mesabi_uldiv.
	* include/mes/lib.h (__mesabi_uldiv): Add prototype.

	mescc: Mes C Library: ARM: setjmp.c: Inline fake asm.
	* lib/linux/arm-mes-gcc/_exit.c (longjmp, setjmp): Use inline fake asm.

	mescc: Mes C Library: ARM: syscall.c: Inline fake asm.
	* lib/linux/arm-mes-gcc/syscall.c (__sys_call, __sys_call1, __sys_call2,
	__sys_call3, __sys_call4): Use inline fake asm.

	mescc: Mes C Library: ARM: _write.c: Inline fake asm.
	* lib/linux/arm-mes-gcc/_write.c (_write): Use inline fake asm.

	mescc: Mes C Library: ARM: _exit: Inline fake asm.
	* lib/linux/arm-mes-gcc/_exit.c (_exit): Use inline fake asm.

	mescc: Mes C Library: ARM: _start: Inline fake asm.
	* lib/linux/arm-mes-gcc/crt1.c (_start): Use inline fake asm.

	tests: Add 70-or-argument.c.
	* lib/tests/scaffold/70-or-argument.c: New file.
	* build-aux/check-mescc.sh (tcc_tests): Add it.

	tests: Add 70-function-modulo.c.
	* lib/tests/scaffold/70-function-modulo.c: New file.
	* build-aux/check-mescc.sh (tcc_tests): Add it.

	tests: 70-strchr.c: Rewrite for TinyCC.
	* lib/tests/string/70-strchr.c (main): Use char* hello for comparison.
	Allows for duplication of "hello" string.

2021-01-23  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	test: scaffold/54-argv.c: Support running with TinyCC.
	This fixes running as lib/tests/scaffold/54-argv-i686-unknown-linux-gnu-tcc.

	* lib/tests/scaffold/54-argv.c (main): Compare only first 26 characters
	of argv[0].

2021-01-23  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Split _exit.c, _write.c from mini.c.
	* lib/freebsd/x86-mes-gcc/mini.c: Split into...
	* lib/freebsd/x86-mes-gcc/_exit.c: ...this, and...
	* lib/freebsd/x86-mes-gcc/_write.c: ...this.
	* lib/freebsd/x86-mes-mescc/mini.c: Slpit into...
	* lib/freebsd/x86-mes-mescc/_exit.c: ...this, and...
	* lib/freebsd/x86-mes-mescc/_write.c: ...this.
	* lib/gnu/x86-mes-gcc/mini.c: Split into...
	* lib/gnu/x86-mes-gcc/_exit.c: ...this, and...
	* lib/gnu/x86-mes-gcc/_write.c: ...this.
	* lib/linux/arm-mes-gcc/mini.c: Split into...
	* lib/linux/arm-mes-gcc/_exit.c: ...this, and...
	* lib/linux/arm-mes-gcc/_write.c: ...this.
	* lib/linux/arm-mes-mescc/mini.c: Split into...
	* lib/linux/arm-mes-mescc/_exit.c: ...this, and...
	* lib/linux/arm-mes-mescc/_write.c: ...this.
	* build-aux/configure-lib.sh (libc_mini_shared_SOURCES): Replace mini.c
	with add _exit.c, _write.c.
	* simple.sh: Update accordingly.

2021-01-23  Danny Milosavljevic  <dannym@scratchpost.org>

	mescc: define int64_t and uint64_t only if it's possible to define them as exactly 64 bits.
	* include/stdint.h[__SIZEOF_LONG_LONG__ != 8]: Remove typedefs for int64_t,
	uint16_t.

2021-01-23  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Add __SIZEOF defines for int, long, long long.
	* module/mescc/mescc.scm (arch-get-define): Rename
	to...  (arch-get-defines): ...this.  Return a list of defines: Also
	adding __SIZEOF_INT__, __SIZEOF_LONG__, and add __SIZEOF_LONG_LONG__ if
	it's >=8.
	(mescc:preprocess, c->info): Update callers.
	* include/stdint.h[!__SIZEOF_LONG_LONG__]: Remove typedefs for int64_t,
	uint16_t.

	ARM: Add fake asm for setjmp.c.
	* lib/arm-mes-gcc/setjmp.c (longjmp, setjmp)[__TINYC__]: Add fake asm.

	ARM: Add fake asm for syscall.c.
	* lib/linux/arm-mes-gcc/syscall.c (__sys_call, __sys_call1, __sys_call2,
	__sys_call3, __sys_call4) [__TINYC__]: Add fake asm.

	ARM: Add fake asm for mini.c.
	* lib/linux/arm-mes-gcc/mini.c (_exit, _write)[__TINYC__]: Add fake asm.

	ARM: Add fake asm for crt1.c.
	* lib/linux/arm-mes-gcc/crt1.c (_start)[__TINYC__]: Use fake asm.

	mescc: Mes C Library: Support ARM tcc: Add crti.c, crtn.c.
	* lib/linux/arm-mes-gcc/crti.c: New file.
	* lib/linux/arm-mes-gcc/crtn.c: New file.

	ARM: libtcc1: Add div.c, __memcpy, __memmove, __memset.
	* build-aux/configure-lib.sh (libtcc1_SOURCES)[arm]: Add div.c,
	__memcpy, __memmove, __memset.
	* build-aux/build-source-lib.sh: Generate libtcc1.

	mescc: Mes C Library: Support ARM tcc: Add __memset.
	* lib/string/__memset.c: New file.
	* include/mes/lib.h (__memset): Add prototype.

	mescc: Mes C Library: Support ARM tcc: Add __memmove.
	* lib/string/__memmove.c: New file.
	* include/mes/lib.h (__memmove): Add prototype.

	mescc: Mes C Library: Support ARM tcc: Add __memcpy.
	* lib/string/__memcpy.c: New file.
	* include/mes/lib.h (__memcpy): Add prototype.

	mescc: Mes C Library: abort: Avoid __raise for TinyCC.
	* lib/stdlib/abort.c: Use "raise" instead of __raise.

	doc: Update 'AUTHORS'.
	* AUTHORS: Add Natalie Kopaczewski.

	test: Split-off scaffold/60-math-itoa.c.
	* lib/tests/scaffold/60-math.c (main): Move itoa tests to...
	* lib/tests/scaffold/60-math-itoa.c: ...this new file.
	* build-aux/check-mescc.sh (mes_tests): Add it.

	test: Split-off 36-compare-arithmetic-negative.c.
	* lib/tests/scaffold/36-compare-arithmetic.c (main): Move negative
	divisions to...
	* lib/tests/scaffold/36-compare-arithmetic-negative.c: ...new file here.
	* build-aux/check-mescc.sh (mes_tests): Add it.

	test: ARM: 08-assign.c: Avoid assembly for tcc.
	* lib/tests/scaffold/08-assign.c (main)[__arm__ && __TINYC__]: Avoid assembly.

	test: Split-off 50-strcmp-itoa.c
	* lib/tests/string/50-strcmp.c (main): Move itoa tests to...
	* lib/tests/string/50-strcmp-itoa.c: ...this new file.
	* build-aux/check-mescc.sh (mes_tests): Add it.

	ARM: libtcc1: Add __divsi3, __modsi3, __udivsi3, __umodsi3.
	* lib/libtcc1.c (__divsi3, __modsi3, __udivsi3, __umodsi3): New functions.

	ARM: libtcc1: Add stubs __floatundidf, __fixunsdfdi, __fixunsdfsi.
	* lib/libtcc1.c (__floatdisf, __floatdidf)[__arm__]: New stubs.

	libtcc1: Add stubs __floatundidf, __fixunsdfdi, __fixunsdfsi.
	* lib/libtcc1.c (__floatundidf, __fixunsdfdi, __fixunsdfsi): New stubs.

	ARM: libtcc1: Add support for TinyCC.
	* lib/libtcc1.c: (__udivdi3, __umoddi3, __lshrdi3, __ashldi3,
	__fixunsxfdi)[__arm__ && __TINYC__]: Use __mesabi functions.

	libtcc1: Remove mesabi dependencies for TinyCC.
	* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
	__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
	__fixsfdi)[__TINYC__]: No stub printing.

	mescc: Mes C Library: div: Avoid __raise for TinyCC.
	* lib/mes/div.c (__raise)[__TINYC__]: New macro.

	mescc: Mes C Library: Add __mesabi_umod, __mesabi_udiv.
	* lib/mes/div.c (__mesabi_umod, __mesabi_udiv): New functions.
	* include/mes/lib.h: Add prototypes.

2021-01-23  Danny Milosavljevic  <dannym@scratchpost.org>

	ARM: Implement long division.
	* lib/mes/div.c (__mesabi_log2i): New procedure.
	(__mesabi_uldiv1): New procedure.
	(__mesabi_uldiv): Use it.

	Co-Authored-By: Nathalie Kopaczewski <natkopa@gmail.com>

2021-01-23  Danny Milosavljevic  <dannym@scratchpost.org>

	ARM: Special-case setjmp struct for gcc with mes libc.
	* include/setjmp.h (__jmp_buf): Special-case setjmp struct for gcc with mes
	libc.

2021-01-23  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	tests: Add 70-ternary-arithmetic-argument.c.
	* lib/tests/scaffold/70-ternary-arithmetic-argument.c: New file.
	* build-aux/check-mescc.sh (tcc_tests, xfail_tests): Add it.

2021-01-23  Danny Milosavljevic  <dannym@scratchpost.org>

	ARM: Speed up __mesabi_uldiv for powers-of-two divisors.
	* lib/mes/div.c (__mesabi_uldiv): Speed up division for powers-of-two
	divisors.

2021-01-23  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	ARM: Revert to 4 byte types only.
	* module/mescc/armv4/info.scm (armv4:type-alist): Use size 4 for long
	longs too.

2021-01-23  Paul Dersey  <pdersey@gmail.com>

	Mes C Library: stdlib/qsort.c: Fix qswap segfault.
	* stdlib/qsort.c (qswap): Remove hard coded buffer size.  Allow
	swapping of objects of arbitrary size.

2021-01-23  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	doc: Update to bug-mes@gnu.org.
	* doc/mes.texi (Submitting Patches): Use bug-gnu instead of
	guix-patches, guix-devel.

	build: Update guix package version too.
	* guix/git/mes.scm (mes, mes.git)[version]: Mark fields.
	* build-aux/GNUmakefile.in (update-hash): Update mes version too.
	(release): Remove gen-announce, guix-build dependencies.

	mescc: Update -g help text.
	* module/mescc.scm (parse-opts): Remove TODO, mention call stack.

	bootstrap: Resurrect.
	* build-aux/bootstrap.sh.in (AM_CFLAGS): Use -L ${srcdest}lib.
	Build libmescc.a and use it to link mes.

	mescc: Make sure includedir, libdir are set.
	* scripts/mescc.in (prefix): New variable.

	build: Make mescc more verbose on V=2, V=3.
	* build-aux/cflags.sh (AM_CFLAGS): Add -v, -v -v for V=2, V=3
	respectively.

2020-12-29  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	guix: Switch to guile-3.0-latest.
	* guix/git/mes.scm (nyacc)[inputs]: New field.
	(mes)[inputs]: Update to guile-latest.

2020-12-13  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: ntoab: Use unsigned base.
	This fixes 60-math, 60-math-itoa, 70-printf-simple, 70-printf.

	* lib/mes/ntoab.c (ntoab): Use unsigned base.
	* include/mes/lib.h: Update prototype.

2020-10-07  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	configure: Use GUILD_OPTIMIZE=-O1 for Guile-3.
	* configure (main): Set guild_optimize to "-O1" for Guile-3.
	* build-aux/config.make.in (GUILD_OPTIMIZE): New variable.
	* build-aux/export.make (GUILD_OPTIMIZE): Export if set.
	* build-aux/config.sh.in (GUILD_OPTIMIZE): New variable.
	* build-aux/build-guile.sh: Use it.

2020-10-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Use signed division for x86, x86_64 when appropriate.
	This fixes 36-compare-arithmetic.c

	* module/mescc/i386/as.scm (i386:r0/r1, i386:r0%r1): Do not reset
	signed?.
	* module/mescc/x86_64/as.scm (x86_64:r0/r1, x86_64:r0%r1): Likewise.
	* lib/tests/scaffold/36-compare-arithmetic.c (main): Use unique exit
	value per failure.

2020-10-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Bump MESCC_STACK.
	This fixes running ./pre-inst-env mescc ...

	* scripts/mescc.in (MES_STACK): Bump to 6000000.

2020-10-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	guix: nyacc: Update to 1.00.2.
	* guix/git/mes.scm (nyacc): Rename to...
	(nyacc-0.99): ...this.
	(nyacc): New variable.

2020-10-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	Revert "guix: nyacc: Update to 1.03.0."
	This does not work yet, sorry for the noise.

	This reverts commit 70b2942286ecc0b40798ac4e1fdaa9cd56a48aaf.

2020-10-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	guix: nyacc: Update to 1.03.0.
	* guix/git/mes.scm (nyacc): Rename to...
	(nyacc-0.99): ...this.
	(nyacc): New variable.
	(mes): Update to guile-3.0.

	build: Support guile-3.0.
	* configure (main): Prefer guile-3.

	build: Support make check TESTS=... XFAIL=... for mescc tests.
	* build-aux/config.sh.in (TESTS, XFAIL_TESTS): Export.
	* build-aux/export.make (TESTS, XFAIL_TESTS): Export if set.
	* build-aux/check-mescc.sh (TESTS, XFAIL_TESTS): Allow user override.

2020-10-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mes: Support for gcc-10.
	Fixes <https://lists.gnu.org/archive/html/bug-mes/2020-07/msg00000.html>.

	Reported by Vagrant Cascadian <vagrant@reproducible-builds.org>.

	* src/string.c (MAX_STRING): Remove duplicate definition.

2020-10-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support gcc-10.
	See <https://lists.gnu.org/archive/html/bug-mes/2020-07/msg00000.html>.

	Reported by Vagrant Cascadian <vagrant@reproducible-builds.org>.

	* include/setjmp.h (jmp_buf): Remove.
	* include/errno.h (errno): Mark extern.
	* include/mes/lib-mini.h (environ, errno, __stdin, __stdout, __stderr):
	Likewise.
	* lib/mes/globals.c: New file; define them.
	* build-aux/configure-lib.sh (libc_mini_shared_SOURCES,
	libmescc_SOURCES): Add it.
	* build-aux/test-c.sh: Always use -l c-mini as a minimum.

2020-10-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	build: Resurrect running mescc from elsewhere.
	After setting-up a buld environment, running something like

	   ~/src/mes/wip/pre-inst-env mescc -v -v ~/src/mes/wip/scaffold/main.c

	works again.

	TODO: Make this less complex.

	 * The mescc-lib (and gcc-lib) build directories do not help;
	   these were introduced to support `wip-autotools'.
	 * We used to opt for short *PATH variables: "." rather than
	   /gnu/store/.... or /home/janneke/src/mes/master to avoid
	   filling the MES arena. XXX Has this been solved?
	 * In the Guix bootstrap, we run module/mescc.scm directly
	       $MES -e '(mescc)' module/mescc.scm

	   ...so that's why these overrides started to appear in multiple
	   places.

	* build-aux/pre-inst-env.in (MES_UNINSTALLED): New variable.
	* scripts/mescc.in (includedir,libdir): Use it to override these.
	* module/mescc/mescc.scm (arch-find): Use it to add <lib>-messc.

2020-10-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: x86_64: Add syscall-internal.
	This resurrects the x86_64 build.

	* lib/linux/x86_64-mes-gcc/syscall-internal.c (__sys_call_internal),
	lib/linux/x86_64-mes-mescc/syscall-internal.c: New file.

2020-10-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: x86_64: Introduce __sys_call and friends.
	This prepares for x86_64 syscall-internal.

	* lib/linux/x86_64-mes-gcc/syscall.c (__sys_call, __sys_call1,
	__sys_call2, __sys_call3, __sys_call4): New functions, copied from ...
	(_sys_call, _sys_call1, _sys_call2, _sys_call3, _sys_call4): ... these.
	Use them, handle errno only.

2020-10-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: x86: Use long for syscalls.
	The Linux signature uses long, also this allows for making
	_sys_call and friends architecture-independent.

	* lib/linux/x86-mes-mescc/syscall-internal.c (__sys_call_internal,
	__sys_call2_internal): Use long.  Update callers.
	* lib/linux/x86-mes-mescc/syscall.c (__sys_call, __sys_call1,
	__sys_call2, __sys_call3, __sys_call4, _sys_call, _sys_call1,
	_sys_call2, _sys_call3, _sys_call4): Likewise.

2020-10-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Remove redundant prototypes.
	* lib/linux/x86-mes-gcc/syscall.c(__sys_call, __sys_call1, __sys_call2,
	__sys_call3, __sys_call4): Remove prototype.

	mescc: Mes C Library: Whitespace fixes.
	* lib/linux/signal.c (signal): Whitespace fixes.
	* lib/linux/time.c (time): Likewise.

2020-10-06  Danny Milosavljevic  <dannym@scratchpost.org>

	command line: Support "mescc --print-libgcc-file-name".
	* module/mescc.scm (parse-opts): Add "--print-libgcc-file-name".

	Distinguish between gcc and mescc; select LIBS accordingly.
	* build-aux/check.sh.in: Distinguish between gcc and mescc;
	add MES_CHECKING_BUILTIN_LIBS.
	* build-aux/test-c.sh: Use it to select LIBS accordingly.

	Make "raise" available for gcc use.
	* build-aux/configure-lib.sh (libc_tcc_SOURCES): Move lib/posix/raise.c,
	lib/linux/getpid.c, lib/linux/kill.c to...
	(libc_SOURCES): ...here.

	build: Use libgcc.a instead of libmescc.a for gcc.

	div: Remove libgcc-compatible API.
	* lib/mes/div.c (__aeabi_idiv): Delete procedure.
	(__aeabi_idivmod): Delete procedure.
	(__aeabi_uidivmod): Delete procedure.
	(__aeabi_uidiv): Delete procedure.

	Revert syscall split (of commit 55d38162be9ebd5b90b2550d0331a030c446c001); just copy the two syscalls I need for __raise instead.
	* lib/linux/arm-mes-gcc/syscall-internal.c (__sys_call_internal): New procedure.
	(__sys_call2_internal): New procedure.
	(__raise): Use them.
	(__sys_call, __sys_call2, __sys_call3, __sys_call4, __sys_call6): Move to...
	* lib/linux/arm-mes-gcc/syscall.c: ...here.
	* lib/linux/arm-mes-mescc/syscall-internal.c (__sys_call_internal): New procedure.
	(__sys_call2_internal): New procedure.
	(__raise): Use them.
	(__sys_call, __sys_call2, __sys_call3, __sys_call4, __sys_call6): Move to...
	* lib/linux/arm-mes-mescc/syscall.c: ...here.
	* lib/linux/x86-mes-gcc/syscall-internal.c (__sys_call_internal): New procedure.
	(__sys_call2_internal): New procedure.
	(__raise): Use them.
	(__sys_call, __sys_call2, __sys_call3, __sys_call4, __sys_call6): Move to...
	* lib/linux/x86-mes-gcc/syscall.c: ...here.
	* lib/linux/x86-mes-mescc/syscall-internal.c (__sys_call_internal): New procedure.
	(__sys_call2_internal): New procedure.
	(__raise): Use them.
	(__sys_call, __sys_call2, __sys_call3, __sys_call4, __sys_call6): Move to...
	* lib/linux/x86-mes-mescc/syscall.c: ...here.

	div: Add comment about __aeabi_idiv.
	* lib/mes/div.c (__aeabi_idiv): Add comment.

	div: Move __aeabi_idiv to __GNUC__; introduce __mesabi_idiv.
	* lib/mes/div.c (__aeabi_idiv): Move for conditional compilation.
	(__mesabi_idiv): New procedure.
	* module/mescc/armv4/as.scm (armv4:r0/r1): Use __mesabi_idiv.

	build: Make raise available in libc+tcc for libgcc.
	* build-aux/configure-lib.sh (libc_gnu_SOURCES): Remove raise, getpid, kill.
	(libc_tcc_SOURCES): Add raise, getpid, kill.

2020-10-06  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mescc: Add signed char.
	* module/mescc/armv4/info.scm (armv4:type-alist): Add signed char.
	* module/mescc/i386/info.scm (i386:type-alist): Likewise.
	* module/mescc/x86_64/info.scm (x86_64:type-alist): Likewise.

	ARM: Add missing instruction.
	* lib/arm-mes/arm.M1: Add missing define.

	ARM: as: Fix ldrsb_ typo.
	(armv4:byte-r0-mem->r1-mem): : Add missing "_" to ldrsb_.

	ARM: as: Fix strh__ typo.
	* module/mescc/armv4/as.scm (armv4:word-r0-mem->r1-mem): Add missing "_"
	to strh__.

	mescc: Do not crash when attemting to link files without extension.
	* module/mescc/mescc.scm (replace-suffix): Add ELSE clause to IF for
	base; add IF for old-suffix.

	doc: Fix typos in `HACKING`.
	* HACKING (SETUP): Typos.

2020-08-24  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	ARM: as: Guile compile fix.
	* module/mescc/armv4/as.scm (optimize-immediate): Do not unquote compare
	functions (and numbers).

2020-08-22  Danny Milosavljevic  <dannym@scratchpost.org>

	test: Make 7l-struct-any-size-array-simple compatible with default ARM gcc.
	* lib/tests/scaffold/7l-struct-any-size-array-simple.c: Make "signed"
	explicit in signed char types.

	test: Make 7r-sign-extend compatible with default ARM gcc.
	* lib/tests/scaffold/7r-sign-extend.c: Make "signed" explicit in
	signed char types.

	build: Fixup cleaning of armv4.
	* build-aux/GNUmakefile.in (clean): Clean armv4 go files.

2020-06-19  Danny Milosavljevic  <dannym@scratchpost.org>

	ARM: Support comparing 32 bit values.
	* lib/arm-mes/arm.M1 (cmp____$i32,%r0): New macro.
	(cmp____$i32,%r1): New macro.
	(cmp____$i32,%r2): New macro.

	ARM: Handle signed values in r-byte-mem-add, r-word-mem-add.
	* lib/arm-mes/arm.M1 (ldrb___%r0,(%r1)): Delete macro.
	(ldrh___%r0,(%r0)): Delete macro.
	(ldrsh__%r0,(%r0)): New macro.
	(ldrh___%r0,(%r1)): Delete macro.
	(ldrsh__%r0,(%r1)): New macro.
	(ldrh___%r1,(%r1)): Delete macro.
	(ldrsh__%r1,(%r1)): New macro.
	(ldrh___%r2,(%r2)): Delete macro.
	(ldrsh__%r2,(%r2)): New macro.
	(ldrh___%r3,(%r3)): Delete macro.
	(ldrsh__%r3,(%r3)): New macro.
	(ldrsb__%r0,(%r1)): New macro.
	* module/mescc/armv4/as.scm (armv4:r-byte-mem-add): Use ldrsb.
	(armv4:r-word-mem-add): Use ldrsh, add____$i32,(%r0).
	(armv4:word-mem->r): Use ldrsh.

2020-06-16  Danny Milosavljevic  <dannym@scratchpost.org>

	ntoab: Simplify LONG_MIN case.
	* lib/mes/ntoab.c (ntoab): Simplify LONG_MIN case.

	Co-Authored-By: Nathalie Kopaczewski <natkopa@gmail.com>

2020-06-16  Danny Milosavljevic  <dannym@scratchpost.org>

	ARM: Factor out optimize-immediate.
	* module/mescc/armv4/as.scm (optimize-immediate): New macro.
	(immediate->r0): Use it.
	(armv4:value->r): Use it.
	(armv4:local->r): Use it.
	(armv4:r->local+n): Use it.
	(armv4:r-byte-mem-add): Use it.
	(armv4:r-word-mem-add): Use it.
	(armv4:local-ptr->r): Use it.
	(armv4:r+value): Use it.
	(armv4:r-cmp-value): Use it.
	(armv4:r0+value): Use it.
	(armv4:byte-r->local+n): Use it.
	(armv4:word-r->local+n): Use it.

	ARM: Avoid using (abs INT_MIN) and (- INT_MIN).
	* module/mescc/armv4/as.scm (immediate->r0): Inline abs.
	(armv4:value->r): Inline abs.
	(armv4:local->r): Inline abs.
	(armv4:r->local+n): Inline abs.
	(armv4:r-byte-mem-add): Inline abs.
	(armv4:r-word-mem-add): Inline abs.
	(armv4:local-ptr->r): Inline abs.
	(armv4:r+value): Inline abs.
	(armv4:r-cmp-value): Inline abs.
	(armv4:r0+value): Inline abs.
	(armv4:byte-r->local+n): Inline abs.
	(armv4:word-r->local+n): Inline abs.

	build-aux: Increase test timeout to 20 s.

2020-06-15  Danny Milosavljevic  <dannym@scratchpost.org>

	ntoab: Handle LONG_MIN case.
	* lib/mes/ntoab.c (ntoab): Handle LONG_MIN case.
	* lib/tests/scaffold/60-math.c (main): Add test for INT_MIN and hex.

2020-06-14  Danny Milosavljevic  <dannym@scratchpost.org>

	core: Fix unreadchar on string port when unreading EOF.
	* src/posix.c (unreadchar): Fix on string port when unreading EOF.

2020-06-13  Danny Milosavljevic  <dannym@scratchpost.org>

	Add ARM gcc scaffold assembly.
	* lib/linux/arm-mes-gcc/exit-42.S: New file.
	* lib/linux/arm-mes-gcc/hello-mes.S: New file.

	mescc: Add modules for armv4.
	* mes/module/mescc/armv4/as.mes: New file.
	* mes/module/mescc/armv4/info.mes: New file.
	* mes/module/mescc/mescc.mes: Use them.

2020-06-12  Danny Milosavljevic  <dannym@scratchpost.org>

	Implement setjmp for ARM mescc.
	* include/setjmp.h: Add ARM case.
	* lib/arm-mes-mescc/setjmp.c: New file.

2020-06-10  Danny Milosavljevic  <dannym@scratchpost.org>

	test: Test signed division.
	* lib/tests/scaffold/36-compare-arithmetic.c (main): Test signed division.

	ldiv: Work around missing struct return feature.
	* lib/mes/div.c (__mesabi_ldiv): Remove return type.
	(__mesabi_imod): Adapt call site.
	(__aeabi_idiv): Adapt call site and move it to conditional compilation.
	(__aeabi_idivmod): Adapt call site.

2020-06-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: mescc-tools: Update to 0.7.0, adding ARM support.
	This brings arm-linux-gnueabihf, aarch64-linux-gnu support.

	* guix/git/mes.scm (mescc-tools): Update to 0.7.0.

2020-06-10  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	dir-locals.el: Add indentation for Guix keywords.
	* .dir-locals.el (scheme-mode): Add indentation rules for Guix package
	definitions.

2020-06-10  Danny Milosavljevic  <dannym@scratchpost.org>

	mescc: Mes C Library: Hang at the end if necessary.
	* lib/linux/arm-mes-mescc/crt1.c (_start): Hang at the end if necessary.

	Add ARM backend.
	* build-aux/build-guile.sh: Add ARM backend.
	* lib/arm-mes/arm.M1: New file.
	* module/mescc/armv4/as.scm: New file.
	* module/mescc/armv4/info.scm: New file.
	* module/mescc/mescc.scm: Use it.
	* module/mescc/M1.scm (info->M1): Support ARM symbolic instructions,
	including little endian instructions.  Align functions.

2020-06-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Post-release update.
	* NEWS: Add v0.22 hash.
	* doc/announce/ANNOUNCE-0.22: Add gen-announce checksums; update NEWS,
	typos.

2020-06-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	ARM: Mes C Library: Support gcc-sans-libc.
	* lib/linux/arm-mes-gcc/crt1.c: New file.
	* lib/linux/arm-mes-gcc/mini.c: New file.
	* lib/arm-mes-gcc/setjmp.c: New file.

	Co-Authored-By: Danny Milosavljevic <dannym@scratchpost.org>

2020-06-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: mes: Add armhf-linux, aarch64-linux support.
	* guix/git/mes.scm (mes): Add armhf-linux, aarch64-linux support.

2020-06-03  Danny Milosavljevic  <dannym@scratchpost.org>

	ntoab: Make sure not to get stuck on base 1.
	* lib/mes/ntoab.c (ntoab): Make sure not to get stuck on base 1.

	mescc: Mes C Library: Add crt1, mini.
	* lib/linux/arm-mes-mescc/crt1.c: New file.
	* lib/linux/arm-mes-mescc/mini.c: New file.

	ARM: Mes C Library: Add comment.
	* lib/linux/time.c: Add comment.

2020-06-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	ARM: Mes C Library: Add compile stub for time.
	* lib/linux/time.c (time)[SYS_gettimeofday]: Implement using gettimeofday.
	(time)[!SYS_time && !SYS_gettimeofday]: Compile stub.

2020-06-03  Danny Milosavljevic  <dannym@scratchpost.org>

	Add ARM syscall numbers.
	* include/linux/arm/syscall.h: New file.

2020-06-02  Danny Milosavljevic  <dannym@scratchpost.org>

	waitpid: Support ARM.
	* lib/linux/waitpid.c (waitpid): Support ARM.

	Add ARM linker support files.
	* lib/linux/arm-mes/elf32-0exit-42.hex2,
	lib/linux/arm-mes/elf32-0header.hex2,
	lib/linux/arm-mes/elf32-0hello-mes.hex2,
	lib/linux/arm-mes/elf32-body-exit-42.hex2,
	lib/linux/arm-mes/elf32-body-hello-mes.hex2,
	lib/linux/arm-mes/elf32-footer-single-main.hex2,
	lib/linux/arm-mes/elf32-header.hex2: New files.

	Raise SIGABRT on abort().
	* lib/stdlib/abort.c (abort): Raise SIGABRT.

	Introduce libmescc.a; Put division by integer in there; split syscalls' errno off.
	* build-aux/configure-lib.sh (libmescc_SOURCES): Add lib/mes/div.c,
	lib/linux/*/syscall-internal.c.
	* build-aux/build-lib.sh: Add libmescc.a.
	* build-aux/build-mes.sh: On gcc, add "-lmescc".
	* build-aux/test-c.sh: Add "-lmescc".
	* build-aux/check.sh.in: Add mescc to LIBS.
	* module/mescc/mescc.scm (mescc:link): Add "mescc".
	* module/mescc.scm (mescc:main): Update documentation of "-nodefaultlibs"
	and "-nostdlib".
	* lib/mes/div.c (ldiv): Rename to...
	(__mesabi_ldiv): ...this.  Avoid assert.
	(__mesabi_div0): Avoid assert.
	(__aeabi_idivmod): New procedure.
	(__aeabi_idiv): New procedure.
	(__aeabi_uidivmod): New procedure.
	(__aeabi_uidiv): New procedure.
	* lib/linux/x86-mes-gcc/syscall.c (__sys_call, __sys_call1, __sys_call2,
	__sys_call3, __sys_call4): Move to...
	* lib/linux/x86-mes-gcc/syscall-internal.c: ...here.
	(__raise): New procedure.
	* lib/linux/x86-mes-mescc/syscall.c (__sys_call, __sys_call1, __sys_call2,
	__sys_call3, __sys_call4): Move to...
	* lib/linux/x86-mes-mescc/syscall-internal.c: ...here.
	(__raise): New procedure.
	* lib/linux/arm-mes-gcc/syscall.c: New file.
	* lib/linux/arm-mes-gcc/syscall-internal.c: New file.
	* lib/linux/arm-mes-mescc/syscall.c: New file.
	* lib/linux/arm-mes-mescc/syscall-internal.c: New file.
	* lib/gnu/syscall.c (__syscall, __syscall2, __syscall_get, __syscall_put):
	Move to...
	* lib/gnu/syscall-internal.c: ...here.

	Prepare header files for ARMv4.
	* include/fcntl.h (O_DIRECTORY): Add ARM case.
	* include/signal.h (struct sigaction): Add uapi case.
	* include/stdint.h: Add ARM case.
	* include/sys/stat.h (struct stat): Add ARM case.

	Support and pass "-marm".
	* build-aux/cflags.sh,
	build-aux/check.sh.in: Pass "-marm" for ARM.
	* module/mescc/mescc.scm: Accept it.

	Prepare tests for ARMv4.
	* lib/tests/io/90-stat.c,
	lib/tests/scaffold/76-pointer-arithmetic.c,
	lib/tests/scaffold/7k-for-each-elem.c,
	lib/tests/scaffold/85-sizeof.c: Prepare tests for ARMv4.

2020-01-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.22.
	* configure (VERSION): Update to 0.22.
	(main): Likewise.
	* build-aux/GNUmakefile.in: Likewise.
	* configure.sh (VERSION): Likewise.
	* guix/git/mes.scm (mes, mes.git): Likewise.

	build: Update release process.
	* build-aux/GNUmakefile.in: Update documentation.
	(sign-dist):  Rename from `sign'.
	* configure: Remove version check for Guix; support GUIX=guix ./configure.

	doc: Release update.
	* BOOTSTRAP: Release update.
	* HACKING: Likewise.
	* INSTALL: Likewise.
	* NEWS: Likewise.
	* PORTING: Likewise.
	* README: Likewise.
	* ROADMAP: Likewise.
	* doc/mes.texi: Likewise.
	* doc/announce/ANNOUNCE-0.22: New file.

2020-01-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Fix execlp, execvp for file names with slash.
	Reported by mid-kid.

	* lib/posix/execlp.c (execlp): Do not use search_path when file name
	contains a slash (WAS: when file name starts with slash).
	* lib/posix/execvp.c (execvp): Likewise.

2020-01-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Support bootstrapping using build.sh.
	* build-aux/build.sh.in: Oops, use $compiler = bootstrap concept does
	not exist yet.  Gash cp does not support -p; drop it.
	* configure.sh: Oops, set bootstrap to `true' instead of yes.

	mescc: Mes C Library: lseek: Be careful clearing read buffer.
	* lib/linux/lseek.c (_lseek): New function.
	* lib/linux/lseek.c (lseek): Use it to check if we should reset read
	buffer.
	* lib/mes/__buffered_read.c (__read_buffer_max): New variable.
	(__buffered_read_init): Add environment override: MES_READ_BUFFER.
	(__buffered_read): Use it.

	build: Have configure respect GUILE_LOAD_PATH for mes to find Nyacc.
	* configure: Substitute GUILE_LOAD_PATH from %load-path.
	* configure.sh: Likewise.
	* build-aux/config.make.in: Add GUILE_LOAD_PATH as subtitution variable.
	* build-aux/config.sh.in: Likewise.
	* mes/module/mes/guile.mes (%load-path): New variable.

2020-01-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Have configure prefer $CC over gcc; tcc over gcc, gcc over cc.
	Reported by Vagrant Cascadian.

	* configure (string->version): Prefer for most-dotted string.  Fixes
	makeinfo version.
	(check-program-version): Prefer displaying of command, if single word.
	(main): Check for $CC --version, $CC -v.  Prefer $CC over gcc; tcc over
	gcc, gcc over cc.

2020-01-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Opt for reproducible builds with Guile and Mes.
	* module/mescc/compile.scm (mes-or-reproducible?): New variable.
	(ast->comment): Use it.
	* module/mescc/preprocess.scm (mes-or-reproducible?): New variable.
	(c99-input->full-ast): Use it.

2020-01-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Resurrect compiling with TinyCC.
	   ./configure CC=tcc --host=i686-unknown-linux-gnu --with-courage

	* configure: Cater for tcc.

2019-12-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Cater for FreeBSD.
	* build-aux/bootstrap.sh.in: Add test ! -e -o to satisfy FreeBSD test.
	Fixes skipping over all compilations.
	* build-aux/cc.sh (compile): Likewise.

	freebsd: Initial x86 scaffold.
	* lib/freebsd/x86-mes-gcc/crt1.c: New file.
	* lib/freebsd/x86-mes-gcc/exit-42.S: New file.
	* lib/freebsd/x86-mes-gcc/hello-mes.S: New file.
	* lib/freebsd/x86-mes-gcc/mini.c: New file.
	* lib/freebsd/x86-mes-mescc/crt1.c: New file.
	* lib/freebsd/x86-mes-mescc/mini.c: New file.
	* lib/freebsd/x86-mes/elf32-0exit-42.hex2: New file.
	* lib/freebsd/x86-mes/elf32-0header.hex2: New file.
	* lib/freebsd/x86-mes/elf32-0hello-mes.hex2: New file.
	* lib/freebsd/x86-mes/elf32-body-exit-42.hex2: New file.
	* lib/freebsd/x86-mes/elf32-body-hello-mes.hex2: New file.
	* lib/freebsd/x86-mes/elf32-footer-single-main.hex2: New file.
	* lib/freebsd/x86-mes/elf32-header.hex2: New file.

	freebsd: Initial configure support.
	* configure: Initial FreeBSD configure support.
	* configure.sh: Likewise.  Run without bash.

	build: Prepare for kernel variants.
	* configure: Fix detection of Arch, FreeBSD.
	* lib/linux/x86-mes-gcc/exit-42.S: Move from ...
	* lib/x86-mes-gcc/exit-42.S: ... here.
	* lib/linux/x86-mes-gcc/hello-mes.S: Move from ...
	* lib/x86-mes-gcc/hello-mes.S: ... here.
	* lib/linux/x86-mes-mescc/exit-42.S: Move from ...
	* lib/x86-mes-mescc/exit-42.S: ... here.
	* lib/linux/x86-mes-mescc/hello-mes.S: Move from ...
	* lib/x86-mes-mescc/hello-mes.S: ... here.
	* lib/linux/x86-mes/elf32-0exit-42.hex2: Move from ...
	* lib/x86-mes/elf32-0exit-42.hex2: ... here.
	* lib/linux/x86-mes/elf32-0header.hex2: Move from ...
	* lib/x86-mes/elf32-0header.hex2: ... here.
	* lib/linux/x86-mes/elf32-0hello-mes.hex2: Move from ...
	* lib/x86-mes/elf32-0hello-mes.hex2: ... here.
	* lib/linux/x86-mes/elf32-body-exit-42.hex2: Move from ...
	* lib/x86-mes/elf32-body-exit-42.hex2: ... here.
	* lib/linux/x86-mes/elf32-body-hello-mes.hex2: Move from ...
	* lib/x86-mes/elf32-body-hello-mes.hex2: ... here.
	* lib/linux/x86-mes/elf32-footer-single-main.hex2: Move from ...
	* lib/x86-mes/elf32-footer-single-main.hex2: ... here.
	* lib/linux/x86-mes/elf32-header.hex2: Move from ...
	* lib/x86-mes/elf32-header.hex2: ... here.
	* lib/linux/x86_64-mes-gcc/exit-42.S: Move from ...
	* lib/x86_64-mes-gcc/exit-42.S: ... here.
	* lib/linux/x86_64-mes-gcc/hello-mes.S: Move from ...
	* lib/x86_64-mes-gcc/hello-mes.S: ... here.
	* lib/linux/x86_64-mes-mescc/exit-42.S: Move from ...
	* lib/x86_64-mes-mescc/exit-42.S: ... here.
	* lib/linux/x86_64-mes-mescc/hello-mes.S: Move from ...
	* lib/x86_64-mes-mescc/hello-mes.S: ... here.
	* lib/linux/x86_64-mes/elf64-0exit-42.hex2: Move from ...
	* lib/x86_64-mes/elf64-0exit-42.hex2: ... here.
	* lib/linux/x86_64-mes/elf64-0header.hex2: Move from ...
	* lib/x86_64-mes/elf64-0header.hex2: ... here.
	* lib/linux/x86_64-mes/elf64-0hello-mes.hex2: Move from ...
	* lib/x86_64-mes/elf64-0hello-mes.hex2: ... here.
	* lib/linux/x86_64-mes/elf64-body-exit-42.hex2: Move from ...
	* lib/x86_64-mes/elf64-body-exit-42.hex2: ... here.
	* lib/linux/x86_64-mes/elf64-body-hello-mes.hex2: Move from ...
	* lib/x86_64-mes/elf64-body-hello-mes.hex2: ... here.
	* lib/linux/x86_64-mes/elf64-footer-single-main.hex2: Move from ...
	* lib/x86_64-mes/elf64-footer-single-main.hex2: ... here.
	* lib/linux/x86_64-mes/elf64-header.hex2: Move from ...
	* lib/x86_64-mes/elf64-header.hex2: ... here.
	* module/mescc.scm (parse-opts): Support --kernel.
	* module/mescc/mescc.scm (kernel-find): New function.
	* module/mescc/mescc.scm (hex2->elf): Use it to find kernel-specific ELF
	snippets.
	* build-aux/install.sh.in: Install it.

2019-12-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Add ioctl3 stub.

	mescc: Mes C Library: Fix access stub.
	* lib/stub/access.c (access): Use _open3 to give more meaningful
	behaviour.  Fixes hanging of mes.

	hurd: Fixes for upgrade to debian-hurd-20190220.img.
	* include/mach/mach-init.h (__mach_host_self, __mach_task_self):
	Remove macro magic.
	(mach_host_self, mach_task_self): Remove macro magic; declare as function.
	* lib/mach/mach-init.c (mach_host_self, mach_task_self): New function.
	(mach_init): Use them.
	* lib/gnu/hurd-start.c (_hurd_start): Use mach_task_self ().
	* lib/gnu/_exit.c (_exit): Likewise.

	hurd: Add malloc.
	* include/gnu/syscall.h (__vm_allocate): New value.
	(__vm_allocate): Declare.
	* lib/gnu/malloc.c: New file.
	* lib/stdlib/malloc.c[__GNU__]: Disable.  See FIXME.
	* lib/gnu/vm-allocate.c: New file.
	* build-aux/configure-lib.sh (libc_SOURCES): Add it.

	hurd: Add open.
	* include/fcntl.h (O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_APPEND,
	O_TRUNC)[__GNU__]: Specialize for GNU.
	* lib/gnu/dir-lookup.c: New file.
	* lib/stdio/fopen.c (fopen): Use O_RDONLY.
	* lib/tests/posix/50-open-read.c (main): Likewise.
	* lib/tests/stdio/90-fseek.c (main): Likewise.
	* include/gnu/syscall.h (SYS__dir_lookup): New value.
	* lib/gnu/_open3.c: New file.
	* build-aux/configure-lib.sh (libc_SOURCES): Build them.

	hurd: Add argv and environ.
	* include/gnu/hurd.h (struct hurd_startup_data): Add argp, envp.
	* lib/gnu/hurd-start.c (__argv, __env): Define them.
	* lib/gnu/exec-startup-get-data.c (mach_startup_info2hurd_startup_data):
	Set them.
	* lib/gnu/x86-mes-gcc/crt1.c (_start): Use them.
	* build-aux/configure-lib.sh (libc_mini_SOURCES): Add argz-extract.c.
	* include/argz.h: Build fix.
	* lib/string/argz-count.c: Likewise.
	* lib/string/argz-extract.c: Likewise.

	hurd: Add stubs for missing libc+tcc functions.
	* lib/stub/close.c: New file.
	* lib/stub/rmdir.c: New file.
	* lib/stub/stat.c: New file.
	* build-aux/configure-lib.sh (libc_tcc_SOURCES)[gnu]: Add them.

	hurd: Add stubs for missing libc functions.
	* lib/stub/_getcwd.c: New file.
	* lib/stub/_getcwd.c: New file.
	* lib/stub/_open3.c: New file.
	* lib/stub/access.c: New file.
	* lib/stub/brk.c: New file.
	* lib/stub/chmod.c: New file.
	* lib/stub/clock_gettime.c: New file.
	* lib/stub/dup.c: New file.
	* lib/stub/dup2.c: New file.
	* lib/stub/execve.c: New file.
	* lib/stub/fork.c: New file.
	* lib/stub/gettimeofday.c: New file.
	* lib/stub/ioctl.c: New file.
	* lib/stub/time.c: New file.
	* lib/stub/unlink.c: New file.
	* lib/stub/waitpid.c: New file.
	* build-aux/configure-lib.sh (libc_SOURCES)[gnu]: Add them.

	hurd: Add stubs for missing libmes functions.
	* lib/stub/lseek.c: New file.
	* build-aux/configure-lib.sh (libmes_SOURCES)[gnu]: Add it.

	hurd: Add _read.
	* include/gnu/hurd.h (fd_read): Declare.
	* include/gnu/syscall.h (SYS__io_read): New value.
	* lib/gnu/_read.c: New file.
	* lib/gnu/fd-read.c: New file.
	* lib/gnu/io-read.c: New file.
	* build-aux/configure-lib.sh (libc_SOURCES): Add _read sources.

	hurd: Add _write.
	* include/gnu/syscall.h (SYS__io_write): Add enum field.
	(_hurd_dtable, _hurd_dtable_size): Declare variable.
	(fd_get, fd_write, __io_write, __syscall_put): Declare.
	* lib/gnu/hurd-start.c (_hurd_dtable, _hurd_dtable_size): Define
	variable.
	* lib/gnu/_write.c: New file.
	* lib/gnu/fd-get.c (fd_get): New file.
	* lib/gnu/fd-write.c (fd_write): New file.
	* lib/gnu/io-write.c: New file.
	* lib/gnu/syscall.c (__syscall_put): New function.
	* build-aux/cofnigure-lib.sh (libc_mini_SOURCES): Add write sources.
	* lib/tests/mes/30-oputs.c (main): Update.
	* lib/tests/mes/30-oputs.stdout: New file.
	* lib/tests/mes/30-eputs.c: New test.
	* lib/tests/mes/30-eputs.stderr: New file.
	* build-aux/check-mescc.sh (TESTS): Add it.

2019-12-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	hurd: Initial support.
	This adds minimal Hurd support by implementing the _exit function.

	* AUTHORS: Update.
	* .gitignore: Ignore a.out, core, .config.
	* include/sys/wait.h (W_EXITCODE): New define.
	* lib/gnu/x86-mes-gcc/crt1.c: New file.
	* lib/gnu/x86-mes-gcc/mini.c: New file.
	* lib/gnu/hurd-start.c: New file.
	* lib/gnu/_exit.c: New file.
	* include/gnu/syscall.h: New file.
	* include/gnu/hurd.h: New file.
	* lib/gnu/_exit.c: New file.
	* lib/gnu/exec-startup-get-data.c: New file.
	* lib/gnu/hurd-start.c: New file.
	* lib/gnu/proc-mark-exit.c: New file.
	* lib/gnu/syscall.c: New file.
	* lib/gnu/task-get-special-port.c: New file.
	* lib/gnu/task-terminate.c: New file.
	* lib/gnu/vm-statistics.c: New file.
	* build-aux/configure-lib.sh (libc_mini_SOURCES): Add Hurd sources.
	* build-aux/build.sh.in (CPPFLAGS): Add lib to includes, to find linux
	crt1.c.
	* build-aux/test-c.sh: Always use at least -l c+mini for GNU.
	* lib/tests/scaffold/30-exit-42.exit: New file.
	* lib/tests/scaffold/30-exit-42.c: New test.
	* build-aux/check-mescc.sh (TESTS): Add it.
	* lib/tests/scaffold/30-exit-0.c (main): Move from 00-exit-0.c; Rewrite,
	use _exit.
	* include/gnu/hurd-types.h: Import from GNU C Library.
	* include/mach/mach-init.h: Likewise.
	* lib/mach/mach-init.c: Likewise.
	* lib/mach/mach_host_self.S: Likewise.
	* lib/mach/mach_msg_trap.S: Likewise.
	* lib/mach/mach_reply_port.S: Likewise.
	* lib/mach/mach_task_self.S: Likewise.
	* lib/mach/mach_thread_self.S: Likewise.
	* lib/mach/msg.c: Likewise.

2019-12-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Generate ChangeLog reproducibly.  Thanks, Timothy!
	* build-aux/gitlog-to-changelog (git_dir_option): Avoid non-reproducible
	localtime.

	build: Make guild optional for bootstrap builds.
	* configure: Use `true' for guild when it is not available.

	build: Clean-out .gitignore.
	.gitignore: Remove obsolete cross build patterns.

	build: Cater for bootstrap build.
	* build-aux/build.sh.in: Build bin/mes.  Update scripts and users.
	* build-aux/bootstrap.sh.in: Update.
	* build-aux/install.sh.in: Install all built bin/mes-* flavours.
	* configure: Drop SEED, support --bootstrap.
	* configure.sh: Likewise.

2019-12-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Oops, have configure honor --host.
	This allows

	    ./configure --host=i686-unknown-linux-gnu

	instead of

	    CC=i686-unknown-linux-gnu-gcc ./configure

	* configure (main): Honor --host.

2019-12-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	bootstrap: Default to mesar for mescc build.
	* configure.sh: Default to mesar for mescc build.

	bootstrap: Fix configure.sh's host detection.
	* configure.sh: Avoid setting host="" and not running $CC.

	mescc: Add mes 0.19 compatibility.
	* mes/module/mes/boot-0.scm (%datadir): Cater for %datadir not being
	set.

2019-12-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	bootstrap: Build files only once.
	* build-aux/bootstrap.sh.in: Build files only once.

	build: Support mescc-tools 0.5.2.
	* configure: Remove version check for mescc-tools.
	Check for stage0 architecture flag type.
	* configure.sh: Likewise.
	* build-aux/build-scaffold.sh: Add stage0 flag type indirection.
	* module/mescc/mescc.scm (arch-get-architecture): Likewise.

2019-12-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Fix for compiling handwritten .S assembly.
	* module/mescc/mescc.scm (mescc:compile): Handle .S.
	(mescc:link): Likewise.

	build: Add mescc scaffold for regular build.
	* lib/x86-mes-mescc/exit-42.S: New file.
	* lib/x86-mes-mescc/hello-mes.S: New file.
	* lib/x86_64-mes-mescc/exit-42.S: New file.
	* lib/x86_64-mes-mescc/hello-mes.S: New file.

2019-12-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Add --with-bootstrap option.
	* configure (main): Add --with-bootstrap option.
	* build-aux/build.sh.in [--with-bootstrap]: After building mes with CC,
	build mes with MesCC.

2019-12-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Support toplevel lib and mes builds.
	* build-aux/build.sh.in: Add missing libdir for gcc build.
	* build-aux/config.sh.in: ...here.
	* build-aux/build-mes.sh: Do not overwrite srcdest, V.

	bootstrap: Support srcdir builds.
	* build-aux/bootstrap.sh.in (srcdest): Initialize.
	* build-aux/build-lib.sh: Source config.sh.
	* configure.sh: Support srcdir builds.
	* build-aux/build.sh.in: Move setting of cflags to ...
	* build-aux/cflags.sh: ... New file.

	configure: Honor CFLAGS, LDFLAGS.
	* configure (cflags-list, ldflags-list): New function.
	check-preprocess-header-c, check-compile-string-c,
	check-link-string-c): Use them.  Be verbose when %verbose?.
	(CFLAGS, LDFLAGS): Initialize to "-static -g".

2019-12-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	build! Fixup clean without git: Clean cleaner.
	* build-aux/GNUmakefile.in (clean): Clean cleaner.

2019-12-07  Vagrant Cascadian  <vagrant@debian.org>

	Fix build without git on "wip" branch.
	--=-=-=
	Content-Type: text/plain

	In the "wip" branch, the attempt to build without git was a bit overly
	aggressive in the purging of GIT.

	live well,
	  vagrant

	From 73bb68e86318a6bc0fe191db663be97f94556956 Mon Sep 17 00:00:00 2001
	From: Vagrant Cascadian <vagrant@debian.org>
	Date: Sat, 7 Dec 2019 19:59:00 +0100
	Subject: [PATCH] Fix build without git

	Commit "1863c0d843a5fe4e94e8cb923cc0896f30fceeeb" removed the
	substitution of @GIT@ when, resulting in the GIT variable being set to
	"@GIT@" rather than "" when git is not installed.

2019-12-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Fix configure host detection for Arch.  Thanks, Jelle!
	* configure (main): Grok `CPU-pc-linux-gnu'.

	build: Successfully check for Nyacc 0.99.0.
	* configure (gulp-pipe): New function.
	(check-program-version): Use it to correctly detect Nyacc.
	(gulp-pipe*): Rewrite to use it.

	build: Remove git dependency.
	* configure: Remove git dependency.
	* build-aux/GNUmakefile.in (clean,distclean, maintainer-clean):
	Implement without git.
	* INSTALL: Update dependencies.

2019-12-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Remove MES_PKGDATADIR.
	* configure: Do not add MES_PKGDATADIR to config.h.
	* configure.sh: Likewise.
	* simple.sh: Likewise.
	* src/mes.c (open_boot): Do not use MES_PKGDATADIR; rely on
	MES_PREFIX or cwd.

2019-12-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Ignore -fno-stack-protector.
	* module/mescc.scm (parse-opts): Ignore it.

	build: Use debug build (-g) by default.
	* build-aux/build.sh.in (debug): Enable.

	build: Honor user's CFLAGS, CPPFLAGS, LDFLAGS.
	* build-aux/build.sh.in (AM_CFLAGS, AM_CPPFLAGS, AM_LDFLAGS): Rename
	from CFLAGS, CPPFLAGS, LDFLAGS.  Export them.
	* configure: Substitute them.
	* configure.sh: Likewise.
	* build-aux/cc.sh (compile, link): Use them.
	* build-aux/config.make.in (CFLAGS, CPPFLAGS, LDFLAGS): Add
	substitutable variables.
	* build-aux/config.sh.in: Likewise.
	* build-aux/export.make: Export them.

	test: 90-abtod: Remove printf dependency.  Fixes gcc.
	* lib/tests/mes/90-abtod.stdout: Remove.
	* lib/tests/mes/90-abtod.c (main): Remove printf.

2019-12-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: 90-readdir: Remove qsort dependency.  Fixes tmpfs failures.
	* lib/tests/dirent/90-readdir.c (check_seen): New function.
	(main): Use it instead of qsort.
	(qsort_strcmp): Remove.

2019-11-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Throw instead of segfault on non-existing input file.
	Reported by theruran.

	* src/posix.c (open_input_file): Call error instead of failing silently.

2019-06-11  Vagrant Cascadian  <vagrant@debian.org>

	boot-0: Fix spelling of "evaluate"

2019-11-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Honor --includedir, --libdir.
	* guix/git/mes.scm (mes):
	* module/mescc.scm (%includedir, %libdir): New variable.
	(mescc:main): Add them to options.
	* module/mescc/mescc.scm (mescc:preprocess, c->info): Add %includedir.
	(arch-find): Use %libdir instead of
	prefix-file.
	(prefix-file): Remove.
	* scripts/mescc.scm.in (%includedir, %libdir): Initialize from and set
	in environment.

	xx

	* module/mescc/mescc.scm :

2019-11-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Post-release update.
	* NEWS: Typo.
	* doc/announce/ANNOUNCE-0.21: Add checksums.

2019-11-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.21.
	* configure (VERSION): Update to 0.21.
	(main): Likewise.
	* build-aux/GNUmakefile.in: Likewise.
	* configure.sh (VERSION): Likewise.
	* guix/git/mes.scm (mes, mes.git): Likewise.

2019-11-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Release update.
	* BLURB: Release update.
	* HACKING: Remove roadmap.
	* INSTALL: Release update.
	* NEWS: Add 0.21 section.
	* README: Release update.
	* ROADMAP: New file.
	* configure.sh: Release update.
	* doc/announce/ANNOUNCE-0.21: New file.
	* doc/mes.texi: Release update.

2019-11-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: vfprintf: Support --with-system-libc.
	* include/stdarg.h (va_arg8)[SYSTEM_LIBC]: Define.

	mescc: Mes C Library: Support gcc-4.6.4: Fix ctime stub.
	* lib/stub/ctime.c (ctime): Fix stub to avoid segfault upon use.

	mescc: Mes C Library: Fix isatty for x86_64.
	* lib/linux/ioctl.c (ioctl3): New function.
	* include/sys/ioctl.h: Declare it.
	* lib/posix/isatty.c (__tcgetattr): Use it.

2019-11-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Prefer /bin/bash if available. Thanks, Vagrant!
	Ensure the configure script uses /bin/bash, otherwise on systems with
	/bin -> /usr/bin it results in /bin/bash being embedded in various
	scripts.

	Inspired by

	    https://salsa.debian.org/debian/mes/blob/debian/master/debian/patches/force-use-of-bin-bash

	* configure: Prefer /bin/bash, /bin/sh if available.  Helps
	reproducibility on Debian.

2019-11-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Update script help and usage.
	* doc/mes.texi (Invoking mesar): New section.
	* mes/module/mes/boot-0.scm: Add one line help description.
	* module/mescc.scm (parse-opts): Likewise.
	* scripts/diff.scm (main): Add -h,--help, -v,--version.
	* scripts/mesar.in: Likewise.

	build: Use unversioned doc directory. Thanks, Vagrant!
	* configure (docdir): Drop version.  Fixes Debian lint error.
	* configure.sh (docdir): Likewise.

	build: Add sensible NAME section for man pages. Thanks, Vagrant!
	* build-aux/GNUmakefile.in (mes.1, mescc.1, mesar.1): Add sensible
	--name section.  Fixes Debian lint error.  Reported by Vagrant
	Cascadian.

2019-11-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "build: Mark lib/tests/dirent/90-readdir.c as XFAIL on x86_64-gcc."
	This reverts commit dc0b41f83efa973b7a92c0c7a0ad1eb21a7c4c7a.

2019-10-30  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Mark lib/tests/dirent/90-readdir.c as XFAIL on x86_64-gcc.
	* build-aux/check-mescc.sh (XFAIL_TESTS)[x86_64-gcc]: Add
	lib/tests/dirent/90-readdir.c.

2019-11-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "build: Mark lib/tests/dirent/90-readdir.c as XFAIL on x86_64-mescc."
	This reverts commit 17986224095ed72649fb2383f72c21f525977310.

2019-10-30  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Mark lib/tests/dirent/90-readdir.c as XFAIL on x86_64-mescc.
	* build-aux/check-mescc.sh (XFAIL_TESTS)[x86_64-mescc]: Add
	lib/tests/dirent/90-readdir.c.

2019-10-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Better and friendlier tarball.
	* build-aux/GNUmakefile.in (dist): Be friendly to Debian; avoid using
	EPOCH.  Cater for file permission differences.

2019-10-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: bootstrap fixes.
	* build-aux/config.sh.in (bootstrap): Set up for substitution.
	* configure.sh (bootstrap): Substitute.
	* build-aux/install.sh.in (_v): Robustify check for V.
	(__exclude_go, __exclude_scm): Initialize.

2019-10-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Fix -c, --command.
	* mes/module/mes/boot-0.scm: Prepend 'begin to expr list.

2019-10-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	check: Remove duplicate test.
	* build-aux/check-boot.sh (TESTS): Remove duplicate test.

2019-09-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support gcc-4.6.4: vfprintf, vsnprintf: pad with space.
	* lib/stdio/vfprintf.c (vfprintf): pad with space.
	* lib/stdio/vsnprintf.c (vsnprintf): pad with space.

2019-09-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support gcc-4.6.4: Add math stubs.
	* lib/math/ceil.c: New file.
	* lib/math/floor.c: New file.
	* lib/stub/atan2.c: New file.
	* lib/stub/cos.c: New file.
	* lib/stub/exp.c: New file.
	* lib/stub/log.c: New file.
	* lib/stub/modf.c: New file.
	* lib/stub/pow.c: New file.
	* lib/stub/sin.c: New file.
	* lib/stub/sqrt.c: New file.
	* lib/libc+gnu.c: Include them.
	* include/math.h (atan2, ceil, cos, exp, fabs, floor, log, modf, pow,
	sin, sqrt): Declare.
	* lib/math/fabs.c: Update.
	* lib/stub/ldexp.c: Update.

2019-09-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support gcc-4.6.4: Add fscanf, vfscanf.
	* lib/stdio/vfscanf.c: New file.
	* lib/stdio/fscanf.c: New file.
	* build-aux/configure-lib.sh (libc_gnu_SOURCES): Add them.
	* include/stdio.h (fscanf): Declare.
	* include/stdarg.h (vfscanf): Declare.
	* lib/stub/fscanf.c: Remove.

2019-09-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Libray: Fix off_t.
	* include/sys/types.h (off_t): Drop unsigned.

2019-09-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Environment setup.
	* scripts/mescc.in (MES_ARENA, MES_MAX_ARENA, MES_STACK): Reduce defaults.
	* build-aux/check.sh.in (MES_ARENA): Likewise.  Export them.
	* build-aux/bootstrap.sh.in (MES_STACK): Likewise.
	(MES_PREFIX): Set default.

2019-08-26  Danny Milosavljevic  <dannym@scratchpost.org>

	Add missing #include.
	* lib/stdlib/mbstowcs.c: Add missing #include.

	Fix dtoab.
	* lib/mes/dtoab.c (dtoab): Fix it.
	* lib/tests/mes/90-dtoab.c (main): Fix test.
	* build-aux/check-mescc.sh (XFAIL_TESTS: Remove it.

2019-08-27  Danny Milosavljevic  <dannym@scratchpost.org>

	va_align: Fix compiler warning.
	Follow-up to 49b0cd7d2e6952044d7436260d6ba950e40ee05f.

	* include/stdarg.h: Fix compiler warning.

2019-08-27  Danny Milosavljevic  <dannym@scratchpost.org>

	Add missing #include.
	* lib/tests/mes/90-abtod.c (main): Add missing #include.

	Fix variable argument list traversal for doubles.
	* include/stdarg.h (va_align): New macro.
	(va_arg8): New macro.
	* lib/stdio/vfprintf.c (vfprintf): Use it.
	* lib/stdio/vsnprintf.c (vsnprintf): Use it.

2019-08-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Improve --with-system-libc support.
	* build-aux/build-lib.sh: Avoid building libc for --with-system-libc.
	Make libmes richer.
	build-aux/check-mescc.sh: Enable 50-malloc test.
	* include/dirstream.h: Use HAVE_DIRSTREAM_H to cater for non-existing
	dirstream.h.
	* include/grp.h[SYSTEM_LIBC]: Typo.
	* include/mes/lib.h (__brk, __call_at_exit)[SYSTEM_LIBC]: Declare.
	* include/stdlib.h (comparison_fn_t)[SYSTEM_LIBC]: Declare.
	* include/time.h (mktime): Return time_t.
	* lib/posix/isatty.c [SYSTEM_LIBC]: Do not (re)declare termios.
	* lib/stub/mktime.c (mktime): Return time_t.
	* lib/tests/scaffold/41-ternary.c (main): Remove assumption that
	locals are initialized.
	* lib/tests/scaffold/70-stdarg.c: Cater for SYSTEM_LIBC.
	* lib/tests/setjmp/80-setjmp.c: Declare jmp buf.
	* lib/*/*.c: Add missing mes/lib.h, errno.h includes.

2019-09-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: vfprintf, vsnprintf: Pad floats with space.
	* lib/stdio/vfprintf.c (vfprintf): Pad floats with space.
	* lib/stdio/vsnprintf.c (vsnprintf): Pad floats with space.
	* lib/tests/stdio/90-sprintf.c: Test it.

2019-08-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: vsscanf: Increase count for scanned float.
	* lib/stdio/vsscanf.c (vsscanf): Increase count for scanned float.

2019-07-31  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Tar: Fix getpwnam, getpwuid stubs.
	* lib/stub/getpwnam.c (getpwnam): Return pointer to static struct
	passwd.
	* lib/stub/getpwuid.c (getpwuid): Likewise.

2019-07-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Tar: Add getgrgid, getgrnam, setgrent stub.
	* include/grp.h: New file.
	* lib/stub/getgrgid.c: New file.
	* lib/stub/getgrnam.c: New file.
	* lib/stub/setgrent.c: New file.
	* lib/libc+gnu.c: Include them.

2019-07-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Awk: Add wchar_t.
	* include/sys/types.h (wchar_t): New typedef.

2019-07-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Awk: Add getpgid, getpgrp stubs.
	* include/unistd.h (getpgid, getpgrp): Declare.
	* lib/stub/getpgid.c: New file.
	* lib/stub/getpgrp.c: New file.
	* lib/libc+gnu.c: Include them.

2019-07-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Tar: Add mktime stub, fix localtime stub.
	* include/time.h (mktime): Declare.
	* lib/stub/mktime.c: New stub.
	* lib/libc+gnu.c: Include it.
	* lib/stub/localtime.c (localtime): Return pointer to static struct
	tm.  Avoids segfaults.

2019-07-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Tar: Add creat, mknod.
	* include/linux/x86_64/syscall.h (SYS_mknod): New macro.
	* include/linux/x86/syscall.h (SYS_mknod): New macro.
	* lib/linux/mknod.c: New file.
	* build-aux/configure-lib.sh (libc_gnu_SOURCES): Add it.
	* include/sys/stat.h (mknod): Declare it.
	* include/fcntl.h (creat): New macro.

2019-07-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Tar: Add missing defines.
	* include/errno.h (ENXIO): New macro.
	* include/sys/stat.h (S_IFIFO, S_ISFIFO): New macro.

2019-07-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Bash: Add struct winsize.
	* include/termio.h (struct winsize): New type.

2019-07-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Awk: Implement atof.
	* lib/stdlib/atoi.c: Update.
	* lib/stdlib/atof.c: Rename from stub/atof.c; Implement.
	* lib/libc+gnu.c: Update include.
	* lib/libg.c: Update include.

2020-01-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Awk: Add dtoab, %f in vfprintf, vsnprintf.
	* include/libmes.h (dtoab): Declare.
	* lib/mes/ntoab.c (ntoab): Update.
	* lib/mes/dtoab.c: New file.
	* build-aux/configure-lib.sh (libmes_SOURCES, libc_tcc_SOURCES): Add
	it.
	* lib/tests/mes/90-dtoab.c: Test it.
	* lib/tests/stdio/90-sprintf.c: Test it.
	* build-aux/check-mescc.sh (tests): Run it, against...
	* lib/tests/mes/90-dtoab.stdout: ...baseline.
	* lib/stdio/vfprintf.c (vfprintf): Support %f, even more naive support
	for %e, %E, %g, %G.
	* lib/stdio/vsnprintf.c (vsnprintf): Likewise.

2019-06-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Awk: Add abtod, implementing strtod.
	* include/libmes.h (abtod): Declare.
	* lib/mes/abtod.c: New file.
	* build-aux/configure-lib.sh (libmes_SOURCES, libc_tcc_SOURCES): Add
	it.
	* lib/mes/abtol.c: Update.
	* lib/stdlib/strtod.c: Use it to implement; move from stub/strtod.
	* lib/tests/mes/90-abtod.c: Test it.
	* lib/tests/mes/90-abtod.stdout: Baseline.
	* build-aux/check-mescc.sh (tests): Run it.

2019-06-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Awk: vsscanf: Support %f.
	* lib/stdio/vsscanf.c (vsscanf): Support %f.

2019-06-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Awk: Do not flush std files.
	* lib/stdio/fflush.c (fflush): Do not flush std files.

2019-06-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Awk: Add isgraph.
	* lib/ctype/isgraph.c: New file.
	* lib/libc+gnu.c: Include it.
	* include/ctype.h: Add missing prototypes.

2019-06-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Tar: Add readlink, symlink.
	* lib/linux/gnu.c (readlink, symlink): New function.
	* include/unistd.h (readlink, symlink): Declare.
	* include/linux/x86/syscall.h (SYS_readlink, SYS_symlink): New macro.
	* include/linux/x86_64/syscall.h (SYS_symlink, SYS_readlink): New
	macro.

2019-06-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support GNU Tar: Add execlp.
	* lib/posix/execl.c (vexec): New function.
	(execl): Use it.
	* lib/posix/execlp.c: New file.
	* build-aux/configure-lib.sh (libc_tcc_SOURCES): Add it.
	* lib/libc+gnu.c: Include it.
	* include/unistd.h (execlp): Declare.
	* lib/tests/posix/90-execlp.c: New file.
	* lib/tests/posix/90-execlp.stdout: New file.
	* build-aux/check-mescc.sh: Test it.

2019-06-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Fix compile warnings.
	* include/stdlib.h (abort): Add prototype.

2019-11-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Add missing stubs.
	* build-aux/configure-lib.sh (libc_gnu_SOURCES): Add fscanf, rewind stubs.
	* lib/stdio/freeopen.c: Remove.

2019-09-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Avoid tar --exclude=.
	* build-aux/install.sh.in: Only use `tar --exclude=' if we also have .go
	files compiled by Guile.

2019-09-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: mesar: Remove bashisms.
	* scripts/mesar.in: Remove bashisms.

2019-10-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	configure.sh: Cleanup argument parsing. Thanks, Timothy!
	* configure.sh: Cleanup argument parsing.

2019-09-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	configure.sh: Remove bashisms.
	* configure.sh: Remove bashisms.  Fixes running with Gash 0.1.

2019-09-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "nyacc: 0.86.0 compatibility stub. WIP"
	This reverts commit 0183cc1c42437fda27196e27b490285a61d47f59.

	While it works to run Nyacc 0.86.0, it breaks running Nyacc 0.93 and
	up.  This would need more thought and work, adding a nyacc-compat
	directory or so.  Seems not worth the effort right now.

2019-09-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	nyacc: 0.86.0 compatibility stub. WIP
	* mes/module/nyacc/lang/c99/util.scm: 0.86.0 compatibility stub.

2019-09-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Split-out build-source-lib.sh from build-lib.sh.
	* build-aux/build-lib.sh: Remove building of source lib.
	* build-aux/build-source-lib.sh: New file.
	* build-aux/build.sh.in: Invoke it.
	* build-aux/bootstrap.sh.in: Likewise.

2019-11-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Honor configure's --includedir. Thanks, Vagrant!
	Suggested by Vagrant Cascadian

	    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902174#84

	* build-aux/install.sh.in: Install headers in $includedir.
	* configure (includedir): Typo.
	* configure.sh (includedir): Likewise.

2019-11-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Create ascii signature.
	* build-aux/GNUmakefile.in (sign): Create ascii signature.

2019-09-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Post-release update.
	* doc/announce/ANNOUNCE-0.20: Update.
	* guix/git/mes.scm (mes): Update.

	Release 0.20.
	* configure (VERSION): Update to 0.20.
	(main): Likewise.
	* configure.sh (VERSION): Likewise.
	* guix/git/mes.scm (mes, mes.git): Likewise.

	doc: Release update.
	* BLURB: New file.
	* AUTHORS: Update.
	* HACKING: Update.
	* INSTALL: Update.
	* NEWS: Update.
	* README: Update.
	* doc/images/gcc-mesboot-graph.dot: Update.
	* doc/mes.texi: Update.
	* simple.sh: Update.
	* doc/announce/ANNOUNCE-0.20: New file.

	guix: Update mescc-tools to 0.6.1.
	* guix/git/mes.scm (mescc-tools): Update to 0.6.1.
	* configure: Check for mescc-tools versions 0.6 or higher.

	build: Create ascii signature.
	* build-aux/GNUmakefile.in (sign): Create ascii signature.

	guix: Update Nyacc to 0.99.
	* guix/git/mes.scm (nyacc): Update to 0.99.

	doc: Add PORTING.
	* PORTING: New file.

	doc: Typos. Thanks, dddddd.
	* doc/announce/ANNOUNCE-0.11: Typo.
	* doc/announce/ANNOUNCE-0.12: Typo.
	* doc/announce/ANNOUNCE-0.13: Typo.
	* doc/announce/ANNOUNCE-0.14: Typo.

	mescc: Remove dead code. Thanks Mark Weaver.
	* module/mescc/compile.scm (field-size): Remove dead function.

	guix: Update packaging.
	* build-aux/manifest.scm (string-append):
	* guix/git/mes.scm (nyacc, git-file?): Remove.
	(mescc-tools): Bump to 0.6.0.
	(%source-dir): New variable.
	(mes.git): Ues it.
	* guix.scm: Rename from .guix.scm.

	build: Do not generate ChangeLog from tarball.
	* configure (main): Set .git-for-build.
	* build-aux/install.sh.in (DESTDIR): Use it as canary to skip
	ChangeLog rebuild.

	build: Use mesar instead of ar.
	* scripts/mesar.in: Rename from ar.in.  Update users.
	* build-aux/build.sh.in (LIBS): Update.
	* build-aux/check.sh.in (recheck): Likwise.
	* build-aux/install.sh.in (DESTDIR): Likwise.
	* configure (main): Likwise.
	* configure.sh (mes_system): Likwise.
	* .gitignore: Update.

	getopt: Remove old FSF address, thanks Vagrant.
	* lib/posix/getopt.c: Remove old FSF address.

2019-09-09  Danny Milosavljevic  <dannym@scratchpost.org>

	Add missing #include.
	* lib/tests/scaffold/55-char-array.c: Add missing #include.

	Add missing #include.
	* lib/tests/io/90-stat.c: Add missing #include.

	Add missing #include.
	* lib/posix/getcwd.c: Add missing #include.

2019-09-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	signal: Use SA_RESTORER on x86-64.
	* lib/linux/signal.c (signal)[x86_64]: Avoid segfault by setting
	SA_RESTORER flag.

2019-09-09  Danny Milosavljevic  <dannym@scratchpost.org>

	signal: Add comment on why we don't use the restorer.
	* lib/linux/signal.c: Add comment on why we don't use the restorer.

	signal: Remove SA_SIGINFO.
	* lib/linux/signal.c (signal): Remove SA_SIGINFO.

	signal: Don't use custom restorer.
	* lib/linux/signal.c (signal): Don't use custom restorer.

	signal: Use SA_SIGINFO (like glibc).
	* lib/linux/signal.c (_restorer): Rename to...
	(_restorer_for_siginfo): ...this.
	(signal): Use it.  Use SA_SIGINFO.

	signal: Make sure that the signal mask is actually unsigned long.
	* lib/linux/signal.c (signal): Make sure that the signal mask is actually
	unsigned long.

2019-09-09  Danny Milosavljevic  <dannym@scratchpost.org>

	Delete "__sigmask".
	Follow-up to 6d95b89759d3c598fc84194429ae8c57249daa1a

	* lib/linux/signal.c (__sigmask): Delete definition.

2019-09-09  Danny Milosavljevic  <dannym@scratchpost.org>

	Fix "struct sigaction" structure for rt_sigaction.
	* include/signal.h (sigset_t): Increase size.
	* lib/linux/signal.c (signal): Use new sigset_t.

	Inherit CFLAGS for mes.
	* build-aux/check.sh.in: Inherit CFLAGS for mes.

	Fix typo.
	* build-aux/build.sh.in: Fix typo in "CFLAGS".

	tests: Fail early on nonexistent file.
	* lib/tests/io/90-stat.c (main): Fail early on nonexistent file.

	open: Check flags, and use _open2 if applicable.
	* lib/linux/open.c (open): Check flags; use _open2.

	ldiv: Make rem < 0 if a < 0.
	* lib/mes/div.c (ldiv): Make rem < 0 if a < 0.

	ldiv: Handle a == LONG_MIN.
	* lib/mes/div.c (ldiv): Handle a == LONG_MIN.

2019-09-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	ntoab: Use __mesabi_uldiv only for arm.
	* lib/mes/ntoab.c (ntoab)[__MESC__ && __arm__]: Use __mesabi_uldiv.
	* build-aux/check-mescc.sh (XFAIL_TESTS): 70-printf-simple.c and
	70-printf.c now pass for x86_64 mescc.

2019-07-01  Danny Milosavljevic  <dannym@scratchpost.org>

	Fix ntoab.
	Follow-up to b5b19304b59fefbed923b146ec8c8d495556fa76.

	* lib/mes/ntoab.c (ntoab): Fix non-MESC case.

2019-06-18  Danny Milosavljevic  <dannym@scratchpost.org>

	signal: Define "_restorer" everywhere except on i386.
	* lib/linux/signal.c: Define "_restorer" everywhere except on i386.

	Clarify our data type choices in "struct stat".
	* include/sys/stat.h: Clarify our data type choices in "struct stat".

2019-09-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Bump timeout.
	* build-aux/test-c.sh: Bump timeout to 10s, __mesabi_uldiv can be slow.

2019-06-14  Danny Milosavljevic  <dannym@scratchpost.org>

	ntoab: Use __mesabi_uldiv only on __MESC__.
	* lib/mes/ntoab.c (ntoab): Use __mesabi_uldiv only on __MESC__.

2019-06-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Include mes/div.c for mescc builds.
	* build-aux/configure-lib.sh (libmes_SOURCES): Add mes/div.c.
	* simple.sh: Likewise.

2019-06-13  Danny Milosavljevic  <dannym@scratchpost.org>

	ntoab: Include "assert.h".
	* lib/mes/ntoab.c: #include "assert.h".

	mescc: Mes C Library: Use __mesabi_uldiv.
	* lib/mes/ntoab.c (ntoab): Use __mesabi_uldiv.

	mescc: Mes C Library: Add integer division algorithm.
	* lib/mes/div.c: New file.

2019-07-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Have write behave well with buffered reads.
	* lib/mes/write.c: New file.
	* build-aux/configure-lib.sh (libc_mini_SOURCES): Add it.
	(libc_mini_shared_SOURCES): New variable.
	(libc_mini_SOURCES, libmes_SOURCES): Use it.
	(libmes_SOURCES): Add lib/linux/lseek.c, lib/posix/write.c.
	(libc_tcc_SOURCES): Remove lib/linux/lseek.c.
	* lib/posix/write.c (write): Correct for read buffer.
	* lib/stdio/fwrite.c (fwrite): Remove read buffer correction.
	* simple.sh: Update.

2019-07-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Add buffered read.
	* lib/mes/__buffered_read.c: New file.
	* build-aux/configure-lib.sh (libc_SOURCES): Add it.  Also add memmove.c.
	(libc_tcc_SOURCES): Remove memmove.c
	* lib/linux/close.c (close): Clear read buffer.
	* lib/linux/_open3.c (_open3): Likewise.
	* lib/linux/lseek.c (lseek): Correct for read buffer.
	* lib/stdio/fwrite.c (fwrite): Likewise.
	* lib/posix/read.c (read): Call __buffered_read.
	* lib/posix/write.c (write): Add FIXME note about buffered reads.
	* simple.sh: Update.

2019-06-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	tests: Disable 70-extern.c for x86_64-gcc.
	* build-aux/check-mescc.sh (XFAIL_TESTS)[x86_64-gcc]: Add
	70-extern.c.

2019-05-30  Danny Milosavljevic  <dannym@scratchpost.org>

	mescc: Put char's ASCII code into register, not char.
	* module/mescc/compile.scm (expr-register): Put char's ASCII code into
	register, not char.

2019-06-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Update to Nyacc 0.93.
	* mes/module/nyacc/lang/c99/util.mes: New file.
	* mes/module/nyacc/lang/c99/parser.mes: Use it.
	* module/mescc/compile.scm (ast->info): Update for Nyacc 0.93.0.
	* module/mescc/preprocess.scm (need-progress):  Likewise.
	(ast-strip-comment): Likewise.

2019-08-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: string->number: Support #x-prefixed hex numbers.
	* mes/module/mes/scm.mes (string->number): Support "#x"-prefix.
	* tests/math.test ("string->number #hex"): Test it.

2019-07-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Do not dump variables with extern storage.
	* lib/tests/scaffold/70-extern.stdout: New file.
	* lib/tests/scaffold/70-extern.c: New file.
	* build-aux/check-mescc.sh (TESTS): Add it..
	* module/mescc/M1.scm (global-string?, global-extern?): New function.
	(info->M1): Dump strings first.  Skip extern symbols.
	* module/mescc/info.scm (<global>): Add storage field.
	(make-global): Add storage parameter.  Pass it.
	* module/mescc/compile.scm (make-global-entry): Likewise.
	(global->info): Likewise.
	(init-declr->info): Likewise.
	(decl->info): Pass storage.

	build: ./pre-inst-env MES_PREFIX fixup.
	* build-aux/pre-inst-env.in: Set MES_PREFIX to abs_top_srcdir.
	* src/mes.c (open_boot): Cater for MES_PREFIX/mes and ${srcdest}.

	mescc: Be silent.
	* module/mescc/M1.scm (infos->M1, info->M1): Add verbose?.  Move
	debugging into verbose? > 1.
	* module/mescc/compile.scm (c99-input->info, c99-ast->info): Likewise.
	(mescc:trace-verbose): Rename from mescc:trace.
	(mescc:trace): New function.
	* module/mescc.scm (mescc:main): Likewise.
	* module/mescc/mescc.scm (mescc:preprocess, c->ast mescc:compile,
	c->info, E->info): Likewise.
	* module/mescc/preprocess.scm (c99-input->full-ast, c99-input->ast):
	Likewise.

2019-07-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Add <include>/<kernel>/<arch> to include path.
	* module/mescc/preprocess.scm (c99-input->full-ast): Add
	<include>/<kernel>/<arch> to include path.
	* module/mescc/compile.scm (c99-input->info): Pass arch.
	* module/mescc/mescc.scm (mescc:preprocess): Likewise.
	(c->info): Likewise.
	(c->ast): Likewise.

	mescc: Add 70-function-destruct-declare.c test.
	* module/mescc/compile.scm (init-declr->info): Do not attempt to
	re-calculate function type.
	(ftn-declr:get-type): Remove.
	* lib/tests/scaffold/70-function-destruct-declare.c: New file.
	* build-aux/check-mescc.sh (TESTS): Add it.

	mescc: Resurrect --write.
	* module/mescc/mescc.scm (mescc:preprocess): Pass pretty-print/write
	to c->ast.

	build: Distribute crt*.c, libc+gnu.c for tcc, gcc bootstrap build.
	* build-aux/build-lib.sh (libc_gnu_SOURCES): Build libc+gnu.c.  Copy
	crt*.c, libc+gnu.c for distribution.

	build: Uniquify config macros.
	* configure (main): Rename VERSION to MES_VERSION, pkgdatadir to
	MES_PKGDATADIR.  Update users.
	* configure.sh (mes_system): Likewise.
	* src/mes.c (mes_symbols): Update.
	(open_boot): Update.
	* scaffold/cons-mes.c (main): Update.
	* simple.sh: Update.

2019-07-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Resurrect --with-cheating.
	* build-aux/config.sh.in (SCHEME): New substitute.
	* build-aux/config.make.in: Likewise.
	* configure: Substitute them.

2019-07-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support tcc: libtcc1 build fixes.
	* lib/libtcc1.c: Support building without long long, float support.

2019-06-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Avoid type/size_t conflicts.
	* include/alloca.h: Remove typedefs, include sys/types.h.
	* include/stdint.h: Likewise.
	* include/string.h: Likewise.

2019-07-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support tcc: Add intptr_t, uintptr_t.
	* include/sys/types.h (intptr_t, uintptr_t): Add typedef.

2019-07-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Add 70-struct-post.c test with fix.
	* lib/tests/scaffold/70-struct-post.c: New file.
	* build-aux/check-mescc.sh (TESTS): Add it.
	* module/mescc/compile.scm (expr->register): Use type size for rank
	0 (WAS: 1).

	mescc: Add 70-struct-short-enum-init.c test with fix.
	* module/mescc/compile.scm (init->data): Respect type of size.
	* lib/tests/scaffold/70-struct-short-enum-init.c: New file.
	* lib/tests/scaffold/70-struct-short-enum-init.stdout: New file.
	* build-aux/check-mescc.sh (TESTS): Add test.

2019-07-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Add 70-array-in-struct-init.c test with fix.
	* lib/tests/scaffold/70-array-in-struct-init.c: New file.
	* lib/tests/scaffold/70-array-in-struct-init.stdout: New file.
	* build-aux/check-mescc.sh (TESTS): Add test.
	* module/mescc/compile.scm (array-init-element->data): Recurse for
	elements instead of using init->data.  Support array fields.

2019-07-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Remove broken copy of simple-format.
	* mes/module/mes/simple-format.mes: New file.
	* mes/module/mes/guile.mes: Use it.
	(with-output-to-string, simple-format): Remove broken copies.
	* mes/module/mes/display.mes (with-output-to-string, simple-format,
	format): Remove.

2019-07-05  Danny Milosavljevic  <dannym@scratchpost.org>

	Fix remainder handling.
	* mes/module/mes/scm.mes (number->string): Fix remainder handling.
	* build-aux/check-mescc.sh (XFAIL_TESTS): Remove
	lib/tests/scaffold/60-math.c.

2019-07-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "test: Disable 60-math.c test."
	This reverts commit bbe6576a66a520d429bb3ec84120ffcce88480bf.

	test: Disable 60-math.c test.
	* build-aux/check-mescc.sh (TESTS): Remove
	lib/tests/scaffold/60-math.c.
	(BROKEN_TESTS): Add it.

2019-07-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Resurrect bootstrap.sh.
	* build-aux/connfigure-lib.sh: Split from build-lib.sh
	* build-aux/build-lib.sh: Include it.
	* build-aux/bootstrap.sh.in: New file.
	* configure.sh: Substitute it.

2019-07-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Use basename of input as default output name.
	* module/mescc/mescc.scm (mescc:preprocess, mescc:compile,
	mescc:assemble, M1->hex2): Use basename of input as default output name.

2019-07-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Handle gcc with --pie-by-default.
	This fixes upgrading to debian-hurd-20190220.img.

	* build-aux/build.sh.in (CFLAGS): Add -static.  Fixes using gcc
	compiled with --pie-by-default
	* build-aux/check.sh.in (CFLAGS): Likewise.
	* module/mescc.scm (parse-opts): Ignore -no-pie, -static.

2019-07-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Split-off broken 72-typedef-struct-def-local.
	* lib/tests/scaffold/72-typedef-struct-def-local.c: New file.
	* lib/tests/scaffold/72-typedef-struct-def.c: Remove local bit.
	* build-aux/check-mescc.sh (TESTS): Add it.
	(XFAIL_TESTS)[mescc]: Add lib/tests/scaffold/72-typedef-struct-def.c.

2019-06-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Fix open-read test.
	* build-aux/pre-inst-env.in (srcdir): Remove.
	(abs_top_srcdir, abs_top_builddir): Export.
	* lib/tests/posix/50-open-read.c (main): Use abs_top_srcdir.

2019-06-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Add open-read test.
	* build-aux/test-c.sh: Support running by hand.
	* lib/tests/posix/50-open-read.c: New test.
	* lib/tests/posix/data/open-read: New file.
	* build-aux/check-mescc.sh (TESTS): Add it.

	test: Enable argv test, run tests with arguments.
	* build-aux/check-mescc.sh (TESTS): Enable 54-argv.c
	(XFAIL_TESTS): Remove it.
	* build-aux/test-c.sh: Invoke test with options.
	* lib/tests/scaffold/54-argc.c: Update.

2019-06-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C library: Move common getcwd, open bits to posix.
	* lib/linux/_getcwd.c: Rename from getcwd.c.
	* lib/linux/_open3.c: Rename from open.c.
	* lib/posix/getcwd.c: New file with bits from ../linux/getcwd.c.
	* lib/posix/open.c: New file with bits ../linux/getcwd.c.
	* build-aux/build-lib.sh (libc_SOURCES): Update.

2019-06-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Move posix bits to read.
	* lib/linux/_read.c: Rename from read.
	* lib/posix/read.c: New file.
	* build-aux/build-lib.sh (libc_SOURCES): Update.
	* include/mes/lib.h (_read): Declare.

2019-06-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	porting: Avoid failing in scaffold build.
	* build-aux/build-scaffold.sh: Do not fail when using courage.

	build: Use bash if available to avoid dash problems.
	* configure: Set SHELL to bash.
	* configure.sh: Likewise.
	* build-aux/test-suite.sh (TEST_LOGS):
	* build-aux/export.make: Export SHELL.
	* build-aux/config.sh.in (SHELL): New substitute, export.
	* build-aux/config.make.in (SHELL): New substitute.
	* build-aux/GNUmakefile.in (build, check, install, uninstall): Use
	$SHELL to avoid dash problems.
	* build-aux/check-mescc.sh: Likewise.
	* build-aux/build.sh.in: Likewise.
	* build-aux/check-mes.sh: Likewise.
	* build-aux/check.sh.in: Likewise.

	test: Oops, uncomment some commented-out tests.
	* lib/tests/scaffold/55-char-array.c: Uncomment.
	* lib/tests/scaffold/72-typedef-struct-def.c: Likewise.

	build: Improve --with-system-libc support.
	* build-aux/build-lib.sh: Avoid building libc for --with-system-libc.
	Make libmes richer.
	build-aux/check-mescc.sh: Enable 50-malloc test.
	* include/dirstream.h: Use HAVE_DIRSTREAM_H to cater for non-existing
	dirstream.h.
	* include/grp.h[SYSTEM_LIBC]: Typo.
	* include/mes/lib.h (__brk, __call_at_exit)[SYSTEM_LIBC]: Declare.
	* include/stdlib.h (comparison_fn_t)[SYSTEM_LIBC]: Declare.
	* include/time.h (mktime): Return time_t.
	* lib/posix/isatty.c [SYSTEM_LIBC]: Do not (re)declare termios.
	* lib/stub/mktime.c (mktime): Return time_t.
	* lib/tests/scaffold/41-ternary.c (main): Remove assumption that
	locals are initialized.
	* lib/tests/scaffold/70-stdarg.c: Cater for SYSTEM_LIBC.
	* lib/tests/setjmp/80-setjmp.c: Declare jmp buf.
	* lib/*/*.c: Add missing mes/lib.h, errno.h includes.

2019-06-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	porting: Add x86_64 scaffold: exit and write in assembly.
	* lib/x86_64-mes-gcc/exit-42.S: New file.
	* lib/x86_64-mes-gcc/hello-mes.S: New file.
	* lib/x86_64-mes/elf64-0exit-42.hex2: New file.
	* lib/x86_64-mes/elf64-0hello-mes.hex2: New file.
	* lib/x86_64-mes/elf64-body-exit-42.hex2: Rewrite..
	* lib/x86_64-mes/elf64-body-hello-mes.hex2:
	* lib/x86_64-mes/elf64-0header.hex2: Fix copyright header.
	* lib/x86_64-mes/elf64-header.hex2: Likewise.
	* lib/x86_64-mes/elf-0footer.hex2: Remove.

2019-06-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	porting: Add x86 scaffold: exit and write in assembly.
	* lib/x86-mes-gcc/exit-42.S: New file.
	* lib/x86-mes-gcc/hello-mes.S: New file.
	* lib/x86-mes/elf32-0exit-42.hex2: New file.
	* lib/x86-mes/elf32-0hello-mes.hex2: New file.
	* lib/x86-mes/elf32-body-hello-mes.hex2: New file.
	* lib/x86-mes/elf32-body-exit-42.hex2: Rewrite.
	* lib/x86-mes/elf32-header.hex2: Fix copyright header.
	* lib/x86-mes/elf32-0header.hex2: Likewise.
	* lib/x86-mes/elf-0footer.hex2: Remove.
	* build-aux/build-scaffold.sh: Build them.
	* .dir-locals.el (asm-mode): Allow TABs.
	* .gitignore: Reserve .S assembly sources, i.e. manual written
	assembly.  Update build system.
	* module/mescc/mescc.scm: Update.
	* build-aux/build-lib.sh: Update.
	* scripts/ar.in: Update.

2019-06-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	make check: Do not re-check unless recheck=true.
	* build-aux/check-mescc.sh (recheck): New variable.
	* build-aux/check.sh.in (recheck): New variable.
	* build-aux/test-suite.sh (TEST_LOGS): Use it.

2019-05-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Cater for ARM.
	* configure: Cater for ARM.
	* configure.sh: Likewise
	* build-aux/GNUmakefile.in: Likewise.
	* build-aux/bootstrap.sh.in: Likewise.
	* module/mescc.scm (parse-opts): Likewise.
	* src/mes.c (mes_environment): Likewise.
	* build-aux/build.sh.in: Likewise.
	* build-aux/config.sh Likewise.
	* build-aux/install.sh.in: Likewise.
	* module/mes/guile.scm: Likewise.
	* scripts/mescc.scm.in: Likewise.
	* module/mescc/mescc.scm (arch-get): New function.
	(arch-get-info): New function.
	(arch-get-define): New function.
	(arch-get-m1-options): New function.
	(arch-get-Architecture): New function.
	(mescc:preprocess c->info, E->info, M1->hex2, hex2->elf,
	M1->blood-elf, arch-find): Use them.

2019-06-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Drop $@-workaround.
	* scripts/mescc.in: Drop $@-workaround.

2019-06-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Simplify.
	    core: Make mes src/ c files separate compilation units.

	* include/mes/constants.h: New file.
	* include/mes/macros.h: New file.
	* include/mes/mes.h: New file.
	* src/gc.c: Update.
	* src/hash.c: Update.
	* src/lib.c: Update.
	* src/math.c: Update.
	* src/mes.c: Update.
	* src/module.c: Update.
	* src/posix.c: Update.
	* src/reader.c: Update.
	* src/string.c: Update.
	* src/struct.c: Update.
	* src/vector.c: Update.

	    mes: Update datadir.

	* src/mes.c (g_datadir): New global.
	(open_boot): Rename from read_boot.
	(read_boot): New function.
	* mes/module/mes/boot-0.scm: Move from boot-0.scm.in
	* configure: Update.
	* configure.sh: Update.

	    mescc: Create libraries from separate files.

	* .gitignore: Update.
	* build-aux/bootstrap-mes.sh: Remove.
	* build-aux/bootstrap.sh.in: Remove.
	* build-aux/build-guile.sh: Update.
	* build-aux/build-mes.sh: Update.
	* build-aux/build-scaffold.sh: New file.
	* build-aux/build.sh.in: Update.
	* build-aux/cc.sh: Update.
	* build-aux/check-tcc.sh: Remove.
	* build-aux/config.sh.in: New file.
	* build-aux/config.sh: Remove.
	* build-aux/install.sh.in: Update.
	* build-aux/test-boot.sh: New file.
	* build-aux/test-c.sh: New file.
	* build-aux/test-driver: New file.
	* build-aux/test-suite.sh: New file.
	* build-aux/trace.sh: Update.
	* build-aux/uninstall.sh.in: Update.
	* configure: Update.
	* configure.sh: Update.
	* lib/linux/x86-mes-mescc/crt1.c: Move from lib/linux/x86-mes.
	* lib/linux/x86-mes-mescc/mini.c: Likewise.
	* lib/linux/x86_64-mes-mescc/crt1.c: Move from lib/linux/x86_64-mes.
	* lib/linux/x86_64-mes-mescc/mini.c: Likewise.
	* lib/linux/x86-mes-gcc/syscall.c: Rename from mes.c.
	* lib/linux/x86-mes-mescc/syscall.c: Likewise.
	* lib/linux/x86_64-mes-gcc/syscall.c: Likewise.
	* lib/linux/x86_64-mes-mescc/syscall.c: Likewise.
	* lib/mes/mes_open.c: Include config.h.
	* lib/tests/stdio/70-printf-hello.c: Likewise.
	* lib/tests/stdio/70-printf-simple.c: Likewise.
	* scaffold/gc-test.sh: New file.
	* simple.sh: Update.

2019-06-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Move scaffold/tests into lib.
	* lib/tests/scaffold: Move from scaffold/tests.
	* scaffold/tests: Remove.
	* build-aux/check-mescc.sh: Update.

2019-05-10  Danny Milosavljevic  <dannym@scratchpost.org>

	build: Make "GUILEC" compilation status output more verbose (print full path).
	* build-aux/build-guile.sh: Make "GUILEC" compilation status output more
	verbose (print full path).

2019-05-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Fix --disable-silent-rules. Thanks ng0!
	* configure (main): Substitute V as string value.
	* build-aux/trace.sh: Typo.  Fixes using V=0.
	* build-aux/config.status.in (V): New substitute.
	* build-aux/config.make.in (V): New substiute.

	mescc: Use a.out as default executable name.
	* module/mescc/mescc.scm (hex2->elf): Use a.out as default executable
	name.

	mescc: Robustify against empty `V' in environment.
	* module/mescc.scm: Robustify against empty V in environment.

2019-05-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Fix -dumpmachine to respect -m bits selection.
	* module/mescc.scm (parse-opts): Fix -dumpmachine to respect -m bits
	selection.  Also display kernel.

2019-05-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support single-dash options on Mes too.
	* scripts/mescc.in[MES]: Add -- as separator, fixes using single-dash
	options on Mes too.

	mescc: Ignore -fnobuiltin, -nostdinc for GCC compatibility.
	* module/mescc.scm (parse-opts): Add -fnobuiltin, -nostdinc.
	(mescc:main): Ignore them.

2019-05-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Resurrect running boot tests on Guile.
	* module/mes/guile.scm (keyword->string): New function.
	* scaffold/boot/43-or.scm (foo): Add quoting.
	* scaffold/boot/45-pass-if.scm (pass-if): Likewise.
	* scaffold/boot/46-report.scm (pass-if): Likewise.
	* scaffold/boot/47-pass-if-eq.scm (pass-if): Likewise.
	* scaffold/boot/48-let.scm (map): Rename from map1.
	* scaffold/boot/60-let-syntax-expanded.scm: Some work.

2019-05-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Fix compile warnings.
	* lib/stdio/fputc.c (fputc): Oops, stream is a long.
	* lib/stdlib/malloc.c (malloc): Cast to char *. FIXME
	* lib/string/memchr.c (memchr): Cast to void *.
	* lib/string/memcmp.c (memcmp): Add const cast.

	mescc: Mes C Library: Fixes for x86_64 crt1.c
	* lib/linux/x86_64-mes/crt1.c (_start): Write only 4 bytes to int
	variables __stdin, __stdout, __stderr.

2019-05-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Move srfi-1 for-each and map tests to tests/srfi-1.test.
	This fixes: `make check MES=guile'.

	* tests/srfi-1.test ("map 1,2", "map 2,1", "for-each 1,2",
	for-each 2,1"): Move from scm.test.
	* tests/scm.test ("map 1,2", "map 2,1", "for-each 1,2",
	for-each 2,1"): Remove.

2019-05-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Use SYSTEM_LIBC [WAS: WITH_GLIBC].
	Run: sed -i 's,WITH_GLIBC,SYSTEM_LIBC,g' $(git grep -l WITH_GLIBC)

	* build-aux/config.sh: Update.
	* include/alloca.h: Likewise.
	* include/ar.h: Likewise.
	* include/argz.h: Likewise.
	* include/assert.h: Likewise.
	* include/ctype.h: Likewise.
	* include/dirent.h: Likewise.
	* include/dirstream.h: Likewise.
	* include/dlfcn.h: Likewise.
	* include/endian.h: Likewise.
	* include/errno.h: Likewise.
	* include/fcntl.h: Likewise.
	* include/features.h: Likewise.
	* include/float.h: Likewise.
	* include/getopt.h: Likewise.
	* include/inttypes.h: Likewise.
	* include/libgen.h: Likewise.
	* include/limits.h: Likewise.
	* include/linux/x86_64/syscall.h: Likewise.
	* include/locale.h: Likewise.
	* include/math.h: Likewise.
	* include/memory.h: Likewise.
	* include/mes/lib-mini.h: Likewise.
	* include/pwd.h: Likewise.
	* include/setjmp.h: Likewise.
	* include/signal.h: Likewise.
	* include/stdarg.h: Likewise.
	* include/stdbool.h: Likewise.
	* include/stddef.h: Likewise.
	* include/stdint.h: Likewise.
	* include/stdio.h: Likewise.
	* include/stdlib.h: Likewise.
	* include/stdnoreturn.h: Likewise.
	* include/string.h: Likewise.
	* include/strings.h: Likewise.
	* include/sys/cdefs.h: Likewise.
	* include/sys/dir.h: Likewise.
	* include/sys/file.h: Likewise.
	* include/sys/ioctl.h: Likewise.
	* include/sys/mman.h: Likewise.
	* include/sys/param.h: Likewise.
	* include/sys/resource.h: Likewise.
	* include/sys/select.h: Likewise.
	* include/sys/stat.h: Likewise.
	* include/sys/time.h: Likewise.
	* include/sys/timeb.h: Likewise.
	* include/sys/times.h: Likewise.
	* include/sys/types.h: Likewise.
	* include/sys/ucontext.h: Likewise.
	* include/sys/user.h: Likewise.
	* include/sys/wait.h: Likewise.
	* include/termio.h: Likewise.
	* include/time.h: Likewise.
	* include/unistd.h: Likewise.
	* lib/libmes.c: Likewise.
	* lib/tests/stdio/70-printf-hello.c: Likewise.
	* lib/tests/stdio/70-printf-simple.c: Likewise.
	* lib/tests/stdio/80-sscanf.c: Likewise.
	* lib/tests/stdlib/50-malloc.c: Likewise.
	* module/mescc/preprocess.scm: Likewise.
	* scaffold/cons-mes.c: Likewise.
	* scaffold/lib/stdlib/malloc.c: Likewise.
	* scaffold/micro-mes.c: Likewise.
	* scaffold/tests/61-array.c: Likewise.
	* scaffold/tiny-mes.c: Likewise.
	* simple.sh: Likewise.
	* src/mes.c: Likewise.

2019-05-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Bugfix for search-path. Fixes running MesCC on Guile.
	* module/mescc/mescc.scm (arch-find): Also look in cwd.
	* mes/module/mes/posix.mes (search-path): Do not look in cwd.

2019-05-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Use named --architecture switch for upcoming mescc-tools 0.6.
	* module/mescc/mescc.scm (M1->hex2): Use named --architecture switch for
	upcoming mescc-tools 0.6.
	(hex2->elf): Likewise.
	* build-aux/bootstrap-mes.sh: Likewise.
	* build-aux/bootstrap.sh.in: Likewise.
	* build-aux/config.sh: Likewise.

2019-05-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Identify 64-bit bug when compiled with MesCC.
	* src/math.c (divide): Add divide-by-zero error.
	(modulo): Likewise.
	* module/mes/guile.scm (%compiler): New variable.
	* module/mescc/M1.scm (mesc?): New variable.
	(hex2:immediate8): Use it to avoid divide-by-zero error.
	* HACKING (Bugs): Add it.

	mes: Make debug levels 4 and 5 usable.
	* HACKING: Update debug policy.
	* lib/linux/read.c (read): Print read in level 5.
	* src/mes.c (eval_apply): Print module in level 6.
	(main): Likewise.  Remove redundant module printing.
	* src/gc.c (gc): Print symbols in level 6.

2019-05-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Run build-aux/indent.sh.
	* src/mes.c: Re-indent.
	* src: Likewise.
	* include: Likewise.
	* lib: Likewise.
	* scaffold: Likewise.

2019-05-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Grand indent: prepare.
	* build-aux/indent.sh: New file.
	* include/mes/builtins.h: Move from src/builtins.h.
	* include/fcntl.h: Use // *INDENT-OFF* to prevent indent breakage.
	* include/locale.h: Likewise.
	* include/signal.h: Likewise.
	* include/sys/stat.h: Likewise.
	* include/sys/user.h: Likewise.
	* lib/linux/x86-mes-gcc/crt0.c: Likewise.
	* lib/linux/x86-mes-gcc/crt1.c: Likewise.
	* lib/linux/x86-mes-gcc/mes.c: Likewise.
	* lib/linux/x86-mes-gcc/mini.c: Likewise.
	* lib/linux/x86_64-mes-gcc/crt0.c: Likewise.
	* lib/linux/x86_64-mes-gcc/crt1.c: Likewise.
	* lib/linux/x86_64-mes-gcc/mes.c: Likewise.
	* lib/linux/x86_64-mes-gcc/mini.c: Likewise.
	* lib/x86_64-mes-gcc/setjmp.c: Likewise.
	* src/mes.c: Likewise.
	* src/reader.c: Likewise.

2019-05-15  Jan (janneke) Nieuwenhuizen  <janneke@gnu.org>

	mes: Support -c EXPR.
	* mes/module/mes/boot-0.scm.in: Support -c EXPR.

	mes: Support optional port on read.
	* mes/module/mes/scm.mes (read): Support optional port on read.

	build: Fix mescc installation on Debian.
	* build-aux/pre-inst-env.in: Set bindir.
	* scripts/mescc.in: Fix configure/prefix issues.
	* mes/module/mes/boot-01.scm (integer->char): Remove.
	(newline): Use "\n".
	(%moduledir): Use string-append.
	* mes/module/mes/boot-02.scm: Likewise.
	* mes/module/mes/boot-0.scm: Likewise.

	build: Debian make check and install fixes.
	* configure (main): Oops, typo: mandir uses --infodir.
	* build-aux/check.sh.in: Run check-mescc.sh with bash.
	* build-aux/config.sh (CFLAGS, CPPFLAGS, HEX2FLAGS, LDFLAGS, M1FLAGS):
	unset.
	* build-aux/install.sh.in: Use BASHOPTS to check for bash; on Debian
	dash is used and has $SHELL=/bin/bash.  Use ${DESTDIR}@...

2019-05-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Rename strings.c.
	* src/string.c: Rename from src/strings.c.
	* src/mes.c
	* build-aux/snarf.sh: Update.

2019-05-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Use mes_open to avoid open trickery.
	* include/mes/lib.h (mes_open): Declare.
	* lib/libmes.c[WITH_GLIBC]: Remove open undefine.
	(mes_open)[!WITH_GLIBC]: New function.
	* src/mes.c (open_boot): Use mes_open.
	* src/posix.c (open_input_file): Likewise.
	(open_output_file): Likewise.

	mescc: Mes C Library: Remove dead code.
	* lib/glibc.c: Remove.
	* lib/abtol.c: Remove.

	mescc: Mes C Library: Explode linux/tcc.c.
	* lib/linux/close.c: New file.
	* lib/linux/lseek.c: New file.
	* lib/linux/rmdir.c: New file.
	* lib/linux/stat.c: New file.
	* lib/linux/tcc.c: Include them.
	(close, lseek, rmdir, stat): Remove.

	mescc: Mes C Library: Explode linux/libc.c.
	* lib/linux/access.c: New file.
	* lib/linux/brk.c: New file.
	* lib/linux/chmod.c: New file.
	* lib/linux/dup.c: New file.
	* lib/linux/dup2.c: New file.
	* lib/linux/execve.c: New file.
	* lib/linux/fork.c: New file.
	* lib/linux/fsync.c: New file.
	* lib/linux/getcwd.c: New file.
	* lib/linux/ioctl.c: New file.
	* lib/linux/libc.c: New file.
	* lib/linux/open.c: New file.
	* lib/linux/read.c: New file.
	* lib/linux/unlink.c: New file.
	* lib/linux/waitpid.c: New file.
	* lib/linux/libc.c: Include them.
	(access, brk, chmod, dup, dup2, execve, fork, fsync, getcwd, ioctl,
	libc, open, read, unlink, waitpid): Remove.

2019-05-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Explode linux/gnu.c.
	* lib/linux/chdir.c: New file.
	* lib/linux/fcntl.c: New file.
	* lib/linux/fstat.c: New file.
	* lib/linux/getdents.c: New file.
	* lib/linux/getegid.c: New file.
	* lib/linux/geteuid.c: New file.
	* lib/linux/getgid.c: New file.
	* lib/linux/getpid.c: New file.
	* lib/linux/getppid.c: New file.
	* lib/linux/getrusage.c: New file.
	* lib/linux/getuid.c: New file.
	* lib/linux/kill.c: New file.
	* lib/linux/link.c: New file.
	* lib/linux/lstat.c: New file.
	* lib/linux/mkdir.c: New file.
	* lib/linux/nanosleep.c: New file.
	* lib/linux/pipe.c: New file.
	* lib/linux/rename.c: New file.
	* lib/linux/setgid.c: New file.
	* lib/linux/settimer.c: New file.
	* lib/linux/setuid.c: New file.
	* lib/linux/signal.c: New file.
	* lib/linux/sigprogmask.c: New file.
	* lib/linux/gnu.c: Include them.
	(chdir, fcntl, fstat, getdents, getegid, geteuid, getgid, getpid,
	getppid, getrusage, getuid, kill, link, lstat, mkdir, munmap,
	nanosleep, pipe, rename, setgid, settimer, setuid, signal,
	sigprogmask): Remove.

2019-05-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Explode libc-mini.c.
	* lib/posix/write.c: New file.
	* lib/linux/libc-mini.c: Include it.
	(write): Remove.
	* lib/tests/mes/30-oputs.c: Remove dead code.

2019-05-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Cleanup includes.
	* include/mes/lib-mini.h: Move from include/libmes-mini.h.  Update users.
	* include/mes/lib.h: Move from include/libmes.h.  Update users.

2019-05-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support -nodefaultlibs, -nostartfiles, -nostdlib.
	* module/mescc.scm (parse-opts): Parse -nodefaultlibs, -nostartfiles, -nostdlib.
	* module/mescc/mescc.scm (mescc:link): Handle -nodefaultlibs, -nostdlib.
	(hex2->elf): Handle -nostartfiles, -nostdlib.

2019-05-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Do not install test binaries.
	* build-aux/install.sh.in: Do not install test binaries.

2019-05-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: m2: Move force-output to Scheme.
	* mes/module/mes/posix.mes (force-output): New function.
	* src/posix.c (force_output): Remove.
	* src/mes.c (mes_builtins): Remove adding of force-output.

2019-03-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: M2-Planet first-aid, simplest build script possible.
	* simple.sh: New file.

2019-03-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	.dir-locals.el: Assert default GNU settings.
	* .dir-locals.el: Assert default GNU settings.

	Fix typo in stage0 copyright headers.
	* lib/x86-mes/elf-0footer.hex2: Fix typo.
	* lib/x86-mes/elf32-0header.hex2: Fix typo.
	* lib/x86-mes/elf32-body-exit-42.hex2: Fix typo.
	* lib/x86-mes/elf32-footer-single-main.hex2: Fix typo.
	* lib/x86-mes/elf32-header.hex2: Fix typo.
	* lib/x86_64-mes/elf-0footer.hex2: Fix typo.
	* lib/x86_64-mes/elf64-0header.hex2: Fix typo.
	* lib/x86_64-mes/elf64-body-exit-42.hex2: Fix typo.
	* lib/x86_64-mes/elf64-footer-single-main.hex2: Fix typo.
	* lib/x86_64-mes/elf64-header.hex2: Fix typo.

2019-03-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Fix ungetc.
	* include/sys/resource.h (OPEN_MAX, RLIMIT_NOFILE): New macro.
	* lib/libc.c: Add memset.c include.
	* lib/libc+tcc.c: Remove memset.c include.
	* lib/linux/tcc.c (close):
	* lib/mes/fdgetc.c (__ungetc_buf): New global.
	(_ungetc_pos, _ungetc_fd, _ungetc_buf): Remove.  Update users.
	* scaffold/tests/65-read.c: Update.

2019-03-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Replace POSIX, posix_p by WITH_GLIBC, wip_glibc_p.
	* build-aux/build-mes.sh: Replace POSIX, posix_p by WITH_GLIBC, wip_glibc_p.
	* build-aux/build.sh.in: Likewise.
	* build-aux/cc.sh (link): Likewise.
	* build-aux/config.make.in (with_glibc_p): Likewise.
	* build-aux/config.sh (libc): Likewise.
	(CPPFLAGS): Likewise.
	* build-aux/config.status.in (with_glibc_p): Likewise.
	* build-aux/test.sh: Likewise.
	* configure (main): Likewise.
	* configure.sh (subst): Likewise.
	(mes_arch): Likewise.
	* include/libmes.h: Likewise.
	* include/linux/x86_64/syscall.h: Likewise.
	* lib/libmes.c: Likewise.
	* lib/tests/stdio/70-printf-hello.c (main): Likewise.
	* lib/tests/stdio/70-printf-simple.c (main): Likewise.
	* lib/tests/stdio/80-sscanf.c (main): Likewise.
	* lib/tests/stdlib/50-malloc.c: Likewise.
	* module/mescc/preprocess.scm (c99-input->full-ast): Likewise.
	* scaffold/cons-mes.c: Likewise.
	* scaffold/lib/stdlib/malloc.c: Likewise.
	* scaffold/micro-mes.c: Likewise.
	* scaffold/tests/61-array.c (getenv): Likewise.
	* scaffold/tiny-mes.c: Likewise.
	* src/mes.c: Likewise.

2019-03-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Fix compile warnings.
	* include/libmes.h (dtoab, itoa, ltoa, ntoab, ultoa, utoa): Return
	char* (WAS: char const*).
	* lib/*/*c: Update, add missing includes.

2019-03-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Fix isatty.
	* lib/posix/isatty.c (isatty): Test ioctl == 0.
	* mes/module/mes/boot-0.scm.in: Update: no tty?: read from stdin.

	test: 50-getenv: Test PATH, allow to fail.
	* lib/tests/posix/50-getenv.c (main): Test PATH.
	* build-aux/check-mescc.sh (broken): Add 50-getenv.

	mes: Support map and for-each with lists of unequal length.
	* mes/module/mes/base.mes (map): Support lists of unequal length.
	* mes/module/mes/scm.mes (for-each): Likewise.
	* module/mescc/compile.scm (expr->register): Fix compile warning.
	* tests/scm.test ("map 1,2", "map 2,1", "for-each 1,2", "for-each
	2,1": Test it.

	mescc: Mes C Library: Use __ as global internal prefix.
	* include/libmes-mini.h (g_stdin, g_stdout, g_stderr): Rename to
	__stdin, __stdout, __stderr.  Update users.

2019-02-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: ctype.h: Add missing prototypes.
	* include/ctype.h: Add missing prototypes.

	mescc: Mes C Library: Bugfix for tcc-compiled exit assembly.
	* lib/linux/x86-mes-gcc/mini.c (_exit): Add clobbered registers %eax,
	%ebx.  Fixes always exit 1.

2019-02-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Remove special characters from files.
	* scaffold/tests/06-call-not-1.c: Rename from 06-call-!1.c.
	* scaffold/tests/06-not-call-1.c: Rename from 06-!call-1.c.
	* scaffold/tests/12-if-eq.c: Rename from 12-if-==.c.
	* scaffold/tests/13-if-neq.c: Rename from 13-if-!=.c.
	* scaffold/tests/15-if-not-f.c: Rename from 15-if-!f.c.
	* scaffold/tests/21-char-array-simple.c: Rename from 21-char[]-simple.c.
	* scaffold/tests/21-char-array.c: Rename from 21-char[].c.
	* scaffold/tests/22-while-char-array.c: Rename from 22-while-char[].c.
	* scaffold/tests/41-ternary.c: Rename from 41-?.c.
	* scaffold/tests/7u-call-ternary.c: Rename from 7u-call-?.c.
	* scaffold/tests/7u-ternary-expression.c: Rename from 7u-?-expression.c.
	* build-aux/check-mescc.sh (tests): Update.

	build: Support building with Gash.
	* build-aux/check-mes.sh: Replace unspported $((..)) by $(expr ...).
	* build-aux/check-mescc.sh: Likewise.
	* build-aux/check-tcc.sh: Likewise.

2019-02-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Configure: remove temp files.
	* configure (gulp-pipe*): Remove .error.
	(check-header-c): Remove .config.c.
	(check-compile-c): Likewise.
	(check-link-c): Likewise.

	build: Remove mini-mes.
	* scaffold/mini-mes.c: Remove.
	* build-aux/build-mes.sh: Remove commented build instructions.
	* .gitignore: Remove pattern.

2019-02-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Initialize streams in crt1.
	* lib/linux/x86-mes-gcc/crt1.c: Initialize streams.
	* lib/linux/x86-mes/crt1.c: Likewise.
	* lib/linux/x86_64-mes-gcc/crt1.c: Likewise.
	* lib/linux/x86_64-mes/crt1.c: Likewise.
	* src/mes.c (main): Remove initialization of streams.

	mescc: Mes C Library: Populate with function tests from scaffold.
	* .gitignore: Update.
	* build-aux/bootstrap.sh.in: Update.
	* build-aux/build-mes.sh: Update.
	* build-aux/check-mescc.sh: Update.
	* lib/tests/assert/50-assert.c: Move from scaffold/tests/50-assert.c.
	* lib/tests/dirent/90-readdir.c: Move from scaffold/tests/99-readdir.c.
	* lib/tests/dirent/readdir.dir: Move from scaffold/tests/readdir.dir.
	* lib/tests/io/90-stat.c: Move from scaffold/tests/92-stat.c.
	* lib/tests/mes/30-oputs.c: Move from scaffold/tests/31-oputs.c.
	* lib/tests/mes/50-itoa.c: Move from scaffold/tests/51-itoa.c.
	* lib/tests/posix/90-unsetenv.c: Move from scaffold/tests/94-unsetenv.c.
	* lib/tests/setjmp/80-setjmp.c: Move from scaffold/tests/80-setjmp.c.
	* lib/tests/signal/90-signal.c: Move from scaffold/tests/95-signal.c.
	* lib/tests/stdio/70-printf-hello.c: Move from scaffold/tests/70-printf-hello.c.
	* lib/tests/stdio/70-printf-simple.c: Move from scaffold/tests/70-printf-simple.c.
	* lib/tests/stdio/70-printf.c: Move from scaffold/tests/70-printf.c.
	* lib/tests/stdio/80-sscanf.c: Move from scaffold/tests/87-sscanf.c.
	* lib/tests/stdio/90-fopen-append.c: Move from scaffold/tests/98-fopen.c.
	* lib/tests/stdio/90-fopen.c: Move from scaffold/tests/97-fopen.c.
	* lib/tests/stdio/90-fread-fwrite.c: Move from scaffold/tests/93-fread-fwrite.c.
	* lib/tests/stdio/90-fseek.c: Move from scaffold/tests/91-fseek.c.
	* lib/tests/stdlib/50-getenv.c: Move from lib/tests/stdlib/getenv.c.
	* lib/tests/stdlib/50-malloc.c: Move from lib/tests/stdlib/malloc.c.
	* lib/tests/stdlib/70-strtoull.c: Move from scaffold/tests/7j-strtoull.c.
	* lib/tests/stdlib/80-qsort-dupes.c: Move from scaffold/tests/81-qsort-dupes.c.
	* lib/tests/stdlib/80-qsort.c: Move from scaffold/tests/81-qsort.c.
	* lib/tests/stdlib/90-strtol.c: Move from scaffold/tests/96-strto.c.
	* lib/tests/string/30-strlen.c: Move from scaffold/tests/30-strlen.c.
	* lib/tests/string/50-strcmp.c: Move from scaffold/tests/51-strcmp.c.
	* lib/tests/string/50-strcpy.c: Move from scaffold/tests/53-strcpy.c.
	* lib/tests/string/50-strncmp.c: Move from scaffold/tests/51-strncmp.c.
	* lib/tests/string/70-strchr.c: Move from scaffold/tests/70-strchr.c.
	* lib/tests/string/80-strncpy.c: Move from scaffold/tests/86-strncpy.c.
	* lib/tests/string/80-strrchr.c: Move from scaffold/tests/88-strrchr.c.
	* lib/tests/string/90-snprintf.c: Move from scaffold/tests/9a-snprintf.c.
	* lib/tests/string/90-strpbrk.c: Move from scaffold/tests/90-strpbrk.c.
	* lib/tests/string/90-strspn.c: Move from scaffold/tests/90-strspn.c.

2019-02-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Start test suite.
	TODO: move strict libc tests from scaffold/test/* here.

	* lib/tests/stdlib/getenv.c: New file.
	* lib/tests/stdlib/malloc.c: Move from scaffold.
	* build-aux/bootstrap.sh.in: Built them.
	* build-aux/build-mes.sh: Likewise.

2019-02-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Remove stray debugging newline output.
	* mes/module/mes/guile.mes (open-input-file): Move debugging newline
	into debug clause.

	mescc: Mes C Library: Fix brk return type compare.
	* lib/stdlib/malloc.c (malloc): Fix brk return type compare.

	core: Rename load_env to read_boot.
	* src/mes.c (read_boot): Rename from load_env; Update users.
	(open_boot): Rename from load_boot; Update users.

2019-02-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Initialize g_buf dynamically, add MES_STRING_MAX override.
	* src/mes.c (g_buf, MAX_STRING): Move from strings.c.
	(gc_init_cells): Initialize g_buf dynamically.
	(main): Add environment override MES_MAX_STRING for MAX_STRING.
	* doc/mes.texi (Environment Variables): Document it.

2019-02-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes-snarf: rewrite for development-time snarfing
	* build-aux/mes-snarf.scm (%gcc?): Remove.
	(symbol->header): Produce code for src/builtins.h.
	(symbol->source, symbol->names, function->environment): Remove.
	(snarf-symbols): Rewrite, snarf from init_symbol (...).
	(function->source): Produce code to be manually put into
	(main): Remove --mes option.

2019-02-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Resurrect POSIX build. Thanks, gio!
	* lib/libmes.c[POSIX]: Define and initialize g_stdin, g_stdout and
	g_stderr that were moved to crt1 for non-POSIX builds.
	* src/mes.c[POSIX]: Remove struct-initialisation exceptions.

2019-01-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Remove struct definitions for builtins, drop snarfing.
	After making a change to the list of builtin functions, run

	    cat src/*.i

	and move the into

	    src/mes.c:mes_builtins ()

	and, or also after changing the list of fixed symbols in src/mes.c:mes_symbols (), do

	    cat src/*.h > src/builtins.h

	* build-aux/build.sh.in: Remove snarfing.
	* build-aux/bootstrap.sh.in: Likewise.
	* mes/module/mes/display.mes (display):
	* mes/module/mes/type-0.mes (cell:type-alist): Remove <cell:function>.
	(function?, builtin?): Remove.
	* src/builtins.h: New file.
	* src/mes.c (TFUNCTION): Remove.
	(struct function): Remove.
	(apply_builtin): Rewrite from call.
	(mes_builtins): Rewrite.
	(init_builtin, make_builtin_type, make_builtin, builtin_name,
	builtin_arity, builtin, builtin_p, builtin_printer): New function.

2019-01-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Remove struct definitions for cells, drop snarfing for symbols.
	* src/mes.c (init_symbol): New function.
	(mes_symbols): Use it.
	(scm_nil, ... scm_test): Remove.

2018-12-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Add take-while.
	* mes/module/srfi/srfi-1.mes (take-while): New function.

2018-12-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Enhance POSIX command-line support, e.g. -DFOO=1.
	* module/mescc.scm (unclump-single): New function.
	(main): Use it to support -DFOO=bar, and equivalent.

2018-12-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Support running out-of-tree.
	* build-aux/pre-inst-env.in (MES_PREFIX): Use absolute name.

	core: Remove string debugging.
	* src/strings.c (make_bytes, make_string, string_equal_p,
	symbol_to_string, symbol_to_keyword, make_symbol): Remove string
	debugging.

	core: Remove --dump, --load.
	* mes/module/mes/boot-0.scm.in (tty?): Remove --dump, --load.
	* src/mes.c (bload_env): Remove.
	* src/reader.c (dump): Remove.

2018-12-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Post-release update.
	* doc/announce/ANNOUNCE-0.19: Update.

	Release 0.19.
	* configure (VERSION): Update to 0.19.
	(main): Likewise.
	* configure.sh (VERSION): Likewise.
	* guix/git/mes.scm (mes, mes.git): Likewise.

2018-10-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Release update.
	* AUTHORS: Update.
	* HACKING: Update.
	* NEWS: Update.
	* doc/mes.guix: Update.
	* scripts/mescc.in: Update.
	* mes/module/mes/boot-0.scm.in: Update.
	* doc/announce/ANNOUNCE-0.19: New file.

2018-12-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: assq-ref, assoc-ref: Support alist == #f.
	* mes/module/mes/scm.mes (assq-ref): Support alist == #f.
	(assoc-ref): Likewise.

	core: Bump MAX_STRING to 524288
	* src/strings.c (MAX_STRING): Bump to 524288.
	(assert_max_string): New function.
	(list_to_cstring, string_append, read_string): Use it.
	* src/reader.c (reader_read_string): Use it.

2018-12-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support Bash: Add getppid.
	* lib/linux/gnu.c (getppid): New function.
	* include/linux/x86/syscall.h (SYS_getppid): New macro.
	* include/linux/x86_64/syscall.h (SYS_getppid): New macro.

	mescc: Support bash: Add sigdelset stub.
	* lib/stub/sigdelset.c (sigdelset): New stub.
	* lib/libc+gnu.c: Include it.

2018-12-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: getcwd: Support getcwd (0, 0) GNU extension.
	* lib/linux/libc.c (_getcwd): Rename from getcwd.
	(_getcwd): New function.  Support getcwd (0, 0) GNU extension.

2018-12-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Replace \r in comments.
	* module/mescc/compile.scm (ast->comment): Replace \r in comments.

2018-11-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Support building with Gash.
	* build-aux/install.sh: Replace variables with substitution.
	* build-aux/bootstrap.sh: New file.
	* configure: Substitute it.
	* configure.sh: Likewise.  Be friendly to Gash.
	* .gitignore: Ignore it.

2018-11-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Run without shell.
	* mes/module/mescc.mes: New file.
	* module/mescc.scm: Include it.
	* scripts/mescc.scm.in: New file.
	* scripts/mescc.in: Use it; Make pure shell.
	* configure: Substitute it.
	* configure.sh: Substitute it.
	* build-aux/install.sh.in: Install it.

2018-11-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Add string-ref.
	* src/strings.c (string_ref): New function.
	* mes/module/mes/scm.mes (string-ref): Remove.

	core: Add string-length.
	* src/strings.c (string_length): New function.
	* mes/module/mes/scm.mes (string-length): Remove.

	core: Add string-append.
	* src/strings.c (string_append): New function.
	* mes/module/mes/boot-0.scm.in (string-append): Remove.
	* mes/module/mes/boot-03.scm (string-append): Remove.
	* scaffold/boot/50-make-string.scm (string-append): Remove.
	* scaffold/boot/50-string-append.scm (string-append): Remove.
	* scaffold/boot/50-string-join.scm (string-append): Remove.
	* scaffold/boot/51-module.scm (string-append): Remove.
	* scaffold/boot/52-define-module.scm (string-append): Remove.
	* tests/macro.test (string-append): Remove.
	* scaffold/boot/17-string-append.scm: Move from 50-string-append.scm.

2018-11-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: String as array of bytes.
	* src/strings.c: New file.
	* src/mes.c: Use it.  Update users.

2018-11-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Move mecmp to libc.
	* lib/libc.c: Include mecmp.c.
	* lib/libc+tcc.c: Remove mecmp.c include.

2018-11-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Move memchr to libc.
	* lib/libc.c: Include memchr.c.

	test: Use write instead of display.
	* module/mes/test.scm (seq?, sequal?, seq2?, sless?, sequal2?): Use
	write for expected, actual.

2018-11-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: struct_set_: Oops typo.
	* src/struct.c (struct_set_x_): Oops, remove indirection.

	mes: Remove copy of make-string.
	* mes/module/mes/guile.mes (make-string): Remove copy.

	mescc: Compile fixes.
	* include/libmes-mini.h[WITH_GLIBC]: Do not declare strlen, write, types.

2018-11-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Oops, %moduledir debug info.
	* mes/module/mes/boot-0.scm.in: Oops, %moduledir debug info.

	build: configure: Support Mes.
	* configure: Support Mes.

	mes; Add read-line.
	* mes/module/mes/guile.mes (read-line): New function.

	mes: dirname: Fix for absolute file names.
	* mes/module/mes/guile.mes (dirname): Fix absolute files.

	mes: Add file-exists?.
	* mes/module/mes/guile.mes (file-exists?): New function.

	mes: Add with-error-to-file.
	* mes/module/mes/guile.mes (with-error-to-file): New function.

	mes: Add string-downcase, string-upcase, string-tokenize.
	* mes/module/srfi/srfi-13.mes (string-downcase, string-upcase,
	string-tokenize): New function.

	mes: Add char-downcase, char-upcase.
	* mes/module/srfi/srfi-14.mes (char-downcase, char-upcase): New
	function.

	mes: Add char-set:digit, char-set:lower-case, char-set:upper-case.
	* mes/module/srfi/srfi-14.mes (char-set:digit, char-set:lower-case,
	char-set:upper-case): New variable.

	mes: Add char-set-adjoin, char-set-complement.
	* mes/module/srfi/srfi-14.mes (char-set-adjoin, char-set-complement):
	New function.

	mes: system*: Support redirection.
	* mes/module/mes/posix.mes (system*): Support redirection.

	core: read_string: Allow for gc.
	* src/posix.c (read_char): Add optional port parameter.
	(read_string): Allow for gc.

	core: Add delete_file.
	* src/posix.c (delete_file): New function.

	core: Add dup, dup2.
	* src/posix.c (dup_, dup2_): New function.

	core: Add getcwd.
	* src/posix.c (getcwd_): New function.

	core: Support redirection of stderr.
	* include/libmes-mini.h (g_stderr): New global.
	* lib/mes/eputc.c (eputc): Use it.
	* lib/mes/eputs.c (eputs): Likewise.
	* lib/mes/oputc.c (oputc): Likewise.
	* lib/mes/oputs.c (oputs): Likewise.
	* src/lib.c (display_error_, write_error_): Likewise.
	* src/posix.c (write_byte): Likewise.
	* src/mes.c (mes_builtins): Likewise.
	(main): Iniitalize g_stderr.
	* src/posix.c (current_error_port, set_current_error_port): New
	function.
	* mes/module/mes/boot-0.scm.in (current-output-port,
	current-error-port): Remove.

	core: Assert g_free in alloc.
	* src/mes.c (alloc): Assert g_free.

	mescc: unlink: Move to libc.
	* lib/linux/libc.c (unlink): New function.
	* lib/linux/tcc.c (unlink): Remove.

	mescc: dup, dup2: Move to libc.
	* lib/linux/libc.c (dup, dup2): New function.
	* lib/linux/gnu.c (dup, dup2): Remove.

	mescc: getcwd: Move to libc.
	* lib/linux/libc.c (getcwd): New function.
	* lib/linux/tcc.c (getcwd): Remove.

2018-11-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support GNU make with POSIX.
	* include/linux/x86/syscall.h (SYS_sigprocmask): New macro.
	* include/linux/x86_64/syscall.h (SYS_rt_sigprocmask): New macro.
	* include/signal.h (SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK): New macro.
	(sigprocmask): Declare.
	* lib/linux/gnu.c (sigprocmask): New function.

2018-11-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support GNU Bash.
	* include/errno.h (EACCES, ENOSPC, ESPIPE): New macro.
	* include/linux/x86/syscall.h (SYS_setuid, SYS_geteuid, SYS_getegid,
	SYS_setgid): New macro.
	* include/linux/x86_64/syscall.h: Likewise.
	* include/stdint.h (LLONG_MIN, LLONG_MAX, SIZE_MAX): New macro.
	* include/sys/stat.h (S_ISUID, S_ISGID, S_IXGRP, S_IXOTH, S_IRGRP,
	S_IROTH, S_IWGRP, S_IWOTH, S_IRWXG, S_IRWXO): New macro.
	* include/termio.h: New file.
	* include/unistd.h (_POSIX_VERSION): New macro.
	* lib/linux/gnu.c (geteuid, getegid, setuid, setgid): New function.
	* lib/string/memchr.c: New file.
	* lib/stub/getpwuid.c: New file.
	* lib/stub/rand.c: New file.
	* lib/stub/ttyname.c: New file.
	* include/string.h (memchr): Declare.
	* include/unistd.h (geteuid, getegid, setuid, setgid): Declare.

2018-11-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Simplify: cater for one compiler at a time.
	* build-aux/build-cc.sh: Remove.
	* build-aux/build-cc32.sh: Remove.
	* build-aux/build-cc64.sh: Remove.
	* build-aux/build-x86_64-mes.sh: Remove.
	* build-aux/cc-mes.sh: Remove.
	* build-aux/cc-x86_64-mes.sh: Remove.
	* build-aux/cc32-mes.sh: Remove.
	* build-aux/cc64-mes.sh: Remove.
	* build-aux/test64.sh: Remove.
	* build-aux/bootstrap-mes.sh: New file.
	* build-aux/config.make.in: New file.
	* build-aux/config.status.in: New file.
	* build-aux/test-cc.sh: New file.
	* .gitignore: Update.
	* build-aux/GNUmakefile.in: Update.
	* build-aux/build-guile.sh: Update.
	* build-aux/build-mes.sh: Update.
	* build-aux/build.sh.in: Update.
	* build-aux/cc.sh: Update.
	* build-aux/check-boot.sh: Update.
	* build-aux/check-mes.sh: Update.
	* build-aux/check-mescc.sh: Update.
	* build-aux/check-tcc.sh: Update.
	* build-aux/check.sh.in: Update.
	* build-aux/config.sh: Update.
	* build-aux/export.make: Update.
	* build-aux/install.sh.in: Update.
	* build-aux/pre-inst-env.in: Update.
	* build-aux/test.sh: Update.
	* build-aux/uninstall.sh.in: Update.
	* configure: Update.
	* configure.sh: Update.
	* module/mescc/i386/as.scm: Update.
	* module/mescc/preprocess.scm: Update.
	* module/mescc/x86_64/as.scm: Update.
	* scripts/mescc.in: Update.
	* tests/psyntax.test: Update.

2018-11-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Add missing define.
	* lib/x86-mes/x86.M1: Add missing define.

2018-11-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Exit if library cannot be found.
	* module/mescc/mescc.scm (arch-find): Exit upon failure.

	mescc: Accept -O, --std, -x.
	* scripts/mescc.in (parse-opts): Accept -O, --std, -x.

	mescc: Support -dumpmachine.
	* scripts/mescc.in (parse-opts): Support -dumpmachine.

2018-10-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: vsnprintf: Compliant implementation.
	* lib/stdio/vsnprintf.c (vsnprintf): New, complient implementation,
	replacing vsnprint.
	* lib/stdio/vsprintf.c (vsnprint): Forward to vsnprint.
	* lib/stdio/snprintf.c (snprintf): Likewise.
	* scaffold/tests/9a-snprintf.c: Test it.
	* build-aux/check-mescc.sh (tests): Run it.

2018-10-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Add performance test.
	* module/mes/test.scm (pass-if-timeout): New macro.
	* tests/perform.test: New test.
	* build-aux/check-mes.sh (tests): Run it.

	mes: Add ceil, floor, round, inexact->exact.
	* mes/module/mes/scm.mes (ceil, floor, round, inexact->exact,
	exact->inexact): New function.

	mes: read-string: Take optional port argument.
	* src/posix.c (read_string): Take optional port argument.
	* mes/module/mes/guile.mes (read-string): Remove.

	core: eval_apply: Order gotos according to frequency.
	* src/mes.c (eval_apply): Order gotos according to frequency.

	Revert "core: eval_apply profile."
	This reverts commit d61e6be0b18459a8e3c262eab448b428dc81937a.

	core: eval_apply profile.
	* src/mes.c: Poor man's eval_apply profile.

2018-10-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Fix displaying of closure.
	* src/lib.c (display_helper): Fix displaying of closure.

	mes: Print backtrace upon exception.
	* mes/module/mes/catch.mes (display-backtrace,
	frame-function): New function.
	(%eh): Use them.

	core: Set procedure in stack frame.
	* src/mes.c (eval_apply): Set procedure in stack frame.

	core: Implement stack and frame.
	* src/lib.c (frame_printer make_frame_type, make_frame,
	make_stack_type, make_stack, stack_length, stack_ref): New function.

	core: Support time functions.
	* lib/linux/clock_gettime.c: New file, move from gnu.c.
	* lib/linux/gettimeofday.c: New file, move from tcc.c.
	* lib/linux/time.c: New file, move from tcc.c.
	* lib/linux/libc.c: Include them.
	* lib/linux/gnu.c (clock_gettime): Remove.
	* lib/linux/tcc.c (time, gettimeofday): Remove.
	* include/time.h (CLOCK_PROCESS_CPUTIME_ID): New define.
	* src/posix.c (init_time, current_time, gettimeofday_,
	seconds_and_nanoseconds_to_long, get_internal_run_time): New function.
	* src/mes.c (scm_symbol_internal_time_units_per_second): New symbol.
	(main): Call init_time.

2018-10-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Use hash table for symbols.
	* src/mes.c (mes_symbols): Use hash table for symbols.  Update users.

2018-10-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Use assert before failure exit.
	* src/mes.c (error): Use assert before failure exit.  Helps debugging.

2018-10-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Add hashq_get_handle, hash, hash_ref, hash_set_x.
	* src/mes.c (scm_symbol_hashq_table, scm_symbol_record_type,
	scm_symbol_module, scm_symbol_buckets, scm_symbol_size): New symbols.
	Update users.
	* src/hash.c (hash_list_of_char): Rename from hashq_.  Respect size,
	update callers.
	(hashq_, hash_ hash, hashq_get_handle, hash_ref, hash_set_x_,
	hash_set_x): New function.
	(hashq_ref): Do not return handle.  Update callers.

	mes: Move pair? to core.
	* src/lib.c (pair_p): New function.  Gains 8% performance on MesCC.

2018-10-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Move assoc to core.
	* mes/mes.c (assoc_string, assoc): New function.
	* mes/module/mes/scm.mes (assoc): Remove.  Gains 12% performance for
	MesCC.

2018-10-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "core: Add gc-debug for stack array."
	This reverts commit f35084d1dbea889d107824e7596da1701c6b90ad.

2018-10-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Add gc-debug for stack array.
	* src/gc.c (gc_debug): New function.

	scaffold: Resurrect mini-mes.
	* src/mini-mes.c: Resurrect.

2017-12-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Use array-based stack.
	* src/mes.c (STACK_SIZE)[MES_ARRAY_STACK]: New variable.
	(g_stack_array): New variable.
	(g_stack): Change type to SCM*.
	(gc_push_frame)[MES_ARRAY_STACK]: Use g_stack_array, g_stack.
	(gc_peek_frame): Likewise.
	(gc_pop_frame): Likewise.
	* src/gc.c (gc_check): Likewise.
	(gc): Likewise.

2018-10-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Resurrect Guile-1.8 support.
	* module/mes/mes-0.scm: Resurrect Guile-1.8 support.

2018-10-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: expand_variable: Remove weird exceptions: begin, if.
	* src/mes.c (expand_variable_): Remove weird exceptions: begin, if.

2018-10-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Switch to srfi-9 based on structs.
	* mes/module/srfi/srfi-9.mes: Swap symlink to srfi-9-struct.mes.
	* mes/module/srfi/srfi-9/gnu.mes: Swap symlink to gnu-struct.mes.
	* src/module.c (make_module_type): Update to match srfi-9-struct
	records.  Update users.
	* src/hash.c (make_hashq_type): Likewise.

	mes: srfi-9: Add implementation based on struct.
	* mes/module/srfi/srfi-9-struct.mes: New file.
	* mes/module/srfi/srfi-9-vector.mes: Rename from srfi-9.mes
	* mes/module/srfi/srfi-9.mes: Symlink to srfi-9-vector.mes.
	* mes/module/srfi/srfi-9/gnu-struct.mes: Add srfi-9-struct
	implementation.
	* mes/module/srfi/srfi-9/gnu-vector.mes: Rename from gnu.mes.
	* mes/module/srfi/srfi-9/gnu.mes: Symlink to gnu-vector.mes.

	core: hashq-table: Refactor to be a record-like struct.
	* src/hash.c (hash_table_printer): New function.
	(make_hashq_type): New function.
	* src/module.c (module_printer): Use it.
	(make_module_type): New function.
	(make_initial_module): Use them.

	mescc: Mes C Library: oputs: New function.
	* lib/mes/oputc.c: New file.
	* lib/libmes.c: Include it.
	* include/libmes.h: Declare it.

	core: Use hashq-table for macros.
	* src/mes.c (lookup_macro_): Remove.
	(macro_ref, get_macro, macro_set_x): New function.  Update callers.

	core: Add hashq-table type.
	src/hash.c: New file.
	src/module.c (char_hash, module_hash): Remove.
	* src/module.c (make_initial_module): Use hash primitives.
	(module_define_x): Likewise.
	(module_variable): Likewise.
	* build-aux/snarf.sh: Snarf it.
	* src/mes.c: Include it.

	core: Add boot-module.
	* src/mes.c (scm_symbol_boot_module): New symbol.
	(eval_apply): Handle it.
	(mes_symbols): Initialize it.

2018-10-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Add module-define!
	* src/module.c (module_define_x, module_printer): New function.
	(make_initial_module): Use them.
	* tests/srfi-0.test: Test it.
	* src/mes.c (display_m0): Remove.  Update callers.
	* mes/module/mes/fluids.mes (make-fluid): Rewrite.
	* tests/macro.test: Test it.
	* mes/module/mes/boot-0.scm.in (module-define!): Remove.
	* mes/module/mes/boot-02.scm: Likewise.
	* module/mes/misc.scm (pk, warn): New function.
	* build-aux/check-mes.sh (tests): Run tests.

	core: Add module indirection for variable lookup.
	* src/module.c (module_ref, module_variable): New function.
	* src/mes.c: Thoughout: Use them.
	(assq_ref_env): Remove.
	* mes/module/mes/boot-0.scm.in (defined?): Use module-variable.
	* mes/module/mes/boot-00.scm (defined?): Likewise.
	* mes/module/mes/boot-01.scm (defined?): Likewise.
	* mes/module/mes/boot-02.scm (defined?): Likewise.
	* scaffold/boot/53-closure-display.scm: Likewise.

	core: Add module type.
	* src/module.c: New file.
	* build-aux/snarf.sh: Snarf it.
	* src/mes.c: Include it.

	core: Add cstring_to_symbol.
	* src/mes.c (make_symbol): Rename from lookup_symbol_.  Update
	callers.
	(cstring_to_symbol): New function.
	* src/reader.c (reader_read_identifier_or_number): Use it.

2018-10-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Add struct type.
	* src/struct.c: New file.
	* build-aux/snarf.sh: Snarf it.
	* src/mes.c: Include it.

2018-10-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: factor-out snarfing.
	* build-aux/snarf.sh: New file.
	* build-aux/build-cc.sh: Use it.
	* build-aux/build-cc32.sh: Likewise.
	* build-aux/build-cc64.sh: Likewise.
	* build-aux/build-mes.sh: Likewise.
	* build-aux/build-x86_64-mes.sh: Likewise.
	* build-aux/snarf.sh: Likewise.

	core: core:cdr: Support port type.
	* src/mes.c (cdr_): Support port type.
	* mes/module/mes/display.mes (display): Add space between fields.

	mes: with-fluids: Fix reset.
	* mes/module/mes/fluids.mes (with-fluids): Fix reset.
	* tests/fluids.test (report): Remove Mes failure expectation.

2018-10-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Recognize U integer suffix.
	* module/mescc/compile.scm (cstring->int): Recognize U integer
	suffix.  Thanks, Peter de Wachter!

2018-10-16  Peter De Wachter  <pdewacht@gmail.com>

	mescc: Add INTn_MIN/MAX defines to stdint.h.
	* include/stdint.h: Add INTn_MIN/MAX defines.  Move integere size
	defines from limits.h
	* include/limits.h: Include it.

2018-10-16  Peter De Wachter  <pdewacht@gmail.com>

	mescc: Allow superfluous parentheses in function declarations.
	E.g.:  int (f)();
	This is obscure but valid C.  It occurs in the csmith headers (thanks
	to macro shenanigans).

	* module/mescc/compile.scm (fctn-defn:get-name,
	fctn-defn:get-statement): Allow superfluous parentheses in function declarations.

2018-10-16  Peter De Wachter  <pdewacht@gmail.com>

	mescc: Implement unary plus operator.
	* module/mescc/compile.scm (ast->type, expr->register,
	try-expr->number):): Implement unary plus operator.

	mescc: Add missing assembly defines.
	* lib/x86-mes/x86.M1: Add missing assembly defines.
	* lib/x86_64-mes/x86_64.M1: Likewise.

	mescc: Delete duplicate assembly defines.
	* lib/x86-mes/x86.M1: Delete duplicate assembly defines.
	* lib/x86_64-mes/x86_64.M1: Likewise.

2018-10-16  Peter De Wachter  <pdewacht@gmail.com>

	mescc: Exit with non-zero exit code when subprocess fails.
	system* returns the result of waitpid. So, suppose that a subprocess
	fails with exit code 1. Then the waitpid return value will be 256.
	And exit(256) is equivalent to exit(0).

	Modified-by: Jan Nieuwenhuizen <janneke@gnu.org>

	* mes/module/mes/posix.mes (status:exit-val): New function.
	* module/mescc/mescc.scm (assert-system*): Use it.

2018-10-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Oops typo.
	* module/mescc/M1.scm (hex2:immediate8): Typo.

2018-12-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Support \xNN in reader.  Fixes tcc-boot running on Mes.
	* src/reader.c (reader_read_string): Support \xNN.  Fixes Guix
	bootstrap chain; i.e., compilation of gcc-2.95.3 using tcc-boot.
	* tests/base.test ("reader: \\x08"): Test it.
	* scaffold/tests/17-compare-char.c: Likewise, for mescc.
	* build-aux/check-mescc.sh (tests): Run it.

2018-11-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: configure: Make dot optional.
	* configure: Make dot optional.

2018-10-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Oops, remove stray lib/linux/x86_64-mes/crt1.
	* lib/linux/x86_64-mes/crt1: Remove.

2018-10-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: x86_64 bootstrap build fixes and workaround.
	* configure: Substitute @arch@ (WAS: ARCH).  Update users.
	* configure.sh: Substitute @arch@.
	* build-aux/build-mes.sh: Use $GUILE for x86_64 build.
	* build-aux/install.sh.in: Install mes.S, mes.x86_64-mes-S too.
	Prune *.E, *.out.

2018-10-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Release update.

	mescc: Oops, delete wrong line of assembly.
	* lib/x86-mes/x86.M1 (movzbl_%bx,%ebx): Delete wrong line.  Thanks, pdewacht!

2018-10-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	admin: Release update.
	* doc/announce/ANNOUNCE-0.18: New file.
	* guix/git/mes.scm (mes): Update hash.

2018-10-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.18.
	* configure (VERSION): Update to 0.18.
	(main): Likewise.
	* configure.sh (VERSION): Likewise.
	* guix/git/mes.scm (mes, mes.git): Likewise.
	* guix/mescc-tools-boot.patch: New file.

2018-09-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Release update.
	* BOOTSTRAP: Update.
	* HACKING: Update.
	* NEWS: Update.
	* README: Update.
	* doc/mes.texi (Submitting Patches): Fix misquoting, misattribution.

2018-10-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Another attempt at divide.
	* module/mescc/i386/as.scm (i386:r0/r1): Never be signed.  Use div for unsigned.
	(i386:r0%r1): Likewise.
	* module/mescc/x86_64/as.scm (x86_64:r0/r1): Likewise.
	(x86_64:r0%r1): Likewise.
	* lib/x86-mes/x86.M1: Add div.
	* lib/x86_64-mes/x86_64.M1: Likewise.

	tests: Expect srfi-13 failure, MesCC more resembles Gcc.
	* tests/srfi-13.test (report): Expect INT-MIN failure for x86.

2018-10-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: reader: Support 64 bit.
	* src/reader.c (reader_read_identifier_or_number): Support 64 bit.
	(reader_read_binary): Likewise.
	(reader_read_octal): Likewise.
	(reader_read_hex): Likewise.

	mescc: Mes C Library: Fix execve on x86_64.
	* include/linux/x86_64/syscall.h (SYS_execve): Typo.  Fixes execve on
	x86_64.

	build: Support make seed for x86_64.
	* build-aux/GNUmakefile.in (seed): Support make seed for x86_64.
	* build-aux/build-mes.sh[SEED]: Also build src/mes.S.
	* build-aux/build-x86_64-mes.sh[SEED]: Also build src/mes.x86_64-mes.S.

	mes: Support fold-right 3.
	* mes/module/srfi/srfi-1.mes (fold-right): Support fold-right 3.
	* tests/srfi-1.test ("fold-right-3"): Test it.

	mescc: Nyacc comment escapes.
	* module/mescc/compile.scm (ast->comment): Nyacc comment escapes.

	mescc: Fix clobbering of struct by value assign.
	* module/mescc/x86_64/as.scm (long-r0->r1-mem): New instruction.
	* module/mescc/i386/as.scm: Likewise.
	* lib/x86_64-mes/x86_64.M1: Support it.
	* module/mescc/compile.scm (r0->r1-mem*n-): Fix clobbering.

	core: Add vector test.
	* scaffold/boot/11-vector.scm: New test.
	* build-aux/check-boot.sh: Run it.

	mescc: Fix obnoxious assignment ERROR message.
	* module/mescc/compile.scm (expression->register): Fix assignment
	ERROR message.

	core: Avoid 64bit zero divide.
	* src/math.c (divide): Avoid (64bit) 0 divide.
	(modulo): Likewise.

	mescc: Support negative divide.
	* module/mescc/i386/as.scm (i386:r0/r1, i386:r0%r1): Support
	negative divide.
	* module/mescc/x86_64/as.scm (x86_64:r0/r1, x86_64:r0%r1): Likewise.
	* lib/x86-mes/x86.M1: Likewise.
	* lib/x86_64-mes/x86_64.M1: Likewise.
	* scaffold/tests/a0-math-divide-signed-negative.c: Test it.
	* build-aux/check-mescc.sh (tests): Run it.

	mescc: Support --align, off by default.
	* scripts/mescc.in (parse-opts): Add --align.
	* module/mescc/mescc.scm (mescc:compile): Support --align, off by
	default.
	* module/mescc/M1.scm (infos->M1): Add #:align parameter.
	(M1:merge-infos): Likewise.  Keep types.
	(info->M1): Likewise.  Make alignment switchable.
	* module/mescc/compile.scm (r->ident):  Do not clobber.
	(ident-add): Likewise.
	(clean-info): Keep types.
	* module/mescc/i386/as.scm (i386:r->byte-label): New instruction.
	* lib/x86-mes/x86.M1: Add instructions.
	* lib/x86_64-mes/x86_64.M1: Add instructions.
	* module/mescc/x86_64/as.scm (x86_64:r->byte-label,
	x86_64:r->word-label, x86_64:r->long-label): New instruction.

	Revert "mescc: Make globals at least reg-size."
	This reverts commit 30544316c35ed4a2472f2029beb27e007d913792.

	mescc: Make globals at least reg-size.
	* module/mescc/compile.scm (global->info): Make globals at least reg-size.

	mescc: Support 64-bit immediates.
	* module/mescc/M1.scm (hex2:address8, hex2:immediate8): New function.
	(info->M1): Support 64-bit.
	* module/mescc/compile.scm (convert-r0): FIXME!
	* module/mescc/x86_64/as.scm (x86_64:value->r, x86_64:r->local,
	x86_64:label->arg, x86_64:label->r, x86_64:r+value,
	x86_64:r-cmp-value, x86_64:r-long-mem-add, x86_64:r-and): Support
	64-bit immediates.
	* lib/x86_64-mes/x86_64.M1: Likewise.
	* scaffold/tests/17-compare-unsigned-char-le.c: Test it.
	* scaffold/tests/17-compare-unsigned-short-le.c: Test it.
	* build-aux/check-mescc.sh (tests): Run them.

	core: Use proper name for %compiler.
	* src/mes.c (mes_symbols, bload_env): : Use proper name for %compiler.

	core: Resurrect MES_MINI for non-POSIX.
	src/mes.c[MES_MINI,!POSIX]: Resurrect.

	mescc: Mes C Library: Add ultoa.
	* lib/mes/ultoa.c: New file.
	* lib/libmes.c: Include it.
	* include/libmes.h: Declare ultoa.

	mescc: Mes C Library: Add ltoa.
	* lib/mes/ltoa.c: New file.
	* lib/libmes.c: Include it.
	* include/libmes.h: Declare ltoa.

	mescc: Fix truncation of short.
	* module/mescc/compile.scm (convert-r0): Typo.  Fixes truncation of
	short.  Thanks, pdewacht!
	* scaffold/tests/a0-call-trunc-char.c: New file.
	* scaffold/tests/a0-call-trunc-short.c: New file.
	* build-aux/check-mescc.sh: Add them.

	build: Split-off x86_mes-gcc build.
	* build-aux/build-cc64.sh: New file.
	* build-aux/build.sh.in[CC64]: Invoke it.
	* build-aux/build-cc.sh: Remove x86_64-mes-gcc build.
	* build-aux/GNUmakefile.in (x86_64-mes-gcc): New target.
	* build-aux/build-x86_64-mes.sh: Build all scafffold files.

2018-10-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Oops, use MES_LIBS.
	* build-aux/build-x86_64-mes.sh: Use MES_LIBS instead of the unused
	MES64_LIBS.  Fixes build.  Thanks, pdewacht!

	build: remove bashism.
	* build-aux/trace.sh (trace): Remove bashism.  Thanks pdewacht!

2018-10-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Support x86_64.
	* src/lib.c: Support x86_64.
	* src/math.c: Likewise.
	* src/mes.c: Likewise.
	* src/reader.c: Likewise.
	* src/vector.c Likewise.

	build: Oops, set VERSION.
	* build-aux/install.sh.in (VERSION): New substituted variable.

2018-09-30  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Resurrect make seed.
	* build-aux/GNUmakefile.in (seed): Resurrect.
	* build-aux/build-x86_64-mes.sh: Build from seed.

2018-08-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: x86_64 support: Refactor to abstracted assembly, add x86_64.
	* module/mescc/as.scm: Support abstracted assembly.
	* module/mescc/i386/as.scm: Rewrite.
	* module/mescc/x86_64/as.scm: Implement.
	* module/mescc/compile.scm: Refactor to abstracted assembly.
	* module/mescc/M1.scm: Update for partial 64 bit support.
	* module/mescc/bytevectors.scm (bytevector-u64-native-set!): New
	procedure.
	* module/mescc/i386/info.scm (i386:type-alist): Use 4 byte type length
	also for faking double, long long, long double.
	* module/mescc/info.scm:modified:
	* module/mescc/x86_64/info.scm (x86_64:registers): New variable.
	* lib/x86-mes/x86.M1: Update for new register scheme.
	* lib/x86_64-mes/x86_64.M1: Implement.
	* lib/x86-mes/setjmp.c: Implement.
	* lib/x86_64-mes-gcc/setjmp.c: Implement.
	* build-aux/build-cc.sh: Update for x86_64.
	* build-aux/build-cc32.sh: Likewise.
	* build-aux/build-mes.sh: Likewise.
	* build-aux/build-x86_64-mes.sh: Likewise.
	* build-aux/check-mescc.sh: Likewise.
	* build-aux/test64.sh: Likewise.
	* include/libmes.h: Likewise.
	* include/setjmp.h: Likewise.
	* include/signal.h: Likewise.
	* include/stdarg.h: Likewise.
	* include/sys/stat.h: Likewise.
	* include/sys/types.h: Likewise.
	* include/sys/wait.h: Likewise.
	* include/unistd.h: Likewise.
	* lib/libc+gnu.c: Likewise.
	* lib/libc+tcc.c: Likewise.
	* lib/linux/gnu.c: Likewise.
	* lib/linux/libc-mini.c: Likewise.
	* lib/linux/libc.c: Likewise.
	* lib/linux/tcc.c: Likewise.
	* lib/linux/x86_64-mes-gcc/mes.c: Likewise.
	* lib/linux/x86_64-mes/crt1.c: Likewise.
	* lib/mes/abtol.c: Likewise.
	* lib/posix/mktemp.c: Likewise.
	* lib/posix/wait.c: Likewise.
	* lib/stdio/fopen.c: Likewise.
	* lib/stdio/fputc.c: Likewise.
	* lib/stdio/fseek.c: Likewise.
	* lib/stdio/printf.c: Likewise.
	* lib/stdio/sprintf.c: Likewise.
	* lib/stdio/vfprintf.c: Likewise.
	* lib/stdio/vsprintf.c: Likewise.
	* lib/stdio/vsscanf.c: Likewise.
	* lib/stdlib/qsort.c: Likewise.
	* lib/x86-mes-gcc/setjmp.c: Likewise.
	* scaffold/tests/11-if-1.c: Likewise.
	* scaffold/tests/15-if-!f.c: Likewise.
	* scaffold/tests/16-if-t.c: Likewise.
	* scaffold/tests/21-char[].c: Likewise.
	* scaffold/tests/23-pointer.c: Likewise.
	* scaffold/tests/32-compare.c: Likewise.
	* scaffold/tests/33-and-or.c: Likewise.
	* scaffold/tests/34-pre-post.c: Likewise.
	* scaffold/tests/35-compare-char.c: Likewise.
	* scaffold/tests/36-compare-arithmetic.c: Likewise.
	* scaffold/tests/37-compare-assign.c: Likewise.
	* scaffold/tests/38-compare-call.c: Likewise.
	* scaffold/tests/40-if-else.c: Likewise.
	* scaffold/tests/41-?.c: Likewise.
	* scaffold/tests/42-goto-label.c: Likewise.
	* scaffold/tests/43-for-do-while.c: Likewise.
	* scaffold/tests/44-switch.c: Likewise.
	* scaffold/tests/45-void-call.c: Likewise.
	* scaffold/tests/46-function-static.c: Likewise.
	* scaffold/tests/51-strcmp.c: Likewise.
	* scaffold/tests/51-strncmp.c: Likewise.
	* scaffold/tests/53-strcpy.c: Likewise.
	* scaffold/tests/54-argv.c: Likewise.
	* scaffold/tests/60-math.c: Likewise.
	* scaffold/tests/61-array.c: Likewise.
	* scaffold/tests/63-struct-cell.c: Likewise.
	* scaffold/tests/64-make-cell.c: Likewise.
	* scaffold/tests/65-read.c: Likewise.
	* scaffold/tests/70-printf.c: Likewise.
	* scaffold/tests/71-struct-array.c: Likewise.
	* scaffold/tests/72-typedef-struct-def.c: Likewise.
	* scaffold/tests/74-multi-line-string.c: Likewise.
	* scaffold/tests/76-pointer-arithmetic.c: Likewise.
	* scaffold/tests/79-int-array.c: Likewise.
	* scaffold/tests/7a-struct-char-array.c: Likewise.
	* scaffold/tests/7b-struct-int-array.c: Likewise.
	* scaffold/tests/7i-struct-struct.c: Likewise.
	* scaffold/tests/7k-for-each-elem.c: Likewise.
	* scaffold/tests/7l-struct-any-size-array.c: Likewise.
	* scaffold/tests/7o-struct-pre-post.c: Likewise.
	* scaffold/tests/7q-bit-field.c: Likewise.
	* scaffold/tests/7s-struct-short.c: Likewise.
	* scaffold/tests/80-setjmp.c: Likewise.
	* scaffold/tests/81-qsort.c: Likewise.
	* scaffold/tests/85-sizeof.c: Likewise.
	* scaffold/tests/87-sscanf.c: Likewise.
	* scaffold/tests/90-strpbrk.c: Likewise.
	* scaffold/tests/91-fseek.c: Likewise.
	* scaffold/tests/95-signal.c: Likewise.
	* scaffold/tests/97-fopen.c: Likewise.
	* scaffold/tests/99-readdir.c: Likewise.
	* scaffold/tests/t.c: Likewise.
	* lib/linux/x86_64-mes/mes.c: New file.
	* lib/linux/x86_64-mes/mini.c: New file.
	* lib/x86_64-mes/setjmp.c: New file.
	* scaffold/tests/06-!call-1.c: New file.
	* scaffold/tests/06-call-2.c: New file.
	* scaffold/tests/06-call-variable.c: New file.
	* scaffold/tests/08-assign-global.c: New file.
	* scaffold/tests/08-assign-negative.c: New file.
	* scaffold/tests/17-compare-and-or.c: New file.
	* scaffold/tests/17-compare-and.c: New file.
	* scaffold/tests/17-compare-ge.c: New file.
	* scaffold/tests/17-compare-gt.c: New file.
	* scaffold/tests/17-compare-le.c: New file.
	* scaffold/tests/17-compare-lt.c: New file.
	* scaffold/tests/17-compare-or.c: New file.
	* scaffold/tests/17-compare-unsigned-ge.c: New file.
	* scaffold/tests/17-compare-unsigned-gt.c: New file.
	* scaffold/tests/17-compare-unsigned-le.c: New file.
	* scaffold/tests/17-compare-unsigned-lt.c: New file.
	* scaffold/tests/21-char[]-simple.c: New file.
	* scaffold/tests/23-global-pointer-init-null.c: New file.
	* scaffold/tests/23-global-pointer-init.c: New file.
	* scaffold/tests/23-global-pointer-pointer-ref.c: New file.
	* scaffold/tests/23-global-pointer-ref.c: New file.
	* scaffold/tests/23-pointer-sub.c: New file.
	* scaffold/tests/31-oputs.c: New file.
	* scaffold/tests/32-call-wrap.c: New file.
	* scaffold/tests/38-compare-call-2.c: New file.
	* scaffold/tests/38-compare-call-3.c: New file.
	* scaffold/tests/51-pointer-sub.c: New file.
	* scaffold/tests/54-argc.c: New file.
	* scaffold/tests/63-struct-array-assign.c: New file.
	* scaffold/tests/63-struct-array-compare.c: New file.
	* scaffold/tests/63-struct-array.c: New file.
	* scaffold/tests/63-struct-assign.c: New file.
	* scaffold/tests/63-struct-function.c: New file.
	* scaffold/tests/63-struct-local.c: New file.
	* scaffold/tests/63-struct-pointer.c: New file.
	* scaffold/tests/63-struct.c: New file.
	* scaffold/tests/70-printf-hello.c: New file.
	* scaffold/tests/70-printf-simple.c: New file.
	* scaffold/tests/70-stdarg.c: New file.
	* scaffold/tests/70-strchr.c: New file.
	* scaffold/tests/73-union-hello.c: New file.
	* scaffold/tests/76-pointer-arithmetic-pp.c: New file.
	* scaffold/tests/79-int-array-simple.c: New file.
	* scaffold/tests/7b-struct-int-array-hello.c: New file.
	* scaffold/tests/7b-struct-int-array-pointer.c: New file.
	* scaffold/tests/7i-struct-struct-simple.c: New file.
	* scaffold/tests/7k-for-each-elem-simple.c: New file.
	* scaffold/tests/7l-struct-any-size-array-simple.c: New file.
	* scaffold/tests/7o-struct-pre-post-simple.c: New file.
	* scaffold/tests/7q-bit-field-simple.c: New file.
	* scaffold/tests/90-strspn.c: New file.
	* scaffold/tests/06-call-string.c.: Rename from 31-eputs.c.
	* scaffold/tests/7t-function-destruct.c: Rename from 48-function-destruct.c.
	* scaffold/tests/48-global-static.c: Rename from 49-global-static.c.
	* scaffold/tests/55-char-array.c:renamed: Rename from 4a-char-array.c.
	* scaffold/tests/51-itoa.c:r Rename from 52-itoa.c.
	* include/signal.h:(struct sigaction):

	mescc: x86_64 support: Add tests.

2018-08-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Initial x86_64 support.
	    make all-go && MES=guile ./pre-inst-env scripts/mescc -m64 -c scaffold/main.c

	mescc: Prepare for x86_64 support.
	* module/mescc/info.scm (info): Add allocated, registers.
	* module/mescc/i386/info.scm: New file.
	* build-aux/build-guile.sh (SCM_FILES): Add it.
	* module/mescc/compile.scm (c99-input->info): Add info parameter.
	(c99-ast->info): Likewise.
	(i386:type-alist): Remove.
	(alloc-register, free-register): New function.
	(expr->register*): Rename from expr->accu*.  Update callers.
	(expr->accu): Rename from expr->accu.  Update callers.
	* module/mescc/mescc.scm(%info): New variable.
	* module/mescc/mescc.scm (c->ast): Use it.
	(mescc:compile): Likewise.
	(E->info): Likewise.

2018-09-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	emacs: Add disassembly helpers.
	* .dir-locals.el (as-32, as-64): Add disassembly helpers.

2018-09-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: nyacc-for-mes: Update to 0.86.0.
	* guix/git/mes.scm (nyacc-for-mes): Update to 0.86.0 plus fix binary
	literals.

	mescc: Support gcc-3.0: Locale header fix.
	* include/locale.h (LC_ALL, LC_NUMERIC): Numbers, not strings.
	(LC_COLLATE, LC_CTYPE): New macro.

2018-09-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Oops, fix ./check.sh for bootstrap build.
	* build-aux/config.sh (top_builddir): Set default to `.'.

2018-09-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: nyacc-for-mes: Update to 0.85.3.
	* guix/git/mes.scm (nyacc-for-mes): Update to 0.85.3.

	mes: Support Nyacc 0.85.3: Integrate progress.
	* mes/module/nyacc/lang/sx-util.mes: New file.
	* mes/module/nyacc/version.mes: New file.
	* mes/module/nyacc/lang/c99/cpp.mes (nyacc): Include them.
	* mes/module/nyacc/lang/c99/parser.mes (nyacc): Include them.
	* module/mescc/preprocess.scm (need-progress): New function.
	(progress): New function.
	(insert-progress-monitors): Use them to Integrate progress.

	mes: Support Nyacc 0.85.3: Add char-set-copy.
	* mes/module/srfi/srfi-14.mes (char-set-copy): New function>

2018-09-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Update bootstrap graph.
	* doc/images/gcc-mesboot-graph.dot: Regenerate.
	* build-aux/GNUmakefile.in (doc/mes.info): Oops change dependency to .png.
	* doc/mes.texi (The Mes Bootstrap Process): Update image and wording.

	guix: Update hash.
	* guix/git/mes.scm (mes): Update hash.

2018-09-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.17.1.
	* configure (VERSION): Update to 0.17.1.
	(main): Likewise.
	* configure.sh (VERSION): Likewise.
	* build-aux/GNUmakefile.in (gen-announce): Likewise.
	* guix/git/mes.scm (mes, mes.git): Likewise.

2018-08-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Release update.
	* HACKING (prefix): Update.
	* INSTALL (http): Update.
	* NEWS: Update.
	* README (C-compiler): Update.
	* doc/announce/ANNOUNCE-0.17: Update.

2018-09-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: ALlow releasing from worktree.
	* build-aux/GNUmakefile.in (COMMIT): Check for .git file.

2018-09-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Do not redefine size_t.
	* include/stddef.h: Do not redefine size_t.

2018-08-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support make 3.80: Add setlocale, sigaddset.
	* include/limits.h (ULONG_MAX): New macro.
	* include/locale.h (LC_ALL, LC_NUMERIC): New macro.
	* lib/stub/setlocale.c: New file.
	* lib/stub/sigaddset.c: New file.
	* lib/libc+gnu.c: Include them.

	mescc: Mes C Library: Fix qsort to support duplicate entries.
	* lib/stdlib/qsort.c (qpart): Handle dupes.
	* scaffold/tests/81-qsort-dupes.c: New file.
	* build-aux/check-mescc.sh (tests): Run it.

2018-08-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support make: Implement clock_gettime, time.
	* include/linux/x86/syscall.h (SYS_time, SYS_clock_gettime,
	SYS_gettimeofday): New macro.
	* include/linux/x86_64/syscall.h (SYS_time, SYS_clock_gettime,
	SYS_gettimeofday): New macro.
	* lib/linux/tcc.c (gettimeofday, time): New function.
	* lib/linux/gnu.c (clock_gettime): New function.
	* include/time.h: Declare it.
	* lib/stub/gettimeofday.c: Remove.
	* lib/stub/time.c: Remove.

	mescc: Mes C Library: Support make: Support main with envp.
	* lib/linux/x86-mes-gcc/crt1.c (_start): Also push envp.
	* lib/linux/x86-mes/crt1.c (_start): Also push envp.
	* lib/linux/x86_64-mes-gcc/crt1.c (_start): Also mov environment,%rdx.

	mescc: Mes C Library: Support make: Add chdir, getlogin, setvbuf, sigblock.
	* lib/stub/getlogin.c: New file.
	* lib/stub/setvbuf.c: New file.
	* lib/stub/sigblock.c: New file.
	* lib/libc+gnu.c: Include them.
	* include/linux/x86/syscall.h (SYS_chdir): New macro.
	* include/linux/x86_64/syscall.h (SYS_chdir): New macro.
	* include/stdio.h (_IOFBF, _IOLBF, _IONBF): New macro.
	* include/errno.h (ENOEXEC, ECHILD): New macro.
	* include/sys/wait.h (WNOHANG): New macro.
	* lib/linux/gnu.c (chdir): New function.
	* include/ar.h: New file.

	mescc: Mes C Library: Support diffutils: Add execl.
	* include/limits.h (CHAR_MAX): New macro.
	* lib/posix/execl.c: New file.
	* include/unistd.h: Declare it.

	mescc: Mes C Library: Add closedir, opendir, readdir.
	* include/dirent.h: New file.  Import from glibc-2.2.5.
	* include/dirstream.h: Likewise.
	* lib/dirent/__getdirentries.c: Likewise.
	* lib/dirent/closedir.c: Likewise.
	* lib/dirent/readdir.c (readdir): Likewise.
	* lib/libc+gnu.c: Include them.
	* include/linux/x86/syscall.h (SYS_getdents): New macro.
	* include/linux/x86_64/syscall.h (SYS_getdents): Likewise.
	* lib/linux/gnu.c (getdents): New function.
	* include/limits.h (NAME_MAX): New macro.
	* include/fcntl.h (O_DIRECTORY): New macro.
	* scaffold/tests/readdir.dir: New directory.
	* scaffold/tests/99-readdir.c: New file, use it.
	* build-aux/check-mescc.sh (tests): Run it.

2018-08-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Move strncmp to own test.
	* scaffold/tests/51-strcmp.c: Remove strncmp tests.
	* scaffold/tests/51-strncmp.c: New file.
	* build-aux/check-mescc.sh (tests): Add it.

2018-08-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Cleanup includes.
	* scaffold/tests/30-strlen.c: Include only libmes-mini.h
	* scaffold/tests/31-eputs.c: Likewise.
	* scaffold/tests/32-compare.c: Likewise.
	* scaffold/tests/33-and-or.c: Likewise.
	* scaffold/tests/34-pre-post.c: Likewise.
	* scaffold/tests/35-compare-char.c: Likewise.
	* scaffold/tests/36-compare-arithmetic.c: Likewise.
	* scaffold/tests/37-compare-assign.c: Likewise.
	* scaffold/tests/38-compare-call.c: Likewise.
	* scaffold/tests/40-if-else.c: Likewise.
	* scaffold/tests/41-?.c: Likewise.
	* scaffold/tests/42-goto-label.c: Likewise.
	* scaffold/tests/43-for-do-while.c: Likewise.
	* scaffold/tests/44-switch.c: Likewise.
	* scaffold/tests/45-void-call.c: Likewise.

	mescc: Cleanup includes.
	* include/libmes-mini.h: New file.
	* include/libmes.h: Use it.

2018-08-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Add dir to include path.
	* module/mescc/mescc.scm (preprocess): Add dir to include path.
	(c->info): Likewise.
	* scaffold/tests/08-assign.c: New file.

2018-08-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	check-mescc: c-mini

2018-08-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Explode libc+gnu.c.
	* modified:   include/math.h: Add declarations.
	* lib/posix/getopt.c: Rename from lib/getopt.c.
	* lib/gcc.c: Remove.
	* lib/m4.c: Remove.
	* lib/ctype/isalnum.c: New file, explode from libc+gnu.c.
	* lib/ctype/isalpha.c: Likewise.
	* lib/ctype/isascii.c: Likewise.
	* lib/ctype/iscntrl.c: Likewise.
	* lib/ctype/isnumber.c: Likewise.
	* lib/ctype/isprint.c: Likewise.
	* lib/ctype/ispunct.c: Likewise.
	* lib/math/fabs.c: Likewise.
	* lib/posix/alarm.c: Likewise.
	* lib/posix/mktemp.c: Likewise.
	* lib/posix/raise.c: Likewise.
	* lib/posix/sbrk.c: Likewise.
	* lib/posix/sleep.c: Likewise.
	* lib/posix/unsetenv.c: Likewise.
	* lib/stdio/clearerr.c: Likewise.
	* lib/stdio/fdgets.c: Likewise.
	* lib/stdio/feof.c: Likewise.
	* lib/stdio/fgets.c: Likewise.
	* lib/stdio/fileno.c: Likewise.
	* lib/stdio/freeopen.c: Likewise.
	* lib/stdio/freopen.c: Likewise.
	* lib/stdio/perror.c: Likewise.
	* lib/stdlib/__exit.c: Likewise.
	* lib/stdlib/abs.c: Likewise.
	* lib/stdlib/atexit.c: Likewise.
	* lib/stdlib/atol.c: Likewise.
	* lib/stdlib/bsearch.c: Likewise.
	* lib/stdlib/mbstowcs.c: Likewise.
	* lib/string/bcmp.c: Likewise.
	* lib/string/bcopy.c: Likewise.
	* lib/string/bzero.c: Likewise.
	* lib/string/index.c: Likewise.
	* lib/string/rindex.c: Likewise.
	* lib/string/strcspn.c: Likewise.
	* lib/string/strdup.c: Likewise.
	* lib/string/strerror.c: Likewise.
	* lib/string/strncat.c: Likewise.
	* lib/string/strpbrk.c: Likewise.
	* lib/string/strspn.c: Likewise.
	* lib/stub/__cleanup.c: Likewise.
	* lib/stub/atof.c: Likewise.
	* lib/stub/chown.c: Likewise.
	* lib/stub/ctime.c: Likewise.
	* lib/stub/fpurge.c: Likewise.
	* lib/stub/freadahead.c: Likewise.
	* lib/stub/frexp.c: Likewise.
	* lib/stub/fscanf.c: Likewise.
	* lib/stub/getpwnam.c: Likewise.
	* lib/stub/gmtime.c: Likewise.
	* lib/stub/pclose.c: Likewise.
	* lib/stub/popen.c: Likewise.
	* lib/stub/rewind.c: Likewise.
	* lib/stub/setbuf.c: Likewise.
	* lib/stub/sigsetmask.c: Likewise.
	* lib/stub/strftime.c: Likewise.
	* lib/stub/sys_siglist.c: Likewise.
	* lib/stub/system.c: Likewise.
	* lib/stub/times.c: Likewise.
	* lib/stub/umask.c: Likewise.
	* lib/stub/utime.c: Likewise.
	* lib/libc+gnu.c: Include explodings.
	* lib/libg.c: Likewise.
	* lib/libgetopt.c: Include explodings.

2018-08-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Explode libc+tcc.c.
	* include/libmes.h: Add declarations.
	* include/string.h: Likewise.
	* lib/ctype/islower.c: New file, explode from lib/libc+tcc.c.
	* lib/ctype/isupper.c: Likewise.
	* lib/ctype/tolower.c: Likewise.
	* lib/ctype/toupper.c: Likewise.
	* lib/mes/search-path.c: Likewise.
	* lib/posix/execvp.c: Likewise.
	* lib/stdio/fclose.c: Likewise.
	* lib/stdio/fdopen.c: Likewise.
	* lib/stdio/ferror.c: Likewise.
	* lib/stdio/fflush.c: Likewise.
	* lib/stdio/fopen.c: Likewise.
	* lib/stdio/fprintf.c: Likewise.
	* lib/stdio/fread.c: Likewise.
	* lib/stdio/fseek.c: Likewise.
	* lib/stdio/ftell.c: Likewise.
	* lib/stdio/fwrite.c: Likewise.
	* lib/stdio/printf.c: Likewise.
	* lib/stdio/remove.c: Likewise.
	* lib/stdio/snprintf.c: Likewise.
	* lib/stdio/sprintf.c: Likewise.
	* lib/stdio/sscanf.c: Likewise.
	* lib/stdio/vfprintf.c: Likewise.
	* lib/stdio/vprintf.c: Likewise.
	* lib/stdio/vsnprintf.c: Likewise.
	* lib/stdio/vsprintf.c: Likewise.
	* lib/stdio/vsscanf.c: Likewise.
	* lib/stdlib/calloc.c: Likewise.
	* lib/stdlib/qsort.c: Likewise.
	* lib/stdlib/strtof.c: Likewise.
	* lib/stdlib/strtol.c: Likewise.
	* lib/stdlib/strtold.c: Likewise.
	* lib/stdlib/strtoll.c: Likewise.
	* lib/stdlib/strtoul.c: Likewise.
	* lib/stdlib/strtoull.c: Likewise.
	* lib/string/memcmp.c: Likewise.
	* lib/string/memmem.c: Likewise.
	* lib/string/memmove.c: Likewise.
	* lib/string/memset.c: Likewise.
	* lib/string/strcat.c: Likewise.
	* lib/string/strchr.c: Likewise.
	* lib/string/strlwr.c: Likewise.
	* lib/string/strncpy.c: Likewise.
	* lib/string/strrchr.c: Likewise.
	* lib/string/strstr.c: Likewise.
	* lib/string/strupr.c: Likewise.
	* lib/stub/gettimeofday.c: Likewise.
	* lib/stub/ldexp.c: Likewise.
	* lib/stub/localtime.c: Likewise.
	* lib/stub/mprotect.c: Likewise.
	* lib/stub/sigaction.c: Likewise.
	* lib/stub/sigemptyset.c: Likewise.
	* lib/stub/strtod.c: Likewise.
	* lib/stub/time.c: Likewise.
	* lib/libc+tcc.c: Include explodings.

2018-08-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Explode libmes.c.
	* include/libmes.h: Add declarations.
	* lib/abtol.c: New file, explode from lib/libmes.c.
	* lib/ctype/isdigit.c: Likewise.
	* lib/ctype/isnumber.c: Likewise.
	* lib/ctype/isspace.c: Likewise.
	* lib/ctype/isxdigit.c: Likewise.
	* lib/mes/abtol.c: Likewise.
	* lib/mes/eputc.c: Likewise.
	* lib/mes/eputs.c: Likewise.
	* lib/mes/fdgetc.c: Likewise.
	* lib/mes/fdputc.c: Likewise.
	* lib/mes/fdputs.c: Likewise.
	* lib/mes/fdungetc.c: Likewise.
	* lib/mes/itoa.c: Likewise.
	* lib/mes/ltoab.c: Likewise.
	* lib/mes/ntoab.c: Likewise.
	* lib/mes/utoa.c: Likewise.
	* lib/stdlib/atoi.c: Likewise.
	* lib/libmes.c: Include explodings.

	mescc: Mes C Library: Explode libc-mini.c.
	* include/libmes.h: Add declarations.
	* lib/mes/eputs.c: New file, explode from lib/libc-mini.c.
	* lib/mes/oputs.c: Likewise.
	* lib/stdlib/exit.c: Likewise.
	* lib/stdlib/puts.c: Likewise.
	* lib/string/strlen.c: Likewise.
	* lib/libc-mini.c: Include explodings.

	mescc: Mes C Library: Explode libc.c.
	* lib/libc.c: New file, explode from lib/libc.c.
	* lib/posix/execv.c: Likewise.
	* lib/posix/isatty.c: Likewise.
	* lib/posix/wait.c: Likewise.
	* lib/stdio/fgetc.c: Likewise.
	* lib/stdio/fputc.c: Likewise.
	* lib/stdio/fputs.c: Likewise.
	* lib/stdio/getc.c: Likewise.
	* lib/stdio/getchar.c: Likewise.
	* lib/stdio/putc.c: Likewise.
	* lib/stdio/putchar.c: Likewise.
	* lib/stdio/ungetc.c: Likewise.
	* lib/stdlib/free.c: Likewise.
	* lib/stdlib/getenv.c: Likewise.
	* lib/stdlib/realloc.c: Likewise.
	* lib/stdlib/setenv.c: Likewise.
	* lib/string/strcmp.c: Likewise.
	* lib/string/strcpy.c: Likewise.
	* lib/string/strncmp.c: Likewise.
	* lib/libc.c: Include explodings.

2018-08-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Build initial scaffold tests without libc.
	* scaffold/argv.c (strcmp): New function; support building without
	libc.
	* build-aux/build-cc.sh: Build initial scaffold tests without libc.
	* build-aux/build-cc32.sh: Likewise.
	* build-aux/build-mes.sh: Likewise.
	* build-aux/check-mescc.sh: Likewise.
	* scaffold/read.data: Rename from `mesmes'.
	* scaffold/read.c: Rename from `m.c'; update.

	test: Remove 30-test.i indirection.
	* include/30-test.i: Remove.
	* scaffold/tests/30-strlen.c: Remove 30-test.i indirection.
	* scaffold/tests/31-eputs.c: Likewise.
	* scaffold/tests/32-compare.c: Likewise.
	* scaffold/tests/33-and-or.c: Likewise.
	* scaffold/tests/34-pre-post.c: Likewise.
	* scaffold/tests/35-compare-char.c: Likewise.
	* scaffold/tests/36-compare-arithmetic.c: Likewise.
	* scaffold/tests/37-compare-assign.c: Likewise.
	* scaffold/tests/38-compare-call.c: Likewise.
	* scaffold/tests/40-if-else.c: Likewise.
	* scaffold/tests/41-?.c: Likewise.
	* scaffold/tests/42-goto-label.c: Likewise.
	* scaffold/tests/43-for-do-while.c: Likewise.
	* scaffold/tests/44-switch.c: Likewise.
	* scaffold/tests/45-void-call.c: Likewise.
	* scaffold/tests/46-function-static.c: Likewise.
	* scaffold/tests/50-assert.c: Likewise.
	* scaffold/tests/51-strcmp.c: Likewise.
	* scaffold/tests/52-itoa.c: Likewise.
	* scaffold/tests/53-strcpy.c: Likewise.
	* scaffold/tests/60-math.c: Likewise.
	* scaffold/tests/63-struct-cell.c: Likewise.
	* scaffold/tests/64-make-cell.c: Likewise.
	* scaffold/tests/65-read.c: Likewise.
	* scaffold/tests/66-local-char-array.c: Likewise.
	* scaffold/tests/70-printf.c: Likewise.
	* scaffold/tests/71-struct-array.c: Likewise.
	* scaffold/tests/72-typedef-struct-def.c: Likewise.
	* scaffold/tests/73-union.c: Likewise.
	* scaffold/tests/74-multi-line-string.c: Likewise.
	* scaffold/tests/75-struct-union.c: Likewise.
	* scaffold/tests/76-pointer-arithmetic.c: Likewise.
	* scaffold/tests/77-pointer-assign.c: Likewise.
	* scaffold/tests/78-union-struct.c: Likewise.
	* scaffold/tests/79-int-array.c: Likewise.
	* scaffold/tests/7a-struct-char-array.c: Likewise.
	* scaffold/tests/7b-struct-int-array.c: Likewise.
	* scaffold/tests/7c-dynarray.c: Likewise.
	* scaffold/tests/7d-cast-char.c: Likewise.
	* scaffold/tests/7e-struct-array-access.c: Likewise.
	* scaffold/tests/7f-struct-pointer-arithmetic.c: Likewise.
	* scaffold/tests/7g-struct-byte-word-field.c: Likewise.
	* scaffold/tests/7h-struct-assign.c: Likewise.
	* scaffold/tests/7i-struct-struct.c: Likewise.
	* scaffold/tests/7j-strtoull.c: Likewise.
	* scaffold/tests/7k-for-each-elem.c: Likewise.
	* scaffold/tests/7l-struct-any-size-array.c: Likewise.
	* scaffold/tests/7m-struct-char-array-assign.c: Likewise.
	* scaffold/tests/7n-struct-struct-array.c: Likewise.
	* scaffold/tests/80-setjmp.c: Likewise.
	* scaffold/tests/81-qsort.c: Likewise.
	* scaffold/tests/86-strncpy.c: Likewise.
	* scaffold/tests/87-sscanf.c: Likewise.

	test: Remove 00-test.i indirection.
	* include/00-test.i: Remove.
	* scaffold/tests/01-return-0.c: Remove 00-test.i indirection.
	* scaffold/tests/02-return-1.c: Likewise.
	* scaffold/tests/03-call.c: Likewise.
	* scaffold/tests/04-call-0.c: Likewise.
	* scaffold/tests/05-call-1.c: Likewise.
	* scaffold/tests/06-call-!1.c: Likewise.
	* scaffold/tests/10-if-0.c: Likewise.
	* scaffold/tests/11-if-1.c: Likewise.
	* scaffold/tests/12-if-==.c: Likewise.
	* scaffold/tests/13-if-!=.c: Likewise.
	* scaffold/tests/14-if-goto.c: Likewise.
	* scaffold/tests/15-if-!f.c: Likewise.
	* scaffold/tests/16-if-t.c: Likewise.
	* scaffold/tests/20-while.c: Likewise.
	* scaffold/tests/21-char[].c: Likewise.
	* scaffold/tests/22-while-char[].c: Likewise.
	* scaffold/tests/23-pointer.c: Likewise.

	build: Cleanup trace output.
	* build-aux/build-cc.sh: Cleanup trace output.
	* build-aux/build-cc32.sh: Likewise.
	* build-aux/build-guile.sh: Likewise.
	* build-aux/build-mes.sh: Likewise.
	* build-aux/build-x86_64-mes.sh: Likewise.
	* build-aux/cc-mes.sh: Likewise.
	* build-aux/cc.sh: Likewise.
	* build-aux/cc32-mes.sh: Likewise.
	* build-aux/cc64-mes.sh: Likewise.
	* build-aux/check-boot.sh: Likewise.

	mescc: Support -l none (linking without libc).
	* module/mescc/mescc.scm (mescc:link): Support -l none.

2018-08-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support -o-.
	* module/mescc/mescc.scm (GUILE-with-output-to-file): New variable.
	(with-output-to-file): Use it in redefined function.

	build: Update dir-locals for new layout.
	* .dir-locals.el: Update to new layout.

2018-08-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Support oputs for POSIX.
	* lib/libmes.c (oputs)[POSIX]: New function.

	core: mes: Prepare for M2-Planet.
	* src/mes.c (cal): Refactor to use if instead of switch.
	(eval_apply): Likewise.

	core: lib: Prepare for M2-Planet.
	* src/lib.c (display_helper): Refactor to use if instead of switch.
	(memq): Likewise.

	core: reader: Prepare for M2-Planet.
	* src/reader.c (MAX_STRING): New define.
	(read_input_file_env_): Remove dead code.
	(reader_read_line_comment): Refactor to remove recursion.
	(reader_read_line_sexp_): Refactor to use if instead of switch.
	(reader_read_hash): Likewise.
	(reader_read_character): Refactor: cache peekchar () value, make
	M2-Planet friendly.
	(reader_read_binary): Make M2-Planet friendly.
	(reader_read_octal): Likewise.
	(reader_read_hex): Likewise.
	(reader_read_string): Refactor.
	(dump): Make M2-Planet friendly.

	build: src/mes build fixes.
	* build-aux/GNUmakefile.in (seed): Add dependency on gcc.
	* build-aux/build-cc.sh: Copy result to src/mes.
	* build-aux/build-cc32.sh: Likewise.
	* build-aux/build.sh.in: Remove copying of results.

	mescc: Mes C Library: Cleanup start files.
	* lib/linux/x86-mes-gcc/crt0.c: Split from lib/linux/crt0.c.
	* lib/linux/x86-mes-gcc/crt1.c: Split from lib/linux/crt1.c.
	* lib/linux/x86-mes-gcc/crti.c: Split from lib/linux/crti.c.
	* lib/linux/x86-mes-gcc/crtn.c: Split from lib/linux/crtn.c.
	* lib/linux/x86-mes/crt0.c: Split from lib/linux/crt0.c.
	* lib/linux/x86-mes/crt1.c: Split from lib/linux/crt1.c.
	* lib/linux/x86-mes/crti.c: Split from lib/linux/crti.c.
	* lib/linux/x86-mes/crtn.c: Split from lib/linux/crtn.c.
	* build-aux/build-cc.sh: Update.
	* build-aux/build-cc32.sh: Update.
	* build-aux/build-mes.sh: Update.

2018-08-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Add x86_64 libc+gnu support.
	* include/linux/x86/syscall.h: Move SYS_ defines from gnu.c.
	* include/linux/x86_64/syscall.h: Add SYS_ defines for gnu.
	* lib/linux/gnu.c: Update.
	* lib/linux/gnu.c (signal)[__x86_64__]: Implement using rt_sigaction.
	* lib/stdlib/abort.c: Support x86_64.

	mescc: Mes C Library: Add x86_64 libc+tcc support.
	* include/linux/x86/syscall.h: Move SYS_ defines from tcc.c.
	* include/linux/x86_64/syscall.h: Add SYS_ defines for tcc.
	* lib/x86-mes-gcc/setjmp.c: Rename from lib/libc+tcc-gcc.c
	* lib/x86-mes/setjmp.c: Rename from lib/libc+tcc-mes.c
	* lib/linux/tcc.c: Update.

	mescc: Mes C Library: Add x86_64 libc support.
	* include/linux/x86_64/syscall.h: New file.
	* include/linux/x86/syscall.h: New file.
	* lib/linux/x86_64-mes-gcc/mes.c: New file.
	* lib/linux/x86-mes/mes.c: Rename from lib/linux/mes.c.
	* lib/linux/x86-mes-gcc/mes.c: Rename from lib/linux/gcc.c.
	* lib/linux/libc.c: Update includes.
	(waitpid)[__x86_64__]: Use wait4.
	* build-aux/build-cc.sh: Build libc too.
	* lib/x86-mes/x86.M1 (mov____0x8(%ebp),%esi): New macro.

2018-08-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mes C Library: Add x86_64 libc-mini support.
	* lib/linux/x86-mes-gcc/mini.c: Rename from lib/linux/mini-gcc.c.
	* lib/linux/x86-mes/mini.c: Rename from lib/linux/mini-mes.c.
	* lib/linux/x86_64-mes-gcc/crt1.c: Rename from lib/linux/x86_64/crt1.c.
	* lib/linux/x86_64-mes-gcc/mini.c: New file.
	* build-aux/build-cc.sh: Build libc-mini, scaffold/main, scaffold/hello.
	* build-aux/cc64.sh: New file.

	mescc: Add objdump'able x86_64-mes scaffold.
	* lib/x86_64-mes/elf64-header.hex2: New file.
	* lib/x86_64-mes/elf64-footer-single-main.hex2: New file.
	* build-aux/build-x86_64-mes.sh: Enable second, objdump'able exit-42
	  scaffold test.

	mescc: Initial x86_64-mes scaffold.
	* build-aux/GNUmakefile.in (x86_64-mes): New target.
	* .gitignore: Ignore x86 and x86_64 out files.
	* build-aux/build-mes.sh: Resurrect three initial exit42 scaffold tests.
	* build-aux/build-x86_64-mes.sh: New file.  Add initial exit42
	  scaffold test.
	* lib/x86-mes/elf32-0header.hex2: Fix comment.
	* lib/x86-mes/elf32-header.hex2: Likewise.
	* lib/x86_64-mes/elf-0footer.hex2: New file.
	* lib/x86_64-mes/elf64-0header.hex2: New file.
	* lib/x86_64-mes/elf64-body-exit-42.hex2: New file.
	* lib/x86_64-mes/exit-42.c: New file.

2018-08-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: seed: Oops, copy TCC seed after it's been regenerated.
	* build-aux/GNUmakefile.in (seed): Oops, copy TCC seed after it's been
	regenerated.

2018-08-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Fix mescc man page generation.
	* build-aux/GNUmakefile.in (doc/mescc.1): Reverse dependencies;
	  generate page for mescc.

2018-08-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Fixes for make check.
	* build-aux/config.sh (srcdir): Initialize if unset.
	* build-aux/test.sh (DIFF): Do not fail if unset.

2018-08-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: Update to 0.17.
	* guix/git/mes.scm (mes): Update to 0.17.

2018-07-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.17.
	* configure (VERSION): Update to 0.17.

	doc: Release update.
	* HACKING: Update.
	* INSTALL: Update.
	* NEWS: Update.
	* README: Update.
	* doc/announce/ANNOUNCE-0.17: New file.

2018-08-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Non-bootstrap install fixes.
	* configure (main): Fix default bindir.
	* build-aux/GNUmakefile.in (PHONY_TARGETS): Remove src/mes.  Fixes
	  re-build upon install.
	* build-aux/install.sh.in: Fix tar arguments for scaffold files.
	  Expand install directories.

	check: Do not fail if partial test prerequisites fail.
	* build-aux/check-tcc.sh: Pass if no test directory found.
	* build-aux/check.sh.in (TINYCC_PREFIX): Rename from TCC_PREFIX.  Pass
	  if partial tests prerequisites fail.

	check: Fix 4f-string-split.scm for Guile.
	* module/mes/guile.scm (core:car, core:make-cell): New function.
	  Fixes scaffold/boot/4f-string-split.scm.

	build: configure: Oops, substitute @prefix@.
	* build-aux/pre-inst-env.in (MES_PREFIX): Respect pre-set value.
	* configure (main): Oops, substitute @prefix@.
	* configure.sh (subst): Likewise.

2018-07-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: web: New target.
	* README: Add bug-mes@gnu.org
	* NEWS: Likewise.
	* doc/mes.texi: Likewise.
	* build-aux/gendocs.sh: New file, from gnulib.
	* doc/gendocs_template: New file, from gnulib.
	* build-aux/GNUmakefile.in (web): New target.

	Remove fosdem talk.
	* doc/fosdem/GuixSD.png: Remove.
	* doc/fosdem/LISP-1-5-page-13-bottom.png: Remove.
	* doc/fosdem/LISP-1.5-page-13-bottom.png: Remove.
	* doc/fosdem/LISP-1.5-page-13.pdf: Remove.
	* doc/fosdem/LISP-1.5-page-13.png: Remove.
	* doc/fosdem/README: Remove.
	* doc/fosdem/beamercolorthemeX.sty: Remove.
	* doc/fosdem/beamerthemeX.sty: Remove.
	* doc/fosdem/bootstrap-graph.png: Remove.
	* doc/fosdem/egg.jpeg: Remove.
	* doc/fosdem/egg.png: Remove.
	* doc/fosdem/egg.xcf: Remove.
	* doc/fosdem/fosdem.org: Remove.
	* doc/fosdem/fosdem.pdf: Remove.
	* doc/fosdem/fsb-logo-guile-guix-gnu.png: Remove.
	* doc/fosdem/fsb-logo-guile-guix-gnu.xcf: Remove.
	* doc/fosdem/fsb-logo-guile-guix-mes.png: Remove.
	* doc/fosdem/fsb-logo-guile-guix-mes.xcf: Remove.
	* doc/fosdem/fsb-logo.png: Remove.
	* doc/fosdem/guix-build-bootstrap-tarballs.log: Remove.
	* doc/fosdem/mes.png: Remove.
	* doc/fosdem/mes.xcf: Remove.

2018-07-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Remove tinycc/test2 import.
	* scaffold/tinycc/: Remove.
	* build-aux/check-mescc.sh: Remove tinycc testing.
	* build-aux/check-tcc.sh: New file.
	* build-aux/check.sh.in: Use it.
	* build-aux/config.sh: Update.
	* build-aux/export.make: Update.

	Add missing copyright headers and READMEs.
	* ChangeLog: Add copyright header.
	* build-aux/GNUmakefile.in (generate-ChangeLog): Append it as copyright footer.
	* BOOTSTRAP: Add copyright header.
	* scaffold/boot/2f-define-second-lambda.scm: Likewise.
	* scaffold/boot/39-global-define-override.scm: Likewise.
	* scaffold/boot/3a-global-define-lambda-override.scm: Likewise.
	* scaffold/boot/4f-string-split.scm: Likewise.
	* scaffold/boot/numbers.scm: Likewise.
	* scaffold/gc.scm: Likewise.
	* scaffold/b-0.mes: Remove.
	* doc/GNU-EVAL-APPLY: Remove.
	* doc/announce/README: New file.
	* doc/announce/ANNOUNCE: Move from doc/ANNOUNCE.
	* doc/announce/ANNOUNCE-0.10: Likewise.
	* doc/announce/ANNOUNCE-0.11: Likewise.
	* doc/announce/ANNOUNCE-0.12: Likewise.
	* doc/announce/ANNOUNCE-0.13: Likewise.
	* doc/announce/ANNOUNCE-0.14: Likewise.
	* doc/announce/ANNOUNCE-0.15: Likewise.
	* doc/announce/ANNOUNCE-0.16: Likewise.
	* doc/announce/ANNOUNCE-0.3: Likewise.
	* doc/announce/ANNOUNCE-0.4: Likewise.
	* doc/announce/ANNOUNCE-0.5: Likewise.
	* doc/announce/ANNOUNCE-0.6: Likewise.
	* doc/announce/ANNOUNCE-0.7: Likewise.
	* doc/announce/ANNOUNCE-0.8: Likewise.
	* doc/announce/ANNOUNCE-0.9: Likewise.
	* doc/announce/ANNOUNCE-2: Likewise.
	* doc/announce/UPDATE-0.13: Likewise.
	* doc/fosdem/README: New file.
	* doc/fosdem/fosdem.org: Add legalese.
	* doc/fosdem/fosdem.pdf: Regenerate.
	* doc/images/README: New file.
	* mes/module/mes/psyntax.pp.header: New file.
	* mes/module/mes/psyntax.pp: Add it to generated file.

2018-07-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Make build more autotools-like.
	* build-aux/build.sh.in: Move from ./build.sh
	* build-aux/check.sh.in: Likewise.
	* build-aux/GNUmakefile.in: Likewise.
	* build-aux/install.sh.in: Likewise.
	* build-aux/uninstall.sh.in: Likewise.
	* configure: Substitute them.
	* configure.sh: Likewise.
	* build-aux/build-cc.sh: Update: use ${srcdest} instead of ${top_builddest}.
	* build-aux/build-cc32.sh: Likewise.
	* build-aux/build-guile.sh: Likewise.
	* build-aux/build-mes.sh: Likewise.
	* build-aux/cc-mes.sh: Likewise.
	* build-aux/cc.sh: Likewise.
	* build-aux/cc32-mes.sh: Likewise.
	* build-aux/check-boot.sh: Likewise.
	* build-aux/check-mes.sh: Likewise.
	* build-aux/check-mescc.sh: Likewise.
	* build-aux/config.sh: Likewise.
	* build-aux/export.make: Likewise.
	* build-aux/mes-snarf.scm: Likewise.
	* build-aux/pre-inst-env.in: Likewise.
	* build-aux/test.sh: Likewise.
	* build-aux/trace.sh: Likewise.
	* module/mescc/mescc.scm: Likewise.
	* scripts/mescc.in: Likewise.
	* src/mes.c: Likewise.
	* .gitignore: Likewise.

2018-07-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Support all `Standard targets' for users.
	* GNUmakefile (distclean mostlyclean, maintainer-clean, html, dvi, ps,
	  install-dvi, install-ps, install-html, installcheck): New target.
	  (install-info): Remove fake target.
	* configure (parse-opts): Add --srcdir.

	xx

2018-07-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	Add taken-from-Binutils and copyright line to alloca.c
	* lib/stdlib/alloca.c: Add `taken from binutils' and copyright line to
	  alloca.c for minor changes.

2018-07-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	Relicense some taken-from-GNU Guile LGPLv3+ files to GPLv3+.
	* mes/module/mes/pmatch.scm: Relicense to GPLv3+.
	* mes/module/sxml/xpath.scm: Likewise.
	* mes/module/mes/peg/cache.scm: Likewise.
	* mes/module/mes/peg/codegen.scm: Likewise.
	* mes/module/mes/peg/simplify-tree.scm: Likewise.
	* mes/module/mes/peg/string-peg.scm: Likewise.
	* mes/module/mes/peg/using-parsers.scm: Likewise.

2018-07-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	Relicense some taken-from-GNU Guile LGPLv2+ files to GPLv3+.
	* mes/module/mes/pretty-print.scm: Relicense to GPLv3+.
	* mes/module/mes/psyntax.ss: Likewise.
	* mes/module/srfi/srfi-1.scm: Likewise.
	* mes/module/srfi/srfi-16.scm: Likewise.
	* mes/module/srfi/srfi-26.scm: Likewise.
	* module/mes/getopt-long.scm: Likewise.

	Add missing copyright headers.
	* .dir-locals.el: Add copyright header.
	* AUTHORS: Likewise.
	* HACKING: Likewise.
	* INSTALL: Likewise.
	* README: Likewise.
	* build-aux/export.make: Likewise.
	* build-aux/setup-mes.sh: Likewise.
	* configure.sh: Likewise.
	* install.sh: Likewise.
	* scaffold/tests/90-goto-var.c: Likewise.
	* scaffold/tests/91-goto-array.c: Likewise.
	* tests/read.test: Likewise.
	* uninstall.sh: Likewise.
	* doc/fosdem/beamercolorthemeX.sty:
	* doc/fosdem/beamerthemeX.sty:
	* doc/fosdem/html.sty: Remove.
	* doc/fosdem/README: New file.
	* doc/images/README: New file.

2018-07-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	GNU Mes.
	Throughout, make these changes

	   Copyright headers: GNU Mes
	   First mention of name: GNU Mes
	   Website: https://www.gnu.org/software/mes
	   Git:     git://git.savannah.gnu.org/mes.git

2018-07-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Support uninstall.
	* uninstall.sh: New file.
	* GNUmakefile (uninstall): Use it in new target.

	build: Generate gcc-mesboot-graph from .dot.
	* doc/images/gcc-mesboot-graph.dot: New file.
	* doc/images/gcc-mesboot-graph.png: Remove.
	* GNUmakefile (${top_builddest}doc/images/gcc-mesboot-graph.png): New target.
	* configure (det): Add check.
	* build-aux/export.make: Export it.
	* doc/mes.texi (The Mes Bootstrap Process): Describe new recipe.
	* guix/git/mes.scm (mes): Add graphvis dependency.

2018-07-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: Refactor package setup.
	Next to the convenient environment setup and package build from git

	   guix environment -l .guix.scm
	   guix build -f .guix.scm

	we can now also build other included packages

	    GUIX_PACKAGE_PATH=guix guix build mes@0.17
	    GUIX_PACKAGE_PATH=guix guix build nyacc@0.80.42

	* guix/git/mes.scm: Move from .guix.scm, make a module.
	* .guix.scm: Move from guix.scm, use it.
	* build-aux/manifest.scm: Update location.
	* build-aux/pre-inst-env.in: Support it.
	* configure: Check for guix.
	* build-aux/export.make: Export GUIX.
	* GNUmakefile (update-hash): New target.

2018-07-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Respect --docdir.
	* configure: Respect --docdir.

2018-07-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Support --srcdir build.
	* build-aux/config.sh: New file.
	* build-aux/trace.sh: New file.
	* build-aux/GNUmakefile.in: New file.
	* configure: Support srcdir configure.
	* GNUmakefile: Support srcdir build.
	* build-aux/build-cc.sh: Likewise.
	* build-aux/build-cc32.sh: Likewise.
	* build-aux/build-guile.sh: Likewise.
	* build-aux/build-mes.sh: Likewise.
	* build-aux/cc-mes.sh: Likewise.
	* build-aux/cc.sh: Likewise.
	* build-aux/cc32-mes.sh: Likewise.
	* build-aux/check-mes.sh: Likewise.
	* build-aux/check-mescc.sh: Likewise.
	* build-aux/export.make: Likewise.
	* build-aux/mes-snarf.scm: Likewise.
	* build-aux/pre-inst-env.in: Likewise.
	* build-aux/test.sh: Likewise.
	* build.sh: Likewise.
	* check.sh: Likewise.
	* install.sh: Likewise.
	* module/mescc/mescc.scm: Likewise.
	* scripts/mescc.in: Likewise.
	* src/mes.c: Likewise.

2018-06-30  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Prepare for the Hurd.
	* lib/linux/libc.c: Move from lib/linux.c.
	* lib/linux/gcc.c: Move from lib/linux-gcc.c.
	* lib/linux/gnu.c: Move from lib/linux+gnu.c.
	* lib/linux/libc.c: Move from lib/linux.c.
	* lib/linux/mes.c: Move from lib/linux-mes.c.
	* lib/linux/mini-gcc.c: Move from lib/linux-mini-gcc.c.
	* lib/linux/mini-mes.c: Move from lib/linux-mini-mes.c.
	* lib/linux/tcc.c: Move from lib/linux+tcc.c.
	* lib/linux/crt0.c: Move from lib/crt0.c.
	* lib/linux/crt1.c: Move from lib/crt1.c.
	* lib/linux/crti.c: Move from lib/crti.c.
	* lib/linux/crtn.c: Move from lib/crtn.c.
	* build-aux/build-cc.sh: Update for new layout.
	* build-aux/build-cc32.sh: Likewise.
	* build-aux/build-mes.sh: Likewise.
	* build-aux/cc-mes.sh: Likewise.
	* build-aux/cc32-mes.sh: Likewise.
	* lib/string/argz-count.c: New file taken from GNU C Library,
	  relicensed.
	* lib/string/argz-extract.c: New file taken from GNU C Library,
	  relicensed.
	* include/argz.h: New file.
	* lib/string/memcpy.c: New file, extract from libc.
	* lib/assert/assert.c: Likewise.

2018-07-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Install ChangeLog.
	* ChangeLog: New file.
	* install.sh: Regenerate it, install it.

	build: Refactor configure.
	* configure: Refactor.

2018-07-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Prepare for autoconfiscation.
	Make build system more in alignment with how autotools work.  This
	will make transition easier.

	* mes/module/mes/boot-0.scm.in: Update from module/mes/boot-0.scm.
	* scripts/mescc.in: Update from scripts/mescc.
	* build-aux/pre-inst-env.in: New file.
	* build-aux/cc-mes.sh: Use pre-inst-env.
	* configure: Substitute new .in files.
	* install.sh: Do not substitute mescc, boot-0.scm.

2018-07-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Document number->string INT-MIN failure with gcc-x86.
	* src/mes.c (scm_symbol_arch, scm_symbol_compiler): New symbol.
	  (mes_symbols, bload_env): Add them.
	  (scm_symbol_gnuc, scm_symbol_mesc): Remove.
	* scaffold/mini-mes.c: Likewise.
	* module/mes/mes-0.scm (%arch, %compiler): New public variable.
	* tests/srfi-13.test: Expect number->string INT-MIN to fail for
	  gcc-x86.
	* HACKING (Bugs): Add it.

	build: Refactor mes tests.
	* build-aux/check-mes.sh: New file.
	* check.sh: Invoke it for Guile and Mes.
	* .gitignore: Ignore new guile logs.
	* mes/module/mes/boot-0.scm: Ignore some standard Guile options.
	* module/mes/test.scm: Make a module.
	* tests/base.test: Use it.  Make a module, support invoking with Guile
	  or Mes alike.
	* tests/boot.test: Likewise.
	* tests/catch.test: Likewise.
	* tests/closure.test: Likewise.
	* tests/cwv.test: Likewise.
	* tests/display.test: Likewise.
	* tests/fluids.test: Likewise.
	* tests/getopt-long.test: Likewise.
	* tests/guile.test: Likewise.
	* tests/let-syntax.test: Likewise.
	* tests/let.test: Likewise.
	* tests/match.test: Likewise.
	* tests/math.test: Likewise.
	* tests/module.test: Likewise.
	* tests/optargs.test: Likewise.
	* tests/peg.test: Likewise.
	* tests/pmatch.test: Likewise.
	* tests/psyntax.test: Likewise.
	* tests/quasiquote.test: Likewise.
	* tests/read.test: Likewise.
	* tests/scm.test: Likewise.
	* tests/srfi-13.test: Likewise.
	* tests/srfi-14.test: Likewise.
	* tests/srfi-16.test: Likewise.
	* tests/srfi-1.test: Likewise.
	* tests/srfi-43.test: Likewise.
	* tests/srfi-9.test: Likewise.
	* tests/syntax.test: Likewise.
	* tests/vector.test: Likewise.
	* tests/base.test-guile: Remove.
	* tests/boot.test-guile: Remove.
	* tests/catch.test-guile: Remove.
	* tests/closure.test-guile: Remove.
	* tests/cwv.test-guile: Remove.
	* tests/display.test-guile: Remove.
	* tests/fluids.test-guile: Remove.
	* tests/getopt-long.test-guile: Remove.
	* tests/guile.test-guile: Remove.
	* tests/let-syntax.test-guile: Remove.
	* tests/let.test-guile: Remove.
	* tests/match.test-guile: Remove.
	* tests/math.test-guile: Remove.
	* tests/module.test-guile: Remove.
	* tests/optargs.test-guile: Remove.
	* tests/peg.test-guile: Remove.
	* tests/pmatch.test-guile: Remove.
	* tests/psyntax.test-guile: Remove.
	* tests/quasiquote.test-guile: Remove.
	* tests/read.test-guile: Remove.
	* tests/scm.test-guile: Remove.
	* tests/srfi-13.test-guile: Remove.
	* tests/srfi-14.test-guile: Remove.
	* tests/srfi-16.test-guile: Remove.
	* tests/srfi-1.test-guile: Remove.
	* tests/srfi-43.test-guile: Remove.
	* tests/srfi-9.test-guile: Remove.
	* tests/syntax.test-guile: Remove.
	* tests/vector.test-guile: Remove.

	build: all-go: Support V=0,1,2.
	* build-aux/build-guile.sh: Support V=0,1,2.

	build: Fix for handling missing makeinfo.
	* configure (main): Update MAKEINFO.

	mescc: fwrite: Increase debug tracing threshold.
	* lib/libc+tcc.c (fwrite): Increase debug tracing threshold.

	mescc: Add proper includes.
	* include/libmes.h (__mes_debug): Declare.
	* lib/libtcc1.c: Add proper includes.
	* lib/linux+gnu.c: Likewise.
	* lib/m4.c: Likewise.

	core: Resurrect gcc support.
	* src/mes.c (MES_ARENA)[POSIX]: Default to 100000000.

	scaffold: Add proper includes.
	* scaffold/argv.c: Add proper includes.
	* scaffold/malloc.c: Likewise.
	* scaffold/micro-mes.c: Likewise.
	* scaffold/mini-mes.c: Likewise.
	* scaffold/tiny-mes.c: Likewise.

	build: cc32: Silence warnings.
	* build-aux/build-cc32.sh (CC32_CFLAGS): Silence warnings.

	build: Resurrect i686-unknown-linux-gnu-gcc support.
	* build-aux/build-cc32.sh (CC32_CFLAGS): Add -fno-builtin.  Resurrects
	  i686-unknown-linux-gnu-gcc.

	mescc: Support verbose int types.
	* module/mescc/compile.scm (i386:type-alist): Support verbose int types.

	build: Separate Mes and Guile modules.
	* scaffold/gc.scm: Move from guile/gc.scm.
	* guile/: Remove.
	* module/language/paren.mes: Remove.
	* mes/module/mes/base.mes: Move from module/mes/.
	* mes/module/mes/boot-0.scm: Likewise.
	* mes/module/mes/boot-00.scm: Likewise.
	* mes/module/mes/boot-01.scm: Likewise.
	* mes/module/mes/boot-02.scm: Likewise.
	* mes/module/mes/catch.mes: Likewise.
	* mes/module/mes/display.mes: Likewise.
	* mes/module/mes/fluids.mes: Likewise.
	* mes/module/mes/getopt-long.mes: Likewise.
	* mes/module/mes/guile.mes: Likewise.
	* mes/module/mes/lalr.mes: Likewise.
	* mes/module/mes/lalr.scm: Likewise.
	* mes/module/mes/let.mes: Likewise.
	* mes/module/mes/match.mes: Likewise.
	* mes/module/mes/match.scm: Likewise.
	* mes/module/mes/mescc.mes: Likewise.
	* mes/module/mes/misc.mes: Likewise.
	* mes/module/mes/module.mes: Likewise.
	* mes/module/mes/optargs.mes: Likewise.
	* mes/module/mes/optargs.scm: Likewise.
	* mes/module/mes/peg.mes: Likewise.
	* mes/module/mes/peg/cache.scm: Likewise.
	* mes/module/mes/peg/codegen.scm: Likewise.
	* mes/module/mes/peg/simplify-tree.scm: Likewise.
	* mes/module/mes/peg/string-peg.scm: Likewise.
	* mes/module/mes/peg/using-parsers.scm: Likewise.
	* mes/module/mes/pmatch.mes: Likewise.
	* mes/module/mes/pmatch.scm: Likewise.
	* mes/module/mes/posix.mes: Likewise.
	* mes/module/mes/pretty-print.mes: Likewise.
	* mes/module/mes/pretty-print.scm: Likewise.
	* mes/module/mes/psyntax-0.mes: Likewise.
	* mes/module/mes/psyntax-1.mes: Likewise.
	* mes/module/mes/psyntax.mes: Likewise.
	* mes/module/mes/psyntax.pp: Likewise.
	* mes/module/mes/psyntax.ss: Likewise.
	* mes/module/mes/quasiquote.mes: Likewise.
	* mes/module/mes/quasisyntax.mes: Likewise.
	* mes/module/mes/quasisyntax.scm: Likewise.
	* mes/module/mes/repl.mes: Likewise.
	* mes/module/mes/scm.mes: Likewise.
	* mes/module/mes/syntax.mes: Likewise.
	* mes/module/mes/syntax.scm: Likewise.
	* mes/module/mes/test.mes: Likewise.
	* mes/module/mes/tiny-0.mes: Likewise.
	* mes/module/mes/type-0.mes: Likewise.
	* mes/module/mescc/M1.mes: Likewise.
	* mes/module/mescc/as.mes: Likewise.
	* mes/module/mescc/bytevectors.mes: Likewise.
	* mes/module/mescc/compile.mes: Likewise.
	* mes/module/mescc/i386/as.mes: Likewise.
	* mes/module/mescc/info.mes: Likewise.
	* mes/module/mescc/mescc.mes: Likewise.
	* mes/module/mescc/preprocess.mes: Likewise.
	* mes/module/nyacc/lalr.mes: Likewise.
	* mes/module/nyacc/lang/c99/cpp.mes: Likewise.
	* mes/module/nyacc/lang/c99/parser.mes: Likewise.
	* mes/module/nyacc/lang/c99/pprint.mes: Likewise.
	* mes/module/nyacc/lang/calc/parser.mes: Likewise.
	* mes/module/nyacc/lang/util.mes: Likewise.
	* mes/module/nyacc/lex.mes: Likewise.
	* mes/module/nyacc/parse.mes: Likewise.
	* mes/module/nyacc/util.mes: Likewise.
	* mes/module/rnrs/arithmetic/bitwise.mes: Likewise.
	* mes/module/srfi/srfi-0.mes: Likewise.
	* mes/module/srfi/srfi-1.mes: Likewise.
	* mes/module/srfi/srfi-1.scm: Likewise.
	* mes/module/srfi/srfi-13.mes: Likewise.
	* mes/module/srfi/srfi-14.mes: Likewise.
	* mes/module/srfi/srfi-16.mes: Likewise.
	* mes/module/srfi/srfi-16.scm: Likewise.
	* mes/module/srfi/srfi-26.mes: Likewise.
	* mes/module/srfi/srfi-26.scm: Likewise.
	* mes/module/srfi/srfi-43.mes: Likewise.
	* mes/module/srfi/srfi-8.mes: Likewise.
	* mes/module/srfi/srfi-9.mes: Likewise.
	* mes/module/srfi/srfi-9/gnu.mes: Likewise.
	* mes/module/sxml/xpath.mes: Likewise.
	* mes/module/sxml/xpath.scm: Likewise.
	* module/mes/mes-0.scm: Likewise.
	* build-aux/build-guile.sh: Update for new layout.
	* build-aux/build-mes.sh: Likewise.
	* build-aux/check-boot.sh: Likewise.
	* build-aux/check-mescc.sh: Likewise.
	* install.sh: Likewise.
	* scaffold/boot/51-module.scm: Likewise.
	* scaffold/boot/52-define-module.scm: Likewise.
	* scripts/mescc: Likewise.
	* src/mes.c: Likewise.
	* tests/base.test-guile: Likewise.
	* tests/boot.test: Likewise.
	* tests/srfi-9.test: Likewise.
	* mes/include: New symlink.
	* mes/lib: New symlink.
	* AUTHORS: Update file names.

	core: typo: Remove trailing 1.
	* include/alloca.h: typo: Remove trailing 1.

2018-07-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	Add missing copyright header.  Thanks, Mike!
	* guile/gc.c: Add missing copyright header.  Thanks, Mike!

2018-07-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: mes: Updatee to 0.16.1.
	* guix.scm (mes): Update to 0.16.1.
	  (mes.git): Likewise.

2018-07-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.16.1
	* configure (VERSION): Bump to 0.16.1.

	doc: Release update.
	* BOOTSTRAP: Update.
	* HACKING: Update.
	* INSTALL: Update.
	* NEWS: Update.
	* README: Update.
	* scaffold/tests/23-pointer.c: Add (janneke) to copyright line.
	* doc/images/gcc-mesboot-graph.png: Update.
	* doc/mes.texi (The Mes Bootstrap Process): Describe update.

	build: setup-mes.sh: Cater for Debian/stretch too.  Thanks, pdewacht!
	* build-aux/setup-mes.sh: Cater for Debian/stretch too.  Thanks,
	  pdewacht!

	core: Fix segfault on Debian/strectch.  Thanks, pdewacht!
	* src/posix.c (execl_): Typo in initialization.  Fixes segfault on
	  Debian/strectch.  Thanks, pdewacht!

	doc: Add html, pdf.
	* GNUmakefile (html, pdf): New target.
	* .gitignore: Ignore html, pdf targets.

	doc: Remarks from Rutger.
	* doc/mes.texi: Remarks from Rutger.

	doc: Further work.
	* doc/images/gcc-mesboot-graph.png: New file.
	* install.sh: Install it.
	* doc/mes.texi (The Mes Bootstrap Process): Show it.
	  (Bootstrapping): Add missing Mes direntry.
	  (Running the Test Suites): Fix example.
	  Fix typos.

	build: Handle CFLAGS, CPPFLAGS for Debian.

	build: Have configure create a git archive.
	* configure: Create git archive if necessary.

	build: Use GNU style lower case directory configure variable naming.
	* GNUmakefile: Use GNU style lower case directory configure variable naming.
	* HACKING: Likewise.
	* INSTALL: Likewise.
	* build-aux/build-cc.sh: Likewise.
	* build-aux/build-cc32.sh: Likewise.
	* build-aux/cc-mes.sh: Likewise.
	* build-aux/cc.sh: Likewise.
	* build-aux/cc32-mes.sh: Likewise.
	* build-aux/export.make: Likewise.
	* build-aux/setup-mes.sh: Likewise.
	* build.sh: Likewise.
	* check.sh: Likewise.
	* configure: Likewise.
	* doc/mes.texi: Likewise.
	* install.sh: Likewise.
	* scripts/mescc: Likewise.

	build: Support Debian build, install.
	* scripts/mescc: Support Debian build, install.
	* lib/libmes.c (fdgetc): Allow Nyacc/ungetc conflict.
	* build-aux/export.make (ARCH): Export.
	* build-aux/build-mes.sh: Disable full build for non-bootstrap
	  x86-only.
	* check.sh (total): Use bash to invoke build-aux/check-mescc.sh.
	* build-aux/build-guile.sh (SCM_FILES): Support guile-2.0.
	* module/mes/guile.scm (guile-2.0): Support guile-2.0.
	* build-aux/build-mes.sh: Use bash.
	* build-aux/setup-mes.sh: New file.

	mescc: Be sure to exit upon system* failure.
	* module/mescc/mescc.scm (assert-system*): New function.
	  (M1->hex2, hex2->elf, M1->blood-elf): Use it.

	build: Support $DESTDIR.
	* build-aux/export.make: export DESTDIR.
	* install.sh: Support $DESTDIR.

	build: Build and install manual pages.
	* build-aux/export.make: New file.
	* GNUmakefile (man): New target.
	  (doc): Depend on man.
	  include build-aux/export.make, remove exports.
	* guix.scm (mes): Add dependency on help2man.
	* configure: Check for help2man.
	* install.sh: Install manual pages if built.

	doc: Initial version.
	* doc/mes.texi: New file.
	* doc/fdl-1.3.texi: New file.
	* AUTHORS: Mention it.
	* GNUmakefile (doc, info, install-info): New targets.
	* install.sh: Install info if available.
	* guix: (mes): Add texinfo to native-inputs.
	* configure: Check for makeinfo.

2018-06-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: mescc-tools: Update to 0.5.1.
	* guix.scm (mescc-tools): Update to 0.5.1.

	guix: Oops, fix nyacc-for-mes checksum.  Thanks, pdewacht!
	* guix.scm (nyacc-for-mes): Fix checksum.

	guix: Update mes to 0.16.
	* guix.scm (mes): Update to 0.16.
	  (mes.git): Likewise.

2018-06-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.16.
	* configure (VERSION): Bump to 0.16.

2018-06-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Release update.
	* BOOTSTRAP: Update.
	* HACKING: Update.
	* INSTALL: Update.
	* NEWS: Update.
	* README: Update.
	* doc/ANNOUNCE-0.16: New file.

2018-06-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Fix compile warnings.
	* lib/libmes.c: Fix warning.
	* src/posix.c (execl_): Fix warning, add debug printing.

	core: execl_: Allow 1000 arguments.
	* src/posix.c (execl_): Allow 1000 arguments.

2018-06-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support binutils 2.10.1: strrchr: Stop at start of string.
	* lib/libc+tcc.c (strrchr): Stop at start of string.
	* scaffold/tests/88-strrchr.c: Test it.
	* build-aux/check-mescc.sh (tests): Run it.

	build: Support tcc, create tinycc-seed with tcc.
	* configure: check for tcc.
	* build-aux/cc32-mes.sh: Rename from cc-mes-gcc.sh.  Support
	  tcc.  Update users.
	* build-aux/build-cc32-mes.sh: Rename from build-mes-gcc.sh.  Update users.
	* GNUmakefile (mes-tcc): New target.
	* .gitignore: Ignore mes-tcc arch output.
	* lib/crt1.c (_start): Add "rm" constraint so satisfy tcc.
	* lib/linux-gcc.c (_sys_call, _sys_call1 _sys_call2 _sys_call3): Likewise.

2018-06-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support glibc-2.2.5: header tweaks.
	* include/sys/types.h [__PTRDIFF_T]: Extra guard for ptrdiff_t.
	  [__SIZE_T]: Extra guard for size_t.
	* include/stdlib.h: Include alloca; remove alloca prototype,
	* include/errno.h: Add E2BIG.

2018-06-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support binutils 2.20.1: vfprint, vsprintf: %llx.
	* lib/libc+tcc.c (vfprintf, vsprintf): Handle %%llx.  Print error:
	  should we skip another int, va_arg a long long?

2018-06-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support binutils 2.14: vfprint, vsprintf: %12.10d.
	* lib/libc+tcc.c (vfprintf, vsprintf): Handle %12.10d.
	* scaffold/tests/70-printf.c: Test it.

2018-06-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support gnu toolchain: libtcc1.
	* lib/libtcc1.c: New file.
	* lib/libc+tcc-gcc.c: Remove libtcc1 stubs.

	mescc: Support binutils-2.20.1a: header tweaks.
	* include/signal.h: Include sys/types.h; remove type declaration copies.
	* include/stdarg.h: Likewise.
	* include/stdio.h: Likewise.
	* include/stdlib.h: Likewise.
	* include/unistd.h: Likewise.

2018-06-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support Tinycc 0.9.27: Drop dlclose, dlopen.
	* lib/libc+tcc.c (dlclose, dlopen): Remove.
	* include/dlfcn.h (RTLD_DEFAULT): Add.

	core: Resurrect dump-tiny.
	* src/reader.c (dump): Resurrect dump-tiny.

	core: Resurrect loading of boot-0.32-mo.

2018-06-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support binutils 2.25: fseek: Add debug printing.
	* lib/libc+tcc.c (fseek): Add debug printing.

	mescc: Tinycc support: bcopy: Do not return void.
	* lib/m4.c (bcopy): Do not return void.  Helps tcc.

	mescc: Support binutils 2.25: memcmp: Support size 0.
	* lib/libc+tcc.c (memcmp): Support size 0.

	mescc: Support binutils 2.25: vsscanf: Skip `l'.
	* lib/libc+tcc.c (vsscanf): Skip `l'.

	mescc: Debugging oops.
	* lib/libc.c (__mes_debug): Oops, wrong direction.

2018-06-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support binutils 2.15a: fread: read ungetc'd chars too.
	* lib/libmes.c (_ungetc_fd): New variable.
	  (fdgetc): Use it.
	  (_fdungetc_p): New function.
	* lib/libc+tcc.c (_fungetc_p): New function.
	* lib/libc+tcc.c (fread): Use it to read ungetc'd chars too.

	mescc: Add another fopen test.
	* scaffold/tests/98-fopen.c: New file.
	* build-aux/check-mescc.sh (tests): Add it.
	* AUTHORS: Mention it.

	mescc: Add fopen test.
	* scaffold/tests/97-fopen.c: New file.
	* build-aux/check-mescc.sh (tests): Run it.
	* include/unistd.h (link): Declare.

	mescc: Support binutils-2.14: fopen: Return 0 upon failure.
	* lib/libc+tcc.c (fopen): Return 0 upon failure.

2018-06-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Update elf32-header for linux-4.17.
	Previously, our binaries showed this

	    $ readelf -s scaffold/main.mes-out
	    There are 2 program headers, starting at offset 64

	    Program Headers:
	      Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
	      LOAD           0x000000 0x01000000 0x01000000 0x0557c 0x0557c RWE 0x1
	      LOAD           0x000000 0x01000000 0x01000000 0x0557c 0x0557c RWE 0x1

	     Section to Segment mapping:
	      Segment Sections...
	       00     .text .data
	       01     .text .data

	Linux-4.17 refuses to run this and says

	    Uhuuh, elf segment at 0000000001000000 requested but the memory is mapped already
	    Segmentation fault

	* lib/x86-mes/elf32-header.hex2: Remove unused data program header.

2018-06-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: make seed: Update mescc-tools-seed too.

	guix: mescc-tools: Update to 0.5.
	* guix.scm (mescc-tools): Update to 0.5.

	Update for mescc-tools-0.5.
	* build-aux/build-mes.sh (HEX2FLAGS): Remove = from flags.
	* build.sh (HEX2FLAGS): Likewise.
	* module/mescc/mescc.scm (hex2->elf): Likewise.

2018-06-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: Update mes to 0.15.
	* guix.scm (mes): Update to 0.15.
	  (mes.git): Likewise.

2018-06-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.15.
	* configure (VERSION): Bump to 0.15.

2018-05-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Release udpate.
	* BOOTSTRAP: Update.
	* HACKING: Update.
	* NEWS: Update.
	* README: Update.
	* doc/ANNOUNCE-0.15: New file.

2018-06-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Resurrect non-bootstrap build.
	* configure (parse-opts): Support mixing VAR=VALUE --prefix=PREFIX.
	* guix.scm (mes): Remove setting PREFIX in make-flags.
	* install.sh: Cater for Guix's setting read-only of scripts/diff.scm.

2018-06-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support less-patched tcc/gcc: Add crti and crtn.
	* lib/crt0.c[__MESC__]: Support MesCC.
	* lib/crti.c: New file.
	* lib/crtn.c: New file.
	* build-aux/build-mes-gcc.sh: Build them.

	mescc: Refactor debug and stub printing.
	* lib/libc.c (__mes_debug): New function.  Use it for debug printing
	  and in stubs throughout.

	mescc: Support binutils-2.30: fopen fix.
	* lib/libc+tcc.c (fopen): Set O_APPEND for 'a'.

2018-06-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support binutils-2.30.
	* lib/binutils.c (raise, strdup): New function.
	  (mbstowcs): New stub.
	* include/fcntl.h (O_APPEND, FD_CLOEXEC): New define.

	mescc: Support binutils-2.10.1: Stubs set errno to 0.

	mescc: Silence some stubs.
	* lib/libc+tcc.c: [!NOISY_FLOATS, !NOISY_TIMES]: Silence stubs.
	* lib/gcc.c: Likewise.
	* lib/binutils.c: Likewise.

2018-06-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Add debug printing: fopen, fwrite.
	* lib/libc+tcc.c (fopen, fwrite)[MESC_DEBUG]: Print debug info.

	mescc: Support binutils-2.10.1: opentype `r+'.
	* lib/libc+tcc.c (fopen): Support opentype `r+'.

2018-06-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: syscall: return only ever error -1, set errno.

2018-06-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support gcc-2.95: Add getpwnam stub.
	* lib/gcc.c (getpwnam): New stub.

	mescc: Support gcc-3.0: Implement alarm, setitimer.

	mescc: Support gcc-3.0: Implement atexit.

	mescc: Support gcc-3.0: Implement dup2, fcntl, getrusage.
	* include/sys/resource.h: New file.
	* lib/linux+gnu.c (fcntl, dup2, getrusage): New function.
	* lib/binutils.c (fcntl): Remove stub.

	mescc: Support gcc-3.2: Implement getuid, getgid.
	* lib/linux+gnu.c (getuid, getdid): New function.
	* lib/binutils.c (getuid, getdid): Remove stub.

	mescc: Support gcc-3.2: Reset errno.
	* lib/linux-gcc.c (_sys_call, _sys_call1, _sys_call2, _sys_call3):
	  Reset errno.
	* lib/linux-mes.c (__sys_call, __sys_call1, __sys_call2 ,
	  __sys_call3): Rename from _*.
	   (_sys_call, _sys_call1, _sys_call2, _sys_call3): New function.
	  Reset errno.

2018-06-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support gcc-3.2: Implement integer strto*.
	* lib/libc+tcc.c (strtoll, strtoul): Call strtoul.

	mescc: Support gcc-3.2: Add getpid, signal.
	* lib/linux+gnu.c (getpid, signal): New function.
	* include/signal.h: Declare signal.
	* include/unistd.h: Declare getpid.
	* scaffold/tests/95-signal.c: Test it.
	* build-aux/check-mescc.sh (tests): Run it.

	mescc: Support gcc-3.4.0: *printf: Support `%n'.
	* lib/libc+tcc.c (vfprintf, vsprintf): Support `%n'.  For Gcc 3.4.0.
	* scaffold/tests/70-printf.c: Test it.

	mescc: Support gcc-3.4.0: alloca.
	* lib/alloca.c: New file.
	* AUTHORS: Mention it.
	* lib/libc+gnu.c: Add it.
	* include/stdlib.h: Declare alloca.

	mescc: Support gcc-3.4.0: unsetenv.
	* lib/gcc.c (unsetenv): New function.

	mescc: Support gcc-3.2: Add __divdi3, __moddi3 stubs.
	* lib/gcc.c (__divdi3, __moddi3): New stubs.

	mescc: Support gcc-3.2: puts with newline.
	* lib/libc-mini.c (oputs): Rename from puts.
	  (puts): New function: Add newline.

	mescc: Support binutils-2.10.1.
	xx

2018-06-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support glibc-1.06.4.
	* lib/glibc.c: New file.
	* lib/libc+gnu.c: Include it.

2018-06-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support gcc-2.6.3.
	* TODO

2018-05-30  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support binutils-2.5.1.
	* include/stdint.h: #undef types before typedef'ing them.
	* include/sys/types.h: Likewise.
	* include/string.h (NULL): New define.
	* include/stdio.h (BUFSIZ): New define.

2018-06-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	tests: Remove tinycc-imported non-free grep test.
	* scaffold/tinycc/46_grep.c: Remove.
	* scaffold/tinycc/46_grep.expect: Remove.

2018-05-30  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Implement fflush, sscanf, vsscanf.
	* lib/libc+tcc.c (vsscanf): New function.
	  (sscanf): Use it.
	  (fflush): Remove stub notice; we have no buffering.
	* include/stdarg.h: Declare it.
	* scaffold/tests/87-sscanf.c: Test it.
	* build-aux/check-mescc.sh (tests): Run it.

2018-05-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Use arch-dir.
	* lib/x86-mes: Move from stage0.
	* build-aux/build-cc.sh: Create libraries in lib/gcc.  Update users.
	* build-aux/build-mes.sh: Create libraries in lib/x86-mes.  Update users.
	* build-aux/build-mes-gcc.sh: Rename from build-mlibc.sh.  Create
	  libraries in lib/x86-mes-gcc.  Update callers.
	* build-aux/cc-mes-gcc.sh: Rename from cc-mlibc.sh.  Update callers.

	mlibc: Implement strstr.
	* lib/libc+tcc.c (_memmem, memmem): New function.  Import from GNU
	  LilyPond.
	  (strstr): Implement using memmem.
	* include/string.h (_memmem, memmem): Declare.
	* AUTHORS: Add Han-Wen Nienhuys.

	mlibc: Implement ftell, fseek.
	* lib/libc+tcc.c (ftell, fseek): Implement.

	mlibc: Cleanup.

2018-05-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: m4 support: WIP

2018-05-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Refactor boot-0 loading.
	* src/mes.c (load_boot): New function.
	  (load_env): Use it.

2018-05-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Out of the box Geiser support.
	* .dir-locals.el: New file.  Out of the box Geiser support for mescc.

2018-05-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Posixify interface.
	* module/mescc/compile.mes: Move from language/c99/compiler.mes.
	* module/mescc: New module..
	* module/mescc/M1.scm: Move from mes/M1.mes.
	* module/mescc/as.scm: Likewise.
	* module/mescc/bytevectors.scm: Likewise.
	* module/mescc/mescc.scm: New file.
	* scripts/mescc: Update to new layout and posixy interface.
	* GNUmakefile: Likewise.
	* build-aux/build-cc.sh: Likewise.
	* build-aux/build-guile.sh: Likewise.
	* build-aux/build-mes.sh: Likewise.
	* build-aux/build-mlibc.sh: Likewise.
	* build-aux/cc-mes.sh: Likewise.
	* build-aux/cc-mlibc.sh: Likewise.
	* build-aux/cc.sh: Likewise.
	* build-aux/check-mescc.sh: Likewise.
	* build-aux/test.sh: Likewise.
	* build.sh: Likewise.
	* .gitignore: Update for posixy extensions.

2018-05-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Add drop, drop-right.
	* module/srfi/srfi-1.mes (drop, drop-right): New function.

2018-05-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "fork/exec: debug."
	This reverts commit f0315ac0d9acd66a30dbb192334f443459b7ed16.

	fork/exec: debug.

2018-05-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Support fork, waitpid, execve.
	* stage0/x86.M1 (SYS_fork, SYS_waitpid, SYS_execve): New define.
	* lib/linux-gcc.c (fork, waitpid, execve): New function.
	* lib/linux-mes.c (fork, waitpid, execve): New function.
	* lib/libc.c (wait): New function.
	* include/unistd.h (fork, execve): Declare.
	* include/sys/wait.h (waitpid, wait): Declare.
	* module/mes/posix.mes (search-path, execlp, system*, waitpid): New function.
	* src/posix.c (primitive_fork, execl): New function.

2018-05-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Oops, alignment.
	* module/mes/M1.mes (object->M1): Oops, alignment: only add alignment
	  when not aligned.

2018-05-26  Jeremiah Orians  <jeremiah@pdp10.guru>

	mescc: Add fopen.
	* lib/libc+tcc.c (fopen)[!POSIX]: Remove stub.
	* lib/libc.c (fopen)[!POSIX]: New function.
	* AUTHORS: Add Jeremiah.

2018-05-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Remove function declarations from M1.
	* module/language/c99/compiler.mes (info->object): Remove function
	  declarations.

	build: Check for mes-seed, tinycc-seed.
	* configure: Check for guile-tools, mes-seed, tinycc-seed.  Bugfix:
	  Add cwd to load path.

2018-05-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: mes: Update to 0.14.
	* guix.scm (mes): Update to 0.14.
	  (mes.git): Likewise.

2018-05-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: Add nyacc-for-mes.
	* guix.scm (nyacc-for-mes): New variable.

2018-05-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.14.
	* configure (VERSION): Bump to 0.14.

2018-05-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Release udpate.
	* BOOTSTRAP: Update.
	* HACKING: Update.
	* NEWS: Update.
	* README: Update.
	* doc/ANNOUNCE-0.14: New file.

2018-05-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: Handle short struct initializer.
	* module/language/c99/compiler.mes (array-init-element->data): Handle
	  short struct initializer.

2018-05-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Align global data.
	* module/mes/M1.mes (object->M1): Align globals.

2018-05-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: strncpy.
	* lib/libc+tcc.c (strncpy): New function.
	* scaffold/tests/86-strncpy.c: Test it.
	* build-aux/check-mescc.sh (tests): Run it.
	* build-aux/cc-mlibc.sh (LIBC): Acknowlegde.
	* build-aux/test.sh (LIBC): Export it.

2018-05-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	tinycc: Add stubs: __fixdfdi, __fixxfdi, __fixsfdi.
	* lib/libc+tcc-gcc.c (__fixdfdi, __fixxfdi, __fixsfdi): New stub.

2018-05-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	tinycc: Add stubs: __floatundixf __fixunsxfdi.
	* lib/libc+tcc-gcc.c (__floatundixf, __fixunsxfdi): New stub.

	mescc: Tinycc support: workaround for tcc; this breaks: Structured type with char or short on heap.
	* module/language/c99/compiler.mes (int->bv): Always use 32bit byte
	  vector.

2018-05-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: Structured type with char or short on heap.
	* module/language/c99/compiler.mes (int->bv): New function.
	  (init->data): Use it.  Add parameter.  Update callers.
	  (array-init->data): Add type parmeter.
	  (array-init-element->data): Likewise.
	* module/mes/bytevectors.mes (bytevector-u8-set!): New function.
	* module/mes/bytevectors.scm (mes): Export it.
	* module/mes/as.mes (int->bv8): New function.

2018-05-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Fix size ERROR message.
	* module/language/c99/compiler.mes (expr->accu): Fix size ERROR message.

	mescc: Fix itoa.
	* lib/libc.c (itoa): Use function-static buffer.  Increase to 12 to
	  handle INT_MIN.
	  (itoab): Likewise.

2018-05-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: Export nested struct definitions.
	* module/language/c99/compiler.mes (struct-field): Support nested,
	  named and anonymous enums.
	  (field->info): New function.
	  (type->info): Use it to reap nestedly defined enums, structs, unions.
	  (decl->info): Likewise.
	* scaffold/tests/t.c: Test it.

	mescc: Tinycc support: Unsigned comparison.
	* stage0/x86.M1 (ja32, jae32, jb32, jbe32): New macro.
	* module/mes/as-i386.mes (i386:jump-a, i386:jump-ae, i386:jump-b,
	  i386:jump-be): Use it in new function.
	* module/mes/as-i386.scm: Export them.
	* module/language/c99/compiler.mes (test-jump-label->info): Use them to
	  support unsigned comparison.
	* scaffold/tests/7s-unsigned-compare.c: Test it.
	* build-aux/check-mescc.sh (tests): Run it.

2018-05-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: Char and short sign extend.
	* module/mes/as-i386.mes (i386:accu*n->local, i386:byte-accu->local+n,
	  i386:word-accu->local+n): Remove.
	  (i386:byte-accu, i386:signed-byte-accu, i386:word-accu,
	  i386:signed-word-accu): New function.
	* module/mes/as-i386.scm: Export them.
	* module/language/c99/compiler.mes (accu->local+n-text): Simplify.
	  (mem->accu, convert-accu): New function.
	  (expr->accu): Use them.
	* stage0/x86.M1 (mov____%al,0x32(%ebp), mov____%al,0x8(%ebp),
	  mov____%ax,0x32(%ebp), mov____%ax,0x8(%ebp), movzbl_0x32(%ebp),%eax,
	  movzbl_0x8(%ebp),%eax, movzwl_0x32(%ebp),%eax,
	  movzwl_0x8(%ebp),%eax): Deprecate.
	* scaffold/tests/7r-sign-extend.c: Test it.
	* build-aux/check-mescc.sh (tests): Run it.

2018-05-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: string->number: Support upper case hex.
	* module/mes/scm.mes (string->number): Support upper case hex.

2018-05-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: Minimal float support.
	* lib/libc+tcc.c (ldexp, strtod, strtof, strtold): New stub.
	* include/math.h (ldexp): Declare.
	* include/stdlib.h (strtod, strtof, strtold): Declare.
	* module/mes/scm.mes (string->number): Minimal float support.
	  (inexact->exact): New function.
	* tests/math.test ("string->number"): Test it.
	* module/language/c99/compiler.mes (ast->type): Handle float type.
	  (type->info): Likewise.
	  (cstring->int): Rename from cstring->number.  Update callers.
	  (cstring->float): New function.
	  (expr->accu): Use it.

2018-05-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: Switch with heterogeneous body, non-last default.
	* module/language/c99/compiler.mes (switch->info): New function.
	  (ast->info): Use it for switch.
	  (clause->info, statements->clauses): Remove.
	* scaffold/tests/44-switch.c (default_first): Test it.

2018-05-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Support fold 3.
	* module/srfi/srfi-1.mes (fold): Support fold 3.

2018-05-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: Compound strings as function argument.
	* module/language/c99/compiler.mes (expr->accu): Handle compound
	  strings as function argument.
	* module/mes/M1.mes (object->M1): Call error when string not found.
	* scaffold/tests/t.c: Test it.

	mescc: Tinycc support: Update some tests.

	mescc: Tinycc support: Add __lshrdi3, __ashldi3, __ashrdi3.
	* lib/libc+tcc-gcc.c (__lshrdi3, __ashldi3, __ashrdi3): New function.

	mescc: Tinycc support: Fix sizeof interesting expressions.
	* module/language/c99/compiler.mes (ast->type): Return type for
	  sizeof-expr, sizeof-type.
	* scaffold/tests/85-sizeof.c: Test it.

2018-05-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: Support bit-fields.
	* module/language/c99/compiler.mes (struct->fields): Support bit-fields.
	  (ast->type):
	  (field-field):
	  (field-offset):
	  (expr->accu*):
	  (expr->accu):
	  (struct-field):
	  (->size):
	* module/language/c99/info.scm (<bit-field>): New type.
	* stage0/x86.M1 (and____$i32,%eax, and____(%edx),%eax,
	  mov____(%edx),%eax, or____(%edx),%eax): New macro.
	* module/mes/as-i386.mes (i386:base-mem->accu): Use
	  it.
	  (i386:accu-and, i386:accu-and-base-mem, i386:accu-or-base-mem): New
	  function.
	* module/mes/as-i386.scm: Export them.
	* scaffold/tests/7q-bit-field.c: Test it.
	* build-aux/check-mescc.sh (tests): Run it.

2018-05-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: Anonymous string array.
	* module/language/c99/compiler.mes (global->info): Anonymous string
	  array.
	  (local->info): Likewise.
	  (array-init->string): Support array of char.
	  (init-local): Likewise.
	  (->size): Fix for array.
	* scaffold/tests/4a-char-array.c: Test it.
	* build-aux/check-mescc.sh (tests): Run it.

	mescc: Tinycc support: sizeof: Bugfix for c-array.
	* module/language/c99/compiler.mes (->size): Bugfix for c-array.
	* scaffold/tests/85-sizeof.c: Test it.

2018-05-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: Implement ((struct foo*)p)->bar.
	* module/language/c99/compiler.mes (expr->accu*):
	* scaffold/tests/7p-struct-cast.c: Test it.
	* build-aux/check-mescc.sh (tests): Run it.

2018-05-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: Implement (foo--)->bar and permutations.
	* module/language/c99/info.scm (clone): Add post field.
	  (make): Handle post parameter.
	* module/language/c99/compiler.mes (clone): Handle post parameter.
	  (expr->accu*): Set it to support foo--/foo--.
	  (expr->accu): Read it to support foo--/foo--.
	* scaffold/tests/7o-struct-pre-post.c: Test it.
	* build-aux/check-mescc.sh: Run it.

2018-05-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: Function addresses.

	mescc: Tinycc support: Numeric constant expressions.

	mescc: Tinycc support: Function variables.

	mescc: Tinycc support: Pointer typedefs.

	mescc: Tinycc support: Array typedefs.

	mescc: Tinycc support: Sizeof struct destruct.

	mescc: Tinycc support: Anonymous union initialization.

	mescc: Tinycc support: Fix for ?-operator.

	mescc: Tinycc support: Valued function assign.

2018-05-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Refactor type system: WIP
	* module/language/c99/compiler.mes (): WIP
	* module/language/c99/info.scm (): WIP

	mescc: Refactor type system: struct/enum fields: (name . <type>).
	* module/language/c99/compiler.mes (struct-field): Refactor.
	  (field:name): Update.
	  (field:pointer): Update.
	  (field:size): Update.
	  (field:type): Remove.
	  (->size): New function.

2018-05-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Refactor type system: introduce <array>, <pointer>, <var>.
	* module/language/c99/info.scm (<array>, <pointer>, <var>): New type.
	* module/language/c99/compiler.mes (ast-><type>): New function.
	  (ast-type): Use it.

2018-05-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Refactor variable declaration.
	* module/language/c99/compiler.mes (decl->info): Refactor.

2018-05-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Handle sizeof expression.
	* module/language/c99/compiler.mes (expr->accu): Handle sizeof
	  expression.
	* scaffold/tests/85-sizeof.c: Test it.

	mescc: Handle struct field lists.
	* module/language/c99/compiler.mes (struct-field): Return list of
	  fields.  Update callers.
	* scaffold/tests/84-struct-field-list.c: Test it.
	* build-aux/check-mescc.sh (tests): Add it.

	mescc: Support heterogeneous variable init.
	* module/language/c99/compiler.mes (decl->info): Support heterogeneous
	  variable init.
	* scaffold/tests/83-heterogenoous-init.c: Test it.
	* build-aux/check-mescc.sh (tests): Add it.

	mescc: Handle (Skip) global static.
	* module/language/c99/compiler.mes (decl->info): Handle (Skip) global
	  static.
	* scaffold/tests/48-global-static.c: Test it.

	mescc: Support functions in expression.
	* module/language/c99/info.scm (<function>): New type.
	* module/language/c99/compiler.mes (ast->type): Support function.
	  (expr->type-size): Likewise.
	  (expr->type): Likewise.
	  (expr->accu*): Likewise.
	  (function->info): Create <function>.
	* module/mes/M1.mes (object->M1): Grok <function>.
	* scaffold/tests/47-function-expression.c: Test it.
	* build-aux/check-mescc.sh: Add it.

	mescc: Support function-static variables.
	* module/language/c99/info.scm (make): Add statics field.
	  (<global>): Add name and function fields.  Update callers.
	  (global->string): New function.
	* module/mes/M1.mes (object->M1): Update.
	* module/language/c99/compiler.mes (clone): Add statics field.
	  (ident->accu): For <global>, use global in text (WAS: name).
	  (ident-address->accu): Likewise.
	  (ident-address->base): Likewise.
	  (decl-local->info): New function.
	  (decl->info): New function.
	  (ast->info): Use them.
	  (function->info): Keep globals in object (WAS: global:value only).
	* scaffold/tests/46-function-static.c: Test it.

2018-05-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Add unfold.
	* module/srfi/srfi-1.mes (unfold): New function.

	mes: Add const.
	* module/mes/scm.mes (const): New function.
	* tests/scm.test ("const"): Test it.

2018-05-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Add logxor.
	* src/math.c (logxor): New function.
	* tests/math.test ("logxor"): Test it.

	mes: string-join: Support optional delimiter, support grammar.
	* module/srfi/srfi-13.mes (string-join): Support optional infix and
	  grammar.
	* tests/srfi-13.test ("string-join"): Test it.

	core: reader: Support binary #b101.
	* src/reader.c (reader_read_binary): New function.
	  (reader_read_hash): Use it.
	* tests/scm.test ("binary"): Test it.

2018-05-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Support srfi-9-gnu.
	* module/srfi/srfi-9/gnu.mes: New file.  Support srfi-9-gnu.
	* tests/srfi-9.test: Test it.
	* tests/srfi-9.test-guile:

2018-04-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Have core:eval expand macros.
	* src/mes.c (core:eval-expand): Remove
	  (core:eval-expanded): New variable.
	  (eval_apply): Have core:eval expand macros; core:eval-expanded evals
	  expanded sexps.

2018-04-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "core: Remove pmatch-car, pmatch-cdr hack."
	This reverts commit be1e84624ea4a158173f34af923e3c4a3793412a.

2018-04-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Remove pmatch-car, pmatch-cdr hack.
	* src/mes.c (scm_vm_eval_pmatch_car, scm_vm_eval_pmatch_cdr): Remove
	  (eval_apply): Remove cell_vm_eval_pmatch_car,
	  cell_vm_eval_pmatch_cdr hack.
	  (mes_symbols): Remove cell_symbol_pmatch_car, cell_symbol_pmatch_cdr.
	* scaffold/mini-mes.c: Likewise.
	* module/mes/guile.scm (mes): Remove pmatch-car, pmatch-cdr.
	* module/mes/pmatch.scm (ppat): Use plain car, cdr.

2018-05-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Do not assume /bin/sh, basename/dirname.
	* install.sh: Do not assume /bin/sh, basename/dirname.
	* scripts/diff.scm: Likewise.

	build: Build mini-libc and libc+tcc-gcc too.
	* include/getopt.h[__GNUC__ && POSIX]: Only use include_next.
	* lib/libc+tcc-gcc.c[POSIX](longjmp, setjmp, __udivdi3, __umoddi3):
	  Remove.
	* build-aux/build-cc.sh: Build mini-libc-gcc and libc+tcc-gcc too.
	* build-aux/build-mlibc.sh: Build mini-libc-gcc too.

	boot: Bugfix for diff on mes.
	* scripts/diff.scm (diff-files): Rename from diff; Avoids name clash
	  with module to allow using -e '(<module>)' hack.

	build: Install naive diff.
	* scripts/diff.scm: Move from build-aux.
	* install.sh: Install it.
	* build-aux/tests.sh: Update location.

2018-05-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Update configure.
	* configure: Update.

2018-05-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Remove debugging.
	* module/mes/module.mes (mes-load-module-env): Remove debugging.

2018-05-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Use ../mes-seed/refresh.sh, ../tinycc-seed/refresh.sh.
	* GNUmakefile (seed): Use ../mes-seed/refresh.sh, ../tinycc-seed/refresh.sh.

2018-05-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Guile fixes.
	* scripts/mescc: Set GODIR.  Add module as expression to Mes
	  invokation.  Remove explicit (second) call to main.

2018-05-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Use diff -ub for tinycc tests.
	* build-aux/diff.scm: Support -b.
	* build-aux/test.sh: Use it.

2018-05-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	check: Also test with i686-unknown-linux-gnu-gcc.
	* check.sh (CC32): New variable.
	* build-aux/test.sh: Also test with CC32.o

2018-05-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: configure: Handle VAR=VALUE.  Update help.
	* configure: Handle VAR=VALUE.  Update help.

2018-05-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Fixes for Debian and /bin/sh == dash.
	* build.sh: Use separate export stanzas.  Use command -v (WAS: type
	  -p).  Fixes sh, /bin/sh == dash.
	* build-aux/build-cc.sh: Likewise.
	* build-aux/build-guile.sh: Likewise.
	* build-aux/build-mes.sh: Likewise.
	* build-aux/build-mlibc.sh: Likewise.
	* build-aux/cc-mes.sh: Likewise.
	* build-aux/check-mescc.sh: Likewise.
	* check.sh: Likewise.
	* install.sh: Likewise.
	* scripts/mescc: Likewise.

	build: Rebuild after build from seed.
	* build-aux/build-mes.sh: Rebuild after build from seed.

	mescc: Use file-name as global prefix.
	* module/mes/M1.mes (object->M1): Add file-name parameter.

2018-05-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Fixes for int-max, int-min.
	* src/math.c (greater_p): Fix INT_MAX > 0.
	  (less_p): Fix INT_MIN < 0.
	* tests/math.test ("< INT-MIN"): Test it.
	  ("< INT-MAX"):
	  ("> INT-MAX"):
	  ("> INT-MAX 0"):
	  ("> INT-MIN"):
	* tests/srfi-13.test ("string->number INT-MAX"): Test it.
	  ("string->number INT-MIN"):
	  ("number->string INT-MAX"):
	  ("number->string INT-MIN"):
	* scaffold/tests/60-math.c (test): Test it.

	mescc: Fix dumping of strings > M1_STRING_MAX.
	* module/mes/M1.mes (object->M1): Skip opening quote.

2018-04-30  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "core: length: Check parameter."
	This reverts commit 1f52ed35c66febcce16e06868e803a39be7eda41.

	core: length: Check parameter.
	* src/mes.c (length): Check parameter.

2018-05-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: enable all tests, use expect count, add tinycc tests.
	* build-aux/check-mescc.sh (tests): Add tinycc tests.
	* build-aux/diff.scm: Naive diff for tinycc tests.
	* build-aux/test.sh: Run diff when .expect found.

2018-04-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Simplify, drop make.scm experiment.
	* build.sh: Rewrite.
	* build-aux/build-cc.sh: New file.
	* build-aux/build-mes.sh: New file.
	* build-aux/build-mlibc.sh: New file.
	* build-aux/cc.sh: New file.
	* build-aux/cc-mes.sh: New file.
	* build-aux/cc-mlibc.sh: New file.
	* install.sh: Update.
	* make.scm: Remove.
	* guile/guix/make.scm: Remove.
	* guile/guix/records.scm: Remove.
	* guile/guix/shell-utilsg.scm: Remove.

2018-04-30  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Use length__.
	* src/mes.c (check_formals): Use length__.

2018-04-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes-snarf: Support running with Mes.
	* build-aux/mes-snarf.scm: Support running with Mes.

	mes: Support -C and -L for Guile compatibility.
	* module/mes/boot-0.scm): Support -C and -L for Guile compatibility.

	mes: Support -e,--main option.
	* module/mes/boot-0.scm: Support -e,--main option.

	mes: Upgrade Guile module support.
	* module/mes/boot-0.scm (define-module): New macro with minimal Guile support.
	  (use-modules): New macro.

	mes: Add srfi-8.
	* module/srfi/srfi-8.mes: New file.

	mes: string-join: Handle empty list.
	* module/mes/boot-0.scm (string-join): Handle empty list.

	mes: Add basename.
	* module/mes/posix.mes (basename): New function.

	mes: Add delete-duplicates.
	* module/srfi/srfi-1.mes (delete-duplicates): New function.

	mes: filter-map: Handle two lists.
	* module/srfi/srfi-1.mes (filter-map): Handle two lists, add error
	  when called with three or more.

	mes: Add string-replace.
	* module/srfi/srfi-13.mes (string-replace): New function.
	* tests/srfi-13.test ("string-replace"): Test it.

	mes: Add string-map.
	* module/srfi/srfi-13.mes (string-map): New function.
	* tests/srfi-13.test ("string-map"): Test it.

	mes: Add string-trim, string-trim-right, string-trim-both.
	* module/srfi/srfi-13.mes (string-trim, string-trimn-right,
	  string-trim-both): New function.
	* tests/srfi-13.test ("string-trim"): Test it.
	  ("string-trim-right"):
	  ("string-trim-both"):

	mes: Add string-contains.
	* module/srfi/srfi-13.mes (string-contains): New function.
	* tests/srfi-13.test ("string-contains"): Test it.
	  ("string-contains not"):

	mes: string-drop: Error on negative droppings.
	* module/srfi/srfi-13.mes (string-drop, string-take,
	  string-drop-right): Error on negative droppings.
	* tests/srfi-13.test ("string-drop"): Test it.

	core: reverse!: Handle empty list.
	* src/mes.c (reverse_x_): Handle empty list.
	* tests/scm.test ("reverse! ()"): Test it.

	core: Add string ports.
	* src/mes.c (type_t): Add TPORT.
	  (scm_type_port): New symbol.
	  (PORT): New macro.
	  (MAKE_STRING_PORT): New macro.
	  (eval_apply): Handle string ports in primitive-load.
	  (mes_symbols): Add scm_type_port.
	* src/posix.c (peekchar): Handle string ports.
	  (readchar): New function.  Replace all getchar callers.
	  (unreadchar): Likewise.
	* module/mes/type-0 (port?): New function.
	* module/mes/guile.mes (with-input-from-file): Rewrite.
	  (open-input-string): Remove.
	* module/mes/guile.scm (guile): Update cell types.
	* src/gc.c (gc_loop): Support TPORT.
	* src/lib.c (display_helper): Support TPORT.
	* module/mes/display.mes (display): Support TPORT.

	mes: assq, assoc-ref: Handle non-A-LISTs.
	* src/mes.c (assq): Return #f if A-LIST is not a list.
	* module/mes/scm.mes (assoc): Likewise.

	core: Use single definition rule for cell-type.
	* src/mes.c (scm_type_char, scm_type_closure, scm_type_continuation,
	  scm_type_function, scm_type_keyword, scm_type_macro,
	  scm_type_number, scm_type_pair, scm_type_ref, scm_type_special,
	  scm_type_string, scm_type_symbol, scm_type_values,
	  scm_type_variable, scm_type_vector): New symbol.
	  (mes_symbols): Add them.
	* module/mes/type-0.mes (<cell:char>, <cell:char>, <cell:closure>,
	  <cell:continuation>, <cell:function>, <cell:keyword>, <cell:macro>,
	  <cell:number>, <cell:pair>, <cell:ref>, <cell:special>,
	  <cell:string>, <cell:symbol>, <cell:values>, <cell:variable>,
	  <cell:vector>, <cell:broken-heart): Remove.
	* module/mes/boot-0.scm: Likewise.
	* module/mes/boot-01.scm: Likewise.
	* module/mes/boot-02.scm: Likewise.
	* scaffold/boot/20-define-quote.scm: Likewise.
	* scaffold/boot/37-closure-lambda.scm: Likewise.
	* scaffold/boot/38-simple-format.scm: Likewise.
	* scaffold/boot/4c-quasiquote.scm:
	* scaffold/boot/4e-string-split.scm: Likewise.
	* scaffold/boot/51-module.scm: Likewise.
	* scaffold/boot/52-define-module.scm: Likewise.
	* scaffold/boot/60-let-syntax.scm: Likewise.
	* module/mes/guile.scm: Add some of them.

	core: Fix gc_up_arena for x86_64.
	* src/gc.c (gc_): Fix gc_up_arena for x86_64.

	core: Fix compile warnings.
	* src/posix.c: Include sys/stat.h.
	  (chmod): Return cell_unspecified.
	* include/stdlib.h: Typo.

	mlibc: Declare chmod.
	* include/sys/stat.h (mode_t, chmod): Declare.

2018-04-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: Update mes to 0.13.
	* guix.scm (mes): Update to 0.13.
	  (mes.git): Likewise.

2018-04-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.13.
	* configure (VERSION): Bump to 0.13.

2018-04-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Release udpate.
	* BOOTSTRAP: Update.
	* HACKING: Update.
	* NEWS: Update.
	* README: Update.
	* doc/ANNOUNCE-0.13: New file.

2018-04-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Merge mescc.mes and mescc.scm.
	* scripts/mescc: New file.
	* scripts/mescc.mes: Remove.
	* guile/mescc.scm: Remove.
	* guile/guix/make.scm (CC.mescc): Update.
	* install.sh (TINYCC_SEED): Update.
	* make.scm (bootstrap?): Update.
	* test.sh (MES): Update.
	* check-boot.sh: Use $GUILE to allow running without Guile.

	core: Add chmod.
	* src/posix.c (chmod_): New function.

2018-04-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: jam-scaper/garbage-collector: Use only one arena.
	* src/mes.c (ARENA_SIZE): Lower to 200000.
	  (MES_MAX_ARENA): Bump to 300000000.
	  (JAM_SIZE): New global.
	  (make_cell__): Remove ARENA assert.
	  (gc_init_cells): Alloc ARENA_SIZE + JAM_SIZE.
	  (mes_symbols): Do not init news.
	  (gc_init_news): Remove.
	  (main): Initialize JAM_SIZE, consider MES_JAM environment variable.
	* src/gc.c (gc_init_news): Move from mes.c.  Start at g_free.
	  (gc_flip): Do not flip to g_news, instead copy g_news to cells.
	  (gc_up_arena): Realloc to ARENA_SIZE + JAM_SIZE.
	  (gc_): Init news.  Only up arena if g_news is safe.

2018-04-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Create less garbage when dumping M1.
	* module/mes/M1.mes (display-join): New function.
	* (object->M1): Use it.

	core: last_pair: Move to core.
	* src/lib.c (last_pair): New function.
	* module/mes/scm.mes (last-pair): Remove.

	core: equal2_p: Add short-circuit and eliminate tail call.
	* src/lib.c (equal2_p): Add short-circuit and eliminate tail call.

2018-04-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Use display for dumping M1.
	* module/mes/M1.mes (object->M1): Use display for dumping M1.

2018-04-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Guile-like command-line interface.
	* module/mes/boot-0.scm (tty?): Guile-like command-line interface.
	* scripts/repl.mes: Remove.
	* scripts/mescc.mes: Update.
	* tests/*.test: Update scripts.
	* module/mes/repl.mes (repl): Add ,quit.

	mes: getopt-long: Support stop-at-first-non-option.
	* module/mes/getopt-long.scm (process-options): Fix parsing `-'.  Add
	  parameter: stop-at-first-non-option.
	  (getopt-long): Add keyword parameter #:stop-at-first-non-option.

	mes: Add isatty?.
	* src/posix.c (isatty_p): New function.

	mlibc: Add isatty.
	* lib/libc.c (isatty): New function.
	* include/unistd.h: Declare it.

	mlibc: Add ioctl.
	* stage0/x86.M1 (SYS_ioctl): New define.
	* lib/linux-mes.c (ioctl): New syscall.
	* lib/linux-gcc.c (ioctl): New syscall.
	* include/sys/ioctl.h: New file.

2018-04-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Compile minimal mes with MES_MINI=1.
	* src/mes.c: Compile minimal mes with MES_MINI=1.

2018-04-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	core; reader_read_string: Support escaped characters.
	* src/reader.c (reader_read_string): Support escaped characters.

2018-04-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "mescc: Use core:write."
	This reverts commit d88e31dfec3158a830c32f9f732b052cfccac6eb.

2018-04-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Use core:write.
	* scripts/mescc.mes (source->ast): Use core:write.

2018-04-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: display: Display escaped characters.
	* module/mes/display.mes (display): Display escaped characters.

2018-04-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: display_helper: Display escaped characters.
	* src/lib.c (display_helper): Display escaped characters.

	mes: Resurrect macros in repl.
	* src/mes.c (scm_vm_begin_expand): Rename to core:begin-expand.
	 (eval_apply): Expose it.
	* module/mes/repl.mes (repl): Use it to resurrect macros.

	core: Fixes for garbage collector/jam scraper.
	* src/gc.c (gc_loop): Do not relocate car of TCLOSURE, TCONTINUATION.
	  Check for TBROKEN_HEART.
	* src/mes.c (make_closure_): Set car to 0.
	  (check_apply): Check for TBROKEN_HEART.  Fixes reporting artificial
	  out-of-memory error.
	  (eval_apply): Likewise.
	* src/vector.c (vector_entry): Only copy TCHAR and TNUMBER.

	core: drop global_p from variable.
	* src/mes (struct scm): Remove field global_p.
	 (VARIABLE_GLOBAL_P): Remove.
	 (make_variable_): Remove global_p parameter.  Update callers.
	* src/lib.c (display_helper): Drop VARIABLE_GLOBAL_P support.

	core: Reenable full printing of lists.
	* src/lib.c (display_helper): Reenable full printing of lists.

2018-04-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: append2, append_reverse, reverse, reverse!: Create less garbage.
	* src/mes.c (append_reverse): New function.
	  (reverse_x_): New function.
	  (append2): Use them to create less garbage.
	* module/mes/scm.mes (reverse): Create less garbage.
	* module/srfi/srfi-1.mes (reverse!): Rewrite, use core:reverse!.
	  (append-reverse): Remove.

	core: vector_to_list: Create less garbage.
	* src/vector.c (vector_to_list): Create less garbage.

	core: Optimize vector-map, vector-for-each.
	* module/srfi/srfi-43.mes (vector-map): Optimize.
	  (vector-for-each): Optimize.
	* tests/srfi-43.test: New file.
	* tests/srfi-43.test-guile: New file.
	* check.sh (tests): Add it.
	* make.scm (mes-tests): Add it.

2018-04-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "build-32.sh"
	This reverts commit ace8b6f1b52de58c9ab404ed13234f397dac6bdc.

2018-04-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	build-32.sh

2018-04-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Cleanup make_cell, remove tmp cells.
	* src/mes.c (make_cell__): New function.
	  (make_cell_): Use it.
	  (length__): New function.
	  (tmp, tmp_num, tmp_num2, tmp_num_, tmp_num2_, make_tmps): Remove.
	  Update callers to use make_cell__ directly.
	 * src/vector.c (make_vector__): New function.
	  (make_vector_): Use it.

2018-04-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "mlibc: Use memmove in realloc."
	This reverts commit f47a21e3cb4814c4a30d10ff59e5c947441725e9.

2018-04-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	mlibc: Use memmove in realloc.
	* src/libc.c (memmove): New function.
	  (realloc): Use it.
	* src/libc+tcc.c (memmove): Remove.

	mes: Add char-whitespace?
	* module/srfi/srfi-14.mes (char-whitespace?): New function.

2018-04-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Move base-0.mes int boot-0.scm.
	* module/mes/boot-02.scm: New file, rename from boot-0.scm.
	* module/mes/boot-0.scm: Add base-0.mes.
	* module/mes/base-0.mes: Remove.

2018-04-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Unify mlibc-gcc and mes builds.
	* make.scm (bin.gcc): Remove stray slash.
	* src/mes.c: Unify mlibc-gcc and mes builds.
	(gc_init_cells):
	(gc_init_news):
	(bload_env):
	* src/reader.c (reader_read_character):
	(reader_read_string):

2018-04-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Remove local variables from gc.
	* src/gc.c (gl_loop): Remove local variables.

	core: Listen to MES_SAFETY environment variable.

	core: Remove local variables from eval/apply.
	* src/mes.c (eval_apply): Move all variables to global scope.

	core: Remove MesCC reminder.

2018-04-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Update default memory settings.
	* src/mes.c (MAX_ARENA_SIZE)[__MESC__]: Set to maximum 172100000.

2018-04-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Tune debug printing.
	* src/mes.c: Tune debug printing.
	* src/gc.c: Likewise.
	* module/mes/guile.mes: Likewise.
	* HACKING: Describe it.

	core: Rewrite reader to create less garbage.
	* src/reader.c (reader_read_line_comment): Rename from read_line_comment.
	(reader_identifier_p): New function.
	(reader_end_of_word_p): New function.
	(reader_read_identifier_or_number): New function.
	(reader_read_sexp_): Rewrite.  Update callers.
	(reader_read_list): Rewrite.
	(reader_lookup_): Remove.

2018-04-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Add isspace.
	* include/ctype.h (isspace): Declare.
	* lib/libc.c (isspace): New function.

2018-04-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Rewrite string reader.
	* src/reader.c (reader_read_string): Rewrite, create much less
	  garbage.
	  (append_char): Remove.

	install: Fix prefix confusion.
	* install.sh: Substitute @PREFIX@ with MES_PREFIX.
	* scripts/mescc.mes: Grok PREFIX as MES_PREFIX.

	guix.scm: Update mes to 0.12.
	* guix.scm (mes, mes.git): Update to 0.12.

2018-04-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.12.
	* configure (VERSION): Bump to 0.12.

2017-11-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Release udpate.
	* HACKING: Update.
	* INSTALL: Update.
	* NEWS: Update.
	* README: Update.
	* doc/ANNOUNCE-0.12: New file.
	* throughout: (janneke) coming out.

2018-04-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix.scm: Update mescc-tools to 0.4.
	* guix.scm (mescc-tools): Update to 0.4.

	core: Workaround for mescc.
	* src/mes.c (eval_apply)[__MESC__]: Add reminder for macro_p, global_p.

2018-04-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Remove scripts/mes symlink.

	mes: Add string-fold, string-fold-right.
	* module/srfi/srfi-13.mes (string-fold, string-fold-right): New
	  function.
	* tests/srfi-13.test ("string-fold"): Test it.
	  ("string-fold-right"): Test it.

	mes: Allow tick as part of identifier.
	* src/reader.c (reader_read_sexp_): Do not treat tick as special.

	mescc: Remove debugging.
	* module/language/c99/compiler.mes: Remove debugging.

	mescc: No comments in M1 when running on Mes.
	* module/language/c99/compiler.mes (ast-comment): If mes?, return nil.

	mescc: Trace globals.
	* module/language/c99/compiler.mes (mescc:trace): New function.  Use
	  throughout.

	Revert "core: Add member."
	This reverts commit 921686a0a3b06281f1804d04e6d4a0344dda507a.

	core: Add member.
	* src/lib.c (member): New function.
	* module/mes/scm.mes (member): Remove.

	mescc: trace M1 dumping.
	* module/language/c99/compiler.mes (info->object): Add tracing.
	* module/mes/M1.mes (object->M1): Add tracing.

	Revert "guix: Update nyacc to 0.83.31."
	This reverts commit 624b85d6b1dd876542f7ad342d6beb8a92408397.

	guix: Update nyacc to 0.83.31.
	* guix.scm (nyacc): Update to 0.83.31.

	mescc: Have Nyacc trace functions while parsing.
	* guile/mescc.scm (main): Set NYACC_TRACE.
	* scripts/mescc.mes (main): Set NYACC_TRACE.

	mes: Add setenv.
	* src/posix.c (setenv_): New function.
	* tests/base.test ("setenv, getenv"): Test it.

	core: Add setenv.
	* lib/libc.c (setenv): New function.
	* include/stdlib.h (setenv): Declare it.
	* scaffold/tests/61-array.c (test): Test it.

2018-04-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: Add manifest.
	* build-aux/manifest.scm: New file.

	guix: Update Nyacc to 0.80.42.
	* guix.scm (nyacc): Update to 0.80.42.

2018-04-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Also print `parsing: input' when using -E.
	* module/language/c99/compiler.mes (c99-input->ast): Print `parsing:
	  input'.
	  (c99-input->info): Remove that.

2018-04-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Cleanup reader.
	* src/reader.c (reader_read_sexp_): Rename from reader_read_word_.  Cleanup.
	  (read_hash): Cleanup.

	mes: Cleanup formatting.

	core: Add equal2?.
	* src/lib.c (equal2_p): New function.
	* module/mes/base.mes (equal2?): Remove.

	core: Add memq.
	* lib/mes.c (memq): New function.
	* module/mes/scm.mes (memq): Remove.

	mes: Remove duplicate memq.
	* module/mes/base-0.mes (memq): Remove.

2017-12-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Single environment lookup for variables, SICP chapter 3.
	* src/mes.c (t): Add TVARIABLE.
	  (scm_vm_eval_deref): New vm special.
	  (make_vref_): New internal function.
	  (eval_apply): WIP: replace symbols with their variable reference.
	* src/gc.c (gc_loop): Handle TVARIABLE.
	* src/lib.c (display_helper): Handle TVARIABLE.
	* module/mes/type-0.mes (<cell:variable>): New variable.
	  (cell:type-alist): Add it.
	  (variable?): New function.
	* module/mes/display.mes (display): Handle <variable>.

2018-04-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Remove override hook for read-input-file.
	* src/reader.c (read_input_file_env): Remove override hook for
	read-input-file.

2018-03-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Iterative recursive macro expand.
	* src/mes.c (eval_apply): Iterative recursive macro expand.
	* src/posix.c (set_current_input_port): Return previous port.
	* module/mes/catch.mes (%eh): Use core:display.
	* module/mes/display.mes (display-cut, display-cut2): Move macro
	  definitions to toplevel.

2018-04-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: records.scm: update from upstream.
	* guile/guix/records.scm: Update from upstream.

2018-01-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Add incremental test suite.
	* check-boot.sh: New file.
	* check.sh: Invoke it.
	* module/srfi/srfi-16.mes: New file.
	* scaffold/boot/00-zero.scm: New file.
	* scaffold/boot/01-true.scm: New file.
	* scaffold/boot/02-symbol.scm: New file.
	* scaffold/boot/03-string.scm: New file.
	* scaffold/boot/04-cons.scm: New file.
	* scaffold/boot/04-quote.scm: New file.
	* scaffold/boot/05-list.scm: New file.
	* scaffold/boot/06-tick.scm: New file.
	* scaffold/boot/07-if.scm: New file.
	* scaffold/boot/08-if-if.scm: New file.
	* scaffold/boot/10-cons.scm: New file.
	* scaffold/boot/11-list.scm: New file.
	* scaffold/boot/12-car.scm: New file.
	* scaffold/boot/13-cdr.scm: New file.
	* scaffold/boot/14-exit.scm: New file.
	* scaffold/boot/15-display.scm: New file.
	* scaffold/boot/16-if-eq-quote.scm: New file.
	* scaffold/boot/20-define-quote.scm: New file.
	* scaffold/boot/20-define-quoted.scm: New file.
	* scaffold/boot/20-define.scm: New file.
	* scaffold/boot/21-define-procedure.scm: New file.
	* scaffold/boot/22-define-procedure-2.scm: New file.
	* scaffold/boot/23-begin.scm: New file.
	* scaffold/boot/24-begin-define.scm: New file.
	* scaffold/boot/25-begin-define-2.scm: New file.
	* scaffold/boot/26-begin-define-later.scm: New file.
	* scaffold/boot/26-define-define.scm: New file.
	* scaffold/boot/27-lambda-define.scm: New file.
	* scaffold/boot/28-define-define.scm: New file.
	* scaffold/boot/29-lambda-define.scm: New file.
	* scaffold/boot/2a-lambda-lambda.scm: New file.
	* scaffold/boot/2b-define-lambda.scm: New file.
	* scaffold/boot/2c-define-lambda-recurse.scm: New file.
	* scaffold/boot/2d-define-lambda-set.scm: New file.
	* scaffold/boot/2e-define-second.scm: New file.
	* scaffold/boot/30-capture.scm: New file.
	* scaffold/boot/31-capture-define.scm: New file.
	* scaffold/boot/32-capture-modify-close.scm: New file.
	* scaffold/boot/33-procedure-override-close.scm: New file.
	* scaffold/boot/34-cdr-override-close.scm: New file.
	* scaffold/boot/35-closure-modify.scm: New file.
	* scaffold/boot/36-closure-override.scm: New file.
	* scaffold/boot/37-closure-lambda.scm: New file.
	* scaffold/boot/38-simple-format.scm: New file.
	* scaffold/boot/40-define-macro.scm: New file.
	* scaffold/boot/41-when.scm: New file.
	* scaffold/boot/42-if-when.scm: New file.
	* scaffold/boot/43-or.scm: New file.
	* scaffold/boot/44-or-if.scm: New file.
	* scaffold/boot/45-pass-if.scm: New file.
	* scaffold/boot/46-report.scm: New file.
	* scaffold/boot/47-pass-if-eq.scm: New file.
	* scaffold/boot/48-let.scm: New file.
	* scaffold/boot/49-macro-override.scm: New file.
	* scaffold/boot/4a-define-macro-define-macro.scm: New file.
	* scaffold/boot/4b-define-macro-define.scm: New file.
	* scaffold/boot/4c-quasiquote.scm: New file.
	* scaffold/boot/50-primitive-load.scm: New file.
	* scaffold/boot/51-module.scm: New file.
	* scaffold/boot/52-define-module.scm: New file.
	* scaffold/boot/53-closure-display.scm: New file.
	* scaffold/boot/60-let-syntax.scm: New file.
	* scaffold/boot/closure.scm: New file.
	* scaffold/boot/compose.scm: New file.
	* scaffold/boot/data/bar.mes: New file.
	* scaffold/boot/data/i.scm: New file.
	* scaffold/boot/data/module.mes: New file.
	* scaffold/boot/foo.scm: New file.
	* scaffold/boot/lambda-star.scm: New file.
	* scaffold/boot/vector.scm: New file.
	* tests/boot.test: New file.
	* tests/boot.test-guile: New file.
	* tests/srfi-16.test: New file.
	* tests/srfi-16.test-guile: New file.

2018-02-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Boot from MES_BOOT, boot-0.scm.
	* src/mes.c (load_env): Softcode loading of boot-0.scm from
	  environment variabl MES_BOOT.
	* module/mes/boot-00.scm: New file.
	* module/mes/boot-01.scm: New file.
	* module/mes/boot-0.scm: Rename from read-0.mes.
	* module/mes/module.mes: New file.

2018-03-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Add -fno-stack-protector for debian.
	* guile/guix/make.scm (%C32-FLAGS): Add -fno-stack-protector.

2018-01-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: reader: reader_ prefix; read/write char/string in core.
	* src/posix.c (peek_char, read_char, read_string, unread_char, write_char): New function.
	* src/reader.c: Use reader_ prefix.

	r#	bootstrappable.org

2018-01-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: More informative error reporting for number asserts.
	* src/math.c (assert_number): New function.  Update assert () users.

2018-01-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	guile: Resurrect eval/apply in scheme.
	* guile/mes.mes (eval-expand): Short-circuit make-closure.
	* guile/mes.scm (environment): Update.

2018-02-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: simple-format: support ~A, ~S.
	* module/mes/display.scm (simple-format): support ~A, ~S.

2018-01-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Display and write string and char compliance.
	* src/lib.c (display_helper): Display and write char and string compliance.

2018-02-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: display: Support keyword.
	* src/lib.c (display_helper): Support keyword.

2018-01-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: display: vector.
	* src/lib.c (display_helper): Display vector.

2018-01-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: display: closure names.
	* src/lib.c (display_helper): Display closure names.

2018-01-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Rename make-vector to core:make-vector.
	* src/vector.c (make_vector_): Rename from make_vector.  Update callers.

	mes: Better error reporting.
	* src/lib.c (write_error_): New function.
	* src/mes.c (error, check_apply): Use it.
	  (append2, set_car_x): Upon error, call error (WAS: assert).

	Revert "mes: un-defmacro optargs.  WIP"
	This reverts commit 5da527c540dc0e1481a010899233b4e806fe37da.

2018-01-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: un-defmacro optargs.  WIP

	mes: Test optargs without pmatch.
	* tests/optargs.test: Remove pmatch.

	mes: Add define-macro*.
	* module/mes/optargs.mes (define-macro*): New macro.

2018-01-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Evaluate test of COND only once.
	* module/mes/base-0.mes (cond): Evaluate test of COND only once.
	  Fixes cond tests with side effects (Nyacc).
	* tests/base.test ("cond side effect"): Test it.

2018-01-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: #\page is whitespace.
	* module/srfi/srfi-14.mes (char-set:whitespace): Add #\page.

	mes: #<eof> is not a character.
	* module/mes/display.mes (display):
	* module/mes/type-0.mes (char?): -1 is not a character.
	  (eof-object?): New function.
	* tests/base.test ("#<eof>"): Test it.
	* module/mes/scm.mes (eof-object?): Remove.
	  (unread-char): Return character (WAS: integer).

	mes: open-input-string: peek fix.
	* module/mes/guile.mes (open-input-string): Return actual tell.
	* tests/guile.test ("open-input-string peek"): Test it.

	mes: with-input-from-string: peek fix.
	* module/mes/guile.mes (with-input-from-string): Return actual tell.
	* tests/guile.test ("with-input-from-string peek"): Test it.

2018-01-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Resurrect guile-1.8.
	* guile/mescc.scm: Use GUILE_LOAD_COMPILED_PATH instead of -C.
	  [guile]: Include syncase.
	* module/language/c99/compiler.scm [guile]: Stub pretty-print-c99.
	  Set stack to unlimited.
	* module/language/c99/info.scm [guile]: Include (ice-9 syncase).
	* module/mes/as-i386.scm [guile]: Likewise.
	* module/mes/guile.scm [guile]: Add compose, export it.

	mes: Add string-drop-right.
	* module/srfi/srfi-13.mes (string-drop-right): New function.

2018-01-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: cleanups.
	* guile/mescc.scm: Cleanups.
	* module/language/c99/compiler.mes:
	* module/language/c99/compiler.scm:
	* module/language/c99/info.mes:
	* module/language/c99/info.scm:
	* module/mes/getopt-long.mes:
	* module/mes/optargs.mes:
	* module/mes/optargs.scm:
	* module/mes/repl.mes:
	* module/mes/scm.mes:
	* scripts/mescc.mes:

	nyacc cpp-debugging, tests

	mes: getopt-long: fix multi-opt and unclumping.
	* module/mes/getopt-long.scm (remove-if-not): Remove.
	  (option-spec): Add value field.  Update users.
	  (expand-clumped-singles): Simplify, fix.
	  (process-options): To get an option's value, use value instead of
	  value-policy.  Fixes multi-opt.
	* tests/getopt-long.test: New file.
	* make.scm (mes-tests): Add it.
	* check.sh (tests): Add it.
	* tests/getopt-long.test-guile: New symlink.

	guix: back to 0.80.41 for tinycc.
	guix.scm (nyacc): New variable.

2018-01-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Support equal? with arbitrary number of arguments.
	* module/mes/base.mes (equal2?): Rename from equal?.
	  (equal?): Implement.

	mescc: Use records for mes too.
	* module/language/c99/info.mes: Use info.scm records, remove
	  simplistic list data structures.

	mescc.mes: Use write for preprocessing output.
	* scripts/mescc.mes (source->ast): Use core:write instead of pretty-print.

	mes: Add write, core:write.
	* src/lib.c (display_helper, fdisplay_): Add parameter, write_p.
	  Update callers.  When write_p: write quoted strings.
	  (write_, write_port_): New function.
	* module/mes/read-0.mes (write): New function.

	mes: gc_safety.

	check-mescc.sh: run with mes.
	* src/build.sh:
	* src/check-mescc.sh: Run with mes.

	mes: Add string-null?.
	* module/srfi/srfi-13.mes (string-null?): New function.

	mes: Add dirname.
	* module/mes/guile.mes (dirname): New function.

2018-01-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Add syntax tests.
	* tests/syntax.test: New file.
	* tests/syntax.test-guile: New file.

	fixup: 1b0696f9 (Jan Nieuwenhuizen 2018-01-01 15:53:13 +0100 40) ,        (lambda ()

2017-12-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "mes: use array-based stack. WIP: will not survice gc."
	This reverts commit 7fb653f68c2dbf8bc83cce4bd138439c600b538f.

2017-12-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: use array-based stack. WIP: will not survice gc.
	* src/mes.c (STACK_SIZE)[MES_ARRAY_STACK]: New variable.
	  (g_stack_array): New variable.
	  (g_stack): Change type to SCM*.
	* (gc_push_frame)[MES_ARRAY_STACK]: Use g_stack_array, g_stack.
	  (gc_peek_frame): Likewise.
	  (gc_pop_frame): Likewise.
	* src/gc.c (gc_check): Likewise.
	  (gc): Likewise.

2017-12-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Fix assq to improve performance.
	* src/mes.c (assq): Special case eq_p to improve performance.

2017-12-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Reimplement records.
	* module/srfi/srfi-9.mes (define-record-type): New macro.
	* AUTHORS: Update.
	* module/mes/record-0.mes: Remove.
	* module/mes/record.mes: Remove.
	* module/srfi/srfi-9-psyntax.mes: Remove.
	* module/srfi/srfi-9.scm: Remove.
	* make.scm: Remove them.

	mes: Fix display of closure.
	* module/mes/display.mes (display): Drop extra ( at start of *closure*, *circ*.
	* src/lib.c (display_helper): Likewise.

2017-12-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Resurrect define, define-macro in C core.
	* make.scm (bin.gcc, bin.mescc): Use MES_C_READER=1.
	* src/mes.c (scm_symbol_define, scm_symbol_define_macro): New symbol.
	  (scm_vm_eval_define): New special.
	  (scm_symbol_c_define): New symbol.
	  (MAKE_MACRO): New define.
	  (eval_apply)[MES_C_DEFINE]: Handle define, define-macro.
	  (mes_symbols): Define %c-define for use in read-0.mes.
	* module/mes/read-0.mes: Do not implement full scheme define if %c-define.
	* module/mes/quasiquote.mes (sexp:define, env:define, env:macro): New function.
	  (define-macro): New macro.  FIXME
	* module/mes/psyntax.mes (define): New macro.  FIXME

2017-12-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Fix initial display.
	* module/mes/read-0.mes (display): Fix.

2017-12-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Fix compile warning in reader.
	* src/reader.c[MES_C_READER]: Declare read_block_comment, read_hash.
	  Fixes compile warning.

2017-12-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Allow invoking git mescc.mes from elsewhere.
	* src/mes.c (load_env): Look in MES_PREFIX too.  Add debug printing.
	* scripts/mescc.mes: Consider MES_PREFIX.
	* guile/mescc.scm (%prefix): Consider MES_PREFIX.
	* module/mes/base-0.mes (string->list): New function, move from type-0.mes.
	  (%moduledir): Consider MES_PREFIX.
	* module/mes/type-0.mes (string->list): Remove.

	mescc: Output performance hacks: use core:display.
	* src/lib.c (display_): Write to g_stdout (WAS: STDOUT).
	* module/mes/guile.scm (guile): Declare and export core:display core:display-error.
	* module/mes/M1.mes (object->M1): Use core:display and string-append
	  instead of format.
	* module/mes/guile.mes (with-input-from-string): Add debugging.
	  (open-input-string): Likewise.
	  (read-string): Likewise.  Re-implement.
	  (drain-input): Use read-string.

	mes: Nyacc support: substring/copy, substring/shared.
	* module/srfi/srfi-13.mes (substring/copy, substring/shared): Define
	  to substring.

	mes: Nyacc support: Read old characters.
	* src/reader.c (read_character)[MES_C_READER]: Support reading old
	  characters: #\bel, #\bs, #\vt.

	mes: resurrect running MesCC: handle \t in strings.
	* src/reader.c (read-string): Handle \t.  Fixex M1 output.

	mescc: Use small, bootstrappable syntax rather than huge psyntax seed.
	* module/nyacc/lex.mes (mes): Use syntax (WAS: psyntax).
	* module/mes/pmatch.mes (mes): Likewise.
	* module/nyacc/lang/c99/parser.mes (srfi-9): Use syntax (WAS: srfi-9-psyntax).

	mes: Fix for pmatch on bootstrappable syntax-rules.
	* module/mes/pmatch.scm (ppat): Do not use let.
	* tests/pmatch.test ("pmatch nyacc minimal", "pmatch nyacc"): Test it.

2017-12-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	mlibc: M4 support: robustify headers, add sys/signal.h.
	* include/errno.h (ERANGE): New define.
	* include/stdarg.h (size_t): Undefine before typedef.
	* include/stdint.h: Likewise.
	* include/stdio.h: Likewise.
	* include/stdlib.h: Likewise.
	* include/sys/types.h: Likewise.
	* include/string.h: Likewise.
	  (ssize_t): Undefine before typedef.
	* include/unistd.h: Likewise.
	  (off_t): Undefine before typedef.
	* include/sys/stat.h (struct stat): New stub.
	* include/sys/signal.h: New file.

2017-12-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: M4 support: scaffold/tests/82-define.c.
	* scaffold/tests/82-define.c: New file; inspired by M4.  Thanks, Ricardo!
	* make.scm ("82-define"): Build it.
	* check-mescc.sh: Add 82-define.

	mlibc: Tinycc support: Avoid hex.
	* include/00-test.i (main)[__TINYC__]: Do not use $0x.

	mlibc: Tinycc support: qsort.
	* lib/libc+tcc.c (qswap, qpart): New function
	  (qsort): Implement.
	* scaffold/tests/81-qsort.c: Test it.
	* make.scm ("81-qsort"): Build it.

2017-12-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: scaffold: misc cleanups.
	* scaffold/tests/44-switch.c (swits): More case labels.
	* scaffold/tests/60-math.c: Discriminate return values.
	* scaffold/tests/77-pointer-assign.c (memset)[__TINYC__]: Remove.
	* scaffold/tests/79-int-array.c (test): Discriminate return values.

	mlibc: Tinycc support: __udivdi3, __umoddi3.
	* lib/libc+tcc-gcc.c (__udivdi3, __umoddi3): Fix signature, do not
	  crash on simple integer devisions.

	mescc: Tinycc support: Respect word size better.
	* stage0/x86.M1 (movzwl_0x32(%ebp),%eax,movzwl_0x8(%ebp),%eax): New
	  define.
	* module/mes/as-i386.mes (i386:push-word-local-de-ref,
	  i386:word-local->accu): New function.
	* module/mes/as-i386.scm: Export them.
	* module/language/c99/compiler.mes (push-local-de-ref): Respect word size.
	  (ident->accu): Likewise.

	mlibc: New library layout; remove duplication.
	* lib/libc+tcc-gcc.c: New file: Libc bits for GCC from libc-mes+tcc.c.
	* lib/libc+tcc-mes.c: New file: Libc bits for MesCC from libc-mes+tcc.c.
	* lib/libc+tcc.c: New file: Libc bits from libc-mes+tcc.c.
	* lib/libc.c: New file: Merged from libc-mes.c, libc-gcc.c.
	  (abtoi): New function: Rename from _atoi.
	* lib/linux+tcc-gcc.c: New file:  Linux bits from libc-gcc+tcc.c.
	* lib/linux+tcc-mes.c: New file: Linux bits from libc-mes+tcc.c.
	* lib/linux-gcc.c: New file: Linux bits from libc-gcc.c.
	* lib/linux-mes.c: New file: Linux bits from libc-mes.c.
	* lib/mini-libc-gcc.c: New file.
	* lib/mini-libc.c: New file: Libc bits from mini-libc-mes.c.
	* lib/mini-linux-gcc.c: New file.
	* lib/mini-linux-mes.c: New file: Linux bits from mini-libc-mes.c.
	* lib/libc-gcc.c: Remove duplication using include now.
	* lib/libc-mes.c: Likewise.
	* lib/mini-libc-mes.c: Likewise.
	* include/stdio.h (puts)[POSIX]: Remomve macro.
	  (fputc, fputs)[!POSIX]: New macro.
	  (fputc, fputs): Remove declaration.
	* scaffold/tests/7j-strtoull.c (strtoull, test): Use abtoi.
	* src/lib.c (fputs)[__MESC__]: Remove define.
	* guile/guix/make.scm: Update for new library layout.
	* make.scm: Likewise.
	* build.sh: Likewise.
	* install.sh: Likewise.

	mlibc: Tinycc support: itoab, for debugging.
	* lib/libc-gcc.c (itoab): New function.
	* lib/libc-mes.c (itoab): New function.

2017-12-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: prefix string labels with _.
	* module/mes/M1.mes (object->M1): Prefix string lables with _.

	mescc: prefix local labels with _.
	* module/language/c99/compiler.mes (expr->accu): prefix local labels with _.

	bootstrap: Update build script.
	* build.sh: Add blood-elf, use -o.

	mlibc: Mescc-tools support: fix for [v]fprintf.
	* lib/libc-mes+tcc.c (vfprintf): Bugfix: print to fd.

2017-11-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: resurrect full reader in C core.
	* module/mes/read-0.mes (defined?): New function.
	  (eat-whitespace, read-env, read-word, read-block-comment,
	  read-line-comment, read-list, read-character, read-hex, read-octal,
	  reader:read-string, lookup, read-hash, read-word): Only define if
	  not %c-reader.
	* module/mes/base-0.mes (defined?): Remove.
	* src/mes.c[MES_C_READER]: Set ARENA_SIZE=10000000.
	  (scm_symbol_quasiquote scm_symbol_unquote,
	  scm_symbol_unquote_splicing, scm_symbol_syntax,
	  scm_symbol_quasisyntax, scm_symbol_unsyntax,
	  scm_symbol_unsyntax_splicing): New symbol.
	  (scm_symbol_c_reader): New symbol.
	  (MAKE_KEYWORD)[MES_C_READER]: New define.
	  (mes_symbols): Define %c_reader.
	* src/reader.c (read_word_)[MES_C_READER]: Extend to full Scheme
	  reader.
	  (eat_whitespace)[MES_C_READER]: Likewise.
	  (read_block_comment, read_hash, read_word, read_character,
	  read_octal, read_hex, append_char, read_string)[MES_C_READER]:
	  Likewise.
	* make.scm (bin.gcc,bin.mescc): Define MES_C_READER=1.

2017-11-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mescc-tools support: char foo[BAR] = {'a', 'b', 'c'}.
	* stage0/x86.M1 (mov____%al,0x8(%ebp), mov____%al,0x32(%ebp),
	  mov____%ax,0x8(%ebp), mov____%ax,0x32(%ebp)): New define.
	* module/mes/as-i386.mes (i386:accu->local+n,i386:byte-accu->local+n,
	  i386:word-accu->local+n): New function.
	* module/language/c99/compiler.mes (accu->local+n): New function.
	  (initzer->data): Return char as single byte.
	  (decl->info): Support char foo[BAR] = {'a', 'b', 'c'}.
	* scaffold/tests/66-local-char-array.c: Test it.
	* make.scm (add-scaffold-test): Build it.

2017-11-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	mlibc: Mescc-tools support: chmod.
	* stage0/x86.M1 (SYS_chmod): New define.
	* lib/libc-gcc.c (chmod): New function.
	* lib/libc-mes.c (chmod): New function.

	mlibc: GNU Gcc support: setjmp, longjmp.
	* stage0/x86.M1 (jmp____*%ebx): New macro.
	  (mov____0x8(%ebp),%ebp): New macro.
	  (mov____0x8(%ebp),%esp): New macro.
	* include/setjmp.h (jmp_buf): Redefine as struct.
	* lib/libc-mes+tcc.c (longjmp, setjmp): Implement.
	* scaffold/tests/80-setjmp.c: Test it.
	* make.scm ("80-setjmp"): Build it.
	* .gitignore: Ignore *.tcc-guile.

2017-11-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	mlibc: GNU Gcc support: ferror.
	* lib/libc-mes+tcc.c (ferror): New function.
	* include/stdio.h (ferror): Declare it.

2017-11-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	bootstrap: Add bootstrap build scripts.
	* build.sh: New file.
	* check-mescc.sh: New file.
	* check.sh: New file.
	* install.sh: New File.

2017-11-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	remove obsolete Nyacc link.
	* guile/nyacc: Remove.

2017-11-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: mlib/include to include, move mlib to lib.
	* include: Move from mlib/include.
	* lib: Move from mlib.
	* BOOTSTRAP: Update.
	* HACKING: Update.
	* guile/guix/make.scm: Update.
	* make.scm: Update.
	* module/language/c99/compiler.mes: Update.

2017-11-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Resurrect running mes tests tests/*.test with Guile.
	* tests/tests/base.test-guile: New file to resurrect running Mes test with Guile.
	* tests/catch.test-guile: Symlink for same purpose.
	* tests/closure.test-guile: Likewise.
	* tests/cwv.test-guile: Likewise.
	* tests/display.test-guile: Likewise.
	* tests/fluids.test-guile: Likewise.
	* tests/guile.test-guile: Likewise.
	* tests/let-syntax.test-guile: Likewise.
	* tests/let.test-guile: Likewise.
	* tests/match.test-guile: Likewise.
	* tests/math.test-guile: Likewise.
	* tests/module.test-guile: Likewise.
	* tests/optargs.test-guile: Likewise.
	* tests/peg.test-guile: Likewise.
	* tests/pmatch.test-guile: Likewise.
	* tests/psyntax.test-guile: Likewise.
	* tests/quasiquote.test-guile: Likewise.
	* tests/read.test-guile: Likewise.
	* tests/record.test-guile: Likewise.
	* tests/scm.test-guile: Likewise.
	* tests/srfi-1.test-guile: Likewise.
	* tests/srfi-13.test-guile: Likewise.
	* tests/srfi-14.test-guile: Likewise.
	* tests/vector.test-guile: Likewise.
	* make.scm (add-guile-test): New function.  Use it to run running tests/*.test-guile.

2017-11-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: resurrect running MesCC: handle \t in strings.
	* module/mes/read-0.mes (reader:read-string): Handle \t.  Fixex M1 output.

	mes: Nyacc support: with-fluids.
	* module/mes/fluids.mes (with-fluids): New macro.
	* tests/fluids.test ("with-fluids"): Test it.

	mes: resurrect running MesCC: update info interface.
	* module/language/c99/info.mes (type?, global?, local?): New function.
	  (make-global): Remove name parameter.
	* module/nyacc/lang/c99/pprint.mes: New file.

2017-12-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Add last.
	* module/srfi/srfi-1.mes (last): New funcion.

2017-11-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Add reverse-list->string.
	* module/srfi/srfi-13.mes (reverse-list->string): New function.

	bootstrap: Unbundle necessary M1 sources.
	* mlibc/crt1.M1: Remove.
	* mlibc/libc-mes.M1: Remove.
	* src/mes.M1: Remove.

2017-11-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	mlibc: Mescc-tools support: fix fgetc.
	* mlibc/libc-mes.c (fgetc): Fix from completely fubar.

	mlibc: Mescc-tools support: strtol: partly implement stub.
	* mlibc/libc-mes+tcc.c (strtol): Partly implement stub.

	mlibc: Mescc-tools support: getopt, getopt_long.
	* mlibc/getopt.c: Move to ANSI C.  Remove GETOPT_COMPAT and
	  non-POSIXLY_CORRECT options.
	* mlibc/include/getopt.h: New file.
	* mlibc/libc-gcc+tcc.c: Include getopt.c.
	* mlibc/libc-mes+tcc.c: Likewise.

	mlibc: Mescc-tools support: import getopt_long.
	* mlibc/getopt.c: Import from gcc-2.0.

	Revert "mescc: Grok char foo[] parameter."
	This reverts commit c4cc75105db48b550cd515751b766b2e7a88ddc3.

	mescc: Grok char foo[] parameter.
	* module/language/c99/compiler.mes (function->text+data): Grok char
	  foo[] parameter.

	mescc: Grok char *const foo[];
	* module/language/c99/compiler.mes (ast-strip-const): Grok char *const argv[];

	mlibc: Mescc-tools support: endianness.
	* mlibc/include/endian.h: New file.
	* mlibc/include/ctype.h[!(__GNUC__ && POSIX)]: Include it.
	* mlibc/include/stdlib.h: Likewise.
	* mlibc/include/sys/types.h: Likewise.

	mlibc: Mescc-tools support: exit stati.
	* mlibc/include/stdlib.h (EXIT_FAILURE, EXIT_SUCCESS): New define.

2017-11-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: cleanup obsolete Nyacc 0.7x compatibility.
	* module/language/c99/compiler.mes (ast-type->type, ast->type
	  expr->accu, struct-field, decl->info,): Remove obsolete Nyacc 0.7x
	  patterns.

	guix: Release update.
	* guix.scm (mes): Update commit, hash and version.  Add
	  'make-git-source-writable stage.

	Release 0.11.
	* configure (VERSION): Bump to 0.11.

2017-11-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Release udpate.
	* HACKING: Update.
	* INSTALL: Update.
	* NEWS: Update.
	* README: Update.
	* doc/ANNOUNCE-0.11: New file.

2017-11-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: fix for 07-include, thanks rain1!
	* make.scm (add-scaffold-test): New keyword parameter: includes.
	  ("07-include"): Use it.

	build: support gcc -m32, thanks rain1!
	* guile/guix/make.scm (%CC32): fallback to %CC.
	  (%C32-FLAGS): Add -m32, to suppor gcc -m32.
	  (LINK.gcc): Use it.

2017-11-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	bootstrap: Update necessary M1 sources.
	   M1 -f stage0/x86.M1 -f mlibc/crt1.M1 --LittleEndian --Architecture=1 > mlibc/crt1.hex2
	   M1 -f stage0/x86.M1 -f mlibc/mini-libc-mes.M1 --LittleEndian --Architecture=1  > mlibc/libc-mes.hex2
	   M1 -f stage0/x86.M1 -f src/mes.M1 --LittleEndian --Architecture=1 > src/mes.hex2
	   hex2 --LittleEndian --Architecture=1 --BaseAddress=0x1000000 -f stage0/elf32-header.hex2 -f mlibc/crt1.hex2 -f mlibc/libc-mes.hex2 -f src/mes.hex2 -f stage0/elf32-footer-single-main.hex2 > src/mes-mes
	   exec_enable src/mes-mes

	* mlibc/libc-mes.M1: Update.
	* src/mes.M1: Udate.

2017-11-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: test #include.
	* scaffold/tests/exit-42.i: New file.
	* scaffold/tests/07-include.c: New file.
	* make.scm ("07-include"): Build it.

2017-11-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: struct struct array.
	Support

	  struct foo
	  {
	    struct bar baz[N];
	    struct bar bla*[M];
	  };

	* module/language/c99/compiler.mes (expr->accu):
	* scaffold/tests/7n-struct-struct-array.c: Test it.
	* make.scm (add-scaffold-test): Build it.

2017-11-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	mlibc: Tinycc support: support, most syscalls stubbed.
	* mlibc/libc-gcc.c (exit, write)[__TINYC__]: tcc-compatible gcc-style
	  asm implementation.
	  (read,open,access,brk,fsync)[__TINYC__]: Stub body.
	* mlibc/libc-gcc+tcc.c (close,unlink, lseek, getcwd)[__TINYC__]: Stub
	  body.
	* mlibc/libc-mes+tcc.c: Support tinycc.
	* mlibc/include/00-test.i (main) [__TINYC__]: Support tcc.

	mescc: Tinycc support: empty for.
	* module/language/c99/compiler.mes (test-jump-label->info): Handle
	  empty expression.
	* make.scm (add-tcc-test "45_empty_for"): Test it.

	tinycc: scaffold/main.c: running mes-tcc compiled binary #6.
	* scaffold/main.c (main): Use variable, if, argc, ++, +=, function call to return 42.

2017-11-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	tinycc: scaffold/main.c: running mes-tcc compiled binary #5.
	* scaffold/main.c (main): Use function call and variable to return 42.

2017-11-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	tinycc: scaffold/main.c: running mes-tcc compiled binary #4.
	* scaffold/main.c (main): Use variables to return 42.

	mescc: Tinycc support: workaround lack of long long support.
	* module/language/c99/compiler.mes (i386:type-alist): Use size=4 for
	  long long as a workaround.

2017-11-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: refactor expr->accu, expr->accu*, fixes nontrivial struct by value assign.
	* module/language/c99/compiler.mes: (pke): New function.
	  (expr->number): Rename from p-expr->number.  Update callers.
	  (decl->info, init-declr->pointer, struct-field): Several pointeryness fixes.
	  (expr->accu*, expr->accu): Remove special-casing for foo.bar,
	  foo->bar, foo[bar].  Fixes struct by value assign for non-trival
	  expressions.
	  (accu->ident, ident-address->accu, ident->accu):
	  (base->ident-address, ident->base): Remove.
	* scaffold/tests/7k-for-each-elem.c (test): Test it.
	* scaffold/tests/7c-dynarray.c (test): Test it.
	* scaffold/tests/7m-struct-char-array-assign.c: Test it.
	* make.scm (add-scaffold-test): Build it.

	mlibc: errno.h: declare errno without extern.
	* mlibc/include/errno.h: drop extern.  Fixes tcc compile.

	guix: nyacc: Update to 0.82.4.
	* guix.scm (nyacc): Update to 0.82.4.

2017-09-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: Release update.
	* guix.scm (mes): Update commit, hash and version.

	Release 0.10.
	* configure (VERSION): Bump to 0.10.

	doc: Release udpate.
	* HACKING: Update.
	* INSTALL: Update.
	* NEWS: Update.
	* doc/ANNOUNCE-0.10: New file.
	* BOOTSTRAP: New file.
	* make.scm: Install them.

2017-09-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	bootstrap: Include necessary M1 sources.
	   M1 -f stage0/x86.M1 -f mlibc/crt1.M1 --LittleEndian --Architecture=1 > mlibc/crt1.hex2
	   M1 -f stage0/x86.M1 -f mlibc/mini-libc-mes.M1 --LittleEndian --Architecture=1  > mlibc/libc-mes.hex2
	   M1 -f stage0/x86.M1 -f src/mes.M1 --LittleEndian --Architecture=1 > src/mes.hex2
	   hex2 --LittleEndian --Architecture=1 --BaseAddress=0x1000000 -f stage0/elf32-header.hex2 -f mlibc/crt1.hex2 -f mlibc/libc-mes.hex2 -f src/mes.hex2 -f stage0/elf32-footer-single-main.hex2 > src/mes-mes
	   exec_enable src/mes-mes

	* mlibc/crt1.M1: New File.
	* mlibc/libc-mes.M1: New File.
	* src/mes.M1: New File.

2017-09-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: Bump Nyacc to 0.82.0.
	* guix.scm (nyacc): Bump to 0.82.0.

	mescc: Support Nyacc-0.81.0.
	* module/language/c99/compiler.mes (ast->info): Handle asm-expr from
	  Nyacc 0.81.0.

2017-09-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	tinycc: scaffold/main.c: running tcc-compiled binary #3.
	* scaffold/main.c (main): Remove asm.

2017-09-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: struct by value assign.
	* module/language/c99/compiler.mes (expr->accu): warn for unsupported
	  sizes.
	* scaffold/tests/7h-struct-assign.c (test): Test it.

2017-09-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	tinycc: scaffold/main.c: running tcc-compiled binary #2.
	* scaffold/main.c (main)[__i386__]: Rename from _start.

2017-09-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: compile crt1.c, libc-mesc.c and <input>.c separately.
	* mlibc/crt1.c: New file.
	* mlibc/libc-mes.c (_start): Remove.
	* mlibc/libc-gcc.c (_start): Remove.
	* make.scm (LINK.hex2, bin.mescc): Move from guile/guix/make.scm.
	* guile/guix/make.scm (LINK.hex2, bin.mescc): Remove.

2017-09-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: refactor _start.
	* mlibc/libc-mes.c (_start): Refactor.
	  (_env): Remove.
	* stage0/x86.M1:

2017-08-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	tinycc: scaffold/main.c: first running tcc-compiled binary.
	* scaffold/main.c (_start): Exit 42 using asm.

2017-08-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: fix *--p = 'x'.
	* module/language/c99/compiler.mes (expr->accu): Respect size in *--p = 'x'.
	* scaffold/tests/23-pointer.c (test): Test it.

	mescc: Tinycc support: initializer arithmetic.
	* module/language/c99/compiler.mes (p-expr->bool): New function
	  (p-expr->number): Support bitwise-and, bitwise-not, cast, cond-expr.

	core: Add logand, lognot.
	* src/math.c (logand, lognot): New function.

	mescc: Tinycc support: array of struct of any size.
	* module/language/c99/compiler.mes (accu*value): New function
	  (expr->accu*): Use it to support array of struct of any size.
	* scaffold/tests/7l-struct-any-size-array.c: Test it.
	* make.scm (add-scaffold-test): Build it.

	mescc: Tinycc support: stdint.h: declare size_t.
	* mlibc/include/stdint.h (size_t)[!__MES_SIZE_T]: Declare.

2017-08-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: pointer arithmetic with pointer-variable.
	* module/language/c99/compiler.mes (expr->accu): pointer arithmetic with pointer-variable.
	* scaffold/tests/76-pointer-arithmetic.c (test): Test it.
	* mlibc/include/stdarg.h (va_start): Update for fixed pointer arithmetic.

2017-08-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: pointer arithmetic with &variable.
	* module/language/c99/compiler.mes (expr->pointer): Handle ref.
	* scaffold/tests/76-pointer-arithmetic.c: Test it.

2017-08-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: pointer arithmetic with variable.
	* module/language/c99/compiler.mes (expr->accu): Support pointer
	  arithmetic with variable: p + i, p - i, p += i, p -= i.
	* scaffold/tests/76-pointer-arithmetic.c (test): Test it.

	mescc: Tinycc support: handle pointerness, siziness for cast foo*.
	* module/language/c99/compiler.mes (expr->pointer): Support cast foo*.
	  (expr->size): Likewise.
	* scaffold/tests/7k-for-each-elem.c: Test it
	* make.scm (add-scaffold-test): Build it.

2017-08-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: strtoull.
	* mlibc/include/mlibc.h (_atoi): Declare.
	* mlibc/include/ctype.h (isxdigit): Declare.
	* mlibc/libc-gcc.c (isxdigit, _atoi): New function.
	  (atoi): Use it.
	* mlibc/libc-mes.c (isxdigit, _atoi): New function.
	  (atoi): Use it.
	* scaffold/tests/7j-strtoull.c (test): Test it.
	* make.scm (add-scaffold-test): Build it.

2017-08-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: snprintf.
	* mlibc/include/stdarg.h (vsprintf): Declare.
	* mlibc/libc-gcc.c (vsprintf): New function.
	  (sprintf): Use it.
	* mlibc/libc-mes+tcc.c (snprintf): Implement.
	* mlibc/libc-mes.c (vsprintf): New function
	  (sprintf): Use it.

2017-08-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: struct.struct.
	* module/language/c99/compiler.mes (field:name):
	  (field:pointer):
	  (field:size):
	  (field:type):
	  (field-field):
	  (field-offset):
	  (struct-field): Support struct.struct.
	* scaffold/tests/7i-struct-struct.c: Test it.
	* make.scm (add-scaffold-test): Build it.

	mescc: Fix compile warnings.
	* mlibc/include/stdio.h (fdputs): Declare.
	* mlibc/libc-gcc.c (malloc):
	  (memcpy): Fix compile warning.

	mescc: Tinycc support: --*p, ++*p.
	* module/language/c99/compiler.mes (expr->accu): Remove specific --/++.
	  (expr->accu*): Support p, *p.
	* scaffold/tests/76-pointer-arithmetic.c (test): Test it.

2017-08-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: word array assignment.
	* stage0/x86.M1 (movzwl_(%eax),%eax): New define.
	* module/mes/as-i386.mes (i386:word-mem->accu): New function.
	* module/mes/as-i386.scm: Export it.
	* module/language/c99/compiler.mes (expr->accu): word array assignment.
	  (expr->accu*): word array assignment.
	* scaffold/tests/7a-struct-char-array.c (test): Test it.

2017-08-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: struct char array assignment.
	* module/language/c99/compiler.mes (expr->accu): struct char array assignment.
	* scaffold/tests/7a-struct-char-array.c (test): Test it.

2017-08-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: struct assign by value.
	* module/language/c99/compiler.mes (base->ident): Remove.
	  (accu->ident): Use them to support assign of size >4 by value.
	* scaffold/tests/7h-struct-assign.c: Test it.
	* make.scm (add-scaffold-test): Build it.
	* module/mes/as-i386.mes (i386:base->local): Remove.
	  (i386:accu*n->local):
	  (i386:accu*n->label): New functions.
	* module/mes/as-i386.scm: Export them.
	* stage0/x86.M1: (mov____%ebx,0x32):
	  (mov____%ebx,0x32(%ebp)):
	  (mov____%ebx,0x8(%ebp)):
	  (mov____%ebx,0x8(%edx)):
	  (mov____%ecx,0x32(%ebp)):
	  (mov____%ecx,0x8(%ebp)):
	  (mov____0x32(%eax),%ebx):
	  (mov____0x32(%eax),%ecx):
	  (mov____0x8(%eax),%ebx): New define.

	mescc: Tinycc support: eputc.
	* mlibc/include/stdio.h (eputc): Declare.
	* mlibc/libc-gcc.c (eputc):
	* mlibc/libc-mes.c (eputc): New function.

	mescc: Move simple main to scaffold.
	* scaffold/main.c (main): Move from doc/examples/main.c
	* make.scm: Build it.
	* README: Update.
	* guile/mescc.scm (main):
	* scripts/mescc.mes (main): Remove fallback doc/examples/main.c

	mescc: Tinycc support: byte and word struct fields.
	* stage0/x86.M1 (mov____%al,0x8(%edx)):
	  (mov____%ax,(%edx)):
	  (mov____%ax,0x32(%edx)):
	  (mov____%ax,0x8(%edx)):
	  (movzbl_0x32(%eax),%eax):
	  (movzbl_0x8(%eax),%eax):
	  (movzwl_0x32(%eax),%eax):
	  (movzwl_0x8(%eax),%eax): New define.
	* module/mes/as-i386.mes (i386:word-accu->base-mem):
	  (i386:byte-accu->base-mem+n):
	  (i386:word-accu->base-mem+n):
	  (i386:byte-mem+n->accu):
	  (i386:word-mem+n->accu): New function.
	* module/mes/as-i386.scm: Export them.
	* module/language/c99/compiler.mes (struct-field): Use actual size for
	  simple types (WAS: 4).
	  (decl->info):
	  (expr->accu): Respect byte and word struct field sizes.
	* scaffold/tests/7g-struct-byte-word-field.c: Test it.
	* make.scm (add-scaffold-test): Build it.

	mescc: Tinycc support: eputs as function for gcc.
	* mlibc/libc-gcc.c (eputs)[POSIX]: New function.
	* mlibc/include/stdio.h (eputs)[POSIX]: Remove define.

2017-08-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: fixes for foo.bar[baz].
	* module/language/c99/compiler.mes (expr->accu, expr->accu*): fixes for foo.bar[baz].
	* scaffold/tests/7c-dynarray.c: Test it.

	mescc: Tinycc support: fixes for foo->bar[baz].
	* module/language/c99/compiler.mes (expr->accu, expr->accu*): fixes
	  for foo->bar[baz].
	  (expr->pointer): Support i-sel.
	  (p-expr->type): Support add, sub, de-ref, ref-to.
	* scaffold/tests/7f-struct-pointer-arithmetic.c: Test it.
	* make.scm (add-scaffold-test): Build it.

	mescc: Tinycc support: foo.bar[baz], foo->bar[baz] for typedef'd struct bar.
	* module/language/c99/compiler.mes (expr->accu): foo.bar[baz],
	  foo->bar[baz] for typedef'd struct bar.
	* scaffold/tests/7c-dynarray.c: Test it.

2017-08-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: foo[index]->bar for array bar.
	* module/language/c99/compiler.mes (expr->accu*): foo[index]->bar for array bar.
	* scaffold/tests/7e-struct-array-access.c: Test it.
	* make.scm (add-scaffold-test): Build it.

2017-08-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "mescc: Tinycc support: workaround for nyacc "\0" bug."
	This reverts commit b160540e221dbeb96908823b5a3504bdbfd7f751.

	Fixed by: https://lists.gnu.org/archive/html/guile-user/2017-08/msg00007.html

2017-08-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: use nyacc 0.80.41.
	* guix.scm (nyacc): use 0.80.41.

	mescc: Tinycc support: ((unsigned char*)str)[i].
	* module/language/c99/compiler.mes (expr->accu*): Consider size of
	  expr array deref.
	* scaffold/tests/7d-cast-char.c: Test it.

	mescc: Tinycc support: ((unsigned char*)str)[0].
	* module/language/c99/compiler.mes (expr->accu): Consider size of
	  expr array deref.
	* stage0/x86.M1 (movzbl_0x32(%ebp),%eax): New define.
	* scaffold/tests/7d-cast-char.c: Test it.

	mescc: Tinycc support: define __linux__.
	* module/language/c99/compiler.mes (c99-input->full-ast): Add
	  "__linux__=1" to cpp-defs.

2017-08-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: strcat.
	* mlibc/libc-mes+tcc.c (strcat): Implement.

	mescc: Tinycc support: vsnprintf.
	* module/language/c99/compiler.mes (ast-type->type): Support *p++ in test.
	* mlibc/libc-mes+tcc.c (vsnprintf): Implement.

	mescc: Tinycc support: support foo.bar[baz], foo->bar[baz] for struct bar.
	* module/language/c99/compiler.mes (struct-field): Use negative
	  pointer for struct array fields.
	  (expr->accu): support: support foo.bar[baz], foo->bar[baz] for struct bar.
	* scaffold/tests/7c-dynarray.c: Test it.

	mescc: drop naive realloc.
	* mlibc/libc-gcc.c (free, memcpy): Move from libc-mes+tcc.c.
	  (realloc): Use realloc from libc-mes+tcc.c
	* mlibc/libc-gcc+tcc.c (free, memcpy, realloc): Remove.
	* mlibc/libc-mes+tcc.c (free, memcpy, realloc): Remove.
	* scaffold/tests/79-int-array.c (test): Update.
	* scaffold/tests/7a-struct-char-array.c (test): Update.

2017-07-31  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: ((foo*) p) + n.
	* module/language/c99/compiler.mes init-declr->pointer, expr->pointer,
	  expr->size): support: ((foo*) p) + n.
	  (expr->accu*): Consider field size for foo.bar[baz].
	* scaffold/tests/7b-struct-int-array.c: Test it.
	* make.scm (add-scaffold-test): Build it.

2017-07-30  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: field size of foo.bar[baz], foo->bar[baz].
	Inspired by a patch from rain1 for foo->bar[baz].

	* module/language/c99/compiler.mes (expr->accu):
	  (expr->accu*): Consider field size for foo.bar[baz].
	* scaffold/tests/7a-struct-char-array.c: Test it.
	* make.scm (add-scaffold-test): Build it.

2017-07-30  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: fwrite.
	* mlibc/libc-mes+tcc.c (fwrite): Implement.

	mescc: Tinycc support: fclose.
	* mlibc/libc-mes+tcc.c (fclose): Implement.

2017-07-30  rain1  <rain1@openmailbox.org>

	mescc: Tinycc support: fgetc.
	* mlibc/libc-mes.c (fgetc): Implement.

	mescc: Tinycc support: fprintf.
	* mlibc/libc-mes+tcc.c (fprintf): Implement.

	mescc: allow complicated enums expressions.
	* module/language/c99/compiler.mes (p-expr->number): Support lshift, rshift, ash.
	  (enum-def-list->constants): Refactor using p-expr->number.

	mescc: support \x00 strings in M1.
	* module/mes/M1.mes (object->m1): Support \x00 strings.

2017-07-30  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: memmove.
	* mlibc/libc-mes+tcc.c (memmove): Implement.

	mescc: Tinycc support: strrchr.
	* mlibc/libc-mes+tcc.c (strrchr): Implement.

	mescc: Tinycc support: strchr.
	* mlibc/libc-mes+tcc.c (strchr): Implement.

2017-07-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: noisy stubs.
	* mlibc/libc-mes+tcc.c: Noisy stubs.

2017-07-30  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: int foo[bar] = {baz,...}.
	* scaffold/tests/79-int-array.c: Test it.
	* make.scm (add-scaffold-test): Build it.
	* module/language/c99/compiler.mes (init-declr->count): New function.
	  (decl->info): Support int foo[bar] = {baz,...}.

2017-07-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: union.struct.
	* module/language/c99/compiler.mes (decl->info): Support struct inside union.
	* scaffold/tests/78-union-struct.c: Test it.
	* make.scm (add-scaffold-test): Build it.

	mescc: Tinycc support: fix accu value after comparison.
	* stage0/x86.M1 (setg___%al,, setge__%al, setl___%al, setle__%al): New
	  defines.
	* module/mes/as-i386.mes (i386:g?->accu, i386:ge?->accu,
	  i386:l?->accu, i386:le?->accu, i386:jumpl, i386:jumple): New functions.
	* module/mes/as-i386.scm: Export them.
	* module/language/c99/compiler.mes (expr->accu): Use them to fix accu
	  value after comparisons.
	  (test-jump-label->info): Update comparison jumps.

	mescc: Tinycc support: memcmp.
	* mlibc/libc-mes+tcc.c (memcmp): Implement.

	mescc: Tinycc support: bugfix *++foo,*--foo.
	* module/language/c99/compiler.mes (c99-input->full-ast): Pre-define NULL.
	  (expr->pointer, expr->size): Handle pre/post-inc/dec.

	mescc: Tinycc support: uniquify strings per compilation unit.
	* module/mes/M1.mes (object->M1): Add file-name to string id.

2017-07-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: foo.bar = foo.baz = bla.
	* module/language/c99/compiler.mes (expr->base*): New function.
	 (expr->accu): Use it to have value in accu for assignments.
	* scaffold/tests/77-pointer-assign.c (test): Test it.
	* stage0/x86.M1 (mov____%ecx,(%edx), mov___(%eax),%ecx): New define.
	* module/mes/as-i386.mes (accu-mem->base->mem): New function.
	  (i386:byte-base->accu-mem+n):
	  (i386:byte-base->accu-mem):
	  (i386:base-mem->accu-mem):
	  (i386:base->accu-mem):
	  (i386:value->accu-mem+n):
	  (i386:value->accu-mem):
	  (i386:accu->base-mem+n):
	  (i386:byte-accu->base-mem):
	  (i386:accu->base-mem): Rename from accu-address, base-address.
	  Update callers.
	* module/mes/as-i386.scm (mes): Update exports.

	mescc: Tinycc support: workaround for nyacc "\0" bug.
	* module/language/c99/compiler.mes (fix-null): Replace "\nul" with "\0".
	  (initzer->data): Use it.
	  (expr->global): Use it.

	mescc: Tinycc support: bugfix foo % bar.
	* stage0/x86.M1 (mov____%edx,%ebx): Typo
	  (idiv___%ebx): Replace div____%ebx.
	* module/mes/as-i386.mes (i386:accu/base): Update.
	  (i386:accu%base): Update.

2017-07-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: fix foo[bar]->baz.
	* module/language/c99/compiler.mes (expr->accu*): Lose one indirection.
	* scaffold/tests/72-typedef-struct-def.c: Test it.

2017-07-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: foo *bar[baz].
	* module/language/c99/compiler.mes (decl->info): Support foo *bar[baz].
	* module/language/c99/compiler.mes (push-global): Support push of -2,
	  -1.  Change signature to take info.  Update callers.
	  (push-global-address): Change signature to take info.  Update callers.

	mescc: Tinycc support: bugfix foo[bar] = baz, with foo*[].
	* module/language/c99/compiler.mes (expr->accu): Support size for more expressions.
	  (expr->pointer):
	  (expr->size): Support more expressions.
	* scaffold/tests/77-pointer-assign.c (add0): Test it.

	mescc: Tinycc support: bugfix *foo = bar.
	* module/language/c99/compiler.mes (base->ident-address): Typo, fixes (non-char*)*x = y.
	* scaffold/tests/77-pointer-assign.c (test): Test it.

	mescc: Tinycc support: bugfix *(cast)foo = bar.
	* module/language/c99/compiler.mes (expr->accu): Thinko for de-ref assign.
	* stage0/x86.M1: Fix typos.
	* module/mes/as-i386.mes: Update for typos.
	* scaffold/tests/77-pointer-assign.c: Test it.
	* make.scm (add-scaffold-test): Build it.

	mescc: Tinycc support: pointer arithmetic.
	* module/language/c99/compiler.mes (ident->size, expr->size): New function.
	  (expr->accu): Use them for ++,--,add, sub.
	  (i386:type-alist): Set void size to 1.
	* scaffold/tests/71-struct-array.c (test):
	* scaffold/tests/76-pointer-arithmetic.c: Test it.
	* make.scm (add-scaffold-test): Build it.

	mescc: Tinycc support: compile tcc with TCC_IS_NATIVE.
	* mlibc/include/string.h (strcat): Declare.
	* mlibc/libc-mes+tcc.c (dlclose, dlopen, mprotect, sigaction,
	  sigemptyset, strcat, vfprintf): Move from libc-gcc+tcc.c.
	* mlibc/libc-gcc+tcc.c: Remove them.
	* module/language/c99/compiler.mes (c99-input->full-ast): Define __i386__=1.
	  (i386:type-alist): Parse `long long int', `unsigned short int',
	  `unsigned long long int'.
	  (struct-field): Support void**.
	  (init-declr->name):
	  (init-declr->pointer): Support function declaration.

2017-07-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mlibc: Tinycc support: gcc -nostdinc -nostdlib.
	* mlibc/libc-gcc+tcc.c: New file.
	* mlibc/include/dlfcn.h:
	* mlibc/include/errno.h:
	* mlibc/include/signal.h:
	* mlibc/include/sys/mman.h:
	* mlibc/include/sys/time.h:  Add tcc declarations.

	mescc: Tinycc support: malloc,memcpy.
	* mlibc/libc-mes.c (malloc): Rewrite.
	* mlibc/libc-mes+tcc.c (memcpy): Implement.

	build: support libc-mes+tcc.

	mescc: Tinycc support: memset.
	* mlibc/libc-mes+tcc.c (memset): Implement.

2017-08-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: bump default maximum for M1-strings to 80.
	* module/mes/M1.mes (object->M1): bump default maximum for M1-strings to 80.

2017-07-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Tinycc support: oops, use new realloc.
	* mlibc/libc-mes.c (realloc): Disable naive realloc for libc-mes+tcc.c.

	mescc: Bugfix: output M1-strings if possible.
	* module/mes/M1.mes (object->M1): Typo.  Also disallow \return in M1-strings.

	guix: Release update.
	* guix.scm (mes): Update commit, hash and version.

	Release 0.9.
	* configure (VERSION): Bump to 0.9.

	doc: Release udpate.
	* HACKING: Update.
	* INSTALL: Update.
	* NEWS: Update.
	* README: Update.
	* doc/ANNOUNCE-0.9: New file.
	* make.scm: Install it.
	* guix.scm (mescc-tools): Bump to 0.2.

	build: Install and installed-run fixes.
	* guile/mescc.scm (%datadir,%docdir,%moduledir,%version): Remove.
	* scripts/mescc.mes: Likewise.
	* module/language/c99/compiler.mes: Likewise.
	 (%prefix): Prefer environment setting.
	 (c99-input->full-ast): Remove unnecessary includes.
	 Remove unnecessary defines.
	* make.scm (%scm-files): Add mes/guile.scm.
	 (src/mes.gcc, src/mes.mlibc-gcc, src/mes.guile):  Update  MODULEDIR,
	 add -I src.
	* src/mes.c (load_env): Use temporary variable for MODULEDIR concatenation.
	  (bload_env): Likewise.

	mescc: Tinycc support: calloc,malloc,realloc.
	* mlibc/libc-mes+tcc.c (calloc,malloc,realloc): New function.

	mescc: Tinycc support: bugfix struct.array.
	* module/language/c99/compiler.mes (struct-field): Update pointer
	  info.
	  (field:name,field:pointer,field:size,field:type): Rely on pointer
	  info.
	  (field:pointer): New function.
	 (expr->accu): Use it.
	* scaffold/tests/71-struct-array.c (test): Test it.

	mescc: Tinycc support: bugfix struct pointer.
	* module/language/c99/compiler.mes (decl->info): Only set non-pointer struct to -1.
	* scaffold/tests/23-pointer.c (test): Test it.

	mescc: Tinycc support: more function stack space.
	* module/mes/as-i386.mes (function-locals): Increase local space from
	  64 (16 vars) to 2*1025 + 80 (20 vars).

	mescc: Tinycc support: bugfix for char **pp = *p.
	* module/language/c99/compiler.mes (ptr-declr->pointer): Grok ***.
	  (decl->info): Bugfix for char **pp = *p, cleanup.
	* mlibc/libc-mes.c (getenv): Update for bugfix.
	* scaffold/tests/23-pointer.c (test): Test it.

	mescc: Tinycc support: execvp stub.
	* mlibc/include/unistd.h (execvp): Declare.
	* mlibc/libc-mes+tcc.c (execvp): Add stub.

	mescc: Tinycc support: remove stub.
	* mlibc/include/stdio.h (remove): Declare.
	* mlibc/libc-mes+tcc.c (remove): Add stub.

	mescc: Tinycc support: fread stub.
	* mlibc/include/stdio.h (fread): Declare.
	* mlibc/libc-mes+tcc.c (fread): Add stub.

	mescc: Tinycc support: ftell stub.
	* mlibc/include/stdio.h (ftell): Declare.
	* mlibc/libc-mes+tcc.c (ftell): Add stub.

	mescc: Tinycc support: fseek stub.
	* mlibc/include/stdio.h (fseek): Declare.
	* mlibc/libc-mes+tcc.c (fseek): Add stub.

	mescc: Tinycc support: fopen stub.
	* mlibc/include/stdio.h (fopen): Declare.
	* mlibc/libc-mes+tcc.c (fopen): Add stub.

	mescc: Tinycc support: strstr stub.
	* mlibc/include/string.h (strstr): Declare.
	* mlibc/libc-mes+tcc.c (strstr): Add stub.

	mescc: Tinycc support: sscanf stub.
	* mlibc/include/stdio.h (sscanf): Declare.
	* mlibc/libc-mes+tcc.c (sscanf): Add stub.

	mescc: Tinycc support: longjmp, setjump stub.
	* mlibc/include/stdarg.h (longjmp, setjmp): Declare.
	* mlibc/libc-mes+tcc.c (longjmp, setjmp): Add stub.

	mescc: Tinycc support: function parameters.
	* module/language/c99/compiler.mes (.name): Handle function parameters.

	mescc: Tinycc support: fflush stub.
	* mlibc/include/stdio.h (fflush): Declare.
	* mlibc/libc-mes+tcc.c (fflush): Add stub.

	mescc: Tinycc support: vnsprintf stub.
	* mlibc/include/stdarg.h (vnsprintf): Declare.
	* mlibc/libc-mes+tcc.c (vnsprintf): Add stub.

	mescc: Tinycc support: jump 32.
	* module/mes/as-i386.mes (i386:jump-byte-z): Use jne32 (was: jne8).

	mescc: Tinycc support: free stub.
	* mlibc/include/stdlib.h (free): Declare.
	* mlibc/libc-mes+tcc.c (free): Add stub.

	mescc: Tinycc support: strrchr stub.
	* mlibc/include/string.h (strrchr): Declare.
	* mlibc/libc-mes+tcc.c (strrchr): Add stub.

	mescc: Tinycc support: strtoll stub.
	* mlibc/include/stdlib.h (strtoll): Declare.
	* mlibc/libc-mes+tcc.c (strtoll): Add stub.

	mescc: Tinycc support: strtoull stub.
	* mlibc/include/stdlib.h (strtoull): Declare.
	* mlibc/libc-mes+tcc.c (strtoull): Add stub.

	mescc: Tinycc support: strtol stub.
	* mlibc/include/stdlib.h (strtol): Declare.
	* mlibc/libc-mes+tcc.c (strtol): Add stub.

	mescc: Tinycc support: lseek.
	* mlibc/include/unistd.h (lseek): Declare.
	* stage0/x86.M1 (SYS_lseek): New define.
	* mlibc/libc-mes+tcc.c (lseek): New function.

	mescc: Tinycc support: fclose stub.
	* mlibc/include/stdio.h (fclose): Declare.
	* mlibc/libc-mes+tcc.c (fclose): Add stub.

	mescc: Tinycc support: fdopen stub.
	* mlibc/include/stdio.h (fdopen): Declare.
	* mlibc/libc-mes+tcc.c (fdopen): Add stub.

	mescc: Tinycc support: unlink.
	* mlibc/include/unistd.h (unlink): Declare.
	* stage0/x86.M1 (SYS_unlink): New define.
	* mlibc/libc-mes+tcc.c (unlink): New function.

	mescc: Tinycc support: fwrite stub.
	* mlibc/include/stdio.h (fwrite): Declare.
	* mlibc/libc-mes+tcc.c (fwrite): Add stub.

	mescc: Tinycc support: qsort stub.
	* mlibc/include/stdlib.h (qsort): Declare.
	* mlibc/libc-mes+tcc.c (qsort): Add stub.

	mescc: Tinycc support: getcwd.
	* mlibc/include/unistd.h (getcwd): Declare.
	* stage0/x86.M1 (SYS_getcwd): New define.
	* mlibc/libc-mes+tcc.c (getcwd): New function.

	mescc: Tinycc support: strchr stub.
	* mlibc/include/string.h (strchr): Declare.
	* mlibc/libc-mes+tcc.c (strchr): Add stub.

	mescc: Tinycc support: fprintf stub.
	* mlibc/include/stdio.h (fprintf): Declare.
	* mlibc/libc-mes+tcc.c (fprintf): Add stub.

	mescc: Tinycc support: localtime stub.
	* mlibc/include/time.h (localtime): Declare.
	* mlibc/libc-mes+tcc.c (localtime): Add stub.

	mescc: Tinycc support: time stub.
	* mlibc/include/time.h (time): Declare.
	* mlibc/libc-mes+tcc.c (time): Add stub.

	mescc: Tinycc support: snprintf stub.
	* mlibc/include/stdio.h (snprintf): Declare.
	* mlibc/libc-mes+tcc.c (snprintf): Add stub.

	mescc: Tinycc support: strtoul stub.
	* mlibc/include/stdlib.h (strtoul): Declare.
	* mlibc/libc-mes+tcc.c (strtoul): Add stub.

	mescc: Tinycc support: memmove stub.
	* mlibc/include/string.h (memcmp): Declare.
	* mlibc/libc-mes+tcc.c (memcmp): Add stub.

	mescc: Tinycc support: memset stub.
	* mlibc/include/string.h (memset): Declare.
	* mlibc/libc-mes+tcc.c (memset): Add stub.

	mescc: Tinycc support: memmove stub.
	* mlibc/include/string.h (memmove): Declare.
	* mlibc/libc-mes+tcc.c (memmove): Add stub.

	mescc: Tinycc support: memcpy stub.
	* mlibc/include/string.h (memcpy): Declare.
	* mlibc/libc-mes+tcc.c (memcpy): Add stub.

	mescc: Tinycc support: close.
	* stage0/x86.M1 (SYS_close): New define.
	* mlibc/include/unistd.h (close): Declare.
	* mlibc/libc-mes+tcc.c: New file.
	* make.scm: Build and install it.

	mescc: Tinycc support: arithmetic in initializes.
	* module/language/c99/compiler.mes (p-expr->number): Handle
	  bitwise-or, constants.
	  (initzer-data): Refactor, use p-expr->number.

	mescc: Tinycc support: multi-byte [local] offsets.
	* stage0/x86.M1: Add 32bit variants for all 8bit instructions.
	* module/mes/as-i386.mes: Use them, switch on size.

	mescc: Naming fix.
	* stage0/x86.M1 (je8): Rename from jne8.
	* module/mes/as-i386.mes (i386:jump-byte-z): Update.

	mescc: Tinycc support: remove warnings for foo (void), foo (...).
	* module/language/c99/compiler.mes (.name, .type): Expect foo (void), foo (...).

	mescc: Tinycc support: multiple statements in default case.
	* module/language/c99/compiler.mes (clause->info): Support multiple
	  statements in default case.

	mescc: Tinycc support: array[<const-expr>].
	* module/language/c99/compiler.mes (p-expr->number): New function.
	  (struct-field, decl->info): Use it to support const expressions in array size.

	mescc: Use "tag" for tag namespace.
	* module/language/c99/compiler.mes: Use "tag" for tag namespace (WAS: "struct").
	  Move enums to "tag" namespace.

	mescc: Guile eval.c support: headers.
	* mlibc/include/signal.h (sigset_t): New type.
	* mlibc/include/float.h: New file.
	* mlibc/include/stddef.h: New file.
	* mlibc/include/sys/select.h: New file.

	mescc: Non-Guix support.  Thanks rain1!
	* mlibc/include: Neutralize include guards before #include_next.
	  Fixes compiling tinycc on Debian GNU/Linux.

	mescc: Tinycc support: sizeof (struct.field).
	* module/language/c99/compiler.mes (expr->accu): Support sizeof (struct.field).

	mescc: Tinycc support: struct.union.
	* module/language/c99/compiler.mes (struct-field): Add struct tag to
	  struct/union types.
	  (field-type, field-size, field-offset, field-field, ast-type->type):
	  Ascertain struct tag with type.
	* (expr->accu*): Do not add struct tag.
	* scaffold/tests/75-struct-union.c: Test it.
	* scaffold/tests/71-struct-array.c: Update.

	mescc: Tinycc support: sizeof ("foo").
	* module/language/c99/compiler.mes (expr->accu): Support sizeof (string).

	mescc: Tinycc support: struct foo {int bar; int baz} = {0}.
	* module/language/c99/compiler.mes (decl->info): struct foo {int bar; int baz} = {0}.
	* scaffold/tests/72-typedef-struct-def.c (test):

	mescc: Tinycc support: generalize neg.
	* module/language/c99/compiler.mes (expr->accu): Generalize neg.

	mescc: Tinycc support: >>=, <<=.
	* module/language/c99/compiler.mes (expr->accu): Support >>= <<=.

	mescc: Bugfix non-char* *x x[] test.
	* module/language/c99/compiler.mes (expr->pointer): New function.
	  (test-jump-label->info): Use it to fix non char* while (*x | x[i]).

	mescc: Tinycc support: foo[i].bar.baz.
	* module/language/c99/compiler.mes (init-declr->pointer): Use -1 for array.
	 (expr->accu): Implement foo[i].bar.baz.
	* scaffold/tests/72-typedef-struct-def.c (test): Test it.

	mescc: Tinycc support: *global =.
	* module/language/c99/compiler.mes (base->ident-address):
	  Support *global = ...
	* scaffold/tests/74-multi-line-string.c: Test it.

	mescc: Tinycc support: anonymous union.
	* module/language/c99/compiler.mes (field:name): New function.
	  (decl->info): Use it.
	  (struct-field): Support anonymous union.
	  (field:size): Update.
	  (field-field): Update.
	  (field-offset): Update.

	mescc: Tinycc support: declare struct tm.
	* mlibc/include/time.h (struct tm): New type.

	mescc: Tinycc support: ignore [ULL], UL, LL, L.
	* module/language/c99/compiler.mes (cstring->number): Drop suffix.

	mescc: Tinycc support: ~, ^=.
	* module/mes/as-i386.mes (i386:accu-not): New function.
	  (i386:accu-negate): Rename from i386:accu-not.
	* module/mes/as-i386.scm (mes): Export them.
	* module/language/c99/compiler.mes (expr->accu): Support ~, ^=.
	* scaffold/tests/60-math.c (test): Test it.
	* stage0/x86.M1 (not____%eax): New define.

	mescc: Tinycc support: struct.struct.
	* module/language/c99/compiler.mes (expr->accu): Support &*,
	  bar.foo.i, p->foo.i, p->pf->i (*pp)->foo.i, [slightly modified] offsetof.
	* scaffold/tests/72-typedef-struct-def.c (test): Test them.

	mescc: Tinycc support: ***parameter.
	* module/language/c99/compiler.mes (.name): Support ***parameter.

	mescc: Tinycc support: bitwise-or initializer.
	* module/language/c99/compiler.mes (initzer->value): New function.
	  (initzer->data): Use it to support bitwise-or initializer.
	* scaffold/tests/74-multi-line-string.c (test): Test it.

	mescc: Tinycc support: char*[] in function.
	* module/language/c99/compiler.mes (c99-input->full-ast): Add NULL.
	  (decl->info): Support char* [] in function scope.
	* scaffold/tests/71-struct-array.c (test) Test it.

	mescc: Tinycc support: more list initializers.
	* module/language/c99/compiler.mes (init-declr->name): Handle array,
	  pointer array.
	  (init-declr->pointer): Likewise.
	  (decl->info): Generalize list initializers, add pointer variant.
	  FIXME: AST-rewriting?

	mescc: Tinycc support: headers.
	* mlibc/include/string.h (ssize_t): New type.
	* mlibc/include/unistd.h (ssize_t): New type.

	mescc: Tinycc support: sizeof struct field.
	* module/language/c99/compiler.mes (expr->accu): Sizeof struct field.
	* scaffold/tests/72-typedef-struct-def.c (test): Test it.

	mescc: Tinycc support: sizeof typename.
	* module/language/c99/compiler.mes (expr->accu): Sizeof typename.

	mescc: Tinycc support: pre/post-inc/dec more.
	* module/language/c99/compiler.mes (expr-add): New function.
	  (expr->pointer): New function.
	  (expr->accu): Use it to support broader pre/post-inc/dec..
	* scaffold/tests/72-typedef-struct-def.c (test): Test it.

	mescc: Tinycc support: comma operator.
	* module/language/c99/compiler.mes (expr->accu): Handle comma operator.
	* scaffold/tests/74-multi-line-string.c (test): Test it.

	mescc: Tinycc support: assign pointer to struct field.
	* module/language/c99/compiler.mes (expr->accu, expr->accu*): Support
	  pointer field selection.
	* scaffold/tests/72-typedef-struct-def.c (test): Test it.

	mescc: Tinycc support: multi-line strings.
	* module/language/c99/compiler.mes (initzer->data, expr->global):
	  Handle multi-line strings.
	* scaffold/tests/74-multi-line-string.c: New file.
	* make.scm (add-scaffold-test): Build it.

	mescc: Tinycc support: union.
	* scaffold/tests/73-union.c: New file.
	* module/language/c99/compiler.mes (union->type-entry): New
	  function.
	  (decl->info): Support unions.

	mescc: Tinycc support: struct.
	* scaffold/tests/72-typedef-struct-def.c: New file.
	* module/language/c99/compiler.mes (decl->info): Struct support for tinycc.

	mescc: Refactor decl.
	* module/mes/as-i386.mes (i386:mem->base, i386:nop): New functions.
	* module/mes/as-i386.scm: Export them.
	* module/language/c99/compiler.mes:
	* stage0/x86.M1 (nop,mov____(%edx),%edx,movzbl_(%edx),%edx): New defines.
	* scaffold/tests/23-pointer.c: New file.
	* scaffold/tests/t.c: New file.
	* make.scm: Build them.
	* module/language/c99/compiler.mes (init-declr->name): Handle array.
	  (init-declr->pointer): Likewise.
	  (ident->accu): Simplify.
	  (ident->base): Simplify.
	  (ident-address->base): Typo.
	  (expr->accu): Simplify.
	  (decl->info): Simplify.
	* mlibc/libc-mes.c (getenv): Remove superfluous statement.

	mescc: Use records for Guile: <local>.
	* module/language/c99/info.scm (<local>): New record.
	* module/language/c99/compiler.mes (make-local-entry): Rename from
	  make-local.  Update callers.
	  (local-var?): Rename from local?. Update callers.
	* module/language/c99/info.mes (make-local, local:type, local:pointer,
	  local:id): Move from compiler.mes.

	mescc: Use records for Guile: <global>.
	* module/language/c99/info.scm (<global>): New record.
	* module/language/c99/compiler.mes (make-global-entry): Rename from
	  make-global.  Update callers.
	* module/language/c99/info.mes (make-global, global:type,
	  global:pointer, global:value): Move from compiler.mes.

	mescc: Use records for Guile: <type>.
	* module/language/c99/info.scm (<type>): New record.
	* module/language/c99/compiler.mes (make-type-entry): Rename from
	  make-type.  Update-callers.
	* module/language/c99/info.mes (make-type, type:type, type:size,
	  type:pointer, type:description): Move from compiler.mes.

	mescc: Use records for Guile: <info>.
	* module/language/c99/info.scm (<info>): Make immutable record.
	  Update users.

	mescc: Use records for Guile: preparation.
	* module/language/c99/info.mes: New file.
	* module/mes/M1.mes: Use it.
	* scripts/mescc.mes: Use it.
	* module/language/c99/compiler.mes: Use it.  (<info>, <types>,
	  <constants>, <functions>, <globals>, <locals>, <function>, <text>,
	  <break>, <continue>, make, info?, .info, .types, .constants,
	  .functions, .globals, .locals, .function, .text, .break, .continue):
	  Remove.
	* module/language/c99/info.scm: New file.
	* module/language/c99/compiler.scm: Use it.
	* guile/mescc.scm: Use it.
	* module/mes/M1.scm: Use it.

	mescc: Refactor decl.
	* module/language/c99/compiler.mes (decl->info, ptr-declr->pointer):
	  New function.
	  (ast->info): Use decl->info.

	guix: Update build.
	* guix.scm (mes): Do not strip.  Fixes mes binary.

	build: support Guix.
	* guile/guix/make.scm (link-or-cp): New function.
	  (assert-link, store): Use it.

	build: Add make install.
	* guile/guix/make.scm (method-cp, install, install-target?): New functions.
	* make.scm: Use them.

	build: Add target list.
	* GNUmakefile (%): Handle all targets.
	* make.scm (main): Show and implement target list.

	build: Ignore some files.
	.gitignore: Update for make.scm.

	build: Bugfix for store.
	* guile/guix/make.scm (store): Add each store file only once.

	build: Resurrect guile-2.0.  Thanks rain1!
	* module/mes/guile.scm: New file.
	* module/mes/elf.scm: Include it.
	* module/mes/bytevectors.scm: : Include it.
	* module/mes/as.scm: Include it.
	* module/mes/as-i386.scm: Include it.
	* module/mes/M1.scm: Include it.
	* module/language/c99/compiler.scm: Include it.
	* make.scm: Update.

2017-07-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Non-Guix build robustifications.  Thanks, rain1!
	Fix typo in configure, gracefully switch between M0 vs M1, skip
	CC32/i686-unknown-linux-gnu-gcc targets if not available, esp. for
	non-Guix usage.

	* configure (M1): Declare missing variable.
	* make.scm (main): all-go, clean-go: New targets.
	* GNUmakefile (PHONY_TARGETS): Add them.
	  (.config.make): New target.
	* guile/guix/make.scm (%CC32): Set to #f if not found.
	  (bin.gcc): Skip if CC not set.
	  (check-target?, add-target): Skip if target is not set.

2017-07-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Fix snarf dependencies.
	* guile/guix/make.scm (compile.gcc compile.mescc bin.mescc m1-asm):
	  Accept and forward dependencies.
	* make.scm (gcc-snarf-targets): Remove explicit defaults.

	build: Use released M0 intead of M1.

2017-07-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Import tinycc test suite.
	* make.scm (check-scaffold-tinycc): New target.
	* guile/guix/make.scm (<target>): Add baseline field.
	  (method-check): Handle baseline.
	* scaffold/tinycc/00_assignment.c: New file.
	* scaffold/tinycc/00_assignment.expect: New file.
	* scaffold/tinycc/01_comment.c: New file.
	* scaffold/tinycc/01_comment.expect: New file.
	* scaffold/tinycc/02_printf.c: New file.
	* scaffold/tinycc/02_printf.expect: New file.
	* scaffold/tinycc/03_struct.c: New file.
	* scaffold/tinycc/03_struct.expect: New file.
	* scaffold/tinycc/04_for.c: New file.
	* scaffold/tinycc/04_for.expect: New file.
	* scaffold/tinycc/05_array.c: New file.
	* scaffold/tinycc/05_array.expect: New file.
	* scaffold/tinycc/06_case.c: New file.
	* scaffold/tinycc/06_case.expect: New file.
	* scaffold/tinycc/07_function.c: New file.
	* scaffold/tinycc/07_function.expect: New file.
	* scaffold/tinycc/08_while.c: New file.
	* scaffold/tinycc/08_while.expect: New file.
	* scaffold/tinycc/09_do_while.c: New file.
	* scaffold/tinycc/09_do_while.expect: New file.
	* scaffold/tinycc/10_pointer.c: New file.
	* scaffold/tinycc/10_pointer.expect: New file.
	* scaffold/tinycc/11_precedence.c: New file.
	* scaffold/tinycc/11_precedence.expect: New file.
	* scaffold/tinycc/12_hashdefine.c: New file.
	* scaffold/tinycc/12_hashdefine.expect: New file.
	* scaffold/tinycc/13_integer_literals.c: New file.
	* scaffold/tinycc/13_integer_literals.expect: New file.
	* scaffold/tinycc/14_if.c: New file.
	* scaffold/tinycc/14_if.expect: New file.
	* scaffold/tinycc/15_recursion.c: New file.
	* scaffold/tinycc/15_recursion.expect: New file.
	* scaffold/tinycc/16_nesting.c: New file.
	* scaffold/tinycc/16_nesting.expect: New file.
	* scaffold/tinycc/17_enum.c: New file.
	* scaffold/tinycc/17_enum.expect: New file.
	* scaffold/tinycc/18_include.h: New file.
	* scaffold/tinycc/18_include.c: New file.
	* scaffold/tinycc/18_include.expect: New file.
	* scaffold/tinycc/19_pointer_arithmetic.c: New file.
	* scaffold/tinycc/19_pointer_arithmetic.expect: New file.
	* scaffold/tinycc/20_pointer_comparison.c: New file.
	* scaffold/tinycc/20_pointer_comparison.expect: New file.
	* scaffold/tinycc/21_char_array.c: New file.
	* scaffold/tinycc/21_char_array.expect: New file.
	* scaffold/tinycc/22_floating_point.c: New file.
	* scaffold/tinycc/22_floating_point.expect: New file.
	* scaffold/tinycc/23_type_coercion.c: New file.
	* scaffold/tinycc/23_type_coercion.expect: New file.
	* scaffold/tinycc/24_math_library.c: New file.
	* scaffold/tinycc/24_math_library.expect: New file.
	* scaffold/tinycc/25_quicksort.c: New file.
	* scaffold/tinycc/25_quicksort.expect: New file.
	* scaffold/tinycc/26_character_constants.c: New file.
	* scaffold/tinycc/26_character_constants.expect: New file.
	* scaffold/tinycc/27_sizeof.c: New file.
	* scaffold/tinycc/27_sizeof.expect: New file.
	* scaffold/tinycc/28_strings.c: New file.
	* scaffold/tinycc/28_strings.expect: New file.
	* scaffold/tinycc/29_array_address.c: New file.
	* scaffold/tinycc/29_array_address.expect: New file.
	* scaffold/tinycc/30_hanoi.c: New file.
	* scaffold/tinycc/30_hanoi.expect: New file.
	* scaffold/tinycc/31_args.c: New file.
	* scaffold/tinycc/31_args.expect: New file.
	* scaffold/tinycc/32_led.c: New file.
	* scaffold/tinycc/32_led.expect: New file.
	* scaffold/tinycc/33_ternary_op.c: New file.
	* scaffold/tinycc/33_ternary_op.expect: New file.
	* scaffold/tinycc/34_array_assignment.c: New file.
	* scaffold/tinycc/34_array_assignment.expect: New file.
	* scaffold/tinycc/35_sizeof.c: New file.
	* scaffold/tinycc/35_sizeof.expect: New file.
	* scaffold/tinycc/36_array_initialisers.c: New file.
	* scaffold/tinycc/36_array_initialisers.expect: New file.
	* scaffold/tinycc/37_sprintf.c: New file.
	* scaffold/tinycc/37_sprintf.expect: New file.
	* scaffold/tinycc/38_multiple_array_index.c: New file.
	* scaffold/tinycc/38_multiple_array_index.expect: New file.
	* scaffold/tinycc/39_typedef.c: New file.
	* scaffold/tinycc/39_typedef.expect: New file.
	* scaffold/tinycc/40_stdio.c: New file.
	* scaffold/tinycc/40_stdio.expect: New file.
	* scaffold/tinycc/41_hashif.c: New file.
	* scaffold/tinycc/41_hashif.expect: New file.
	* scaffold/tinycc/42_function_pointer.c: New file.
	* scaffold/tinycc/42_function_pointer.expect: New file.
	* scaffold/tinycc/43_void_param.c: New file.
	* scaffold/tinycc/43_void_param.expect: New file.
	* scaffold/tinycc/44_scoped_declarations.c: New file.
	* scaffold/tinycc/44_scoped_declarations.expect: New file.
	* scaffold/tinycc/45_empty_for.c: New file.
	* scaffold/tinycc/45_empty_for.expect: New file.
	* scaffold/tinycc/46_grep.c: New file.
	* scaffold/tinycc/46_grep.expect: New file.
	* scaffold/tinycc/47_switch_return.c: New file.
	* scaffold/tinycc/47_switch_return.expect: New file.
	* scaffold/tinycc/48_nested_break.c: New file.
	* scaffold/tinycc/48_nested_break.expect: New file.
	* scaffold/tinycc/49_bracket_evaluation.c: New file.
	* scaffold/tinycc/49_bracket_evaluation.expect: New file.
	* scaffold/tinycc/50_logical_second_arg.c: New file.
	* scaffold/tinycc/50_logical_second_arg.expect: New file.
	* scaffold/tinycc/51_static.c: New file.
	* scaffold/tinycc/51_static.expect: New file.
	* scaffold/tinycc/52_unnamed_enum.c: New file.
	* scaffold/tinycc/52_unnamed_enum.expect: New file.
	* scaffold/tinycc/54_goto.c: New file.
	* scaffold/tinycc/54_goto.expect: New file.
	* scaffold/tinycc/55_lshift_type.c: New file.
	* scaffold/tinycc/55_lshift_type.expect: New file.
	* scaffold/tinycc/56_btype_excess-1.c: New file.
	* scaffold/tinycc/56_btype_excess-1.expect: New file.
	* scaffold/tinycc/57_btype_excess-2.c: New file.
	* scaffold/tinycc/57_btype_excess-2.expect: New file.
	* scaffold/tinycc/58_function_redefinition.c: New file.
	* scaffold/tinycc/58_function_redefinition.expect: New file.
	* scaffold/tinycc/59_function_array.c: New file.
	* scaffold/tinycc/59_function_array.expect: New file.
	* scaffold/tinycc/60_enum_redefinition.c: New file.
	* scaffold/tinycc/60_enum_redefinition.expect: New file.
	* scaffold/tinycc/61_undefined_enum.c: New file.
	* scaffold/tinycc/61_undefined_enum.expect: New file.
	* scaffold/tinycc/62_enumerator_redefinition.c: New file.
	* scaffold/tinycc/62_enumerator_redefinition.expect: New file.
	* scaffold/tinycc/63_local_enumerator_redefinition.c: New file.
	* scaffold/tinycc/63_local_enumerator_redefinition.expect: New file.
	* scaffold/tinycc/64_macro_nesting.c: New file.
	* scaffold/tinycc/64_macro_nesting.expect: New file.
	* scaffold/tinycc/67_macro_concat.c: New file.
	* scaffold/tinycc/67_macro_concat.expect: New file.
	* scaffold/tinycc/70_floating_point_literals.c: New file.
	* scaffold/tinycc/70_floating_point_literals.expect: New file.
	* scaffold/tinycc/71_macro_empty_arg.c: New file.
	* scaffold/tinycc/71_macro_empty_arg.expect: New file.
	* scaffold/tinycc/72_long_long_constant.c: New file.
	* scaffold/tinycc/72_long_long_constant.expect: New file.
	* scaffold/tinycc/73_arm64.c: New file.
	* scaffold/tinycc/73_arm64.expect: New file.
	* scaffold/tinycc/74_nocode_wanted.c: New file.
	* scaffold/tinycc/74_nocode_wanted.expect: New file.
	* scaffold/tinycc/75_array_in_struct_init.c: New file.
	* scaffold/tinycc/75_array_in_struct_init.expect: New file.
	* scaffold/tinycc/76_dollars_in_identifiers.c: New file.
	* scaffold/tinycc/76_dollars_in_identifiers.expect: New file.
	* scaffold/tinycc/77_push_pop_macro.c: New file.
	* scaffold/tinycc/77_push_pop_macro.expect: New file.
	* scaffold/tinycc/78_vla_label.c: New file.
	* scaffold/tinycc/78_vla_label.expect: New file.
	* scaffold/tinycc/79_vla_continue.c: New file.
	* scaffold/tinycc/79_vla_continue.expect: New file.
	* scaffold/tinycc/80_flexarray.c: New file.
	* scaffold/tinycc/80_flexarray.expect: New file.
	* scaffold/tinycc/81_types.c: New file.
	* scaffold/tinycc/81_types.expect: New file.
	* scaffold/tinycc/82_attribs_position.c: New file.
	* scaffold/tinycc/82_attribs_position.expect: New file.
	* scaffold/tinycc/83_utf8_in_identifiers.c: New file.
	* scaffold/tinycc/83_utf8_in_identifiers.expect: New file.
	* scaffold/tinycc/84_hex-float.c: New file.
	* scaffold/tinycc/84_hex-float.expect: New file.
	* scaffold/tinycc/85_asm-outside-function.c: New file.
	* scaffold/tinycc/85_asm-outside-function.expect: New file.
	* scaffold/tinycc/86_memory-model.c: New file.
	* scaffold/tinycc/86_memory-model.expect: New file.
	* scaffold/tinycc/87_dead_code.c: New file.
	* scaffold/tinycc/87_dead_code.expect: New file.
	* scaffold/tinycc/88_codeopt.c: New file.
	* scaffold/tinycc/88_codeopt.expect: New file.
	* scaffold/tinycc/89_nocode_wanted.c: New file.
	* scaffold/tinycc/89_nocode_wanted.expect: New file.
	* scaffold/tinycc/90_struct-init.c: New file.
	* scaffold/tinycc/90_struct-init.expect: New file.
	* scaffold/tinycc/91_ptr_longlong_arith32.c: New file.
	* scaffold/tinycc/91_ptr_longlong_arith32.expect: New file.
	* scaffold/tinycc/92_enum_bitfield.c: New file.
	* scaffold/tinycc/92_enum_bitfield.expect: New file.
	* scaffold/tinycc/93_integer_promotion.c: New file.
	* scaffold/tinycc/93_integer_promotion.expect: New file.
	* scaffold/tinycc/COPYING: New file.
	* scaffold/tinycc/LICENSE: New file.

	include

2017-07-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Split-up Mescc scaffold test.
	* make.scm (check-scaffold, check-scaffold-tests): New targets.
	* mlibc/include/00-test.i: New file.
	* mlibc/include/30-test.i: New file.
	* mlibc/mini-libc-mes.c (puts): New function.
	* scaffold/tests/00-exit-0.c: : New file.
	* scaffold/tests/01-return-0.c: : New file.
	* scaffold/tests/02-return-1.c: : New file.
	* scaffold/tests/03-call.c: : New file.
	* scaffold/tests/04-call-0.c: : New file.
	* scaffold/tests/05-call-1.c: : New file.
	* scaffold/tests/06-call-!1.c: : New file.
	* scaffold/tests/10-if-0.c: : New file.
	* scaffold/tests/11-if-1.c: : New file.
	* scaffold/tests/12-if-==.c: : New file.
	* scaffold/tests/13-if-!=.c: : New file.
	* scaffold/tests/14-if-goto.c: : New file.
	* scaffold/tests/15-if-!f.c: : New file.
	* scaffold/tests/16-if-t.c: : New file.
	* scaffold/tests/20-while.c: : New file.
	* scaffold/tests/21-char[].c: : New file.
	* scaffold/tests/22-while-char[].c: : New file.
	* scaffold/tests/30-strlen.c: : New file.
	* scaffold/tests/31-eputs.c: : New file.
	* scaffold/tests/32-compare.c: : New file.
	* scaffold/tests/33-and-or.c: : New file.
	* scaffold/tests/34-pre-post.c: : New file.
	* scaffold/tests/35-compare-char.c: : New file.
	* scaffold/tests/36-compare-arithmetic.c: : New file.
	* scaffold/tests/37-compare-assign.c: : New file.
	* scaffold/tests/38-compare-call.c: : New file.
	* scaffold/tests/40-if-else.c: : New file.
	* scaffold/tests/41-?.c: : New file.
	* scaffold/tests/42-goto-label.c: : New file.
	* scaffold/tests/43-for-do-while.c: : New file.
	* scaffold/tests/44-switch.c: : New file.
	* scaffold/tests/45-void-call.c: : New file.
	* scaffold/tests/50-assert.c: : New file.
	* scaffold/tests/51-strcmp.c: : New file.
	* scaffold/tests/52-itoa.c: : New file.
	* scaffold/tests/53-strcpy.c: : New file.
	* scaffold/tests/54-argv.c: : New file.
	* scaffold/tests/60-math.c: : New file.
	* scaffold/tests/61-array.c: : New file.
	* scaffold/tests/63-struct-cell.c: : New file.
	* scaffold/tests/64-make-cell.c: : New file.
	* scaffold/tests/65-read.c: : New file.
	* scaffold/tests/66-struct-array.c: : New file.
	* scaffold/t.c: Remove.
	* scaffold/t-tcc.c: Remove.

	mescc: Avoid warnings in recursve functions.
	* module/language/c99/compiler.mes (expr->accu): Avoid warnings in recursve functions.

	mescc: undefine __GNUC__.
	* module/language/c99/compiler.mes (c99-input->full-ast): Remove
	  __GNUC__=0.  Should help compiling pcc, libguile/eval.c.

2017-07-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support stdarg.
	* mlibc/include/stdarg.h (va_list): New type.
	  (va_start, va_arg, va_end, va_copy): New macro.
	  (vprintf): New declaration.
	* mlibc/libc-mes.c (vprintf): New function.
	  (printf): Rewrite using vprintf.
	* module/language/c99/compiler.mes (expr->accu, expr->accu*): Handle
	  any array.  Limitation: element size must be 4/sizeof (expression).
	  (make-type): Add value pointer to type.
	  (type:type, type:size, type:pointer, type:description): New functions.
	  (ast->info): Handle typedef with pointer.

2017-07-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Remove make.
	* GNUmakefile: trivial convenience-frontend to ./make.scm
	* make/*.make: Remove.
	* */*.make: Remove.

2017-07-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Produce M1 output instead of hex2.
	Use: ./make.scm [TARGET]
	     ./make.scm check

	* stage0/x86.M1: New file.
	* mlibc/mini-libc-mes.c (exit, write): Use M1 instead of .byte.
	* mlibc/libc-mes.c (_start, exit, read, write, open, access, brk,
	  fsync, printf): Use M1 instead of .byte.
	* module/mes/as-i386.mes: Use M1.
	* module/mes/make.scm: New file.
	* make.scm: New file.
	* guile/guix/records.scm: New File.
	* guile/guix/shell-utils.scm: New file.
	* module/mes/M1.mes: Rename from hex2.mes.
	* module/mes/M1.scm: Rename from hex2.scm.
	* scripts/mescc.mes: Update callers.
	* guile/mescc.scm: Update callers.

2017-06-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Add headers for guile:eval.c.
	* mlibc/include/alloca.h: New file.
	* mlibc/include/stdint.h: New file.
	* mlibc/include/inttypes.h: Remove definitionss, include stdint.h.

	mescc: Add headers for 8cc.
	* mlibc/include/libgen.h: New file.
	* mlibc/include/locale.hh: New file.
	* mlibc/include/stdbool.h: New file.
	* mlibc/include/stdnoreturn.h: New file.
	* mlibc/include/time.h: Add time_t.

2017-06-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: Add missing module.
	* guix.scm: Use (guix download).  Fixes compilation with mescc-tools included.

2017-06-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix: Add mescc-tools.
	* guix.scm (mescc-tools): New variable.  Fixes using guix.scm.  Thanks paroneayea!

2017-06-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.8.
	* configure (VERSION): Bump.

	build: Release update.
	* configure (main): Make hex2 required.
	* guix.scm (mes): Add mescc-tools to propagated-inputs.  Update commit, hash.

2017-06-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Release update.
	* NEWS: Update.
	* INSTALL: Update.
	* HACKING: Update.
	* doc/ANNOUNCE-0.8: New file.

2017-06-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Remove ELF creation, handled by hex2 now.
	* module/language/c99/compiler.scm (make-global, global:type,
	  global:pointer, global:value): Move from elf-util.mes
	* module/mes/as.mes: New file.
	* module/mes/as-i386.mes: Use it.
	* module/mes/as-i386.scm: Use it.
	* module/mes/elf-util.mes: Remove.
	* module/mes/elf.mes (elf32-addr, elf32-half, elf32-off, elf32-word,
	  make-elf, write-any, object->elf): Remove
	  (hex2->elf): New function with dummy implementation.
	* module/mes/elf.scm: Update exports.
	* module/mes/hex2.mes (object->elf): New function.
	* module/mes/hex2.scm: Export it.

	mescc: Produce object files in hex2 format, remove hex3.
	* GNUmakefile (HEX2_FLAGS): New variable.
	* make/mescc-guile.make ($(OUT)/$(TARGET)): Use HEX2 for linking.
	* make/mescc-mes.make ($(OUT)/$(TARGET)): Likewise.
	* guile/mescc.scm (main): Remove hex3 support.
	* scripts/mescc.mes (main): Likewise.
	* stage0/elf32-0header.hex2: New file, merging of elf32.hex and elf32-header.hex2.
	* stage0/elf-0footer.hex2: New file.
	* stage0/elf32-header.hex2: Rename from elf32-header-exit-42.hex2,
	  repurpose as generic debug heder.
	* stage0/elf32-footer-single-main.hex2: Rename from elf32-footer-exit-42.hex2,
	  repurpose as generic debug footer for single-main source.
	* stage0/exit-42.c: New file.
	* stage0/stage0.make ($(OUT)/0exit-42): Test 0header, 0footer.
	  ($(OUT)/exit-42.guile): Test generic debug header, footer.
	* stage0/elf32.hex2: Remove.

2017-06-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Add stage0 hex2 test.
	* configure (HEX2): Check for hex2 from MESCC_tools.
	* INSTALL: Mention it.
	* GNUmakefile (SUBDIRS): Add stage0.
	* make/check-cc.make: New file.
	* make/check.make: Remove CC-not-empty guard.
	* scaffold/scaffold.make: Update CC check targets.

2017-06-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	stage0: Move to-be-generated part of body to footer.
	* stage0/elf32-footer-exit-42.hex2: Add ELF_str, ELF_sym from body.
	* stage0/elf32-body-exit-42.hex2: Remove ELF_str, ELF_sym.

2017-06-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	stage0: Leverage label>base in stage0 gdb header.
	* stage0/elf32-header-exit-42.hex2: Replace calculated addresses with label>base.
	* stage0/elf32-body-exit-42.hex2: Likewise.

	stage0: Move stage0's section-headers before text.
	* stage0/elf32-header-exit-42.hex2: Add section-headers.
	* stage0/elf32-body-exit-42.hex2: Update.
	* stage0/elf32-footer-exit-42.hex2: Remove section-headers.

2017-06-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	stage0: Add stage0 hex2 gdb header and footer example.
	* stage0/elf32-header-exit-42.hex2: New file.
	* stage0/elf32-footer-exit-42.hex2: New file.

2017-06-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Remove jump calculation, use labels: rename jumps.
	* module/mes/as-i386.mes (i386:jump, i386:jump-byte-z, i386:jump-g,
	  i386:jump-ge, i386:jump-nc, i386:jump-ncz, i386:jump-nz,
	  i386:jump-z): Rename from i386:jump-label*.
	* module/mes/as-i386.scm (mes): Update exports.
	* module/language/c99/compiler.mes (ast->info): Update callers.

	mescc: Remove jump calculation, use labels: remove offset-jumps.
	* module/mes/as-i386.mes (i386:XXjump, i386:Xjump, i386:Xjump-c,
	  i386:Xjump-cz, i386:Xjump-g, i386:Xjump-ge, i386:Xjump-l,
	  i386:Xjump-le, i386:Xjump-nc, i386:Xjump-ncz, i386:Xjump-ncz",
	  i386:Xjump-nz, i386:Xjump-z, i386:jump, i386:jump-byte-nz,
	  i386:jump-byte-z, i386:jump-c, i386:jump-cz, i386:jump-le,
	  i386:jump-nc, i386:jump-ncz, i386:jump-nz, i386:jump-z,
	  i386:test-jump-z): Remove.
	* module/mes/as-i386.scm: Remove export.

2017-06-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Remove jump calculation, use labels: cleanup.
	* module/language/c99/compiler.mes (test->jump->info): Remove.

2017-06-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Remove jump calculation, use labels: switch.
	* module/language/c99/compiler.mes (expr->accu): Refactor (switch ...).
	  (clause->info): Refactor.

2017-06-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Remove jump calculation, use labels: and, or.
	* module/language/c99/compiler.mes (expr->accu): Refactor (and
	  ...), (or ...).

	mescc: Remove jump calculation, use labels: if.
	* module/language/c99/compiler.mes (ast->info): Refactor (if ...)
	  using test-jump-label->info.

	mescc: Remove jump calculation, use labels: for.
	* module/language/c99/compiler.mes (ast->info): Refactor (for ...)
	  using test-jump-label->info.

	mescc: Remove jump calculation, use labels: do while.
	* module/language/c99/compiler.mes (ast->info): Refactor (do-while
	  ...)  using test-jump-label->info.

	mescc: Remove jump calculation, use labels: ?.
	* module/language/c99/compiler.mes (ast->info): Refactor (cond-expr
	  ...)  using test-jump-label->info.

	mescc: Support continue in while.
	* module/language/c99/compiler.mes (make): Add continue field.
	  (.continue): New function.
	  (clone): Support continue field.
	  (ast->info): Support continue.
	* scaffold/t.c (test): Test it.

	mescc: Remove jump calculation, use labels: while.
	* module/language/c99/compiler.mes (ast->info): Refactor (while ...)
	  using test-jump-label->info.

	mescc: Remove jump calculation, use labels: prepare.
	* module/language/c99/compiler.mes (test-jump-label->info): New
	  function.
	* module/mes/as-i386.mes (i386:jump-label-z,i386:jump-label-byte-z,
	  i386:jump-label-g, i386:jump-label-ge,i386:jump-label-nz): New
	  functions.
	* module/mes/as-i386.scm: Export them.

	mescc: Remove duplication of string globals.
	* module/language/c99/compiler.mes (expr->global): Curry-in globals.
	  Update callers.
	  (initzer->global): Likewise.

2017-06-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Unify labels.
	* module/language/c99/compiler.mes: Use (#:address label) (#local
	  label) (#:relative label) thoughout.
	* module/mes/elf-util.mes (add-s:-prefix, drop-s:-prefix): Remove.
	  (function->text): Update.
	* module/mes/hex2.mes (write-hex2): Update.

	mescc: Write object files in hex2 or hex3 format.
	* stage0/elf32.hex2: New file.
	* module/mes/hex2.mes: New file.
	* module/mes/hex2.scm: New file.
	* module/language/c99/compiler.mes: Eradicate object lamdas.
	  (current-eval, dec-xhex, function:-object->text, object->elf,
	  object->objects, merge-objects, alist-add): Remove.
	* module/mes/elf.mes (object->elf): New function, move from compiler.mes.
	* module/mes/elf.scm: Export it.
	* guile/mescc.scm (parse-opts): Add -g.
	  (main): Use it.
	* scripts/mescc.mes: Likewise.
	* scripts/mescc-guile.make (MESCC.scm, MESLD.scm): Add -g flag.
	* scripts/mescc-mes.make (MESCC.mes, MESLD.mes): Likewise.
	* scaffold/m.c: Add proper includes.
	* scaffold/argv.c: New file.
	* scaffold/hello.c: Simplify.
	* scaffold/micro-mes.c: Add proper includes.
	* scaffold/t.c: Add proper includes.

2017-06-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: %moduledir ends with /.
	* make/install.make (MODULEDIR): Append /.
	  (install): Remove /.
	* src/mes.c (load_env, bload_env): Update.

2017-06-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Put _start at top of mlibc.
	* mlibc/libc-mes.c (_start): Move to top.
	* mlibc/mini-libc-mes.c (_start): Likewise.
	* module/mes/elf-util.mes (function-prefix): Update for _start == 0.
	  (function-offset): Likewise.

	mes: Add list-index.
	* module/srfi/srfi-1.scm (list-index): New function.

2017-06-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Bugfix add prepocess dependency on snarfing mes.
	* src/src.make ($(OUT)/$(DIR)/mes.guile-E, $(OUT)/$(DIR)/mes.mes-E):
	  Depend on mes snarfing.

2017-06-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Support for non-Guix[SD]: cater for missing CC/CC32 compilers.
	* make/check.make: Skip if CC is not set.
	* make/check-mlibc.make: New file.
	* scaffold/scaffold.make: Use it for mlibc targets.
	* tinycc/tinycc.make: Skip mlibc targets if CC32 not set.

	mescc: Support for non-Guix[SD] builds.
	* module/language/c99/compiler.mes (c99-input->full-ast): Cater for
	  C_INCLUDE_PATH not set.  Fixes non-Guix[SD] builds.

	build: Support for non-Guix[SD]: make CC/CC32 optional in configure too.
	* configure (optional): New global.
	  (BUILD_TRIPLET): Use Guile value.
	  (check-version): Add keyword argument #:optional.
	  (main): Make CC optional (--with-courage).  Only check for stdio.h,
	  limits.h if CC is found.
	  Make CC32 check optional.
	* scripts/scripts.make: Skip if CC is not set.

2017-06-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Bugfix for merging objects.
	* mlibc/libc-mes.c (main): Declare.
	* mlibc/mini-libc-mes.c (g_stdin): Define.
	  (main): Declare.
	* module/language/c99/compiler.mes (alist-add): Thinko.  Fixes merging
	  objects when first declares function of next.

2017-06-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix hash: 0fvzr1ai2rmi46zdi5b2bdjb6s8ip78mkmsk02yxl46rajmp2pb1

	Release 0.7.
	* configure (VERSION): Bump.

	doc: Release update.
	* AUTHORS: Remove module/nyacc.
	* HACKING: Release uppdate.
	* NEWS: Release uppdate.
	* doc/ANNOUNCE-0.7: New file.

	guix: mes.git: Add git hash to version.
	* guix.scm (mes.git): Add git hash to version.

	mescc: move include into share/mlibc, allows installing alongside gcc.
	* mlibc: Rename from libc.
	* HACKING: Update for name change.
	* make/bin.make: Likewise.
	* make/mescc-guile.make: Likewise.
	* make/mescc-mes.make: Likewise.
	* scaffold/scaffold.make: Likewise.
	* make/install.make: Likewise.
	  (install): Install mlibc into share/mlibc.

2017-06-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Handle any const, by ignoring.
	* module/language/c99/compiler.mes (ast-strip-const): New function.
	  (c99-input->ast): Use it.
	  (type->size, type->description, ast->info): Remove const handling.

2017-05-31  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support array in struct.
	* module/language/c99/compiler.mes: (field:size, field-offset): New
	  functions.  Update callers, use them throughout.
	  (ast->info): Support declaration of struct and typedef'ed struct
	  variable with array fields.
	  (expr->accu, expr->accu*): Support foo.bar[baz], foo->bar[baz].
	* scaffold/t-tcc.c: Test it.

2017-05-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Skip gcc, mlibc, guile or mes builds using CC=, CC32=, GUILE= or MES=.
	* GNUmakefile (build-scripts): New target
	  (HELP_TOP): Mention it.
	* configure (main): Write GUILE_FOR_BUILD.
	* make/bin-mlibc.make: Skip if CC32 is not set.
	* make/bin.make: Skip if CC is not set.
	* make/install.make (install): Only install $(OUT)/mes.mes if
	  MES_BOOTSTRAP is set.
	* make/mescc-guile.make: Skip if GUILE is not set.
	* make/mescc-mes.make: Skip if MES is not set.
	* HACKING: write something about

	core: Always include reader.c, drop binary read-0-32.mo dependency.
	* module/language/c99/compiler.mes (c99-input->full-ast): Remove
	  obsolete __NYACC__ and MES_FULL defines.
	* src/mes.c [!MES_FULL]: Include reader-mes.h.
	  (mes_builtins) [!MES_FULL]: Include reader.mes.i, reader.me.environment.i.
	  [!MES_FULL]: Include reader.c.
	  (main) [!MES_FULL]: By default call load_env, only call bload_env
	  when --load is supplied.  WAS: Always bload read-0-32.mo.
	* src/reader.c (__end_of__mes_): Remove.
	  (dump): Remove option of dumping tiny test program.
	* make/mescc-mes.make ($(OUT)/$(TARGET), mescc.mes-ccompile,
	  mescc.mes.c-compile-E): Depend on $(OUT)/mes, scripts/mes.
	* src/src.make (mes.guile): Remove module/mes/read-32-0 dependency.
	  Do not build $(OUT)/mes.mes.
	* module/module.make (module/mes/read-0.mo, module/mes/read-0-32.mo,
	  module/mes/tiny-0-32.mo): Remove targets.
	  (CLEAN): Do not add them.  Neither install $(OUT)/mes.mes.
	* .gitignore: Remove exceptions for them.
	* make/install.make (install): Do not install them.
	* HACKING: Update info about creating module/mes/read-32-0.mo.
	* scaffold/mini-mes.c: Remove.
	* scaffold/tiny-mes.c: Remove.
	* scaffold/cons-mes.c: Remove.
	* scaffold/scaffold.make (tiny-mes.libc, tiny-mes.guile, tiny-mes.mes,
	  mini-mes.libc, mini-mes.guile, mini-mes.mes): Reemove targets.

2017-05-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Add missing builtins.
	* module/language/c99/compiler.mes (i386:type-alist): Add missing
	  builtins.  TODO: identify and handle unsigned.

2017-05-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support typedef and many TCC declaration variants.
	* module/language/c99/compiler.mes (ast->info): Register typedefs in types.
	  (enum-def-list->constants): Support addition and substraction in
	  enum field values.
	  (get-type): New function.  Use throughout.

	mescc: Handle comments anywhere.
	* module/language/c99/compiler.mes (c99-input->full-ast): Rename from c99-input->full-ast.
	  (ast-strip-comment, c99-input->ast): New functions.
	  (ast->info): Remove comment exceptions.

	mescc: Support anonymous enums.
	* module/language/c99/compiler.mes (enum-def-list->constants): New function.
	  (ast->info): Support anonymous enum.

2017-05-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: C99 header files and declaraions.
	* libc/include/assert.h (assert_fail):
	* libc/include/stdio.h:
	+int eputs (char const* s);
	+int fputs (char const* s);
	+int puts (char const* s);
	+int putchar (int c);
	+int fputc (int c, int fd);
	+int getchar ();
	* libc/include/stdlib.h:
	+char* getenv (char const* s)
	+int atoi (char const *s);
	+int *malloc (size_t);
	+int *realloc (int *p, int size);
	* libc/include/unistd.h (access):
	* src/lib.c (display_helper):
	* src/mes.c (read_input_file_env):
	* src/posix.c: Include unistd.h.

	guix: Update from Guix.
	* guix.scm (mes): Update from Guix.

2017-05-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Use separate preprocessing stage for mescc.
	* make/mescc-guile.make (mescc.scm-c-preprocess, (mescc.scm-compile-E):
	  New defines.
	  [!MESC_DIRECT]Compile .o via separate preprocessed .E stage.

	mescc: support -E.
	* guile/mescc.scm (parse-opts): Add -E.
	  (source->ast): New function.
	  (main): Use it.
	* scripts/mescc.mes (parse-opts): Add -E.
	  (source->ast): New function.
	  (main): Use it.

2017-05-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Refactor mlibc compilation.
	* libc/libc-mes.c: New file.  Contents from module/mes/libc.mes, module/mes/libc-i386.mes.
	* libc/libc-gcc.c: Rename from libc/mlibc.c, include libc/mstart.c
	* libc/mstart.c: Remove.
	* module/mes/libc-i386.mes: Remove.
	* module/mes/libc-i386.scm: Remove.
	* module/mes/libc.mes: Remove.
	* module/mes/libc.scm: Remove.
	* GNUmakefile (CFLAGS): Include libc-gcc.c (WAS: mlibc.c).
	* make/bin-mlibc.make (C_FLAGS): Remove start.c include.
	* make/mescc-guile.make: Rewrite using compile, link.
	* make/mescc-mes.make: Likewise.
	* scaffold/m.c: Update.

2017-05-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: support -c, -o.
	* module/language/c99/compiler.mes: Throughout: quote lambda's.
	  (current-eval): New function.
	  Thanks Andy!
	  (object->list): New function.  Update callers.
	  (c99-input->info): Dump a.o.
	  (initzer->non-const, function:object->list): New functions.
	  (info:object->list): New function.
	  (c99-input->elf): Call it.
	* module/mes/as-i386: Throughout: quote lambda's.
	* scripts/mescc.mes (main): Rewrite.
	* guile/mescc.scm (main): Likewise.

2017-05-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Bugifx for number->string radix > 10.
	* module/mes/scm.mes (number->string): Bugfix for `10' -> hex/radix > 10.

2017-05-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Simplify read-string.
	* module/mes/guile.mes (read-string): Simplify, probably fix even.

	mescc: Remove LALR C frontend prototype.
	* module/language/c/compiler.mes: Remove.
	* module/language/c/lexer.mes: Remove.
	* module/language/c/parser.mes: Remove.

	mes: Add negate.
	* module/mes/scm.mes (negate): New function.

2017-05-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Add current-output-port, open-output-file, set-current-output-port.
	* libc/include/fcntl.h: Declare it.  Add some fcntl defines.
	* libc/include/stdio.h: Remove fcntl defines, Declare g_stdout.
	* module/language/c99/compiler.mes (c99-input->ast): Define O_WRONLY, O_RDWR.
	* module/mes/guile.mes (with-output-to-file, with-output-to-port): New functions.
	* src/posix.c (current_output_port, open_output_file,
	  set_current_output_port): New functions.
	* libc/mlibc.c (open): Add optional mode parameter.
	* module/mes/libc-i386.mes (i386:open): Forward third parameter.
	* scaffold/mini-mes.c (main): Init g_stdout.
	* src/mes.c (main): Likewise.

	mes: Support octal numbers in reader.
	* module/mes/read-0.mes (read-octal): New function.
	  (read-word): Use it.
	* tests/read.test: Test it.

2017-05-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes: Add getopt-long.
	* module/mes/getopt-long.scm: New file, imported from Guile-1.8,
	* module/mes/getopt-long.mes: Include it.
	* AUTHORS: Mention it.

	mes: Add string-rindex.
	* module/srfi/srfi-13.mes (string-rindex): New function.

	mes: Support predicate with string-index.
	* module/srfi/srfi-13.mes (string-index): Support predicate.

	mes: Add string-suffix?
	* module/mes/scm.mes (string-prefix?): Refactor.
	  (string-suffix?): New function.

2017-05-27  Jeremiah Orians  <jeremiah@pdp10.guru>

	Purging binary blobs
	* mes.mes: Remove.
	* module/mes/read-0-32.mo: Remove.

2017-05-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Update.
	* AUTHORS: Remove module/nyacc.

2017-05-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: typo

	guix hash: 0qqywk3siyhf08v7xac08lqldklrqfndlp495wgy6ii9fn93197k

2016-12-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.6.
	* configure (VERSION): Bump.

2017-05-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Release update.
	* NEWS: Update.

2017-05-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Run 33/55 tests of ../tinycc/tests/test2 if avaiable.
	* make/check-tinycc.make: New file.
	* tinycc/tinycc.make: New file.
	* GNUmakefile (SUBDIRS): Add tinycc.

2017-05-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Support i686, support development for arm.
	* configure (CC32): Accept arm-* as 32 bit compiler.
	  (check-compile-header-c, check-header-c): New functions.
	  (parse-opts): New option: --with-courage.
	  (main): Check for platform, stdio.h, limits.h.

2017-05-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Minimal support for short.
	* module/language/c99/compiler.mes (i386:type-alist): Add short.

	mescc: Add strcpy.
	* libc/include/string.h (strcpy): Declare.
	* libc/mlibc.c (strcpy): New function.
	* module/mes/libc.mes (strcpy): New function.
	  (libc): Add it.
	* scaffold/t.c (string_test): Test it.

	mescc: Enhance sizeof support.
	* module/language/c99/compiler.mes (expr->accu): Support sizeof (simple-type),
	  sizeof (var).

	mescc: Support void return.
	* module/language/c99/compiler.mes (ast-info): Support `return'.

2017-05-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	nyacc: Unbundle.
	* configure (check-version): Use keyword parameters, add #:command
	  parameter.
	  (main): Check for Nyacc.
	* INSTALL: Mention Nyacc as dependency.
	* make/guile.make (all-go): Compile in guile dir.
	* module/module.make (SCM_FILES): Remove Nyacc filters.
	* module/nyacc/BUGS: Remove.
	* module/nyacc/ChangeLog: Remove.
	* module/nyacc/README: Remove.
	* module/nyacc/README.nyacc: Remove.
	* module/nyacc/bison.scm: Remove.
	* module/nyacc/export.scm: Remove.
	* module/nyacc/import.scm: Remove.
	* module/nyacc/lalr.scm: Remove.
	* module/nyacc/lalr2.scm: Remove.
	* module/nyacc/lang/c99/README: Remove.
	* module/nyacc/lang/c99/body.scm: Remove.
	* module/nyacc/lang/c99/cpp.scm: Remove.
	* module/nyacc/lang/c99/cppmach.scm: Remove.
	* module/nyacc/lang/c99/mach.d/c99act.scm: Remove.
	* module/nyacc/lang/c99/mach.d/c99tab.scm: Remove.
	* module/nyacc/lang/c99/mach.d/c99xact.scm: Remove.
	* module/nyacc/lang/c99/mach.d/c99xtab.scm: Remove.
	* module/nyacc/lang/c99/mach.d/cppact.scm: Remove.
	* module/nyacc/lang/c99/mach.d/cpptab.scm: Remove.
	* module/nyacc/lang/c99/mach.scm: Remove.
	* module/nyacc/lang/c99/parser.scm: Remove.
	* module/nyacc/lang/c99/pprint.scm: Remove.
	* module/nyacc/lang/c99/util1.scm: Remove.
	* module/nyacc/lang/c99/util2.scm: Remove.
	* module/nyacc/lang/c99/xparser.scm: Remove.
	* module/nyacc/lang/calc/parser.scm: Remove.
	* module/nyacc/lang/util.scm: Remove.
	* module/nyacc/lex.scm: Remove.
	* module/nyacc/parse.scm: Remove.
	* module/nyacc/util.scm: Remove.

	mes: Consider GUILE_LOAD_PATH for include-from-path.
	* module/mes/guile.scm (include-from-path): New macro.

	mescc: Bugfixes for local char[].
	* module/language/c99/compiler.mes (push-ident): Cater for local arrays.
	  (expr->accu): Avoid post-inc/post-dec twice on rhs of assignment.
	  Fix size lookup for local char arrayns.

2017-05-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	nyacc: Update to 0.78.

	mes: Add srfi-16 to Nyacc Guile support.
	* module/mes/guile.mes: Include srfi-16 for Nyacc.

	mes: Basic support for string-index.
	* module/srfi/srfi-13.mes (string-index): New function.
	* tests/srfi-13.test ("string-index"): Test it.

	mes: Support #\cr short form in reader.
	* module/mes/read-0.mes (read-character): Support #\cr short form for #\return.
	* module/mes/read-0-32.mo: Regenerate.

	mes: Support case-lambda.
	* module/srfi/srfi-16.scm: New file.
	* AUTHORS: Mention it.
	* module/srfi/srfi-16.mes: New file.

	mescc: Enhance enum support.
	* module/language/c99/compiler.mes (ast->info): Support enum variable
	  declaration.  Respect field value overrides.

	mescc: Support binary constants.
	* module/language/c99/compiler.mes (cstring->number): Support binary 0bxxx values.
	* scaffold/t.c (math_test): Test it.

	mescc: Support ==, != as expression value.
	* module/mes/as-i386.scm: Export them.
	* module/language/c99/compiler.mes (expr->accu): Set accu to 0/1 for eq, ne.
	* module/mes/as-i386.mes (i386:nz->accu, i386:z->accu,
	  i386:accu<->stack): New functions.
	* scaffold/t.c (math_test): Test it.

	mescc: Support &, ^.
	* module/mes/as-i386.mes (i386:accu-and-base, i386:accu-xor-base): New functions.
	* module/mes/as-i386.scm: Export them.
	* module/language/c99/compiler.mes (expr->accu): Support bitwise-and, bitwise-xor.

	mescc: Support struct pointers.
	* module/language/c99/compiler.mes (expr->accu): Support
	  &struct.field, struct->field.
	  (ast->info): Support struct *foo = &bar;
	* scaffold/t.c (struct_test): Test it.

	mescc: Support struct definition with variable declaration.
	* module/language/c99/compiler.mes (ast->info): Support `struct foo {} bar;'.

	mescc: Support void functions.
	* module/language/c99/compiler.mes (function->info): Add return if
	  missing.  Fixes calling void functions (and functions where return
	  is missing).
	* scaffold/t.c (void_func): Test it.

	mescc: Bugfix for break in switch not in compound.
	* module/language/c99/compiler.mes (clause->jump-info): Rename from
	  case->jump-info.
	  (statements->clauses): New function.
	  (ast->info): Use it.  Fixes switch statement with break in a case
	  outside of a compound.
	* scaffold/t.c (swits): Test it.

2017-05-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Enhance [int/pointer] array support.
	* module/language/c99/compiler.mes (p-expr->type): Handle array-ref
	  with any index.
	  (ast->info): Support plain array declerations.
	  (expr->accu): For size == 4, assume value in accu.  Fixes int/pointer arrays.
	* scaffold/t.c: Test it.

2017-05-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Enhance struct support.
	* module/language/c99/compiler.mes (expr->accu): Remove struct scm
	  hardcoding.
	  (p-expr->type): New function.
	  (ast->info): Support struct variable declaration without
	  initializer.  Set struct type for all struct declarations.

2017-05-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Fix itoa for negative numbers, using workaround.
	* module/mes/libc.mes (itoa): Avoid `sign = x < 0;' FIXME, todo.
	* scaffold/t.c (test): Test it.

2017-05-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support regular C99 compile, headers + mlibc.
	* libc/include/assert.h: New file.
	* libc/include/ctype.h: New file.
	* libc/include/errno.h: New file.
	* libc/include/fcntl.h: New file.
	* libc/include/limits.h: New file.
	* libc/include/mlibc.h: New file.
	* libc/include/stdio.h: New file.
	* libc/include/stdlib: New file.
	* libc/include/string.h: New file.
	* libc/include/unistd.h: New file.
	* libc/mlibc.c: Remove declarations.
	* make/bin.make (INCLUDES): Factor out standard includes.
	* make/bin-mlibc.make: New file.
	* scaffold/scaffold.make: Use it.
	* src/src.make: Use it.
	* module/language/c99/compiler.mes (ast-info): Handle more function declarations.
	* scaffold/cons-mes.c: Remove mlibc definitionsa and mlibc.c include.
	  Instead include <mlibc.h>.
	* scaffold/hello.c: Likewise.
	* scaffold/m.c: Likewise.
	* scaffold/malloc.c: Likewise.
	* scaffold/micro-mes.c: Likewise.
	* scaffold/mini-mes.c: Likewise.
	* scaffold/t.c: Likewise.
	* scaffold/tiny-mes.c: Likewise.
	* src/gc.c: Likewise.
	* src/lib.c: Likewise.
	* src/math.c: Likewise.
	* src/mes.c: Likewise.
	* src/posix.c: Likewise.
	* src/reader.c: Likewise.

2017-05-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support list of initializers.
	* module/language/c99/compiler.mes (ast->info): Support list of initializers.

2017-05-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Basic printf support.
	* module/mes/libc-i386.mes (i386:va-arg): New function.
	* module/mes/libc-i386.scm (mes): Export it.
	* module/mes/libc.mes (printf): New function.
	  (libc): Add it.
	* libc/include/stdio.h: New file.
	* module/language/c99/compiler.mes (c99-input->ast): Add libc/include
	  to include path.
	  (ast-info): Handle (skip) ellipsis in function declaration.

	guix: Update from Guix.
	* guix.scm: Use version from Guix.
	* make/install.make (update-hash): Update version for new Guix meme.

	make: Recompile .go too when included mes is touched.
	* build-aux/compile-all.scm (scm->mes): New function.
	  (file-needs-compilation?): Use it to hackishly respect (include-[from-path] "<>.mes")

2017-05-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Resolve MODULEDIR confusion.  Fixes mes installation.
	* make/install.make (GUILEDIR): New variable.  Was MODULEDIR.
	  (MODULEDIR): Mes' module dir.
	* guile/mescc.scm: Update.
	* src/mes.c (load_env, bload_env): Update.

2017-05-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix hash: 01m8n7zk4f1ryd61dj589zarx09vbi7fc5f8m1x5zfk6r7l0zja2

	guix.scm: Remove erroneous system restriction.
	* guix.scm (mes): Remove second erroneous system restriction.

2017-04-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.5.
	* configure (VERSION): Bump.

	bootstrap: Regenerate.
	* module/mes/read-0-32.mo: Regenerate.

	doc: Release update.
	* AUTHORS: Mention Nyacc and GuixSD.
	* NEWS: Update.
	* README: Update.
	* doc/ANNOUNCE-0.5 New file.
	* HACKING: Add pointers, update TODO/DONE.

2017-04-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	bootstrap: Regenerate.
	* mes.mes: Regenerate.

2017-04-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Parse mlibc early, show progress.
	* module/mes/libc.mes (_start, strlen, getchar, assert_fail, ungetc,
	  putchar, fputc, eputs, fputs, puts, strcmp, itoa, isdigit, atoi,
	  malloc, realloc, strncmp, c:getenv): Change to function, add
	  progress.  Update callers.
	* module/language/c99/compiler.mes (c99-input->info): Compile libc separately.
	* guile/mescc.scm: Update progress.
	* scripts/mescc.mes: Update progress.

2017-04-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	bootstrap: Regenerate.
	* mes.mes: Regenerate.

2017-04-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Set argv for mescc too.
	* src/mes.c (main)[!__MESC__]: Remove branch.

	bootstrap: Regenerate.
	* mes.mes: Regenerate.

2017-04-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Avoid duplication of globals.
	* module/language/c99/compiler.mes (globals:add-string): New function.
	  (expr->arg): Use it to avoid globals duplication.
	  (expr->accu): Do not pre-add globals.

	mescc: Fix global creation in AND/OR clause.
	* module/language/c99/compiler.mes (test->jump->info): Retain globals
	  created in AND/OR test.

2017-04-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Move some debugging to MES_DEBUG=2.
	* module/mes/base-0.mes (load): Add ;;;.
	* src/gc.c (gc_flip): Test on g_debug > 1.
	  (gc): Likewise.
	* src/mes.c (mes_builtins): Likewise.
	  (main): Likewise.
	* src/reader.c (dump): Likewise.

	mescc: Add atoi.
	* libc/mlibc.c (atoi): New function.
	* module/mes/libc.mes (atoi): New function.
	  (libc): Add it.

	mescc: Add getenv.
	* module/mes/libc-i386.mes (i386:_start): Push environment pointer.
	* module/mes/libc.mes (g_environment): New global.
	  (_env): New function.
	  (_start): Use it to set g_environment.
	  (getenv): New function.
	* lib/mlibc.c (strncmp): New function.
	  (getenv): Implement.
	* lib/mstart.c (_start): Set g_environment.
	* module/mes/libc.mes (strncmp): New function.
	  (libc): Add it.
	* scaffold/t.c: (array_ref): Test it.

	mescc: Support pointer arrays and some arithmetic.
	* module/language/c99/compiler.mes (.name): Support **; handle type size.
	  (.statements): Likewise.
	  (push-local-de-ref): Likewise.
	  (push-ident-de-ref): Likewise.
	  (expr->arg): Likewise.
	  (ident->accu):  Likewise.
	  (base->ident-address):  Likewise.
	  (ident-add): Likewise.
	  (expr->accu):  Likewise.
	  (decl->type):  Likewise.
	  (formal->text):  Likewise.
	  (int->global, ident-address->accu, ident-address->base): New functions.
	  (ast->info): Support *, *[] ** declarations.
	  (push-local-de-de-ref,  push-ident-de-de-ref): New functions.
	* module/mes/as-i386.mes (i386:push-byte-local-de-ref): Rename from
	  i386:push-local-de-ref.  Update callers.
	  (i386:push-local-de-ref, i386:push-byte-local-de-de-ref,
	  i386:accu-mem-add): New functions.
	* module/mes/as-i386.scm (mes): Export them.
	* scaffold/t.c (array_test): Test it.

2017-04-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	bootstrap: Regenerate.
	* mes.mes: Regenerate.
	* module/mes/read-0-32.mo: Regenerate.

2017-04-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	Add access?
	* libc/mlibc.c (access): New function.
	* module/mes/libc-i386.mes (i386:access): New function.
	  (i386:libc): Add it.
	* src/posix.c (access_p): New function.
	* module/mes/posix.mes: New file.
	* module/mes/base-0.mes (mes): Include it.
	* module/mes/read-0-32.mo: Regenerate.

2017-04-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	bootstrap: Regenerate
	* module/mes/read-0-32.mo: Regenerate.

2017-04-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Refactor.
	* GNUmakefile (OUT,QUIET,SUBDIRS): New variables.
	  include make/common.make
	* .gitignore: Remove toplevel targets.
	* build-aux/compile-all.scm: Import from GNU Guix.
	* configure (gulp-pipe): Check exit status.  Actually test for CC,
	  CC32.
	* make/bin.make: New file.
	* make/check.make: New file.
	* make/clean.make: New file.
	* make/common.make: New file.
	* make/compile.make: New file.
	* make/guile.make: New file.
	* make/mescc-guile.make: New file.
	* make/mescc-mes.make: New file.
	* make/reset.make: New file.
	* lib/mlibc.c: Rename from top.
	* lib/start.c: Rename from top.
	* module/module.make: New file.
	* scaffold/scaffold.make: New file.
	* scripts/scripts.make: New file.
	* src/mes.c: Rename from top.
	* src/src.make: New file.
	* src/mes.c: Rename from top.
	* src/gc..c: Rename from top.
	* src/lib.c: Rename from top.
	* src/posix.c: Rename from top.
	* src/reader.c: Rename from top.
	* src/vector.c: Rename from top.
	* tests/tests.make: New file.

2017-04-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	Remove gc scaffolding.
	* tests/gc-0.test: Remove.
	* tests/gc-1.test: Remove.
	* tests/gc-2.test: Remove.
	* tests/gc-2a.test: Remove.
	* tests/gc-3.test: Remove.
	* tests/gc-4.test: Remove.
	* tests/gc-5.test: Remove.
	* tests/gc-6.test: Remove.
	* tests/gc.test:Remove.

	mescc: Add fsync.
	* module/mes/libc-i386.mes (i386:fsync): New function.
	  (i386:libc): Export it.
	* mlibc.c (fsync): New function.

2017-04-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	core/mini-mes: Merge merge mes.c and mini-mes.c.
	* mes.c:
	* scaffold/mini-mes.c:
	* gc.c:
	* GNUmakefile:

	mescc: Allow usage of const by ignoring.
	* module/language/c99/compiler.mes (ast->info): Support const
	  declarations (by ignoring them).
	* lib.c (display_helper)[!__GNUC__]: Remove branch.
	* posix.c (write_byte)[!__GNUC__]: Likewise.

	HACKING: Removed __MESC__ workarounds.
	* HACKING: Update pointer.

	mescc: Support break in while.
	* module/language/c99/compiler.mes (make): Add break field.
	  (.break): New function.
	  (clone): Support break field.
	  (ast->info): Support break.
	* scaffold/t.c (test): Test it.
	* scaffold/mini-mes.c (lookup_symbol_): Use it; remove goto workaround.

2017-04-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Refactor switch.
	* module/language/c99/compiler.mes (case->jump-info): Refactor.
	  Support multiple case statements.
	* scaffold/t.c (swits): Test it.
	* lib.c (display_helper)[__NYACC__]: Remove branch.

2017-04-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	mini-mes: Merge with mes.c: lib.c, math.c, posix.c.
	* mes.c: Include math.c after posix.c.
	  (assert_defined, check_formals, check_apply, load_env,
	  bload_env): Move from lib.c
	* scaffold/mini-mes.c: Include mini-lib.h, lib.c., mini-math.h,
	  math.c, mini-posix.h, posix.c.
	  (greater_p, less_p, is_p, minus, plus, divide, modulo, multiply,
	  logior, ash): Remove.
	  (ungetchar, peekchar, peek_byte, read_byte, write_byte,
	  string_to_cstring, getenv_, open_input_file, current_input_port,
	  set_current_input_port, force_output): Remove.
	  (mes_builtins): include mini-lib.i, mini-lib.environment.i.
	  mini-math.i, mini-math.environment.i mini-posix.i,
	  mini-posix.environment.i.
	* GNUmakefile (guile-mini-mes): Add dependencies.

	mescc: Refactor assignment.
	* module/language/c99/compiler.mes (expr->accu): Refactor assignment.
	  Support multiple operators.
	* scaffold/t.c (math_test): Test it.
	* scaffold/mini-mes.c (minus, divide, modulo, multiply,
	  logior)[!__GNUC__]: Remove branch.

2017-04-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Factor-out array-ref.
	* module/language/c99/compiler.mes: Factor-out array-ref.

	mescc: Refactor expr->base.
	* module/language/c99/compiler.mes (expr->base): Rename from
	  expr->+base.  Use throughout.

	mescc: Refactor binary operators.
	* module/language/c99/compiler.mes (binop->accu): Rename from
	  compare->accu.  Update callers.
	  (expr->accu): Use it for binary operators.
	* scaffold/t.c (math_test): Test it.

	mescc: Factor-out append-text.
	* module/language/c99/compiler.mes: Use append-text throughout.

	mescc: Factor-out wrap-as.
	* module/language/c99/compiler.mes (wrap-as): Rename from wrap.  Use throughout.

	mescc: Refactor comparisons.
	* module/language/c99/compiler.mes (compare->accu, append-text, wrap):
	  New functions.
	  (expr->accu): Use them to implement construct like 1 == inc (0).
	* scaffold/t.c (math_test): Test them.

2017-04-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	HACKING: Removed gc.c, vector.c mescc workarounds.
	* HACKING: Update pointer and recipe.

	mescc: Refactor array ref.
	* module/language/c99/compiler.mes (expr->accu, expr->accu*): Remove
	  duplication, use expression as array index.
	* scaffold/t.c (struct_test): Test it.
	* vector.c (vector_length, list_to_vector)[!__GNUC__]: Remove branch.

	mescc: Refactor expressions.
	* module/language/c99/compiler.mes (expr->accu, ast->info): Remove
	  duplication, separate concerns.

2017-04-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Refactor pre/post inc/dec.
	* module/language/c99/compiler.mes: Refactor pre/post inc/dec.

	bootstrap: Regenerate.
	* mes-mini-mes: Regenerate.
	* module/mes/read-0-32.mes: Regenerate.

	mescc: function call.
	* module/language/c99/compiler.mes (expr->accu): Move function call
	  from ast->info.

	mescc: Support expression as lhs array index.
	* module/language/c99/compiler.mes (expr->accu): Treat array index as expression.
	* scaffold/t.c (struct_test): Test it.
	* gc.c (gc_copy)[!__GNUC__]: Remove branch.
	* vector.c (list_to_vector)[!__GNUC__]: Likewise.

2017-04-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Remove duplication.
	* module/language/c99/compiler.mes (expr->arg): Use expr->accu for
	  most expressions.

	scripts: Support --help, --version.
	* guile/mescc.scm: Support --help, --version.
	* scripts/mescc.mes: Likewise.
	* scripts/repl.mes: Likewise.

2017-04-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm: Do not quote list of strings.
	* module/mes/display.mes (display): Check value of write?, fixes
	  quoting display string.

	mescc: Do not return ELF text.
	* module/language/c99/compiler.mes (info->exe): Do not return ELF text.

2017-04-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Update Guix build and install.
	* guix.scm (%source-dir): New variable.
	  (git-file?): New function.
	  (mes): Use them to simplify building/installing from git.
	* make/install.make (READMES): Add INSTALL, README.
	* (install): Install mescc.scm and read-0-32.mo.

	bootstrap: Regenerate.
	* mes-mini-mes: First self-hosting binary.

	HACKING: scripts/mescc.mes scaffold/mini-mes runs.
	* HACKING: Update pointer and recipe.

	mini-mes: Fix for assq.
	* scaffold/mini-mes.c (assq): Use eq_p iso ==.  Fixes
	  tests/display.test ("write alarm").

	core: Use 0.25% safety region.
	* gc.c (gc_up_arena): Up GC_SAFETY too.
	* scripts/repl.mes: Remove MES_ARENA override.

	bootstrap: Regenerate.
	* module/mes/read-0-32.mo: Regenerate.

	core: Remove append.
	* lib.c (append): Remove.
	* scaffold/mini-mes.c (append): Remove.
	* module/mes/base-0.mes (append): New function.
	* module/mes/read-0.mo: Regenerate.
	* module/mes/read-0-32.mo: Regenerate.

	test: Add test for append-map.
	* tests/srfi-1.test ("append-map"): New test.

2017-04-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Check gc free harder.
	* gc.c (gc_check): New fuction.
	* mes.c (eval_apply): Use it.

	mescc: Fix by value assignment from array-of struct entry.
	* module/language/c99/compiler.mes (expr->accu): Fix by value
	  assignment from array-of struct entry.
	* scaffold/t.c (struct_test): Test it.
	* vector.c (make_vector, list_to_vector, vector_to_list): Use it;
	  remove workarounds.
	* gc.c (gc_copy): Likewise.

	core: Fix flush for _POSIX_SOURCE.
	* posix.c (write_byte, force_output)[_POSIX_SOURCE]: Use FILE*
	  functions.  Fixes repl.mes.

	core: Increase MAX_ARENA_SIZE and GC safety.
	* mes.c (MAX_ARENA_SIZE): Double to 40000000.
	 (GC_SAFETY): Set to 10000 cells (WAS: 1000).
	* scaffold/mini-mes.c (MAX_ARENA_SIZE, GC_SAFETY): Likewise.
	* gc.c (gc)[MES_DEBUG]: Also print safety area.

	HACKING: scripts/mescc.mes scaffold/t.c runs.

	core: Increase GC safety.
	* mes.c (GC_SAFETY): Set to 1000 cells (WAS: 100).
	* scaffold/mini-mes.c (GC_SAFETY): Likewise.

	HACKING: scripts/mescc.mes scaffold/tiny-mes.c runs.

	HACKING: scripts/mescc.mes scaffold/cons-mes.c runs.

	test: Add nyacc cpp match tests; two fail.
	* tests/match.test ("match nyacc 0", "match nyacc 1"): New tests.
	 ("match nyacc simple", "match nyacc tkl0"): New tests; FAIL with Mes.
	 (report): Set failure expectation to 2 for Mes.
	* HACKING: Add to bugs.

	scm: Support test failure expectation.
	* module/mes/test.mes (result): Take second argument to mean expected
	  failure count.

2017-04-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm: Evaluate arguments of OR only once.
	* module/mes/base.mes (or): Evaluate arguments only once.
	* module/mes/read-0.mes (or): Likewise.
	* tests/base.test ("or only once"): Test it.
	* module/mes/read-0-32.mo: Regenerate.

2017-04-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm: Have char-set-contains? strictly return boolean.
	* module/srfi/srfi-14.mes (char-set-contains?): Return #t rather than
	  memq result.

	scm: Fix bug in assq-set!
	* module/mes/scm.mes (assq-set!): Bugfix.

2017-04-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm: Add c????r.
	* module/mes/base-0.mes (caar, cadr, cdar, cddr, map): Remove.  Update callers.
	* module/mes/base.mes (): Remove.
	* module/mes/base.mes (cadadr, cddadr, cdddar): New function.

2017-03-31  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm: Add access?
	* module/mes/guile.mes (access?): New dummy function.  Fixes Nyacc's #include.

2017-03-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Add Roamdmap.
	* HACKING: Add roadmap.

2017-04-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm: Add open-input-string, read-string.
	* module/mes/guile.mes (open-input-string, read-string): New functions.
	* tests/guile.test: New file.
	* GNUmakefile (TESTS): Add it.

2017-04-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	build: Cleanup, use gcc-specific snarfing.
	* .gitignore: Ignore *.o-32, mes-mini-mes.
	* scripts/nyacc-calc.mes: Remove.
	* scripts/nyacc.mes: Remove.
	* scripts/paren.mes: Remove.
	* make/install.make (install): Remove them.
	p* module/mes/mes-0.mes: Remove.
	* module/mes/loop-0.mes: Remove.
	* build-aux/mes-snarf.scm (main): Add --mini option.
	* GNUmakefile (mini-mes): Use it.

2017-03-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Fix error message when macro is missing.
	* mes.c (scm_vm_eval_check_func): New symbol.
	  (eval_apply): In eval, evaluate car before evlis.  Fixes error
	  message when macro match is missing in (match ... (car x)).
	  (mes_symbols): Add cell_call_with_values, cell_current_module to environment.
	* scaffold/mini-mes.c (eval_apply): Likewise.

2017-03-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Add pmatch tests.
	* tests/pmatch.test: New file.
	* GNUmakefile (TESTS): Add it.

2017-03-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	nyacc: prefix globals.

2017-03-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm: Bugfix display of named characters: add port.
	* module/mes/display.mes (display): Typo, add port.

	nyacc: Add missing (mes pmatch) include.
	* module/nyacc/lang/c99/cpp.mes (mes): Include (mes pmatch).

2017-04-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	nyacc: Use pmatch rather than match for cpp.
	* module/nyacc/lang/c99/cpp.scm (nyacc lang c99 cpp): Import (system
	  base pmatch) rather than (ice-9 match).
	  (rtokl->string): Rewrite using pmatch.

2017-03-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm: Bugfix drain-input.
	* module/mes/guile.mes (drain-input): Bugfix: return string.

	scm: Add assoc-set!
	* module/mes/scm.mes (assoc-set!): New function.
	* tests/scm.test ("assoc-set!", "assoc-set! new"): New tests.

2017-03-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm: Add compose.
	* module/mes/scm.mes (compose): New function.
	* tests/scm.test ("compose"): New test.

	scm: Support reading negative hex numbers.
	* module/mes/read-0.mes (read-hex): Support negative hex numbers.
	* tests/math.test ("#x-10"): New test.
	* tests/read.test: Add test.

	scm: Support map4.
	* module/mes/base-0.mes (map): Remove.  Update callers.
	* module/mes/base.mes (map): Support map4.

	nyacc: Add simple split-cppdef for Mes.
	* module/nyacc/lang/c99/body.scm: Add non-regexp split-cppdef for Mes.

	scm: Add with-throw-handler hack.
	* module/mes/catch.mes (with-throw-handler): Add hack for Nyacc 0.75

	scm: Add list->char-set.
	* module/srfi/srfi-14.mes (list->char-set): New function.
	* tests/srfi-14.test ("list->char-set!"): Test it.

2017-03-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	mini-mes: Debugging to stderr.
	* scaffold/mini-mes.c (error, bload_env, main): Send debug info to
	  stderr.

	throw/catch dinges: URG

2017-03-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	scripts: Allow running with any mes.
	* scripts/mescc.mes: Run $MES if set, default to ../scripts/mes.
	* scripts/repl.mes: Likewise.

	mini-mes: Include and enable gc.
	* scaffold/mini-mes.c: Set MES_GC=1.
	 (ARENA_SIZE)[MES_GC]: Reduce to 10,000 cells (WAS: 1,000,000,000
	 chars).
	 (g_news): New global.
	 (NTYPE, NCAR, NVALUE, NLENGTH, NCDR, NVECTOR): New macros.
	 (mes_symbols)[MES_GC]: Call gc_init_news.
	 (mes_builtins): Include gc.i, gc.environment.i.

2017-04-01  Jan Nieuwenhuizen  <janneke@gnu.org>

	mini-mes: Workarounds for gc.c.
	* gc.c (gc_copy)[!__GNUC__]: Avoid by value assignment from array-of
	  struct entry.
	* scaffold/mini-mes.c (gc_init_cells): Workarounds.

2017-03-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Prepare gc.c for mescc, non-POSIX_SOURCE.
	* mes.c (NLENGTH, NVALUE, NVECTOR): New macros.
	  (mes_builtins): Add comment on .i include order.
	* module/language/c99/compiler.mes (mescc): Add define _POSIX_SOURCE=0.
	* gc.c (gc_up_arena, gc_flip, gc_loop, gc)[!_POSIX_SOURCE]: Use eputs
	  rather than fprintf.
	  (gc_loop): Use CAR, TYPE, NVECTOR rather than .car, .type, .vector.
	* gc.c (gc_up_arena)[!_POSIX_SOURCE]: Add non-POSIX mlib.c
	  implementation.

	mescc: Bugfix for realloc.
	* module/mes/libc.mes (realloc): Thinko.

2017-03-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Bugfix for neg.
	* module/language/c99/compiler.mes (expr->accu): Fix neg.
	* scaffold/t.c (math_test): Test it.
	* scaffold/mini-mes.c (ash): Remove workaround.

	mescc: Support rshift, have guile-mini-mes pass math test.
	* module/mes/as-i386.mes (i386:accu>>base): New function.
	* module/mes/as-i386.scm (mes): Export it.
	* module/language/c99/compiler.mes (expr->accu): Support rshift.
	* scaffold/t.c (math_test): Test it.
	* scaffold/mini-mes.c (ash): Use it.

2017-03-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	test: Enable vector read test.
	* tests/read.test: Enable vector read test.

2017-03-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	mini-mes: Support vectors.
	* scaffold/mini-mes.c (REF, MAKE_REF): New macro.
	  Include vector.h, vector.c.
	  (mes_builtins): Include vector.i, vector.environment.i.

	mini-mes: Workarounds for vector.c.
	* vector.c (make_vector, vector_set_x, list_to_vector)[!__GNUC__]: Avoid
	  by value assignment from array-of struct entry.

	core: prepare vector.c for mescc.
	* vector.c (make_vector, vector_set_x, vector_to_list): Use REF, VALUE
	  rather than .ref, .value.

	mini-mes: Fully remove reader from core.
	* scaffold/mini-mes.c (lookup_): Remove.
	* mes.c: Likewise.
	* reader.c (lookup_): Enable.
	* mlib.c (putc): New function.
	* module/mes/libc.mes (putc): New function.

2017-03-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support bitwise or.
	* module/mes/as-i386.mes (i386:accu-or-base): New function.
	* module/mes/as-i386.scm: Export it.
	* module/language/c99/compiler.mes (expr->accu): Use it; support bitwise or.
	* scaffold/t.c (math_test): Test it.
	* scaffold/mini-mes.c (logior): Use it.

	mescc: Lshift support non-fixed shift value.
	* module/mes/as-i386.mes (i386:accu<<base): New function.
	* module/mes/as-i386.scm: Export it.
	* module/language/c99/compiler.mes (expr->accu): Use it.
	* scaffold/t.c (math_test): Test it.

	mescc: Use signed integer comparison.
	* module/language/c99/compiler.mes (test->jump->info):
	* module/mes/as-i386.mes (i386:Xjump-le, i386:Xjump-g, i386:Xjump-l,
	  i386:Xjump-ge): New functions.
	* module/mes/as-i386.scm: Export them.
	* scaffold/t.c (math_test): Test them.
	* tests/scm.test ("iota -1"): Enable for mesc.

2017-03-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Run module/base-0.mes.
	* gc.c: New file.
	* vector.c: New file.
	* mes.c: Remove vector and gc functions, include vector.c, gc.c.
	* GNUmakefile (mes.o): Add gc, vector dependencies.
	* scaffold/mini-mes.c (eval_apply): Support primitive-load through
	  read_input_file.
	  (getenv_, open_input_file, current_input_port,
	  set_current_input_port force_output, exit_, values, arity_, xassq,
	  is_p, minus, plus, divide, modulo multiply, logior, ash): New function.
	  (mes_symbols): Add symbols %gnuc, %mesc.
	* scaffold/mini-mes.c (): New functions.
	* scaffold/b-0.mes: New file.
	* scaffold/t-0.mes: New file.

	test: Allow running with any mes.
	* test/base.test: Run $MES if set, default to ../scripts/mes.
	* tests/base.test: Likewise.
	* tests/catch.test: Likewise.
	* tests/closure.test: Likewise.
	* tests/cwv.test: Likewise.
	* tests/display.test: Likewise.
	* tests/fluids.test: Likewise.
	* tests/gc-0.test: Likewise.
	* tests/gc-1.test: Likewise.
	* tests/gc-2.test: Likewise.
	* tests/gc-2a.test: Likewise.
	* tests/gc-3.test: Likewise.
	* tests/gc-4.test: Likewise.
	* tests/gc-5.test: Likewise.
	* tests/gc-6.test: Likewise.
	* tests/gc.test: Likewise.
	* tests/let-syntax.test: Likewise.
	* tests/let.test: Likewise.
	* tests/match.test: Likewise.
	* tests/math.test: Likewise.
	* tests/module.test: Likewise.
	* tests/optargs.test: Likewise.
	* tests/peg.test: Likewise.
	* tests/psyntax.test: Likewise.
	* tests/quasiquote.test: Likewise.
	* tests/read.test: Likewise.
	* tests/record.test: Likewise.
	* tests/scm.test: Likewise.
	* tests/srfi-1.test: Likewise.
	* tests/srfi-13.test: Likewise.
	* tests/srfi-14.test: Likewise.
	* tests/vector.test: Likewise.

2017-04-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm+test: Factor-out math and vector.
	* module/mes/base-0.mes (quotient): Remove.
	* module/mes/scm.mes (quotient): Add.
	* tests/scm.test: Remove arithmetic/math tests.
	* tests/math.test: New file.
	* GNUmakefile (TESTS): Add it

2017-03-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Have ungetc remember 2 positions.
	* doc/examples/t.c (read_test): Test it.
	* doc/examples/mini-mes.c:
	* mlibc.c (getchar, ungetc): Support 2 ungetc positions.
	* module/mes/libc.mes (getchar, ungetc): Likewise.

2017-04-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Add brk, naive malloc.
	* scaffold/mini-mes.c (gc_init_cells): Use malloc to init g_cells.
	* scaffold/malloc.c: New file.
	* GNUmakefile (malloc, guile-malloc): New targets.
	* module/mes/libc-i386.mes (i386:brk): New function.
	  (i386:libc): Add it.
	* mlibc.c (brk): New function.
	  (malloc): Use it.
	  (realloc): New function.
	* module/mes/libc.mes (malloc, realloc): New functions.

2017-03-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Struct fixes.
	* module/language/c99/compiler.mes (expr->arg, expr->accu, ast->info):
	  Fixes for struct assignment.

2017-03-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Add missing defines.
	* module/language/c99/compiler.mes (mescc): Set STDIN, STDOUT, STDERR,
	  INT_MIN, INT_MAX.

	mini-mes: Update display_.
	* doc/examples/mini-mes.c (display_): Add separator, nicer recursion.
	* mes.c (display_): Update.

	mescc: Struct by value assignment fixes.
	* module/language/c99/compiler.mes (ast->info): Remove g_function
	  hardcoding, fix struct assignment.
	* doc/examples/t.c (struct_test): Test it.

	mescc: Fix struct field comparison.
	* module/language/c99/compiler.mes (expr->accu, ast->info): Some
	  push/pop fixes, fixes struct field comparisons.
	* doc/examples/t.c (struct_test): Test it.

	mescc: Run full scheme reader read-0.mes.
	* lib.c (load_env)[MINI_MES]: Load full reader, module/mes/read-0.mes.
	* GNUmakefile (module/mes/read-0-32.mo): Update dependency.
	* module/mes/mini-0.mes: Remove.
	* doc/examples/t.c (struct_test):
	* module/mes/read-0-32.mo: New file: bootstrap binary reader.

	mescc: Mini-mes (gcc-compiled) runs read-0.mes.
	* module/language/c99/compiler.mes (expr->accu): Add mul.
	  (test->jump->info): Add le, ge.
	  (ast->info): Support int and char* initialization at top level.
	* module/mes/as-i386.mes (i386:accu*base, i386:Xjump-cz,
	  i386:Xjump-ncz): New function.
	* module/mes/as-i386.scm: Export them.
	* doc/examples/t.c (test): Test them.
	* module/mes/libc.mes (ungetc): New function.
	  (getchar): Support it.
	  (assert_fail, isdigit): New functions.
	  (libc): Export them.
	* module/mes/mini-0.mes: Load full reader.
	* mlibc.c (ungetc): New function.
	  (getchar): Support it.
	  (assert_fail, isdigit): New functions.
	* mes.c (list length error lookup_ getchar ungetchar peekchar
	  peek_byte read_byte unread_byte greater_p less_p): Move functions
	  needed to run read-0.mes into core.
	* doc/examples/mini-mes.c: Likewise.
	* lib.c (length, error): Comment-out.
	* math.c (greater_p, less_p): Comment-out.
	* posix.c: (getchar, ungetchar, peekchar, peek_byte, read_byte,
	  unread_byte): Comment-out.
	* reader.c (lookup_): Comment-out.

2017-03-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Cleanup mini-mes build and test.
	* GNUmakefile (guile-cons-mes guile-m guile-main guile-micro-mes
	  guile-mini-mes guile-t guile-tiny-mes): New targets.
	  (clean): Clean them.
	* .gitignore: Ignore them.
	* HACKING: Update.
	* scaffold/tiny-mes.c (bload_env): Read module/mes/tiny-0-32.mo.
	* scaffold/cons-mes.c (simple_bload_env): Likewise.
	* lib.c (dump)[MES_TINY]: Write crafted dump: module/mes/tiny-0-32.mo.
	  (load_env): Read module/mes/mini-0.mes.
	  (bload_env): Read module/mes/read-0-32.mo.
	* module/mes/mini-0.mes: New file.
	* module/mes/tiny-0.mes : New file.

2017-04-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Refactor libc.
	* GNUmakefile (mini-mes): Add include.
	* mlibc.c: New file: libc bits for GNUC -nostdlib.
	* mstart.c: New file: _start for GNUC -nostdlib.
	* scaffold/cons-mes.c: Remove GNUC libc bits.
	* scaffold/m.c: Likewise.
	* scaffold/mini-mes.c: Likewise.
	* scaffold/t.c: Likewise.
	* scaffold/tiny-mes.c: Litkewise.
	* module/language/c99/compiler.mes (libc, i386:libc): Remove.
	* module/language/c99/compiler.scm
	* module/mes/libc-i386.mes: Remove assembly bits.
	  (_start): New function.
	* module/mes/libc-i386.scm: Export it, remove assembly exports.
	* module/mes/as-i386.mes: New file: assembly bits from libc-i386.mes.
	* module/mes/as-i386.scm: New file: export them.
	* module/mes/libc.mes (libc,_start): New functions from compiler.mes.
	* module/mes/libc.scm: Export them.

2017-03-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Refactor ret.
	* module/mes/libc-i386.mes (i386:ret): Refactor.
	* module/language/c99/compiler.mes (ast->info): Use it.

2017-03-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Cache text generation.
	* module/mes/elf-util.mes (functions->text): Add cache.

	mescc: Refactor function-offset.
	* module/mes/elf-util.mes (function-offset): Recurse down.  Factor 5
	  speedup on mini-mes.c.

	mescc: Cache data-offset too.
	* module/mes/elf-util.mes (data-offset): Add cache.

	mescc: Support assignment with comparison.
	* module/language/c99/compiler.mes (expr->accu): Handle assignment -> accu.
	* doc/examples/t.c (test): Test it.
	* doc/examples/mini-mes.c (eval_apply): Use it.

	mescc: Support assignment test.
	* module/language/c99/compiler.mes (test->jump->info): Handle assignment.
	* doc/examples/t.c (test): Test it.

2017-03-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Fix simple value tests.
	* module/language/c99/compiler.mes (test->jump->info): Test accu
	  before jumping.  Fixes simple value tests.

	mescc: Struct by value.
	* build-aux/mes-snarf.scm (symbol->names, function->header,
	  function->environment): Remove struct by value assignment
	  workarounds.
	* module/language/c99/compiler.mes (ast->info): Remove struct by value
	  assignment debug printing.

	mescc: Support generic initializer.
	* module/language/c99/compiler.mes (ast->info): Support generic
	  declaration using initializer.  Supports struct field initializer.
	* doc/examples/t.c (struct_test): Test it.
	* doc/examples/mini-mes.c (call_lambda, eval_apply, write_byte,
	  display_): Use it.  (call_lambda): (eval_apply,
	  list_of_char_equal_p): Use it.

	mescc: Remove last hardcodings for identifiers.
	* module/language/c99/compiler.mes (ident->accu, ident->base):
	  Use local:ptr, type->size to remove hard coding of functionx, c1.
	  (expr->accu): Use type->size to remove hard coding of size byte.
	  (decl->type): Also handle typename, bail out if type not found.
	  (type->size): Print identifier and and bail out if type not found.
	  (formal:ptr): New function.
	  (formals->locals): Use it to set pointer value of parameter.  WAS: 0.
	  (ast->info): Remove functionx hardcoding.
	  (getchar): Rename c1 to c.
	* doc/examples/t.c: Test it.

	mescc: Support function call with enum value.
	* doc/examples/mini-mes.c: Remove debug printing.
	* module/language/c99/compiler.mes (push-global, push-local,
	  push-global-address, push-local-address, push-local-de-ref): Return
	  list of lambda.
	  (push-ident): Support push constant.  Fixes mini-mes,
	  cstring_to_list.
	* doc/examples/t.c (test): Test it.

2017-03-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Fix d-sel comparisons.
	* module/language/c99/compiler.mes (ast->info): Save base while
	computing accu. Fix comparison using d-sel in second argument.
	* doc/examples/t.c: Test it.
	* doc/examples/mini-mes.c (assq): Use it.

	mescc: Fix for character array s[0].
	* module/language/c99/compiler.mes (expr->arg, expr->accu, ast->info):
	  Use type size to calculate index.
	* doc/examples/t.c: Test it.
	* doc/examples/mini-mes.c (cstring_to_list): Simplify.

2017-03-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support mini-mes running scheme program with builtins.
	Mini-mes, compiled with either gcc or mescc, now runs a memory dump of
	this mini-0.mes program

		(begin
		  (write-byte (make-cell 0 0 65))
		  (write-byte (make-cell 0 0 66))
	          (write-byte (make-cell 0 0 67))
	 	  (write-byte (make-cell 0 0 10))
		  #f)

	when read and dumped by (gcc-compiled) mes-32.

	* build-aux/mes-snarf.scm: FIXES ..collapse?
	* module/language/c99/compiler.mes (ast->info): Bail out on unhandled
	  declarations.  Was: verbosely skip.

2017-03-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support [for] itoa.
	* module/mes/libc-i386.mes (i386:accu%base): New function.
	* module/mes/libc-i386.scm: Export it.
	* module/language/c99/compiler.mes (expr->accu): Use it to support mod.
	* doc/examples/t.c (itoa): New function.
	  (test): Test it.
	* doc/examples/mini-mes.c (itoa)[!__GNUC__]: New function.

	mescc: Support do .. while.
	* module/language/c99/compiler.mes (ast->info): Support do-while.
	* doc/examples/t.c (test): Test it.

2017-03-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	core+mini-mes: Replace manual snippets by snarfed includes.
	* build-aux/mes-snarf.scm (symbol->source, function->header,
	  function->source, function->environment): Add workarounds to
	  avoid struct-copy initializers.
	* GNUmakefile (mini-mes): Snarf symbols and functions.
	* scaffold/mini-mes.c: Include mini-mes.h, mini-mes.symbols.h,
	  mini-mes.symbols.i, mini-mes.i, mini-mes.environment.i.
	  Add snarfable symbol/special definitions.
	  (type_t): Prefix all types with `T', update users.
	  (assert_defined, gc_push_frame, gc_peek_frame, gc_init_cells): Mark
	  as internal.
	* mes.c (type_t): Prefix all types with `T', update users.
	* scaffold/mini-mes.c (eq_p, type_, car_, cdr_,
	  list_of_char_equal_p, lookup_macro, write_byte): New functions (from
	  mes.c).
	  (assq): Add debugging, workaround.

2017-03-05  Matt Wette  <matt.wette@gmail.com>

	nyacc: removed start from lalr-spec -- not needed

2017-03-04  Matt Wette  <matt.wette@gmail.com>

	nyacc: working javascript interpreter in guile

2017-03-03  Matt Wette  <matt.wette@gmail.com>

	nyacc: lex fixes for char-lit

2017-03-02  Matt Wette  <matt.wette@gmail.com>

	nyacc: cleaned up documentation

2017-03-01  Matt Wette  <matt.wette@gmail.com>

	nyacc: working on C99 UG as a memo

2017-02-28  Matt Wette  <matt.wette@gmail.com>

	nyacc: new release 0.76.5

	nyacc: fixed bug in pretty-print-c99 wrt i-sel

2017-02-25  Matt Wette  <matt.wette@gmail.com>

	nyacc: merge from 0.76.4

2017-02-24  Matt Wette  <matt.wette@gmail.com>

	nyacc: new release 0.76.4

2017-02-23  Matt Wette  <matt.wette@gmail.com>

	nyacc: new release 0.76.3

	nyacc: more bugs in cpp tokl->string

	nyacc: new release 0.76.2

	nyacc: fixed more CPP issues

2017-02-22  Matt Wette  <matt.wette@gmail.com>

	nyacc: new release 0.76.1

	nyacc: fixed C99 CPP to deal with numbers correctly

2017-02-20  Matt Wette  <matt.wette@gmail.com>

	nyacc: merge master 0.76.0

2017-02-19  Matt Wette  <matt.wette@gmail.com>

	nyacc: new release 0.76.0

	nyacc: worked c99/util2.scm udecl->mspec

	nyacc: new release 0.75.6

	nyacc: fixed some c99/util2 items

2017-02-17  Matt Wette  <matt.wette@gmail.com>

	nyacc: merged in 0.75.5 from master and inc version

	nyacc: new release 0.75.5

	nyacc: new release 0.74.4

	nyacc: minor cpp fixes

2017-02-16  Matt Wette  <matt.wette@gmail.com>

	nyacc: merge from 0.75.3

	nyacc: new release 0.75.3

	nyacc: new release 0.75.2

	nyacc: new release 0.75.1

	nyacc: new release 0.74.0

	nyacc: I think cpp is working now

2017-02-15  Matt Wette  <matt.wette@gmail.com>

	nyacc: working cpp now, I hope

2017-02-12  Matt Wette  <matt.wette@gmail.com>

	nyacc: CPP not yet working for file mode

2017-02-11  Matt Wette  <matt.wette@gmail.com>

	nyacc: working on cpp issues

2017-02-05  Matt Wette  <matt.wette@gmail.com>

	nyacc: C99 CPP for code is better

2017-01-20  Matt Wette  <matt.wette@gmail.com>

	nyacc: starting to work on reframing

2017-01-19  Matt Wette  <matt.wette@gmail.com>

	nyacc: more CPP fixes

2017-01-17  Matt Wette  <matt.wette@gmail.com>

	nyacc: redesign lang/c99/cppbocy.scm:scan-cpp-input

2017-03-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support goto in while body.
	* module/language/c99/compiler.mes (ast->info): Support goto in while
	  body.
	* doc/examples/t.c (test): Test it.

2017-03-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	core+mini-mes: Move function name to struct function.
	* module/language/c99/compiler.mes (expr->arg): Handle char arguments.
	* doc/examples/cons-mes.c (struct function): Add name field.
	* doc/examples/mini-mes.c: Likewise.
	  (mes_builtins): Update.
	* mes.c: Likewise.
	* build-aux/mes-snarf.scm: Update.

2017-03-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support strings in struct initialization.
	* module/mes/elf-util.mes (add-s:-prefix, drop-s:-prefix): New functions.
	* module/mes/elf-util.scm: Export them.
	* module/language/c99/compiler.mes (string->global): Add `s:' prefix
	  to global strings.  Update users.
	  (expr->arg): Update.
	  (expr->accu): Handle string expressions.
	  (initzer->global): New function.
	  (struct-field): Handle string field.
	* doc/examples/t.c: Test it.
	* doc/examples/mini-mes.c: Use it.

	dun!

2017-03-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Display sexps better.
	* module/mes/elf.mes (make-elf): Only display data sections smaller
	  than 200 bytes.
	* doc/examples/mini-mes.c (simple_bload_env): Read mini-0-32.mes.
	* doc/examples/cons-mes.c (display_): Support symbols and specials.
	* doc/examples/tiny-mes.c: Likewise.
	* lib.c:
	* mes.c:

2017-03-06  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Compile all of mini-mes.
	* module/language/c99/compiler.mes (case->jump-info): Support single statement.
	* module/mes/elf-util.mes (function-prefix): Workaround for reversed
	  functions.  FIXME!
	* module/mes/elf.mes:
	* scaffold/mini-mes.c (type_t): Rename FUNCTION to TFUNCTION for Nyacc.
	  Add missing symbols.
	  (eval_apply): Uncomment most.
	* scaffold/tiny-mes.c:
	* scaffold/cons-mes.c: Remove cruft.

2017-03-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support struct assignment.
	* module/mes/libc-i386.mes (i386:base-address->accu-address,
	  i386:accu+n, i386:base+n): New functions.
	* module/mes/libc-i386.scm: Export them.
	* module/language/c99/compiler.mes (ast->info): Use them.
	* doc/examples/t.c: Test them.
	* doc/examples/cons-mes.c: Drop workarounds.
	* doc/examples/mini-mes.c: Likewise.
	* mes.c:

	mescc: Fix add, sub, lshift.
	* module/language/c99/compiler.mes (expr->accu): Fix add, sub, lshift.
	* doc/examples/t.c: Test them.
	* doc/examples/cons-mes.c:
	* doc/examples/mini-mes.c:

2017-02-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support any expression as arg.
	* module/language/c99/compiler.mes (expr->arg): Also push parameter,
	  always return info.
	  (ast->info): Loop over args.  Fixes using function calls in arguments.
	* module/mes/libc-i386.mes (i386:push-arg): Remove.
	  (i386:call, i386:call-accu): Remove arguments parameter.
	* doc/examples/t.c: Test it.

2017-03-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Rename expr->accu*.
	* module/language/c99/compiler.mes (expr->accu*): Rename from expr->accuX.

2017-04-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Fixes for goto.
	* module/mes/libc-i386.mes (XXjump): New function.
	* module/mes/libc-i386.scm: Export it.
	* module/language/c99/compiler.mes (case->jump-info, ast->info): Use it.
	* scaffold/t.c: Test it.
	* GNUmakefile (cons-mes): New target.
	* scaffold/cons-mes.c: New file.
	* scaffold/mini-mes.c:

2017-02-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Mini-mes runs (cons 0 1) dump.
	* module/mes/libc-i386.mes (i386:Xjump-z, i386:Xjump-c,
	  i386:Xjump-nc): New functions.
	* module/mes/libc-i386.scm: Export them.
	* module/language/c99/compiler.mes (case->jump-info, test-jump->info,
	  ast->info): Use them.
	* doc/examples/t.c: Test it.
	* doc/examples/mini-mes.c: Run it.

2017-01-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Run mini-mes.
	* .gitignore: Ignore tiny-mes and tiny .mo's.
	* doc/examples/tiny-mes.c: Simplify.
	* doc/examples/mini-mes.c: Use simplifications from tiny-mes.
	* doc/examples/t.c (read_test, struct_test): New functions.
	  (test): Add tests for arena, g_cells globals.
	* module/mes/elf-util.mes (dec->hex): New function.
	  (lambda/label->list): Add text-address parameter.  Update callers.
	* module/language/c99/compiler.mes (make, info, clone): Add init field.
	  (.init): New function.
	  (ident->accu): Add exceptions for globals.
	* module/mes/elf-util.scm: Export it.
	* module/mes/libc-i386.mes (i386:accu->base-ref,
	  i386:byte-accu->base-ref, i386:accu->base-ref+n,
	  i386:accu->global-ref, i386:global-ref->accu, i386:global-ref->base,
	  i386:global-add, i386:global->accu):, i386:local-ref->accu,
	  i386:local-ptr->accu, i386:local-ptr->base): New functions.
	* module/mes/libc-i386.scm: Export them.

2017-01-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Add gdb assembly debugging info.
	* HACKING: Add gdb assembly debugging info.

2017-01-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	doc: Add fosdem talk.
	* .gitignore: Ignore beamer/tex stuff.
	* doc/fosdem/fosdem.org: New file.
	* doc/fosdem/GuixSD.png: New file.
	* doc/fosdem/LISP-1-5-page-13-bottom.png: New file.
	* doc/fosdem/LISP-1.5-page-13-bottom.png: New file.
	* doc/fosdem/LISP-1.5-page-13.pdf: New file.
	* doc/fosdem/LISP-1.5-page-13.png: New file.
	* doc/fosdem/beamercolorthemeX.sty: New file.
	* doc/fosdem/beamerthemeX.sty: New file.
	* doc/fosdem/bootstrap-graph.png: New file.
	* doc/fosdem/egg.jpeg: New file.
	* doc/fosdem/egg.png: New file.
	* doc/fosdem/egg.xcf: New file.
	* doc/fosdem/fosdem.pdf: New file.
	* doc/fosdem/fsb-logo-guile-guix-gnu.png: New file.
	* doc/fosdem/fsb-logo-guile-guix-gnu.xcf: New file.
	* doc/fosdem/fsb-logo-guile-guix-mes.png: New file.
	* doc/fosdem/fsb-logo-guile-guix-mes.xcf: New file.
	* doc/fosdem/fsb-logo.png: New file.
	* doc/fosdem/guix-build-bootstrap-tarballs.log: New file.
	* doc/fosdem/html.sty: New file.
	* doc/fosdem/mes.png: New file.
	* doc/fosdem/mes.xcf: New file.

	mescc: bugfix: arg as function call.
	* module/language/c99/compiler.mes (expr->arg):

2017-01-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	mini-mes: gcc: run (cons 0 1).

2017-01-15  Matt Wette  <matt.wette@gmail.com>

	nyacc: new release 0.74.3

	nyacc: CPP working better now

2017-01-14  Matt Wette  <matt.wette@gmail.com>

	nyacc: something working

	nyacc: still debugginug

2017-01-12  Matt Wette  <matt.wette@gmail.com>

	nyacc: working # and ## I think, but lots of debug output too

2017-01-11  Matt Wette  <matt.wette@gmail.com>

	nyacc: exceptions worked on.. still need to fix #

	nyacc: new release 0.74.2

	nyacc: fixed C99 use of 'defined XYZ' (no parens)

	nyacc: merged master

	nyacc: working on fixes

2017-01-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Read and display sexp dumped by mes.
	* lib.c (dump)[MES_HACK]: Dump small hello-world sexp, to be handled by
	* doc/examples/tiny-mes.c (display_): New function.
	* module/mes/libc-i386.mes (i386:accu->base, i386:mem->accu,
	  i386:mem+n->accu): New functions.
	* module/mes/libc-i386.scm: Export them.
	* GNUmakefile (mes-32): New target.

2017-01-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support global pointer assignments.
	* module/mes/libc-i386.mes (base->accu-ref, local-ref->base): New functions.
	* module/mes/libc-i386.scm: Export them.
	* module/language/c99/compiler.mes (base->ident-ref, ident-ref->base):
	  New functions.

	mescc: Add data as loadable ELF section.
	* module/mes/elf.mes (make-elf): Add data as loadable section too.

	mescc: Support switch.
	* module/language/c99/compiler.mes (case->jump-info): New function.
	  (ast->info): Use it.
	* doc/examples/t.c (swits): Test it.

2017-01-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Handle enums.
	* module/language/c99/compiler.mes (<types>, <constants>): New slots for info.
	 (make, clone): Add them.
	 (.types, .constants): New accessors.

	mescc: Update for.
	* module/language/c99/compiler.mes (ast->info): Rewrite for to use
	  test->jump->info.

2017-01-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm: Add string-delete.
	* module/srfi/srfi-13.mes (string-delete): New function.

2017-04-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Add open/read C-tests.
	* scaffold/m.c: New file.
	* scaffold/tiny-mes.c: New file.
	* GNUmakefile (m, tiny-mes): New targets.
	* scaffold/micro-mes.c: Update gcc-libc bits.
	* scaffold/mini-mes.c: Likewise.

2017-01-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Support ?.
	* module/language/c99/compiler.mes (ast->info): Support cond-expr.
	* scaffold/t.c (test): Test it.

	mescc: Support open, read.
	* module/mes/libc-i386.mes (i386:write): Fix comment.
	  (i386:open, i386:read): New functions.
	* module/mes/libc-i386.scm: Export them.
	* module/language/c99/compiler.mes (i386:libc): Add them.
	  (getchar, putchar): New libc functions.
	  (libc): Add them.

	mescc: Support globals.
	* module/language/c99/compiler.mes (write-any): Catch writing of
	  procedure and give more debug information.
	  (ref-local, ref-global): Remove.
	  (push-global-ref, push-global, push-ident-ref): New functions.
	  (push-ident): New function.
	  (expr->arg): Use them.
	  (ident->accu, ident->accu, accu->ident, value->ident, ident->base):
	  Take info parameter, also handle globals.
	  (ident-address->accu, ident->global, cstring->number): New functions.
	  (ast->info): Update.
	* module/mes/libc-i386.mes (i386:ret-local): Remove.
	  (i386:push-global-ref): Rename from i386:ref-global.
	  (i386:push-local): Rename from i386:ref-local.
	  (i386:value->local): Rename from i386:local-assign.
	  (i386:push-global, i386:push-local-ref, i386:value->global,
	  i386:local-address->accu): New functions.
	* module/mes/libc-i386.scm: Export them.

2017-01-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Small ELF tweaks allowing debugging with gdb.
	* module/mes/elf.mes (make-elf): Change note section to comment.  Fixes
	  readelf.  Add SHF-ALLOC to .text and .data.

2017-01-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Handle && in if and while.
	* scaffold/t.c (test): Add strcmp tests.
	* module/language/c99/compiler.mes (expr->arg):
	  (test->jump->info): New function.
	  (ast->info): Use it.
	* module/mes/libc-i386.mes (i386:global->accu):
	  (i386:base-mem->accu): Rename from i386:mem->accu.
	  (i386:byte-base-mem->accu): Rename from i386:base-mem->accu.
	  (i386:accu-not, i386:global->accu, i386:xor-accu): New functions.
	* module/mes/libc-i386.scm: Export them.

2017-01-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Proper support for i++,++i,i--,--i.
	* module/language/c99/compiler.mes (ast->info): Bugfix: locals.
	  Add i--, --i.  Properly support i++, ++i.
	* module/mes/libc-i386.mes (i386:function-locals): Support 8 local vars.
	* scaffold/t.c (test): Test it.

2017-04-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Beginning of expression and test template.
	* scaffold/t.c: New file.
	* GNUmakefile (mescc-check, t-check): New targets.
	* module/language/c99/compiler.mes (write-any): Catch weirdness.
	  (make): Add <function> slot.
	  (.function): New accessor.
	  (clone): Handle it.
	  (function->info): Set it.
	  (ast->info): Make tests generic in if, for, while.  Add goto, label,
	  !, ==, !=, -, &&.
	* module/mes/elf-util.mes (lambda/label->list): New function.
	  (text->list): Use it.
	  (functions->text, function-prefix): New function.
	  (function-offset): Use it.
	  (label-offset): New function.
	* module/mes/elf-util.scm (mes): Export them.
	* module/mes/elf.mes (make-elf): Use text->list.
	* module/mes/libc-i386.mes (eputs, puts): Remove.
	  (i386:byte-base-sub): Rename from sub-byte-base.
	  (i386:byte-jump-z): Rename from i386:Xjump-byte-z.
	  (i386:byte-mem->accu): Rename from i386:Xmem-byte->accu.
	  (i386:byte-mem->base): Rename from i386:Xmem-byte->base.
	  (i386:accu->local, i386:accu-non-zero?, i386:accu-zero?,
	  i386:base-sub, i386:byte-sub-base, i386:jump-c, i386:jump-cz,
	  i386:jump-nc, i386:jump-ncz, i386:byte-mem->base, i386:sub-base,
	  i386:test-accu, i386:test-base, i386:test-jump-z, i386:value->base,
	  i386:xor-zf): New functions.

2017-01-05  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Have micro-mes use strcmp to print help.
	* doc/examples/micro-mes.c (main): Add --help.
	* module/language/c99/compiler.mes (info?): New function.
	  (expr->accu): Handle function call and sub.
	  (ast->info): Handle if not, and, de-ref, eq, sub, return f ().
	* module/mes/libc-i386.mes (i386:accu-zero?, i386:Xmem-byte->accu,
	  i386:Xmem-byte->base, i386:jump-byte-nz, i386:jump-byte-z,
	  i386:test-byte-base, i386:Xjump-byte-z, i386:sub-byte-base): New
	  functions.
	* module/mes/libc-i386.scm: Export them.

	mescc: Compile specific for loop.
	* module/language/c99/compiler.mes (ast->info): Handle for, pre-inc.
	* GNUmakefile (main): New target.
	* doc/examples/main.c:
	  (exit, write, strlen,puts)[__GNUC__]: New functions; import from micro-mes.c
	  (_start): New function.

2017-01-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Refactor compiler.
	* module/language/c99/compiler.mes (make, clone): Lightweight functional
	  GOOPS-like list-based info structure.
	  (make-text+globals+locals): Remove.
	  (ast->info): Rename from statement->text+globals+locals, refactor.
	  Update callers.
	  (function->info): Rename from function->globals, refactor.  Update
	  callers.
	  (ast-list->info): New function.

2017-01-07  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm: Fix psyntax/keyword/optargs interaction bug.
	* module/mes/psyntax-0.mes (self-evaluating?): Add keyword?.
	* module/mes/pmatch.mes (mes): Add missing psyntax dependency.
	* module/mes/optargs.scm (rest-arg->keyword-binding-list): Make error
	  messages non-constant.
	* tests/optargs.test ("clone <info>"): New test.

2017-01-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Compile file supplied on command line.
	* scripts/mecc.mes: Pass (command-line) to main.

	nyacc: Add cpp to c99 mes module.
	* module/nyacc/lang/c99/parser.mes: Include (nyacc lang c99 cpp).

	mescc: Rename symbols to globals.
	* module/language/c99/compiler.mes:

	mescc: Have micro-mes use if not to segfault.
	* module/language/c99/compiler.mes (write-any): Check explicitly on
	  number?, report error otherwise.
	  (statement->text+symbols+locals): Remove statement-offset.
	  Handle compounds.  Handle very specific if.
	  (function->symbols): Remove unused text-offset.
	* doc/examples/micro-mes.c (main): If argc > 1 print argv1.  Fixes
	  segfault :-)
	* module/mes/elf-util.mes (symbols->text): Loop rather than map,
	  feed text-offset.
	* module/mes/libc-i386.mes (i386:local-test, i386:jump-le): New
	  functions.
	* module/mes/libc-i386.scm: Export them.

	mescc: Have micro-mes print argv.
	* module/language/c99/compiler.mes (expr->arg): Bugfix argv: Use
	  size=4 (int).
	  (statement->text+symbols+locals): Bugfixes: array-ref, initialize with
	  immediate, initialize with local.
	  (formals->locals): Bugfix: formals counted down from -1 [WAS: down to
	  -1].
	* module/mes/libc-i386.mes (i386:call): Reverse args pushes to match
	  formals index changes.
	  (i386:write): Update for changed formals push order.
	  (i386:mem->accu, i386:value->accu): New functions.
	* module/mes/libc-i386.scm (mes): Export them.
	* doc/examples/micro-mes.c (eputs, puts, fputs): Make identical with
	  mescc's implementations.
	  (main): Print argv[0] and (unconditionally; crash if not given) argv[1].

	mescc: Have micro-mes print argc.
	* module/language/c99/compiler.mes (accu->ident): New function.
	  (statement->text+symbols+locals): Use it to implement initialization
	  with immediate, local.
	  (_start): Call main with argc,argv [WAS: 0,0].
	* module/mes/libc-i386.mes (i386:push-accu, i386:accu->local): New
	  functions.
	* module/mes/libc-i386.scm: Export them.
	* doc/examples/micro-mes.c (main): Return argc as exit status.

	mescc: Support literal .byte in asm ().
	* module/language/c99/compiler.mes (expr->arg): Handle array-ref (int
	  only).
	  (byte->hex, asm->hex): New functions.
	  (statement->text+symbols+locals): Use it to implement asm ().

	mescc: Remove data section from disassembly.
	* module/mes/elf.mes (make-elf): Remove executable bit from data.

2017-01-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Formals, local variables.
	* module/language/c99/compiler.mes (statement->text+symbols+locals):
	  Rename from statement->text+symbols.  Handle locals.
	  (formals->text): Add proper function preamble.
	  (formals->locals): Add formals as locals.
	  (expr->accu, ident->accu, ident->base, ident-ref, global-ref): New
	  functions.
	  (strlen, eputs, fputs, puts): New functions.
	  (libc): New variable.
	  (i386:libc): Rename from libc.  Remove eputs and puts.
	* module/mes/libc-i386.mes (i386:eputs, i386:puts: Remove.
	  (i386:call, i386:ret): Handle locals as argument.
	  (i386:function-locals, i386:function-preamble, i386:jump,
	  i386:local->accu, i386:local-add, i386:local-assign,
	  i386:local->base, i386:ref-global, i386:ref-local, i386:ret-local,
	  i386:mem-byte->accu, i386:test-jump, i386:write): New functions.
	* module/mes/libc-i386.scm: Export them.

	mescc: Nicer functions/parameters.
	* module/mes/libc-i386.mes (eputs, exit, puts): Save stack pointer,
	  fill parameter registers from stack.
	* module/language/c99/compiler.mes (formal->text): Fill parameter
	  registers from stack memory.
	  (formals->text): Save stack pointer.

	mini-mes: Parse with Nyacc.
	* doc/examples/mini-mes.c: Parse with Nyacc.

2017-04-02  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Scaffolding of Nyacc compile experiments.
	* scaffold/micro-mes.c: New file.
	* scaffold/mini-mes.c: New file.
	* GNUmakefile (mini-mes, micro-mes): New targets.
	* .gitignore: Ignore them.

	mescc: Nyacc updates, factor-out elf-util.
	* module/mes/bytevectors.mes
	* module/mes/elf-util.mes: New file.
	* module/mes/elf.mes: Use it.
	  (make-elf): Generate symbol-table string-table.
	* module/mes/elf-util.scm: New file.
	* module/mes/elf.scm: Use it.
	* module/language/c99/compiler.mes: Include it.
	* module/language/c99/compiler.scm: Include it.
	* module/mes/libc-i386.mes (call, eputs, exit, puts): New functions.
	* module/mes/libc-i386.scm: Export them.

2016-12-31  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: Use Nyacc frontend.
	* module/language/c99/compiler.mes: New file.
	* module/language/c99/compiler.scm: Include it.
	* module/mes/elf.mes: Move (mes-use-module) into cond-expand.
	* module/mes/elf.scm: New file.
	* module/mes/libc-i386.scm: New file.
	* module/nyacc/lang/c99/parser.mes: Add missing module includes.
	* module/nyacc/lang/util.mes: Add missing module include.
	* scripts/mescc.mes: Use Nyacc.
	* guile/mescc.scm: New file.
	* GNUmakefile (guile-mescc): Run it.

2017-01-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm: Avoid xpath's shadowing of filter.
	* module/sxml/xpath.scm (xpath:filter): Rename from filter.  Fixes
	  shadowing of core filter.

2017-01-09  Matt Wette  <matt.wette@gmail.com>

	nyacc: fixes didn't get in in 0.74.0

	nyacc: ugh. fixes did not take, why?

2017-01-08  Matt Wette  <matt.wette@gmail.com>

	nyacc: new release 0.74.0

	nyacc: minor fixes

	nyacc: lots of C99/CPP fixes. now more robust for code mode

	nyacc: lots of fixes to make CPP more robust; now need to test

2017-01-06  Matt Wette  <matt.wette@gmail.com>

	nyacc: updates for cpp-ok/not-ok

2017-01-02  Matt Wette  <matt.wette@gmail.com>

	nyacc: fixed c99/CPP bug: need to skip space before lparen

	nyacc: have something working for in-place include

2017-01-01  Matt Wette  <matt.wette@gmail.com>

	nyacc: working on cpp-include fix

2016-12-31  Matt Wette  <matt.wette@gmail.com>

	nyacc: creating fixes for 0.73.0

2016-12-26  Matt Wette  <matt.wette@gmail.com>

	nyacc: new release 0.73.0

	nyacc: misc updates; see ChangeLog

2016-12-03  Matt Wette  <mwette@nautilus.championbroadband.com>

	nyacc: multiple fixes

2016-08-09  Matt Wette  <matthew.wette@verizon.net>

	nyacc: starting devel on 0.72.0

2016-12-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	nyacc: Move README.nyacc.
	* module/nyacc/README.nyacc: Moved from README.nyacc.

	nyacc: Add README.nyacc.
	* README.nyacc: New file.

2016-12-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	tests: Move (ice-9 syncase) into cond-expand.
	* tests/psyntax.mes: Move (ice-9 syncase) into cond-expand.  Fixes
	  guile-2 deprecation messages.

2017-03-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	nyacc: Move (ice-9 syncase) into cond-expand.
	* module/nyacc/lalr.scm: Move (ice-9 syncase) into cond-expand.  Fixes
	  guile-2 deprecation messages.
	* module/nyacc/lang/c99/cpp.scm: Likewise.
	* module/nyacc/lang/c99/parser.scm: Likewise.
	* module/nyacc/lex.scm: Likewise.

2017-01-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Move GNUisms inside #if.
	* mes.c: Move GNUisms inside #if, add Nyacc #ifs.
	 (tmp_num2, tmp_num3): Remove.
	 (make_tmps): Update.
	 (g_free): Make simple int.  Update users.
	* lib.c: Update users.
	* build-aux/mes-snarf.scm (GCC?): New switch to enable GNU extensions.

2017-01-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	repl: Fix expand in repl.
	* module/mes/repl.mes (repl): Fix expand.  Remove sc-expand.

2017-01-03  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm: Error throws rather than hard exit.
	* module/mes/read-0.mes (read-character, read-string): Call error.
	* module/mes/scm.mes (error): Call core:error instead of exit.
	  (syntax-error): Likewise.
	* module/mes/repl.mes (repl): Move read into catch.

2016-12-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	repl: Use exception handling.
	* module/mes/repl.mes (repl): Use catch to prevent exit upon error.

	core: Throw exceptions rather than asserts.
	* lib.c (error): Throw instead of assert.
	  (check_formals, check_apply): Update.
	* mes.c (scm_symbol_unbound_variable, scm_symbol_not_a_pair,
	  scm_symbol_system_error, scm_symbol_wrong_number_of_args,
	  scm_symbol_wrong_type_arg, scm_symbol_unbound_variable): New symbols.
	  (car, cdr, set_cdr_x, set_env_x, eval_apply, gc_up_arena): Update.

	core+scm: Implement exception handling.
	* mes.c (scm_symbol_throw): New symbol.
	* module/mes/catch.scm (catch, throw): Implement [WAS: syntactic sugar].
	  (make-exception, exception?, exception-key, exception-args): Remove.
	* tests/catch.test ("catch", "catch 22"): Add tests.
	* module/mes/base-0.scm: Include it.

	Revert "core: Display me debuggor CPS+CC."
	This reverts commit 6c327b5bdceae6fc59ac8cce4aed99ea0a491846.

2016-12-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Display me debuggor CPS+CC.
	Having display in the core is handy for debugging.
	This is a courtesy commit intended to prevent bitrot.

	* GNUmakefile (mes.o): Depend on display.
	* mes.c: Include display.
	* display.c: New file.

2016-12-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Add continuations, call/cc.
	* mes.c (type_t): Add CONTINUATION.
	  (scm_t): Add continuation;
	  (scm_call_with_current_continuation): New symbol.
	  (scm_symbol_call_with_current_continuation): New special.
	  (g_continuations): New global
	  (CONTINUATION): New field accessor.
	  (MAKE_CONTINUATION): New make_cell helper.
	  (car_): Update.
	  (eval_apply): Implement call/cc.
	* module/mes/display.mes (display): Handle continuations.
	* module/mes/type-0.mes (<cell:continuation>): New type.
	  (cell-type-alist): Add it.
	  (continuation?): New function.
	* tests/base.test ("call/cc"): New test.

	core: Rewrite eval_apply in continuation passing style.
	* mes.c (scm_vm_evlis, scm_vm_evlis2, scm_vm_evlis3, scm_vm_apply,
	  scm_vm_apply2, scm_vm_eval, scm_vm_eval_set_x, scm_vm_eval_macro,
	  scm_vm_eval2, scm_vm_macro_expand, scm_vm_begin,
	  scm_vm_begin_read_input_file, scm_vm_begin2, scm_vm_if,
	  scm_vm_if_expr, scm_vm_call_with_values, scm_vm_call_with_values2,
	  scm_vm_return): New specials.
	  (scm_vm_eval_car, scm_vm_eval_cdr, scm_vm_eval_cons,
	  scm_vm_eval_null_p)[PRIMITIVE-EVAL]: New specials.
	  (eval_apply_t, g_target): Remove.
	  (push_cc): New function.
	  (eval_apply): Rewrite.
	  (vm_call, eval_env, apply_env, eval_env, macro_expand_env, begin_env,
	  call_with_values_env): Remove.
	* posix.c (stderr_): Update.
	* reader.c (read_input_file_env): Update.
	* module/mes/base-0.mes: Update.

2017-01-04  Jan Nieuwenhuizen  <janneke@gnu.org>

	Support radix for string->number, number->string.
	* module/mes/scm.mes (string->number, number->string): Support radix.

	Add string-take, string-drop.
	* module/srfi/srfi-13.mes (string-take, string-drop): New functions.

	core: Stderr_ also print numbers.
	* posix.c (stderr_): Handle numbers.

	Bugfixes bytevectors.
	* math.c (modulo): Modulo of negative value correctly.
	* module/mes/bytevectors.mes (bytevector-u32-native-set!):
	  (bytevector-u16-native-set!): Use ash instead of quotient.

	Append-map: handle multiple list.
	* module/srfi/srfi-1.mes (append-map): Add optional rest argument.

	core: Move GNUisms inside #if.
	* mes.c: Move GNUisms inside #if, add Nyacc #ifs.
	 (tmp_num2, tmp_num3): Remove.
	 (make_tmps): Update.
	 (g_free): Make simple int.  Update users.
	* lib.c: Update users.
	* build-aux/mes-snarf.scm (GCC?): New switch to enable GNU extensions.

	Add drain-input.
	* module/mes/guile.mes (drain-input): New function.

	Bugfix for reading #\*eof* character.
	* module/mes/read-0.mes (read-character): Bugfix for #\*eof*.

	core: Expose command line.
	* mes.c (scm_symbol_argv): New symbol
	  (main): Use it to add argv to environment.
	* module/mes/base.mes (command-line): New function.

	Include srfi-13 in base.
	* module/mes/base-0.mes: Include srfi-13.

	Add filter-map.
	* module/srfi/srfi-1.mes (filter-map): New function.

	Add srfi-1:iota.
	* module/srfi/srfi-1.mes (iota,srf-1:iota): New function.

	Add pretty-print from Guile.
	* module/mes/pretty-print.scm: Import.
	* module/mes/pretty-print.mes: Include it.
	* AUTHORS: Mention it.

	Add make-string, object->string.
	* module/mes/guile.mes (make-string, object->string): New functions.

	Add list-set!, string-set!
	* module/mes/scm.mes (list-set!, string-set!): New functions.

	Fix core:car, core:cdr for specials.
	* mes.c (car_, cdr_): Return special.  Fixes string->list, returning nil.
	* tests/scm.test ("string-length", "string->list"): New tests.

	core: Add continuation on stack.
	* mes.c (r3): New stack variable.
	  (mes_g_stack): Initialize it.
	  (gc_push_frame): Add it.
	  (gc_peek_frame): Set it.

	core: Uniformize calling of apply.
	* mes.c (eval_apply): Have apply take one argument, like all other vm
	  functions: r1; cons of function f and argument list x.  Sorry John.
	  (r2): Repurpose as save/load register.  Update users.
	  (r3): Remove.
	  (vm_call): Remove p2.  Update callers.

	core: Refactor stack handling.
	* mes.c (gc_pop_frame, gc_push_frame): New Functions.
	  (gc_frame, gc_stack): Remove.
	  (vm_call): Update callers.
	* lib.c (dump, bload_env): Update callers.

	Add simple-format.
	* module/mes/display.mes (simple-format, format): New functions.

	Display: If possible, show name of closure.
	* module/mes/display.mes (display): Lookup closure's name and display it.

2016-12-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	Update documentation.
	* doc/ANNOUNCE-0.4: New file.
	* NEWS: Typo.

	guix hash: 1jpm8m8y2dqsl3sc6flf8da4rpdrqh6zgr2mghzjw0lg34v1r21j

	Release 0.4.
	* configure (VERSION): Bump.

	Remove hardcoded duplication of version.
	* GNUmakefile (CPPFLAGS): Include VERSION.
	* mes.c (main): Use it.  Add --dump and --load to --help.
	  (scm_symbol_mes_prefix, scm_symbol_mes_version): New sybols.
	  (mes_symbols): Use them to set prefix and version.
	* module/mes/base-0.mes (effective-version): Use %version.
	* module/mes/repl.mes (welcome): Likewise.

2016-12-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	Update documentation.
	* HACKING: Update status, some ideas where to go next.
	* NEWS: Update status.
	* README: Update.
	* doc/ANNOUNCE: Move from top.
	* doc/ANNOUNCE-2: Likewise.
	* doc/ANNOUNCE-0.3: New file.

	make: Install nyacc scripts too.
	* make/install.make (install): Add scripts/nyacc.mes, scripts/nyacc-calc.mes.

2016-12-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "core: Display me debuggor."
	This reverts commit 53ec23a0edcfdcb7dd4e32277e5a24e0a8fab5dd.

2016-12-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Display me debuggor.
	Having display in the core is handy for debugging.
	This is a courtesy commit intended to prevent bitrot.

	* GNUmakefile (mes.o): Depend on display.
	* mes.c: Include display.
	* display.c: New file.

2016-12-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "core: FAT_C_READER: Show your speed."
	This reverts commit 5a9b9ac36bd33e497272b287ab1f0db715e01d38.

2016-12-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: FAT_C_READER: Show your speed.
	scripts/nyacc.mes runs in 4s rather than 18s with fat C reader.
	This is a courtesy commit intended to prevent bitrot.

	* mes.c (quasiquote, unquote, unquote_splicing, syntax, quasisyntax,
	  unsyntax, unsyntax_splicing): Add symbols.
	* reader.c (char_eof, char_nul, char_alarm, char_backspace, char_tab,
	  char_newline, char_vtab, char_page, char_return,
	  char_space)[FAT_C_READER]: New global variables.
	  (make_keyword, read_block_comment, read_character, read_hex,
	  append_char, read_string, fat_c_lookup_, fat_c_eat_whitespace,
	  fat_c_read_word): New functions.
	  (eat_whitespace_, read_word_, lookup_)[FAT_C_READER]: Add hook.

2016-12-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	Refactor reader.
	* module/mes/read-0.mes (read-hash): New function.
	  (read-word): Use it.
	  (eat-whitespace): Rewrite.
	  (display): Minimal implementation through core.
	* lib.c (stderr_): Support printing of strings while booting.

	core: Remove c3+r abbreviatons.
	* lib.c (caaar, caadr, caddr, cdadr, cadar, cddar, cdddr, cadddr):
	  Remove.
	* mes.c: Rewrite callers
	* module/mes/read-0.mes: Rewrite callers.
	* module/mes/base.mes (caaar, caadr, caddr, cdadr, cadar, cddar, cdddr,
	  cadddr): New function.

	core: Move dump, load, bload to lib.c.
	* lib.c (dump, load, bload): Move from mes.c
	* mes.c (dump, load, bload): Remove.

	core: Add getenv, verbose module loading on MES_DEBUG.
	* mes.c (MAKE_REF, MAKE_STRING): Oops, remove stray semicolon.
	* posix.c (getenv_): New function.
	* module/mes/base-0.mes (load): Use it to switch on MES_DEBUG=1.
	  (mes-use-module): Remove commented-out code.

	core: Add some error checking.
	* lib.c (length): Return -1 for non-proper lists.
	  (error): New function.
	  (assert_defined): Use it.
	  (check_formals, check_apply): New functions.
	* mes.c (car, cdr, set_cdr_x, set_env_x, eval_apply): Add error check.
	* srfi/srfi-1.mes (member): New function.
	* tests/srfi-1.tests ("member"): New test.

	core: Move reader and posix functions from mes.c
	* mes.c (getchar, ungetchar, peekchar, peek_byte, read_byte,
	  unread_byte, write_byte, read_input_file_env_, read_input_file_env):
	  Remove.
	* posix.c (getchar, ungetchar, peekchar, peek_byte, read_byte,
	  unread_byte, write_byte): Move from mes.c.
	* reader (read_input_file_env_, read_input_file_env): Move from mes.c.

	core: Remove unused symbols.
	* mes.c (scm_symbol_noexpand, scm_symbol_syntax,
	 scm_symbol_quasisyntax, scm_symbol_unsyntax,
	 scm_symbol_unsyntax_splicing, scm_symbol_quasiquote,
	 scm_symbol_unquote, scm_symbol_unquote_splicing, scm_symbol_define,
	 scm_symbol_define_macro): Remove.

	Add write, add display test, some fixes.
	* mes.c (write_byte): Rename from write_char.
	* module/mes/display.mes (display): Fixes for write: char, closure, procedure.
	  (write-char, write, with-output-to-string): New functions.
	* tests/read.test: Include base-0 to see some output.
	* tests/display.test: New file.
	* GNUmakefile (TESTS): Add it.

	core: Remove display.
	* posix.c (stderr_): New function.
	* display.c: Remove.
	* mes.c: Remove includes.  Use stderr_ instead of display_.
	 (gc_loop): Preserve function's name.
	 (arity_): New function.
	* GNUmakefile (mes.o): Remove dependency on display.
	* module/mes/read-0.mes: Use core:stderr instead of display, newline.
	  (newline): New function.
	* module/mes/base-0.mes: Use core:stderr instead of display.
	  Include (mes display).
	* module/mes/display.mes: New file.
	* lib.c (assert_defined): Move from mes.c.
	  (string_to_cstring): Move from posix.c
	* build-aux/mes-snarf.scm (function-environment): Initialize function
	  name with scheme string.

	Import srfi-26 from Guile.
	* module/srfi/srfi-26.scm: Import.
	* module/srfi/srfi-26.mes: Include it.
	* AUTHORS: Mention it.

2016-12-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Remove symbol_to_list, char_to_integer, integer_to_char.
	* mes.c (symbol_to_list, char_to_integer, integer_to_char): Remove
	* module/mes/read-0.mes (symbol->list, integer->char,
	  symbol->keyword): New function.
	  (read-word): Use symbol->keyword.
	* module/mes/type-0.mes (char->integer): New function.
	* module/mes/scm.mes (keyword->symbol): New function.

	core: Remove string.c.
	* string.c: Remove.
	* mes.c (eval_apply): Remove caller.
	* GNUmakefile (mes.o): Remove dependency on string.
	* module/mes/psyntax-0.mes (eval): Handle "noexpand".
	* module/mes/type-0.mes (string->symbol, symbol->list, symbol->string):
	  New function.

	core: Remove number_to_string.
	* string.c (number_to_string): Remove.
	* module/mes/scm.mes (number->string): New function.

	core: Remove substring.
	* string.c (substring): Remove.
	* module/mes/scm.mes (substring): New function.

	core: Remove string_length.
	* module/mes/scm.mes (string-length): New function.

	core: Remove list_to_string.
	* string.c (list_to_string): Remove.
	* module/mes/read-0.mes (list->string): New function.
	* module/mes/scm.mes (list->string): Remove.

	core: Remove string-append.
	* string.c (string_append): Remove.
	* module/mes/type-0.mes (string-append): New function.
	* module/mes/base-0.mes: Include type-0 without using string-append.

	core: Remove string.
	* string.c (string): Remove.
	* module/mes/type-0.mes (string): New function.

	Add exit.
	* lib.c (exit_): Rename from builtin_exit.
	* module/mes/scm.mes (list): Remove.

	core: Remove last_pair, list_ref, string_ref.
	* lib.c (last_pair, list_ref): Remove.
	* string.c (string_ref): Remove.
	* module/mes/type-0.mes (string->list): New function.
	* module/mes/scm.mes (string-ref): New function.

	core: Make closure real type.
	* display.c (display_helper):
	* mes.c (type_t): Add CLOSURE.
	  (scm_t): Add closure.
	  (CLOSURE): New macro.
	  (eval_apply:apply): Update.
	  (eval_apply:eval): Remove closure special-casing.
	  (gc_loop): Handle CLOSURE.
	* module/mes/read-0.mes: Update types.
	* module/mes/type-0.mes: Update types.
	* display.c (display): Update.
	* module/mes/fluids.mes (env:escape-closure): Check for '*closure.

	core: Remove quote, quasiquote, quasisyntax.
	* mes.c (quote, quasiquote, quasisyntax): Remove.

	core: Remove make_lambda.
	* mes.c (make_lambda): Remove.

	core: Remove type.c.
	* module/mes/type-0.mes: Resurrect.
	* module/mes/base-0.mes: Include it.
	* module/mes/read-0.mes (not, pair?, atom?): New functions.
	* type.c: Remove.
	* mes.c: Remove callers.
	* GNUmakefile (mes.o): Remove dependency on type.

	core: Remove gc_show.
	* mes.c (gc_show): Remove.

	core: Remove add_environment.
	* mes.c (add_environment): Remove.  Update callers.
	  (scm_symbol_dot): New global.

	core: Remove make_string.
	* mes.c (MAKE_STRING): New macro.
	  (make_string): Remove.  Update callers.
	* string.c: Update callers.

	core: Remove make_ref.
	* mes.c (MAKE_REF): New macro.
	  (make_ref): Remove.  Update callers.

	core: Remove make_char.
	* mes.c (MAKE_CHAR): New macro.
	  (make_char): Remove.  Update callers.
	* reader.c (peek_char, read_char, unread_char): Remove.
	* module/mes/scm.mes (peek-char, read-char, unread-char): New function.

	core: Remove make_number.
	* mes.c (MAKE_NUMBER): New macro.
	  (tmp_num_, tmp_num_2): New function.
	  (make_number): Remove.  Update callers.

	Remove make_function.
	* mes.c (make_function): Remove.

	core: Remove make_keyword.
	* mes.c (make_keyword): Remove.
	* module/mes/read-0.mes (<cell:keyword>): New global.
	  (read-word): Use it with make_cell instead fo make-keyword.
	* strting.c (symbol_to_keyword): Use make_cell instead of make_keyword.

	core: Remove make_macro.
	* module/mes/read-0.mes (<macro>): New global.
	  (env:macro): Use it with make_cell instead of make_macro.
	* mes.c (make_macro): Remove.
	* type.c (car_): Rename from mes_car.
	  (cdr_): Rename from mes_cdr.

	core: Simplify lookup.
	* reader.c (lookup_): Rename from lookup.  Remove all lookups except
	  for numbers and symbols.  Update callers.
	* mes.c (make_symbol_): Rename from internal_make_symbol.  Update
	  callers.
	* module/mes/read-0.mes (lookup): New function.
	  (read-word): Remove all lookup calls, except for numbers and symbols.

	Remove lookup-char.
	* reader.c (lookup_char): Remove.
	* module/mes/read-0.mes (lookup-char): Remove.
	  (read-word): Rewrite using quote.

	core: Cleanup symbol initialization and lookup.
	* build-aux/mes-snarf.scm (symbol->names): New function
	  (function->environment): Initialize symbol.
	  (generate-includes): Also write .symbol-names.i.
	* mes.c (mes_symbols): Include it.  Remove internal_lookup_symbol.
	* display.c (display): Handle display of nil in symbol list.
	* reader.c (internal_lookup_symbol): Remove name-fu.

2016-12-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Remove most of reader.
	* reader.c (append_char, read_block_comment, read_character, read_hex,
	  read_string): Remove.
	  (eat_whitespace, read_word)[READER]: Remove.
	* mes.c (list_to_symbol): New function.
	* module/mes/read-0.mes (list->symbol, read-character, read-hex,
	  read-string): New functions.

2016-12-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	Refactor reader.
	* module/mes/read-0.mes (eat-whitespace): More efficient ordering/peeking.
	* module/mes/read-0.mes (read-word): Handle tab.

2016-12-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Disable reader.
	* mes.c (READER): Switch off.
	* module/mes/read-0.mes (eat-whitespace): Handle #;.

	core: Do some tail call elimination.
	* mes.c (eval_apply): Use goto instead of return.

	core: One big eval_apply.
	* mes.c (eval_apply): New function.
	  (eval_apply_t): New type.
	  (g_target): New global.
	  (vm_evlis, vm_apply_env, vm_eval_env, vm_expand_macro_env,
	  vm_begin_env, vm_if_env, vm_call_with_values_env): Remove.  Update callers.
	  (macro_expand_env): Rename from expand_macro_env.
	* guile/mes.mes: Update callers.
	* module/mes/base-0.mes: Likewise.
	* module/mes/mes-0.mes: Likewise.
	* module/mes/psyntax-1.mes: Likewise.
	* module/mes/repl.mes: Likewise.

	core: Remove vm_call_lambda.
	* mes.c (vm_call_lambda): Remove.
	 (call_lambda): Use begin_env.

	Support PEG from Guile.
	* module/mes/peg.mes: New file.
	* module/mes/peg/cache.scm: New file.
	* module/mes/peg/codegen.scm: New file.
	* module/mes/peg/simplify-tree.scm: New file.
	* module/mes/peg/string-peg.scm: New file.
	* module/mes/peg/using-parsers.scm: New file.
	* tests/peg.test: New file.
	* GNUmakefile (TESTS): Add it.

	Support pmatch from Guile.
	* module/mes/pmatch.scm: New file.
	* module/mes/pmatch.mes: New file.
	* AUTHORS: Mention it.

	Use include-from-path for psyntax.pp.
	* module/mes/psyntax.pp: Rename from module/mes/psyntax-pp.mes.
	* module/mes/psyntax.mes: Update.
	* AUTHORS: Update.

	Use include-from-path for upstream.
	* module/mes/lalr.scm: Rename from module/mes/lalr.upstream.mes.
	* module/mes/lalr.mes: Update.
	* module/mes/match.scm: Rename from module/mes/match.upstream.mes.
	* module/mes/match.mes: Update.
	* module/mes/optargs.scm: Rename from module/mes/optargs.upstream.mes.
	* module/mes/optargs.mes: Update.
	* module/mes/quasisyntax.scm: Rename from module/mes/quasisyntax.upstream.mes.
	* module/mes/quasisyntax.mes: Update.
	* module/srfi/srfi-1.scm: Rename from module/srfi/srfi-1.upstream.mes.
	* module/srfi/srfi-1.mes: Update.
	* module/srfi/srfi-9.scm: Rename from module/srfi/srfi-9.upstream.mes.
	* module/srfi/srfi-9.mes: Update.
	* AUTHORS: Update.

2016-12-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	Add string-copy, string=, string=?, char<?, char>?, char<=?, char>=?.
	* module/srfi/srfi-13.mes: New file.
	* module/mes/scm.mes (char<?, char>?, char<=?, char>=?): New function.
	* module/srfi/srfi-13.mes: New file.
	* tests/srfi-13.test: New file.
	* string.c (string_to_symbol): Handle "".

2016-12-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Remove quasiquote, quasisyntax.
	* quasiquote.c: Remove.
	* mes.c: Remove callers.
	* GNUmakefile (mes.o): Remove dependency on quasiquote.

	core: Disable quasiquote.
	* mes.c (QUASIQUOTE): Switch off.
	* tests/read.test: Remove quasiquote tests.

	Refactor quasiquote.
	* module/mes/quasiquote.mes (quasiquote): Refactor.
	* tests/quasiquote.test: Add tests.

	core: Bugfix append with one argument.
	* mes.c (append): Handle one argument.
	* tests/base.test ("append", "append 0" ... "append 5"): New tests.

	core: Do macro expansion only once.
	* mes.c (vm_eval_env): I will expand this macro only once.

2016-12-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	Add psyntax-based quasisyntax.
	* module/mes/quasisyntax.upstream.mes: Import from Guile.
	* AUTHORS: Mention it.
	* module/mes/quasisyntax.mes: New file.
	* module/mes/psyntax.mes: Include it.

	core: Remove define.
	* base-0.mes (cons*): Refactor.
	* module/mes/read-0.mes: Implement define, define-macro using macros.
	* define.c: Remove.
	* mes.c: Remove callers.
	* GNUmakefile (mes.o): Remove dependency on define.

2016-12-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	nyacc: Support enhanced Guile-1.8.
	* module/nyacc/lalr.scm: Export process-spec, reserved?.  Use optargs, syncase.
	* module/nyacc/lex.scm: Use optargs, syncase.
	* module/nyacc/parse.scm: Use optargs.
	* module/nyacc/util.scm: Use optargs.
	* module/nyacc/lang/util.scm: Use optargs.
	* module/nyacc/lang/c99/cpp.scm: Use syncase.
	* module/nyacc/lang/c99/parser.scm: Use optargs, syncase.

2016-12-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	Nyacc example scripts: support Guile-1.8.

2016-12-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	Add Nyacc example scripts.
	* guile/nyacc-calc.scm: New file.
	* guile/nyacc.scm: New file.
	* scripts/nyacc-calc.mes: New file.
	* scripts/nyacc.mes: New file.
	* GNUmakefile (mes-check, guile-check): Run them.

	nyacc: Add mes modules.
	* module/nyacc/lang/c99/cpp.mes
	* module/nyacc/lang/c99/parser.mes
	* module/nyacc/lang/calc/parser.mes
	* module/nyacc/lang/util.mes
	* module/nyacc/lex.mes
	* module/nyacc/parse.mes
	* module/nyacc/util.mes

	nyacc: Use standard \return rather than \cr.

2016-12-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	Import Nyacc 0.72.0.
	* module/nyacc: Import module/nyacc.

2016-12-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	Import psyntax from Guile-1.8: R7RS with-ellipsis.
	* GNUmakefile (psyntax-import): New target.
	* module/mes/psyntax.ss: Import.
	* module/mes/psyntax-pp.mes: Import.
	* NEWS: Mention it.

2016-12-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	Prepare for psyntax-6.3..7.3 support.
	* module/mes/psyntax-0.mes (ormap): New function.
	  (eval): New function.
	  (remprop): New function.
	  ($sc-put-cte, $make-environment, environment?, syntax->list,
	  syntax->vector, literal-identifier=?, $syntax-dispatch, eval-when):
	  New variable.

2016-12-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	Add abs.
	* module/mes/scm.mes (abs): New function.

	core: Bugfix unread_byte.
	* mes.c (unread_byte): Return SCM value instead of stray int.

	Add ash.
	* math.c (ash): New function.
	* tests/scm.test (ash, ash -1): New tests.

	Support (sxml xpath) for Nyacc c99.
	* module/sxml/xpath.mes: New file.
	* module/sxml/xpath.upstream.mes: Import from Guile.
	* AUTHORS: Mention it.

	Partial (rnrs arithmetic bitwise) support for Nyacc c99.
	* module/rnrs/arithmetic/bitwise.mes: New file.

	Nicer closure and builtin procedure display.
	* display.c (display): Show closure as procedure with formal
	  parameters.  Display ariry as fake parameters with builtin.

	Add string->number.
	* module/mes/scm.mes (string->number): New function.

	Add unless.
	* module/mes/scm.mes (unless): New syntax.

	Add iota.
	* module/mes/scm.mes: (iota): New function.
	* tests/scm.test (iota, iota 0, iota -1): New tests.

	Partial srfi-43 support for Nyacc.
	* module/srfi/srfi-43.mes: New file.

	Partial srfi-14 support for Nyacc.
	* module/srfi/srfi-14.mes: New file.
	* tests/srfi-14.test: New file.
	* GNUmakefile (TESTS): Add it.

	Add delete, delq, vector-copy.
	* module/mes/scm.mes (filter, delete, delq, vector-copy): New functions.

	Add negative?, positive?, zero?, 1+ 1-.
	* module/mes/scm.mes (negative?, positive?, zero?, 1+, 1-): New functions.

	Add missing srfi-1 functions for Nyacc.
	* module/srfi/srfi-1.scm (fold, fold-right, remove, append-reverse,
	  remove!): New functions.
	* tests/srfi-1.test: New file.
	* GNUmakefile (TESTS): Add it.
	* module/srfi/srfi-1.upstream.mes: Import bits from Guile-1.8.
	* AUTHORS: Mention it.

	Add even?, odd?.
	* module/mes/scm.mes (even?, odd?): New function.

	Bugfix: for-each with two lists.
	* module/mes/scm.mes (for-each): Fix for two lists.  Always return *unspecified*.

	Add and=>.
	* module/mes/base.scm (and=>): New function.

	Add eqv?.
	* module/mes/base.scm (eqv?): New function.

2016-12-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	Closure is not a pair.
	* module/mes/base.mes (closure_p, mes_car, mes_cdr): New function.
	  (pair_p): Closure is not a pair.
	* NEWS: Mention it.
	* psyntax-0.mes (self-evaluating?): Add closure?.

	Bugfix: support map^3.
	* module/mes/base-0.scm (map): Support third list, add more visible
	  error when used with 4 or more list.

2016-12-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	Resurrect quasisyntax support.
	* mes.c (the_unsyntaxers): New symbol.
	  (mes_builtins)[QUASISYNTAX]: Initialize it, add to environment.
	* quasiquote.c (add_unsyntaxers): Use it.
	  (vm_eval_quasisyntax): New function.
	  (eval_quasisyntax): Use it.

2016-12-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	Add psyntax-based srfi-9.
	* module/srfi/srfi-9-psyntax.mes: New file.

	Add support for including Guile files.
	* module/mes/guile.mes: New file.
	* module/mes/pretty-print.mes: New file.

	Support include and include-from-path.
	* module/mes/base-0.mes (include, include-from-path): New function.

	Support backslash in string.
	* reader.c (read_string): Handle '\\'.
	* tests/read.test: Add it.

	Support #\alarm, #\vtab.
	* mes.c (char_alarm): New variable.
	  (char_vtab): Rename from char_vt.
	* reader.c (read_character): Add alarm, update vtab.
	* display.c (display): Likewise.
	* module/language/c/lexer.mes (read-string): Use vtab.

	Support non-nested #| |# comment.
	* module/mes/read-0.mes (read-word, read-block-comment): Implement #|.
	* reader.c (read_word, read_block_comment)[READER]: Likewise.
	* tests/read.test: Test it.
	* NEWS: Mention it.

	Support #; comment.
	* module/mes/read-0.mes (read-word): Implement #;.
	* reader.c (read_word)[READER]: Likewise.
	* tests/read.test: Test it.
	* NEWS: Mention it.

2016-12-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	Minimal syntactic exception support.
	* module/mes/catch.mes: New file.
	* tests/catch.test: New file.
	* GNUmakefile (TEST): Add it.

	Minimal syntactic fluids support.
	* module/mes/fluids.mes: New file.
	* tests/fluids.test: New file.
	* GNUmakefile (TESTS): Add it.

	Add string-prefix?, symbol-prefix, symbol-append.
	* module/mes/scm.mes (string-prefix?, symbol-prefix, symbol-append):
	  New function,

	Add list-head, list-tail.
	* module/mes/scm (list-head, list-tail): New function.

	core: Bugfix number-based-cells: allow displaying (current-module).
	* display.c (display): Handle cell_symbol_quote as symbol.

2016-12-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	Make guile switchable in GNUmakefile.
	* GNUmakefile (GUILE): New variable.  Update users.
	* guile/mes-0.scm (mes?, guile-1.8?, guile-2?): New variables.
	* module/mes/base.mes (guile?): Remove.
	* module/mes/base-0.mes (effective-version, mes?, guile?, guile-1.8?,
	  guile-2?): New variables.
	* tests/cwv.test: Support Guile 1.8.

2016-12-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	Resurrect guile-mescc with guile-2.1.5.
	* scripts/include.mes: Grep all files.
	* GNUmakefile (mescc.cat): Update for mes-use-module; list all toplevel inputs.
	* module/language/c/lexer.mes: Use (system base lalr).
	* module/language/c/parser.mes: Likewise.
	* module/language/c/compiler.mes: Likewise.  Remove encoding on output port.
	* scripts/mescc.mes: Remove BROKEN comment.

2016-12-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	optargs guile

2016-12-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	Support Guile optargs.
	* module/mes/optargs.upstream.mes: Import latest non-syntax-case
	  version from Guile.
	* AUTHORS: Add it.
	* module/mes/optargs.scm: New file.
	* tests/optargs.test: New file.
	* GNUmakefile (TESTS): Add it.
	* NEWS: Update.

	Support => in cond.
	* module/mes/base-0.mes (cond): Support =>.
	* module/mes/rea-0.mes (cond): Update.
	* NEWS: Update.

	core: Support keywords.
	* display.c (display): Handle keyword.
	* mes.c (type_t): Add KEYWORD.
	  (eq_p): Handle it.
	  (make_keyword): New function.
	* reader.c (lookup): Use it.
	* type.c (keyword_p): New function.
	* NEWS: Update.

	Handle form-feed.
	* module/mes/read-0.mes (eat-whitespace, read-word): Handle form-feed.
	* reader.c (eat_whitespace, read_word): Likewise.

2016-12-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	core: Make symbols constants.
	* mes.c (apply_env,eval_env): Rewrite using switch.
	* build-aux/mes-snarf.scm (symbol->header): Define constants.
	  (symbol->source): Only update g_free and init cells.

2016-12-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	Extend Scheme reader, reduce C reader dependency.
	* mes.c (bload_env): Mark as internal.
	  (load_env): Likewise.  Load Scheme reader from source.  Remove dumping.
	  (dump): New function.
	* (vm_begin_env): Allow for gc while read_input_file_env.
	  (mes_builtins): Add *dot*.
	  (read_input_file_env)[!READER]: Invoke read-input-file.
	* module/mes/read-0.mes (read-env): New function.
	  (read-word): Support quasisyntax.
	  Remove usage of ' thoughout.
	* module/mes/repl.mes (repl): Use read instead of read-env.
	* guile/mes.scm (environment): Add *dot*.
	* guile/reader.mes: Update.
	* NEWS: Update.

	Silence garbage collector.
	* GNUmakefile: unexport MES_DEBUG.

	Update README.
	* README: Add a paragraph with current status.

2016-12-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	guix hash: 0nbdjvmsyarp4vfg3r9hhhnabv11z1b7isw4g09x3kjd0r1lx0mh

	Release 0.3.
	* configure (VERSION): Bump to 0.3.
	* mes.c (main): Likewise.
	* module/mes/repl.mes: Likewise.

	Update Mes in Guile.
	* guile/mes.scm: Update for guile-2.2.
	* guile/mes.mes: Update from module/mes/mes-0.mes.
	* guile/reader.mes: Update from module/mes/read-0.mes.

	Resurrect Mes in Guile.
	* guile/mes.mes: New file, from the archives.
	* guile/mes.scm: Updates.

	Avoid garbage returns.
	* posix.c (set-current-input-port): Return current-input-port.
	  (force_output): Return scm_unspecified.

	Update documentation.
	* README: Add make targets.
	* INSTALL: Add guix.
	* HACKING: Add info on sc.

	core: Resurrect QUASIQUOTE=0.
	* mes.c (mes_builtins) [!QUASIQUOTE]: Do not add unquoters.
	* module/mes/base-0.mes (push!, pop!, load, mes-use-module): Rewrite
	  without quasiquote.
	* module/mes/quasiquote.mes (quasiquote): Rewrite using if, and.
	* module/srfi/srfi-0 (cond-expand): Rewrite without quasiquote.

	Add loadable modules.
	* module/mes/base-0.mes (mes-use-module): Implement.
	* module/mes: Update users.
	* HACKING: Update.
	* NEWS: Update.
	* configure (main): Use shell expansion for prefix.
	* make/install.make (install): Substitute prefix.

	Use syntax rather than psyntax.
	* module/language/c/parser.mes: Switch to syntax.
	* module/language/paren.mes: Likewise
	* scripts/mescc.mes: Likewise
	* scripts/paren.mes: Likewise
	* scripts/repl.mes: Likewise
	* tests/let-syntax.test: Likewise
	* tests/match.test: Likewise
	* tests/record.test: Likewise

	Resurrect syntax.mes.
	* module/mes/syntax.mes: New file.
	* AUTHORS: List it.

	core: use FIXED_PRIMITIVES rather than environment cache.
	* cache.c: Remove.
	* define.c: Remove callers.
	* mes.c: Likewise.
	  (vm_eval_env) [FIXED_PRIMITIVES]: Hardcode car, cdr, cons, null_p.
	* GNUmakefile: Update.

	core: Set max arena size.
	* mes.c (MAX_ARENA_SIZE): New global.
	 (gc): Use it.

	core: Make arena size configurable.
	* mes.c (main): Read MES_ARENA.
	* scripts/repl.mes: Set MES_ARENA to 5000000 if not already set.
	  Fixes repl startup.

	core: Grow gc arena gradually.
	* mes.c: (gc_up_arena): New function.
	 (gc): Use it when possible.
	 (gc_init_cells, gc_init_news): New function.
	 (mes_symbols): Use them.

	core: gc bugfixes.
	* mes.c (make_tmps): New function.
	  (make_symbols, gc): Use it.
	  (vm_call_with_values_env): New vm function.
	  (call-with-values): Call it.
	  (eval_env): Do not call eval_env inline.
	* define.c (vm_define_env): Use r2 rather than local name.
	  (g_symbols): Rename from symbols.

	core: Split-off cache, display, reader.
	* mes.c: Remove cache, display, reader functions.
	* cache.c: New file.
	* display.c: New file.
	* reader.c: New file.

	Add reader in Scheme.
	* module/mes/read-0.mes: New file.
	* mes.c (char_to_integer, integer_to_char, null_p): Move to core.
	 (peek_byte, read_byte, unread_byte): New function.
	 (main): --dump, --load: New option.
	* lib.c (char_to_integer, integer_to_char): Remove.
	* NEWS: Update.

	core: Cleanup cells.
	* mes.c: Use accessors rather than g_cell[] access throughout.

	core: Add function indirection.
	* mes.c (functions): New array.
	  (scm_t): Change function pointer to index.
	  (make_cell): Handle function.
	  (call): Update for function change.
	  (display_): Likewise.
	  (make_function): New function.
	* build-aux/mes-snarf.scm (function->source): Update declarations.
	  (function->environment): New function.

	core: Number based cells.
	* mes.c (scm_t): Change car, string, ref, cdr, macro, vector into g_cell index
	  [WAS]: scm_t pointer.
	* define.c: Update.
	* lib.c: Update.
	* math.c: Update.
	* posix.c: Update.
	* quasiquote.c: Update.
	* string.c: Update.
	* type.c: Update.
	* build-aux/mes-snarf.mes Update.
	* tests/gc-4.test: New test.
	* tests/gc-5.test: New test.
	* tests/gc-6.test: New test.

	core: Integrate garbage collector/jam scraper.
	* mes.c (r0, r1, r2, r3, stack):  New globals.
	  (gc_loop): Handle MACRO and SCM.
	  (gc_copy): Handle FUNCTION, allow for pre-allocated SCM and SYMBOL.
	  (assq): Flag any BROKEN_HEARTs.
	  (vm_call): New function.  Enables moving C stack to GC stack.
	  (evlis_env, apply_env, eval_env, expand_macro_env, begin_env,
	  if_env): Use vm_call-indirection.
	  (call_lambda): New function.
	  (vm_apply_env): Rename from apply_env.  Remove parameters, instead
	  use r1, r2 and r0.
	  (vm_evlis_env, vm_eval_env, vm_expand_macro_env, vm_begin_env,
	  vm_if_env): Likewise.
	  (acons): New function.
	  (mes_environment) [!MES_FULL, MES_MINI]: Add cpp switches to create minimally
	  filled environment, for debugging.
	  (main): Print free value at exit.
	* define.c (define_env): Use vm_call-indirection.
	  (vm_define_env): Rename from define_env.
	* quasiquote.c (eval_quasiquote): Use vm_call-indirection.
	  (vm_eval_quasiquote): Rename from eval_quasiquote.
	* tests/gc-2.test: New test.
	  tests/gc-2a.test: New test.
	  tests/gc-3.test: New test.

	Add sicp garbage example: tests/gc-1.test.

	core: Make using GC in switchable, set to off; on dumps core.

	core: Add garbage collector/jam collector experiment.
	* mes.c (gc, gc_loop, gc_copy, gc_move, gc_relocate_car,
	  gc_relocate_cdr, gc_flip): New function.
	* tests/gc-0.test: New file.

	Add mes gc test setup.
	* tests/gc.test: New file.

	guix hash: 09axqivywpw0l9lm7pk1ncp6690vfv658z731z674ih73yqs5qma

	Release 0.2.
	* configure (VERSION): Bump to 0.2.
	* mes.c (main): Likewise.
	* module/mes/repl.mes: Likewise.

	Update NEWS.

	test: Run psyntax before record.
	* GNUmakefile (TESTS): Run psyntax before record.

	test: Add psyntax closure tests.
	* tests/closure.test (closure 7, closure 8, closure 9): New test.

	core: Show more info on apply error.
	* mes.c (apply_env): Be more specific about what cannot be applied.

	test: Add toplevel begin define test.
	* tests/base.test (top begin define): New test.

	core: Bugfix: report name of undefined variable.
	* mes.c (assert_defined): Add variable as parmeter, print it.  Update
	  callers.

	core: Use switch in display_helper.
	*mes (display_helper): Use switch.

	core: Refactor eval.
	* mes.c (eval_env): Rename from builtin_eval, Update callers.  Use switch.

	core: One SCM type for function.
	* mes.c (function_t): New struct.
	  (type): One type for function.
	  (call): Refactor.
	* build-aux/mes-snarf.mes: Use arity annotation.  WAS: args.  Update
	  annotations.

	core: Cleanup macro expansion.
	* mes.c (builtin_eval): Call expand_macro_env after handling primitives.
	  (expand_macro_env): Include syntax-case expansion, remove skipping
	  of primitives.
	  (sc_expand_env): Remove.

	core: Factor-out assert_defined.
	* mes.c (assert_defined): New function.
	  (set_env_x): Use it.
	  (builtin_eval): Use it.

	Implement load.
	* mes.c (symbol_primitive_load): New symbol.
	  (builtin_eval): Use it to implement primitive-load.
	* module/mes/base-0.mes (push!, pop!): New macro.
	  (load): New macro.
	* tests/data/load.scm: New file.
	* tests/base.test (load): New test.

	posix: Implement open-input-file.
	* posix.c: New file.
	* mes.c: Include posix.environment.h, posix.environment.i, posix.environment.c.
	  (read_input_file_env): Rename from read_file_env.  Update
	  callers.
	  (load_env): Rename from load_file_env.  Update callers.
	* GNUmakefile (mes.o): Add posix.c, posix.environment.h,
	  posix.environment.i dependencies.

	core: Support switching of input stream.
	* mes.c (g_stdin): New global.
	  (getchar): New function, use g_stdin.
	  (ungetchar): Use g_stdin.
	  (main): Initialize g_stdin to stdin.

	Update documentation wrt syntax-case.
	* HACKING: Update wrt syntax-case.
	* NEWS: Likewise.
	* README: Likewise.
	* guix.scm: Likewise.

	Update AUTHORS.
	* AUTHORS: Include information on lalr, match and psyntax.

	Finalize psyntax integration.
	* mes.c (sc_expand_env): Exclude primitives, expand native macros.
	  (symbol_expand_macro): New symbol.
	* module/mes/psyntax-0.mes (properties-alist): New function.
	* module/mes/psyntax-1.mes: Set expand-macro.
	  (define-syntax, syntax-rules, let-syntax): Remove macro.
	* module/language/c/parser.mes: Use psyntax modules, remove syntax module.
	* module/language/paren.mes: Likewise.
	* scripts/repl.mes: Likewise.
	* tests/match.test: Likewise.
	* tests/record.test: Likewise.
	* tests/psyntax.test (define-syntax swap!): Add test.
	* module/mes/let-syntax.mes: Remove.
	* module/mes/syntax.mes: Remove.

	core: Quoted internals are symbols.
	* mes.c (begin_env): Rename from begin.  Update callers.
	  (scm_begin, scm_if, scm_define, scm_set_x): Rename from symbol_*.
	  (symbol_begin, symbol_define, symbol_if, scm_lambda, scm_set_x): New symbols.
	  (mes_environment): Add them to environment, SYMBOL->SCM.
	* define.c (define_env): Rename from define.  Update callers.
	* build-aux/mes-snarf.scm: Shadow internals (SCM) by their symbol.

	test: More values, call-with-values tests.
	* tests/cwv.test: New file.
	* GNUmakefile (TESTS): Add it.
	* tests/scm.test: Remove value and call-with-values tests.

	psyntax: More tests.
	* tests/psyntax.test: Add tests.

	core: Fix quasisyntax reading.
	* mes.c (readword): Avoid unspecified behaviour in comma list.

	test: Add new macros.
	* module/mes/test.mes (pass-if-equal, expect-fail): New macros.

	repl: Add sc-expand meta command, include syntax-case.
	* module/mes/repl.mes (,sc-expand): New meta command.
	* scripts/repl.mes: Include psyntax-0, psyntax-1, psyntax.  Not used as
	  basis for match yet.

	Add syntax-case based syntax-rules.
	* module/mes/psyntax-1.mes (syntax-rules): New syntax transformer,
	  based on syntax-case.
	  (define-syntax-rule): New macro.
	  (let-syntax): New macro, for syntax-case.
	* tests/let-syntax.test: Switch to syntax-case.
	* tests/psyntax.test: Add syntax-rules and syntax-rule test.

	Bugfix include.mes: skip commented modules.
	* scripts/include.mes: Make regexp more strict.

	Initial psyntax integration.
	* mes.c (sc_expand_env): New function.
	  (builtin_eval): Use it.
	* module/mes/psyntax-0.mes: New file.
	* module/mes/psyntax-1.mes: New file.
	* tests/psyntax.test: New file.
	* GNUmakefile (TESTS): Add it.

	psyntax: Add missing (interaction-environment) to eval.
	* module/mes/psyntax.mes: Add (interaction-environment) to eval.

2016-12-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	Import psyntax from Guile-1.3a.
	* module/mes/psyntax.mes: New file.
	* module/mes/psyntax.ss: New file.

	commit 230c435383087a1e6ad60d9c98d3ec75dd2c3e49
	Author: Mikael Djurfeldt <djurfeldt@nada.kth.se>
	Date:   Tue Aug 19 01:28:50 1997 +0000

	    * syncase.scm: New file: Guile-adaption for syntax-case macros.
	    psyntax.pp, psyntax.ss: Syntax-case macros, portable version 2 by
	    R. Kent Dybvig, Oscar Waddell, Bob Hieb and Carl Bruggeman

2016-12-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	Exit upon error.
	* module/mes/scm.mes (error): Add exit 1.

	Mescc: avoid `if'.
	* module/language/c/lexer.mes (keywords): Produce `If'.
	* module/language/c/parser.mes (c-parser): Use `If.'

	core: Add compile time switch for quasisyntax.
	* mes.c [QUASISYNTAX]: New switch.  Default off.
	 (builtin_eval) [QUASISYNTAX]: Handle syntax, unsyntax, quasisyntax.
	* quasiquote.c (syntax, unsyntax, unsyntax_splicing, eval_quasisyntax,
	  add_unsyntaxers) [QUASISYNTAX]: Available only.

	More error handling on apply_env.
	* mes.c (apply_env): Assert if applying *unspecified*.

	Bugfix assq_ref_cache for running without environment cache.
	* mes.c (assq_ref_cache) [!ENV_CACHE]: Return *undefined* if nothing
	  found.

	Error handling on failing set!.
	* mes.c (set_env_x): Produce error message [WAS: dump core].

	Simplify toplevel read.
	* mes.c (read_file_env): Rename from read_file.
	 (load_file_env): New function.
	 (main): Use it.

	boot: fix ignored.
	* module/mes/loop-0.mes: Wrap read-file in begin.
	* module/mes/mes-0.mes: Remove ignored.

	Implement apply with multiple arguments.
	* module/mes/base-0.mes (apply): Handle multiple arguments.
	* tests/base.test: (apply, apply 1, apply 2): New test.

	Fix values.
	* mes.c (call): Respect any other non-value arguments.
	* tests/scm.test (values, values 2, values 3, call-with-values): New test.

	Define garbage collector/jam collector primitives.
	* mes.c (make_cell): New primitive alongside make_vector for allocation.
	  (cons, make_char, make_macro, make_number, make_ref,
	  internal_make_symbol, make_vector): Use it.

	Implement strings and symbols as list of characters [WAS: c-string].
	* mes.c (scm_t): Add string field.
	  (make_string, internal_lookup_symbol, internal_make_symbol,
	  make_symbol, lookup, readword): Take scm*.  Update callers.
	  (display_helper): Support string field.
	  (append_char): New function.
	  (readstring): Use it.  Produce scm*.
	  (cstring_to_list): New function.
	  (add_environment, internal_make_symbol): Use it.
	  (list_of_char_equal_p): New function.
	  (internal_lookup_symbol): Use it.
	* lib.c (list_ref): New function.
	* string.c (string_ref): Use it.
	  (string, string_append, string_length, substring, number_to_string,
	  string_to_symbol, symbol_to_string): Update to list-of-characters
	  implementation.

	Environment cache bugfix for define.
	* define.c (define): Invalidate cache.  Fixes vector test.
	* GNUmakefile (mes-check, guile-check): Use set -e.  Fixes skipping over errors.

2016-12-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	Introduce reference type, use vectors of SCM.
	* mes.c (type): Add REF.
	  (scm_t): Add ref, change vector to *scm_t.  Update users.
	  (alloc): New function.
	  (cons, make_char, make_macro, make_number, make_string,
	  internal_make_symbol, make_vector): Use it.
	  (make_ref): New function.
	  (vector_entry): New function.
	  (make_vector, list_to_vector, vector_set_x): Use it.
	  (vector_ref): Dereference REF entry.
	  (display_helper): Handle REF.
	* lib.c (vector_to_list): Handle REF.
	* type.c (ref_p): New function.
	* tests/vector.test (vector list): New test.

	Bugfix vector-ref.

	* mes.c (vector-ref): Make copies of simple values.  Fixes lalr.
	* tests/vector.test (vector-set! 3): New test.

2016-12-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	Guile gc experiment: remove global scan variable.

	Guile gc experiment: add garbage collection.

	Guile gc experiment: add lists and display.
	* guile/gc.scm (gc-nil, gc-null?, gc-list, gc-display, make-symbol):
	  New function.

	Guile gc experiment: add pairs.
	* guile/gc.scm (cell-type, cell-index, gc-cons, gc-car, gc-cdr): New
	  function.

	Guile gc experiment.
	guile/gc.scm: New file.

	Revert "Speedup boot eval/apply."
	This reverts commit 6326b3103156fd79cd7bebbb351194626cc8a64b.

	Speedup boot eval/apply.
	* module/mes/mes-0.scm (apply-env, evlis, eval-expand,
	  eval-quasiquote): use IF iso COND: factor 3.
	  (apply-env): Use lambda iso let: another 30%.

	guix hash: 115jycdz8i1r5sj2fsjqcrh456mayxzaykb8cxxxc3wxfkj8nagf

2016-11-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	Release 0.1.
	* configure (VERSION): Bump to 0.1.
	* mes.c (main): Likewise.
	* module/mes/repl.mes: Likewise.

	Documentation update.
	* HACKING: Target is R6RS-like, at least having syntax-case.
	* README: Likewise.
	* guix.scm: Likewise.

2016-10-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	Avoid gratuitous consing with begin and quasiquote.
	* mes.c (apply_env, main): Call begin rather than eval with cons'ed
	  symbol begin.
	* module/mes/mes-0.mes (apply-env): Likewise.
	* quasiquote.c (add_unquoters): cons global unquoters rather than
	  creating it fresh.
	* module/mes/mes-0.mes (add-unquoters): Likewise.

2016-10-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	Remove dead code.
	* mes.c (mes_environment): Remove dead code.

	Move other post-boot and derived functions to lib.c.
	* mes.c (c*r, length, last_pair, builtin_list, vector_to_list,
	  integer_to_char, char_to_integer, builtin_exit): Move to lib.c.
	* lib.c: New file.
	* GNUmakefile (mes.o): Depend on lib snarf output.

	Move strings to string.c.
	* mes.c (string, string_append, list_to_string, string_length,
	  string_ref, substring, number_to_string, string_to_symbol,
	  symbol_to_string): Move to string.c
	* string.c: New file.
	* GNUmakefile (mes.o): Depend on string snarf output.

	Move arithmetic functions to math.c.
	* mes.c (greater_p, less_p, is_p, minus, divide, modulo, multiply,
	  logior): Move to math.c.
	* math.c: New file.
	* GNUmakefile (mes.o): Depend on math snarf output.

	Move define, define-macro to define.c.
	* mes.c (define, define-macro): Move to define.c
	* define.c: New file.
	* GNUmakefile (mes.o): Depend on define snarf output.

	Move quasiquote to quasiquote.c.
	* mes.c (unquote, unquote_splicing, syntax, unsyntax,
	  unsyntax_splicing, eval_quasiquote, eval_quasisyntax, add_unquoters,
	  add_unsyntaxers): Move to quasiquote.c
	* quasiquote.c: New file.
	* GNUmakefile (mes.o): Depend on quasiquote snarf output.

	Move optional type predicates to type.c.
	* mes.c (char_p, macro_p, number_p, pair_p, string_p, symbol_p,
	  vector_p, builtin_p, boolean_p): Move to type.c
	* type.c: New file.
	* GNUmakefile (mes.o): Depend on type snarf output.
	* module/mes/loop-0.mes (cond, map, let, or, and not, evlis-env,
	  apply-env, eval-expand, uquote, add-unquoters, eval,
	  expand-macro-env, eval-begin-env, eval-if-env, sexp:define,
	  env:define, env:macro): Move to mes-0.mes.
	* module/mes/mes-0.mes: New file.
	* module/mes/type-0.mes: New file.
	* scripts/include.mes: If BOOT, also include mes-0.mes.  If TYPE0,
	  also include type-0.mes.

2016-12-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	Update NEWS.
	* NEWS: Note specials fix and booting with smaller core.

2016-10-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	Generate C header and includes using snarfing.
	* mes.c: Move specific renames and n-args to alist annotation.
	* build-aux/mes-snarf.scm: New file.
	* GNUmakefile (mes.environment.h): Use it.
	  (mes.h): Remove.
	  (clean): Update.
	  (mes.o): New dependency rule.
	* .gitignore: Update.

2016-10-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "Flip sign of cached symbols: only search cache if symbol is cached."
	This reverts commit cef058be0d6ef5322f74e644bbcd96f1725c6327.

2016-10-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	Flip sign of cached symbols: only search cache if symbol is cached.
	* mes.c (cache_save): Flip sign when caching and invalidating.
	  (cache_invalidate): Flip sign when invalidating.

2016-10-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	named let-fu FIXME

2016-10-21  Jan Nieuwenhuizen  <janneke@gnu.org>

	boot: fix builtin? tests.
	* tests/scm.test: Test primitives, not eval.

	Environment cache heuristicts.
	* mes.c (ENV_HEAD): New define.
	  (assq_ref_cache): Use it.

	boot: support apply.
	* module/mes/loop-0.mes (eval-env): Add clause for apply-env.

	boot: Remove label support from Scheme.
	* module/mes/loop-0.scm (apply-env): Remove label clause.

	boot: vector support.
	* mes.c (make_vector): Change to scm interface.
	  (temp_number): New global.
	  (list_to_vector): Use it.
	* module/mes/scm.mes (c:make-vector): New function.
	* tests/scm.test: Remove vector tests.
	* tests/vector.test: New file.
	* GNUmakefile (TESTS): Add it.

	Avoid let* in scm.mes.
	* module/mes/scm.mes (case, max, min): Avoid let*.

2016-10-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	loop-0: define and, let and cache-invalidate-range.

	boot: support quasiquote in eval.
	* module/mes/loop-0.mes (eval-env): Add quasiquote support.

2016-10-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	Remove evcon from loop-0.
	* module/mes/loop-0.mes (loop-0): Handle define-macro.
	 (cond): New macro.
	 (eval-env-expand): Remove 'cond clause.
	 (evcon): Remove.

2016-10-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	Switch fat-c/boot using environment variable BOOT.
	* GNUmakefile: check for BOOT, set CFLAGS.
	* mes.c: Remove hardcoded BOOT define.
	* scripts/include.mes: include loop-0 when BOOT is set.

2016-10-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	Implement eval/apply in Scheme.
	* module/mes/loop-0.mes: New file.
	* module/mes/mes.mes: Remove

2016-10-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	Reduce eval/apply in core, extend in Scheme.
	* mes.c (eval_env_)[BOOT]: Rename from eval_env.  Remove define, defin-macro.
	  (eval_env): New function.
	  (make_macro): Swap parameter ordering.
	  (apply_env)[BOOT]: Support label.

2016-10-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	Avoid adding top of environment to cache.
	* mes.c (assq_ref_cache): Only consider caching symbols deeper than
	  4*CACHE_SIZE depth.  50% speedup.

	Implement environment cache.
	* mes.c (cache_save, cache_lookup, cache_invalidate,
	  cache_invalidate_range): Implement cache for environment.
	  (assq_ref_cache): New function, perform cached lookups.
	  (builtin_eval,lookup_macro): Use it.
	  (set_cdr_x): Invalidate cache.
	  (set_x): Likewise.
	  (apply_env): Likewise.

2016-10-20  Jan Nieuwenhuizen  <janneke@gnu.org>

	Introduce SCM type for special symbols.
	* GNUmakefile (mes.h): Also export SCM to symbols.i
	* mes.c: Introduce SCM type for special symbols.
	  (builtin_eval): Rename from eval_env.  Update callers.
	* module/mes/base-0.mes (eval): Remove.
	* module/mes/repl.mes (repl): Use eval.

	Remove static primitives hack.
	* mes.c (internal_primitive_p, internal_p, lookup_primitive,
	  mes_primitives): Remove.

2016-10-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	Refactor primitives lookup.
	* mes.c (lookup_primitive_): Rename from internal_lookup_primitive,
	  use scm-compatible signature.
	  (lookup): Update caller.
	  (eval_env): Check for builtins first.

2016-10-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	Remove unused symbol.
	* mes.c (symbol_cond): Remove.

	Add report to closure test.
	* tests/closure.test: Add report.

	Remove dead code from let.mes.
	* module/mes/let.mes (simple-let, named-let, let): Remove dead code.

	Avoid cons* in base.
	* module/mes/base-0.mes (cond, simple-let, let): Rewrite without cons*.
	* module/mes/base.mes (or): Likewise.

	Differentiate apply asserts.
	* mes.c (apply_env): Split bool assert into bool, number and string.

	Add display tag for builtin procedures.
	* mes.c (display_helper): Show builtin functions as #<procedure ...>.

2016-10-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	Remove macro expansion from apply.
	mes.c (apply_env): Remove macro expansion.

2016-10-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	Add paredit workaround in scripts.
	* scripts/elf.mes: Add paredit parsing comment.
	* scripts/repl.mes: Likewise.

	make tests standalone executable.
	* tests/closure.test: Add shebang and boot-0 include.
	* tests/let-syntax.test: Likewise.
	* tests/let.test: Likewise.
	* tests/match.test: Likewise.
	* tests/quasiquote.test: Likewise.
	* tests/record.test: Likewise.
	* tests/scm.test: Likewise.
	* GNUmakefile (mes-check): Run tests by exec'ing.

	make clean: remove symbols.i.
	* GNUmakefile (clean): remove symbols.i.

	Update documentation.
	* HACKING: Describe (mes-use-modules).
	* NEWS: Update.

	Add --help, --version.
	* mes.c (main): Handle --help, --version.
	* scripts/include.mes: Handle --help.
	* scripts/elf.mes: Pass any arguments on to mes.
	* scripts/mescc.mes: Likewise.
	* scripts/paren.mes: Likewise.
	* scripts/repl.mes: Likewise.

	guix hash: 0g6lcms2hv1i8hdkfh2xz0g7jmsayisr7bcwkp47blkbapqpzpsf

	Update guix hash.
	* make/install.make (update-hash): New target.
	* guix.scm: Prepare for update.

2016-10-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	Add installation instructions.
	* INSTALL: New file.

	Add guix.scm package recipe.
	* guix.scm: New file.

2016-10-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	Prepare for 0.1 release: update READMEs.
	* NEWS: New file.
	* AUTHORS: Add info about files taken from Scheme48.
	* HACKING: Update with info from TODO.
	* TODO: Remove.

2016-10-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	Prepare for 0.1 release: make install.
	* make/install.make (install): Install documentation.

	Prepare for 0.1 release: installable scripts.
	* scripts/mes: New symlink.
	* scripts/elf.mes: Use it.
	* scripts/mescc.mes: Likewise, read all mes modules with include.mes.
	* scripts/paren.mes: Likewise.
	* scripts/repl.mes: Likewise.

2016-10-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	Prepare for 0.1 release: gnu-build-system.
	* configure: New file.
	* make/install.make: New file.
	* .gitignore: Ignore generated files.
	* build-aux/gitlog-to-changelog: New file.

2016-10-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	Prepare for 0.1 release: new directory structure.
	* scripts/elf.mes: New file.
	* scripts/include.mes: New file.
	* scripts/mescc.mes: New file.
	* scripts/paren.mes: New file.
	* scripts/repl.mes: New file.
	* doc/examples/main.c: Move from ./main.c.
	* module/mes/base-0.mes: Move from ./base0.mes.
	* module/mes/base.mes: Move from top.
	* module/mes/elf.mes: Likewise.
	* module/mes/let-syntax.mes: Likewise.
	* module/mes/let.mes: Likewise.
	* module/mes/mes.mes: Likewise.
	* module/mes/quasiquote.mes: Likewise.
	* module/mes/repl.mes: Likewise.
	* module/mes/scm.mes: Likewise.
	* module/mes/syntax.mes: Likewise.
	* module/mes/lalr-0.mes: Move from lib/lalr.mes.
	* module/mes/lalr.mes: Move from lib/lalr.scm.
	* module/mes/match.mes: Move from lib/match.scm.
	* module/mes/record-0.mes: Move from lib/record.mes.
	* module/mes/record.mes: Move from lib/record.scm.
	* module/mes/test.mes: Move flom lib/.
	* module/rnrs/bytevectors.mes: Move from lib/rnrs.
	* module/srfi/srfi-0.mes: Move from lib/srfi.
	* module/srfi/srfi-1.mes: Likewise.
	* module/srfi/srfi-9.mes: Likewise.
	* module/language/c/lexer.mes: Move from ./c-lexer.scm.
	* module/language/c/parser.mes: Move from ./mescc.scm.
	* module/language/c/compiler.mes: New file, split from parser.mes.
	* module/language/paren.mes: Move from ./paren.scm.
	* module/mes/libc-i386.mes: New file, split from elf.mes.
	* tests/base.test: Move from test/.
	* tests/closure.test: Likewise.
	* tests/let-syntax.test: Likewise.
	* tests/let.test: Likewise.
	* tests/match.test: Likewise.
	* tests/quasiquote.test: Likewise.
	* tests/record.test: Likewise.
	* tests/scm.test: Likewise.
	* hello.S: Remove.
	* hello.c: Remove.
	* loop2.mes: Remove.
	* test/foo.test: Remove.

2016-10-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	Remove evcon (Sorry John).
	* mes.c (evcon): Remove, remove callers.
	* base0-if.mes (cond): Rename from disabled-cond.

	Support quasisyntax.
	* mes.c (eval_quasisyntax, add_unsyntaxers): New functions.
	  (eval_env): Use them.

2016-10-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	Add REPL.
	* mes.c (expand_macro_env, force_output): New function.  Use STRING_MAX
	  for string buffers throughout.  (eval_env, eval_begin_env): Rename
	  from eval, eval_begin.  Update callers.
	* repl.mes: New file.
	* base.mes (list?): Move from scm.mes.
	* scm.mes (eval, apply, primitive-eval, expand-macro): New function.
	* GNUmakefile: New repl target.

2016-10-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	Avoid 90% of cdr'ing environment, assuming static primitives.
	* mes.c (internal_primitive_p)[STATIC_PRIMITIVES: New function.
	 (lookup_macro)[STATIC_PRIMITIVES]: Use it.
	 (internal_lookup_primitive)[STATIC_PRIMITIVES]: New function.
	 (lookup)[STATIC_PRIMITIVES]: Use it.
	 (mes_primitives)[STATIC_PRIMITIVES]: New function.
	 (main): Use it.
	* base0-if.mes (disabled-cond): Rename from xcond.
	* GNUmakefile: Add commented profiling CFLAGS.

2016-10-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	Do not use quasiquote in base0.
	* base0.scm (defined?): Rewrite without quasiquote.

2016-10-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	Add procedure? to base.
	* base.mes (procedure?): Move from scm.mes.

2016-10-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	speedup: use ->car etc.

2016-10-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	Avoid out-of-spec strncat usage.
	mes.c (readword): Use character assignment instead of strncat.  Fixes
	Valgrind nit.

	Discern between primitive atoms and symbols.
	* mes.c (internal_symbol_p): New function.
	 (eval): Use it.

2016-10-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	resurrect mescc.

	cleanup and doc update.

	syntax.mes: silence syntax error.

	test/scm.test: update.

2016-10-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	test/match.test: pass.

2016-10-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	lib/match: ugly hygiene hack. FIXME.

	let-syntax.mes: implement.

2016-10-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	speedup: use ->car etc.

	use IF as primitive, drop using cond/evcon only option.

	c++ type-safety.

	assq: use while instead of recursion.

	mes.c: uniquify symbols.

	mes-check: separate target.

2016-09-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	Updates to README, TODO.

2016-08-14  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc.scm: compile simple, well-behaved for-loop.

	elf.mes: for loop.

	mescc.scm: print two strings.

2016-08-13  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc.scm: first a.out produced from main.c.

	lib/match.scm: import.

	lib/srfi/srfi-1.scm: add append-map, filter, find.

	elf.mes: make-elf.

	elf.mes: use elf32-* remove set!.

	elf.mes: remove text-free, softcode data-offset.

	elf.mes: put marker in note section.

	Revert "elf.mes: drop .note section."
	This reverts commit b2b5b73b91308407ec82a5ba658aca025512c542.

	elf.mes: drop .note section.

	elf.mes: softcode more.

	mes.c: implement string->list.

	elf.mes: compute text-free, text-offset.

	lib/rnrs/bytevectors.scm: minimal rnrs bytevectors.

	elf.mes: separate-out text, text-free and data sections.

2016-08-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	resurrect guile-mescc, use write-int and (current-error-port) iso `2'.

2016-09-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	Revert "mes.c: use single malloc with arena."
	This reverts commit 38c364faeff430a5ee28f402d24b073f6bf9a548.

2016-08-12  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes.c: use single malloc with arena.

	elf.mes: a.out runs.

	elf.mes: error-free header, no program yet.

	elf.mes: readelf -h a.out shows some info.

	mescc/elf.mes: write minimal ELF header.

	mes.c: display, newline: take optional port; add write-char, read hex #xXX.

	remove debug output to stdout.

2016-07-27  Jan Nieuwenhuizen  <janneke@gnu.org>

	syntax-if.mes: TODO.

	Use IF iso COND as primitive; keep COND primitive as option.

	let.scm: cleanups.

2016-07-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	macro hax0rz

	Revert "lib/lalr-debug.scm"
	This reverts commit 084d1bea33d45f0653cdc6bef44dc295faef6b72.

	lib/lalr-debug.scm

	quasiquote.mes: disable, too slow.

2016-07-25  Jan Nieuwenhuizen  <janneke@gnu.org>

	split-up test suite, implement quasiquote in scheme.

2016-07-26  Jan Nieuwenhuizen  <janneke@gnu.org>

	hello.c, hello.S: hello world target for C compiler.

2016-07-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mescc: mes parses simplest main with lalr.

	scm.mes: add port-location dummies.

	mes.c: add set-cdr, substring, string-ref.

	mes.c: support whitespace characters.

	mescc.scm: parse simple main.c.

	TODO/HACKING: update: lalr/paren.scm runs.

	mes.c: when reading `EOF', defer read control to program.

	mes.c, scm.c: add read-char, peek-char, char=?, char-alphabetic?.

	scm.mes: add list-ref.

	mes.c: add logior.

	scm.mes: add expt.

	scm.mes: remainder.

	scm.mes: implement do.

	scm.mes: add max, min.

	<=, >=: take multiple arguments.

	mes.c: add quotient and modulo.

	mes.c: less_p, greater_p, is_p: take multiple arguments.

	mes.c: display_helper fix for vector.

	scm.mes: make-vector: fix fill.

	paren.scm revert

	mes.c: fix apply.

	fix for-each.

	lalr paren test

2016-10-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	ADD .gitignore.

	lib/lalr.scm

2016-07-24  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes.c: grok #\tab.

2016-07-23  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes.c: add syntax, quasisyntax to reader....

	srfi-9 records!

	mes.c: refactor begin and closures. Fixes bugs/top.mes.

	bugs/top.mes: document toplevel begin bug; probable reason for record/syntax-case failure.

	check: resurrect guile-check.

	mes.c: remove hacks

	trying to get records up....WIP

	srfi-9

	lib/record.scm: import.

	lib/srfi/srfi-0.scm: add.

	mes.c: barf on unknown symbols.

	syntax.mes: update from scheme48-1.1.

	Add header to syntax.mes MERGE

	scm.mes: add last-pair.

	test.mes: enable vector tests for mes.

2016-07-22  Jan Nieuwenhuizen  <janneke@gnu.org>

	scm.mes: add assq-set!, assq-ref.

	Update documentation, remove old bug files, move bugs into bugs/.

	mes.c: add new macro type, junk *macro* hack.

	mes.c: store actual environment with closures.

	fix closure 5

2016-07-19  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes.c: store enviroment depth in closures. Fixes c1, c3 and more.

	mes.c: move begin_env into eval, decruft.

2016-07-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	fix some tests.

	test: hack: show expected/actual

	remove booting into mes (would need VM), boot.mes; rewrite test.mes.

	c0.mes, c1.mes: update.

2016-07-17  Jan Nieuwenhuizen  <janneke@gnu.org>

	unquoting fix.

	no closuring in macro body...

	add equal?, member, for-each.

	closures: mostly supported...

	syntax.mes: more debugging.

	mes.c: single-statement body lambda closures.

	c0.mes: simpler bug.

	TODO: update

	closure.mes: document mes closure bug.

	mes.c: add boolean_p.

	mes.c: fix symbol? for nil.

	test.mes: disable call-with-values test, prints too much debugging.

	mes.c: evcon: support clause without cdr. Fixes or.

	add simple <=, >= and list?.

	scm.mes: and: bugfix, return #f for (and #f 1 2 3).

	syntax.mes: use cond iso if. rode harink

	hax0rz..ugh + next name? test in macro.mes.

	mes.c: another macro clue-bat in apply. now macro.mes equals guile -s macro.mes.

	mes.c: begin_env: bugfix, keep going in body after set!

	mes.c: bugfix for eval_quasiquote: stay in quasiquote mode after next quote.

2016-07-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	guile runs macro-based mes:define-syntax, mes runs but yields *undefined*.

	support define-macro inside eval (i.e., inside define-macro)

	mes.c: move define, define-macro into begin_env, remove loop. fixes inner defines.

	define-syntax...

2016-10-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	syntax...

2016-07-16  Jan Nieuwenhuizen  <janneke@gnu.org>

	implement variable-argument and, or.

	implement let loop.

	cleanup let, let*, letrec

	implement unquote-splicing, cleanup some macros

	update macro, fix andmap.

	add scheme apply, rename apply-> apply_env.

	syntax.mes: experiments...

	support cond without match, define-macro x (lambda)).

2016-07-11  Jan Nieuwenhuizen  <janneke@gnu.org>

	*unspecified* harder.

	add number->string, string->symbol, symbol->string.

	add procedure?

	add variable argument append.

	+,-,*,/: take n arguments.

	add call-with-values, values.

	add memq/memv.

	rename assoc to assq.

	add vectors.

2016-07-10  Jan Nieuwenhuizen  <janneke@gnu.org>

	add length.

	remove disabled code.

	add chars.

	add strings.

	TODO: new file.

	add begin.

	add letrec.

	fix for set! inside lambda.

	add not, if.

	add +,/,*,=.

	loop2.mes: separate from scm.mes.

	ignore

	add set!.

2016-07-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	snarf scm functions and environment.

	eval: disarm lambda.

	map: support two lists.

	add simple map.

	fix evlis argumuent execution order.

	add let*.

	reader: handle whitespace and comments inside lists.

	move mes language additions to scm.mes.

	hack to print (current-module).

	mes.c, mes.mes: support quasiquote, unquote.

	boot.mes: generate from mes.mes, scm.mes, test.mes.

2016-07-08  Jan Nieuwenhuizen  <janneke@gnu.org>

	mes.c: support `.' and add let.

	boot.mes: support macros, add and, or.

2016-05-29  Jan Nieuwenhuizen  <janneke@gnu.org>

	boot.mes: boostrap into mes.

2016-07-09  Jan Nieuwenhuizen  <janneke@gnu.org>

	Leave pure LISP.
	* GNUmakefile: New file.
	* mes.c: Lots of work.
	* mes.mes: New file, split-off from mes.scm.
	(builtin, number): New function.
	(apply): Use them.
	* mes.test: New file.
	* scm.mes: New file, split-off from mes.scm.

	Add LISP interpreter in C.
	mes.c: New file.

2016-05-28  Jan Nieuwenhuizen  <janneke@gnu.org>

	Add Guile version of John McCarthy's Maxwell Equations of Software.
	* .gitignore: New file.
	* AUTHORS: Idem.
	* COPYING: Idem.
	* README: Idem.
	* mes.scm: Idem.

2016-05-15  Jan Nieuwenhuizen  <janneke@gnu.org>

	Initial.
                                                              -*- org -*-

#+TITLE: ChangeLog

Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>

  Copying and distribution of this file, with or without modification,
  are permitted in any medium without royalty provided the copyright
  notice and this notice are preserved.

Normally a ChangeLog is generated at "make dist" time and available in
source tarballs.
