From 4dce79f7e30787bb21d96cd117217fa157e34594 Mon Sep 17 00:00:00 2001 From: Waldemar Celes Date: Tue, 27 Dec 1994 18:41:47 -0200 Subject: [PATCH] uses 'limits.h' for MAX_WORD and MAX_INT --- types.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/types.h b/types.h index a9d28132..919929c9 100644 --- a/types.h +++ b/types.h @@ -1,11 +1,13 @@ /* ** TeCGraf - PUC-Rio -** $Id: $ +** $Id: types.h,v 1.1 1994/12/20 21:31:01 roberto Exp celes $ */ #ifndef types_h #define types_h +#include + #ifndef real #define real float #endif @@ -16,7 +18,8 @@ typedef unsigned char Byte; /* unsigned 8 bits */ typedef unsigned short Word; /* unsigned 16 bits */ -#define MAX_WORD 0xFFFD /* maximum value of a word (FFFF-2 for safety) */ +#define MAX_WORD (USHRT_MAX-2) /* maximum value of a word (-2 for safety) */ +#define MAX_INT (INT_MAX-2) /* maximum value of a int (-2 for safety) */ typedef signed long Long; /* 32 bits */