Mercurial > emacs
comparison src/process.c @ 74406:6bc8bd6fe72c
(Qsignal): Declare extern.
(syms_of_process): Don't intern/staticpro them here.
(read_process_output): Abort if carryover < 0.
| author | Kim F. Storm <storm@cua.dk> |
|---|---|
| date | Mon, 04 Dec 2006 12:26:50 +0000 |
| parents | 182d429ba6f9 |
| children | 7f2e7cb6b161 |
comparison
equal
deleted
inserted
replaced
| 74405:8289a04178f1 | 74406:6bc8bd6fe72c |
|---|---|
| 147 #include "dispextern.h" | 147 #include "dispextern.h" |
| 148 #include "composite.h" | 148 #include "composite.h" |
| 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 |
| 156 Lisp_Object Qipv6; | 157 Lisp_Object Qipv6; |
| 157 #endif | 158 #endif |
| 5137 = system_eol_type; | 5138 = system_eol_type; |
| 5138 } | 5139 } |
| 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), |
| 5145 carryover); | 5149 carryover); |
| 5146 XSETINT (p->decoding_carryover, carryover); | 5150 XSETINT (p->decoding_carryover, carryover); |
| 5247 proc_encode_coding_system[XINT (p->outfd)]->eol_type | 5251 proc_encode_coding_system[XINT (p->outfd)]->eol_type |
| 5248 = system_eol_type; | 5252 = system_eol_type; |
| 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)) |
| 5260 text = (STRING_MULTIBYTE (text) | 5268 text = (STRING_MULTIBYTE (text) |
| 5261 ? Fstring_as_unibyte (text) | 5269 ? Fstring_as_unibyte (text) |
| 6995 staticpro (&Qprocessp); | 7003 staticpro (&Qprocessp); |
| 6996 Qrun = intern ("run"); | 7004 Qrun = intern ("run"); |
| 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. |
| 7005 | 7011 |
| 7006 Qexit = intern ("exit"); | 7012 Qexit = intern ("exit"); |
