diff options
| author | Kim F. Storm | 2006-12-04 12:26:50 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-12-04 12:26:50 +0000 |
| commit | d19c0a1c88f7ed7b76bff9c79726bfdae8fba1ed (patch) | |
| tree | cdf8f50c8ce60e7bbb4617a6e8bb8405aacea1b5 /src/process.c | |
| parent | 5c35ec32a51beaeae9e4233436816e1aeba053d0 (diff) | |
| download | emacs-d19c0a1c88f7ed7b76bff9c79726bfdae8fba1ed.tar.gz emacs-d19c0a1c88f7ed7b76bff9c79726bfdae8fba1ed.zip | |
(Qsignal): Declare extern.
(syms_of_process): Don't intern/staticpro them here.
(read_process_output): Abort if carryover < 0.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c index 512b231530b..ecaf808f23d 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -149,7 +149,8 @@ Boston, MA 02110-1301, USA. */ | |||
| 149 | #include "atimer.h" | 149 | #include "atimer.h" |
| 150 | 150 | ||
| 151 | Lisp_Object Qprocessp; | 151 | Lisp_Object Qprocessp; |
| 152 | Lisp_Object Qrun, Qstop, Qsignal; | 152 | Lisp_Object Qrun, Qstop; |
| 153 | extern Lisp_Object Qsignal; | ||
| 153 | Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; | 154 | Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; |
| 154 | Lisp_Object Qlocal, Qipv4, Qdatagram; | 155 | Lisp_Object Qlocal, Qipv4, Qdatagram; |
| 155 | #ifdef AF_INET6 | 156 | #ifdef AF_INET6 |
| @@ -5139,6 +5140,9 @@ read_process_output (proc, channel) | |||
| 5139 | } | 5140 | } |
| 5140 | 5141 | ||
| 5141 | carryover = nbytes - coding->consumed; | 5142 | carryover = nbytes - coding->consumed; |
| 5143 | if (carryover < 0) | ||
| 5144 | abort (); | ||
| 5145 | |||
| 5142 | if (SCHARS (p->decoding_buf) < carryover) | 5146 | if (SCHARS (p->decoding_buf) < carryover) |
| 5143 | p->decoding_buf = make_uninit_string (carryover); | 5147 | p->decoding_buf = make_uninit_string (carryover); |
| 5144 | bcopy (chars + coding->consumed, SDATA (p->decoding_buf), | 5148 | bcopy (chars + coding->consumed, SDATA (p->decoding_buf), |
| @@ -5249,11 +5253,15 @@ read_process_output (proc, channel) | |||
| 5249 | } | 5253 | } |
| 5250 | } | 5254 | } |
| 5251 | carryover = nbytes - coding->consumed; | 5255 | carryover = nbytes - coding->consumed; |
| 5256 | if (carryover < 0) | ||
| 5257 | abort (); | ||
| 5258 | |||
| 5252 | if (SCHARS (p->decoding_buf) < carryover) | 5259 | if (SCHARS (p->decoding_buf) < carryover) |
| 5253 | p->decoding_buf = make_uninit_string (carryover); | 5260 | p->decoding_buf = make_uninit_string (carryover); |
| 5254 | bcopy (chars + coding->consumed, SDATA (p->decoding_buf), | 5261 | bcopy (chars + coding->consumed, SDATA (p->decoding_buf), |
| 5255 | carryover); | 5262 | carryover); |
| 5256 | XSETINT (p->decoding_carryover, carryover); | 5263 | XSETINT (p->decoding_carryover, carryover); |
| 5264 | |||
| 5257 | /* Adjust the multibyteness of TEXT to that of the buffer. */ | 5265 | /* Adjust the multibyteness of TEXT to that of the buffer. */ |
| 5258 | if (NILP (current_buffer->enable_multibyte_characters) | 5266 | if (NILP (current_buffer->enable_multibyte_characters) |
| 5259 | != ! STRING_MULTIBYTE (text)) | 5267 | != ! STRING_MULTIBYTE (text)) |
| @@ -6997,8 +7005,6 @@ syms_of_process () | |||
| 6997 | staticpro (&Qrun); | 7005 | staticpro (&Qrun); |
| 6998 | Qstop = intern ("stop"); | 7006 | Qstop = intern ("stop"); |
| 6999 | staticpro (&Qstop); | 7007 | staticpro (&Qstop); |
| 7000 | Qsignal = intern ("signal"); | ||
| 7001 | staticpro (&Qsignal); | ||
| 7002 | 7008 | ||
| 7003 | /* Qexit is already staticpro'd by syms_of_eval; don't staticpro it | 7009 | /* Qexit is already staticpro'd by syms_of_eval; don't staticpro it |
| 7004 | here again. | 7010 | here again. |