diff options
Diffstat (limited to 'ncurses/tinfo/MKkeys_list.sh')
-rwxr-xr-x | ncurses/tinfo/MKkeys_list.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ncurses/tinfo/MKkeys_list.sh b/ncurses/tinfo/MKkeys_list.sh index 14017b0168963..158e34d25538d 100755 --- a/ncurses/tinfo/MKkeys_list.sh +++ b/ncurses/tinfo/MKkeys_list.sh @@ -1,7 +1,7 @@ #! /bin/sh -# $Id: MKkeys_list.sh,v 1.4 2003/10/25 16:19:54 tom Exp $ +# $Id: MKkeys_list.sh,v 1.6 2019/03/02 22:47:33 tom Exp $ ############################################################################## -# Copyright (c) 2001,2003 Free Software Foundation, Inc. # +# Copyright (c) 2001-2017,2019 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -35,11 +35,16 @@ # Extract function-key names from the Caps file # : ${AWK-awk} -DATA=${1-../../include/Caps} +if test $# != 0 +then + DATA="$*" +else + DATA=../../include/Caps +fi data=data$$ -trap 'rm -f $data' 0 1 2 5 15 -sed -e 's/[ ][ ]*/ /g' < $DATA >$data +trap 'rm -f $data' EXIT INT QUIT TERM HUP +cat $DATA | sed -e 's/[ ][ ]*/ /g' >$data cat <<EOF # These definitions were generated by $0 $DATA @@ -53,6 +58,7 @@ ${AWK-awk} <$data ' /^#/ {next;} /^capalias/ {next;} /^infoalias/ {next;} +/^userdef/ {next;} $5 != "-" { if (substr($5, 1, 4) == "KEY_" ) { |