Thread View: comp.sys.mac.programmer.tools
12 messages
12 total messages
Started by Burt Johnson
Mon, 15 Sep 2003 01:54
tool to reformat text?
Author: Burt Johnson
Date: Mon, 15 Sep 2003 01:54
Date: Mon, 15 Sep 2003 01:54
15 lines
1784 bytes
1784 bytes
I have just inherited a project that I will now be responsible for. The prior programmer used spaces to indent, while I strongly prefer tabs. Is there any program out there to go through and properly reformat the existing code? Note that I don't want to just use a simple seach-and-replace since that would also nail spaces embedded in quoted strings, etc. Also, by the nature of using spaces, sometimes he didn't have the exact correct number, so things could get a bit messy there too. -- - Burt Johnson MindStorm, Inc. http://www.mindstorm-inc.com/software.html
Re: tool to reformat text?
Author: Paul Russell
Date: Mon, 15 Sep 2003 03:40
Date: Mon, 15 Sep 2003 03:40
18 lines
2124 bytes
2124 bytes
Burt Johnson wrote: > I have just inherited a project that I will now be responsible for. The > prior programmer used spaces to indent, while I strongly prefer tabs. > > Is there any program out there to go through and properly reformat the > existing code? > > Note that I don't want to just use a simple seach-and-replace since that > would also nail spaces embedded in quoted strings, etc. Also, by the > nature of using spaces, sometimes he didn't have the exact correct > number, so things could get a bit messy there too. > There's an open source tool called "astyle" whcih should do what you want. <http://www.bigfoot.com/~davidsont/astyle> Paul
Re: tool to reformat text?
Author: jean-yves herv�
Date: Mon, 15 Sep 2003 18:30
Date: Mon, 15 Sep 2003 18:30
32 lines
2436 bytes
2436 bytes
In article <1g1ahp3.1s4wpdx131r9j6N%burt@mindstorm-inc.com>,
burt@mindstorm-inc.com (Burt Johnson) wrote:
> have just inherited a project that I will now be responsible for. The
> prior programmer used spaces to indent, while I strongly prefer tabs.
>
> Is there any program out there to go through and properly reformat the
> existing code?
>
> Note that I don't want to just use a simple seach-and-replace since that
> would also nail spaces embedded in quoted strings, etc. Also, by the
> nature of using spaces, sometimes he didn't have the exact correct
> number, so things could get a bit messy there too.
>
There is Artistic Style for Mac
http://www.bio.ic.ac.uk/evolve/software/astyle/index.html
not sure if there is a version for OS X (I am still using Mac OS).
jyh.
--
=====================================================================
jean-yves herve' /\
Department of Computer Science \/ e-mail --> jyh@cs.uri.edu
and Statistics /\
University of Rhode Island \/ Tel. --> (401) 874-4400
Kingston, RI 02881-0816 /\ Fax. --> (401) 874-4617
USA \/
=====================================================================
Re: tool to reformat text?
Author: Paul Mitchum
Date: Mon, 15 Sep 2003 20:50
Date: Mon, 15 Sep 2003 20:50
15 lines
2121 bytes
2121 bytes
Paul Russell <prussell@sonic.net> wrote: > Burt Johnson wrote: > > > I have just inherited a project that I will now be responsible for. The > > prior programmer used spaces to indent, while I strongly prefer tabs. > > > > Is there any program out there to go through and properly reformat the > > existing code? [..] > > There's an open source tool called "astyle" whcih should do what you want. > <http://www.bigfoot.com/~davidsont/astyle> Better URL: <http://astyle.sourceforge.net/>
Re: tool to reformat text?
Author: Sean McBride
Date: Tue, 16 Sep 2003 00:19
Date: Tue, 16 Sep 2003 00:19
7 lines
1260 bytes
1260 bytes
In article <1g1ahp3.1s4wpdx131r9j6N%burt@mindstorm-inc.com>, burt@mindstorm-inc.com (Burt Johnson) wrote: > Is there any program out there to go through and properly reformat the > existing code? BBEdit, I think.
Re: tool to reformat text?
Author: Burt Johnson
Date: Tue, 16 Sep 2003 07:23
Date: Tue, 16 Sep 2003 07:23
18 lines
1819 bytes
1819 bytes
Thanks! I had a Mac version years ago, but I lost it when I moved to OS X. I can always run this in Classic if needs be. jean-yves herv� <jyh@cs.uri.edu> wrote: > There is Artistic Style for Mac > > http://www.bio.ic.ac.uk/evolve/software/astyle/index.html > > not sure if there is a version for OS X (I am still using Mac OS). > > jyh. -- - Burt Johnson MindStorm, Inc. http://www.mindstorm-inc.com/software.html
Re: tool to reformat text?
Author: Burt Johnson
Date: Tue, 16 Sep 2003 07:24
Date: Tue, 16 Sep 2003 07:24
25 lines
2060 bytes
2060 bytes
Thanks - that one worked better. Paul Mitchum <usenet@mile23.com.r3m0v3> wrote: > Paul Russell <prussell@sonic.net> wrote: > > > Burt Johnson wrote: > > > > > I have just inherited a project that I will now be responsible for. The > > > prior programmer used spaces to indent, while I strongly prefer tabs. > > > > > > Is there any program out there to go through and properly reformat the > > > existing code? > [..] > > > > There's an open source tool called "astyle" whcih should do what you want. > > <http://www.bigfoot.com/~davidsont/astyle> > > Better URL: <http://astyle.sourceforge.net/> -- - Burt Johnson MindStorm, Inc. http://www.mindstorm-inc.com/software.html
Re: tool to reformat text?
Author: Burt Johnson
Date: Tue, 16 Sep 2003 07:24
Date: Tue, 16 Sep 2003 07:24
19 lines
1796 bytes
1796 bytes
hmmm.... Just fired up BBEdit 6.5.3 and I don't see it there. I never upgraded to 7 though, as I didn't see anything in it that I needed. Sean McBride <cwatson@cam.org> wrote: > In article <1g1ahp3.1s4wpdx131r9j6N%burt@mindstorm-inc.com>, > burt@mindstorm-inc.com (Burt Johnson) wrote: > > > Is there any program out there to go through and properly reformat the > > existing code? > > BBEdit, I think. -- - Burt Johnson MindStorm, Inc. http://www.mindstorm-inc.com/software.html
Re: tool to reformat text?
Author: David Phillip Oster
Date: Tue, 16 Sep 2003 15:33
Date: Tue, 16 Sep 2003 15:33
15 lines
2427 bytes
2427 bytes
In article <1g1croc.i2cgks1u5gyyoN%burt@mindstorm-inc.com>, burt@mindstorm-inc.com (Burt Johnson) wrote: > Thanks! I had a Mac version years ago, but I lost it when I moved to OS > X. I can always run this in Classic if needs be. Based on this thread, I just went to sourceforge and got the latest stable source distrbution. From a terminal window, I said: make and it built the command line version, without any fuss. -- David Phillip Oster
Re: tool to reformat text?
Author: Sean McBride
Date: Wed, 17 Sep 2003 00:23
Date: Wed, 17 Sep 2003 00:23
7 lines
1434 bytes
1434 bytes
In article <1g1crrc.1i7fnhmdz05qoN%burt@mindstorm-inc.com>, burt@mindstorm-inc.com (Burt Johnson) wrote: > hmmm.... Just fired up BBEdit 6.5.3 and I don't see it there. I never > upgraded to 7 though, as I didn't see anything in it that I needed. I seem to remember an 'entab' and 'detab'.
Re: tool to reformat text?
Author: Isaac Wankerl
Date: Wed, 17 Sep 2003 03:00
Date: Wed, 17 Sep 2003 03:00
27 lines
2384 bytes
2384 bytes
In article <1g1byd8.vzdji71vqc69N%usenet@mile23.com.r3m0v3>, usenet@mile23.com.r3m0v3 (Paul Mitchum) wrote: > Paul Russell <prussell@sonic.net> wrote: > > > Burt Johnson wrote: > > > > > I have just inherited a project that I will now be responsible for. The > > > prior programmer used spaces to indent, while I strongly prefer tabs. > > > > > > Is there any program out there to go through and properly reformat the > > > existing code? > [..] > > > > There's an open source tool called "astyle" whcih should do what you want. > > <http://www.bigfoot.com/~davidsont/astyle> > > Better URL: <http://astyle.sourceforge.net/> I've got an IDE plugin that allows you to use the simple options of astyle on a text file. I'll have to review the license agreement before I make it public though. -- Isaac Wankerl Metrowerks Mac Software Developer
Re: tool to reformat text?
Author: Burt Johnson
Date: Wed, 17 Sep 2003 06:34
Date: Wed, 17 Sep 2003 06:34
18 lines
1972 bytes
1972 bytes
Sean McBride <cwatson@cam.org> wrote: > In article <1g1crrc.1i7fnhmdz05qoN%burt@mindstorm-inc.com>, > burt@mindstorm-inc.com (Burt Johnson) wrote: > > > hmmm.... Just fired up BBEdit 6.5.3 and I don't see it there. I never > > upgraded to 7 though, as I didn't see anything in it that I needed. > > I seem to remember an 'entab' and 'detab'. Yep, that was it. I found it late last night when checking again. I used that and it did what I needed. Thanks for pointing out an option in a program I already use! -- - Burt Johnson MindStorm, Inc. http://www.mindstorm-inc.com/software.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads