char compressionNamePad; uint8 compressionNameLength;
uint8 padByte, compressionNameLength;
static int aiff_output_open(const char *fname){  int t, compressed;  const char *compressionName = NULL;  char compressionNamePad;  uint8 compressionNameLength;  if(strcmp(fname, "-") == 0) {    dpm.fd = 1; /* data to stdout */  } else {    /* Open the audio file */    dpm.fd = open(fname, FILE_OUTPUT_MODE);    if(dpm.fd < 0) {      ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s",		fname, strerror(errno));      return -1;    }  }  /* FORM chunk */  if(write_str("FORM") == -1) return -1;  /* file size - 8 (dmy) */  if(write_u32((uint32)0xffffffff) == -1) return -1;  /* form type */  compressed = dpm.encoding & (PE_ULAW|PE_ALAW);  if(write_str(compressed ? "AIFC" : "AIFF") == -1) return -1;  /* FVER chunk */  if(compressed) {    if(chunk_start("FVER", 4) == -1) return -1;    if(write_u32(AIFC_VERSION_1) == -1) return -1;    compressionName = (dpm.encoding & PE_ULAW) ? "\xB5Law 2:1" : "ALaw 2:1";  }  /* COMM chunk */  if(!compressed) {    comm_chunk_offset = 12;    comm_chunk_size = 18;  } else {    compressionNameLength = 1 + strlen(compressionName);    compressionNamePad = compressionNameLength & 1;    comm_chunk_offset = 12 + 12;    comm_chunk_size = 18 + 4 + compressionNameLength + compressionNamePad;  }  if(chunk_start("COMM", comm_chunk_size) == -1) return -1;  /* number of channels */  if(dpm.encoding & PE_MONO) {    if(write_u16((uint16)1) == -1) return -1;  } else {    if(write_u16((uint16)2) == -1) return -1;  }  /* number of frames (dmy) */  if(write_u32((uint32)0xffffffff) == -1) return -1;  /* bits per sample (decompressed size) */  if(dpm.encoding & PE_24BIT)    t = 24;  else if(dpm.encoding & (PE_16BIT | PE_ULAW | PE_ALAW))    t = 16;  else    t = 8;  if(write_u16((uint16)t) == -1) return -1;  /* sample rate */  if(write_ieee_80bitfloat((double)dpm.rate) == -1) return -1;    /* compression type */  if(compressed) {    if(write_str((dpm.encoding & PE_ULAW) ? "ulaw" : "alaw") == -1) return -1;    if(write(dpm.fd, &compressionNameLength, 1) == -1) return -1;    if(write_str(compressionName) == -1) return -1;    if(compressionNamePad) {      compressionNamePad = 0;      if(write(dpm.fd, &compressionNamePad, 1) == -1) return -1;    }  }  /* SSND chunk */  if(chunk_start("SSND", (int32)0xffffffff) == -1) return -1;  /* offset */  if(write_u32((uint32)0) == -1) return -1;  /* block size */  if(write_u32((uint32)0) == -1) return -1;  return 0;}