+
+printf_arglist_function2(char *log_genstring, logtype_t, typ, char *, pname, char *, format)
+{
+ va_list argp;
+ char *leader = NULL;
+ char linebuf[STR_SIZE];
+
+
+ /* format error message */
+
+ if((int)typ <= (int)L_BOGUS || (int)typ > (int)L_MARKER) typ = L_BOGUS;
+
+ if(multiline > 0) {
+ leader = stralloc(" "); /* continuation line */
+ } else {
+ leader = vstralloc(logtype_str[(int)typ], " ", pname, " ", NULL);
+ }
+
+ arglist_start(argp, format);
+ vsnprintf(linebuf, sizeof(linebuf)-1, format, argp);
+ /* -1 to allow for '\n' */
+ return(vstralloc(leader, linebuf, "\n", NULL));
+}
+