diff options
| author | Tom Tromey | 2018-07-06 21:56:17 -0600 |
|---|---|---|
| committer | Tom Tromey | 2018-07-12 22:12:27 -0600 |
| commit | 42fe787b0f26c2df682b2797407a669ef8522ccb (patch) | |
| tree | e944fe465e2b65703a8361bc82647faf4f7907f1 /src/kqueue.c | |
| parent | 01dbf2a347944497fdcf2ec156f4605020d7ba2a (diff) | |
| download | emacs-42fe787b0f26c2df682b2797407a669ef8522ccb.tar.gz emacs-42fe787b0f26c2df682b2797407a669ef8522ccb.zip | |
Rename integerp->fixnum, etc, in preparation for bignums
* src/json.c, src/keyboard.c, src/keyboard.h, src/keymap.c,
src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c,
src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c,
src/process.c, src/profiler.c, src/search.c, src/sound.c,
src/syntax.c, src/sysdep.c, src/term.c, src/terminal.c,
src/textprop.c, src/undo.c, src/w16select.c, src/w32.c,
src/w32console.c, src/w32cygwinx.c, src/w32fns.c, src/w32font.c,
src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c,
src/w32uniscribe.c, src/widget.c, src/window.c, src/xdisp.c,
src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c,
src/xrdb.c, src/xselect.c, src/xterm.c, src/xwidget.c: Rename
INTEGERP->FIXNUM, make_number->make_fixnum, CHECK_NUMBER->CHECK_FIXNUM,
make_natnum->make_fixed_natum, NUMBERP->FIXED_OR_FLOATP,
NATNUMP->FIXNATP, CHECK_NATNUM->CHECK_FIXNAT.
Diffstat (limited to 'src/kqueue.c')
| -rw-r--r-- | src/kqueue.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/kqueue.c b/src/kqueue.c index 7a4f6a471c4..b45c316b93b 100644 --- a/src/kqueue.c +++ b/src/kqueue.c | |||
| @@ -55,15 +55,15 @@ kqueue_directory_listing (Lisp_Object directory_files) | |||
| 55 | 55 | ||
| 56 | result = Fcons | 56 | result = Fcons |
| 57 | (list5 (/* inode. */ | 57 | (list5 (/* inode. */ |
| 58 | Fnth (make_number (11), XCAR (dl)), | 58 | Fnth (make_fixnum (11), XCAR (dl)), |
| 59 | /* filename. */ | 59 | /* filename. */ |
| 60 | XCAR (XCAR (dl)), | 60 | XCAR (XCAR (dl)), |
| 61 | /* last modification time. */ | 61 | /* last modification time. */ |
| 62 | Fnth (make_number (6), XCAR (dl)), | 62 | Fnth (make_fixnum (6), XCAR (dl)), |
| 63 | /* last status change time. */ | 63 | /* last status change time. */ |
| 64 | Fnth (make_number (7), XCAR (dl)), | 64 | Fnth (make_fixnum (7), XCAR (dl)), |
| 65 | /* size. */ | 65 | /* size. */ |
| 66 | Fnth (make_number (8), XCAR (dl))), | 66 | Fnth (make_fixnum (8), XCAR (dl))), |
| 67 | result); | 67 | result); |
| 68 | } | 68 | } |
| 69 | return result; | 69 | return result; |
| @@ -78,7 +78,7 @@ kqueue_generate_event (Lisp_Object watch_object, Lisp_Object actions, | |||
| 78 | struct input_event event; | 78 | struct input_event event; |
| 79 | 79 | ||
| 80 | /* Check, whether all actions shall be monitored. */ | 80 | /* Check, whether all actions shall be monitored. */ |
| 81 | flags = Fnth (make_number (2), watch_object); | 81 | flags = Fnth (make_fixnum (2), watch_object); |
| 82 | action = actions; | 82 | action = actions; |
| 83 | do { | 83 | do { |
| 84 | if (NILP (action)) | 84 | if (NILP (action)) |
| @@ -101,7 +101,7 @@ kqueue_generate_event (Lisp_Object watch_object, Lisp_Object actions, | |||
| 101 | NILP (file1) | 101 | NILP (file1) |
| 102 | ? Fcons (file, Qnil) | 102 | ? Fcons (file, Qnil) |
| 103 | : list2 (file, file1))), | 103 | : list2 (file, file1))), |
| 104 | Fnth (make_number (3), watch_object)); | 104 | Fnth (make_fixnum (3), watch_object)); |
| 105 | kbd_buffer_store_event (&event); | 105 | kbd_buffer_store_event (&event); |
| 106 | } | 106 | } |
| 107 | } | 107 | } |
| @@ -121,7 +121,7 @@ kqueue_compare_dir_list (Lisp_Object watch_object) | |||
| 121 | pending_dl = Qnil; | 121 | pending_dl = Qnil; |
| 122 | deleted_dl = Qnil; | 122 | deleted_dl = Qnil; |
| 123 | 123 | ||
| 124 | old_directory_files = Fnth (make_number (4), watch_object); | 124 | old_directory_files = Fnth (make_fixnum (4), watch_object); |
| 125 | old_dl = kqueue_directory_listing (old_directory_files); | 125 | old_dl = kqueue_directory_listing (old_directory_files); |
| 126 | 126 | ||
| 127 | /* When the directory is not accessible anymore, it has been deleted. */ | 127 | /* When the directory is not accessible anymore, it has been deleted. */ |
| @@ -155,14 +155,14 @@ kqueue_compare_dir_list (Lisp_Object watch_object) | |||
| 155 | if (strcmp (SSDATA (XCAR (XCDR (old_entry))), | 155 | if (strcmp (SSDATA (XCAR (XCDR (old_entry))), |
| 156 | SSDATA (XCAR (XCDR (new_entry)))) == 0) { | 156 | SSDATA (XCAR (XCDR (new_entry)))) == 0) { |
| 157 | /* Modification time has been changed, the file has been written. */ | 157 | /* Modification time has been changed, the file has been written. */ |
| 158 | if (NILP (Fequal (Fnth (make_number (2), old_entry), | 158 | if (NILP (Fequal (Fnth (make_fixnum (2), old_entry), |
| 159 | Fnth (make_number (2), new_entry)))) | 159 | Fnth (make_fixnum (2), new_entry)))) |
| 160 | kqueue_generate_event | 160 | kqueue_generate_event |
| 161 | (watch_object, Fcons (Qwrite, Qnil), XCAR (XCDR (old_entry)), Qnil); | 161 | (watch_object, Fcons (Qwrite, Qnil), XCAR (XCDR (old_entry)), Qnil); |
| 162 | /* Status change time has been changed, the file attributes | 162 | /* Status change time has been changed, the file attributes |
| 163 | have changed. */ | 163 | have changed. */ |
| 164 | if (NILP (Fequal (Fnth (make_number (3), old_entry), | 164 | if (NILP (Fequal (Fnth (make_fixnum (3), old_entry), |
| 165 | Fnth (make_number (3), new_entry)))) | 165 | Fnth (make_fixnum (3), new_entry)))) |
| 166 | kqueue_generate_event | 166 | kqueue_generate_event |
| 167 | (watch_object, Fcons (Qattrib, Qnil), | 167 | (watch_object, Fcons (Qattrib, Qnil), |
| 168 | XCAR (XCDR (old_entry)), Qnil); | 168 | XCAR (XCDR (old_entry)), Qnil); |
| @@ -233,7 +233,7 @@ kqueue_compare_dir_list (Lisp_Object watch_object) | |||
| 233 | (watch_object, Fcons (Qcreate, Qnil), XCAR (XCDR (entry)), Qnil); | 233 | (watch_object, Fcons (Qcreate, Qnil), XCAR (XCDR (entry)), Qnil); |
| 234 | 234 | ||
| 235 | /* Check size of that file. */ | 235 | /* Check size of that file. */ |
| 236 | Lisp_Object size = Fnth (make_number (4), entry); | 236 | Lisp_Object size = Fnth (make_fixnum (4), entry); |
| 237 | if (FLOATP (size) || (XINT (size) > 0)) | 237 | if (FLOATP (size) || (XINT (size) > 0)) |
| 238 | kqueue_generate_event | 238 | kqueue_generate_event |
| 239 | (watch_object, Fcons (Qwrite, Qnil), XCAR (XCDR (entry)), Qnil); | 239 | (watch_object, Fcons (Qwrite, Qnil), XCAR (XCDR (entry)), Qnil); |
| @@ -270,7 +270,7 @@ kqueue_compare_dir_list (Lisp_Object watch_object) | |||
| 270 | report_file_error ("Pending events list not empty", pending_dl); | 270 | report_file_error ("Pending events list not empty", pending_dl); |
| 271 | 271 | ||
| 272 | /* Replace old directory listing with the new one. */ | 272 | /* Replace old directory listing with the new one. */ |
| 273 | XSETCDR (Fnthcdr (make_number (3), watch_object), | 273 | XSETCDR (Fnthcdr (make_fixnum (3), watch_object), |
| 274 | Fcons (new_directory_files, Qnil)); | 274 | Fcons (new_directory_files, Qnil)); |
| 275 | return; | 275 | return; |
| 276 | } | 276 | } |
| @@ -293,7 +293,7 @@ kqueue_callback (int fd, void *data) | |||
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | /* Determine descriptor and file name. */ | 295 | /* Determine descriptor and file name. */ |
| 296 | descriptor = make_number (kev.ident); | 296 | descriptor = make_fixnum (kev.ident); |
| 297 | watch_object = assq_no_quit (descriptor, watch_list); | 297 | watch_object = assq_no_quit (descriptor, watch_list); |
| 298 | if (CONSP (watch_object)) | 298 | if (CONSP (watch_object)) |
| 299 | file = XCAR (XCDR (watch_object)); | 299 | file = XCAR (XCDR (watch_object)); |
| @@ -306,7 +306,7 @@ kqueue_callback (int fd, void *data) | |||
| 306 | actions = Fcons (Qdelete, actions); | 306 | actions = Fcons (Qdelete, actions); |
| 307 | if (kev.fflags & NOTE_WRITE) { | 307 | if (kev.fflags & NOTE_WRITE) { |
| 308 | /* Check, whether this is a directory event. */ | 308 | /* Check, whether this is a directory event. */ |
| 309 | if (NILP (Fnth (make_number (4), watch_object))) | 309 | if (NILP (Fnth (make_fixnum (4), watch_object))) |
| 310 | actions = Fcons (Qwrite, actions); | 310 | actions = Fcons (Qwrite, actions); |
| 311 | else | 311 | else |
| 312 | kqueue_compare_dir_list (watch_object); | 312 | kqueue_compare_dir_list (watch_object); |
| @@ -449,7 +449,7 @@ only when the upper directory of the renamed file is watched. */) | |||
| 449 | } | 449 | } |
| 450 | 450 | ||
| 451 | /* Store watch object in watch list. */ | 451 | /* Store watch object in watch list. */ |
| 452 | Lisp_Object watch_descriptor = make_number (fd); | 452 | Lisp_Object watch_descriptor = make_fixnum (fd); |
| 453 | if (NILP (Ffile_directory_p (file))) | 453 | if (NILP (Ffile_directory_p (file))) |
| 454 | watch_object = list4 (watch_descriptor, file, flags, callback); | 454 | watch_object = list4 (watch_descriptor, file, flags, callback); |
| 455 | else { | 455 | else { |
| @@ -473,7 +473,7 @@ WATCH-DESCRIPTOR should be an object returned by `kqueue-add-watch'. */) | |||
| 473 | xsignal2 (Qfile_notify_error, build_string ("Not a watch descriptor"), | 473 | xsignal2 (Qfile_notify_error, build_string ("Not a watch descriptor"), |
| 474 | watch_descriptor); | 474 | watch_descriptor); |
| 475 | 475 | ||
| 476 | eassert (INTEGERP (watch_descriptor)); | 476 | eassert (FIXNUMP (watch_descriptor)); |
| 477 | int fd = XINT (watch_descriptor); | 477 | int fd = XINT (watch_descriptor); |
| 478 | if ( fd >= 0) | 478 | if ( fd >= 0) |
| 479 | emacs_close (fd); | 479 | emacs_close (fd); |