svn commit: r257789 - head/usr.sbin/bsdconfig/share

Devin Teske dteske at FreeBSD.org
Thu Nov 7 10:44:24 UTC 2013


Author: dteske
Date: Thu Nov  7 10:44:24 2013
New Revision: 257789
URL: http://svnweb.freebsd.org/changeset/base/257789

Log:
  Comments.

Modified:
  head/usr.sbin/bsdconfig/share/strings.subr

Modified: head/usr.sbin/bsdconfig/share/strings.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/strings.subr	Thu Nov  7 10:40:19 2013	(r257788)
+++ head/usr.sbin/bsdconfig/share/strings.subr	Thu Nov  7 10:44:24 2013	(r257789)
@@ -46,7 +46,7 @@ VALID_VARNAME_CHARS="0-9ABCDEFGHIJKLMNOP
 
 ############################################################ FUNCTIONS
 
-# f_substr "$string" $start [ $length ]
+# f_substr "$string" $start [$length]
 #
 # Simple wrapper to awk(1)'s `substr' function.
 #
@@ -56,16 +56,16 @@ f_substr()
 	echo "$string" | awk "{ print substr(\$0, $start, $len) }"
 }
 
-# f_snprintf $var_to_set $size $format ...
+# f_snprintf $var_to_set $size $format [$arguments ...]
 #
 # Similar to snprintf(3), write at most $size number of bytes into $var_to_set
-# using printf(1) syntax (`$format ...'). The value of $var_to_set is NULL
-# unless at-least one byte is stored from the output.
+# using printf(1) syntax (`$format [$arguments ...]'). The value of $var_to_set
+# is NULL unless at-least one byte is stored from the output.
 #
 f_snprintf()
 {
 	local __var_to_set="$1" __size="$2"
-	shift 2 # var_to_set/size
+	shift 2 # var_to_set size
 	eval "$__var_to_set"=\$\( printf \"\$@\" \| awk -v max=\"\$__size\" \''
 	{
 		len = length($0)


More information about the svn-src-all mailing list