Initial commit
[yaffs-website] / node_modules / node-sass / src / libsass / include / sass / base.h
1 #ifndef SASS_BASE_H
2 #define SASS_BASE_H
3
4 // #define DEBUG_SHARED_PTR
5
6 #ifdef _MSC_VER
7   #pragma warning(disable : 4503)
8   #ifndef _SCL_SECURE_NO_WARNINGS
9     #define _SCL_SECURE_NO_WARNINGS
10   #endif
11   #ifndef _CRT_SECURE_NO_WARNINGS
12     #define _CRT_SECURE_NO_WARNINGS
13   #endif
14   #ifndef _CRT_NONSTDC_NO_DEPRECATE
15     #define _CRT_NONSTDC_NO_DEPRECATE
16   #endif
17 #endif
18
19 #include <stddef.h>
20 #include <stdbool.h>
21
22 #ifdef __GNUC__
23   #define DEPRECATED(func) func __attribute__ ((deprecated))
24 #elif defined(_MSC_VER)
25   #define DEPRECATED(func) __declspec(deprecated) func
26 #else
27   #pragma message("WARNING: You need to implement DEPRECATED for this compiler")
28   #define DEPRECATED(func) func
29 #endif
30
31 #ifdef _WIN32
32
33   /* You should define ADD_EXPORTS *only* when building the DLL. */
34   #ifdef ADD_EXPORTS
35     #define ADDAPI __declspec(dllexport)
36     #define ADDCALL __cdecl
37   #else
38     #define ADDAPI
39     #define ADDCALL
40   #endif
41
42 #else /* _WIN32 not defined. */
43
44   /* Define with no value on non-Windows OSes. */
45   #define ADDAPI
46   #define ADDCALL
47
48 #endif
49
50 /* Make sure functions are exported with C linkage under C++ compilers. */
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54
55
56 // Different render styles
57 enum Sass_Output_Style {
58   SASS_STYLE_NESTED,
59   SASS_STYLE_EXPANDED,
60   SASS_STYLE_COMPACT,
61   SASS_STYLE_COMPRESSED,
62   // only used internaly
63   SASS_STYLE_INSPECT,
64   SASS_STYLE_TO_SASS
65 };
66
67 // to allocate buffer to be filled
68 ADDAPI void* ADDCALL sass_alloc_memory(size_t size);
69 // to allocate a buffer from existing string
70 ADDAPI char* ADDCALL sass_copy_c_string(const char* str);
71 // to free overtaken memory when done
72 ADDAPI void ADDCALL sass_free_memory(void* ptr);
73
74 // Some convenient string helper function
75 ADDAPI char* ADDCALL sass_string_quote (const char* str, const char quote_mark);
76 ADDAPI char* ADDCALL sass_string_unquote (const char* str);
77
78 // Implemented sass language version
79 // Hardcoded version 3.4 for time being
80 ADDAPI const char* ADDCALL libsass_version(void);
81
82 // Get compiled libsass language
83 ADDAPI const char* ADDCALL libsass_language_version(void);
84
85 #ifdef __cplusplus
86 } // __cplusplus defined.
87 #endif
88
89 #endif