aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorPaul Eggert2017-01-25 21:13:19 -0800
committerPaul Eggert2017-01-25 21:25:37 -0800
commitb3a3ed526d2c490c9c5605707f0cd7bff3c88693 (patch)
tree096de6603250aafcab11c31876d39faecf1b2db4 /src/process.c
parent1392ec7420ee23238a1588b759c631d87a677483 (diff)
downloademacs-b3a3ed526d2c490c9c5605707f0cd7bff3c88693.tar.gz
emacs-b3a3ed526d2c490c9c5605707f0cd7bff3c88693.zip
Replace QUIT with maybe_quit
There’s no longer need to have QUIT stand for a slug of C statements. Use the more-obvious function-call syntax instead. Also, use true and false when setting immediate_quit. These changes should not affect the generated machine code. * src/lisp.h (QUIT): Remove. All uses replaced by maybe_quit.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/process.c b/src/process.c
index ab9657b15a4..dbd4358dd1a 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3431,8 +3431,8 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
3431 break; 3431 break;
3432 } 3432 }
3433 3433
3434 immediate_quit = 1; 3434 immediate_quit = true;
3435 QUIT; 3435 maybe_quit ();
3436 3436
3437 ret = connect (s, sa, addrlen); 3437 ret = connect (s, sa, addrlen);
3438 xerrno = errno; 3438 xerrno = errno;
@@ -3459,7 +3459,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
3459 retry_select: 3459 retry_select:
3460 FD_ZERO (&fdset); 3460 FD_ZERO (&fdset);
3461 FD_SET (s, &fdset); 3461 FD_SET (s, &fdset);
3462 QUIT; 3462 maybe_quit ();
3463 sc = pselect (s + 1, NULL, &fdset, NULL, NULL, NULL); 3463 sc = pselect (s + 1, NULL, &fdset, NULL, NULL, NULL);
3464 if (sc == -1) 3464 if (sc == -1)
3465 { 3465 {
@@ -3481,7 +3481,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
3481 } 3481 }
3482#endif /* !WINDOWSNT */ 3482#endif /* !WINDOWSNT */
3483 3483
3484 immediate_quit = 0; 3484 immediate_quit = false;
3485 3485
3486 /* Discard the unwind protect closing S. */ 3486 /* Discard the unwind protect closing S. */
3487 specpdl_ptr = specpdl + count; 3487 specpdl_ptr = specpdl + count;
@@ -3539,7 +3539,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
3539#endif 3539#endif
3540 } 3540 }
3541 3541
3542 immediate_quit = 0; 3542 immediate_quit = false;
3543 3543
3544 if (s < 0) 3544 if (s < 0)
3545 { 3545 {
@@ -4012,8 +4012,8 @@ usage: (make-network-process &rest ARGS) */)
4012 struct addrinfo *res, *lres; 4012 struct addrinfo *res, *lres;
4013 int ret; 4013 int ret;
4014 4014
4015 immediate_quit = 1; 4015 immediate_quit = true;
4016 QUIT; 4016 maybe_quit ();
4017 4017
4018 struct addrinfo hints; 4018 struct addrinfo hints;
4019 memset (&hints, 0, sizeof hints); 4019 memset (&hints, 0, sizeof hints);
@@ -4034,7 +4034,7 @@ usage: (make-network-process &rest ARGS) */)
4034#else 4034#else
4035 error ("%s/%s getaddrinfo error %d", SSDATA (host), portstring, ret); 4035 error ("%s/%s getaddrinfo error %d", SSDATA (host), portstring, ret);
4036#endif 4036#endif
4037 immediate_quit = 0; 4037 immediate_quit = false;
4038 4038
4039 for (lres = res; lres; lres = lres->ai_next) 4039 for (lres = res; lres; lres = lres->ai_next)
4040 addrinfos = Fcons (conv_addrinfo_to_lisp (lres), addrinfos); 4040 addrinfos = Fcons (conv_addrinfo_to_lisp (lres), addrinfos);
@@ -5020,7 +5020,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
5020 since we want to return C-g as an input character. 5020 since we want to return C-g as an input character.
5021 Otherwise, do pending quit if requested. */ 5021 Otherwise, do pending quit if requested. */
5022 if (read_kbd >= 0) 5022 if (read_kbd >= 0)
5023 QUIT; 5023 maybe_quit ();
5024 else if (pending_signals) 5024 else if (pending_signals)
5025 process_pending_signals (); 5025 process_pending_signals ();
5026 5026
@@ -5748,7 +5748,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
5748 { 5748 {
5749 /* Prevent input_pending from remaining set if we quit. */ 5749 /* Prevent input_pending from remaining set if we quit. */
5750 clear_input_pending (); 5750 clear_input_pending ();
5751 QUIT; 5751 maybe_quit ();
5752 } 5752 }
5753 5753
5754 return got_some_output; 5754 return got_some_output;
@@ -7486,7 +7486,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
7486 since we want to return C-g as an input character. 7486 since we want to return C-g as an input character.
7487 Otherwise, do pending quit if requested. */ 7487 Otherwise, do pending quit if requested. */
7488 if (read_kbd >= 0) 7488 if (read_kbd >= 0)
7489 QUIT; 7489 maybe_quit ();
7490 7490
7491 /* Exit now if the cell we're waiting for became non-nil. */ 7491 /* Exit now if the cell we're waiting for became non-nil. */
7492 if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) 7492 if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell)))