bzr branch
http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk
5.2.7
by Gustav Hartvigsson
* Switched licence to a more permisive one. |
1 |
/*
|
2 |
Copyright (c) 2013-2014 Gustav Hartvigsson
|
|
3 |
||
4 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5 |
of this software and associated documentation files (the "Software"), to deal
|
|
6 |
in the Software without restriction, including without limitation the rights
|
|
7 |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8 |
copies of the Software, and to permit persons to whom the Software is
|
|
9 |
furnished to do so, subject to the following conditions:
|
|
10 |
||
11 |
The above copyright notice and this permission notice shall be included in
|
|
12 |
all copies or substantial portions of the Software.
|
|
13 |
||
14 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17 |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20 |
THE SOFTWARE.
|
|
21 |
*/
|
|
3
by Gustav Hartvigsson
Fixed a few things... |
22 |
|
23 |
||
24 |
#include <stdlib.h> |
|
25 |
#include <string.h> |
|
26 |
||
146
by Gustav Hartvigsson
* Reorderd includes in SimpleTypeSystem.h |
27 |
#include "SimpleTypeSystem.h" |
28 |
||
29 |
||
79
by Gustav Hartvigsson
* Clean up of SMap's for each code. |
30 |
schar * |
61
by Gustav Hartvigsson
* Made the code more easy to read. |
31 |
s_get_version_string () { |
121.1.3
by Gustav Hartvigsson
* Made the GC switchable at rutime (once) when compiled with S_USE_GC set. |
32 |
schar * ret_val = s_malloc ( sizeof(char) * 32); |
3
by Gustav Hartvigsson
Fixed a few things... |
33 |
sprintf (ret_val, "Version: %d.%d.%d ", s_get_version_major (), |
34 |
s_get_version_minor (), |
|
35 |
s_get_version_patch ()); |
|
36 |
return ret_val; |
|
37 |
}
|
|
38 |
||
79
by Gustav Hartvigsson
* Clean up of SMap's for each code. |
39 |
sint
|
61
by Gustav Hartvigsson
* Made the code more easy to read. |
40 |
s_get_version_major () { |
3
by Gustav Hartvigsson
Fixed a few things... |
41 |
return SIMPLE_TYPE_SYSTEM_VERSION_MAJOR; |
42 |
}
|
|
43 |
||
79
by Gustav Hartvigsson
* Clean up of SMap's for each code. |
44 |
sint
|
61
by Gustav Hartvigsson
* Made the code more easy to read. |
45 |
s_get_version_minor () { |
3
by Gustav Hartvigsson
Fixed a few things... |
46 |
return SIMPLE_TYPE_SYSTEM_VERSION_MINOR; |
47 |
}
|
|
48 |
||
79
by Gustav Hartvigsson
* Clean up of SMap's for each code. |
49 |
sint
|
61
by Gustav Hartvigsson
* Made the code more easy to read. |
50 |
s_get_version_patch () { |
3
by Gustav Hartvigsson
Fixed a few things... |
51 |
return SIMPLE_TYPE_SYSTEM_VERSION_PATCH; |
52 |
}
|
|
53 |
||
146
by Gustav Hartvigsson
* Reorderd includes in SimpleTypeSystem.h |
54 |
void
|
55 |
s_teardown () { |
|
56 |
s_global_notify_teardown (); |
|
57 |
s_mm_cleanup (); |
|
58 |
}
|
|
59 |