/****************************************************************************
- * Copyright (c) 2002-2018,2019 Free Software Foundation, Inc. *
+ * Copyright 2018-2020,2022 Thomas E. Dickey *
+ * Copyright 2002-2016,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 *
* authorization. *
****************************************************************************/
/*
- * $Id: demo_defkey.c,v 1.29 2019/08/17 21:49:19 tom Exp $
+ * $Id: demo_defkey.c,v 1.32 2022/04/16 18:26:57 tom Exp $
*
* Demonstrate the define_key() function.
* Thomas Dickey - 2002/11/23
static char *
visichar(int ch)
{
- static char temp[10];
+ static char temp[20];
ch = UChar(ch);
assert(ch >= 0 && ch < 256);
unlink(MY_LOGFILE);
+ setlocale(LC_ALL, "");
initscr();
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
* keypad() initializes the corresponding data.
*/
for (n = 0; n < 12; ++n) {
- char name[10];
+ char name[20];
_nc_SPRINTF(name, _nc_SLIMIT(sizeof(name)) "kf%d", n + 1);
fkeys[n] = tigetstr(name);
}