and have it return an API-correct const char *
• enhance and stylify comments
• a little KNF and simplifications
• #ifdef DEBUG: replace strchr and strstr with ucstrchr and ucstrstr
that take and return a non-const char *, and fix the violations
• new cstrchr, cstrstr (take and give const char *)
• new vstrchr, vstrstr (take const or not, give boolean value)
• new afreechk(x) = afreechv(x,x) = if (x1) afree(x2, ATEMP)
• new ksh_isdash(str) = (str != NULL) && !strcmp(str, "-")
• replace the only use of strrchr with inlined code to shrink
• minor man page fixes
• Minix 3 signames are autogenerated with gcc
• rename strlfun.c to strlcpy.c since we don't do strlcat(3) anyway,
only strlcpy(3), and shorten it
• dot.mkshrc: move MKSH=… down to the export line
to not disturb the PS1 visual impression ☺
• dot.mkshrc: Lstripcom(): optimise
• bump version
¹) side effect from creating API-correct cstrchr, cstrstr, etc.
uses goto so it must be better ☻
tested on mirbsd-current via both Makefile and Build.sh
actually within a (the emacs) editing mode does not work at
all, whether forced or not, only if we leave the editing mode
(at end of input); probably due to it saving stuff from e.g.
x_cols into xx_cols, etc.
-> remove SIGWINCH handling(!)
-> TIOCGWINSZ is now executed at end of every input line
-> use 'ESC #' if you direly need to change line size
only if we got a SIGWINCH -> interactive use speed-up on the
slower boxen (slowness courtesy of otto@obsd)
* ^L (redraw line) now (always) checks window size; use this
instead if required while editing the prompt; changes to the
variables will still be propagated after the line is entered
"set +o emacs-usemeta" and "set -o vi-show8" which are always on now,
since we have proper internationalisation (i.e. utf-8) support, and
assume the user either has a 'C' locale and can't enter 8-bit chars,
his terminal is 8bit-transparent, or he has a 'UTF-8' locale.
twkm (from #ksh on freenode), that $RANDOM is always an unsigned
15-bit decimal integer.
(RANDOM << 15 | RANDOM) thusly yields 30 bit, which is still more
than 36^5, so we can use it on the baselife CD to speed things up
cought by crib in IRC, thanks
(our textproc/groff port is unaffected since it uses the MirOS implementation,
a BSD derived one with fixes, by default instead but can reproduce the defect
with -mgdoc instead of -mdoc as parametre)
* a mksh -> an mksh
While here:
* fix list of shells that don't match . and .. with .* (pdksh went
missing in transit)
* Try to make fit on 39 pages by shortening a few
lines of redundant commentary about non-mksh books
* AT&T -> .At
* integrate compat.h, version.h into sh.h (dependency trick didn't work anyway)
* mention #ksh in mksh(1) since the founder (twkm) said it's on topic too
(don't remove mention of #mksh despite it's usually empty because of control)
not to stuff, even if TIOCSTI is available
* it's transpose-chars not transpose
bug spotted by hondza who wondered that on ^T the line repeats itself forever
to keys with a trailing tilde (after prefix + control char); the
function is then invoked after prefices, control char and one more
character X are entered; if X is not a tilde, it is ungetc(3)d
* mksh.1: rework prompt ($PS1) section, simplify example,
point to packaged dot.mkshrc example
* mksh.1: fix description of 'redraw' regarding redrawal
of prompts longer than one screen line
* all: bump version/date
(yeah, that's what you get from developing with a
16-bit MS-DOS(R) executable of your favourite text editor)
* lex.c, mksh.1: do not print the delimiting character for
not-to-be-counted character sequences (i.e. ANSI escapes)
in prompts any more, mostly because ASCII 01h is printable
on both Interix and Cygwin and I'm lazy
(this also fixes prompt width counting if a printable character
such as 'x' is used as delimiting character)
* lex.c: through printing the prompt character by character,
also print the delimited sequences if skipping, fixes some
prompt redrawal not honouring colours stuff while not totally
redrawing the entire prompt
* add another ksh book, referenced from amazon
* fix reference mdoc code
* add page count for the books
* fix old 10-digit ISBNs
* add new 13-digit ISBNs
* add myself as current maintainer/developer
* add miros-discuss eMail address for bug reports
* note that no book documents mksh