Commit Graph

133 Commits

Author SHA1 Message Date
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
tg f5d4e21aa2 • fix the third dramsey scrolling bug for both ^D at BOL and ^W at EOL
(I hope)
• fix another one I found: after ^D'ing, insert at BOL, the > is displayed
  one character too late
2007-05-21 19:25:32 +00:00
tg 252861b156 fix the latest appearance of the dramsey backwards movement bug, cf.
Message-ID: <e3fded850705200935h6ac2c9ebgbc7a9b10ac034a49@mail.gmail.com>
and Message-ID: <Pine.BSM.4.64L.0705201659500.8619@odem.66h.42h.de>
2007-05-20 17:53:13 +00:00
tg fcd6e4f07a bump version 2007-05-13 19:18:26 +00:00
tg d2d035355f a certain size optimisation broke the utf8bom-3 regression test if
mksh was configured to have utf-8 mode “always on” (because it's
really only always on for interactive shells); setting it to really
always on would break the other half of this regression test, so
do the optimisation only if MKSH_SMALL
2007-05-10 19:22:11 +00:00
tg 384032b729 fix the “dramsey horizontal scrolling bug” – time for you to find another ☺ 2007-05-10 19:08:48 +00:00
tg e35eed3687 mksh R29c was indeed broken on HFS+ filesystems thanks to Darwin/Mac OSX
brain-deadness
2007-04-23 21:46:12 +00:00
tg 002904664e version bump here, too (CR-LF shebang) 2007-04-17 23:51:32 +00:00
tg 1d6ae7d16b GNU/Cygwin32 sucks, as operating environment. Plain sucks. 2007-04-17 14:00:00 +00:00
tg 680e8ebd3f if we read an utf-8 BOM, enable the utf8-hack flag (we can test for that on
mirbsd even because the main.c enabling is only run for interactive shells)
2007-04-15 12:28:38 +00:00
tg 2785ce3de4 • (re)implement shebang execution file parsing; this makes the “and which
do not start with a "#!shell" sequence” part of mksh(1) true again; this
  was probably lost in mksh R21 or so when I decided/saw that our kernel
  always parses shebang lines (code written myself, not taken from pdksh
  again or MirBSD kernel, but verified against both)
• bom+shebang execution now works, no need setting EXECSHELL in the test
• bump version
2007-04-15 12:09:57 +00:00
tg 40be0d9f04 commit a test (which mksh on MirOS BSD currently fails) to test if files
starting with an UTF-8 BOM before the shebang can be executed correctly;
this would succeed if either mksh parses the shebang line instead of re-
lying on $EXECSHELL or the kernel supports it

bsiegert@ ok's my attempts to fix this
2007-04-15 10:58:55 +00:00
tg 1692a6da66 ignore the UTF-8 Byte Order Mark at the beginning of the input (via a file
given to execute, standard input (interactive or not), via -c command line
argument, or after “eval”, but not for $(…) comsubs, at the beginning of a
subsequent line, or within a line, etc.); regression test for it

idea during my “week off” (despite the pain), bsiegert@ thinks it's good –
and utf-8 capable tools ought to be able to do this anyway
2007-04-15 10:45:59 +00:00
tg 7071cada42 • use wdcopy() not str_save() to duplicate an “encoded string”, whatever
• prevent out-of-bounds memory access, cought by glibc malloc on IA-64
2007-03-14 02:41:09 +00:00
tg c61deaea27 remove unused utf_width(); bump vsn 2007-03-10 00:42:00 +00:00
tg 83c2ee87f4 • remove strcasestr.c, use home-grown implementation¹, call it stricmp,
and have it return an API-correct const char *
• enhance and stylify comments
• a little KNF and simplifications
• #ifdef DEBUG: replace strchr and strstr with ucstrchr and ucstrstr
  that take and return a non-const char *, and fix the violations
• new cstrchr, cstrstr (take and give const char *)
• new vstrchr, vstrstr (take const or not, give boolean value)
• new afreechk(x) = afreechv(x,x) = if (x1) afree(x2, ATEMP)
• new ksh_isdash(str) = (str != NULL) && !strcmp(str, "-")
• replace the only use of strrchr with inlined code to shrink
• minor man page fixes
• Minix 3 signames are autogenerated with gcc
• rename strlfun.c to strlcpy.c since we don't do strlcat(3) anyway,
  only strlcpy(3), and shorten it
• dot.mkshrc: move MKSH=… down to the export line
  to not disturb the PS1 visual impression ☺
• dot.mkshrc: Lstripcom(): optimise
• bump version

¹) side effect from creating API-correct cstrchr, cstrstr, etc.
   uses goto so it must be better ☻

tested on mirbsd-current via both Makefile and Build.sh
2007-03-04 03:04:28 +00:00
tg ad05a2414b * edit.c: when tabcompleting a newline to backslash+newline, this
sequence is eaten before the command is called; cought by <TGEN>
  (Thomas E. Spanjaard) via IRC
  fix is to tabcomplete a newline to singlequote+newline+singlequote
* bump version
2007-02-16 17:46:42 +00:00
tg 665fba6dbf bump version 2007-02-07 02:31:06 +00:00
tg 8d696d001e if mksh_small don't even support -T instead of ignoring it 2007-01-26 18:27:34 +00:00
tg 6900d1e3ca history editing seems to work without persistent history sometimes 2007-01-18 16:13:29 +00:00
tg 6d157ffe47 autoscan for persistent history support 2007-01-18 16:05:05 +00:00
tg 7b903e4aa9 header overhaul: replace all #ifdef __OS__ with mirtoconf checks
(except the persistent history one)
2007-01-18 15:50:32 +00:00
tg 21bceac32e autoscan for the correct ed(1) type
XXX amend check_categories with stuff like persist history, etc.
2007-01-18 01:10:55 +00:00
tg 263f518dfd * Build.sh: add -fwrapv to standard CFLAGS, just to be on the safe
side (I don't have capacities to scan 71711 files in MirOS for a
  standards-compliance whack)
* copyright: mention CVS changelogs as place of contributors' name
  and credit information, too
* check.t, sh.h: bump
2007-01-17 01:24:29 +00:00