From: Kim F. Storm Date: Mon, 4 Dec 2006 12:26:50 +0000 (+0000) Subject: (Qsignal): Declare extern. X-Git-Tag: emacs-pretest-22.0.92~317 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d19c0a1c88f7ed7b76bff9c79726bfdae8fba1ed;p=emacs.git (Qsignal): Declare extern. (syms_of_process): Don't intern/staticpro them here. (read_process_output): Abort if carryover < 0. --- 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. */ #include "atimer.h" Lisp_Object Qprocessp; -Lisp_Object Qrun, Qstop, Qsignal; +Lisp_Object Qrun, Qstop; +extern Lisp_Object Qsignal; Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; Lisp_Object Qlocal, Qipv4, Qdatagram; #ifdef AF_INET6 @@ -5139,6 +5140,9 @@ read_process_output (proc, channel) } carryover = nbytes - coding->consumed; + if (carryover < 0) + abort (); + if (SCHARS (p->decoding_buf) < carryover) p->decoding_buf = make_uninit_string (carryover); bcopy (chars + coding->consumed, SDATA (p->decoding_buf), @@ -5249,11 +5253,15 @@ read_process_output (proc, channel) } } carryover = nbytes - coding->consumed; + if (carryover < 0) + abort (); + if (SCHARS (p->decoding_buf) < carryover) p->decoding_buf = make_uninit_string (carryover); bcopy (chars + coding->consumed, SDATA (p->decoding_buf), carryover); XSETINT (p->decoding_carryover, carryover); + /* Adjust the multibyteness of TEXT to that of the buffer. */ if (NILP (current_buffer->enable_multibyte_characters) != ! STRING_MULTIBYTE (text)) @@ -6997,8 +7005,6 @@ syms_of_process () staticpro (&Qrun); Qstop = intern ("stop"); staticpro (&Qstop); - Qsignal = intern ("signal"); - staticpro (&Qsignal); /* Qexit is already staticpro'd by syms_of_eval; don't staticpro it here again.