/* ************************************************************************** * * Boot-ROM-Code to load an operating system across a TCP/IP network. * * Module: general.h * Purpose: Header file with general declarations * Entries: none * ************************************************************************** * * Copyright (C) 1995-2003 Gero Kuhlmann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: general.h,v 1.4 2003/01/25 23:29:40 gkminix Exp $ */ #ifndef _GENERAL_H #define _GENERAL_H /* ************************************************************************** * * Define boolean values: */ #ifndef TRUE # define TRUE 1 #endif #ifndef FALSE # define FALSE 0 #endif /* ************************************************************************** * * All following definitions are nothing for assembler modules, so exclude * everything here. */ #ifndef _USE_ASSEMBLER /* ************************************************************************** * * Defines for specifying function prototypes */ #ifdef __ANSI__ # ifndef __P # define __P(x) x # endif # ifndef __const # define __const const # endif /* Almost ANSI */ # if __ANSI__ != 1 # ifndef const # define const # endif # ifndef volatile # define volatile # endif # endif #else # ifndef __P # define __P(x) () # endif # ifndef __const # define __const # endif # ifndef const # define const # endif # ifndef volatile # define volatile # endif #endif /* ************************************************************************** * * Define NULL pointer: */ #ifndef NULL # define NULL (void *)0 /* near pointer */ #endif #ifndef UNIX #ifndef FNULL # define FNULL (unsigned long)0 /* far pointer */ #endif #endif /* ************************************************************************** * * Macros to allow usage of far pointers in the source code */ #ifndef UNIX # define FP_OFF(fp) ((unsigned short)(fp)) # define FP_SEG(fp) ((unsigned short)((fp) >> 16)) # define MK_FP(seg,ofs) ((unsigned long) \ (((unsigned long)(seg) << 16) | (unsigned long)(ofs))) #endif #endif /* _USE_ASSEMBLER */ #endif /* _GENERAL_H */