forked from brho/plan9
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathu.h
74 lines (71 loc) · 1.87 KB
/
u.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
* This file is part of the UCB release of Plan 9. It is subject to the license
* terms in the LICENSE file found in the top-level directory of this
* distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
* part of the UCB release of Plan 9, including this file, may be copied,
* modified, propagated, or distributed except according to the terms contained
* in the LICENSE file.
*/
#define nil ((void*)0)
typedef unsigned short ushort;
typedef unsigned char uchar;
typedef unsigned long ulong;
typedef unsigned int uint;
typedef signed char schar;
typedef long long vlong;
typedef unsigned long long uvlong;
typedef unsigned long uintptr;
typedef unsigned long usize;
typedef uint Rune;
typedef union FPdbleword FPdbleword;
typedef long jmp_buf[2];
#define JMPBUFSP 0
#define JMPBUFPC 1
#define JMPBUFDPC (-8)
typedef unsigned int mpdigit; /* for /sys/include/mp.h */
typedef unsigned char u8int;
typedef unsigned short u16int;
typedef unsigned int u32int;
typedef unsigned long long u64int;
/* FCR */
#define FPINEX (1<<23)
#define FPOVFL (1<<26)
#define FPUNFL (1<<25)
#define FPZDIV (1<<24)
#define FPRNR (0<<30)
#define FPRZ (1<<30)
#define FPINVAL (1<<27)
#define FPRPINF (2<<30)
#define FPRNINF (3<<30)
#define FPRMASK (3<<30)
#define FPPEXT 0
#define FPPSGL 0
#define FPPDBL 0
#define FPPMASK 0
/* FSR */
#define FPAINEX (1<<5)
#define FPAZDIV (1<<6)
#define FPAUNFL (1<<7)
#define FPAOVFL (1<<8)
#define FPAINVAL (1<<9)
union FPdbleword
{
double x;
struct { /* big endian */
ulong hi;
ulong lo;
};
};
typedef char* va_list;
#define va_start(list, start) list =\
(sizeof(start) < 4?\
(char*)((int*)&(start)+1):\
(char*)(&(start)+1))
#define va_end(list)\
USED(list)
#define va_arg(list, mode)\
((sizeof(mode) == 1)?\
((list += 4), (mode*)list)[-1]:\
(sizeof(mode) == 2)?\
((list += 4), (mode*)list)[-1]:\
((list += sizeof(mode)), (mode*)list)[-1])