Back to index

tetex-bin  3.0
arith.h
Go to the documentation of this file.
00001 /* $XConsortium: arith.h,v 1.2 91/10/10 11:17:49 rws Exp $ */
00002 /* Copyright International Business Machines, Corp. 1991
00003  * All Rights Reserved
00004  * Copyright Lexmark International, Inc. 1991
00005  * All Rights Reserved
00006  *
00007  * License to use, copy, modify, and distribute this software and its
00008  * documentation for any purpose and without fee is hereby granted,
00009  * provided that the above copyright notice appear in all copies and that
00010  * both that copyright notice and this permission notice appear in
00011  * supporting documentation, and that the name of IBM or Lexmark not be
00012  * used in advertising or publicity pertaining to distribution of the
00013  * software without specific, written prior permission.
00014  *
00015  * IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF
00016  * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY
00017  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
00018  * AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.  THE ENTIRE RISK AS TO THE
00019  * QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT
00020  * OR MAINTAIN, BELONGS TO THE LICENSEE.  SHOULD ANY PORTION OF THE
00021  * SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE
00022  * ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION.  IN NO EVENT SHALL
00023  * IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
00024  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
00025  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
00026  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
00027  * THIS SOFTWARE.
00028  */
00029 /*SHARED*/
00030 
00031 #include "types.h"
00032 
00033 void DLmult(),DLdiv(),DLadd(),DLsub();
00034  
00035 fractpel FPmult();
00036 fractpel FPdiv();
00037 fractpel FPstarslash();
00038  
00039 /*END SHARED*/
00040 /*SHARED*/
00041  
00042 #define     SHORTSIZE         (sizeof(SHORT)*8)
00043 #define     LONGSIZE          (SHORTSIZE*2)
00044 #define     MAXSHORT          ((1<<SHORTSIZE)-1)
00045  
00046 /*END SHARED*/
00047 /*SHARED*/
00048  
00049 typedef struct {
00050        LONG high;
00051        ULONG low;
00052 } doublelong;
00053  
00054 /*END SHARED*/
00055 /*SHARED*/
00056  
00057 #define  DLrightshift(dl,N)  { \
00058        dl.low = (dl.low >> N) + (((ULONG) dl.high) << (LONGSIZE - N)); \
00059        dl.high >>= N; \
00060 }
00061  
00062 /*END SHARED*/