From owner-freebsd-bugs Thu Oct 11 5:38:43 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from mail.auriga.ru (mail.auriga.ru [213.24.253.102]) by hub.freebsd.org (Postfix) with ESMTP id C966237B403; Thu, 11 Oct 2001 05:38:38 -0700 (PDT) Received: from vagabond.auriga.ru ([213.24.253.246]) by mail.auriga.ru with smtp (Exim 3.14 #1) id 15rfC8-0002y8-00; Thu, 11 Oct 2001 16:44:12 +0400 Content-Type: Multipart/Mixed; charset="koi8-r"; boundary="------------Boundary-00=_OFK13LWOU3XJV6M73E0I" From: Alexey V.Neyman To: schweikh@noc.dfn.de, johan@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: bin/6015: indent(1) breaks source with backslash newline continuation Date: Thu, 11 Oct 2001 16:38:12 +0400 X-Mailer: KMail [version 1.2] References: <200110102028.f9AKSOX46168@freefall.freebsd.org> In-Reply-To: <200110102028.f9AKSOX46168@freefall.freebsd.org> MIME-Version: 1.0 Message-Id: <01101116381203.00992@vagabond.auriga.ru> Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --------------Boundary-00=_OFK13LWOU3XJV6M73E0I Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello there! On 11 October 2001 00:28, johan@FreeBSD.org wrote: > Moreover, you should not write your c code like that :-) > Closed since the PR is too old and noone will fix it. Please review & try the patch attached. Also, I thought that confirmed PRs are not to be closed, as the bug still exists. Isn't it what 'suspended' state is for? Regards, Alexey. - -- - -------------------------------+--------------------------------- May the Sun and Water | Regards, Alexey V. Neyman always fall upon you! | mailto: alex.neyman@auriga.ru - -------------------------------+--------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7xZK09lSeDZjilyARAhk4AJ9TujgePR/IWnIlfYLa8foAwXDgWACcClr3 2WG7pQSrnANpdOWC0hZh8Sw= =v+lZ -----END PGP SIGNATURE----- --------------Boundary-00=_OFK13LWOU3XJV6M73E0I Content-Type: text/x-c; charset="koi8-r"; name="indent.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="indent.patch" --- lexi.c.orig Thu Oct 11 16:27:31 2001 +++ lexi.c Thu Oct 11 16:27:42 2001 @@ -209,8 +209,19 @@ } } else - while (chartype[*buf_ptr] == alphanum) { /* copy it over */ + while (chartype[*buf_ptr] == alphanum || *buf_ptr == BACKSLASH) { + /* fill_buffer() terminates buffer with newline */ + if (*buf_ptr == BACKSLASH) { + if (*(buf_ptr + 1) == '\n') { + buf_ptr += 2; + if (buf_ptr >= buf_end) + fill_buffer(); + } + else + break; + } CHECK_SIZE_TOKEN; + /* copy it over */ *e_token++ = *buf_ptr++; if (buf_ptr >= buf_end) fill_buffer(); --------------Boundary-00=_OFK13LWOU3XJV6M73E0I-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message