autoscan for the correct ed(1) type

XXX amend check_categories with stuff like persist history, etc.
This commit is contained in:
tg 2007-01-18 01:10:55 +00:00
parent 70a7e1527b
commit 21bceac32e
2 changed files with 16 additions and 10 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $MirOS: src/bin/mksh/Build.sh,v 1.138 2007/01/18 00:16:26 tg Exp $
# $MirOS: src/bin/mksh/Build.sh,v 1.139 2007/01/18 01:10:55 tg Exp $
#-
# Env: CC, CFLAGS, CPP, CPPFLAGS, LDFLAGS, LIBS, NOWARN, NROFF, TARGET_OS
# CPPFLAGS recognised: MKSH_SMALL MKSH_NOPWNAM
@ -498,6 +498,13 @@ fi
#
$e ... done.
# Some operating systems have ancient versions of ed(1) writing
# the character count to standard output; cope for that
rm -f x
echo wq >x
ed x <x 2>/dev/null | grep 3 >/dev/null 2>&1 && \
check_categories=$check_categories,oldish-ed
rm -f x
if test 1 = $NEED_MKSH_SIGNAME; then
$e Generating list of signal names...

17
check.t
View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.84 2007/01/17 01:24:28 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.85 2007/01/18 01:10:55 tg Exp $
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
@ -1876,9 +1876,8 @@ name: history-ed-1-old
description:
Basic (ed) editing works (assumes you have generic ed editor
that prints no prompts). This is for oldish ed(1) which write
the character count to stdout. Found on MS Interix/SFU 3.5
and Mac OSX 10.4 "Tiger".
category: os:interix,os:darwin,os:freebsd
the character count to stdout.
category: oldish-ed
arguments: !-i!
env-setup: !ENV=./Env!HISTFILE=hist.file!
file-setup: file 644 "Env"
@ -1900,7 +1899,7 @@ expected-stderr-pattern:
name: history-ed-2-old
description:
Correct command is edited when number given
category: os:interix,os:darwin,os:freebsd
category: oldish-ed
arguments: !-i!
env-setup: !ENV=./Env!HISTFILE=hist.file!
file-setup: file 644 "Env"
@ -1931,7 +1930,7 @@ description:
in history.
(NOTE: adjusted for COMPLEX HISTORY compile time option)
(ksh88 fails 'cause it lists the fc command)
category: os:interix,os:darwin,os:freebsd
category: oldish-ed
arguments: !-i!
env-setup: !ENV=./Env!HISTFILE=hist.file!
file-setup: file 644 "Env"
@ -1963,7 +1962,7 @@ description:
Basic (ed) editing works (assumes you have generic ed editor
that prints no prompts). This is for newish ed(1) and stderr.
# we don't have persistent history on Solaris (no flock)
category: !os:solaris,!os:interix,!os:darwin,!os:freebsd
category: !os:solaris,!oldish-ed
arguments: !-i!
env-setup: !ENV=./Env!HISTFILE=hist.file!
file-setup: file 644 "Env"
@ -1983,7 +1982,7 @@ expected-stderr-pattern:
name: history-ed-2
description:
Correct command is edited when number given
category: !os:solaris,!os:interix,!os:darwin,!os:freebsd
category: !os:solaris,!oldish-ed
arguments: !-i!
env-setup: !ENV=./Env!HISTFILE=hist.file!
file-setup: file 644 "Env"
@ -2010,7 +2009,7 @@ name: history-ed-3
description:
Newly created multi line commands show up as single command
in history.
category: !os:solaris,!os:interix,!os:darwin,!os:freebsd
category: !os:solaris,!oldish-ed
arguments: !-i!
env-setup: !ENV=./Env!HISTFILE=hist.file!
file-setup: file 644 "Env"