Commit Graph

1506 Commits

Author SHA1 Message Date
tg b6ce748064 • remove “#if 0” and “#ifdef notdef” style old debugging code
• expose “#ifdef MKSH_MIDNIGHTBSD01ASH_COMPAT” just in case they decide to
  require it and show it in the ksh version automatically
• sync the use of non-ASCII characters over files (unification)
2009-05-16 18:40:09 +00:00
tg cde2f02986 apply most of OpenBSD’s
│ Fix usage string for mknod builtin.
but don’t do a binary change as it doesn’t actually change anything

XXX fix all these usages anyway
XXX cd: cd: /home/tg/... - No such file or directory
XXX /bin/mksh: mknod: usage: mknod [-m mode] name [b | c] major minor
XXX /bin/mksh: mknod: mknod: No such file or directory
XXX etc. – but find out what POSuX demands ☹
2009-05-16 17:33:10 +00:00
tg b145ca5c9f • sync distrib/special/mksh/Makefile with bin/mksh/Build.sh and
fix the regression test’s results while here, which have been
  broken since cid 10049D9BE5254CE65B8
• get rid of separate copyright file which was intended for De-
  bian; track down commits in all files of oksh-mirbsd and mksh
  to get correct copyright years per-file, as is BSD custom
2009-05-16 16:59:42 +00:00
tg 7641ea6d07 optimise the “regression test” ☺ 2009-05-16 16:03:41 +00:00
tg cc783807d3 this began as a one-word change to the spec (manpage): that
${foo:1:2} operates on characters ipv bytes – which means:
‣ set +U: octets
‣ set -U: MirOS OPTU-8 characters

for consistency I also adapted ${#stringname} to deliver the
length in characters ipv bytes; more may follow; for example
I’d like a way to expose the string width.

you can already get the MirOS OPTU-16 of a character in the
WTF-8 (「set -U」) mode with something like
│ typeset -Uui16 -Z7 x=1#${stringname:position:1}
which will correctly use the PUA EF80‥EFFF mapping for octets.

due to this being an incompatible change, bump to R38

also change the unicode-hexdump sample regression test and
add two news for ${x:1:2} and ${#x} checks in A/W mode ☺
2009-05-16 15:53:02 +00:00
tg 8a7223d4cd split utf_ptradjx into utf_ptradj function (to save space) and
self-assignment macro; remove some uses of the macro in favour
of foo += utf_ptradj(foo)
2009-05-16 15:09:07 +00:00
tg 36f737f5cb bind new search-history-{up,down} to ANSI PgUp and PgDn keys
“because we can”
2009-05-16 14:45:40 +00:00
tg e7c565b2aa document currently bound ANSI cursor keys (↑↓←→ Home End Del) 2009-05-16 14:44:37 +00:00
tg 1535151525 fix typo 2009-05-16 14:34:58 +00:00
tg 2ebd816d63 bind new search-history-{up,down} to ANSI PgUp and PgDn keys
“because we can”
2009-05-16 14:34:57 +00:00
tg 747cc12184 Add search-history-up and search-history-down keybindings (both unbound
by default) to the Emacs command line editing mode; patch originally by
James Butler <sweetnavelorange@gmail.com> but slightly modified

10x
2009-05-16 14:19:23 +00:00
tg eb3f3d584f move pdksh and contributor dedication into TFM, preparation for things
to come
2009-05-16 14:17:39 +00:00
tg 1e6f3605b5 sync rcsid with openbsd; we did it in misc.c,v 1.95 already
what they kludged in now
2009-04-22 16:46:11 +00:00
tg 4cd9361b1b amend regression tests with expected-fail COMSUB parse bug 2009-04-22 16:43:18 +00:00
tg 3765851432 address RedHat BZ#496791: fix currently not possible, because the code
which escapes $(…) content does not know if an imbedded ‘#’ is a comment
leader or something else like “16#foo”, “${#bla[*]}”, “${foo#bar}”, &c.
and the comment skip code does not know about nesting beforehand
⇒ document this problem in the place where it already documents that
  the current code does not properly handle nested $($(…)) expressions

patches welcome
2009-04-22 16:25:12 +00:00
tg b122cd2b74 since <libutil.h> needs <sys/types.h> e.g. on mnbsd, use it later too
when checking for revoke()
2009-04-10 16:09:53 +00:00
tg 31c96f9d9d make UTF related regression tests more clear 2009-04-08 18:00:53 +00:00
tg 7463e5daa7 fix an oversight 2009-04-07 21:23:28 +00:00
tg 94acf23391 tabs, bools 2009-04-07 19:51:47 +00:00
tg ecef21a50a switch mail address to .org domain 2009-04-07 19:46:55 +00:00
tg 8cc7fdb834 "evil" workaround to the alignment issues: embed an ALLOC_ITEM into
struct env (other structures defined have no "foreign type with pos-
sible alignment constraints" members) and take care of it while dea-
ling in a struct env instance
2009-04-07 19:43:28 +00:00
tg 48ee59ffd0 rename env variable to denv
I'm fgrep-w'ing for struct env right now
2009-04-07 19:27:49 +00:00
tg c841d1513d of *course* I had to introduce an inverse-logic error
d'oh. the XOR check's result needs to be reversed, as it tests for validity
2009-04-07 19:25:41 +00:00
tg a3cfe7d2cf this is no longer shared code 2009-04-07 19:15:48 +00:00
tg d2b5538f55 some int->bool, KNF, ... 2009-04-07 19:13:11 +00:00
tg 31d2796169 simplify
if ((flags & (1 | 2) == 0) || (flags & (1 | 2) == (1 | 2)))
to
	if (!(flags & 1) ^ !(flags & 2))
which works because ! returns 1 or 0, making the ^ an ^^, and
because XOR survives NOTting its arguments
2009-04-07 19:08:25 +00:00
tg edeb22fb96 tabs vs spaces 2009-04-07 19:06:44 +00:00
tg d43f4efe60 employ some "nice" constants and comment lalloc.c 2009-04-07 18:56:51 +00:00
tg 4de58fe6fa globalise SIZE_MAX definition 2009-04-07 18:46:07 +00:00
tg 18199e20fd pass LOCPATH environment variable too, might be needed on glibc systems 2009-04-07 18:45:19 +00:00
tg 9e83002841 try to do some optimum struct packing except for struct env
(pointers, longs, size_t first; time_t next; int etc. then enum, bool)
2009-04-07 18:41:37 +00:00
tg c7ccde864e apply workaround given to me in IRC yesternight, just define away the
const keyword to not trigger the famous ACK const bug (no chance it’ll
get fixed, not even in Minix 3’s ACK version)
2009-04-06 08:37:42 +00:00
tg e88736b5ef decouple conservative file descriptor use from MKSH_SMALL, with the
new MKSH_CONSERVATIVE_FDS præprocessor flag, because Minix 3, for
example, needs it (otherwise “mksh Build.sh” fails)
2009-04-06 08:33:37 +00:00
tg b6dcee70fd fix CPPFLAGS detection logic for MKSH_ASSUME_UTF8 2009-04-06 08:29:21 +00:00
tg 2d2b3f0b2d on Minix 3, <strings.h> needs <ansi.h> (via <sys/types.h>) 2009-04-06 08:24:57 +00:00
tg 5bfb6c97df remove extra parenthesēs; the error on WIFSIGNALED is still there:
unary - and & prios on Minix are correct, but gcc4 warns too much…
2009-04-05 13:37:37 +00:00
tg 7e7c648bd8 more extra parenthesēs (gcc4 strict warnings + broken system headers) 2009-04-05 13:07:11 +00:00
tg 5c76604402 replaced cannot sort 2009-04-05 13:07:06 +00:00
tg 3dc6b813fd • document new (clarified) macro behaviour – bugfix
• make bind ^X vs ^[[ section more clear
2009-04-05 12:45:25 +00:00
tg 43de9f8dff shorten 2009-04-05 12:42:34 +00:00
tg 398be9867a fix jobless mksh so much to make it work on Minix 3 2009-04-05 12:35:32 +00:00
tg 97c9d172d7 add comments, remove dead code 2009-04-05 12:35:21 +00:00
tg 5e4ffcbedd From: Alexander Hall <alexander@beard.se>
when following bind key macros, do not so recursively
2009-04-05 12:28:55 +00:00
tg 81b84b63b0 assume Plan 9 will also want a jobless mksh 2009-04-05 12:21:14 +00:00
tg efbdae7892 add (commented out) compatibility to MidnightBSD 0.1 /bin/sh – not
desired, because it defaces standards compliance

cf. https://www.mirbsd.org/permalinks/wlog-10_e20090329-tg-g10024.htm
2009-04-05 11:44:56 +00:00
tg e8fad467cf From: Alexander Hall <alexander <at> beard.se>
support multi-line bind macros (part 1 of 2 of entire diff)
2009-04-05 11:18:34 +00:00
tg 81c6c80fd6 persistent history needs munmap, not just mmap (Minix 3 lacks only the former, WTF?) 2009-04-03 10:56:32 +00:00
tg 9aec05ce6a fix compilation 2009-04-03 10:54:58 +00:00
tg e6a4798170 extra parens around WIFSIGNALLED seem necessary on some OSes (gcc 4.1) 2009-04-03 09:48:10 +00:00
tg 9aff4d78fe make {get,set}rlimit code depend on RLIM_INFINITY existence (PW32, Minix 3) 2009-04-03 09:45:23 +00:00