diff options
| author | Paul Eggert | 2013-08-27 11:47:55 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-08-27 11:47:55 -0700 |
| commit | 43aac990c339c0fc3304aa476ebc8ea8467f107e (patch) | |
| tree | 24f6477d7ec79c7f3529e08c421f309b1180c436 /src/keyboard.h | |
| parent | 278208b8e6917af1e7e2623a3869614fa70059ed (diff) | |
| download | emacs-43aac990c339c0fc3304aa476ebc8ea8467f107e.tar.gz emacs-43aac990c339c0fc3304aa476ebc8ea8467f107e.zip | |
Simplify EMACS_TIME-related code.
This portability layer is no longer needed, since Emacs has been
using struct timespec as a portability layer for some time.
Merge from gnulib, incorporating:
2013-08-27 timespec: new convenience constants and function
* src/atimer.h, src/buffer.h, src/dispextern.h, src/xgselect.h:
Include <time.h> rather than "systime.h"; that's all that's needed now.
* src/dispnew.c: Include <timespec.h> rather than "systime.h";
that's all that's needed now.
* src/systime.h (EMACS_TIME): Remove. All uses changed to struct timespec.
(EMACS_TIME_RESOLUTION): Remove. All uses changed to
TIMESPEC_RESOLUTION.
(LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to
LOG10_TIMESPEC_RESOLUTION.
(EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec.
(EMACS_NSECS): Remove. All uses changed to tv_nsec.
(make_emacs_time): Remove. All used changed to make_timespec.
(invalid_timespec): Rename from invalid_emacs_time. All uses changed.
(current_timespec): Rename from current_emacs_time. All uses changed.
(add_emacs_time): Remove. All uses changed to timespec_add.
(sub_emacs_time): Remove. All uses change dot timespec_sub.
(EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign.
(timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed.
(EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec.
(EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod.
(current_timespec): Rename from current_emacs_time. All uses changed.
(EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses
changed to timespec_cmp.
* src/xgselect.c: Include <timespec.h>, since our .h files don't.
Diffstat (limited to 'src/keyboard.h')
| -rw-r--r-- | src/keyboard.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/keyboard.h b/src/keyboard.h index daba94898d8..0953f1b7cfd 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -17,7 +17,7 @@ GNU General Public License for more details. | |||
| 17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License |
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 19 | 19 | ||
| 20 | #include "systime.h" /* for EMACS_TIME, Time */ | 20 | #include "systime.h" /* for struct timespec, Time */ |
| 21 | #include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */ | 21 | #include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */ |
| 22 | 22 | ||
| 23 | INLINE_HEADER_BEGIN | 23 | INLINE_HEADER_BEGIN |
| @@ -466,9 +466,9 @@ extern Lisp_Object Qmode_line, Qvertical_line, Qheader_line; | |||
| 466 | /* True while doing kbd input. */ | 466 | /* True while doing kbd input. */ |
| 467 | extern bool waiting_for_input; | 467 | extern bool waiting_for_input; |
| 468 | 468 | ||
| 469 | /* Address (if not 0) of EMACS_TIME to zero out if a SIGIO interrupt | 469 | /* Address (if not 0) of struct timespec to zero out if a SIGIO interrupt |
| 470 | happens. */ | 470 | happens. */ |
| 471 | extern EMACS_TIME *input_available_clear_time; | 471 | extern struct timespec *input_available_clear_time; |
| 472 | 472 | ||
| 473 | #if defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS | 473 | #if defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS |
| 474 | extern bool ignore_mouse_drag_p; | 474 | extern bool ignore_mouse_drag_p; |
| @@ -483,7 +483,7 @@ struct input_event; | |||
| 483 | extern Lisp_Object parse_modifiers (Lisp_Object); | 483 | extern Lisp_Object parse_modifiers (Lisp_Object); |
| 484 | extern Lisp_Object reorder_modifiers (Lisp_Object); | 484 | extern Lisp_Object reorder_modifiers (Lisp_Object); |
| 485 | extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object, | 485 | extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object, |
| 486 | bool *, EMACS_TIME *); | 486 | bool *, struct timespec *); |
| 487 | extern int parse_solitary_modifier (Lisp_Object symbol); | 487 | extern int parse_solitary_modifier (Lisp_Object symbol); |
| 488 | 488 | ||
| 489 | 489 | ||
| @@ -549,7 +549,7 @@ extern bool kbd_buffer_events_waiting (void); | |||
| 549 | extern void add_user_signal (int, const char *); | 549 | extern void add_user_signal (int, const char *); |
| 550 | 550 | ||
| 551 | extern int tty_read_avail_input (struct terminal *, struct input_event *); | 551 | extern int tty_read_avail_input (struct terminal *, struct input_event *); |
| 552 | extern EMACS_TIME timer_check (void); | 552 | extern struct timespec timer_check (void); |
| 553 | extern void mark_kboards (void); | 553 | extern void mark_kboards (void); |
| 554 | 554 | ||
| 555 | #ifdef HAVE_NTGUI | 555 | #ifdef HAVE_NTGUI |