Thu Jan 20 10:44:42 2011 UTC ()
New sentence, new line. Use Dq.


(wiz)
diff -r1.9 -r1.10 src/common/lib/libprop/prop_number.3
diff -r1.7 -r1.8 src/common/lib/libprop/prop_object.3
diff -r1.5 -r1.6 src/common/lib/libprop/prop_send_ioctl.3

cvs diff -r1.9 -r1.10 src/common/lib/libprop/prop_number.3 (switch to unified diff)

--- src/common/lib/libprop/prop_number.3 2008/04/30 13:10:46 1.9
+++ src/common/lib/libprop/prop_number.3 2011/01/20 10:44:42 1.10
@@ -1,204 +1,210 @@ @@ -1,204 +1,210 @@
1.\" $NetBSD: prop_number.3,v 1.9 2008/04/30 13:10:46 martin Exp $ 1.\" $NetBSD: prop_number.3,v 1.10 2011/01/20 10:44:42 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 2006 The NetBSD Foundation, Inc. 3.\" Copyright (c) 2006 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Jason R. Thorpe. 7.\" by Jason R. Thorpe.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\" notice, this list of conditions and the following disclaimer in the 15.\" notice, this list of conditions and the following disclaimer in the
16.\" documentation and/or other materials provided with the distribution. 16.\" documentation and/or other materials provided with the distribution.
17.\" 17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE. 28.\" POSSIBILITY OF SUCH DAMAGE.
29.\" 29.\"
30.Dd January 21, 2008 30.Dd January 21, 2008
31.Dt PROP_NUMBER 3 31.Dt PROP_NUMBER 3
32.Os 32.Os
33.Sh NAME 33.Sh NAME
34.Nm prop_number , 34.Nm prop_number ,
35.Nm prop_number_create_integer , 35.Nm prop_number_create_integer ,
36.Nm prop_number_create_unsigned_integer , 36.Nm prop_number_create_unsigned_integer ,
37.Nm prop_number_copy , 37.Nm prop_number_copy ,
38.Nm prop_number_size , 38.Nm prop_number_size ,
39.Nm prop_number_unsigned , 39.Nm prop_number_unsigned ,
40.Nm prop_number_integer_value , 40.Nm prop_number_integer_value ,
41.Nm prop_number_unsigned_integer_value , 41.Nm prop_number_unsigned_integer_value ,
42.Nm prop_number_equals , 42.Nm prop_number_equals ,
43.Nm prop_number_equals_integer , 43.Nm prop_number_equals_integer ,
44.Nm prop_number_equals_unsigned_integer 44.Nm prop_number_equals_unsigned_integer
45.Nd numeric value property object 45.Nd numeric value property object
46.Sh LIBRARY 46.Sh LIBRARY
47.Lb libprop 47.Lb libprop
48.Sh SYNOPSIS 48.Sh SYNOPSIS
49.In prop/proplib.h 49.In prop/proplib.h
50.\" 50.\"
51.Ft prop_number_t 51.Ft prop_number_t
52.Fn prop_number_create_integer "int64_t val" 52.Fn prop_number_create_integer "int64_t val"
53.Ft prop_number_t 53.Ft prop_number_t
54.Fn prop_number_create_unsigned_integer "uint64_t val" 54.Fn prop_number_create_unsigned_integer "uint64_t val"
55.Ft prop_number_t 55.Ft prop_number_t
56.Fn prop_number_copy "prop_number_t number" 56.Fn prop_number_copy "prop_number_t number"
57.\" 57.\"
58.Ft int 58.Ft int
59.Fn prop_number_size "prop_number_t number" 59.Fn prop_number_size "prop_number_t number"
60.Ft bool 60.Ft bool
61.Fn prop_number_unsigned "prop_number_t number" 61.Fn prop_number_unsigned "prop_number_t number"
62.Ft int64_t 62.Ft int64_t
63.Fn prop_number_integer_value "prop_number_t number" 63.Fn prop_number_integer_value "prop_number_t number"
64.Ft uint64_t 64.Ft uint64_t
65.Fn prop_number_unsigned_integer_value "prop_number_t number" 65.Fn prop_number_unsigned_integer_value "prop_number_t number"
66.\" 66.\"
67.Ft bool 67.Ft bool
68.Fn prop_number_equals "prop_number_t num1" "prop_number_t num2" 68.Fn prop_number_equals "prop_number_t num1" "prop_number_t num2"
69.Ft bool 69.Ft bool
70.Fn prop_number_equals_integer "prop_number_t number" "int64_t val" 70.Fn prop_number_equals_integer "prop_number_t number" "int64_t val"
71.Ft bool 71.Ft bool
72.Fn prop_number_equals_unsigned_integer "prop_number_t number" "uint64_t val" 72.Fn prop_number_equals_unsigned_integer "prop_number_t number" "uint64_t val"
73.Sh DESCRIPTION 73.Sh DESCRIPTION
74The 74The
75.Nm prop_number 75.Nm prop_number
76family of functions operate on a numeric value property object type. 76family of functions operate on a numeric value property object type.
77Values are either signed or unsigned, and promoted to a 64-bit type 77Values are either signed or unsigned, and promoted to a 64-bit type
78.Pq int64_t or uint64_t , respectively . 78.Pq int64_t or uint64_t , respectively .
79.Pp 79.Pp
80It is possible to compare number objects that differ in sign. 80It is possible to compare number objects that differ in sign.
81Such comparisons first test to see if each object is within the valid 81Such comparisons first test to see if each object is within the valid
82number range of the other: 82number range of the other:
83.Bl -bullet 83.Bl -bullet
84.It 84.It
85Signed numbers that are greater than or equal to 0 can be compared to 85Signed numbers that are greater than or equal to 0 can be compared to
86unsigned numbers. 86unsigned numbers.
87.It 87.It
88Unsigned numbers that are less than or equal to the largest signed 64-bit 88Unsigned numbers that are less than or equal to the largest signed 64-bit
89value 89value
90.Pq Dv INT64_MAX 90.Pq Dv INT64_MAX
91can be compared to signed numbers. 91can be compared to signed numbers.
92.El 92.El
93.Pp 93.Pp
94Number objects have a different externalized representation depending 94Number objects have a different externalized representation depending
95on their sign: 95on their sign:
96.Bl -bullet 96.Bl -bullet
97.It 97.It
98Signed numbers are externalized in base-10 98Signed numbers are externalized in base-10
99.Pq decimal . 99.Pq decimal .
100.It 100.It
101Unsigned numbers are externalized in base-16 101Unsigned numbers are externalized in base-16
102.Pq hexadecimal . 102.Pq hexadecimal .
103.El 103.El
104.Pp 104.Pp
105When numbers are internalized, the sign of the resulting number object 105When numbers are internalized, the sign of the resulting number object
106.Pq and thus its valid range 106.Pq and thus its valid range
107is determined by a set of rules evaluated in the following order: 107is determined by a set of rules evaluated in the following order:
108.Bl -bullet 108.Bl -bullet
109.It 109.It
110If the first character of the number is a 110If the first character of the number is a
111.Sq - 111.Sq -
112then the number is signed. 112then the number is signed.
113.It 113.It
114If the first two characters of the number are 114If the first two characters of the number are
115.Sq 0x 115.Sq 0x
116then the number is unsigned. 116then the number is unsigned.
117.It 117.It
118If the number value fits into the range of a signed number then the 118If the number value fits into the range of a signed number then the
119number is signed. 119number is signed.
120.It 120.It
121In all other cases, the number is unsigned. 121In all other cases, the number is unsigned.
122.El 122.El
123.Bl -tag -width "xxxxx" 123.Bl -tag -width "xxxxx"
124.It Fn prop_number_create_integer "int64_t val" 124.It Fn prop_number_create_integer "int64_t val"
125Create a numeric value object with the signed value 125Create a numeric value object with the signed value
126.Fa val . 126.Fa val .
127Returns 127Returns
128.Dv NULL 128.Dv NULL
129on failure. 129on failure.
130.It Fn prop_number_create_unsigned_integer "uint64_t val" 130.It Fn prop_number_create_unsigned_integer "uint64_t val"
131Create a numeric value object with the unsigned value 131Create a numeric value object with the unsigned value
132.Fa val . 132.Fa val .
133Returns 133Returns
134.Dv NULL 134.Dv NULL
135on failure. 135on failure.
136.It Fn prop_number_copy "prop_number_t number" 136.It Fn prop_number_copy "prop_number_t number"
137Copy a numeric value object. 137Copy a numeric value object.
138If the supplied object isn't a numeric value, 138If the supplied object isn't a numeric value,
139.Dv NULL 139.Dv NULL
140is returned. 140is returned.
141.It Fn prop_number_size "prop_number_t number" 141.It Fn prop_number_size "prop_number_t number"
142Returns 8, 16, 32, or 64, representing the number of bits required to 142Returns 8, 16, 32, or 64, representing the number of bits required to
143hold the value of the object. 143hold the value of the object.
144If the supplied object isn't a numeric value, 144If the supplied object isn't a numeric value,
145.Dv NULL 145.Dv NULL
146is returned. 146is returned.
147.It Fn prop_number_unsigned "prop_number_t number" 147.It Fn prop_number_unsigned "prop_number_t number"
148Returns 148Returns
149.Dv true 149.Dv true
150if the numeric value object has an unsigned value. 150if the numeric value object has an unsigned value.
151.It Fn prop_number_integer_value "prop_number_t number" 151.It Fn prop_number_integer_value "prop_number_t number"
152Returns the signed integer value of the numeric value object. 152Returns the signed integer value of the numeric value object.
153If the supplied object isn't a numeric value, zero is returned. Thus, 153If the supplied object isn't a numeric value, zero is returned.
154it is not possible to distinguish between ``not a prop_number_t'' 154Thus,
155and ``prop_number_t has a value of 0''. 155it is not possible to distinguish between
 156.Dq not a prop_number_t
 157and
 158.Dq prop_number_t has a value of 0 .
156.It Fn prop_number_unsigned_integer_value "prop_number_t number" 159.It Fn prop_number_unsigned_integer_value "prop_number_t number"
157Returns the unsigned integer value of the numeric value object. 160Returns the unsigned integer value of the numeric value object.
158If the supplied object isn't a numeric value, zero is returned. Thus, 161If the supplied object isn't a numeric value, zero is returned.
159it is not possible to distinguish between ``not a prop_number_t'' 162Thus,
160and ``prop_number_t has a value of 0''. 163it is not possible to distinguish between
 164.Dq not a prop_number_t
 165and
 166.Dq prop_number_t has a value of 0 .
161.It Fn prop_number_equals "prop_number_t num1" "prop_number_t num2" 167.It Fn prop_number_equals "prop_number_t num1" "prop_number_t num2"
162Returns 168Returns
163.Dv true 169.Dv true
164if the two numeric value objects are equivalent. 170if the two numeric value objects are equivalent.
165If at least one of the supplied objects isn't a numeric value, 171If at least one of the supplied objects isn't a numeric value,
166.Dv false 172.Dv false
167is returned. 173is returned.
168.It Fn prop_number_equals_integer "prop_number_t number" "int64_t val" 174.It Fn prop_number_equals_integer "prop_number_t number" "int64_t val"
169Returns 175Returns
170.Dv true 176.Dv true
171if the object's value is equivalent to the signed value 177if the object's value is equivalent to the signed value
172.Fa val . 178.Fa val .
173If the supplied object isn't a numerical value or if 179If the supplied object isn't a numerical value or if
174.Fa val 180.Fa val
175exceeds 181exceeds
176.Dv INT64_MAX , 182.Dv INT64_MAX ,
177.Dv false 183.Dv false
178is returned. 184is returned.
179.It Fn prop_number_equals_unsigned_integer "prop_number_t number" \ 185.It Fn prop_number_equals_unsigned_integer "prop_number_t number" \
180 "uint64_t val" 186 "uint64_t val"
181Returns 187Returns
182.Dv true 188.Dv true
183if the object's value is equivalent to the unsigned value 189if the object's value is equivalent to the unsigned value
184.Fa val . 190.Fa val .
185If the supplied object isn't a numerical value or if 191If the supplied object isn't a numerical value or if
186.Fa val 192.Fa val
187exceeds 193exceeds
188.Dv INT64_MAX , 194.Dv INT64_MAX ,
189.Dv false 195.Dv false
190is returned. 196is returned.
191.El 197.El
192.Sh SEE ALSO 198.Sh SEE ALSO
193.Xr prop_array 3 , 199.Xr prop_array 3 ,
194.Xr prop_bool 3 , 200.Xr prop_bool 3 ,
195.Xr prop_data 3 , 201.Xr prop_data 3 ,
196.Xr prop_dictionary 3 , 202.Xr prop_dictionary 3 ,
197.Xr prop_object 3 , 203.Xr prop_object 3 ,
198.Xr prop_string 3 , 204.Xr prop_string 3 ,
199.Xr proplib 3 205.Xr proplib 3
200.Sh HISTORY 206.Sh HISTORY
201The 207The
202.Nm proplib 208.Nm proplib
203property container object library first appeared in 209property container object library first appeared in
204.Nx 4.0 . 210.Nx 4.0 .

cvs diff -r1.7 -r1.8 src/common/lib/libprop/prop_object.3 (switch to unified diff)

--- src/common/lib/libprop/prop_object.3 2008/04/30 13:10:46 1.7
+++ src/common/lib/libprop/prop_object.3 2011/01/20 10:44:42 1.8
@@ -1,140 +1,141 @@ @@ -1,140 +1,141 @@
1.\" $NetBSD: prop_object.3,v 1.7 2008/04/30 13:10:46 martin Exp $ 1.\" $NetBSD: prop_object.3,v 1.8 2011/01/20 10:44:42 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 2006 The NetBSD Foundation, Inc. 3.\" Copyright (c) 2006 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Jason R. Thorpe. 7.\" by Jason R. Thorpe.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\" notice, this list of conditions and the following disclaimer in the 15.\" notice, this list of conditions and the following disclaimer in the
16.\" documentation and/or other materials provided with the distribution. 16.\" documentation and/or other materials provided with the distribution.
17.\" 17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE. 28.\" POSSIBILITY OF SUCH DAMAGE.
29.\" 29.\"
30.Dd August 21, 2006 30.Dd August 21, 2006
31.Dt PROP_OBJECT 3 31.Dt PROP_OBJECT 3
32.Os 32.Os
33.Sh NAME 33.Sh NAME
34.Nm prop_object , 34.Nm prop_object ,
35.Nm prop_object_retain , 35.Nm prop_object_retain ,
36.Nm prop_object_release , 36.Nm prop_object_release ,
37.Nm prop_object_type , 37.Nm prop_object_type ,
38.Nm prop_object_equals , 38.Nm prop_object_equals ,
39.Nm prop_object_iterator_next , 39.Nm prop_object_iterator_next ,
40.Nm prop_object_iterator_reset , 40.Nm prop_object_iterator_reset ,
41.Nm prop_object_iterator_release 41.Nm prop_object_iterator_release
42.Nd general property container object functions 42.Nd general property container object functions
43.Sh LIBRARY 43.Sh LIBRARY
44.Lb libprop 44.Lb libprop
45.Sh SYNOPSIS 45.Sh SYNOPSIS
46.In prop/proplib.h 46.In prop/proplib.h
47.\" 47.\"
48.Ft void 48.Ft void
49.Fn prop_object_retain "prop_object_t obj" 49.Fn prop_object_retain "prop_object_t obj"
50.Ft void 50.Ft void
51.Fn prop_object_release "prop_object_t obj" 51.Fn prop_object_release "prop_object_t obj"
52.\" 52.\"
53.Ft prop_type_t 53.Ft prop_type_t
54.Fn prop_object_type "prop_object_t obj" 54.Fn prop_object_type "prop_object_t obj"
55.Ft bool 55.Ft bool
56.Fn prop_object_equals "prop_object_t obj1" "prop_object_t obj2" 56.Fn prop_object_equals "prop_object_t obj1" "prop_object_t obj2"
57.\" 57.\"
58.Ft prop_object_t 58.Ft prop_object_t
59.Fn prop_object_iterator_next "prop_object_iterator_t iter" 59.Fn prop_object_iterator_next "prop_object_iterator_t iter"
60.Ft void 60.Ft void
61.Fn prop_object_iterator_reset "prop_object_iterator_t iter" 61.Fn prop_object_iterator_reset "prop_object_iterator_t iter"
62.Ft void 62.Ft void
63.Fn prop_object_iterator_release "prop_object_iterator_t iter" 63.Fn prop_object_iterator_release "prop_object_iterator_t iter"
64.Sh DESCRIPTION 64.Sh DESCRIPTION
65The 65The
66.Nm prop_object 66.Nm prop_object
67family of functions operate on all property container object types. 67family of functions operate on all property container object types.
68.Bl -tag -width "" 68.Bl -tag -width ""
69.It Fn prop_object_retain "prop_object_t obj" 69.It Fn prop_object_retain "prop_object_t obj"
70Increment the reference count on an object. 70Increment the reference count on an object.
71.It Fn prop_object_release "prop_object_t obj" 71.It Fn prop_object_release "prop_object_t obj"
72Decrement the reference count on an object. 72Decrement the reference count on an object.
73If the last reference is dropped, the object is freed. 73If the last reference is dropped, the object is freed.
74.It Fn prop_object_type "prop_object_t obj" 74.It Fn prop_object_type "prop_object_t obj"
75Determine the type of the object. Objects are one of the following types: 75Determine the type of the object.
 76Objects are one of the following types:
76.Pp 77.Pp
77.Bl -tag -width "PROP_TYPE_DICT_KEYSYM" -compact 78.Bl -tag -width "PROP_TYPE_DICT_KEYSYM" -compact
78.It Dv PROP_TYPE_BOOL 79.It Dv PROP_TYPE_BOOL
79Boolean value 80Boolean value
80.Pq prop_bool_t 81.Pq prop_bool_t
81.It Dv PROP_TYPE_NUMBER 82.It Dv PROP_TYPE_NUMBER
82Number 83Number
83.Pq prop_number_t 84.Pq prop_number_t
84.It Dv PROP_TYPE_STRING 85.It Dv PROP_TYPE_STRING
85String 86String
86.Pq prop_string_t 87.Pq prop_string_t
87.It Dv PROP_TYPE_DATA 88.It Dv PROP_TYPE_DATA
88Opaque data 89Opaque data
89.Pq prop_data_t 90.Pq prop_data_t
90.It Dv PROP_TYPE_ARRAY 91.It Dv PROP_TYPE_ARRAY
91Array 92Array
92.Pq prop_array_t 93.Pq prop_array_t
93.It Dv PROP_TYPE_DICTIONARY 94.It Dv PROP_TYPE_DICTIONARY
94Dictionary 95Dictionary
95.Pq prop_dictionary_t 96.Pq prop_dictionary_t
96.It Dv PROP_TYPE_DICT_KEYSYM 97.It Dv PROP_TYPE_DICT_KEYSYM
97Dictionary key symbol 98Dictionary key symbol
98.Pq prop_dictionary_keysym_t 99.Pq prop_dictionary_keysym_t
99.El 100.El
100.Pp 101.Pp
101If 102If
102.Fa obj 103.Fa obj
103is 104is
104.Dv NULL , 105.Dv NULL ,
105then 106then
106.Dv PROP_TYPE_UNKNOWN 107.Dv PROP_TYPE_UNKNOWN
107is returned. 108is returned.
108.It Fn prop_object_equals "prop_object_t obj1" "prop_object_t obj2" 109.It Fn prop_object_equals "prop_object_t obj1" "prop_object_t obj2"
109Returns 110Returns
110.Dv true 111.Dv true
111if the two objects are of the same type and are equivalent. 112if the two objects are of the same type and are equivalent.
112.It Fn prop_object_iterator_next "prop_object_iterator_t iter" 113.It Fn prop_object_iterator_next "prop_object_iterator_t iter"
113Return the next object in the collection 114Return the next object in the collection
114.Pq array or dictionary 115.Pq array or dictionary
115being iterated by the iterator 116being iterated by the iterator
116.Fa iter . 117.Fa iter .
117If there are no more objects in the collection, 118If there are no more objects in the collection,
118.Dv NULL 119.Dv NULL
119is returned. 120is returned.
120.It Fn prop_object_iterator_reset "prop_object_iterator_t iter" 121.It Fn prop_object_iterator_reset "prop_object_iterator_t iter"
121Reset the iterator to the first object in the collection being iterated 122Reset the iterator to the first object in the collection being iterated
122by the iterator 123by the iterator
123.Fa iter . 124.Fa iter .
124.It Fn prop_object_iterator_release "prop_object_iterator_t iter" 125.It Fn prop_object_iterator_release "prop_object_iterator_t iter"
125Release the iterator 126Release the iterator
126.Fa iter . 127.Fa iter .
127.El 128.El
128.Sh SEE ALSO 129.Sh SEE ALSO
129.Xr prop_array 3 , 130.Xr prop_array 3 ,
130.Xr prop_bool 3 , 131.Xr prop_bool 3 ,
131.Xr prop_data 3 , 132.Xr prop_data 3 ,
132.Xr prop_dictionary 3 , 133.Xr prop_dictionary 3 ,
133.Xr prop_number 3 , 134.Xr prop_number 3 ,
134.Xr prop_string 3 , 135.Xr prop_string 3 ,
135.Xr proplib 3 136.Xr proplib 3
136.Sh HISTORY 137.Sh HISTORY
137The 138The
138.Nm proplib 139.Nm proplib
139property container object library first appeared in 140property container object library first appeared in
140.Nx 4.0 . 141.Nx 4.0 .

cvs diff -r1.5 -r1.6 src/common/lib/libprop/prop_send_ioctl.3 (switch to unified diff)

--- src/common/lib/libprop/prop_send_ioctl.3 2008/04/30 13:10:46 1.5
+++ src/common/lib/libprop/prop_send_ioctl.3 2011/01/20 10:44:42 1.6
@@ -1,149 +1,150 @@ @@ -1,149 +1,150 @@
1.\" $NetBSD: prop_send_ioctl.3,v 1.5 2008/04/30 13:10:46 martin Exp $ 1.\" $NetBSD: prop_send_ioctl.3,v 1.6 2011/01/20 10:44:42 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 2006 The NetBSD Foundation, Inc. 3.\" Copyright (c) 2006 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Jason R. Thorpe. 7.\" by Jason R. Thorpe.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\" notice, this list of conditions and the following disclaimer in the 15.\" notice, this list of conditions and the following disclaimer in the
16.\" documentation and/or other materials provided with the distribution. 16.\" documentation and/or other materials provided with the distribution.
17.\" 17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE. 28.\" POSSIBILITY OF SUCH DAMAGE.
29.\" 29.\"
30.Dd January 21, 2008 30.Dd January 21, 2008
31.Dt PROP_SEND_IOCTL 3 31.Dt PROP_SEND_IOCTL 3
32.Os 32.Os
33.Sh NAME 33.Sh NAME
34.Nm prop_array_send_ioctl , 34.Nm prop_array_send_ioctl ,
35.Nm prop_array_recv_ioctl , 35.Nm prop_array_recv_ioctl ,
36.Nm prop_dictionary_send_ioctl , 36.Nm prop_dictionary_send_ioctl ,
37.Nm prop_dictionary_recv_ioctl , 37.Nm prop_dictionary_recv_ioctl ,
38.Nm prop_dictionary_sendrecv_ioctl 38.Nm prop_dictionary_sendrecv_ioctl
39.Nd Send and receive propertly lists to and from the kernel using ioctl 39.Nd Send and receive propertly lists to and from the kernel using ioctl
40.Sh SYNOPSIS 40.Sh SYNOPSIS
41.In prop/proplib.h 41.In prop/proplib.h
42.Ft int 42.Ft int
43.Fn prop_array_send_ioctl "prop_array_t array" "int fd" "unsigned long cmd" 43.Fn prop_array_send_ioctl "prop_array_t array" "int fd" "unsigned long cmd"
44.Ft int 44.Ft int
45.Fn prop_array_recv_ioctl "int fd" "unsigned long cmd" "prop_array_t *arrayp" 45.Fn prop_array_recv_ioctl "int fd" "unsigned long cmd" "prop_array_t *arrayp"
46.Ft int 46.Ft int
47.Fn prop_dictionary_send_ioctl "prop_dictionary_t dict" "int fd" \ 47.Fn prop_dictionary_send_ioctl "prop_dictionary_t dict" "int fd" \
48 "unsigned long cmd" 48 "unsigned long cmd"
49.Ft int 49.Ft int
50.Fn prop_dictionary_recv_ioctl "int fd" "unsigned long cmd" \ 50.Fn prop_dictionary_recv_ioctl "int fd" "unsigned long cmd" \
51 "prop_dictionary_t *dictp" 51 "prop_dictionary_t *dictp"
52.Fn prop_dictionary_sendrecv_ioctl "prop_dictionary_t dict" "int fd" \ 52.Fn prop_dictionary_sendrecv_ioctl "prop_dictionary_t dict" "int fd" \
53 "unsigned long cmd" "prop_dictionary_t *dictp" 53 "unsigned long cmd" "prop_dictionary_t *dictp"
54.Sh DESCRIPTION 54.Sh DESCRIPTION
55The 55The
56.Nm prop_array_send_ioctl , 56.Nm prop_array_send_ioctl ,
57.Nm prop_array_recv_ioctl , 57.Nm prop_array_recv_ioctl ,
58.Nm prop_dictionary_send_ioctl , 58.Nm prop_dictionary_send_ioctl ,
59.Nm prop_dictionary_recv_ioctl , 59.Nm prop_dictionary_recv_ioctl ,
60and 60and
61.Nm prop_dictionary_sendrecv_ioctl 61.Nm prop_dictionary_sendrecv_ioctl
62functions implement the user space side of a protocol for sending property 62functions implement the user space side of a protocol for sending property
63lists to and from the kernel using 63lists to and from the kernel using
64.Xr ioctl 2 . 64.Xr ioctl 2 .
65.Sh RETURN VALUES 65.Sh RETURN VALUES
66If successful, functions return zero. Otherwise, an error number is returned to indicate the error. 66If successful, functions return zero.
 67Otherwise, an error number is returned to indicate the error.
67.Sh ERRORS 68.Sh ERRORS
68.Fn prop_array_send_ioctl 69.Fn prop_array_send_ioctl
69and 70and
70.Fn prop_dictionary_send_ioctl 71.Fn prop_dictionary_send_ioctl
71will fail if: 72will fail if:
72.Bl -tag -width Er 73.Bl -tag -width Er
73.It Bq Er ENOMEM 74.It Bq Er ENOMEM
74Cannot allocate memory 75Cannot allocate memory
75.It Bq Er ENOTSUP 76.It Bq Er ENOTSUP
76Not supported 77Not supported
77.El 78.El
78.Pp 79.Pp
79.Fn prop_array_recv_ioctl 80.Fn prop_array_recv_ioctl
80and 81and
81.Fn prop_dictionary_recv_ioctl 82.Fn prop_dictionary_recv_ioctl
82will fail if: 83will fail if:
83.Bl -tag -width Er 84.Bl -tag -width Er
84.It Bq Er EIO 85.It Bq Er EIO
85Input/output error 86Input/output error
86.It Bq Er ENOTSUP 87.It Bq Er ENOTSUP
87Not supported 88Not supported
88.El 89.El
89.Pp 90.Pp
90In addition to these, 91In addition to these,
91.Xr ioctl 2 92.Xr ioctl 2
92errors may be returned. 93errors may be returned.
93.Sh EXAMPLES 94.Sh EXAMPLES
94The following 95The following
95.Pq simplified 96.Pq simplified
96example demonstrates using 97example demonstrates using
97.Fn prop_dictionary_send_ioctl 98.Fn prop_dictionary_send_ioctl
98and 99and
99.Fn prop_dictionary_recv_ioctl 100.Fn prop_dictionary_recv_ioctl
100in an application: 101in an application:
101.Bd -literal 102.Bd -literal
102void 103void
103foo_setprops(prop_dictionary_t dict) 104foo_setprops(prop_dictionary_t dict)
104{ 105{
105 int fd; 106 int fd;
106 107
107 fd = open("/dev/foo", O_RDWR, 0640); 108 fd = open("/dev/foo", O_RDWR, 0640);
108 if (fd == -1) 109 if (fd == -1)
109 return; 110 return;
110 111
111 (void) prop_dictionary_send_ioctl(dict, fd, FOOSETPROPS); 112 (void) prop_dictionary_send_ioctl(dict, fd, FOOSETPROPS);
112 113
113 (void) close(fd); 114 (void) close(fd);
114} 115}
115 116
116prop_dictionary_t 117prop_dictionary_t
117foo_getprops(void) 118foo_getprops(void)
118{ 119{
119 prop_dictionary_t dict; 120 prop_dictionary_t dict;
120 int fd; 121 int fd;
121 122
122 fd = open("/dev/foo", O_RDONLY, 0640); 123 fd = open("/dev/foo", O_RDONLY, 0640);
123 if (fd == -1) 124 if (fd == -1)
124 return (NULL); 125 return (NULL);
125 126
126 if (prop_dictionary_recv_ioctl(fd, FOOGETPROPS, \*[Am]dict) != 0) 127 if (prop_dictionary_recv_ioctl(fd, FOOGETPROPS, \*[Am]dict) != 0)
127 return (NULL); 128 return (NULL);
128 129
129 (void) close(fd); 130 (void) close(fd);
130 131
131 return (dict); 132 return (dict);
132} 133}
133.Ed 134.Ed
134.Pp 135.Pp
135The 136The
136.Nm prop_dictionary_sendrecv_ioctl 137.Nm prop_dictionary_sendrecv_ioctl
137function combines the send and receive functionality, allowing for 138function combines the send and receive functionality, allowing for
138ioctls that require two-way communication 139ioctls that require two-way communication
139.Pq for example to specify arguments for the ioctl operation . 140.Pq for example to specify arguments for the ioctl operation .
140.Sh SEE ALSO 141.Sh SEE ALSO
141.Xr prop_array 3 , 142.Xr prop_array 3 ,
142.Xr prop_dictionary 3 , 143.Xr prop_dictionary 3 ,
143.Xr proplib 3 , 144.Xr proplib 3 ,
144.Xr prop_copyin_ioctl 9 145.Xr prop_copyin_ioctl 9
145.Sh HISTORY 146.Sh HISTORY
146The 147The
147.Nm proplib 148.Nm proplib
148property container object library first appeared in 149property container object library first appeared in
149.Nx 4.0 . 150.Nx 4.0 .