Commit Graph

3222 Commits

Author SHA1 Message Date
tg 28a08dc7a0 fix an error message 2018-07-15 16:23:10 +00:00
tg 008f09dd09 fix a vi mode segfault when using ^W during a search; from multiplexd 2018-07-15 16:16:38 +00:00
tg 5dab09d6a8 add EU-DSGVO (GDPR) notice for the mailing list 2018-07-15 13:57:18 +00:00
tg 3d08263d69 Unicode 11.0.0 2018-06-26 21:22:24 +00:00
tg 28637e55fd fix using “-m” on the command line; spotted by G.raud <graud@gmx.com> on ML 2018-05-08 17:37:37 +00:00
tg 3560784571 fix typeset -L vs. Unicode: snprintf second arg was wrong 2018-05-07 00:07:23 +00:00
tg 2d0c795605 Coverity Scan pointed out that lseek can return -1 2018-04-28 17:16:54 +00:00
tg 09c8df8058 fix allexport for arrays; add testcase that also catches exporting arrays 2018-04-28 07:07:39 +00:00
tg 1c24f0dbc7 contrary to what I said in revision 1.453 we evidently d̲o̲ export arrays…
(XXX there’s a comment in var.c:typeset() still to the contrary, with assumptions…)
2018-04-28 07:03:17 +00:00
tg e42dc7afcb move subsection on tty below job control one, pull all stuff into it 2018-04-27 17:20:39 +00:00
tg 7a794d4dee document some more on how the terminal state is affected
From: G.raud Meyer <graud@gmx.com> (mostly)
2018-04-27 17:10:39 +00:00
tg 8d2c435f0f only ever make it possible to enter edit.c if tty_hasstate 2018-04-27 16:59:50 +00:00
tg 6818f7a136 minor spelling in comment 2018-04-27 16:54:45 +00:00
tg d10c196cf1 improve exporting documentation:
• reference “shellshock” of GNU bash for exporting functions
• mention we don’t export arrays (just their "0" members) as
  ksh93 and GNU bash don’t do it either, the latter documen‐
  ting it even
2018-04-16 00:32:35 +00:00
tg 99f6aae983 move text on ${array} => ${array[0]} implicitly, it is more global 2018-04-16 00:22:28 +00:00
tg 0096aeeed4 quote empty strings for re-entry into shell
From: Martijn Dekker <martijn@inlv.org>
2018-03-17 22:46:09 +00:00
tg 4abbaa0400 make ${foo#'bar'} in here document behave like ksh93
reported by Martijn Dekker <martijn@inlv.org>
2018-03-09 01:29:11 +00:00
tg 4df1d3abe0 Macintosh-specific updates from gecko2@
also, their sysctl(8) sucks:
13:31⎜«gecko» naja, sysctl bricht die ausgabe bei nicht vorhandenen parametern ab
13:32⎜«gecko» der listet aktuell nur bis hw.memsize auf
2018-01-25 12:33:54 +00:00
tg 1474437b57 bump; add testcase provided by @mvdan on github 2018-01-14 01:47:36 +00:00
tg 5c920fe4db clean up 2018-01-14 01:44:02 +00:00
tg cc59adb1f5 write ord’ed into c 2018-01-14 01:29:47 +00:00
tg f7b0277504 shf_getc{,har} need to return properly casted 2018-01-14 01:28:16 +00:00
tg 7977acbc72 this callback also needs to cast cleanly 2018-01-14 01:26:49 +00:00
tg 141dfaf819 move the cast earlier; the callback also needs it 2018-01-14 01:25:28 +00:00
tg d7b77a76df I think I’m onto something here… getsc_{uu,bn} never return -1 AFAICT 2018-01-14 00:57:55 +00:00
tg 7716e825ab I think the ord thing was a red herring 2018-01-14 00:51:35 +00:00
tg 9691e330b9 after literally HOURS of debugging, I got a working-ish expression… 2018-01-14 00:47:11 +00:00
tg 609f5c2256 plug the first couple of ctype bugs 2018-01-14 00:22:30 +00:00
tg 9e4868fb06 oops, casting negative char to size_t is… not nice 2018-01-14 00:09:34 +00:00
tg c763e7b0e9 revert the CORD debugging aid
(introduced so that ORD could eval its args twice in !DEBUG)
2018-01-14 00:03:05 +00:00
tg 6e486d1163 DOSPATH fix 2018-01-13 23:58:32 +00:00
tg dde8500a24 some ord() debugging; CORD for case, ORD evaluates twice, for debugging 2018-01-13 23:55:15 +00:00
tg a0b1179db3 warn when entering POSuX noncompliance 2018-01-13 21:45:07 +00:00
tg aa530d4343 implement early (mediæval) locale tracking, as a compile-time option,
for SuSE; slightly inspired by the original patch submitted by
From: Dr. Werner Fink <werner@suse.de>
2018-01-13 21:38:10 +00:00
tg 9f3c0efefc small cleanup for systems without core dumps, such as Jehanne 2018-01-05 20:08:34 +00:00
tg 82265de5d7 merge Jehanne cleanup patch
From: Giacomo Tesio <giacomo@tesio.it>
2018-01-05 20:05:26 +00:00
tg 3d522cfa27 turns out that Plan 9 does *not* have symlink(7)s
cf. https://github.com/brho/plan9/blob/master/sys/src/ape/lib/ap/plan9/dirtostat.c
despite https://github.com/brho/plan9/blob/master/sys/include/ape/sys/stat.h

see http://static.usenix.org/events/usenix2000/general/full_papers/pikelex/pikelex.pdf though…
2017-12-22 18:36:21 +00:00
tg 942035921c Pass arguments via a resonse file if executing a child fails
Command line length limit of OS/2 is 32KiB. If the total length of
all arguments is larger than this limit, it's needed to use a
response file.

Previously, the total length calculation was simply to add length of
all arguments. However, this result was not match with real length of
arguments, which are passed to child processes with OS/2 APIs.

Because conversion methods of arguments from libc to OS/2 APIs are
different depending on libc.

For example, kLIBC inserts its signature to an argument list. In
addition, it passes arguments with a leading space like:

    arg0
     kLIBC signature
     arg1
     arg2
     ...

Whereas, EMX just distinguishes arg0 and others like:

    arg0
    arg1 arg2 arg3 ...

After all, simple sum of a length of arguments are not correct.

The better way is to try to execute a child process, and to retry with
a response file if it fails due to arguments-too-long.

This has been found while doing 'bootstrap', especially 'autoreconf'
in coreutils git repo. It stops with:

    autom4te: /usr/local/bin/m4: Invalid argument

From: KO Myung-Hun <komh@chollian.net>
2017-12-22 16:41:42 +00:00
tg d93bd77f28 Set stdin to text mode before executing child processes
Normal OS/2 programs expect that standard IOs, especially stdin,
are opened in text mode at the startup. By the way, on OS/2 kLIBC
child processes inherit a translation mode of a parent process.
As a result, if stdin is set to binary mode in a parent process,
stdin of child processes is opened in binary mode as well at the
startup. In this case, some programs such as sed suffer from CR.

This is the regression fix of commit 20dbf6.

From: KO Myung-Hun <komh@chollian.net>
2017-12-22 16:37:14 +00:00
tg 0faaab7bbc add patch for the Jehanne operating system, from Shamar on IRC 2017-12-22 16:30:00 +00:00
tg a685208b7f increase some sleep and time limits, reported by Dr. Werner Fink
from OpenSuSE: their qemu-based powerpc systems have timing issues
2017-12-15 13:35:34 +00:00
tg 11953c9605 fix typo in comment 2017-11-20 02:32:32 +00:00
tg 8fe6311a01 refresh with up-to-date eawparse
thankfully, this is now all in glibc master, too
(thanks Mike FABIAN)
2017-11-18 12:01:53 +00:00
tg 0e478dceae tentatively fix Debian #878947 by putting an end to (some) nesting
‣ also makes the error message nicer:
tg@blau:/usr/obj/bin/mksh $ mksh -n -c '${0$(($(o[))&$(($(p[))&)'
internal error: can't allocate 8388628 data bytes
tg@blau:/usr/obj/bin/mksh $ mksh -n -c '${0$(($(o[))&$(($(p[))&)^J'
mksh: no closing quote
1|tg@blau:/usr/obj/bin/mksh $ ./mksh -n -c '${0$(($(o[))&$(($(p[))&)'
./mksh: syntax error: unmatched '('
1|tg@blau:/usr/obj/bin/mksh $ ./mksh -n -c '${0$(($(o[))&$(($(p[))&)^J'
./mksh: syntax error: unmatched '('

‣ alternative fix would be to keep the block and do…
-					} else {
+					} else if (source->type != SEOF) {
… but that would keep “no closing quote” for the case with newline,
and since this seems to not break… nuking unused code is always good ☻
2017-10-17 23:45:19 +00:00
tg c94bfd71e8 apply another quickfix by komh
really, getdrvwd should be passed an Xstring (probably with Xinit0 in
the callers), especially as one caller already didn’t update ldestlen
properly… (but not tonight as I’ve really got no head for that left)
2017-10-15 20:21:51 +00:00
tg cfa08b1c3f move getdrvwd() declaration out of OS/2-specific part:
each MKSH_DOSPATH port is required to define it (and, later, others)
2017-10-14 21:09:48 +00:00
tg d76a7e5813 add MKSH_ENVDIR code for Jehanne (OS by Shamar (giacomotesio) from IRC):
instead of parsing extern char **environ; read it from a filesystem
(typical for Plan 9, though this one is __jehanne__ per ifdef)

tested on MirBSD and found to be working
2017-10-14 21:05:22 +00:00
tg 63cf261f11 fix “cd e:foo” on DOSPATH systems (I think) 2017-10-14 20:11:30 +00:00
tg 5468d726b3 move slashifying of PATH, TMPDIR and two OS/2-specific variables from
OS/2-specific to common DOSPATH-specific code (ifdef for the latter two)

also gets us rid of the use of getenv
2017-10-13 23:34:49 +00:00
tg 524e63b4a1 fix a longstanding double substitution 2017-10-13 23:02:11 +00:00