tg
3c33cbcecc
don't compile mknod(1) builtin if MKSH_SMALL
...
saves 1037 text, 20 data (on i386)
2006-11-09 22:18:10 +00:00
tg
2345d8b72b
more getconf/confstr fixes
2006-11-09 22:11:08 +00:00
tg
d4ca2c9141
simplify getconf and confstr stuff
2006-11-09 22:08:08 +00:00
tg
bc215df211
make a few functions static that should be, and optimise a little
2006-11-09 21:20:49 +00:00
tg
c43e701025
optional (#ifdef MKSH_SMALL) saving of 364 more bytes of .text
...
intended e.g. for FreeWRT
2006-11-09 21:00:13 +00:00
tg
35776a9d4d
using a function instead of a macro saves 896 bytes of .text
2006-11-09 20:53:42 +00:00
tg
617950554f
missed these
2006-11-09 15:03:56 +00:00
tg
36ac8dc0f7
get rid of the need of strlcat() altogether (only one use was left)
2006-11-09 15:02:31 +00:00
tg
2b375abef1
fix SIGSEGV, we are passed NULL sometimes
2006-11-09 14:58:27 +00:00
tg
a1bfc17aa0
optimise and, ahem… plug…
2006-11-09 14:19:31 +00:00
tg
39057dd592
add the new function utf_ptradj() which does the same as utf_widthadj()
...
except it doesn't return a value and is much cheaper (no internal con-
version to UCS-2, just range checking on the multibytes)
2006-11-09 00:39:27 +00:00
tg
0307ecb492
* instead of including <sys/cdefs.h> (not in Solaris), we hope <sys/types.h>
...
includes it for us
* autoconf-test for <sys/param.h> (not in SUSv3) existence
2006-11-09 00:11:39 +00:00
tg
d8de18df87
can use short form here
2006-11-08 23:50:47 +00:00
tg
11fbdb4378
implement autoconf tests for langstuff; sync date
2006-11-08 23:45:47 +00:00
tg
0e0782c856
first attempts at more autoconf'isation
2006-11-08 23:23:41 +00:00
tg
5e2e209d51
make this R29(beta), mksh -U turn on (or setlocale), and document.
2006-11-05 17:01:47 +00:00
tg
a373d2e7ab
first part of utf-8 ability in mksh, already works pretty well
2006-11-05 15:31:37 +00:00
tg
1547b04e66
add new "set -o utf8-hack", currently no effect
...
set automatically on startup if we have locale functions (on MirOS)
2006-11-05 12:11:14 +00:00
tg
02c14f2a62
use the same idstring stuff everywhere, makes sense
2006-10-03 19:46:14 +00:00
tg
fe3ada7780
sync with src/sys/sys/cdefs.h,v 1.11
2006-09-30 02:23:22 +00:00
tg
7ae68e335c
* avoid unaligned memory access causing SIGBUS on IA-64 (Itanic)
...
(incidentally, the information xor'd now is more random)
only affects non-arc4random targets
* bump version
2006-09-30 02:13:21 +00:00
tg
851e2d1bdb
pasto: forgot these
2006-09-21 22:05:46 +00:00
tg
3dd0c521d0
use the easier __RCSID() etc. stuff from current <sys/cdefs.h>
2006-09-21 22:03:23 +00:00
tg
33ddf84c63
bump version
...
our regression tests:
Total failed: 1 (as expected)
Total passed: 213
the IFS testsuite:
# tests 6856 passed 5192 failed 1664
2006-08-28 01:40:54 +00:00
tg
695503952f
use an autoconf-like approach to check for arc4random(3)
...
after gecko2 told me his mac recently has it and I found
out that Interix has it in -lcrypt and soon -lmirmake (:
2006-08-26 20:30:27 +00:00
tg
456bd584a3
bump version (hey, after all, I fixed the persistent history*!)
...
and that after submitting it to the FSF/UNESCO directory...
*) regression test for that? how?
2006-08-24 20:35:40 +00:00
tg
4fac7ec24b
* remove redundancy
...
* 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)
2006-08-22 22:49:38 +00:00
tg
93ab969fdc
compat.h does have the status of a system header though...
2006-08-22 22:22:07 +00:00
tg
5b2be8517f
save more whitespace and make it compile again (oops)
2006-08-22 22:21:20 +00:00
tg
a87ff74cbd
* version.h doesn't need an RCS ID
...
* compat.h does, add it to misc.c, always include it, move if NEED_COMPAT
* major whitespace cleanup in sh.h
2006-08-22 22:16:04 +00:00
tg
11282be59d
compat.h has a section 'extra headers', move inttypes.h there
2006-08-16 00:00:24 +00:00
tg
98c4dc04a1
interix doesn't have <inttypes.h>, openbsd no <stdint.h>, the old chaos.
...
so add <inttypes.h> only for the one platform which needs it today, APE.
2006-08-15 23:54:09 +00:00
tg
1e313c282c
minor cleanups from the porting work
2006-08-15 23:43:30 +00:00
tg
1100be9300
re-implement "set -o posix" which doesn't do much ;)
...
but turns off 'braceexpand' when turned on as side effect,
just like oksh/pdksh.
document "set -o sh" too.
2006-08-09 20:44:16 +00:00
tg
790c312e9f
fix the prompt redrawal routines for multi-line prompts, prompts
...
with embedded newline (\n), and multi-line prompts with embedded
newlines. single-line prompts should be not affected; prompts with
embedded carriage return (\r) should be fixed by this as well.
also fix prompt_redraw comment (can't remove the variable though,
since it's required if the shell inserts a newline after the prompt
herself).
tested on cygwin and interix
2006-08-02 11:33:37 +00:00
tg
ce18e01f2c
move promptlen from edit.c into lex.c
2006-08-01 14:10:25 +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
711496f6fb
move version definition into extra file
2006-08-01 12:22:26 +00:00
tg
ab231f3595
new conditional: HAVE_ARC4RANDOM_PUSH
2006-06-21 19:35:38 +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
5726a50ab9
* shuffle around _*_SOURCE definitions (sh.h -> Build.sh), per OS
...
* Tonnerre Lombard reports that Solaris 10 needs _BSD_SOURCE
2006-03-19 18:06:32 +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
f38d8299f9
Change interpretation of '\"' in here documents with substitution
...
according to SUSv3 and other modern shells (POSIX allows both).
Idea for the patch (add another lex state) from OpenBSD, but the
implementation differs slightly (and is better in quality).
Also add two testcases (/bin/sh passes both, old mksh only one),
and document the change in the manual page. Sync RCS IDs with OBSD.
2005-11-22 18:36:20 +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
df22a0fb1b
Shuffle some stuff around to the compat functions and add glue
2005-10-25 19:46:11 +00:00
tg
2f9687c58a
follow OpenBSD and add mknod as mksh builtin (mknod <file> p acts as mkfifo)
...
but write a good chunk of that code myself (better structured, better error
handling, more gotos, less function calls, int -> bool)
passes all tests on mirbsd; this will become mksh R25 once tested on other
supported OSes
2005-10-21 12:41:56 +00:00
tg
7ee8296628
our test(1) promises we can do string1 < string2, and
...
our /bin/test uses mksh... so we pee (literally) on
POSIX and don't accept < and > only for [[ ... ]] operator
2005-10-08 19:31:00 +00:00
tg
0651ba008e
^V now is quote, not version, even in emacs mode. (From OpenBSD.)
...
Also, the "version" command got removed in its entirety.
Shaves off another global variable, even.
2005-08-02 12:35:27 +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