Commit Graph

32 Commits

Author SHA1 Message Date
tg ca2b1d88ca kill two others, saves 55t 8d 2i 2006-11-10 06:40:05 +00:00
tg 493ad928e3 if MKSH_SMALL, disable persistent history code as well (like on Solaris,
where it can't work anyway), and fix that code to shrink
saves 2071t 20d 5i
2006-11-10 05:23:14 +00:00
tg 208c45da25 more cleanup; incidentally, replacing libc function with syscall maybe speedup
9t 4d 1i
2006-11-10 04:22:13 +00:00
tg a1ff719ba4 thanks to the nice property of my reimplementation of getn to also
return a value in case of an error (0 or the partial result, which
is the full result in case of trailing junk even), using it to rid
atoi() is possible, saving 9t 4d 1i
2006-11-10 04:03:59 +00:00
tg ecc08e9681 use chown not fchown, and move the ownership check to earlier
saves 45 text, 4 data and security peoples' nerves
2006-11-10 03:50:05 +00:00
tg 273ca89019 * check.t: add new regression test "typeset-padding-1" according to TFM
* edit.c: remove debug stuff again; next time better use shl.c functions ;)
* sh.h: add format attributes to a few shf functions
* histrap.c, var.c: fix format string mistakes
* main.c, sh.h: error_prefix and warningf take bool not int
* misc.c: make chvt() stuff use shf_* functions
* misc.c: rewrite the TIOCSTTY stuff to be better integrated in mksh,
  since it originally was an external patch
* misc.c: chvt() no longer fails if e.g. chown fails due to e.g. R/O / fs
* var.c: fix typeset padding for right-justified zero-filled
2006-11-10 01:13:52 +00:00
tg a1bfc17aa0 optimise and, ahem… plug… 2006-11-09 14:19:31 +00:00
tg 38e8974e3e merge commitid 10044EDF66B48DEB72C from plan9 branch:
fix thinko / reverse logic error rendering persistent history unusable
2006-08-24 18:57:30 +00:00
tg 78cb0de69c shuffle code around for better structure 2006-08-15 23:56:32 +00:00
tg f34f24fefc be more semantical 2006-08-15 23:45:53 +00:00
tg 1e313c282c minor cleanups from the porting work 2006-08-15 23:43:30 +00:00
tg 3ddbd5e7fa optimise with a goto 2006-08-12 20:32:33 +00:00
tg cca3f93e59 a probably-Solaris-/bin/sh-workable improved algorithm 2006-08-12 19:51:09 +00:00
tg c504a42ac1 (partial) sync with openbsd (and fix after them),
gives us a better wrapping prompt and a manpage wording cleanup
2006-08-01 14:09:20 +00:00
tg 5e619e1ef3 style(9) 2006-08-01 13:43:28 +00:00
tg 65f0044ceb make it possible for the user to specify mksh_siglist and mksh_signame
in CPPFLAGS, thus overriding the system default
(think standard OS with different libc)
2006-08-01 13:19:42 +00:00
tg e65d9edc11 * use strsignal(3) not strerror(3), oops
* on GNU, that needs -D_GNU_SOURCE
* a little style(9) KNF while here
2006-08-01 12:57:07 +00:00
tg 7672b9b346 apply some fixes from OpenBSD and don't apply some others
but sync RCS IDs for easier future adaption:
* Simplify savefd() by removing the "noclose" flag and make noclose
  behavior the default. Almost all uses of savefd() are followed
  by an implicit or explicit close.
* fix typos
* might as well make ksh_getopt() match real getopt(), ie. get rid of that
  stupid EOF concept that was never true. adobriyan@gmail
* use SEEK_* for lseek()
* fix lint comments, no functional changes
* remove excessive optimization; from adobriyan@gmail
* only santa checks things twice; from adobriyan@gmail
* Interpret zero-filled numbers as decimal; PR 4213; from Alexey Dobriyan
2006-05-10 18:54:13 +00:00
tg 94ee3b388a sync with OpenBSD: remove unused code and vars; name clash with libc
compiles under MirBSD
2006-01-29 20:04:54 +00:00
tg 95cfad6339 * only have one $MirOS RCS ID per file to shrink source size
(this is an exception from normal use)
* bump to R26
2005-11-22 18:40:44 +00:00
tg 9b97d72d5e * move _all_ #include stuff into sh.h
* sort out #include stuff which isn't necessary on MirOS into compat.h
2005-10-25 19:53:29 +00:00
tg 1197e6fd1b say goodbye to creat().
From: Marc Espie <espie@cvs.openbsd.org>
2005-08-02 12:26:17 +00:00
tg ee7992988b * move <sys/param.h> include to sh.h
* fix compilation and invocation of test suite with whitespace in
  the pathnames for real, this time
* clean up (especially whitespace)
2005-07-07 23:27:52 +00:00
tg 37d4f1e874 first step for GNU/Cygwin support 2005-06-24 15:36:57 +00:00
tg 16fb264efc aaaand: Interix. 2005-05-23 16:23:19 +00:00
tg 3f570d7cc7 now passes on Solaris (-Wall -W -Wno-char-subscripts) too 2005-05-23 15:54:31 +00:00
tg 37d3bd813d no persistent history (flock missing), no arc4random, etc. for Solaris 2005-05-23 15:36:56 +00:00
tg ca0fb8f0da now passes on GNU/Linux with __CRAZY=1 -std=gnu99 (broken system headers ;) 2005-05-23 15:09:22 +00:00
tg 8266c126ac * add definition of __RCSID if not yet existant (GNU/Linux)
* add declarations of strlcpy and strlcat (for GNU/Linux, again)
* always include <sys/resource.h>
* some more compile / warning fixes
2005-05-23 14:19:14 +00:00
tg 13afe3c10c some spacing; move array into function 2005-05-23 12:06:39 +00:00
tg f158d4d0df support getting sys_siglist[], sys_signame[] and NSIG retrieval
for portable mksh on various operating systems
2005-05-23 12:01:09 +00:00
tg cd7b8bd79b Add mirbsdksh R21, which was developed in a temporary external CVS repo-
sitory whose ChangeLog follows. mksh R21 is licenced under the MirOS li-
cence, shown in "sh.h", and a two-clause UCB-style licence by Marc Espie
as shown in "alloc.c".

This executable is a fair bit smaller and shorter than our /bin/ksh that
it is designed to eventually replace (as /bin/sh hardlink), with the old
/bin/ksh to completely vanish. It is still in beta testing though, and I
don't think it will compile on other operating systems.

mksh R21 is a completely new port, bringing together the OpenBSD-current
/bin/ksh, the MirOS-current /bin/ksh and the older mksh R20 (which still
was portable, ocvs-based).
2005-05-23 03:06:10 +00:00