Commit Graph

2043 Commits

Author SHA1 Message Date
tg 34036ec32e MSYS implies -DMKSH_ASSUME_UTF8=0 and thus can skip the test that’d fail 2012-01-03 01:40:15 +00:00
tg e1fa966570 if tcfn=a.exe pass mksh.exe, not mksh, to check.pl
also spotted by RT
2012-01-03 01:30:16 +00:00
tg 8a8535b321 oeps… 2012-01-03 01:01:44 +00:00
tg 2578c66b61 move linkage check (which uses sh.h INCLUDES_ONLY) to when all of its
prerequisites are actually fulfilled, i.e. evrn further down than with
the last commit doing this, and move some prerequisites of stuff that
has wandered outside the !INCLUDES_ONLY block with the compile-time
assert changes to the outside, too

fixes FTBFS on MSYS which has neither <stdint.h> nor uint32_t
reported by RT
2012-01-03 00:58:09 +00:00
tg 7564594bb8 bunch of warning fixes 2011-12-31 02:54:15 +00:00
tg 7ec1ae3771 followup for cid 1004EE408E1382C1752 and 1004EE40DDD498FBB0D:
do a mirtoconf run-time check (ugh) to see whether the CPU designers
smoked/were brain-dead or if we don’t actually need the manual check
2011-12-31 02:04:18 +00:00
tg 25f413bf7d first part of LP: #909818; ${name@#} will later be changed to ${name@#expr} where expr is the IV ipv 0 (eval.c:377ff) 2011-12-31 01:07:19 +00:00
tg 18dc21bd85 clang3 says: Branch condition evaluates to a garbage value 2011-12-31 00:52:22 +00:00
tg c8ee91f02d LLVM+clang scan-build found a dead store and I found an unneeded assert 2011-12-31 00:47:46 +00:00
tg 5dbff1d56c clang doesn’t decide whether -version or --version is to be used, grml… 2011-12-31 00:31:25 +00:00
tg d5edc79f5a gc-sections found size optimisation chances 2011-12-31 00:27:27 +00:00
tg efaa268a88 plug the most atrocious offenders in the persistent history code
to address LP: #906914 (if your history file is corrupt or you
reach the end of HISTLINES, you’re still SOL)

quadruple the standard value for HISTSIZE to help users avoid it;
it’s much better to set it yourself if using persistent history
though; half it on MKSH_SMALL though which defaults to not use it
anyway

also fix handling of larger files a bit and limit the size until
which the files are considered (currently to 96 MiB) until such
time as mmap will no longer be employed to deal in them when the
offending code has been replaced by a rewrite…
2011-12-31 00:23:42 +00:00
tg da9ce25524 put a bit of type safety into the history code 2011-12-30 21:00:32 +00:00
tg 38dcf950c9 • release flock after the lseek
• -1 not 0 is the safe “none” value for fds
2011-12-30 20:35:29 +00:00
tg 31bf077591 don’t clobber the tree used for printing IOACTs in process_TIF (LP: #907224) 2011-12-29 23:36:25 +00:00
tg bb51eee63c when doing tab completion partial inserts in UTFMODE, honour multibyte character boundaries (LP: #909025) 2011-12-29 23:36:10 +00:00
tg 4af399bd8d give dumptree an dumpioact helper 2011-12-29 22:54:22 +00:00
tg dd8925a475 ensure aliases in COMSUB are not expanded twice
spotted by Jilles Tjoelker again, thanks
2011-12-29 22:03:15 +00:00
tg 68e8b5ab7c disable looking for C99 support flag in compilers (and GCC extensions)
laffer1 just pointed me to n1570 and I must say I am shocked but not surprised
2011-12-18 02:20:09 +00:00
tg 7b89945505 use sane spelling of read-only consistently 2011-12-16 20:03:28 +00:00
tg 0b3d21702a fix ifs.sh; anonymous submission (mkt?), 10x 2011-12-16 20:03:12 +00:00
tg 5070ea2387 skip R/O check in an unevaluated ternary part; 10x jilles 2011-12-16 20:03:02 +00:00
tg 4748739523 eek, mira, don’t leave debugging code lying around 2011-12-11 18:07:45 +00:00
tg 986d999e58 make ^O work like it did before we introduced x_modified(), that is,
editing the refetched input line doesn’t let it restart (but ^R does)
2011-12-11 18:01:03 +00:00
tg e18f4d114a actually, behave with silent wraparound; results validated by bc(1) 2011-12-11 01:56:43 +00:00
tg 971b153933 catch intmin/-1 instead of dumping core on SIGFPE; from Jilles Tjoelker 2011-12-11 01:35:10 +00:00
tg ee73f691f0 clearer messages 2011-12-10 14:16:09 +00:00
tg 44c408f9ac shuffle caddr_t to its only user, and use (void *) on Linux instead,
to appease Fefe’s dietlibc [-Wdeprecated-declarations]
2011-12-10 14:12:17 +00:00
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