| 1 |
#ifndef _INTERRUPT_H_ |
| 2 |
#define _INTERRUPT_H_ |
| 3 |
|
| 4 |
#ifdef _WIN32 |
| 5 |
|
| 6 |
#include <windows.h> |
| 7 |
#undef TRUE |
| 8 |
#undef FALSE |
| 9 |
|
| 10 |
#endif |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
#ifndef BEGIN_SUSPEND_INTERRUPTS |
| 15 |
|
| 16 |
#define BEGIN_SUSPEND_INTERRUPTS do { \ |
| 17 |
Rboolean __oldsusp__ = R_interrupts_suspended; \ |
| 18 |
R_interrupts_suspended = TRUE; |
| 19 |
#define END_SUSPEND_INTERRUPTS R_interrupts_suspended = __oldsusp__; \ |
| 20 |
if (R_interrupts_pending && ! R_interrupts_suspended) \ |
| 21 |
Rf_onintr(); \ |
| 22 |
} while(0) |
| 23 |
|
| 24 |
#include <R_ext/libextern.h> |
| 25 |
LibExtern Rboolean R_interrupts_suspended; |
| 26 |
LibExtern int R_interrupts_pending; |
| 27 |
extern void Rf_onintr(void); |
| 28 |
LibExtern Rboolean mbcslocale; |
| 29 |
#endif |
| 30 |
|
| 31 |
|
| 32 |
#endif |