tg
1cc8f76f07
fix order of bounds checks; inspired by NetBSD#50747
2016-04-14 11:51:26 +00:00
KO Myung-Hun
68f6e899ef
Merge tag 'mksh-R52c'
2016-03-05 14:59:34 +09:00
tg
cb0604767f
address latest Debian gcc-snapshot’s warnings (some actual bugs!)
2016-03-04 14:26:16 +00:00
KO Myung-Hun
36ea6b5f88
Merge remote-tracking branch 'mksh/master'
2016-01-24 16:43:45 +09:00
tg
188691d285
save 200 bytes off .text by revisiting string pooling
...
also, forgotten version bump
2016-01-21 18:24:45 +00:00
KO Myung-Hun
780f220e23
Merge remote-tracking branch 'mksh/master'
...
Conflicts:
check.t
exec.c
sh.h
2015-10-11 19:42:38 +09:00
tg
3fc8b5eb94
partial oksh sync, up to commit 80be547da108d5c241ae068290ca3e331446aa41?
2015-10-09 16:11:19 +00:00
KO Myung-Hun
bd9de444e3
Merge remote-tracking branch 'mksh/master'
2015-09-12 12:50:57 +09:00
tg
4adcfe8b58
oksh sync, simplify *all* if(x)free(x); constructs, simplify x_push() and sync boilerplate while here
2015-09-05 19:19:12 +00:00
KO Myung-Hun
4c61aeebe5
Use upstream style macro/function names
...
modified: edit.c
modified: eval.c
modified: exec.c
modified: main.c
modified: misc.c
modified: sh.h
2015-07-21 16:30:47 +09:00
KO Myung-Hun
2c5474b326
edit: 0xE0 prefix is not needed any more
...
Upstream supports PC extension scancodes starting with 0x00.
modified: edit.c
2015-07-21 16:30:47 +09:00
KO Myung-Hun
834349f3be
Merge remote-tracking branch 'mksh/master'
...
Conflicts:
Build.sh
check.pl
check.t
edit.c
emacsfn.h
exec.c
funcs.c
main.c
misc.c
sh.h
var.c
2015-07-21 16:30:46 +09:00
tg
ba8a6e9461
merge OS/2 style PATH (absolute with drive letters, ‘;’ as separator)
...
From: KO Myung-Hun <komh@chollian.net>
2015-07-10 19:36:38 +00:00
tg
0fd9337123
implement support for PC scancodes à la CHR$(0)+CHR$(&h48)
...
superseding an mksh-os2 patch which confirmed this is needed
Reference: my copy of the Schneider EURO PC manual 50032 for
Microsoft® GW-BASIC
2015-07-10 18:41:07 +00:00
tg
5613d6a04a
an edchar cannot conceivably be NUL, so set them to the default;
...
this is confirmed to help fix OS/2 and plugs an uninitialised read
on systems without werase
2015-07-10 17:31:09 +00:00
KO Myung-Hun
65d8ad9dae
Merge remote-tracking branch 'mksh/master'
2015-07-08 19:31:55 +09:00
KO Myung-Hun
edc36cce7f
edit: set edchars manually on OS/2
...
OS/2 kLIBC have termio.h and termios.h. But the real functions are
dummies.
Now Ctrl-C and Ctrl-D work well.
modified: edit.c
2015-07-07 08:28:55 +09:00
tg
e0196f47d5
implement completely new multiline code by delaying history store
...
this commit is valgrind-tested
2015-07-05 19:37:18 +00:00
KO Myung-Hun
0fbbbed49c
Support arrow keys on emacs/vi mode on OS/2
2015-06-03 13:00:49 +09:00
KO Myung-Hun
759b6ec59f
Consider OS/2-style path
...
OS/2 uses 'x:' as a drive prefix and '\' as a directory separator.
2015-06-03 13:00:43 +09:00
KO Myung-Hun
8f633da789
Path separator is ; on OS/2
2015-06-03 13:00:40 +09:00
tg
d3331c04d4
add binding for another well-known ANSI Del key
...
From: Ivan Delalande <colona@ycc.fr>
2015-05-03 11:28:53 +00:00
tg
609b311919
more low-hanging fruits for EBCDIC; notes:
...
• ord() new, From: Daniel Richard G. <skunk@iSKUNK.ORG>
‣ used in some places
• (c - '0') → ksh_numdig(c) # may take *x++ argument
• (c - 'A') → ksh_numuc(c) # may NOT take *x+= argument
‣ idem for ksh_numlc(c) and 'a'
‣ these need changing for EBCDIC
‣ add testsuite for this
• use macros more, they exist already often
• use digits_lc[foo] instead of ('0' + foo), especially for letters
• caught another ksh_eq case…
• also caught a maybe-UB overflow check, but we don’t have TIME_T_MAX ☹
2015-04-29 20:07:35 +00:00
tg
6b00977053
just another oksh rcsid-only sync (we bind to the Delete key since forever)
2015-04-11 22:09:49 +00:00
tg
532af35304
oksh rcsid sync; we have no set -o csh-history, and the manpage changes are just wrong, so, a nop
2015-03-14 05:17:17 +00:00
tg
61cea6b71b
another oksh rcsid-only sync
2015-02-16 15:10:15 +00:00
tg
643bbe7c60
no need for this explicit one, emacsfn.h already defines them
2014-11-25 22:38:53 +00:00
tg
2f52b993a1
• Build.sh: fix NSIG detection for gcc-snapshot
...
• all: bump version to R50-current; add more comments; whitespace
• all: remove all mkssert(); we’ll do full re-runs of scan-build and,
hopefully, Coverity Scan/Prevent
• check.t: fix a testcase (sed could exit false, but we don’t care)
• eval.c: fix tilde_ok data type (only unsigned may shl constantly)
• exec.c: fix shebang buf array accesses to always go via uint8_t *
2014-11-25 21:13:31 +00:00
tg
0d9b36daa3
prototype for a static function used before it’s defined
...
XXX add protos for all static functions (just: hard to find them)
2014-11-19 21:52:16 +00:00
tg
517bd63fe5
rename the “tilde” function; apparently, some system headers define it
2014-11-19 21:49:12 +00:00
tg
0432fc1a87
Get rid of left over NULL elements in x_ftab as NELEM() is used instead.
...
From Martin Natano. Also get rid of related checks.
2014-11-14 20:00:40 +00:00
tg
0eb5044ac6
fix rare infinite loop when invalid UTF-8 is in the edit buffer
...
From: Ivan “Colona” Delalande <colona@ycc.fr>
2014-07-13 11:34:29 +00:00
tg
89e774fd7e
• fix ${12345678901234567890} segfault (OOB access / integer overflow)
...
‣ not like oksh did, but using mksh’s built-in features
• handle suggested __pure additions
• revert cid 1004F7F096867C83CF0
‣ always use our wcwidth code
‣ only use our strlcpy code if none found
• fix a couple of gcc-snapshot and clang/scan-build warnings
• mksh R49~rc1
2014-01-05 21:57:29 +00:00
tg
2f7eec765d
merge oksh’s “ctype cleanups” commit
...
(not much of it applies since we don’t use the OS’ table-based lookup)
2014-01-05 19:11:46 +00:00
tg
c4c4fd7365
RCSID-only oksh sync (their whitespace changes don’t apply to us)
...
note that emacs.c partial peereboom rewrite is *not* merged, and kept that way
2013-11-30 17:33:51 +00:00
tg
7f16464902
slightly optimised and, more importantly, much more consistent (use only
...
one set of CTRL, UNCTRL, and new ISCTRL macros) C0 and DEL handling; the
optimisation only works for 7-bit ASCII, so those places 8-bit must pass
intact have an added check
also, while here, remove an editor oops (‘;’), oksh rcsid sync (they did
accept I was right wrt. set -e), int → bool, and code merge/cleanup
2013-09-24 20:19:45 +00:00
tg
5eb6995d75
Ypnose discovered a problem with multi-line prompts and SIGWINCH
...
related to caching some values (downside, pprompt gets back doprint option)
2013-08-16 10:59:03 +00:00
tg
bf94b7e2ec
fun: when writing this code I feared an off-by-one;
...
Steffen Daode Nurpmeso stumbled upon it and gave very detailed
instructions on how to reproduce it (thanks!); fix that
also only call x_bs0 if xcp < xep because *xep is undefined
2013-08-14 20:26:19 +00:00
tg
c10e5bd237
reduce amount of .bss memory needed; initialise via AEDIT at x_init
...
or even first run of x_vi
2013-08-10 13:44:33 +00:00
tg
247e20c524
• Completely overhaul prompt length calculation and
...
prompt display routines; make Emacs and Vi share
code, permitting reducing of duplication and code
removal as well as more consistent behaviour; put
some common code into shared helper functions, too
• New x_adjust() logic (Emacs mode): when determining
what portion of a line to render use a much more
sophisticated algorithm and try to fill up ⅔ of the
total screen width (with line and prompt both) also
as wished from Steffen Daode Nurpmeso
2013-07-26 20:33:39 +00:00
tg
4e1196239a
RCSID sync with oksh (fixed by us 4 years ago already)
2013-06-03 22:27:42 +00:00
tg
f2906c79df
for Yofuh: implement Emacs mode PgUp as Vi insert mode CurUp
2013-05-02 15:33:30 +00:00
tg
2b06709bf3
improve DEBUG_LEAKS handling and fix freeing some locs
2013-02-10 19:05:37 +00:00
tg
59009ac78f
call it DEBUG_LEAKS so Android can always enable it
2013-02-10 17:41:06 +00:00
tg
63b6d920a8
actually, only needed #ifdef DEBUG
2013-02-10 17:39:38 +00:00
tg
cb93db360d
call afreeall(AEDIT) upon close; related to LP#1106116
2013-02-10 17:38:15 +00:00
tg
1da94d6159
pure RCSID sync with oksh, who also added a tabcompletion fix now, with
...
less code, but, even according to their own comments, not as good as ours
2013-02-10 17:18:49 +00:00
tg
b2396677e7
harmonise sys_{sig,err}list ⓐ checks, ⓑ uses, ⓒ _decl values when not needed, ⓓ prototypes; ⓔ “const” is a keyword and thus space-separated from the preceding ‘*’ pointer indicator
2012-12-28 02:28:39 +00:00
tg
0780070d24
add a few assertions for LLVM+Clang 3.2 scan-build; no !DEBUG changes
2012-12-08 18:30:31 +00:00
tg
cf807eb83a
Add assertions and shuffle code around for LLVM+Clang scan-build.
2012-12-04 01:18:34 +00:00