diff options
author | wtc%netscape.com <devnull@localhost> | 2002-09-18 14:20:01 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2002-09-18 14:20:01 +0000 |
commit | 99542e31e094b61c28333abed9b2e25cd8ebd699 (patch) | |
tree | 0c1dad056bfb0d911b5cc2727e416b8fcfa26486 | |
parent | 6a4a0f3bcaba0b84d6002175ee94b8df92531280 (diff) | |
download | nspr-hg-99542e31e094b61c28333abed9b2e25cd8ebd699.tar.gz |
Bug 72100: added macros for the maximum and minimum values of PRInt8,
PRUint8, PRInt16, PRUint16, PRInt32, and PRUint32. r=jkeiser.
Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-rw-r--r-- | pr/include/prtypes.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pr/include/prtypes.h b/pr/include/prtypes.h index 508b9299..099e9306 100644 --- a/pr/include/prtypes.h +++ b/pr/include/prtypes.h @@ -280,6 +280,18 @@ typedef signed char PRInt8; #endif /************************************************************************ + * MACROS: PR_INT8_MAX + * PR_INT8_MIN + * PR_UINT8_MAX + * DESCRIPTION: + * The maximum and minimum values of a PRInt8 or PRUint8. +************************************************************************/ + +#define PR_INT8_MAX 127 +#define PR_INT8_MIN (-128) +#define PR_UINT8_MAX 255U + +/************************************************************************ ** TYPES: PRUint16 ** PRInt16 ** DESCRIPTION: @@ -293,6 +305,18 @@ typedef short PRInt16; #endif /************************************************************************ + * MACROS: PR_INT16_MAX + * PR_INT16_MIN + * PR_UINT16_MAX + * DESCRIPTION: + * The maximum and minimum values of a PRInt16 or PRUint16. +************************************************************************/ + +#define PR_INT16_MAX 32767 +#define PR_INT16_MIN (-32768) +#define PR_UINT16_MAX 65535U + +/************************************************************************ ** TYPES: PRUint32 ** PRInt32 ** DESCRIPTION: @@ -313,6 +337,18 @@ typedef long PRInt32; #endif /************************************************************************ + * MACROS: PR_INT32_MAX + * PR_INT32_MIN + * PR_UINT32_MAX + * DESCRIPTION: + * The maximum and minimum values of a PRInt32 or PRUint32. +************************************************************************/ + +#define PR_INT32_MAX PR_INT32(2147483647) +#define PR_INT32_MIN (-PR_INT32_MAX - 1) +#define PR_UINT32_MAX PR_UINT32(4294967295) + +/************************************************************************ ** TYPES: PRUint64 ** PRInt64 ** DESCRIPTION: |