X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2FMKunctrl.awk;h=79ca5fc56733df954e5b1660cf1bd56bac9b925e;hp=d8a6587e2c69f248bd264294f1f3428537f5e092;hb=55ccd2b959766810cf7db8d1c4462f338ce0afc8;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01;ds=sidebyside diff --git a/ncurses/base/MKunctrl.awk b/ncurses/base/MKunctrl.awk index d8a6587e..79ca5fc5 100644 --- a/ncurses/base/MKunctrl.awk +++ b/ncurses/base/MKunctrl.awk @@ -1,6 +1,6 @@ -# $Id: MKunctrl.awk,v 1.9 2001/06/02 23:59:20 skimo Exp $ +# $Id: MKunctrl.awk,v 1.10 2004/04/03 22:50:37 tom Exp $ ############################################################################## -# Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. # +# Copyright (c) 1998,2001,2004 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"), # @@ -63,7 +63,10 @@ END { printf "%s", gap } print "};" + print "int check = ChCharOf(ch);" print "" - print "\treturn (NCURSES_CONST char *)table[ChCharOf(ch)];" + print "\tif (check < 0 || check >= (int)SIZEOF(table)) return 0;" + print "" + print "\treturn (NCURSES_CONST char *)table[check];" print "}" }