NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/38013
The following reply was made to PR lib/38013; it has been noted by GNATS.
From: "Stathis Kamperis" <ekamperi%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: lib/38013
Date: Fri, 15 Feb 2008 20:41:03 +0200
It seems that not only the return values but the function prototypes
need to change also (in the man pages). I attach a new patch, that
hopefully fixes all issues.
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 15 Feb 2008 18:27:08 -0000
@@ -78,7 +78,7 @@
.Fn prop_array_capacity "prop_array_t array"
.Ft unsigned int
.Fn prop_array_count "prop_array_t array"
-.Ft boolean_t
+.Ft bool
.Fn prop_array_ensure_capacity "prop_array_t array" "unsigned int capacity"
.\"
.Ft prop_object_iterator_t
@@ -86,14 +86,14 @@
.\"
.Ft void
.Fn prop_array_make_immutable "prop_array_t array"
-.Ft boolean_t
+.Ft bool
.Fn prop_array_mutable "prop_array_t array"
.\"
.Ft prop_object_t
.Fn prop_array_get "prop_array_t array" "unsigned int index"
-.Ft boolean_t
+.Ft bool
.Fn prop_array_set "prop_array_t array" "unsigned int index"
"prop_object_t obj"
-.Ft boolean_t
+.Ft bool
.Fn prop_array_add "prop_array_t array" "prop_object_t obj"
.Ft void
.Fn prop_array_remove "prop_array_t array" "unsigned int index"
@@ -103,12 +103,12 @@
.Ft prop_array_t
.Fn prop_array_internalize "const char *xml"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_array_externalize_to_file "prop_array_t array" "const char *path"
.Ft prop_array_t
.Fn prop_array_internalize_from_file "const char *path"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_array_equals "prop_array_t array1" "prop_array_t array2"
.Sh DESCRIPTION
The
@@ -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_bool.3
===================================================================
RCS file: /cvsroot/src/common/lib/libprop/prop_bool.3,v
retrieving revision 1.2
diff -u -r1.2 prop_bool.3
--- prop_bool.3 9 Jul 2006 19:04:02 -0000 1.2
+++ prop_bool.3 15 Feb 2008 18:27:08 -0000
@@ -49,18 +49,18 @@
.In prop/proplib.h
.\"
.Ft prop_bool_t
-.Fn prop_bool_create "boolean_t val"
+.Fn prop_bool_create "bool val"
.Ft prop_bool_t
.Fn prop_booly_copy "prop_bool_t bool"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_bool_true "prop_bool_t bool"
.Sh DESCRIPTION
The
.Nm prop_bool
family of functions operate on a boolean value property object type.
.Bl -tag -width "xxxxx"
-.It Fn prop_bool_create "boolean_t val"
+.It Fn prop_bool_create "bool val"
Create a boolean value object with the value
.Fa val .
.It Fn prop_bool_copy "prop_bool_t bool"
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 15 Feb 2008 18:27:08 -0000
@@ -66,9 +66,9 @@
.Ft const void *
.Fn prop_data_data_nocopy "prop_data_t data"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_data_equals "prop_data_t dat1" "prop_data_t dat2"
-.Ft boolean_t
+.Ft bool
.Fn prop_data_equals_data "prop_data_t data" "const void *blob" "size_t len"
.Sh DESCRIPTION
The
@@ -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 15 Feb 2008 18:27:09 -0000
@@ -83,7 +83,7 @@
.Fn prop_dictionary_capacity "prop_dictionary_t dict"
.Ft unsigned int
.Fn prop_dictionary_count "prop_dictionary_t dict"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_ensure_capacity "prop_dictionary_t dict" \
"unsigned int capacity"
.\"
@@ -94,12 +94,12 @@
.\"
.Ft void
.Fn prop_dictionary_make_immutable "prop_dictionary_t dict"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_mutable "prop_dictionary_t dict"
.\"
.Ft prop_object_t
.Fn prop_dictionary_get "prop_dictionary_t dict" "const char *key"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_set "prop_dictionary_t dict" "const char *key" \
"prop_object_t obj"
.Ft void
@@ -108,20 +108,20 @@
.Ft prop_object_t
.Fn prop_dictionary_get_keysym "prop_dictionary_t dict" \
"prop_dictionary_keysym_t keysym"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_set_keysym "prop_dictionary_t dict" \
"prop_dictionary_keysym_t keysym" "prop_object_t obj"
.Ft void
.Fn prop_dictionary_remove_keysym "prop_dictionary_t dict" \
"prop_dictionary_keysym_t keysym"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_equals "prop_dictionary_t dict1" "prop_dictionary_t dict2"
.\"
.Ft const char *
.Fn prop_dictionary_keysym_cstring_nocopy "prop_dictionary_keysym_t sym"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_keysym_equals "prop_dictionary_keysym_t keysym1" \
"prop_dictionary_keysym_t keysym2"
.\"
@@ -130,7 +130,7 @@
.Ft prop_dictionary_t
.Fn prop_dictionary_internalize "const char *xml"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_externalize_to_file "prop_dictionary_t dict" \
"const char *path"
.Ft prop_dictionary_t
@@ -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 15 Feb 2008 18:27:09 -0000
@@ -66,76 +66,76 @@
.Sh SYNOPSIS
.In prop/proplib.h
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_get_bool "prop_dictionary_t dict" "cosnt char *key" \
- "boolean_t *valp"
-.Ft boolean_t
+ "bool *valp"
+.Ft bool
.Fn prop_dictionary_set_bool "prop_dictionary_t dict" "const char *key" \
- "boolean_t val"
+ "bool val"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_get_int8 "prop_dictionary_t dict" "const char *key" \
"int8_t *valp"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_get_uint8 "prop_dictionary_t dict" "const char *key" \
"uint8_t *valp"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_set_int8 "prop_dictionary_t dict" "const char *key" \
"int8_t val"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_set_uint8 "prop_dictionary_t dict" "const char *key" \
"uint8_t val"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_get_int16 "prop_dictionary_t dict" "const char *key" \
"int16_t *valp"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_get_uint16 "prop_dictionary_t dict" "const char *key" \
"uint16_t *valp"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_set_int16 "prop_dictionary_t dict" "const char *key" \
"int16_t val"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_set_uint16 "prop_dictionary_t dict" "const char *key" \
"uint16_t val"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_get_int32 "prop_dictionary_t dict" "const char *key" \
"int32_t *valp"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_get_uint32 "prop_dictionary_t dict" "const char *key" \
"uint32_t *valp"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_set_int32 "prop_dictionary_t dict" "const char *key" \
"int32_t val"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_set_uint32 "prop_dictionary_t dict" "const char *key" \
"uint32_t val"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_get_int64 "prop_dictionary_t dict" "const char *key" \
"int64_t *valp"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_get_uint64 "prop_dictionary_t dict" "const char *key" \
"uint64_t *valp"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_set_int64 "prop_dictionary_t dict" "const char *key" \
"int64_t val"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_set_uint64 "prop_dictionary_t dict" "const char *key" \
"uint64_t val"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_get_cstring "prop_dictionary_t dict" "const char *key" \
"char **strp"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_set_cstring "prop_dictionary_t dict" "const char *key" \
"const char *str"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_get_cstring_nocopy "prop_dictionary_t dict" \
"const char *key" "const char **strp"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_set_cstring_nocopy "prop_dictionary_t dict" \
"const char *key" "const char *strp"
.Sh DESCRIPTION
@@ -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 15 Feb 2008 18:27:09 -0000
@@ -60,12 +60,12 @@
.Fn prop_ingest_context_key "prop_ingest_context_t ctx"
.Ft void *
.Fn prop_ingest_context_private "prop_ingest_context_t ctx"
-.Ft boolean_t
+.Ft bool
.Fn prop_dictionary_ingest "prop_dictionary_t dict" \
"const prop_ingest_table_entry rules[]" \
"prop_ingest_context_t ctx"
.Pp
-.Ft typedef boolean_t
+.Ft typedef bool
.Fn (*prop_ingest_handler_t) "prop_ingest_context_t" "prop_object_t"
.Sh DESCRIPTION
The
@@ -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 15 Feb 2008 18:27:10 -0000
@@ -64,18 +64,18 @@
.\"
.Ft int
.Fn prop_number_size "prop_number_t number"
-.Ft boolean_t
+.Ft bool
.Fn prop_number_unsigned "prop_number_t number"
.Ft int64_t
.Fn prop_number_integer_value "prop_number_t number"
.Ft uint64_t
.Fn prop_number_unsigned_integer_value "prop_number_t number"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_number_equals "prop_number_t num1" "prop_number_t num2"
-.Ft boolean_t
+.Ft bool
.Fn prop_number_equals_integer "prop_number_t number" "int64_t val"
-.Ft boolean_t
+.Ft bool
.Fn prop_number_equals_unsigned_integer "prop_number_t number" "uint64_t val"
.Sh DESCRIPTION
The
@@ -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 15 Feb 2008 18:27:10 -0000
@@ -59,7 +59,7 @@
.\"
.Ft prop_type_t
.Fn prop_object_type "prop_object_t obj"
-.Ft boolean_t
+.Ft bool
.Fn prop_object_equals "prop_object_t obj1" "prop_object_t obj2"
.\"
.Ft prop_object_t
@@ -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 15 Feb 2008 18:27:10 -0000
@@ -75,14 +75,14 @@
.Ft const char *
.Fn prop_string_cstring_nocopy "prop_string_t string"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_string_append "prop_string_t str1" "prop_string_t str2"
-.Ft boolean_t
+.Ft bool
.Fn prop_string_append_cstring "prop_string_t string" "const char *cstring"
.\"
-.Ft boolean_t
+.Ft bool
.Fn prop_string_equals "prop_string_t str1" "prop_string_t str2"
-.Ft boolean_t
+.Ft bool
.Fn prop_string_equals_cstring "prop_string_t string" "const char *cstring"
.Sh DESCRIPTION
The
@@ -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