X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftty%2FMKexpanded.sh;h=77f06f287ae1edc1deb5a11252363c3a146d51e4;hp=845e77592583f9a07b42e2f2f8f3abb2e8a68000;hb=461e72d1826483cb2c2cb243412f2dc5b00b2b1a;hpb=3ce2c58251fe1353768cc630103cdb12ecc8be0a diff --git a/ncurses/tty/MKexpanded.sh b/ncurses/tty/MKexpanded.sh index 845e7759..77f06f28 100755 --- a/ncurses/tty/MKexpanded.sh +++ b/ncurses/tty/MKexpanded.sh @@ -1,6 +1,7 @@ #! /bin/sh ############################################################################## -# Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. # +# Copyright 2019-2020,2021 Thomas E. Dickey # +# Copyright 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 +28,9 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1997 +# Author: Thomas E. Dickey, 1997-on # -# $Id: MKexpanded.sh,v 1.12 2008/11/16 00:19:59 juergen Exp $ +# $Id: MKexpanded.sh,v 1.23 2021/06/17 21:26:02 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,13 +49,17 @@ else fi TMP=gen$$.c -trap "rm -f $TMP" 0 1 2 5 15 +trap "rm -f $TMP" EXIT INT QUIT TERM HUP cat < -#include + +#ifndef CUR +#define CUR SP_TERMTYPE +#endif + #if NCURSES_EXPANDED EOF @@ -69,41 +74,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 <