-
Notifications
You must be signed in to change notification settings - Fork 13
/
gestalt.c
60 lines (44 loc) · 1.28 KB
/
gestalt.c
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
#include "git.h"
git_uint32 gestalt (enum GestaltSelector sel, git_uint32 param)
{
switch (sel)
{
case GESTALT_SPEC_VERSION:
return 0x00030103;
case GESTALT_TERP_VERSION:
return GIT_VERSION_NUM;
case GESTALT_RESIZEMEM:
return 1;
case GESTALT_UNDO:
return 1;
case GESTALT_IO_SYSTEM:
if (param == IO_NULL || param == IO_FILTER || param == IO_GLK)
return 1;
else
return 0;
case GESTALT_UNICODE:
return 1;
case GESTALT_MEM_COPY:
return 1;
case GESTALT_MALLOC:
return 1;
case GESTALT_MALLOC_HEAP:
return heap_get_start();
case GESTALT_ACCELERATION:
return 1;
case GESTALT_ACCELFUNC:
if (accel_find_func(param))
return 1;
return 0;
case GESTALT_FLOAT:
return 1;
case GESTALT_EXTUNDO:
return 1;
case GESTALT_DOUBLE:
return 1;
case GESTALT_GIT_CACHE_CONTROL:
return 1;
default: // Unknown selector.
return 0;
}
}