XXX one of these uses a gcc extension, ok for now tho
* don't include <ctype.h> any more at all
* don't try nl_langinfo in small mode, just check locale
saves 171 .text, 4 .data, 256 .bss, 1 import
with embedded newline (\n), and multi-line prompts with embedded
newlines. single-line prompts should be not affected; prompts with
embedded carriage return (\r) should be fixed by this as well.
also fix prompt_redraw comment (can't remove the variable though,
since it's required if the shell inserts a newline after the prompt
herself).
tested on cygwin and interix
(yeah, that's what you get from developing with a
16-bit MS-DOS(R) executable of your favourite text editor)
* lex.c, mksh.1: do not print the delimiting character for
not-to-be-counted character sequences (i.e. ANSI escapes)
in prompts any more, mostly because ASCII 01h is printable
on both Interix and Cygwin and I'm lazy
(this also fixes prompt width counting if a printable character
such as 'x' is used as delimiting character)
* lex.c: through printing the prompt character by character,
also print the delimited sequences if skipping, fixes some
prompt redrawal not honouring colours stuff while not totally
redrawing the entire prompt
(only the last line of the prompt is redrawn, keep this in mind
when doing the ANSI colour game)
TODO:
* maybe go back up one line and redraw whole prompt?
* optionally edit command on multiple lines, bash-like,
instead of scrolling horizontally
but sync RCS IDs for easier future adaption:
* Simplify savefd() by removing the "noclose" flag and make noclose
behavior the default. Almost all uses of savefd() are followed
by an implicit or explicit close.
* fix typos
* might as well make ksh_getopt() match real getopt(), ie. get rid of that
stupid EOF concept that was never true. adobriyan@gmail
* use SEEK_* for lseek()
* fix lint comments, no functional changes
* remove excessive optimization; from adobriyan@gmail
* only santa checks things twice; from adobriyan@gmail
* Interpret zero-filled numbers as decimal; PR 4213; from Alexey Dobriyan
according to SUSv3 and other modern shells (POSIX allows both).
Idea for the patch (add another lex state) from OpenBSD, but the
implementation differs slightly (and is better in quality).
Also add two testcases (/bin/sh passes both, old mksh only one),
and document the change in the manual page. Sync RCS IDs with OBSD.
sitory whose ChangeLog follows. mksh R21 is licenced under the MirOS li-
cence, shown in "sh.h", and a two-clause UCB-style licence by Marc Espie
as shown in "alloc.c".
This executable is a fair bit smaller and shorter than our /bin/ksh that
it is designed to eventually replace (as /bin/sh hardlink), with the old
/bin/ksh to completely vanish. It is still in beta testing though, and I
don't think it will compile on other operating systems.
mksh R21 is a completely new port, bringing together the OpenBSD-current
/bin/ksh, the MirOS-current /bin/ksh and the older mksh R20 (which still
was portable, ocvs-based).
- expat as discussed with bsiegert@ today on the phone
- ksh as announced earlier on the lists
* un-hook lib/libexpat from make includes
* remove /usr/include/{,open}ssl upgrade workaround from includes/Makefile
* nuke old bin/ksh
* nuke libexpat and xmlwf
From: Todd C. Miller <Todd.Miller@courtesan.com>
The following ksh diff needs wide testing. It does the following:
1) proper error message for bad substitution.
Before:
$ echo ${a[@]:foo}
ksh: : bad substitution
After:
$ echo ${a[@]:foo}
ksh: ${a[@]:foo}: bad substitution
2) fix a core dump for "echo ${a[@]:?foo}".
3) fix a use-after-free bug (from otto@)
as of CTM delta 3496 (roughly 1200 UTC today) into the
vendor branch.
Attention: this is a big update. Don't even try to
build this system, OpenBSD 3.4-beta, yet on your own.