C functions that define a Prolog predicate should not take any argument. The function bp_get_call_arg(i,arity) is used in order to get the arguments in the current Prolog call:
- TERM bp_get_call_arg(int i, int arity):
Fetch the ith argument, where arity is the arity of the predicate, and i must be an integer between 1 and arity. The validity of the arguments is not checked, and an invalid argument may cause fatal errors.