-# $Id: MKkeyname.awk,v 1.39 2008/05/31 19:54:58 tom Exp $
+# $Id: MKkeyname.awk,v 1.41 2009/02/15 00:24:58 tom Exp $
##############################################################################
-# Copyright (c) 1999-2007,2008 Free Software Foundation, Inc. #
+# Copyright (c) 1999-2008,2009 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"), #
print ""
print " _nc_tracing = 0; /* prevent recursion via keybound() */"
print " for (j = 0; (bound = keybound(c, j)) != 0; ++j) {"
- print " for(k = STRCOUNT; k < NUM_STRINGS(tp); k++) {"
+ print " for(k = STRCOUNT; k < (int) NUM_STRINGS(tp); k++) {"
print " if (tp->Strings[k] != 0 && !strcmp(bound, tp->Strings[k])) {"
print " result = ExtStrname(tp, k, strnames);"
print " break;"
print " return result;"
print "}"
print ""
- print "NCURSES_EXPORT(NCURSES_CONST char *) keyname (int c)"
+ print "NCURSES_EXPORT(NCURSES_CONST char *)"
+ print "NCURSES_SP_NAME(keyname) (NCURSES_SP_DCLx int c)"
print "{"
- print "\treturn _nc_keyname(SP, c);"
+ print "\treturn _nc_keyname(SP_PARM, c);"
print "}"
print ""
+ print "#if NCURSES_SP_FUNCS"
+ print "NCURSES_EXPORT(NCURSES_CONST char *)"
+ print "keyname (int c)"
+ print "{"
+ print " return NCURSES_SP_NAME(keyname) (CURRENT_SCREEN, c);"
+ print "}"
+ print "#endif"
+ print ""
print "#if NO_LEAKS"
print "void _nc_keyname_leaks(void)"
print "{"