summaryrefslogtreecommitdiff
path: root/shells/pdksh
diff options
context:
space:
mode:
authorhauke <hauke>2011-01-23 17:29:30 +0000
committerhauke <hauke>2011-01-23 17:29:30 +0000
commit0a3ed0f2348627f060244fa7c342597e8560d263 (patch)
tree40933d3467cedb790c0ec97215f0f9a5f53df9fb /shells/pdksh
parentc751bae91425b979a6238a8ecbd2ecaf0a63d681 (diff)
downloadpkgsrc-0a3ed0f2348627f060244fa7c342597e8560d263.tar.gz
Merge the following revisions from NetBSD src:
siglist.sh 1.9: Solaris 7 sort(1) issue with missing whitespace between option and parameter lex.c 1.14: C99ish inlined variable declaration
Diffstat (limited to 'shells/pdksh')
-rw-r--r--shells/pdksh/files/lex.c9
-rwxr-xr-xshells/pdksh/files/siglist.sh4
2 files changed, 8 insertions, 5 deletions
diff --git a/shells/pdksh/files/lex.c b/shells/pdksh/files/lex.c
index 502f0662574..7bb5d517d20 100644
--- a/shells/pdksh/files/lex.c
+++ b/shells/pdksh/files/lex.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.4 2009/02/21 20:06:30 tnn Exp $ */
+/* $NetBSD: lex.c,v 1.5 2011/01/23 17:29:30 hauke Exp $ */
/*
* lexical analysis and source input
@@ -239,6 +239,9 @@ yylex(cf)
Subst:
switch (c) {
+ Lex_state *s;
+ Lex_state *base;
+
case '\\':
c = getsc();
switch (c) {
@@ -335,8 +338,8 @@ yylex(cf)
* posix mode was not in effect.
*/
statep->ls_sbquote.indquotes = 0;
- Lex_state *s = statep;
- Lex_state *base = state_info.base;
+ s = statep;
+ base = state_info.base;
while (1) {
for (; s != base; s--) {
if (s->ls_state == SDQUOTE) {
diff --git a/shells/pdksh/files/siglist.sh b/shells/pdksh/files/siglist.sh
index e863a8a497d..e68f2add6fd 100755
--- a/shells/pdksh/files/siglist.sh
+++ b/shells/pdksh/files/siglist.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: siglist.sh,v 1.2 2008/05/31 16:47:37 tnn Exp $
+# $NetBSD: siglist.sh,v 1.3 2011/01/23 17:29:30 hauke Exp $
#
# Script to generate a sorted, complete list of signals, suitable
# for inclusion in trap.c as array initializer.
@@ -23,7 +23,7 @@ CPP="${1-cc -E}"
{ QwErTy .signal = SIG\1 , .name = "\1", .mess = "\2" },\
#endif/') > $in
$CPP $in > $out
-sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort -k5n -k1n |
+sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort -k 5n -k 1n |
sed 's/^[0-9]* //' |
awk 'BEGIN { last=0; nsigs=0; }
{