X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftty%2FMKexpanded.sh;h=fb4336fc0e10213e08926827f28fcdc2646c4bdd;hp=8e4a6c6c5f035c31f2dde0ef26fbb2bacff7cef2;hb=bca50d0d8592defee6c584fdedd25f4b1a31345b;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/ncurses/tty/MKexpanded.sh b/ncurses/tty/MKexpanded.sh index 8e4a6c6c..fb4336fc 100755 --- a/ncurses/tty/MKexpanded.sh +++ b/ncurses/tty/MKexpanded.sh @@ -1,6 +1,6 @@ #! /bin/sh ############################################################################## -# Copyright (c) 1998,2000 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.10 2000/12/10 00:24:33 tom Exp $ +# $Id: MKexpanded.sh,v 1.20 2017/08/12 12:20:28 tom Exp $ # # Script to generate 'expanded.c', a dummy source that contains functions # corresponding to complex macros used in this library. By making functions, @@ -48,12 +48,17 @@ else fi TMP=gen$$.c -trap "rm -f $TMP" 0 1 2 5 15 +trap "rm -f $TMP" 0 1 2 3 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 <