| 1 |
#ifndef SASS_BASE_H |
| 2 |
#define SASS_BASE_H |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
#ifdef _MSC_VER |
| 8 |
#pragma warning(disable : 4503) |
| 9 |
#ifndef _SCL_SECURE_NO_WARNINGS |
| 10 |
#define _SCL_SECURE_NO_WARNINGS |
| 11 |
#endif |
| 12 |
#ifndef _CRT_SECURE_NO_WARNINGS |
| 13 |
#define _CRT_SECURE_NO_WARNINGS |
| 14 |
#endif |
| 15 |
#ifndef _CRT_NONSTDC_NO_DEPRECATE |
| 16 |
#define _CRT_NONSTDC_NO_DEPRECATE |
| 17 |
#endif |
| 18 |
#endif |
| 19 |
|
| 20 |
|
| 21 |
#if defined(_MSC_VER) && (_MSC_VER <= 1800) && !defined(_ALLOW_KEYWORD_MACROS) |
| 22 |
#define _ALLOW_KEYWORD_MACROS 1 |
| 23 |
#define noexcept throw( ) |
| 24 |
#endif |
| 25 |
|
| 26 |
#include <stddef.h> |
| 27 |
#include <stdbool.h> |
| 28 |
|
| 29 |
#ifdef __GNUC__ |
| 30 |
#define DEPRECATED(func) func __attribute__ ((deprecated)) |
| 31 |
#elif defined(_MSC_VER) |
| 32 |
#define DEPRECATED(func) __declspec(deprecated) func |
| 33 |
#else |
| 34 |
#pragma message("WARNING: You need to implement DEPRECATED for this compiler") |
| 35 |
#define DEPRECATED(func) func |
| 36 |
#endif |
| 37 |
|
| 38 |
#ifdef _WIN32 |
| 39 |
|
| 40 |
|
| 41 |
#ifdef ADD_EXPORTS |
| 42 |
#define ADDAPI __declspec(dllexport) |
| 43 |
#define ADDCALL __cdecl |
| 44 |
#else |
| 45 |
#define ADDAPI |
| 46 |
#define ADDCALL |
| 47 |
#endif |
| 48 |
|
| 49 |
#else |
| 50 |
|
| 51 |
|
| 52 |
#define ADDAPI |
| 53 |
#define ADDCALL |
| 54 |
|
| 55 |
#endif |
| 56 |
|
| 57 |
|
| 58 |
#ifdef __cplusplus |
| 59 |
extern "C" { |
| 60 |
#endif |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
enum Sass_Output_Style { |
| 65 |
SASS_STYLE_NESTED, |
| 66 |
SASS_STYLE_EXPANDED, |
| 67 |
SASS_STYLE_COMPACT, |
| 68 |
SASS_STYLE_COMPRESSED, |
| 69 |
|
| 70 |
SASS_STYLE_INSPECT, |
| 71 |
SASS_STYLE_TO_SASS, |
| 72 |
SASS_STYLE_TO_CSS |
| 73 |
}; |
| 74 |
|
| 75 |
|
| 76 |
ADDAPI void* ADDCALL sass_alloc_memory(size_t size); |
| 77 |
|
| 78 |
ADDAPI char* ADDCALL sass_copy_c_string(const char* str); |
| 79 |
|
| 80 |
ADDAPI void ADDCALL sass_free_memory(void* ptr); |
| 81 |
|
| 82 |
|
| 83 |
ADDAPI char* ADDCALL sass_string_quote (const char* str, const char quote_mark); |
| 84 |
ADDAPI char* ADDCALL sass_string_unquote (const char* str); |
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
ADDAPI const char* ADDCALL libsass_version(void); |
| 89 |
|
| 90 |
|
| 91 |
ADDAPI const char* ADDCALL libsass_language_version(void); |
| 92 |
|
| 93 |
#ifdef __cplusplus |
| 94 |
} |
| 95 |
#endif |
| 96 |
|
| 97 |
#endif |