on the screen is not enough for two columns, just output the text line by
line, instead of trying to format it; gets rid of superfluous empty lines
if we did not even have space for one column on the screen (x_cols)
noticed by Gábor Gergely in irc, thanks!
compile all source files at once using -fwhole-program --combine,
similarily to how it used to be done in older mksh versions, except
that the flags are now hardcoded; tested with llvm-gcc4.2 from MirPorts
was hard to type and hard to fix, galloc is also hard to fix, and some
things I learned will probably improve things more but make me use the
original form as base (especially for space savings)
* let sizeofN die though, remove even more casts
* optimise, polish
* regen Makefiles
* sprinkle a few /* CONSTCOND */ while here
* syn.c: fix bashiop-4 regression test; failed due to me using a
simple string when a wdstring was expected, sorry; the new code
assumes file descriptors take up a maximum of two characters
encountered. However, when reading end of input, the source type is set
to SEOF while popping, whereas the recursion check code only checks for
an SALIAS type.
Fix: add a new SF_HASALIAS flag; change u.tblp from being valid if type
is SALIAS to being valid if SF_HASALIAS is set; set SF_HASALIAS for the
created SALIAS sources; set SF_HASALIAS and u.tblp when creating SALIAS
whose next is SEOF on the SEOF source as well.
Reported by Michael Hlavinka as Redhat Bug #474115
we still have issues:
(gdb) r
Starting program: /usr/obj/bin/mksh/mksh -c print\ \$KSH_VERSION
mksh in free(): error: modified (chunk-) pointer
Program received signal SIGABRT, Aborted.
example:
#define AALLOC_THREAD_ENTER(ap) @synchronized(aalloc_guard) {
#define AALLOC_THREAD_LEAVE(ap) }
notes:
• you must declare and define eventual guard objects yourself
• while there will not be any direct “return” calls inside the
locked area, AALLOC_ABORT and AALLOC_WARN may be called
• AALLOC_RANDOM does not need to be thread-safe, but malloc
and free should be; if “ap” is used for locking, all functions
called must be thread-safe though