You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.8 KiB
49 lines
1.8 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../pdksh/sort-trap.patch |
|
# Copyright (C) 2004 - 2006 The T2 SDE Project |
|
# |
|
# More information can be found in the files COPYING and README. |
|
# |
|
# This patch file is dual-licensed. It is available under the license the |
|
# patched project is licensed under, as long as it is an OpenSource license |
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms |
|
# of the GNU General Public License as published by the Free Software |
|
# Foundation; either version 2 of the License, or (at your option) any later |
|
# version. |
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
Hm. I find the resulting output a bit unlogic - but it is exactly the same |
|
with the old options and an old sort. So this "chaotic" sort might have |
|
been intended - or always been buggy ... |
|
|
|
Also fixed the trap usage. |
|
|
|
- Rene Rebe <rene@exactcode.de> |
|
|
|
--- pdksh-5.2.14/siglist.sh.orig 1996-09-18 18:52:41.000000000 +0200 |
|
+++ pdksh-5.2.14/siglist.sh 2004-05-05 02:41:53.000000000 +0200 |
|
@@ -11,19 +11,19 @@ |
|
out=tmpo$$.c |
|
ecode=1 |
|
trapsigs='0 1 2 13 15' |
|
-trap 'rm -f $in $out; trap 0; exit $ecode' $trapsigs |
|
+trap 'rm -f $in $out; trap - 0; exit $ecode' $trapsigs |
|
|
|
CPP="${1-cc -E}" |
|
|
|
# The trap here to make up for a bug in bash (1.14.3(1)) that calls the trap |
|
-(trap $trapsigs; |
|
+(trap - $trapsigs; |
|
echo '#include "sh.h"'; |
|
echo ' { QwErTy SIGNALS , "DUMMY" , "hook for number of signals" },'; |
|
sed -e '/^[ ]*#/d' -e 's/^[ ]*\([^ ][^ ]*\)[ ][ ]*\(.*[^ ]\)[ ]*$/#ifdef SIG\1\ |
|
{ QwErTy SIG\1 , "\1", "\2" },\ |
|
#endif/') > $in |
|
$CPP $in > $out |
|
-sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort +2n +0n | |
|
+sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort -n -k 2 | |
|
sed 's/^[0-9]* //' | |
|
awk 'BEGIN { last=0; nsigs=0; } |
|
{
|
|
|