Do input validation in various functions in function.c and complete.c

darcs-hash:20060608000145-ac50b-1088c3f5e3c1ad2759c13400e5dda2d21858fedc.gz
This commit is contained in:
axel
2006-06-08 10:01:45 +10:00
parent d7eb084b9d
commit 93ae00e8e5
3 changed files with 105 additions and 2 deletions

View File

@@ -16,6 +16,19 @@
#define WCHAR_MAX INT_MAX
#endif
/**
Make sure __func__ is defined to some string. This should be the
currently compiled function, but not all compilers support this
feature.
*/
#if __STDC_VERSION__ < 199901L
# if __GNUC__ >= 2
# define __func__ __FUNCTION__
# else
# define __func__ "<unknown>"
# endif
#endif
/**
Under curses, tputs expects an int (*func)(char) as its last
parameter, but in ncurses, tputs expects a int (*func)(int) as its