Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

STDDEF(5)                            SysV                            STDDEF(5)



NAME
     stddef - common definitions

SYNOPSIS
     #include <stddef.h>

DESCRIPTION
     Including <stddef.h> enables the definition of commonly used types and
     macros in your program.  The types are ptrdiff_t, which is the signed
     integral type of the result of subtracting two pointers; size_t, which is
     the unsigned integral type of the result of the sizeof operator; and
     wchar_t, which is an integral type.  wchar_t is defined such that any
     member of the largest extended character set specified among the
     supported locales can be of that type and represent a distinct code.

     The macros are NULL, defined as zero; and

          offsetof(type, member)

     which expands to an integral constant expression of type size_t, the
     value of which is the offset in bytes, to the structure member
     (designated by member), from the beginning of its structure (designated
     by type).  The member must be such that given

          static type t;

     then the expression &(t.member) evaluates to an address constant.  If the
     specified member is a bit-field, the behavior is undefined.

NOTE
     This discussion is adapted from ANS X3.159-1989.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026