2 ################################################################################
3 # Copyright 1997 by Thomas E. Dickey <dickey@clark.net> #
4 # All Rights Reserved. #
6 # Permission to use, copy, modify, and distribute this software and its #
7 # documentation for any purpose and without fee is hereby granted, provided #
8 # that the above copyright notice appear in all copies and that both that #
9 # copyright notice and this permission notice appear in supporting #
10 # documentation, and that the name of the above listed copyright holder(s) not #
11 # be used in advertising or publicity pertaining to distribution of the #
12 # software without specific, written prior permission. THE ABOVE LISTED #
13 # COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, #
14 # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT #
15 # SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY SPECIAL, #
16 # INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM #
17 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE #
18 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR #
19 # PERFORMANCE OF THIS SOFTWARE. #
20 ################################################################################
21 # $Id: MKexpanded.sh,v 1.4 1997/05/10 20:21:58 tom Exp $
23 # Script to generate 'expanded.c', a dummy source that contains functions
24 # corresponding to complex macros used in this library. By making functions,
25 # we simplify analysis and debugging.
33 if test $# != 0 ; then
34 preprocessor="$preprocessor $*"
36 preprocessor="$preprocessor -DHAVE_CONFIG_H -I. -I../include"
40 trap "rm -f $TMP" 0 1 2 5 15
43 /* generated by MKexpanded.sh */
44 #include <curses.priv.h>
46 #ifdef NCURSES_EXPANDED
50 #include <ncurses_cfg.h>
51 #undef NCURSES_EXPANDED /* this probably is set in ncurses_cfg.h */
52 #include <curses.priv.h>
53 /* these are names we'd like to see */
58 /* this is a marker */
60 chtype _nc_ch_or_attr(chtype ch, attr_t at)
62 return ch_or_attr(ch,at);
64 void _nc_toggle_attr_on(attr_t *S, attr_t at)
66 toggle_attr_on(*S,at);
68 void _nc_toggle_attr_off(attr_t *S, attr_t at)
70 toggle_attr_off(*S,at);
72 int _nc_can_clear_with(chtype ch)
74 return can_clear_with(ch);
76 int _nc_DelCharCost(int count)
78 return DelCharCost(count);
80 int _nc_InsCharCost(int count)
82 return InsCharCost(count);
84 void _nc_UpdateAttrs(chtype c)
90 $preprocessor $TMP 2>/dev/null | sed -e '1,/^IGNORE$/d' >>expanded.c
92 cat >>expanded.c <<EOF
93 #else /* ! NCURSES_EXPANDED */
94 void _nc_expanded(void) { }
95 #endif /* NCURSES_EXPANDED */