emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master a57687dc0e: Clean up Haiku code after file panel changes


From: Po Lu
Subject: master a57687dc0e: Clean up Haiku code after file panel changes
Date: Sun, 15 May 2022 21:39:22 -0400 (EDT)

branch: master
commit a57687dc0e27f72642bc1ce14ad53889e55676dc
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Clean up Haiku code after file panel changes
    
    * src/haiku_support.cc:
    * src/haiku_support.h: Stop including pthread.h and specpdl_ref.
    
    * src/haikumenu.c (run_menu_bar_help_event): Ignore invalid help
    events instead of aborting.
---
 src/haiku_support.cc |  2 --
 src/haiku_support.h  | 22 ++--------------------
 src/haikumenu.c      |  2 +-
 3 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/src/haiku_support.cc b/src/haiku_support.cc
index 2143f14dc9..6cdc4e31be 100644
--- a/src/haiku_support.cc
+++ b/src/haiku_support.cc
@@ -82,8 +82,6 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>.  */
 #include <csignal>
 #include <cfloat>
 
-#include <pthread.h>
-
 #ifdef USE_BE_CAIRO
 #include <cairo.h>
 #endif
diff --git a/src/haiku_support.h b/src/haiku_support.h
index 8aeaf48787..bccef2628b 100644
--- a/src/haiku_support.h
+++ b/src/haiku_support.h
@@ -437,32 +437,14 @@ struct haiku_session_manager_reply
    dimensions of a BRect, instead of relying on the broken Width and
    Height functions.  */
 
-#define BE_RECT_HEIGHT(rect) (ceil (((rect).bottom - (rect).top) + 1))
-#define BE_RECT_WIDTH(rect) (ceil (((rect).right - (rect).left) + 1))
+#define BE_RECT_HEIGHT(rect)   (ceil (((rect).bottom - (rect).top) + 1))
+#define BE_RECT_WIDTH(rect)    (ceil (((rect).right - (rect).left) + 1))
 #endif /* __cplusplus */
 
-/* C++ code cannot include lisp.h, but file dialogs need to be able
-   to bind to the specpdl and handle quitting correctly.  */
-
-#ifdef __cplusplus
-#if SIZE_MAX > 0xffffffff
-#define WRAP_SPECPDL_REF 1
-#endif
-#ifdef WRAP_SPECPDL_REF
-typedef struct { ptrdiff_t bytes; } specpdl_ref;
-#else
-typedef ptrdiff_t specpdl_ref;
-#endif
-
-#else
-#include "lisp.h"
-#endif
-
 #ifdef __cplusplus
 extern "C"
 {
 #endif
-#include <pthread.h>
 #include <OS.h>
 
 #ifdef __cplusplus
diff --git a/src/haikumenu.c b/src/haikumenu.c
index 9779c34a99..57fc7fd7c3 100644
--- a/src/haikumenu.c
+++ b/src/haikumenu.c
@@ -728,7 +728,7 @@ run_menu_bar_help_event (struct frame *f, int mb_idx)
 
   vec = f->menu_bar_vector;
   if ((mb_idx + MENU_ITEMS_ITEM_HELP) >= ASIZE (vec))
-    emacs_abort ();
+    return;
 
   help = AREF (vec, mb_idx + MENU_ITEMS_ITEM_HELP);
   if (STRINGP (help) || NILP (help))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]