diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-09-04 09:38:08 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-09-04 09:38:08 +0300 |
commit | 611353597e20081bd0c72617e24fa5ff4c63dac1 (patch) | |
tree | c6099826973ea7f036f5a0c7b7536f17b25576a1 /awkgram.c | |
parent | cb92ab7aa657c57446cc9e0087f1364adaac8fee (diff) | |
download | egawk-611353597e20081bd0c72617e24fa5ff4c63dac1.tar.gz egawk-611353597e20081bd0c72617e24fa5ff4c63dac1.tar.bz2 egawk-611353597e20081bd0c72617e24fa5ff4c63dac1.zip |
Make indirect calls work on built-in and extension functions.
Diffstat (limited to 'awkgram.c')
-rw-r--r-- | awkgram.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -8044,3 +8044,19 @@ one_line_close(int fd) } +/* lookup_builtin --- find a builtin function or return NULL */ + +builtin_func_t +lookup_builtin(const char *name) +{ + int mid = check_special(name); + + if (mid == -1 || tokentab[mid].class != LEX_BUILTIN) + return NULL; +#ifdef HAVE_MPFR + if (do_mpfr) + return tokentab[mid].ptr2; +#endif + + return tokentab[mid].ptr; +} |