=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/pr/pr.c,v retrieving revision 1.25 retrieving revision 1.26 diff -c -r1.25 -r1.26 *** src/usr.bin/pr/pr.c 2007/09/03 12:36:09 1.25 --- src/usr.bin/pr/pr.c 2008/04/18 20:18:21 1.26 *************** *** 1,4 **** ! /* $OpenBSD: pr.c,v 1.25 2007/09/03 12:36:09 moritz Exp $ */ /*- * Copyright (c) 1991 Keith Muller. --- 1,4 ---- ! /* $OpenBSD: pr.c,v 1.26 2008/04/18 20:18:21 tobias Exp $ */ /*- * Copyright (c) 1991 Keith Muller. *************** *** 41,47 **** #ifndef lint /* from: static char sccsid[] = "@(#)pr.c 8.1 (Berkeley) 6/6/93"; */ ! static char *rcsid = "$OpenBSD: pr.c,v 1.25 2007/09/03 12:36:09 moritz Exp $"; #endif /* not lint */ #include --- 41,47 ---- #ifndef lint /* from: static char sccsid[] = "@(#)pr.c 8.1 (Berkeley) 6/6/93"; */ ! static char *rcsid = "$OpenBSD: pr.c,v 1.26 2008/04/18 20:18:21 tobias Exp $"; #endif /* not lint */ #include *************** *** 850,857 **** sigaddset(&block, SIGINT); sigprocmask(SIG_BLOCK, &block, &oblock); ! vasprintf(&p, fmt, ap); ! f = (struct ferrlist *)malloc(sizeof(*f)); f->next = NULL; f->buf = p; if (ferrhead == NULL) --- 850,862 ---- sigaddset(&block, SIGINT); sigprocmask(SIG_BLOCK, &block, &oblock); ! if (vasprintf(&p, fmt, ap) == -1 || (f = malloc(sizeof(*f))) == NULL) { ! flsh_errs(); ! fprintf(stderr, fmt, ap); ! fputs("pr: memory allocation failed\n", stderr); ! exit(1); ! } ! f->next = NULL; f->buf = p; if (ferrhead == NULL)