From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: set-process-filter-multibyte doesn't work well Date: Sat, 08 Mar 2008 16:45:08 +0100 Message-ID: References: <20080308.225158.1122121162433191858.matsuyama@ariel-networks.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1204991143 32287 80.91.229.12 (8 Mar 2008 15:45:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Mar 2008 15:45:43 +0000 (UTC) Cc: emacs-devel@gnu.org To: MATSUYAMA Tomohiro Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 08 16:46:09 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JY1FG-00043V-5F for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 16:45:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JY1Ei-0004MA-7g for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 10:45:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JY1Eb-0004I2-G8 for emacs-devel@gnu.org; Sat, 08 Mar 2008 10:45:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JY1EX-0004CY-Tf for emacs-devel@gnu.org; Sat, 08 Mar 2008 10:45:17 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JY1EX-0004CP-R6 for emacs-devel@gnu.org; Sat, 08 Mar 2008 10:45:13 -0500 Original-Received: from mx2.suse.de ([195.135.220.15]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JY1EX-0002xT-GD for emacs-devel@gnu.org; Sat, 08 Mar 2008 10:45:13 -0500 Original-Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 616AC3B074; Sat, 8 Mar 2008 16:45:09 +0100 (CET) X-Yow: This PIZZA symbolizes my COMPLETE EMOTIONAL RECOVERY!! In-Reply-To: <20080308.225158.1122121162433191858.matsuyama@ariel-networks.com> (MATSUYAMA Tomohiro's message of "Sat\, 08 Mar 2008 22\:51\:58 +0900 \(JST\)") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:91720 Archived-At: MATSUYAMA Tomohiro writes: > (require 'comint) > (make-comint "jdb" "jdb") > (setq proc (get-process "jdb")) > (set-process-filter-multibyte proc t) > (process-filter-multibyte-p proc) ;; =3D> nil > > I don't understand what happened in Fset_process_filter_multibyte :-( > > CHECK_PROCESS (process); > p =3D XPROCESS (process); > p->filter_multibyte =3D !NILP (flag); > + printf("%d %d\n", !NILP (flag), p->filter_multibyte); /* 1 0 */ > setup_process_coding_systems (process); Does this patch help? Bitfields declared as int can be either signed or unsigned, and signed one-bit fields are not particular useful. --- process.h 09 Jan 2008 10:29:39 +0100 1.41 +++ process.h 08 M=E4r 2008 16:41:00 +0100=09 @@ -102,28 +102,28 @@ struct Lisp_Process /* Should we delay reading output from this process. Initialized from `Vprocess_adaptive_read_buffering'. 0 =3D nil, 1 =3D t, 2 =3D other. */ - int adaptive_read_buffering : 2; + unsigned int adaptive_read_buffering : 2; /* Skip reading this process on next read. */ - int read_output_skip : 1; + unsigned int read_output_skip : 1; /* Non-nil means kill silently if Emacs is exited. This is the inverse of the `query-on-exit' flag. */ - int kill_without_query : 1; + unsigned int kill_without_query : 1; /* Non-nil if communicating through a pty. */ - int pty_flag : 1; + unsigned int pty_flag : 1; /* Flag to set coding-system of the process buffer from the coding_system used to decode process output. */ - int inherit_coding_system_flag : 1; + unsigned int inherit_coding_system_flag : 1; /* Flag to decide the multibyteness of a string given to the filter (if any). It is initialized to the value of `default-enable-multibyte-characters' when the process is generated, and can be changed by the function `set-process-filter-multibyte'. */ - int filter_multibyte : 1; + unsigned int filter_multibyte : 1; /* Record the process status in the raw form in which it comes from = `wait'. This is to avoid consing in a signal handler. The `raw_status_ne= w' flag indicates that `raw_status' contains a new status that still needs to be synced to `status'. */ - int raw_status_new : 1; + unsigned int raw_status_new : 1; int raw_status; }; =20 Andreas. --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED= 5 "And now for something completely different."