Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Oct 2001 16:38:12 +0400
From:      Alexey V.Neyman <alex.neyman@auriga.ru>
To:        schweikh@noc.dfn.de, johan@FreeBSD.org, freebsd-bugs@FreeBSD.org
Subject:   Re: bin/6015: indent(1) breaks source with backslash newline continuation
Message-ID:  <01101116381203.00992@vagabond.auriga.ru>
In-Reply-To: <200110102028.f9AKSOX46168@freefall.freebsd.org>
References:  <200110102028.f9AKSOX46168@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--------------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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01101116381203.00992>