| 1 |
/************* history ************
|
| 2 |
*
|
| 3 |
* COMPONENT: JRD MODULE: QUAD.H
|
| 4 |
* generated by Marion V2.5 2/6/90
|
| 5 |
* from dev db on 6-DEC-1993
|
| 6 |
*****************************************************************
|
| 7 |
*
|
| 8 |
* 0 katz 6-DEC-1993
|
| 9 |
* history begins
|
| 10 |
*
|
| 11 |
* The contents of this file are subject to the Interbase Public
|
| 12 |
* License Version 1.0 (the "License"); you may not use this file
|
| 13 |
* except in compliance with the License. You may obtain a copy
|
| 14 |
* of the License at http://www.Inprise.com/IPL.html
|
| 15 |
*
|
| 16 |
* Software distributed under the License is distributed on an
|
| 17 |
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
|
| 18 |
* or implied. See the License for the specific language governing
|
| 19 |
* rights and limitations under the License.
|
| 20 |
*
|
| 21 |
* The Original Code was created by Inprise Corporation
|
| 22 |
* and its predecessors. Portions created by Inprise Corporation are
|
| 23 |
* Copyright (C) Inprise Corporation.
|
| 24 |
*
|
| 25 |
* All Rights Reserved.
|
| 26 |
* Contributor(s): ______________________________________.
|
| 27 |
*/
|
| 28 |
|
| 29 |
|
| 30 |
/*
|
| 31 |
* PROGRAM: JRD Access Method
|
| 32 |
* MODULE: quad.h
|
| 33 |
* DESCRIPTION: Macros to support quad arithmetic
|
| 34 |
*
|
| 35 |
* copyright (c) 1993 by Borland International
|
| 36 |
*/
|
| 37 |
|
| 38 |
#ifndef JRD_QUAD_H
|
| 39 |
#define JRD_QUAD_H
|
| 40 |
|
| 41 |
#ifndef WORDS_BIGENDIAN
|
| 42 |
const int LOW_WORD = 0;
|
| 43 |
const int HIGH_WORD = 1;
|
| 44 |
#else
|
| 45 |
const int LOW_WORD = 1;
|
| 46 |
const int HIGH_WORD = 0;
|
| 47 |
#endif
|
| 48 |
|
| 49 |
#ifdef NATIVE_QUAD
|
| 50 |
#define QUAD_ADD(a, b, e) ((a) + (b))
|
| 51 |
#define QUAD_COMPARE(a, b) ((a == b) ? 0 : (a < b) ? -1 : 1)
|
| 52 |
#define QUAD_FROM_DOUBLE(a, e) a
|
| 53 |
#define QUAD_MULTIPLY(a, b, e) ((a) * (b))
|
| 54 |
#define QUAD_NEGATE(a, e) (-(a))
|
| 55 |
#define QUAD_SUBTRACT(a,b,e) ((a) - (b))
|
| 56 |
#else
|
| 57 |
#define QUAD_ADD(a, b, e) QUAD_add (&(a), &(b), e)
|
| 58 |
#define QUAD_COMPARE(a, b) QUAD_compare (&(a), &(b))
|
| 59 |
#define QUAD_FROM_DOUBLE(a, e) QUAD_from_double (&(a), e)
|
| 60 |
#define QUAD_MULTIPLY(a, b, e) QUAD_multiply (&(a), &(b), e)
|
| 61 |
#define QUAD_NEGATE(a, e) QUAD_negate (&(a), e)
|
| 62 |
#define QUAD_SUBTRACT(a, b, e) QUAD_subtract (&(a), &(b), e)
|
| 63 |
|
| 64 |
#include "../jrd/quad_proto.h"
|
| 65 |
#endif
|
| 66 |
|
| 67 |
#endif /* JRD_QUAD_H */
|