switch from macros to typedefs for tracefile handle