diff options
| author | Karl Heuer | 1994-09-27 01:53:42 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-09-27 01:53:42 +0000 |
| commit | bcd69aea93e6c0c90b18a928f56ce8eeacc92f60 (patch) | |
| tree | 68a84e0f9756524fa4d3a641b78d8b1f05c87ce5 | |
| parent | bdd3a8023b1b31c9630416e59c4ed466e906927a (diff) | |
| download | emacs-bcd69aea93e6c0c90b18a928f56ce8eeacc92f60.tar.gz emacs-bcd69aea93e6c0c90b18a928f56ce8eeacc92f60.zip | |
(decode_status, Fprocessp, Fget_process, Fget_buffer_process, Fprocess_status,
Fprocess_exit_status, list_processes_1, Fstart_process, Fopen_network_stream,
Faccept_process_output, wait_reading_process_input, sigchld_handler,
status_notify): Use type test macros.
| -rw-r--r-- | src/process.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/process.c b/src/process.c index d23ba40552b..fee7fda86f6 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -307,7 +307,7 @@ decode_status (l, symbol, code, coredump) | |||
| 307 | { | 307 | { |
| 308 | Lisp_Object tem; | 308 | Lisp_Object tem; |
| 309 | 309 | ||
| 310 | if (XTYPE (l) == Lisp_Symbol) | 310 | if (SYMBOLP (l)) |
| 311 | { | 311 | { |
| 312 | *symbol = l; | 312 | *symbol = l; |
| 313 | *code = 0; | 313 | *code = 0; |
| @@ -513,7 +513,7 @@ DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0, | |||
| 513 | (obj) | 513 | (obj) |
| 514 | Lisp_Object obj; | 514 | Lisp_Object obj; |
| 515 | { | 515 | { |
| 516 | return XTYPE (obj) == Lisp_Process ? Qt : Qnil; | 516 | return PROCESSP (obj) ? Qt : Qnil; |
| 517 | } | 517 | } |
| 518 | 518 | ||
| 519 | DEFUN ("get-process", Fget_process, Sget_process, 1, 1, 0, | 519 | DEFUN ("get-process", Fget_process, Sget_process, 1, 1, 0, |
| @@ -521,7 +521,7 @@ DEFUN ("get-process", Fget_process, Sget_process, 1, 1, 0, | |||
| 521 | (name) | 521 | (name) |
| 522 | register Lisp_Object name; | 522 | register Lisp_Object name; |
| 523 | { | 523 | { |
| 524 | if (XTYPE (name) == Lisp_Process) | 524 | if (PROCESSP (name)) |
| 525 | return name; | 525 | return name; |
| 526 | CHECK_STRING (name, 0); | 526 | CHECK_STRING (name, 0); |
| 527 | return Fcdr (Fassoc (name, Vprocess_alist)); | 527 | return Fcdr (Fassoc (name, Vprocess_alist)); |
| @@ -542,7 +542,7 @@ BUFFER may be a buffer or the name of one.") | |||
| 542 | for (tail = Vprocess_alist; !NILP (tail); tail = Fcdr (tail)) | 542 | for (tail = Vprocess_alist; !NILP (tail); tail = Fcdr (tail)) |
| 543 | { | 543 | { |
| 544 | proc = Fcdr (Fcar (tail)); | 544 | proc = Fcdr (Fcar (tail)); |
| 545 | if (XTYPE (proc) == Lisp_Process && EQ (XPROCESS (proc)->buffer, buf)) | 545 | if (PROCESSP (proc) && EQ (XPROCESS (proc)->buffer, buf)) |
| 546 | return proc; | 546 | return proc; |
| 547 | } | 547 | } |
| 548 | return Qnil; | 548 | return Qnil; |
| @@ -644,7 +644,7 @@ nil, indicating the current buffer's process.") | |||
| 644 | if (!NILP (p->raw_status_low)) | 644 | if (!NILP (p->raw_status_low)) |
| 645 | update_status (p); | 645 | update_status (p); |
| 646 | status = p->status; | 646 | status = p->status; |
| 647 | if (XTYPE (status) == Lisp_Cons) | 647 | if (CONSP (status)) |
| 648 | status = XCONS (status)->car; | 648 | status = XCONS (status)->car; |
| 649 | if (NETCONN_P (proc)) | 649 | if (NETCONN_P (proc)) |
| 650 | { | 650 | { |
| @@ -666,7 +666,7 @@ If PROCESS has not yet exited or died, return 0.") | |||
| 666 | CHECK_PROCESS (proc, 0); | 666 | CHECK_PROCESS (proc, 0); |
| 667 | if (!NILP (XPROCESS (proc)->raw_status_low)) | 667 | if (!NILP (XPROCESS (proc)->raw_status_low)) |
| 668 | update_status (XPROCESS (proc)); | 668 | update_status (XPROCESS (proc)); |
| 669 | if (XTYPE (XPROCESS (proc)->status) == Lisp_Cons) | 669 | if (CONSP (XPROCESS (proc)->status)) |
| 670 | return XCONS (XCONS (XPROCESS (proc)->status)->cdr)->car; | 670 | return XCONS (XCONS (XPROCESS (proc)->status)->cdr)->car; |
| 671 | return make_number (0); | 671 | return make_number (0); |
| 672 | } | 672 | } |
| @@ -888,7 +888,7 @@ Proc Status Buffer Command\n\ | |||
| 888 | if (!NILP (p->raw_status_low)) | 888 | if (!NILP (p->raw_status_low)) |
| 889 | update_status (p); | 889 | update_status (p); |
| 890 | symbol = p->status; | 890 | symbol = p->status; |
| 891 | if (XTYPE (p->status) == Lisp_Cons) | 891 | if (CONSP (p->status)) |
| 892 | symbol = XCONS (p->status)->car; | 892 | symbol = XCONS (p->status)->car; |
| 893 | 893 | ||
| 894 | 894 | ||
| @@ -1123,7 +1123,7 @@ static Lisp_Object | |||
| 1123 | start_process_unwind (proc) | 1123 | start_process_unwind (proc) |
| 1124 | Lisp_Object proc; | 1124 | Lisp_Object proc; |
| 1125 | { | 1125 | { |
| 1126 | if (XTYPE (proc) != Lisp_Process) | 1126 | if (!PROCESSP (proc)) |
| 1127 | abort (); | 1127 | abort (); |
| 1128 | 1128 | ||
| 1129 | /* Was PROC started successfully? */ | 1129 | /* Was PROC started successfully? */ |
| @@ -1522,7 +1522,7 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\ | |||
| 1522 | GCPRO4 (name, buffer, host, service); | 1522 | GCPRO4 (name, buffer, host, service); |
| 1523 | CHECK_STRING (name, 0); | 1523 | CHECK_STRING (name, 0); |
| 1524 | CHECK_STRING (host, 0); | 1524 | CHECK_STRING (host, 0); |
| 1525 | if (XTYPE (service) == Lisp_Int) | 1525 | if (INTEGERP (service)) |
| 1526 | port = htons ((unsigned short) XINT (service)); | 1526 | port = htons ((unsigned short) XINT (service)); |
| 1527 | else | 1527 | else |
| 1528 | { | 1528 | { |
| @@ -1758,7 +1758,7 @@ Return non-nil iff we received any output before the timeout expired.") | |||
| 1758 | { | 1758 | { |
| 1759 | CHECK_NUMBER (timeout_msecs, 2); | 1759 | CHECK_NUMBER (timeout_msecs, 2); |
| 1760 | useconds = XINT (timeout_msecs); | 1760 | useconds = XINT (timeout_msecs); |
| 1761 | if (XTYPE (timeout) != Lisp_Int) | 1761 | if (!INTEGERP (timeout)) |
| 1762 | XSET (timeout, Lisp_Int, 0); | 1762 | XSET (timeout, Lisp_Int, 0); |
| 1763 | 1763 | ||
| 1764 | { | 1764 | { |
| @@ -1866,7 +1866,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 1866 | 1866 | ||
| 1867 | /* If read_kbd is a process to watch, set wait_proc and wait_channel | 1867 | /* If read_kbd is a process to watch, set wait_proc and wait_channel |
| 1868 | accordingly. */ | 1868 | accordingly. */ |
| 1869 | if (XTYPE (read_kbd) == Lisp_Process) | 1869 | if (PROCESSP (read_kbd)) |
| 1870 | { | 1870 | { |
| 1871 | wait_proc = XPROCESS (read_kbd); | 1871 | wait_proc = XPROCESS (read_kbd); |
| 1872 | wait_channel = XINT (wait_proc->infd); | 1872 | wait_channel = XINT (wait_proc->infd); |
| @@ -1874,7 +1874,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 1874 | } | 1874 | } |
| 1875 | 1875 | ||
| 1876 | /* If waiting for non-nil in a cell, record where. */ | 1876 | /* If waiting for non-nil in a cell, record where. */ |
| 1877 | if (XTYPE (read_kbd) == Lisp_Cons) | 1877 | if (CONSP (read_kbd)) |
| 1878 | { | 1878 | { |
| 1879 | wait_for_cell = &XCONS (read_kbd)->car; | 1879 | wait_for_cell = &XCONS (read_kbd)->car; |
| 1880 | XFASTINT (read_kbd) = 0; | 1880 | XFASTINT (read_kbd) = 0; |
| @@ -3040,7 +3040,7 @@ sigchld_handler (signo) | |||
| 3040 | { | 3040 | { |
| 3041 | proc = XCONS (XCONS (tail)->car)->cdr; | 3041 | proc = XCONS (XCONS (tail)->car)->cdr; |
| 3042 | p = XPROCESS (proc); | 3042 | p = XPROCESS (proc); |
| 3043 | if (XTYPE (p->pid) == Lisp_Int && XINT (p->pid) == -1) | 3043 | if (INTEGERP (p->pid) && XINT (p->pid) == -1) |
| 3044 | break; | 3044 | break; |
| 3045 | p = 0; | 3045 | p = 0; |
| 3046 | } | 3046 | } |
| @@ -3215,7 +3215,7 @@ status_notify () | |||
| 3215 | 3215 | ||
| 3216 | /* If process is terminated, deactivate it or delete it. */ | 3216 | /* If process is terminated, deactivate it or delete it. */ |
| 3217 | symbol = p->status; | 3217 | symbol = p->status; |
| 3218 | if (XTYPE (p->status) == Lisp_Cons) | 3218 | if (CONSP (p->status)) |
| 3219 | symbol = XCONS (p->status)->car; | 3219 | symbol = XCONS (p->status)->car; |
| 3220 | 3220 | ||
| 3221 | if (EQ (symbol, Qsignal) || EQ (symbol, Qexit) | 3221 | if (EQ (symbol, Qsignal) || EQ (symbol, Qexit) |