udf: remove UDF_I_* macros and open code them