# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
print "NCURSES_EXPORT(NCURSES_CONST char *)"
print "safe_keyname (SCREEN *sp, int c)"
print "{"
print "NCURSES_EXPORT(NCURSES_CONST char *)"
print "safe_keyname (SCREEN *sp, int c)"
print "{"
if (bigstrings) {
print " for (i = 0; _nc_key_names[i].offset != -1; i++) {"
print " if (_nc_key_names[i].code == c) {"
if (bigstrings) {
print " for (i = 0; _nc_key_names[i].offset != -1; i++) {"
print " if (_nc_key_names[i].code == c) {"
print "#define P_LIMIT (sizeof(name) - (size_t) (p - name))"
print " if (cc >= 128 && m_prefix) {"
print " _nc_STRCPY(p, \"M-\", P_LIMIT);"
print "#define P_LIMIT (sizeof(name) - (size_t) (p - name))"
print " if (cc >= 128 && m_prefix) {"
print " _nc_STRCPY(p, \"M-\", P_LIMIT);"
print " unsigned save_trace = _nc_tracing;"
print ""
print " _nc_tracing = 0; /* prevent recursion via keybound() */"
print " unsigned save_trace = _nc_tracing;"
print ""
print " _nc_tracing = 0; /* prevent recursion via keybound() */"