aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/base/MKlib_gen.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/ncurses/base/MKlib_gen.sh')
-rwxr-xr-xcontrib/ncurses/ncurses/base/MKlib_gen.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/ncurses/ncurses/base/MKlib_gen.sh b/contrib/ncurses/ncurses/base/MKlib_gen.sh
index 30c44fff6f83..b5b07140b55f 100755
--- a/contrib/ncurses/ncurses/base/MKlib_gen.sh
+++ b/contrib/ncurses/ncurses/base/MKlib_gen.sh
@@ -2,10 +2,10 @@
#
# MKlib_gen.sh -- generate sources from curses.h macro definitions
#
-# ($Id: MKlib_gen.sh,v 1.27 2006/07/01 21:25:39 tom Exp $)
+# ($Id: MKlib_gen.sh,v 1.29 2007/08/18 13:17:14 tom Exp $)
#
##############################################################################
-# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2006,2007 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"), #
@@ -62,7 +62,7 @@ if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
if test "${LC_COLLATE+set}" = set; then LC_COLLATE=C; export LC_COLLATE; fi
-preprocessor="$1 -I../include"
+preprocessor="$1 -DNCURSES_INTERNALS -I../include"
AWK="$2"
USE="$3"
@@ -406,7 +406,11 @@ sed -n -f $ED1 \
| sed -e 's/NCURSES_EXPORT(\(.*\)) \(.*\) (\(.*\))/\1 \2(\3)/' \
| sed -f $ED2 \
| $AWK -f $AW1 using=$USE \
-| sed -e 's/^\([a-z_][a-z_]*[ *]*\)/\1 gen_/' -e 's/ / /g' >>$TMP
+| sed \
+ -e 's/ [ ]*$//g' \
+ -e 's/^\([a-zA-Z_][a-zA-Z_]*[ *]*\)/\1 gen_/' \
+ -e 's/gen_$//' \
+ -e 's/ / /g' >>$TMP
$preprocessor $TMP 2>/dev/null \
| sed \