tg
d10dd31b9a
correct a few protos and comments
...
saves 4 .text bytes and my nerves
2006-11-10 03:45:57 +00:00
tg
f8e7fdbb71
use qsort(3) instead of rolling our own
...
saves 284 in .text, no added import since we already use qsort(3) once
2006-11-10 03:23:50 +00:00
tg
f103c6b2a0
use errorf not bi_errorf if we want to abort
...
saves 16 .text ;)
2006-11-10 02:10:45 +00:00
tg
658dc2b407
rewrite getn() which is some kind of atoi with return code
...
costs 1 .text, saves 4 .data, 1 libc import
2006-11-10 02:05:06 +00:00
tg
242d2c086d
overhaul parse_args - don't use strlcpy and strlen when overkill
...
also fixes off-by-one
saves 48 .text
2006-11-10 01:52:23 +00:00
tg
c60dbdc6cb
* change EXECSHELL to /bin/sh (we can override it via environment anyway,
...
and this is a sensible choice instead of ourselves)
* move this stuff from sh.h into exec.c where it belongs
* simplify set -o stuff
saves 8 bytes
2006-11-10 01:44:40 +00:00
tg
cd9202835c
cosmetics
2006-11-10 01:25:22 +00:00
tg
f1e29cb1a1
use NELEM
2006-11-10 01:24:38 +00:00
tg
ebf58f6b42
if !MKSH_SMALL, str_save() can be a macro
2006-11-10 01:19:17 +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
c2aec39358
save 176 text (92 text 32 bss relative to before last commit)
...
by making correct use of shf_* functions
2006-11-10 00:09:27 +00:00
tg
320f503391
get rid of ulton() - a joke
...
saves 32 bss, but adds 84 text oO
2006-11-09 23:55:52 +00:00
tg
88bf6422d9
shrink chtypes array down to 8 bit
...
saves 72 text and a lot bss
2006-11-09 23:39:16 +00:00
tg
6334091d86
omit usage msg if small
2006-11-09 23:19:52 +00:00
tg
625928f9f1
make autoconf checks more verbose as well
2006-11-09 23:09:05 +00:00
tg
e49b50f8f1
check for a few more things
2006-11-09 23:04:34 +00:00
tg
7148a691e0
simplify
2006-11-09 22:56:55 +00:00
tg
ee55f29a31
new function ac_testn() does the same as ac_test() but doesn't amend CPPFLAGS
2006-11-09 22:56:09 +00:00
tg
2bdcd71ef0
unbreak -d (was broken in R28)
2006-11-09 22:53:21 +00:00
tg
a48a880c00
ac_test for MKSH_SMALL presence in CPPFLAGS
...
if present, don't even look for setmode as it's only used by mknod builtin
2006-11-09 22:51:49 +00:00
tg
68caa9afdd
save 464 text with restructuring
2006-11-09 22:38:31 +00:00
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
fb9c6e30bb
fix another warning
...
now builds on MirOS, DragonFly, NetBSD, Debian stale (i386), Solaris 8,
Debian testing (s390x) - Solaris /bin/sh, bash, ksh93, mksh
2006-11-09 00:28:36 +00:00
tg
1ffa722d73
optic sugar
2006-11-09 00:13: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
9b0dbaddbf
oops, missed syntactic change
2006-11-09 00:08:25 +00:00
tg
1c7e58a9d9
use \u0060...\u0060 instead of $(...)
...
demanded by solaris /bin/sh
2006-11-09 00:06:33 +00:00
tg
84088b91d0
there is no compat.c any more
2006-11-09 00:03:37 +00:00
tg
dc9f457f24
don't use __predict_false() here either
2006-11-09 00:01:36 +00:00
tg
e97ddf1eef
some build issues
2006-11-09 00:01:04 +00:00
tg
d8de18df87
can use short form here
2006-11-08 23:50:47 +00:00
tg
1edc9c071a
fix description of setlocale stuff a little
2006-11-08 23:49:01 +00:00
tg
11fbdb4378
implement autoconf tests for langstuff; sync date
2006-11-08 23:45:47 +00:00
tg
d5c0de53e3
use shell macros instead of dupe code
2006-11-08 23:38:28 +00:00
tg
adbd7f4b74
fix native build
2006-11-08 23:24:49 +00:00
tg
0e0782c856
first attempts at more autoconf'isation
2006-11-08 23:23:41 +00:00
tg
3b29b8be87
sync
2006-11-08 23:02:30 +00:00
tg
ddeb1948b8
sync with lib/libc/string/strlfun.c
2006-11-08 22:54:55 +00:00
tg
d98866057c
* set -o utf8-hack implies set +o emacs-usemeta (the default)
...
* we're R29 (-beta)
2006-11-08 20:32:44 +00:00
tg
9e6936ac5c
irc is fun. I registered channel #!/bin/mksh in freenode.
2006-11-08 20:27:26 +00:00