beautypg.com

Errors

Page 340

background image

UM014423-0607

C Standard Library

ZiLOG Developer Studio II

eZ80Acclaim!

®

User Manual

320

Errors

The <

errno.h

> header defines macros relating to the reporting of error conditions.

Macros

Additional macro definitions, beginning with E and an uppercase letter, can also be speci-
fied by the implementation.

Standard Definitions

The following types and macros are defined in several headers referred to in the descrip-
tions of the functions declared in that header, as well as the common <

stddef.h

> stan-

dard header.

Macros

Types

Diagnostics

The <

assert.h

> header defines the

assert()

macro. It refers to the NDEBUG macro,

which is not defined in the header. If NDEBUG is defined as a macro name before the
inclusion of this header, the

assert()

macro is defined simply as:

#define assert(ignore)((void) 0)

EDOM

Expands to a distinct nonzero integral constant expression.

ERANGE

Expands to a distinct nonzero integral constant expression.

errno

A modifiable value that has type int. Several libraries set errno to a positive value to
indicate an error. errno is initialized to zero at program startup, but it is never set to
zero by any library function. The value of errno can be set to nonzero by a library
function even if there is no error, depending on the behavior specified for the library
function in the ANSI Standard.

NULL

Expands to a null pointer constant.

offsetof (type, identifier) Expands to an integral constant expression that has type size_t and

provides the offset in bytes, from the beginning of a structure
designated by type to the member designated by identifier.

ptrdiff_t

Signed integral type of the result of subtracting two pointers.

size_t

Unsigned integral type of the result of the sizeof operator.

wchar_t

Integral type whose range of values can represent distinct codes for all members of
the largest extended character set specified among the supported locales.

This manual is related to the following products: