~lubuntu-dev/lxde/pcmanfm-lxde-git

Viewing all changes in revision 1466.

  • Committer: Andriy Grytsenko
  • Author(s): Michael Weghorn
  • Date: 2019-01-09 11:55:35 UTC
  • Revision ID: git-v1:0619a81f358d85568d990fc78c67e121e55f1c05
Avoid undefined 'isdigit()' behaviour

As the C11 standard says in section 7.4, 1),
the 'isdigit()' function is only well-defined
under this precondition:

> The header <ctype.h> declares several functions
> useful for classifying and mapping characters.
> In all cases the argument is an int, the value of
> which shall be representable as an unsigned char or
> shall equal the value of the macro EOF. If the argument
> has any other value, the behavior is undefined.

Therefore avoid to use the 'isdigit()' function here,
since the Gdk key codes and thus the 'keyval'
member from the 'GdkEventKey' do not always fulfill
this requirement and the behaviour is thus undefined.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: