From: mdw Date: Thu, 11 Nov 1999 17:47:55 +0000 (+0000) Subject: Minor changes for different `mptypes.h' format. X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/commitdiff_plain/b9b1c853917df1504dba8930834525f30b820076 Minor changes for different `mptypes.h' format. --- diff --git a/mpx.h b/mpx.h index edaea71..0f1a91d 100644 --- a/mpx.h +++ b/mpx.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: mpx.h,v 1.1 1999/09/03 08:41:12 mdw Exp $ + * $Id: mpx.h,v 1.2 1999/11/11 17:47:55 mdw Exp $ * * Low level multiprecision arithmetic * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: mpx.h,v $ + * Revision 1.2 1999/11/11 17:47:55 mdw + * Minor changes for different `mptypes.h' format. + * * Revision 1.1 1999/09/03 08:41:12 mdw * Initial import. * @@ -63,6 +66,28 @@ # include "mptypes.h" #endif +/*----- Basic macros ------------------------------------------------------*/ + +/* --- @MPW@ --- * + * + * Arguments: @x@ = an unsigned value + * + * Use: Expands to the value of @x@ masked and typecast to a + * multiprecision integer word. + */ + +#define MPW(x) ((mpw)((x) & MPW_MAX)) + +/* --- @MPWS@ --- * + * + * Arguments: @n@ = number of words + * + * Use: Expands to the number of bytes occupied by a given number of + * words. + */ + +#define MPWS(n) ((n) * sizeof(mpw)) + /*----- General manipulation ----------------------------------------------*/ /* --- @MPX_SHRINK@ --- *