/* blockinput.h - interface to blocking complicated interrupt-driven input.
- Copyright (C) 1989, 1993, 2001-2013 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1993, 2001-2016 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
#define EMACS_BLOCKINPUT_H
INLINE_HEADER_BEGIN
-#ifndef BLOCKINPUT_INLINE
-# define BLOCKINPUT_INLINE INLINE
-#endif
/* Emacs should avoid doing anything hairy in a signal handler, because
so many system functions are non-reentrant. For example, malloc
/* Begin critical section. */
-BLOCKINPUT_INLINE void
+INLINE void
block_input (void)
{
interrupt_input_blocked++;
extern void totally_unblock_input (void);
extern void unblock_input_to (int);
-/* In critical section ? */
+/* In critical section? */
-BLOCKINPUT_INLINE bool
+INLINE bool
input_blocked_p (void)
{
- return 0 < interrupt_input_blocked;
+ return interrupt_input_blocked > 0;
}
INLINE_HEADER_END