static int sequence = 0;  snprintf (buf, buflen, "a%04d", sequence++);
snprintf (idata->cmd.seq, sizeof (idata->cmd.seq), "a%04d", idata->seqno++);
static void cmd_make_sequence (char* buf, size_t buflen){  static int sequence = 0;    snprintf (buf, buflen, "a%04d", sequence++);  if (sequence > 9999)    sequence = 0;}