2 * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
6 * Module: CARDINAL operations with overflow checking
7 * Author: Ceriel J.H. Jacobs
12 #define EM_WSIZE _EM_WSIZE
15 #define EM_LSIZE _EM_LSIZE
20 #define MAXCARD ((unsigned)-1)
21 #if EM_WSIZE < EM_LSIZE
22 #define MAXLONGCARD ((unsigned long) -1L)
28 if (MAXCARD
- a
< b
) TRP(M2_UOVFL
);
31 #if EM_WSIZE < EM_LSIZE
35 if (MAXLONGCARD
- a
< b
) TRP(M2_UOVFL
);
42 if (a
!= 0 && MAXCARD
/a
< b
) TRP(M2_UOVFL
);
45 #if EM_WSIZE < EM_LSIZE
49 if (a
!= 0 && MAXLONGCARD
/a
< b
) TRP(M2_UOVFL
);
56 if (b
< a
) TRP(M2_UUVFL
);
59 #if EM_WSIZE < EM_LSIZE
63 if (b
< a
) TRP(M2_UUVFL
);