mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
uses 'limits.h' for MAX_WORD and MAX_INT
This commit is contained in:
parent
a8220feed2
commit
4dce79f7e3
1 changed files with 5 additions and 2 deletions
7
types.h
7
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 <limits.h>
|
||||
|
||||
#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 */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue