-
Notifications
You must be signed in to change notification settings - Fork 16
/
stddef.html
72 lines (64 loc) · 3.7 KB
/
stddef.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>stddef.h</TITLE>
<STYLE TYPE="TEXT/CSS">
<!--
.IE3-DUMMY { CONT-SIZE: 100%; }
BODY { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; BACKGROUND-COLOR: #E0E0E0; }
P { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H1 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H2 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H3 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H4 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H5 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H6 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
UL { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
TD { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; BACKGROUND-COLOR: #FFFFFF; }
.NOBORDER { BACKGROUND-COLOR: #E0E0E0; PADDING: 0pt; }
.NOBORDER TD { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; BACKGROUND-COLOR: #E0E0E0; PADDING: 0pt; }
.CODE { FONT-FAMILY: Courier New; }
-->
</STYLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#E0E0E0">
<FONT SIZE="5"><B>The <stddef.h> Header File</B></FONT>
<HR>
<P><B>ANSI definitions of default macros and types</B></P>
<H3><U>Functions</U></H3>
<DL INDENT="20"><DT><B><A HREF="#offsetof">offsetof</A></B><DD>Returns the offset of a member in a structure.</DL>
<H3><U>Constants</U></H3>
<DL INDENT="20"><DT><B><A HREF="alloc.html#NULL">NULL</A></B><DD>A null-pointer value.</DL>
<H3><U>Predefined Types</U></H3>
<DL INDENT="20"><DT><B><A HREF="#ptrdiff_t">ptrdiff_t</A></B><DD>A type to define the result of subtracting two pointers.
[Explanation]
ptrdiff_t is a type proposed by ANSI C for defining the result of subtracting
two pointers (e.g. the first address after the end of an array minus the
beginning of the array).<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#size_t">size_t</A></B><DD>A type to define sizes of strings and memory blocks.</DL>
<HR>
<H3><A NAME="offsetof"><U>offsetof</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> offsetof(type,member) ((<B><A HREF="keywords.html#short">unsigned</A></B> <B><A HREF="keywords.html#short">long</A></B>) &(((type*)0)->member))</TD></TR></TABLE></P>
<P><B>Returns the offset of a member in a structure.</B></P>
<P>offsetof is a macro which returns the offset of a member in a structure type.
The type can either be defined through
<CODE><A HREF="keywords.html#typedef">typedef</A></CODE>, or preceded
by <CODE><A HREF="keywords.html#struct">struct</A></CODE>, as usual.</P>
<P>Deprecated alias: OFFSETOF</P>
<P>See also: <A HREF="keywords.html#sizeof">sizeof</A>, <A HREF="gnuexts.html#SEC69">typeof</A></P>
<HR>
<H3><A NAME="ptrdiff_t"><U>ptrdiff_t</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="keywords.html#typedef">typedef</A></B> <B><A HREF="keywords.html#short">long</A></B> ptrdiff_t;</TD></TR></TABLE></P>
<P><B>A type to define the result of subtracting two pointers.</B></P>
<P>ptrdiff_t is a type proposed by ANSI C for defining the result of subtracting
two pointers (e.g. the first address after the end of an array minus the
beginning of the array).</P>
<HR>
<H3><A NAME="size_t"><U>size_t</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="keywords.html#typedef">typedef</A></B> <B><A HREF="keywords.html#short">unsigned</A></B> <B><A HREF="keywords.html#short">long</A></B> size_t;</TD></TR></TABLE></P>
<P><B>A type to define sizes of strings and memory blocks.</B></P>
<P>size_t is a type proposed by ANSI C for defining sizes of strings and
memory blocks.</P>
<HR>
<H3><A HREF="index.html">Return to the main index</A></H3>
</BODY>
</HTML>