X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftty%2FMKexpanded.sh;h=65c6b93e46274e12f1131abcfb032b7899973b16;hp=e13996ed914a8d9a942a4d3cb212291b622e45d9;hb=e5d1530ca229aef94a3c84ad33f8ae89f35c4045;hpb=da1f84b7eb32f17e91f6de242132ab3b2d462148;ds=inline diff --git a/ncurses/tty/MKexpanded.sh b/ncurses/tty/MKexpanded.sh index e13996ed..65c6b93e 100755 --- a/ncurses/tty/MKexpanded.sh +++ b/ncurses/tty/MKexpanded.sh @@ -1,6 +1,7 @@ #! /bin/sh ############################################################################## -# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. # +# Copyright 2019,2020 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"), # @@ -29,7 +30,7 @@ # # Author: Thomas E. Dickey, 1997-on # -# $Id: MKexpanded.sh,v 1.15 2009/06/27 20:37:50 tom Exp $ +# $Id: MKexpanded.sh,v 1.22 2020/02/02 23:34:34 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 @@ -121,7 +126,7 @@ _nc_UpdateAttrs (CARG_CH_T c) EOF $preprocessor $TMP 2>/dev/null | \ - sed -e '1,/^IGNORE$/d' -e 's/^@/#/' -e 's/^#if_/#if /' + sed -e '1,/^IGNORE$/d' -e 's/^@/#/' -e 's/^#[ ]*if_/#if /' -e "s,$TMP,expanded.c," cat <