Define and use alloc() and dupstr() macros