#include char *malloc(), *strcpy(); #define strsave(s) strcpy(malloc(strlen(s)+1),s) MpuCmd * CopyMpuCmd(m) MpuCmd *m; /* ** Make a copy of 'm' and return it. */ { #define set(thing) n->thing = m->thing MpuCmd *n = Alloc(MpuCmd); set(time_tag); set(arg_cnt); set(cmd_cont); set(cmd_type); set(mpu_time); n->mpu_cmd = (unsigned char *)strsave(m->mpu_cmd); return n; #undef set }