[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Support for binary constants
From: |
indent |
Subject: |
Re: [PATCH] Support for binary constants |
Date: |
Tue, 23 Mar 2010 19:31:20 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.8) Gecko/20100228 SUSE/3.0.3-1.1.1 Thunderbird/3.0.3 |
Colin,
Thanks for the update.
Please supply a regression test that proves the functionality.
See the script regression/TEST for examples of how the regression test
fit together.
david.
On 04/03/10 15:17, Colin Leitner wrote:
> Hello,
>
> this is a patch to support binary constants of the form ``0b00101010''. Mostly
> used in embedded C compilers and gcc supports them too:
>
> http://gcc.gnu.org/onlinedocs/gcc/Binary-constants.html
>
> Regards,
> Colin Leitner
>
> --- indent-2.2.10.orig/ChangeLog 2008-03-11 19:53:21.000000000 +0100
> +++ indent-2.2.10.new/ChangeLog 2010-03-04 13:40:28.450417903 +0100
> @@ -1,3 +1,6 @@
> +2010-03-04 Colin Leitner <address@hidden>
> + * lexi.c: Added support for binary constants as understood by a couple
> of compilers.
> +
> -2008-03-11 david <address@hidden>
> * Re-baselined to the freeBSD indent version to avoid onerous
> constraints in the old BSD license.
> * Release version 2.2.10
> --- indent-2.2.10.orig/src/lexi.c 2008-03-11 19:50:42.000000000 +0100
> +++ indent-2.2.10.new/src/lexi.c 2010-03-04 13:32:37.302911824 +0100
> @@ -288,6 +288,14 @@
> buf_ptr++;
> }
> }
> + else if ((*buf_ptr == '0') && ((buf_ptr[1] == 'b') || (buf_ptr[1]
> == 'B')))
> + {
> + buf_ptr += 2;
> + while ((*buf_ptr == '0') || (*buf_ptr == '1'))
> + {
> + buf_ptr++;
> + }
> + }
> else
> {
> while (1)
>
>
>
>
>
>
> _______________________________________________
> bug-indent mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-indent
>
>