+ /* Will pass to the handler of this stream... is there any? */
+ if (!ls->handler)
+ return;
+
+ /* Will print a message type? */
+ char *type = NULL;
+ if ((ls->msgfmt & LSFMT_TYPE) && LS_GET_TYPE(m->flags))
+ type = log_type_name(m->flags);
+
+ /* Upper bound on message length */
+ int len = strlen(m->raw_msg) + strlen(m->stime) + strlen(m->sutime) + 32;
+ if (log_title)
+ len += strlen(log_title);
+ if (ls->name)
+ len += strlen(ls->name);
+ if (type)
+ len += strlen(type) + 3;
+
+ /* Get a buffer and format the message */
+ char *free_buf = NULL;
+ if (len <= 256 || (m->flags & L_SIGHANDLER))
+ m->m = alloca(len);
+ else
+ m->m = free_buf = xmalloc(len);
+ char *p = m->m;
+
+ /* Level (2 chars) */
+ if (ls->msgfmt & LSFMT_LEVEL)