Commit Graph

2444 Commits

Author SHA1 Message Date
tg
e824f36ff0 catch up with diffs/fixed we already had
From: Otto Moerbeek <otto@cvs.openbsd.org>
2004-12-28 22:40:40 +00:00
tg
08d781a2fb Replace home rolled unsigned char type with u_char.
From: Jonathan Gray <jsg@cvs.openbsd.org>
2004-12-28 22:37:23 +00:00
tg
337bd6717f unused 2004-12-28 22:33:21 +00:00
tg
0114af375d Use stdbool.h instead of rolling our own bools.
From: Todd C. Miller <millert@cvs.openbsd.org>

XXX #ifndef HAVE_STDBOOL_H ?
2004-12-28 22:32:09 +00:00
tg
cddaa62a46 Flags set in signal handlers should be volatile sig_atomic_t
From: Todd C. Miller <millert@cvs.openbsd.org>
2004-12-28 22:28:01 +00:00
tg
506319026b umask returns mode_t, not int
From: Todd C. Miller <millert@cvs.openbsd.org>
2004-12-28 22:22:49 +00:00
tg
6354a66090 always BRACE_EXPAND
no binary change
2004-12-18 19:27:21 +00:00
tg
d5ff21ea1d (anything *)0 -> NULL 2004-12-18 19:22:30 +00:00
tg
cbeac44097 * unifdef EDIT, VI, EMACS, HISTORY
* optimise away 0 ||
no binary changes
2004-12-18 19:17:10 +00:00
tg
245d3ed291 optimise away 2004-12-18 19:02:29 +00:00
tg
4c4a9323f8 unifdef: KSH
no binary change
2004-12-18 18:58:32 +00:00
tg
6d8b225141 make array_index_calc static and don't limit
array indices (well, to 2^31-1, but that's
for integer reasons only)
2004-12-18 18:39:10 +00:00
tg
60f7d03fb5 millert@ says (but we've already got it all in, only update comments)
Restore sp before calling snptreef() so the error message contains
the actual expression that caused the error.  OK otto@

while here, nice-ify a #define, and bump the mksh version number
to R20 which I somehow forgot... need sleep
2004-12-14 15:54:26 +00:00
tg
ec77eafff5 regen 2004-12-13 19:53:37 +00:00
tg
3d0671eced sync 2004-12-13 19:47:25 +00:00
tg
51053f03f5 evaluate more on [ X"$foo" = X"bar" ]
use ksh features [[ $foo = bar ]] and print instead of echo
2004-12-13 19:36:27 +00:00
tg
955d52cb21 shrink a bit 2004-12-13 19:18:01 +00:00
tg
27aff60a34 finish un-OS/2-ing and un-pdksh a bit 2004-12-13 19:09:06 +00:00
tg
c34add61ff un-OS/2 (sorry)
no binary change
2004-12-13 19:05:09 +00:00
tg
978a1d53a1 * reduce amount of empty lines
* replace some spaces by tabs
* shuffle code around (shrink)
2004-12-13 18:53:25 +00:00
tg
f4b8bc819c some manpage improvements, mostly from OpenBSD 2004-12-13 18:24:34 +00:00
tg
85a62c2ea2 shrink a bit 2004-12-13 17:33:35 +00:00
tg
429f327c0a nuke some dead code 2004-12-13 16:50:52 +00:00
tg
b99edc6cc1 From: Todd C. Miller <Todd.Miller@courtesan.com>
Cool, thanks for testing.
 - todd
2004-12-13 16:48:54 +00:00
tg
4781afda8e Revision 1.1 was added on the vendor branch. 2004-12-10 18:12:33 +00:00
tg
97d9512149 bump to mksh R19 2004-12-10 18:12:32 +00:00
tg
7920708324 Initial revision 2004-12-10 18:12:29 +00:00
tg
8a1afa6087 experimental diff:
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@)
2004-12-10 22:21:26 +00:00
tg
e2c4bce569 behaviour change: jaredy@openbsd informs me they strip
trailing IFS non-whitespace "because many sh-derived
shells have this behavious", and me checking for ksh88
on Solaris confirms it.

So, for the sake of compatibility to AT&T ksh, change
it and document the change.
2004-12-10 16:01:38 +00:00
tg
2aaea3d8d2 regenerate and auto-build h2ph test stuff,
to cope with broken OSes which don't h2ph.
2004-12-10 15:32:58 +00:00
tg
0d12c6140a fix the Interix test, and don't tell the user
it's MS interix/SFU if it's MirOS Interix ;-)
2004-12-10 15:22:19 +00:00
tg
ce69e29ac2 regen 2004-12-10 15:03:08 +00:00
tg
2d1261b883 * better check for interix
* fail chvt() if no setsid()
2004-12-10 15:01:05 +00:00
tg
44abfaee70 regen and use revoke() only if found
XXX should use autoheader for config.h.in
2004-12-09 23:25:17 +00:00
tg
2ff774f6f5 check for revoke() existance and INTERIX_ROOT in the environment 2004-12-09 23:23:29 +00:00
tg
00e6b9e264 mksh R18 2004-12-09 20:08:49 +00:00
tg
1e6952da6a Changes by: otto@cvs.openbsd.org 2004/12/09 04:32:07
partially backout prevous commit, it breaks eval of ${a[@]}

(if it's not an array --mirabile)
2004-12-09 16:32:09 +00:00
tg
3de9499c1e Changes by: millert@cvs.openbsd.org 2004/12/08 14:23:19
Fix core dumps for ${@:?word} and ${foo[@]?bar}.  With help from
and OK otto@.  Closes PR 4023.
2004-12-08 23:00:14 +00:00
tg
f668eac7b1 do it better 2004-12-07 18:01:50 +00:00
tg
6f06893fe2 docs updates 2004-12-07 17:57:58 +00:00
tg
ff0d4b4121 1.17 and correct some typos in the test scripts 2004-12-05 16:16:32 +00:00
tg
f680d29969 * sync strlfun.c
* update licence
* update to mksh 1.17
2004-12-05 16:10:58 +00:00
tg
d3e5bf1ef2 * replace all occurences of old eMail addresses of mine
with their more recent counterparts
* no $Log keyword!
* update licence template to most recent version in files touched
* in some places, don't add our own licence boilerplate, just
  add my name to the others
* make dev/rndvar.h suitable for inclusion in asm code
* include dev/rndvar.h by in_cksum.s instead of
  hardcoding pool size
* ENTRY(a); ENTRY(b) -> NENTRY(a); ENTRY(b)
* RCS IDs belong into .comment not .text
2004-12-05 13:24:34 +00:00
tg
bd9e0e49d3 manpage clarification
XXX 1) someone please clarify what of this, if at all,
XXX    applies to sh.1 (compiled with -DKSH) too
XXX 2) what about sh (compiled without -DKSH)?
2004-11-26 15:46:29 +00:00
tg
9fec84ac8e commit jaredy's fix as well as a fix of mine (fed back to jaredy)
now passes 193 tests
2004-11-26 15:43:53 +00:00
tg
5cb41399fe add a regression test which our current mksh does not pass,
but the one fixed by a diff by jaredy@openbsd (which intro-
duces other problems though):
Log message:
Change the behavior of IFS word-splitting:  split words
when the current character is IFS space and the last
character was a word character or it was non-white IFS
space and the current character is non-white IFS space.
This deviates from the previous behavior because the
latter splits words when the last character is any IFS
space and the current is non-white IFS, resulting in
more fields most of the time.

This new behavior follows what the man page describes;
i.e., that a field is delimited by one or more IFS
whitespace characters followed by zero or one non-white
IFS characters.
2004-11-26 15:30:15 +00:00
tg
6b85a22986 leave stripping to the user 2004-11-13 17:16:22 +00:00
tg
6612f83855 did. anybody. ever. say. this. is. ok. in. HEAD? 2004-11-13 01:55:35 +00:00
tg
95bc91bffb nicen error msg (post-1.16!) 2004-11-10 20:08:21 +00:00
tg
c53499b45e * Build.sh: bail out early if build failure
* Build.sh: fix manpage name
* chvt.c: Solaris:
   chvt.c:57: `TIOCSCTTY' undeclared (first use in this function)
* chvt.c: GNU/Linux:
   /tmp/ccrAeq0h.o(.text+0x5e): In function `chvt':
   : warning: warning: revoke is not implemented and will always fail
* sh.h: let it only change to .section .comment ifdef __ELF__
2004-11-10 19:58:06 +00:00