Commit Graph

264 Commits

Author SHA1 Message Date
tg 4075a35b8e experimental getpgrp(2) support for mksh 2005-01-18 17:12:22 +00:00
tg 490aa9b78d oups. forgot to fix after sync. 2005-01-02 21:49:12 +00:00
tg 6625949936 solaris doesn't have sig_t 2004-12-31 19:54:16 +00:00
tg 99471ef173 regen 2004-12-31 19:37:18 +00:00
tg 130367d617 further cleanup 2004-12-31 19:37:03 +00:00
tg e8307f4a45 get rid of manually generated signal lists 2004-12-31 19:24:20 +00:00
tg c9f0e4483f kill a local include file 2004-12-31 19:15:39 +00:00
tg 6a1ab8c84f sync with ksh.1tbl 2004-12-31 19:01:53 +00:00
tg 56862d5911 sync with sh.1tbl and reality 2004-12-31 19:00:30 +00:00
tg f6e24ec417 Our times(3) just calls getrusage(2) and gettimeofday(2), converting seconds
to ticks.  Since ksh needs things in seconds it then converted them back.
Avoid the silliness and use the getrusage(2) and gettimeofday(2) directly.
With man page help from jmc@
From: Todd C. Miller <millert@cvs.openbsd.org>
2004-12-31 18:41:47 +00:00
tg 3cba14dc9d - document IFS behavior changes
- grammar, punctuation, xref, mdoc tweaks
- sort keywords
- indent example displays
- minimize against diffing between sh.1tbl
- document set -o sh
- tweak the displays of some editing and builtin commands
- rework some operator descriptions
From: Jared J. Yanovich <jaredy@cvs.openbsd.org>

These man pages are not derived from UCB and are actually public domain.
Verified with aaron@ who did the conversion from man -> mdoc.
From: Todd C. Miller <millert@cvs.openbsd.org>

- cleanup
- ", and" and ", or" lose the comma where superfluous
2004-12-31 18:22:54 +00:00
tg 1a183984c4 Replace fd_clexec() with calls to fcntl(fd, F_SETFD, FD_CLOEXEC)
From: Todd C. Miller <millert@cvs.openbsd.org>
2004-12-31 17:42:45 +00:00
tg 665202f561 Use struct termios instead of TTY_state typedef
Use tc[gs]etattr() instead of [gs]et_tty() abstraction
From: Todd C. Miller <millert@cvs.openbsd.org>
2004-12-31 17:39:12 +00:00
tg 2b6df533b9 Use the BSD sig_t instead of homegrown handler_t
Remove KSH_SA_FLAGS
From: Todd C. Miller <millert@cvs.openbsd.org>

sanitise signal handling a bit (will be revisited)
2004-12-31 17:29:28 +00:00
tg 0799af5fdb don't set KSH_VERSION if invoked as sh 2004-12-31 17:15:07 +00:00
tg 791337c8a3 Use _POSIX_VDISABLE directly instead of assigning it to a variable.
From: Todd C. Miller <millert@cvs.openbsd.org>
2004-12-31 17:11:11 +00:00
tg 8f06ee02a7 Use _PATH_BSHELL instead of hardcoding "/bin/sh"
From: Todd C. Miller <millert@cvs.openbsd.org>
2004-12-31 17:08:29 +00:00
tg 2eb170af4e oops 2004-12-28 22:47:04 +00:00
tg 829ae4376a regen 2004-12-28 22:44:55 +00:00
tg 5e53de69ad stdbool.h 2004-12-28 22:44:39 +00:00
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