|
Lines 47-52
Link Here
|
| 47 |
#pragma clang diagnostic ignored "-Wshorten-64-to-32" |
47 |
#pragma clang diagnostic ignored "-Wshorten-64-to-32" |
| 48 |
#endif |
48 |
#endif |
| 49 |
|
49 |
|
|
|
50 |
#ifdef ASTYLE_LIB |
| 51 |
|
| 52 |
// define STDCALL and EXPORT for Windows |
| 53 |
// MINGW defines STDCALL in Windows.h (actually windef.h) |
| 54 |
// EXPORT has no value if ASTYLE_NO_EXPORT is defined |
| 55 |
#ifdef _WIN32 |
| 56 |
#ifndef STDCALL |
| 57 |
#define STDCALL __stdcall |
| 58 |
#endif |
| 59 |
// define this to prevent compiler warning and error messages |
| 60 |
#ifdef ASTYLE_NO_EXPORT |
| 61 |
#define EXPORT |
| 62 |
#else |
| 63 |
#define EXPORT __declspec(dllexport) |
| 64 |
#endif |
| 65 |
// define STDCALL and EXPORT for non-Windows |
| 66 |
// visibility attribute allows "-fvisibility=hidden" compiler option |
| 67 |
#else |
| 68 |
#define STDCALL |
| 69 |
#if __GNUC__ >= 4 |
| 70 |
#define EXPORT __attribute__ ((visibility ("default"))) |
| 71 |
#else |
| 72 |
#define EXPORT |
| 73 |
#endif |
| 74 |
#endif // #ifdef _WIN32 |
| 75 |
|
| 76 |
// define utf-16 bit text for the platform |
| 77 |
typedef unsigned short utf16_t; |
| 78 |
// define pointers to callback error handler and memory allocation |
| 79 |
typedef void (STDCALL* fpError)(int errorNumber, const char* errorMessage); |
| 80 |
typedef char* (STDCALL* fpAlloc)(unsigned long memoryNeeded); |
| 81 |
|
| 82 |
#else |
| 83 |
#define EXPORT |
| 84 |
#endif // #ifdef ASTYLE_LIB |
| 85 |
|
| 50 |
//----------------------------------------------------------------------------- |
86 |
//----------------------------------------------------------------------------- |
| 51 |
// astyle namespace |
87 |
// astyle namespace |
| 52 |
//----------------------------------------------------------------------------- |
88 |
//----------------------------------------------------------------------------- |
|
Lines 326-332
Link Here
|
| 326 |
// Class ASBeautifier |
326 |
// Class ASBeautifier |
| 327 |
//----------------------------------------------------------------------------- |
327 |
//----------------------------------------------------------------------------- |
| 328 |
|
328 |
|
| 329 |
class ASBeautifier : protected ASResource, protected ASBase |
329 |
class EXPORT ASBeautifier : protected ASResource, protected ASBase |
| 330 |
{ |
330 |
{ |
| 331 |
public: |
331 |
public: |
| 332 |
ASBeautifier(); |
332 |
ASBeautifier(); |
|
Lines 612-618
Link Here
|
| 612 |
// Class ASFormatter |
646 |
// Class ASFormatter |
| 613 |
//----------------------------------------------------------------------------- |
647 |
//----------------------------------------------------------------------------- |
| 614 |
|
648 |
|
| 615 |
class ASFormatter : public ASBeautifier |
649 |
class EXPORT ASFormatter : public ASBeautifier |
| 616 |
{ |
650 |
{ |
| 617 |
public: // functions |
651 |
public: // functions |
| 618 |
ASFormatter(); |
652 |
ASFormatter(); |