2280 Commits

Author SHA1 Message Date
tg
b58d7b8053 fix regression wrt. pdksh (introduced between R40e and R40f)
about how and when the display is redrawn by reverting one
bool back to an int, as it’s used as a counter (hm, should
be an unsigned I guess but…)

on the other hand, xlp_valid should’ve been a bool, make it so
2012-11-26 22:39:14 +00:00
tg
9f15657f7b make cats more flexible 2012-11-26 16:39:43 +00:00
tg
c9970fb7ba make regression testsuite once again safe to run with -DMKSH_NOPROSPECTOFWORK 2012-11-25 22:23:31 +00:00
tg
2fc5aa487b RT tells me Minix 2 (i386) also doesn’t have gettimeofday(2) 2012-11-20 18:50:46 +00:00
tg
f284261018 • update documentation and references
• say R41, we’re almost feature-complete, and the missing one
  will not require documentation updates
2012-11-20 18:25:12 +00:00
tg
13da062f92 add MKSH_UNIXTIME 2012-11-20 18:07:45 +00:00
tg
2f41503f8e make more internal consistency checks #ifndef MKSH_SMALL 2012-11-20 18:06:53 +00:00
tg
435bc124ef introduce $BASHPID for ormaaj from #ksh 2012-11-20 17:42:32 +00:00
tg
bfda9858f1 sort 2012-11-20 17:34:42 +00:00
tg
68d8d83e67 add checks for ~+ and ~- (inspired by posh change) and bump date,
as I’m not likely to continue hacking tonight
2012-11-12 19:13:46 +00:00
tg
b7659199ca fix a test 2012-11-12 18:48:29 +00:00
tg
222d50f1af save some space for error-less error messages
inspired by a bugfix for posh for something that was not a bug in here
2012-11-12 18:28:40 +00:00
tg
bbc0702cdd make “set -o nounset” friendly (even though people who use THAT are at own fault, IMO!) 2012-10-30 21:04:56 +00:00
tg
5aa7842d33 who would’ve thought proper ^C handling be so hard? 2012-10-30 20:49:44 +00:00
tg
8caee45c60 int → bool 2012-10-30 20:13:20 +00:00
tg
faa0a78df3 restore yyrecursive context in quitenv (LP#1069428) 2012-10-30 20:07:15 +00:00
tg
fc27886680 when ^C’ing out of an interactive shell, also throw away the here documents (probably leaks, maybe not due to quitenv, but not much) 2012-10-30 20:07:00 +00:00
tg
f5ccc2feb3 while we do not condone killing of cats, fix LP#1058815 2012-10-30 20:06:49 +00:00
tg
0ce7dcf856 maybe this makes gcc not bitch… again… anal-retentive arsecompiler…
found in opensuse buildservice logs for centos 5
2012-10-22 20:52:47 +00:00
tg
bfe7d78d40 bring back ${ foo;} sans dot.mkshrc patch, using a temporary file, and as experimental feature 2012-10-22 20:19:18 +00:00
tg
574c024635 introduce MKSH_DISABLE_EXPERIMENTAL and wrap the new feature introduced
in cid 1005084678C510CF7E4 in it
2012-10-22 16:53:22 +00:00
tg
c7419d9e6a defer setting exstat for eval to 0 (the one used in case shell() is empty)
until after the stuff run in shell() has had a chance to toy with $?

bug forwarded by one of our packagers, found by one of their users
2012-10-21 21:55:05 +00:00
tg
31f24a4040 add some bounds, for a subsequent commit:
• all writers of exstat ensure the value is in [0; 0xFF]
• all readers of exstat AND it with 0xFF (not strictly needed thus)
• trap_exstat is “safe”, i.e. always either -1 or [0; 0xFF]
2012-10-21 21:39:06 +00:00
tg
bebb2d2254 EXPERIMENTAL optimisation for “sh -c 'foo'” to equal “sh -c 'exit foo'” iff
several conditions are met as outlined below; for more background, refer to
http://www.FreeBSD.org/cgi/query-pr.cgi?pr=113860

We don’t yet optimise 「% sh -c '{ echo a; sleep 10;}&'; sleep 1; ps T」 so
the FreeBSD® sh approach cannot work for us, but scanning the “sh -c” argu‐
ment for disallowed characters and, if not, setting a flag that enables the
shell to exec the tree when parsed as TCOM *and not c_trap()* was possible.

Disallowed characters are currently C_QUOTE except space, that is:
Tab Newline " # $ & ' ( ) * ; < = > ? [ \ ] ` |

This should catch all cases of magic, variables, subshells, pipelines, etc.
2012-10-21 21:26:41 +00:00
tg
1f43cc907d fix backslash-asterisk glob noise for nōn-existant targets and tilde
expansion completion; problem analysis and solution draft by Andrew
Kudryashov (thanks a lot!); this fix instead re-uses existing code
for solving the problem with multiple matches

debugged using “make d dr” targets, yay!
2012-10-21 18:33:46 +00:00
tg
b843e91274 point out the miros-mksh@ mailing list, thanks Andrew Kudryashov 2012-10-21 17:42:51 +00:00
tg
59f7279ea2 this is now http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55009 2012-10-21 17:38:22 +00:00
tg
77f5b8f38d add split-screen debugging; close-on-exec the logfile 2012-10-21 17:16:45 +00:00
tg
b3c7268f02 gzip the catmanpage, the text page and the HTML page 2012-10-14 16:22:49 +00:00
tg
b2e4f0b63e add code to preformat manpages, for lesser OSes such as NetBSD® 2012-10-14 14:51:08 +00:00
tg
b853fcc002 fix default for HISTSIZE as pointed out by Andrew Kudryashov (thanks!)
XXX still, only the !MKSH_SMALL case is handled in the manpage
2012-10-14 14:04:05 +00:00
tg
21234f1526 fix detection of penguin flocks 2012-10-14 14:02:10 +00:00
tg
d8662eb228 even more hacks to pass “-O666 -fstrict-overflow -Wstrict-overflow=9 -flto=jobserver” with “gcc version 4.8.0 20120930 (experimental) [trunk revision 191865] (Debian 20120930-1)” ☹ plus make the rtchecks mandatory 2012-10-03 17:24:23 +00:00
tg
c39bfe09ee rewrite some code to avoid gcc 4.8 complaining 2012-10-03 16:16:15 +00:00
tg
b55d9870e3 reorder notoktomul to have the constant as second argument like notoktoadd 2012-10-03 15:55:37 +00:00
tg
0575d07671 rewrite XPtrV to use size_t instead of pointer arithmetic, for gcc-snapshot (20120930-1) -fstrict-overflow -Wstrict-overflow=9 2012-10-03 15:50:32 +00:00
tg
167995da22 repair choiceless select builtin 2012-10-03 15:13:34 +00:00
tg
0d72035990 make char_is_8_bits assertion more anal 2012-09-28 18:57:49 +00:00
tg
4b2371eebf add workaround for musl (define _BSD_SOURCE as well) which is even *more*
ugly than the one for dietlibc (the other one misunderstanding the *real*
meaning of that flag), by $CC divining, until such time as all the Linux
C libraries will honour _ALL_SOURCE (I wish)…
2012-09-27 18:23:43 +00:00
tg
9fbdef8e60 pure RCSID sync with OpenBSD, as we introduced SIGWINCH tracking earlier
XXX we could track whether tty_fd has already been successfully opened,
XXX the ttystate initialised, and then just never close it unless it is
XXX necessary, then we can keep COLUMNS/LINES accurate in scripts, even
2012-09-21 17:20:22 +00:00
tg
89613d34d4 detect zsh 2.5.02 as found on NeXTstep 3.3; thanks to ft (Frank Terbeck) and chris2 (Christian Neukirchen) 2012-09-18 14:18:59 +00:00
tg
eac85ffdf1 OpenBSD found out that "building argv for $* and $@" manipulates l->argv
in place which affects ps(1) output on BSD; create a new array and copy
the original parts from argv[] there without touching argv passed to main
2012-09-07 21:02:43 +00:00
tg
0415b74436 Update wcwidth data from Unicode 6.1.0 2012-09-01 23:46:41 +00:00
tg
e6ddeaa53d sync clog 2012-08-24 21:33:51 +00:00
tg
e2d1f3bf99 related to LP#1025843 fix tab completion for tilde
this code is insane, who wrote globbing and expansion for mksh’s
predecessor must have been on very interesting drugs
2012-08-24 21:15:42 +00:00
tg
42ac0dc08e second attempt at getting '$FOO/b*r/baz' tab-completed right,
plus the beginning of the tilde fix… do not use, this is fucking
impossible to get right, but I’d like an archival commit
2012-08-24 20:57:46 +00:00
tg
2ed6e8998c repair globbing $foo/ba*r/baz 2012-08-24 20:05:13 +00:00
tg
829cd0cc70 leak less memory from tab completion 2012-08-24 19:14:56 +00:00
tg
84020897fd allow overriding /etc location (LP#1039713), but don’t do it 2012-08-24 19:09:10 +00:00
tg
beca8ed86f more int → bool 2012-08-24 19:02:57 +00:00