Skip to content
Myr

Fix handling of unsupported math functions

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Nicolas Williams · committed by Nicolas Williams · parent 2fb099e · Browse files · 1 file+15 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+15 added−2 removed

  • other:+15 added−2 removed

1 file+15 added−2 removed

modified:src/builtin.c+15 added-2 removed
1373 unmodified lines
1374}13751376#define LIBM_DD(name) "def " #name ": _" #name ";"1377#define LIBM_DDD(name) "def " #name "(a;b): _" #name "(a;b);"1378#define LIBM_DD_NO(name) "def " #name ": \"Error: " #name "() not found at build time\"|error;"1379#define LIBM_DDD_NO(name) "def " #name "(a;b): \"Error: " #name "() not found at build time\"|error;"1378#define LIBM_DD_NO(name)1379#define LIBM_DDD_NO(name)13801381static const char* const jq_builtins =1382/* Include supported math functions first */1383#include "libm.h"1384/* Include jq-coded builtins next (some depend on math) */1385#include "src/builtin.inc"13861387/* Include unsupported math functions next */1388#undef LIBM_DDD_NO1389#undef LIBM_DD_NO1390#undef LIBM_DDD1391#undef LIBM_DD1392#define LIBM_DD(name)1393#define LIBM_DDD(name)1394#define LIBM_DD_NO(name) "def " #name ": \"Error: " #name "() not found at build time\"|error;"1395#define LIBM_DDD_NO(name) "def " #name "(a;b): \"Error: " #name "() not found at build time\"|error;"1396#include "libm.h"1397;13981399#undef LIBM_DDD_NO1400#undef LIBM_DD_NO
43 unmodified lines