-
Notifications
You must be signed in to change notification settings - Fork 88
/
lang.h
57 lines (46 loc) · 1.07 KB
/
lang.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
/*
* Copyright (C) 1984-2024 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
*
* For more information, see the README file.
*/
#ifndef LESS_LANG_H_
#define LESS_LANG_H_ 1
/*
* C language details.
*/
#if HAVE_CONST
#define constant const
#else
#define constant
#endif
/*
* mutable is the opposite of constant.
* It documents that a pointer parameter will be written through by the
* called function, more directly than by the mere absence of "constant".
*/
#define mutable
#define public /* PUBLIC FUNCTION */
#undef ptr_diff
#define ptr_diff(p1,p2) ((size_t) ((p1)-(p2)))
#undef countof
#define countof(a) ((int)(sizeof(a)/sizeof(*a)))
#define size_t_null ((size_t)-1)
#ifndef NULL
#define NULL 0
#endif
typedef enum lbool { LFALSE, LTRUE } lbool;
#undef TRUE
#define TRUE LTRUE
#undef FALSE
#define FALSE LFALSE
#ifdef _MSC_VER
#if _WIN64
typedef __int64 ssize_t;
#else
typedef __int32 ssize_t;
#endif
#endif
#endif // LESS_LANG_H_