DeskLib 2.90a:Core.h


Contents


Introduction and Overview

This header file contains core definitions used by most of DeskLib.


Function-like macros


UNUSED

#define UNUSED(x) ((x) = (x))

A simple macro to avoid compiler warnings when you don't actually use one of the parameters passed to a particular function.

Also useful for conditional compilation where one of the paths doesn't use a variable.


WORDALIGN

#define WORDALIGN(ADDR) (((ADDR) + 3) & (~3))

A simple macro that rounds an address up to the nearest word boundary.


MAX

  #define MAX(x,y)   ((x) > (y) ? (x) : (y))

MIN

  #define MIN(x,y)   ((x) < (y) ? (x) : (y))

Purpose: The usual definitions of MAX and MIN.


Macros


BOOL

#define BOOL  unsigned

FALSE

#define FALSE 0

TRUE

#define TRUE  1

ERROR

#define ERROR   1

NOERROR

#define NOERROR 0

Type


os_error

typedef struct
{
int errnum;
char errmess[252];

} os_error;

The structure of operating system errors.