xref: /freebsd/contrib/ntp/include/ieee754io.h (revision 1e413cf93298b5b97441a21d9a50fdcd0ee9945e)
1 /*
2  * /src/NTP/ntp-4/include/ieee754io.h,v 4.0 1998/04/10 19:50:40 kardel RELEASE_19990228_A
3  *
4  * $Created: Sun Jul 13 12:22:11 1997 $
5  *
6  * Copyright (C) 1997 by Frank Kardel
7  */
8 #ifndef IEEE754IO_H
9 #define IEEE754IO_H
10 
11 #define IEEE_SINGLE 1
12 #define IEEE_DOUBLE 2
13 
14 #define IEEE_MSB 1
15 #define IEEE_LSB 2
16 
17 #define IEEE_OK          0	/* conversion ok */
18 #define IEEE_BADCALL     1	/* bad call parameters */
19 #define IEEE_NAN         2	/* found an NaN */
20 #define IEEE_POSINFINITY 3	/* positive infinity */
21 #define IEEE_NEGINFINITY 4	/* negative infinity */
22 #define IEEE_POSOVERFLOW 5	/* positive overflow */
23 #define IEEE_NEGOVERFLOW 6	/* negative overflow */
24 
25 #define IEEE_OFFSETS     8	/* number of byte positions */
26 typedef unsigned char offsets_t[IEEE_OFFSETS];
27 
28 int fetch_ieee754 P((unsigned char **bufp, int size, l_fp *lfpp, offsets_t offsets));
29 int put_ieee754 P((unsigned char **bufpp, int size, l_fp *lfpp, offsets_t offsets));
30 
31 #endif
32 /*
33  * ieee754io.h,v
34  * Revision 4.0  1998/04/10 19:50:40  kardel
35  * Start 4.0 release version numbering
36  *
37  * Revision 1.1  1998/04/10 19:27:33  kardel
38  * initial NTP VERSION 4 integration of PARSE with GPS166 binary support
39  *
40  * Revision 1.1  1997/10/06 20:55:37  kardel
41  * new parse structure
42  *
43  */
44