deps/kb_meme/meme-5.0.1/src/parser-message.c
/*
 * parmsg_vset
 * Copies the parser message into a preallocated structure. 
 */
parmsg_vset
Copies the parser message into a preallocated structure.
parmsg_vset Copies the parser message into a preallocated structure .
static void parmsg_vset(PARMSG_T* dest, SEVERITY_EN severity, int64_t offset, int64_t line, int64_t column, const char* message_format, va_list ap) {
  va_list ap_copy;
  char temp[1];
  size_t length;
  dest->severity = severity;
  dest->offset = offset;
  dest->line = line;
  dest->column = column;
  va_copy(ap_copy, ap);
  length = vsnprintf(temp, 1, message_format, ap_copy);
  va_end(ap_copy);
  dest->message = mm_malloc(sizeof(char) * (length + 1));
  vsnprintf(dest->message, length + 1, message_format, ap);
}
static void parmsg_vset ( PARMSG_T * dest , SEVERITY_EN severity , int64_t offset , int64_t line , int64_t column , const char * message_format , va_list ap ) { va_list ap_copy ; char temp [ 1 ] ; size_t length ; dest -> severity = severity ; dest -> offset = offset ; dest -> line = line ; dest -> column = column ; va_copy ( ap_copy , ap ) ; length = vsnprintf ( temp , 1 , message_format , ap_copy ) ; va_end ( ap_copy ) ; dest -> message = mm_malloc ( sizeof ( char ) * ( length + 1 ) ) ; vsnprintf ( dest -> message , length + 1 , message_format , ap ) ; }
parmsg_vset
 Copies the parser message into a preallocated structure.
parmsg_vset Copies the parser message into a preallocated structure .
// measure the message length // write the message