Add function versions of some low-level macros with wider use.