Merge branch 'glk-074'
[projects/chimara/chimara.git] / interpreters / git / gestalt.c
1 #include "git.h"
2
3 git_uint32 gestalt (enum GestaltSelector sel, git_uint32 param)
4 {
5     switch (sel)
6     {
7         case GESTALT_SPEC_VERSION:
8             return 0x00030102;
9     
10         case GESTALT_TERP_VERSION:
11             return GIT_VERSION_NUM;
12     
13         case GESTALT_RESIZEMEM:
14             return 1;
15     
16         case GESTALT_UNDO:
17             return 1;
18     
19         case GESTALT_IO_SYSTEM:
20             if (param == IO_NULL || param == IO_FILTER || param == IO_GLK)
21                 return 1;
22             else
23                 return 0;
24                 
25         case GESTALT_UNICODE:
26             return 1;
27             
28         case GESTALT_MEM_COPY:
29             return 1;
30             
31         case GESTALT_MALLOC:
32             return 1;
33             
34         case GESTALT_MALLOC_HEAP:
35           return heap_get_start();
36             
37         case GESTALT_ACCELERATION:
38             return 1;
39
40         case GESTALT_ACCELFUNC:
41             if (accel_find_func(param))
42                 return 1;
43             return 0;
44
45         case GESTALT_FLOAT:
46             return 1;
47
48         case GESTALT_GIT_CACHE_CONTROL:
49             return 1;
50             
51         default: // Unknown selector.
52             return 0;
53     }
54 }