Date: Sun, 31 Jan 2016 21:31:24 +0000 (UTC) From: Devin Teske <dteske@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295104 - head/usr.sbin/bsdconfig/share Message-ID: <201601312131.u0VLVOKV006042@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dteske Date: Sun Jan 31 21:31:24 2016 New Revision: 295104 URL: https://svnweb.freebsd.org/changeset/base/295104 Log: Move f_vsprintf() below f_sprintf() Variable argument versions grouped with standard versions Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 31 21:30:02 2016 (r295103) +++ head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 31 21:31:24 2016 (r295104) @@ -159,6 +159,16 @@ f_sprintf() esac } +# f_vsprintf $var_to_set $format $format_args +# +# Similar to vsprintf(3), write a string into $var_to_set using printf(1) +# syntax (`$format $format_args'). +# +f_vsprintf() +{ + eval f_sprintf \"\$1\" \"\$2\" $3 +} + # f_snprintf $var_to_set $size $format [$arguments ...] # # Similar to snprintf(3), write at most $size number of bytes into $var_to_set @@ -209,16 +219,6 @@ f_vsnprintf() eval f_snprintf \"\$1\" \"\$2\" \"\$3\" $4 } -# f_vsprintf $var_to_set $format $format_args -# -# Similar to vsprintf(3), write a string into $var_to_set using printf(1) -# syntax (`$format $format_args'). -# -f_vsprintf() -{ - eval f_sprintf \"\$1\" \"\$2\" $3 -} - # f_longest_line_length # # Simple wrapper to an awk(1) script to print the length of the longest line of
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601312131.u0VLVOKV006042>