Commit Graph

2015 Commits

Author SHA1 Message Date
tg
3b87d173d4 • finally, the code and manual page text to deprecate, and code to not
handle any more, octal 010 style constants, as promised
• overhaul the manpage re. arithmetic expressions, make the guarantees
  mksh code has explicitly, precisely, clear
• to reduce burden of the compiler, getint() now operates on mksh_uari_t
  internally; it already applied the sign after operation, anyway (C99
  guarantees wraparound on unsigned types, but for signed types we need
  specific compiler support; apparently, this comes from hardware limits)
• use const and shuffle order of locals around while here
2011-12-10 13:34:19 +00:00
tg
f8098a7f48 actually catch out of [1;36] bounds integer bases 2011-12-09 20:40:26 +00:00
tg
f42044258f BUGFIX: make typeset -n flag more robust (catch ALL exits) 2011-12-09 20:40:14 +00:00
tg
15cfc6c88d add tests for
• integer base flat (10, 010, 0x10)
  ‣ posix, right variants (heh, just like timezones)
  ⇒ both enabled, which means one test always fails right now,
    until the code changes are in…
  ☹ mksh R21 and up, AT&T ksh93, posh, GNU bash, busybox sh, dash
    all use the posux variant
  ☺ mksh R20b and below, pdksh, zsh, python, perl, php all do it right
  ‣ posix is stupid to use C (strongly typed, compiled) semantics
    for an untyped _scripting_ language
• integer bases 1 (mksh specific), 2 to 36, and that 37 errors out
  ‣ both directions
• integer arithmetic, signed and unsigned, wraparound and value span
2011-12-09 20:40:02 +00:00
tg
a0dd6b5366 disable deprecated code on MirBSD-current mksh-current (note: next to deprecate is support for parsing $((010)) as octal, which is agreed gecko2@ tonight at the Jugo already) 2011-12-08 22:19:16 +00:00
tg
63b9d60b31 MKSH_DISABLE_DEPRECATED needs testsuite handling 2011-12-08 22:19:04 +00:00
tg
9b04bd65b7 rework Perl interpreter finding logic; *buntu/dietlibc-arm{el,hf} are broken 2011-12-08 22:16:42 +00:00
tg
44d072a879 beautify a Vi function (no code change), from tech@ discussion 2011-12-04 23:22:59 +00:00
tg
6e010a59fb MFC recent changes to R40-stable, validate it, fix a pedantic warning 2011-12-04 19:59:33 +00:00
tg
b12d31ccca improve installation instructions 2011-12-04 19:38:36 +00:00
tg
3522dd1263 add note that mksh's global is not php/python's 2011-12-03 00:09:15 +00:00
tg
24fbbdf31c -Wpointer-sign 2011-12-03 00:03:25 +00:00
tg
da83890648 move compile-time assertions out of misc.c(#ifdef DEBUG) into Build.sh 2011-12-03 00:01:28 +00:00
tg
73688b3b3c oh well, shove it; inline some things, the most legible ones
mostly for benefit of not-the-latest-llvm-or-gcc compilers
2011-12-02 23:05:18 +00:00
tg
1ac636670f • improve comments
• do shave off 20 bytes from c_test() and get rid of the ugly stack
  variable and double “using” despite not parsing
2011-12-02 22:55:49 +00:00
tg
2fb9df56e4 rewrite funcs.c:c_test(), i.e. test(1) and [(1), to follow POSIX and XSI
in the cases where they are defined unambiguously; bug reported by
Jilles Tjoelker in <20111129232526.GC14357@stack.nl> due to a report
by Stefano Lattarini on bug-autoconf

in the ambiguous case, I stick to traditional pdksh behaviour, which means
	test ! a = b	vs.	test a = b
and
	test ! a -o b	vs.	test a -o b
behave different from each other (in the second case, the NOT operator
binds strong; POSIX demands a reduction to 3 arguments and negating
that result in the first case), so we're at two known not-ok in the
FreeBSD® testsuite. (81 and 82 in regress.sh,v 1.3)
2011-11-30 21:34:15 +00:00
tg
44a27fa8e0 update and reformat some comments in the history code 2011-11-26 18:19:00 +00:00
tg
b3f4c69f05 #ifdef MKSH_DISABLE_DEPRECATED do not compile in features scheduled for removal 2011-11-26 17:56:30 +00:00
tg
0695039dc0 fix stateptr-underflow; really do call fastbox regression checks; bump vsn 2011-11-26 00:45:21 +00:00
tg
12608d7933 fix function-local arrays 2011-11-26 00:45:03 +00:00
tg
0d2244da81 use += and do some more mitigation of the alloc problem first 2011-11-25 23:58:04 +00:00
tg
5c1108c5fa actually… the error paths didn’t se-unset noglob! after looking at the
code, until further proof I believe noglob is not even needed ⇒ drop it
2011-11-25 23:54:06 +00:00
tg
5ac24244fd == inside [[ is not nice, and parsing $(set +o) isn’t either,
since we don’t just have [[ -o ]] now, but can use standard $- here
2011-11-25 23:43:59 +00:00
tg
63878e8aef another couple of verbose checks; the *-global are mksh specific but work;
mksh currently fails arrassign-fnc-local (never worked either)
2011-11-25 23:33:42 +00:00
tg
2ff9255f39 add a -f option to test.sh that runs tests of class fastbox
plus a test in that category for a bug spotted during development of
https://evolvis.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=shellsnippets/shellsnippets.git;a=blob;f=mksh/sysadmin/getjpics.cgi;h=d74018cbc1ae4e88408267ecc73a6df19aa4c99a;hb=HEAD
2011-11-25 23:29:31 +00:00
tg
dd014625e1 Fix regression introduced by mixing the recursive parser and support
for ;| and ;& in TCASE: ;;-less last casepart produced ";\0" in the
SREREAD string which obviously cased reparsing to fail

test from http://www.in-ulm.de/~mascheck/various/cmd-subst/
2011-11-22 18:01:41 +00:00
tg
d7079f3f0e bump 2011-11-19 21:22:02 +00:00
tg
709524edd1 add explicit casts to uid_t and gid_t of the struct stat slots, for some
architectures on Linux have a truly horrible struct stat definition, as
seen in dietlibc’s source code
https://buildd.debian.org/status/fetch.php?pkg=mksh&arch=mipsel&ver=40.2-4&stamp=1321054539
2011-11-19 17:42:24 +00:00
tg
0220aeeb61 disable cd-pe test on Hurd, it also wrecks havoc with check.pl
https://buildd.debian.org/status/fetch.php?pkg=mksh&arch=hurd-i386&ver=40.2-4&stamp=1321059202
2011-11-19 17:25:55 +00:00
tg
e20b1295b7 promote x=(a b); x+=(c) to standard mksh functionality at cost of 932 MKSH_SMALL .text bytes on MirBSD/i386 2011-11-11 22:14:19 +00:00
tg
7e719a4cc1 deprecate the UGLY input line beginning with ! hack 2011-11-11 22:14:02 +00:00
tg
cf4e967a5e fix: "foo" in nroff is quoted, \&"foo" contains literal gänsebeinchen 2011-11-11 22:10:52 +00:00
tg
90afc54ee8 • select(0, …) misbehaves on Interix (by Markus Duft <mduft@gentoo.org>)
• select(n, NULL, NULL, NULL, …) behaves the same (by Bruno Haible)
2011-11-09 22:17:26 +00:00
tg
f048ac2f58 disable another symlink-using test on MSYS 2011-11-08 23:10:58 +00:00
tg
c620f865c1 cid 1004E0F5C27271F5B00 broke integer-base handling of built-in parameters
mksh -c 'echo a=$RANDOM; RANDOM=0x12; echo b=$RANDOM' # behaviour changed
2011-11-08 22:07:15 +00:00
tg
f92108dccc make MSYS match Cygwin more closely; ignore its broken <stdint.h> 2011-11-05 23:39:02 +00:00
tg
92b60a9a5e forgotten in cid 1004EA5BF612F516747 to take '\n' presence as $'…' quoting reason 2011-10-26 20:46:16 +00:00
tg
fed31331f4 rename more identifiers with trailing underscores 2011-10-25 22:36:39 +00:00
tg
cd7dab250b also Xcheck_grow_ may not end with an underscore 2011-10-25 22:25:07 +00:00
tg
5893a36bad document “export -” accident found by Snader_LB 2011-10-24 19:41:13 +00:00
tg
3b9ec6c3c4 also emit newline as backslash-n to align with GNU bash (and to keep everything on one line) 2011-10-24 19:40:58 +00:00
tg
5416abb2d0 when printing for-reentry parameter values, use dgk’s $'…' for non-ASCII characters 2011-10-24 19:40:46 +00:00
tg
de75cbdb33 fix spello in comment, by <Snader_LB:#!/bin/mksh> 2011-10-16 00:18:56 +00:00
tg
904dc3dae4 oh lookie, oksh fixed something we did in 2007… ⇒ pointless rcsid-in-comment sync 2011-10-11 19:06:07 +00:00
tg
d6bf9c197b better handling of eval and CPPFLAGS in build system 2011-10-07 19:51:44 +00:00
tg
9eaf6a8e12 remaining sync with oksh (pointless rcsid, no code diff) 2011-10-07 19:51:29 +00:00
tg
c2f994f6f1 unbreak test-build with printf 2011-10-07 19:51:17 +00:00
tg
23afb6dbb8 merge “upper bound Emacs mode command repeat by input line length” from
oksh (slightly different implementation) and remark better plans (which
doesn’t mean bounding the repeat counter is bad, though…)
2011-10-07 19:45:08 +00:00
tg
84096a0a86 Message-ID: <CAOw7k5gBmt+WqzQxgK8xrjMvCh3iBHcQ7cU78cy1WbzRf8d_Hg@mail.gmail.com>
just to make sure, got a copyright licence for this
2011-09-13 18:46:46 +00:00
tg
9782f6b4d1 • access(2) is broken in at least kFreeBSD 9.0 as “modern” OS, so bring
back the wrapper code as well as refactor most other code calling it
• apparently, names can’t end in ‘_’ or contain ‘__’ anywhere…
2011-09-07 15:24:22 +00:00