13 # define va_copy(DEST,SRC) __va_copy((DEST),(SRC))
15 # ifdef HAVE_VA_LIST_AS_ARRAY
16 # define va_copy(DEST,SRC) (*(DEST) = *(SRC))
18 # define va_copy(DEST,SRC) ((DEST) = (SRC))
38 if (p != NULL) free((
void *)p);
49 if (recs != NULL &&
nrecs > 0)
57 if (recs != NULL &&
nrecs > 0)
59 return _(
"(no error)");
71 for (i = 0; i <
nrecs; i++) {
74 fprintf(f,
" %s", rec->
message);
86 for (i = 0; i <
nrecs; i++) {
153 #if !defined(HAVE_VSNPRINTF)
155 const char * fmt, va_list ap)
157 return vsprintf(buf, fmt, ap);
164 static void vrpmlog (
unsigned code,
const char *fmt, va_list ap)
172 int msgnb = BUFSIZ, nb;
187 if (nb > -1 && nb < msgnb)
198 msgbuf[msgnb - 1] =
'\0';
246 (void) fputs(msg, msgout);
247 (void) fflush(msgout);
248 msgbuf =
_free(msgbuf);
255 void rpmlog (
int code,
const char *fmt, ...)