From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Towards a cleaner build: arc-mode Date: Sat, 18 May 2019 08:04:25 +0200 Message-ID: References: <83d0khb888.fsf@gnu.org> <83lfz49v8r.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="127183"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 18 08:06:03 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRsTq-000WxK-O7 for ged-emacs-devel@m.gmane.org; Sat, 18 May 2019 08:06:02 +0200 Original-Received: from localhost ([127.0.0.1]:58196 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRsTp-0005Fx-Q2 for ged-emacs-devel@m.gmane.org; Sat, 18 May 2019 02:06:01 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRsSL-0004Lk-QD for emacs-devel@gnu.org; Sat, 18 May 2019 02:04:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRsSK-00076z-Pr for emacs-devel@gnu.org; Sat, 18 May 2019 02:04:29 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:47248) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hRsSK-00073I-JJ; Sat, 18 May 2019 02:04:28 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hRsSH-00053D-CK; Sat, 18 May 2019 08:04:27 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEXV0dDj4eH+/f38+/ug l5aPh4Xx8O/Burl6cXCvqKf////+//75+fk7NTT39vb19PQ+LG1hAAAB6UlEQVQ4jWPIWoUVrGPA KSGFVXw1LolVa3BJkKODC5fl2CVw6sBtOU479oEkFq/6j13HulVi2CXWrJLBkFgPkliklYNdYvWr ZByuOvUZu8Qiq3zsRq3XysMusXjXt1WHT2GRWKP1b71AFroEMKwEs54llGKT2Kb1sWAqKDCVz9vs QpZYb/WinuEXkHdOIC3JCuZcoMTiLE1hkIPVZoZMl39shZBYnbUcbIJ4ZGiImw2yxK8FIPYaltYb HS48xgg7Vv0yBLHtZly9e8Nz4iOEjlVZC54BSfPYuzc6pnrK7UJI/FpQCOSlgCRap9RoISRemacB 3cbacffu3dbIaUgSh5+nWa1aU9px9wZQIsAKyShzsVer9F17gTquugZkIRm1Us5q1TJXoPjdG6EF p5EklievWr0tBCh89+aUcCSJU8vlVq1SnwqyvIUlMhnJDgNg+jnuEtJ7t7cj3F0Oyah0PqD/XKdE 9N696jKTD8nn6WKrFj9wdXGN6OiInMkNDjioDrZVqxIqS6Z2XG1tqWRCSPwSYFy16jtIoqN1ejk4 vS6G6EgApupn6SURER2h7tMREuusQJYvPug5NaIjZHrlabjE4lWJoDSqI1gS4VDOCIlBiFGLwAG6 yuqYWBYslSzGVcgsZiiXxi4BAID6r0yppUYBAAAAAElFTkSuQmCC In-Reply-To: <83lfz49v8r.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 18 May 2019 08:39:32 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 80.91.231.51 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236703 Archived-At: There's one additional use of string-as-multibyte in arc-mode that I didn't notice before: (defun archive-l-e (str &optional len) "Convert little endian string/vector STR to integer. Alternatively, STR may be a buffer position in the current buffer in which case a second argument, length LEN, should be supplied." (if (stringp str) (setq len (length str)) (setq str (buffer-substring str (+ str len)))) (setq str (string-as-unibyte str)) (let ((result 0) (i 0)) (while (< i len) (setq i (1+ i) result (+ (ash result 8) (aref str (- len i))))) result)) Hm... These buffers are multibyte, but do not contain any characters, just ASCII and stuff from the "byte plane"... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no