From owner-freebsd-bugs Thu Oct 11 7: 0:14 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1EFC237B406 for ; Thu, 11 Oct 2001 07:00:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9BE04439691; Thu, 11 Oct 2001 07:00:04 -0700 (PDT) (envelope-from gnats) Date: Thu, 11 Oct 2001 07:00:04 -0700 (PDT) Message-Id: <200110111400.f9BE04439691@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Alexey V.Neyman" Subject: Re: bin/6015: indent(1) breaks source with backslash newline continuation Reply-To: "Alexey V.Neyman" 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 The following reply was made to PR bin/6015; it has been noted by GNATS. From: "Alexey V.Neyman" To: schweikh@noc.dfn.de, johan@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG Cc: Subject: Re: bin/6015: indent(1) breaks source with backslash newline continuation Date: Thu, 11 Oct 2001 16:38:12 +0400 --------------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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message