diff options
| author | Po Lu | 2022-03-14 06:48:34 +0000 |
|---|---|---|
| committer | Po Lu | 2022-03-14 06:48:53 +0000 |
| commit | a1fa3d24d7f96542530f30c28daf9bf8aaaeae13 (patch) | |
| tree | 49da62e68b1ab8303b53966a1f73645268275d9a /src | |
| parent | 1a07854e0e8825da1d1acfc1701eb30787546ee5 (diff) | |
| download | emacs-a1fa3d24d7f96542530f30c28daf9bf8aaaeae13.tar.gz emacs-a1fa3d24d7f96542530f30c28daf9bf8aaaeae13.zip | |
Clean up some Haiku toolkit code
* src/haiku_io.c (haiku_read_with_timeout): Accept `bigtime_t'
instead of `time_t' for values which are cast to bigtime_t
anyway.
* src/haiku_support.cc (BMenu_run): Read all help events instead
of just one.
* src/haiku_support.h: Update prototypes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/haiku_io.c | 2 | ||||
| -rw-r--r-- | src/haiku_support.cc | 2 | ||||
| -rw-r--r-- | src/haiku_support.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/haiku_io.c b/src/haiku_io.c index ff684df4337..f9fa4095f9f 100644 --- a/src/haiku_io.c +++ b/src/haiku_io.c | |||
| @@ -145,7 +145,7 @@ haiku_read (enum haiku_event_type *type, void *buf, ssize_t len) | |||
| 145 | Input is blocked when an attempt to read is in progress. */ | 145 | Input is blocked when an attempt to read is in progress. */ |
| 146 | int | 146 | int |
| 147 | haiku_read_with_timeout (enum haiku_event_type *type, void *buf, ssize_t len, | 147 | haiku_read_with_timeout (enum haiku_event_type *type, void *buf, ssize_t len, |
| 148 | time_t timeout, bool popup_menu_p) | 148 | bigtime_t timeout, bool popup_menu_p) |
| 149 | { | 149 | { |
| 150 | int32 typ; | 150 | int32 typ; |
| 151 | port_id from = (popup_menu_p | 151 | port_id from = (popup_menu_p |
diff --git a/src/haiku_support.cc b/src/haiku_support.cc index cb8ffaf2d7b..27d4bbafaf7 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc | |||
| @@ -2957,7 +2957,7 @@ BMenu_run (void *menu, int x, int y, | |||
| 2957 | 2957 | ||
| 2958 | if (infos[0].events & B_EVENT_READ) | 2958 | if (infos[0].events & B_EVENT_READ) |
| 2959 | { | 2959 | { |
| 2960 | if (!haiku_read_with_timeout (&type, buf, 200, 1000000, true)) | 2960 | while (!haiku_read_with_timeout (&type, buf, 200, 0, true)) |
| 2961 | { | 2961 | { |
| 2962 | switch (type) | 2962 | switch (type) |
| 2963 | { | 2963 | { |
diff --git a/src/haiku_support.h b/src/haiku_support.h index 8b21fafad73..41bd1e1c84f 100644 --- a/src/haiku_support.h +++ b/src/haiku_support.h | |||
| @@ -420,7 +420,7 @@ extern "C" | |||
| 420 | 420 | ||
| 421 | extern int | 421 | extern int |
| 422 | haiku_read_with_timeout (enum haiku_event_type *type, void *buf, ssize_t len, | 422 | haiku_read_with_timeout (enum haiku_event_type *type, void *buf, ssize_t len, |
| 423 | time_t timeout, bool popup_menu_p); | 423 | bigtime_t timeout, bool popup_menu_p); |
| 424 | 424 | ||
| 425 | extern int | 425 | extern int |
| 426 | haiku_write (enum haiku_event_type type, void *buf); | 426 | haiku_write (enum haiku_event_type type, void *buf); |