X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftty%2FMKexpanded.sh;h=cc13f587ff19e342a3c51f2f533c0fce375858e2;hp=bf9acf21aa434088e5d894bbda68d2f91cda806d;hb=3eda6f30a84d53844d2ebceadb457e2e7e9cfbf3;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8 diff --git a/ncurses/tty/MKexpanded.sh b/ncurses/tty/MKexpanded.sh index bf9acf21..cc13f587 100755 --- a/ncurses/tty/MKexpanded.sh +++ b/ncurses/tty/MKexpanded.sh @@ -1,6 +1,6 @@ #! /bin/sh ############################################################################## -# Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. # +# Copyright (c) 1998-2015,2017 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"), # @@ -27,9 +27,9 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1997 +# Author: Thomas E. Dickey, 1997-on # -# $Id: MKexpanded.sh,v 1.11 2005/01/02 01:06:40 tom Exp $ +# $Id: MKexpanded.sh,v 1.19 2017/02/11 18:19:40 tom Exp $ # # Script to generate 'expanded.c', a dummy source that contains functions # corresponding to complex macros used in this library. By making functions, @@ -52,8 +52,13 @@ trap "rm -f $TMP" 0 1 2 5 15 cat < -#include + +#ifndef CUR +#define CUR SP_TERMTYPE +#endif + #if NCURSES_EXPANDED EOF @@ -68,29 +73,59 @@ cat >$TMP </dev/null | sed -e '1,/^IGNORE$/d' +$preprocessor $TMP 2>/dev/null | \ + sed -e '1,/^IGNORE$/d' -e 's/^@/#/' -e 's/^#[ ]*if_/#if /' -e "s,$TMP,expanded.c," cat <