NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/38013: man pages not in accordance with proplib code in NetBSD 4.0



>Number:         38013
>Category:       lib
>Synopsis:       man pages not in accordance with proplib code in NetBSD 4.0
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 12 21:30:00 +0000 2008
>Originator:     Stathis Kamperis
>Release:        NetBSD 4.0_PATCH
>Organization:
>Environment:
NetBSD netbsd 4.0.0_PATCH NetBSD 4.0.0_PATCH (MY_GENERIC) #1: Sat Feb  9 
22:30:14 EET 2008  root@netbsd:/usr/obj/sys/arch/i386/compile/MY_GENERIC i386

>Description:
In NetBSD 4.0, in proplib(3) man pages, functions that return a
boolean data type are said to return `TRUE' or `FALSE'. In reality
`true' or `false' is returned.

It seems that at some point[1] all `boolean_t' data types were
converted to the standard `bool', but the man pages haven't been
updated accordingly.

[1] http://archive.netbsd.se/?ml=netbsd-tech-userlevel&a=2007-08&t=4934720

>How-To-Repeat:

>Fix:
I've written a patch against the netbsd-4 branch that replaces all TRUE/FALSE 
references to true/false.


Index: prop_array.3
===================================================================
RCS file: /cvsroot/src/common/lib/libprop/prop_array.3,v
retrieving revision 1.4
diff -u -r1.4 prop_array.3
--- prop_array.3        21 Aug 2006 04:13:28 -0000      1.4
+++ prop_array.3        12 Feb 2008 19:55:28 -0000
@@ -146,12 +146,12 @@
 .Fa capacity ,
 including objects already stored in the array.
 Returns
-.Dv TRUE
+.Dv true
 if the capacity of the array is greater or equal to
 .Fa capacity
 or if expansion of the array's capacity was successful
 and
-.Dv FALSE
+.Dv false
 otherwise.
 .It Fn prop_array_iterator "prop_array_t array"
 Create an iterator for the array.
@@ -165,7 +165,7 @@
 immutable.
 .It Fn prop_array_mutable "prop_array_t array"
 Returns
-.Dv TRUE
+.Dv true
 if the array is mutable.
 .It Fn prop_array_get "prop_array_t array" "unsigned int index"
 Return the object stored at the array index
@@ -183,9 +183,9 @@
 If an existing object reference is being replaced, that object will be
 released.
 Returns
-.Dv TRUE
+.Dv true
 if storing the object was successful and
-.Dv FALSE
+.Dv false
 otherwise.
 .It Fn prop_array_add "prop_array_t array" "prop_object_t obj"
 Add a reference to the object
@@ -194,9 +194,9 @@
 necessary.
 The object will be retained by the array.
 Returns
-.Dv TRUE
+.Dv true
 if storing the object was successful and
-.Dv FALSE
+.Dv false
 otherwise.
 .It Fn prop_array_remove "prop_array_t array" "unsigned int index"
 Remove the reference to the object stored at array index
@@ -205,7 +205,7 @@
 the removal.
 .It Fn prop_array_equals "prop_array_t array1" "prop_array_t array2"
 Returns
-.Dv TRUE
+.Dv true
 if the two arrays are equivalent.
 Note: Objects contained in the array are compared by value, not by reference.
 .It Fn prop_array_externalize "prop_array_t array"
@@ -239,7 +239,7 @@
 .Pq see Xr umask 3
 and is written atomically.
 Returns
-.Dv FALSE
+.Dv false
 if externalizing or writing the array fails for any reason.
 .It Fn prop_array_internalize_from_file "const char *path"
 Reads the XML property list contained in the file specified by
Index: prop_data.3
===================================================================
RCS file: /cvsroot/src/common/lib/libprop/prop_data.3,v
retrieving revision 1.2
diff -u -r1.2 prop_data.3
--- prop_data.3 9 Jul 2006 19:04:02 -0000       1.2
+++ prop_data.3 12 Feb 2008 19:55:28 -0000
@@ -105,11 +105,11 @@
 Returns an immutable reference to the contents of the data object.
 .It Fn prop_data_equals "prop_data_t dat1" "prop_data_t dat2"
 Returns
-.Dv TRUE
+.Dv true
 if the two data objects are equivalent.
 .It Fn prop_data_equals_data "prop_data_t data" "const void *blob" "size_t len"
 Returns
-.Dv TRUE
+.Dv true
 if the data object's value is equivalent to
 .Fa blob
 with size
Index: prop_dictionary.3
===================================================================
RCS file: /cvsroot/src/common/lib/libprop/prop_dictionary.3,v
retrieving revision 1.5
diff -u -r1.5 prop_dictionary.3
--- prop_dictionary.3   26 Oct 2006 05:02:12 -0000      1.5
+++ prop_dictionary.3   12 Feb 2008 19:55:29 -0000
@@ -172,12 +172,12 @@
 .Fa capacity ,
 including objects already stored in the dictionary.
 Returns
-.Dv TRUE
+.Dv true
 if the capacity of the dictionary is greater or equal to
 .Fa capacity
 or if the expansion of the dictionary's capacity was successful
 and
-.Dv FALSE
+.Dv false
 otherwise.
 .It Fn prop_dictionary_iterator "prop_dictionary_t dict"
 Create an iterator for the dictionary.
@@ -201,7 +201,7 @@
 immutable.
 .It Fn prop_dictionary_mutable "prop_dictionary_t dict"
 Returns
-.Dv TRUE
+.Dv true
 if the dictionary is mutable.
 .It Fn prop_dictionary_get "prop_dictionary_t dict" "const char *key"
 Return the object stored in the dictionary with the key
@@ -219,9 +219,9 @@
 If the key already exists in the dictionary, the object associated with
 that key will be released and replaced with the new object.
 Returns
-.Dv TRUE
+.Dv true
 if storing the object was successful and
-.Dv FALSE
+.Dv false
 otherwise.
 .It Fn prop_dictionary_remove "prop_dictionary_t dict" "const char *key"
 Remove the reference to the object stored in the dictionary with the key
@@ -257,7 +257,7 @@
 .It Fn prop_dictionary_equals "prop_dictionary_t dict1" \
     "prop_dictionary_t dict2"
 Returns
-.Dv TRUE
+.Dv true
 if the two dictionaries are equivalent.
 Note: Objects contained in the dictionary are compared by value, not by
 reference.
@@ -266,7 +266,7 @@
 .It Fn prop_dictionary_keysym_equals "prop_dictionary_keysym_t keysym1" \
     "prop_dictionary_keysym_t keysym2"
 Returns
-.Dv TRUE
+.Dv true
 if the two dictionary key symbols are equivalent.
 .It Fn prop_dictionary_externalize "prop_dictionary_t dict"
 Externalizes a dictionary, returning a NUL-terminated buffer containing
@@ -300,7 +300,7 @@
 .Pq see Xr umask 3
 and is written atomically.
 Returns
-.Dv FALSE
+.Dv false
 if externalizing or writing the dictionary fails for any reason.
 .It Fn prop_dictionary_internalize_from_file "const char *path"
 Reads the XML property list contained in the file specified by
Index: prop_dictionary_util.3
===================================================================
RCS file: /cvsroot/src/common/lib/libprop/prop_dictionary_util.3,v
retrieving revision 1.1
diff -u -r1.1 prop_dictionary_util.3
--- prop_dictionary_util.3      26 Oct 2006 05:02:12 -0000      1.1
+++ prop_dictionary_util.3      12 Feb 2008 19:55:29 -0000
@@ -169,17 +169,17 @@
 The
 .Nm prop_dictionary_util
 getter functions return
-.Dv TRUE
+.Dv true
 if the object exists in the dictionary and the value is in-range, or
-.Dv FALSE
+.Dv false
 otherwise.
 .Pp
 The
 .Nm prop_dictionary_util
 setter functions return
-.Dv TRUE
+.Dv true
 if creating the object and storing it in the dictionary is successful, or
-.Dv FALSE
+.Dv false
 otherwise.
 .Sh SEE ALSO
 .Xr prop_bool 3 ,
Index: prop_ingest.3
===================================================================
RCS file: /cvsroot/src/common/lib/libprop/prop_ingest.3,v
retrieving revision 1.2
diff -u -r1.2 prop_ingest.3
--- prop_ingest.3       23 Aug 2006 20:50:37 -0000      1.2
+++ prop_ingest.3       12 Feb 2008 19:55:29 -0000
@@ -129,9 +129,9 @@
 .Dv NULL
 if the key does not exist in the dictionary).
 The handler should return
-.Dv FALSE
+.Dv false
 if the value of the object is invalid to indicate failure and
-.Dv TRUE
+.Dv true
 otherwise.
 .Pp
 The ingest context contains several pieces of information that are
@@ -160,7 +160,7 @@
 An object in the dictionary was not the same type specifed in the rules.
 .It Dv PROP_INGEST_ERROR_HANDLER_FAILED
 An object's handler returned
-.Dv FALSE .
+.Dv false .
 .El
 .Pp
 .It Fn prop_ingest_context_type "prop_ingest_context_t ctx"
Index: prop_number.3
===================================================================
RCS file: /cvsroot/src/common/lib/libprop/prop_number.3,v
retrieving revision 1.5
diff -u -r1.5 prop_number.3
--- prop_number.3       14 Oct 2006 07:30:16 -0000      1.5
+++ prop_number.3       12 Feb 2008 19:55:29 -0000
@@ -141,7 +141,7 @@
 hold the value of the object.
 .It Fn prop_number_unsigned "prop_number_t number"
 Returns
-.Dv TRUE
+.Dv true
 if the numeric value object has an unsigned value.
 .It Fn prop_number_integer_value "prop_number_t number"
 Returns the signed integer value of the numeric value object.
@@ -149,17 +149,17 @@
 Returns the unsigned integer value of the numeric value object.
 .It Fn prop_number_equals "prop_number_t num1" "prop_number_t num2"
 Returns
-.Dv TRUE
+.Dv true
 if the two numeric value objects are equivalent.
 .It Fn prop_number_equals_integer "prop_number_t number" "int64_t val"
 Returns
-.Dv TRUE
+.Dv true
 if the object's value is equivalent to the signed value
 .Fa val .
 .It Fn prop_number_equals_unsigned_integer "prop_number_t number" \
     "uint64_t val"
 Returns
-.Dv TRUE
+.Dv true
 if the object's value is equivalent to the unsigned value
 .Fa val .
 .El
Index: prop_object.3
===================================================================
RCS file: /cvsroot/src/common/lib/libprop/prop_object.3,v
retrieving revision 1.5
diff -u -r1.5 prop_object.3
--- prop_object.3       23 Aug 2006 20:46:22 -0000      1.5
+++ prop_object.3       12 Feb 2008 19:55:30 -0000
@@ -114,7 +114,7 @@
 is returned.
 .It Fn prop_object_equals "prop_object_t obj1" "prop_object_t obj2"
 Returns
-.Dv TRUE
+.Dv true
 if the two objects are of the same type and are equivalent.
 .It Fn prop_object_iterator_next "prop_object_iterator_t iter"
 Return the next object in the collection
Index: prop_string.3
===================================================================
RCS file: /cvsroot/src/common/lib/libprop/prop_string.3,v
retrieving revision 1.3
diff -u -r1.3 prop_string.3
--- prop_string.3       27 Sep 2006 19:24:28 -0000      1.3
+++ prop_string.3       12 Feb 2008 19:55:30 -0000
@@ -107,7 +107,7 @@
 Returns the size of the string, not including the terminating NUL.
 .It Fn prop_string_mutable "prop_string_t string"
 Returns
-.Dv TRUE
+.Dv true
 if the string is mutable.
 .It Fn prop_string_cstring "prop_string_t string"
 Returns a copy of the string's contents as a C string.
@@ -129,9 +129,9 @@
 .Fa str1 ,
 which must be mutable.
 Returns
-.Dv TRUE
+.Dv true
 upon success and
-.Dv FALSE
+.Dv false
 otherwise.
 .It Fn prop_string_append_cstring "prop_string_t string" "const char *cstring"
 Append the C string
@@ -140,17 +140,17 @@
 .Fa string ,
 which must be mutable.
 Returns
-.Dv TRUE
+.Dv true
 upon success and
-.Dv FALSE
+.Dv false
 otherwise.
 .It Fn prop_string_equals "prop_string_t str1" "prop_string_t str2"
 Returns
-.Dv TRUE
+.Dv true
 if the two string objects are equivalent.
 .It Fn prop_string_equals_cstring "prop_string_t string" "const char *cstring"
 Returns
-.Dv TRUE
+.Dv true
 if the string's value is equivalent to
 .Fa cstring .
 .El



Home | Main Index | Thread Index | Old Index