From owner-cvs-src@FreeBSD.ORG Wed Jan 25 12:45:25 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9195316A41F; Wed, 25 Jan 2006 12:45:25 +0000 (GMT) (envelope-from phk@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2EC9E43D72; Wed, 25 Jan 2006 12:45:25 +0000 (GMT) (envelope-from phk@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k0PCjPbw043311; Wed, 25 Jan 2006 12:45:25 GMT (envelope-from phk@repoman.freebsd.org) Received: (from phk@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k0PCjPt5043310; Wed, 25 Jan 2006 12:45:25 GMT (envelope-from phk) Message-Id: <200601251245.k0PCjPt5043310@repoman.freebsd.org> From: Poul-Henning Kamp Date: Wed, 25 Jan 2006 12:45:25 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/include printf.h src/lib/libc/stdio Makefile.inc xprintf.c xprintf_errno.c xprintf_quote.c xprintf_vis.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2006 12:45:25 -0000 phk 2006-01-25 12:45:25 UTC FreeBSD src repository Modified files: include printf.h lib/libc/stdio Makefile.inc xprintf.c xprintf_vis.c Added files: lib/libc/stdio xprintf_errno.c xprintf_quote.c Log: Make the %V{is} extension handle a NULL pointer like %s does: output "(null)" Add %M{essage} extension which prints an errno value as the corresponding string if possible or numerically otherwise. It is not currently possible to do the syslog(3) like %m extension because errno would need to get capatured on entry to the first function in the printf family, so %M requires you to supply errno as an argument. Add %Q{uote} extension which will print a string in double quotes with appropriate back-slash escapes (only) if necessary. Revision Changes Path 1.2 +12 -4 src/include/printf.h 1.35 +2 -1 src/lib/libc/stdio/Makefile.inc 1.2 +10 -0 src/lib/libc/stdio/xprintf.c 1.1 +65 -0 src/lib/libc/stdio/xprintf_errno.c (new) 1.1 +108 -0 src/lib/libc/stdio/xprintf_quote.c (new) 1.2 +2 -0 src/lib/libc/stdio/xprintf_vis.c