* [9fans] C beautifier
@ 2011-09-18 18:08 Francisco J Ballesteros
2011-09-18 18:15 ` andrey mirtchovski
2011-09-18 20:01 ` Steve Simon
0 siblings, 2 replies; 10+ messages in thread
From: Francisco J Ballesteros @ 2011-09-18 18:08 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Hi,
anyone is using a C beautifier in Plan 9?
I mean, other than gnu indent, which I tried and does not
work quite right for me.
thanks
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C beautifier
2011-09-18 18:08 [9fans] C beautifier Francisco J Ballesteros
@ 2011-09-18 18:15 ` andrey mirtchovski
2011-09-18 18:19 ` Francisco J Ballesteros
2011-09-18 20:01 ` Steve Simon
1 sibling, 1 reply; 10+ messages in thread
From: andrey mirtchovski @ 2011-09-18 18:15 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
/386/bin/cb?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C beautifier
2011-09-18 18:15 ` andrey mirtchovski
@ 2011-09-18 18:19 ` Francisco J Ballesteros
0 siblings, 0 replies; 10+ messages in thread
From: Francisco J Ballesteros @ 2011-09-18 18:19 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
I'll have to learn to search and read man pages :)
thanks!
On Sun, Sep 18, 2011 at 8:15 PM, andrey mirtchovski
<mirtchovski@gmail.com> wrote:
> /386/bin/cb?
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C beautifier
2011-09-18 18:08 [9fans] C beautifier Francisco J Ballesteros
2011-09-18 18:15 ` andrey mirtchovski
@ 2011-09-18 20:01 ` Steve Simon
2011-09-18 20:05 ` Francisco J Ballesteros
1 sibling, 1 reply; 10+ messages in thread
From: Steve Simon @ 2011-09-18 20:01 UTC (permalink / raw)
To: 9fans
I have an indent port in my contrib (though you say you don't like it),
and plan9 has cb(1).
what don't you like about indent?
I use it with erik's bcmt which replaces c++ style comments with C ones,
a carfully tailored proto file, and this: sed 's/\) {/){/
.
This gives me pretty much plan9-style code (assuming nix-style is plan9-style
and has not evolved).
-Steve
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C beautifier
2011-09-18 20:01 ` Steve Simon
@ 2011-09-18 20:05 ` Francisco J Ballesteros
2011-09-22 10:40 ` Ethan Grammatikidis
0 siblings, 1 reply; 10+ messages in thread
From: Francisco J Ballesteros @ 2011-09-18 20:05 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Somehow indent has indented wrong some ifs
(the code in the body is at the same tab level than the if).
Perhaps I made a mistake. I'm not saying it doesn't work
(I'm sorry if I did).
but cb was just fine.
On Sun, Sep 18, 2011 at 10:01 PM, Steve Simon <steve@quintile.net> wrote:
> I have an indent port in my contrib (though you say you don't like it),
> and plan9 has cb(1).
>
> what don't you like about indent?
>
> I use it with erik's bcmt which replaces c++ style comments with C ones,
> a carfully tailored proto file, and this: sed 's/\) {/){/
> .
>
> This gives me pretty much plan9-style code (assuming nix-style is plan9-style
> and has not evolved).
>
> -Steve
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C beautifier
2011-09-18 20:05 ` Francisco J Ballesteros
@ 2011-09-22 10:40 ` Ethan Grammatikidis
0 siblings, 0 replies; 10+ messages in thread
From: Ethan Grammatikidis @ 2011-09-22 10:40 UTC (permalink / raw)
To: 9fans
On Sun, 18 Sep 2011 22:05:24 +0200
Francisco J Ballesteros <nemo@lsub.org> wrote:
> Somehow indent has indented wrong some ifs
> (the code in the body is at the same tab level than the if).
> Perhaps I made a mistake. I'm not saying it doesn't work
> (I'm sorry if I did).
>
> but cb was just fine.
I've had indent fail on something I thought would be easily parsable.
All I remember is it got indentation wrong from a certain point up to
the end of the file, and simply removing a newline before a brace
nullified the error.
Somewhere I have a script which fed about a dozen options to indent to
get the style I wanted. It was a very clear style (unlike indent's
default) but I can't find it now. I suspect it's on my Zaurus and was
primarily intended to fit code to the 63-column xterm I prefered on
that device.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C beautifier
2011-09-18 18:11 ` erik quanstrom
2011-09-18 18:23 ` Francisco J Ballesteros
@ 2011-09-18 20:14 ` David Arnold
1 sibling, 0 replies; 10+ messages in thread
From: David Arnold @ 2011-09-18 20:14 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs; +Cc: David Arnold
On Sun Sep 18 14:10:06 EDT 2011, nemo@lsub.org wrote:
> anyone is using a C beautifier in Plan 9?
> I mean, other than gnu indent, which I tried and does not
> work quite right for me.
uncrustify is fairly flexible, but takes some work up front to describe your desired output style.
http://uncrustify.sourceforge.net/
d
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C beautifier
2011-09-18 18:23 ` Francisco J Ballesteros
@ 2011-09-18 18:32 ` Francisco J Ballesteros
0 siblings, 0 replies; 10+ messages in thread
From: Francisco J Ballesteros @ 2011-09-18 18:32 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
As I said, I should learn to read man pages.
cb -s
was exactly what I was looking for.
thanks again.
On Sun, Sep 18, 2011 at 8:23 PM, Francisco J Ballesteros <nemo@lsub.org> wrote:
> I was looking for something capable of unifying say
>
> if(...){
> }else{
> }
>
> and
>
> if(...)
> {
> }
> else
> {
> }
>
> into a single style.
> But it might do. thanks again.
>
> On Sun, Sep 18, 2011 at 8:11 PM, erik quanstrom <quanstro@quanstro.net> wrote:
>> On Sun Sep 18 14:10:06 EDT 2011, nemo@lsub.org wrote:
>>> Hi,
>>>
>>> anyone is using a C beautifier in Plan 9?
>>> I mean, other than gnu indent, which I tried and does not
>>> work quite right for me.
>>
>> cb has worked for me, even on windows code.
>>
>> - erik
>>
>>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C beautifier
2011-09-18 18:11 ` erik quanstrom
@ 2011-09-18 18:23 ` Francisco J Ballesteros
2011-09-18 18:32 ` Francisco J Ballesteros
2011-09-18 20:14 ` David Arnold
1 sibling, 1 reply; 10+ messages in thread
From: Francisco J Ballesteros @ 2011-09-18 18:23 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
I was looking for something capable of unifying say
if(...){
}else{
}
and
if(...)
{
}
else
{
}
into a single style.
But it might do. thanks again.
On Sun, Sep 18, 2011 at 8:11 PM, erik quanstrom <quanstro@quanstro.net> wrote:
> On Sun Sep 18 14:10:06 EDT 2011, nemo@lsub.org wrote:
>> Hi,
>>
>> anyone is using a C beautifier in Plan 9?
>> I mean, other than gnu indent, which I tried and does not
>> work quite right for me.
>
> cb has worked for me, even on windows code.
>
> - erik
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C beautifier
[not found] <CA+N-5bZcY7r+i+Gekhtbp_3X+a9sgy+4CAfd7-MMBThn5Pq3yQ@mail.gmail.c>
@ 2011-09-18 18:11 ` erik quanstrom
2011-09-18 18:23 ` Francisco J Ballesteros
2011-09-18 20:14 ` David Arnold
0 siblings, 2 replies; 10+ messages in thread
From: erik quanstrom @ 2011-09-18 18:11 UTC (permalink / raw)
To: 9fans
On Sun Sep 18 14:10:06 EDT 2011, nemo@lsub.org wrote:
> Hi,
>
> anyone is using a C beautifier in Plan 9?
> I mean, other than gnu indent, which I tried and does not
> work quite right for me.
cb has worked for me, even on windows code.
- erik
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-09-22 10:40 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-18 18:08 [9fans] C beautifier Francisco J Ballesteros
2011-09-18 18:15 ` andrey mirtchovski
2011-09-18 18:19 ` Francisco J Ballesteros
2011-09-18 20:01 ` Steve Simon
2011-09-18 20:05 ` Francisco J Ballesteros
2011-09-22 10:40 ` Ethan Grammatikidis
[not found] <CA+N-5bZcY7r+i+Gekhtbp_3X+a9sgy+4CAfd7-MMBThn5Pq3yQ@mail.gmail.c>
2011-09-18 18:11 ` erik quanstrom
2011-09-18 18:23 ` Francisco J Ballesteros
2011-09-18 18:32 ` Francisco J Ballesteros
2011-09-18 20:14 ` David Arnold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).