Annotation of embedaddon/libpdel/structs/type/structs_type_int.3, revision 1.1.1.1
1.1 misho 1: .\" Copyright (c) 2001-2002 Packet Design, LLC.
2: .\" All rights reserved.
3: .\"
4: .\" Subject to the following obligations and disclaimer of warranty,
5: .\" use and redistribution of this software, in source or object code
6: .\" forms, with or without modifications are expressly permitted by
7: .\" Packet Design; provided, however, that:
8: .\"
9: .\" (i) Any and all reproductions of the source or object code
10: .\" must include the copyright notice above and the following
11: .\" disclaimer of warranties; and
12: .\" (ii) No rights are granted, in any manner or form, to use
13: .\" Packet Design trademarks, including the mark "PACKET DESIGN"
14: .\" on advertising, endorsements, or otherwise except as such
15: .\" appears in the above copyright notice or in the software.
16: .\"
17: .\" THIS SOFTWARE IS BEING PROVIDED BY PACKET DESIGN "AS IS", AND
18: .\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, PACKET DESIGN MAKES NO
19: .\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING
20: .\" THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED
21: .\" WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
22: .\" OR NON-INFRINGEMENT. PACKET DESIGN DOES NOT WARRANT, GUARANTEE,
23: .\" OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS
24: .\" OF THE USE OF THIS SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY,
25: .\" RELIABILITY OR OTHERWISE. IN NO EVENT SHALL PACKET DESIGN BE
26: .\" LIABLE FOR ANY DAMAGES RESULTING FROM OR ARISING OUT OF ANY USE
27: .\" OF THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY DIRECT,
28: .\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE, OR CONSEQUENTIAL
29: .\" DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF
30: .\" USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY THEORY OF
31: .\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32: .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
33: .\" THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF
34: .\" THE POSSIBILITY OF SUCH DAMAGE.
35: .\"
36: .\" Author: Archie Cobbs <archie@freebsd.org>
37: .\"
38: .\" $Id: structs_type_int.3,v 1.8 2004/06/02 17:24:38 archie Exp $
39: .\"
40: .Dd April 22, 2002
41: .Dt STRUCTS_TYPE_INT 3
42: .Os
43: .Sh NAME
44: .Nm structs_type_int
45: .Nd structs types for integral types
46: .Sh LIBRARY
47: PDEL Library (libpdel, \-lpdel)
48: .Sh SYNOPSIS
49: .In sys/types.h
50: .In pdel/structs/structs.h
51: .In pdel/structs/type/int.h
52: .Vt extern const struct structs_type structs_type_char ;
53: .Vt extern const struct structs_type structs_type_uchar ;
54: .Vt extern const struct structs_type structs_type_hchar ;
55: .Vt extern const struct structs_type structs_type_short ;
56: .Vt extern const struct structs_type structs_type_ushort ;
57: .Vt extern const struct structs_type structs_type_hshort ;
58: .Vt extern const struct structs_type structs_type_int ;
59: .Vt extern const struct structs_type structs_type_uint ;
60: .Vt extern const struct structs_type structs_type_hint ;
61: .Vt extern const struct structs_type structs_type_long ;
62: .Vt extern const struct structs_type structs_type_ulong ;
63: .Vt extern const struct structs_type structs_type_hlong ;
64: .Vt extern const struct structs_type structs_type_int8 ;
65: .Vt extern const struct structs_type structs_type_uint8 ;
66: .Vt extern const struct structs_type structs_type_hint8 ;
67: .Vt extern const struct structs_type structs_type_int16 ;
68: .Vt extern const struct structs_type structs_type_uint16 ;
69: .Vt extern const struct structs_type structs_type_hint16 ;
70: .Vt extern const struct structs_type structs_type_int32 ;
71: .Vt extern const struct structs_type structs_type_uint32 ;
72: .Vt extern const struct structs_type structs_type_hint32 ;
73: .Vt extern const struct structs_type structs_type_int64 ;
74: .Vt extern const struct structs_type structs_type_uint64 ;
75: .Vt extern const struct structs_type structs_type_hint64 ;
76: .Sh DESCRIPTION
77: The
78: .Xr structs 3
79: library includes these pre-defined integral types:
80: .Pp
81: .Bl -ohang -width xxx -offset 3n
82: .It Em structs_type_char
83: For values of type
84: .Li "char" .
85: .It Em structs_type_uchar
86: For values of type
87: .Li "u_char" .
88: .It Em structs_type_hchar
89: For values of type
90: .Li "u_char"
91: expressed as hexadecimal.
92: .It Em structs_type_short
93: For values of type
94: .Li "short" .
95: .It Em structs_type_ushort
96: For values of type
97: .Li "u_short" .
98: .It Em structs_type_hshort
99: For values of type
100: .Li "u_short"
101: expressed as hexadecimal.
102: .It Em structs_type_int
103: For values of type
104: .Li "int" .
105: .It Em structs_type_uint
106: For values of type
107: .Li "u_int" .
108: .It Em structs_type_hint
109: For values of type
110: .Li "u_int"
111: expressed as hexadecimal.
112: .It Em structs_type_long
113: For values of type
114: .Li "long" .
115: .It Em structs_type_ulong
116: For values of type
117: .Li "u_long" .
118: .It Em structs_type_hlong
119: For values of type
120: .Li "u_long"
121: expressed as hexadecimal.
122: .It Em structs_type_int8
123: For values of type
124: .Li "int8_t" .
125: .It Em structs_type_uint8
126: For values of type
127: .Li "u_int8_t" .
128: .It Em structs_type_hint8
129: For values of type
130: .Li "u_int8_t"
131: expressed as hexadecimal.
132: .It Em structs_type_int16
133: For values of type
134: .Li "int16_t" .
135: .It Em structs_type_uint16
136: For values of type
137: .Li "u_int16_t" .
138: .It Em structs_type_hint16
139: For values of type
140: .Li "u_int16_t"
141: expressed as hexadecimal.
142: .It Em structs_type_int32
143: For values of type
144: .Li "int32_t" .
145: .It Em structs_type_uint32
146: For values of type
147: .Li "u_int32_t" .
148: .It Em structs_type_hint32
149: For values of type
150: .Li "u_int32_t"
151: expressed as hexadecimal.
152: .It Em structs_type_int64
153: For values of type
154: .Li "int64_t" .
155: .It Em structs_type_uint64
156: For values of type
157: .Li "u_int64_t" .
158: .It Em structs_type_hint64
159: For values of type
160: .Li "u_int64_t"
161: expressed as hexadecimal.
162: .El
163: .Pp
164: .Em Note :
165: the
166: .Dq short ,
167: .Dq int ,
168: and
169: .Dq long
170: variants have sizes that are machine dependent, because they represent
171: primitive types whose sizes are machine dependent.
172: Therefore, the binary encodings of these types are also machine dependent
173: (although they are independent of byte-order).
174: .Pp
175: To ensure machine independence in binary encodings, use the fixed-size
176: .Dq 8 ,
177: .Dq 16 ,
178: .Dq 32 ,
179: and
180: .Dq 64
181: variants.
182: .Sh SEE ALSO
183: .Xr libpdel 3 ,
184: .Xr structs 3 ,
185: .Xr structs_type 3
186: .Sh HISTORY
187: The PDEL library was developed at Packet Design, LLC.
188: .Dv "http://www.packetdesign.com/"
189: .Sh AUTHORS
190: .An Archie Cobbs Aq archie@freebsd.org
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>