Commit Graph

156 Commits

Author SHA1 Message Date
tg 947bc8e05b finally, all bugs fixed, adjust dot.mkshrc to use the subst code 2008-03-01 21:24:58 +00:00
tg 4912b5cf67 quite a big change, but now the variables expanded are not
scanned for slashes, plus the ADELIM code gets more use and
a bugfix ☺
2008-03-01 21:10:26 +00:00
tg 16dd1d3c8f fix one of the bugs in this code… still the one I’m looking for left 2008-03-01 17:14:17 +00:00
tg 707a787edc add another two corner case checks - and mksh fails one of these oO 2008-03-01 16:40:57 +00:00
tg 36c4552e1f we don't need to be special if called as -sh any longer now 2008-03-01 02:21:38 +00:00
tg 8d170a3d01 fix on Interix, where tr(1) is more weird than even Solaris’ XPG4 one…
just do not use ranges, no matter what.
2008-02-29 16:38:41 +00:00
tg 3e870cb1a5 handle slowlaris idiotic /usr/xpg4/bin/tr(1) 2008-02-29 11:48:32 +00:00
tg 8aa54e42a9 fix 2008-02-27 12:49:54 +00:00
tg 85b0cb20eb almost hack ${foo//bar/baz} support for real, now
still one corner case left ☹
→ 11:09⎜«Han:#UnixNL» Ik _haat_ bash
⇒ kann ich mich nur anschließen…
2008-02-27 11:24:12 +00:00
tg 5ea53a15c7 implement “here strings” 2008-02-26 20:43:11 +00:00
tg 5468e6ee12 now we don’t need more special FPOSIX behaviour any more 2008-02-25 00:58:26 +00:00
tg 8c86fedc2d * lex.c: Don't expand aliases if there's an opening bracket just after
the token. Fixes unreported problem with pdksh reporting syntax error
    on the init scripts that define function named ‘stop’ (clashing
    with an built-in alias.)

 -- Robert Luberda <robert@debian.org>  Sun, 27 Feb 2005 18:36:55 +0100
2008-02-24 22:12:36 +00:00
tg 635bdac720 another one from debian: '.' needs an argument 2008-02-24 15:57:20 +00:00
tg d16fc19335 live code from FOSDEM: add print \xDB and \u20AC, including regression test
agreed bsiegert@
good idea and manpage diff ok'd by some netbsd person sitting next to me
2008-02-24 15:48:43 +00:00
tg 2ca968e25f • fix for the pipeline-as-coprocess problem
• bump to mksh R32
2007-10-25 13:51:19 +00:00
tg 97ba2fabc7 first step towards mksh R32 ☺
allow array indices in the uint32_t range (0‥4294967295) and map negatives
into that range; adjust manual page and regression tests; to be used RSN ☻
2007-10-18 20:32:33 +00:00
tg e2c2a1c1a0 clean up the CHARMASK mess 2007-10-14 13:43:41 +00:00
tg 52b9911ff6 revert the return type of x_e_getc() back from u_char to int
this change broke abortion on failure to read input, was not
needed for gcc warnings and is the fault of Intel’s compiler

this should fix the other busy-loop problem occuring only on
GNU/Linux so far – 10x spaetzle@freewrt.o for pointing me to
the problem; reproduced on my work craptop
2007-10-09 14:50:50 +00:00
tg c1c939e340 • fix memory leaks found by coverity
from netbsd via oksh
  we had the NULL pointer deref already fixed
• avoid a bogus not-setting the return value of edit.c:x_file_glob()
  introduced by the above change in oksh
• escape ? as well (but not ] because that’s wrong)
  reminded by cbiere@netbsd via oksh
• Unsetting a non-existent variable is not an error. See
  http://www.opengroup.org/onlinepubs/009695399/utilities/unset.html
  report from Arkadiusz Miskiewicz; fixed based on
  http://cvs.pld-linux.org diff via oksh but modified slightly
• Be more smart waiting for input for non-interactive scripts.  Fix
  based on a diff from debian:  see their bug#296446 (via oksh)
  modified slightly
  this also fixes cnuke@’s “mksh busy loop” problem, for which I never
  received a bug report, but the Debian bug page contains a set of two
  scripts to reproduce this before (and no longer after) this commit
• some KNF
• bump version
2007-09-09 18:06:42 +00:00
tg daf019728c fix typo (blsk -> bksl) 2007-09-07 23:57:14 +00:00
tg ca46f3dc98 new builtin “rename” (this name sounds better than “mksh_mv_rescue” ☻)
to just call rename(2) directly, e.g. if /bin/mv needs /lib/ld-uClibc.so.0

some assorted code cleanup
2007-08-19 22:06:27 +00:00
tg e99f988aae feature freeze for mksh R31, to be released as part of MirOS #10 2007-08-18 00:22:09 +00:00
tg f684b0ceb1 Implement the “source” command, as requested by some and agreed bsiegert@
In contrast to AT&T ksh93, its semantics are like GNU bash in that it ap-
pends the current working directory to the search path; it is implemented
as a shell alias instead of enhancing funcs.c:shbuiltins[] like in ksh93.
2007-08-13 19:39:21 +00:00
tg 499327f7b8 add “set -o arc4random”, RTFM for details 2007-08-12 13:42:23 +00:00
tg 496b8f4dc3 • new way of checking for mknod & friends, due to tcc vs glibc weirdness
• bump vsn for the code restructuring
2007-07-31 11:11:25 +00:00
tg 3718a00106 • test on HURD (gnubber)
• fix unreachable code (break stmt) cought by suncc on yofuh's E420
• bump vsn to today
2007-07-26 13:23:52 +00:00
tg e37577de42 fix another errexit bug: unwind() is __dead, so the pseudo-signal was never
delivered to the process
• regression test by Clint Pachl, verified against Debian ksh93 by me
• place to fix it in the code discovered by Otto Moerbeek
2007-07-24 11:22:04 +00:00
tg f2a52c65fa … and fix that bug.
Guvf pbzzvg haxabjvatyl fcbafberq
ol NheVFC ToE, fvapr jr hfr zxfu,
naq zl bgure gnfxf ner jnvgvat...
2007-07-23 14:28:52 +00:00
tg 7c0209771c more testcase – currently broken… had thought of this but apparently not done 2007-07-23 14:10:48 +00:00
tg a1433b7122 • Build.sh: always prepend well-known signal names, so that some signals
will not come up weirdly (e.g. on AIX: SIGSAK (SIGMAX?), SIGIO (SIGAIO?),
  SIGURG (SIGIOINT?)), and add a few more while here
• check.t, sh.h: bump
2007-07-22 13:46:15 +00:00
tg 56a8da33cf • make the "if called as sh, set FPOSIX" not !SMALL-only
• bump to R30-gamma, feature freeze
2007-07-17 13:56:51 +00:00
tg cd80bc8012 these can't be nested and are expected to fail, although our error message
is different from bash's that's okay
2007-07-06 11:54:34 +00:00
tg 78d58de7a0 fix the rest of it 2007-07-06 02:22:57 +00:00
tg c9db9eb092 more bash-like behaviour here, oeps 2007-07-06 01:37:39 +00:00
tg 85a4a1d9c4 fix the regression test, mksh fails it now 2007-07-06 01:30:32 +00:00
tg fafd6998bd remove some uwin kludges, just live with it
keep these that are indeed correct though
2007-07-05 11:49:07 +00:00
tg 7004525fcc • add support for the Borland C++ Builder (on UWIN)
• add support for the Digital Mars compiler (on UWIN)
• clean up
• describe new build targets and that UWIN sucks
• bump vsn
2007-07-01 21:27:03 +00:00
tg 36188c60be coerce this into running on UWIN - or rather sort of. Ugly. 2007-07-01 19:04:53 +00:00
tg ca17798533 this is bash compatibility week, and by suggestion of actual users,
namely Dr. Robert “Pfeffer” Arnold (in this case, in FreeWRT), make
a half-completed attempt at implementing ${foo:2:3} substring evals
(of course, negatives can't work right now and that the numbers are
in face expressions is something I only read later too – this is to
be revisited later, but it's already late)

don't depend on this behaviour yet though

if someone wants to add more regression tests, feel free to…
2007-06-27 23:12:59 +00:00
tg 0675b8f25b one check seems to fail on ecce!GNU/Linux 1.0 – but that is perl’s fault 2007-06-23 22:48:47 +00:00
tg 3a94b076a0 implement bash-style array initialisation, as requested by many
still experimental
2007-06-22 23:34:42 +00:00
tg d42f966d22 rewrite some code; bug found by HP's C compiler 2007-06-21 16:04:46 +00:00
tg e596de4759 make sure that “integer” and “local” are defined even in FPOSIX mode, which
is a compromise anyway; these lunox people will have to live with that, too
many existing korn shell alike scripts depend on it even if not on the full
korn shell syntax availability (note: this doesn't mean using these in some
script with #!/bin/sh is ok)
2007-06-17 00:50:09 +00:00
tg 17b7a28ac8 • check.t: add some FPOSIX regression tests (1 still fails)
• all: remove vi editing mode #if defined(MKSH_SMALL) || defined(MKSH_NOVI)
  saves 12608 byts on i386
• check.t: add $0 quoting
2007-06-15 21:55:20 +00:00
tg e258f1e9fe bump 2007-06-09 22:02:04 +00:00
tg 3dcf22a319 ok, icc _did_ track down a few ones, and I fixed errno abuse a little too
however, bad S/N ratio

side effect bonus: smaller code size now
2007-06-06 23:28:17 +00:00
tg 63c31c43e3 fix for the SUNpro 8 on yofuh's E420:
cc: Sun C 5.8 Patch 121015-04 2007/01/10
2007-06-05 19:48:47 +00:00
tg 1e93f97b8c compile warning-free on SUNpro (regression test suite pass) for MirBSD 2007-06-04 21:33:28 +00:00
tg a3ab909ff6 bump vsn, we had a regression… 2007-05-24 19:50:38 +00:00
tg 9b86b32dc8 ah, of course, bump the date 2007-05-22 19:31:01 +00:00