|
Next: CW9 - Symbolics freeze - My Favourite Fix
|
| Author |
Message |
External

Since: Jan 15, 2004 Posts: 198
|
(Msg. 1) Posted: Mon Sep 15, 2003 4:54 am
Post subject: tool to reformat text? Archived from groups: comp>sys>mac>programmer>tools, others (more info?)
|
|
|
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 >> Stay informed about: tool to reformat text? |
|
| Back to top |
|
 |  |
External

Since: Dec 16, 2003 Posts: 312
|
(Msg. 2) Posted: Mon Sep 15, 2003 6:40 am
Post subject: Re: tool to reformat text? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
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<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: tool to reformat text? |
|
| Back to top |
|
 |  |
External

Since: Nov 22, 2003 Posts: 147
|
(Msg. 3) Posted: Mon Sep 15, 2003 4:50 pm
Post subject: Re: tool to reformat text? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Paul Russell <prussell DeleteThis @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/><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: tool to reformat text? |
|
| Back to top |
|
 |  |
External

Since: Sep 13, 2003 Posts: 13
|
(Msg. 4) Posted: Mon Sep 15, 2003 5:30 pm
Post subject: Re: tool to reformat text? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
In article <1g1ahp3.1s4wpdx131r9j6N%burt@mindstorm-inc.com>,
burt.TakeThisOut@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
<a style='text-decoration: underline;' href="http://www.bio.ic.ac.uk/evolve/software/astyle/index.html" target="_blank">http://www.bio.ic.ac.uk/evolve/software/astyle/index.html</a>
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.TakeThisOut@cs.uri.edu
and Statistics /\
University of Rhode Island \/ Tel. --> (401) 874-4400
Kingston, RI 02881-0816 /\ Fax. --> (401) 874-4617
USA \/
=====================================================================<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: tool to reformat text? |
|
| Back to top |
|
 |  |
External

Since: Jan 05, 2004 Posts: 498
|
(Msg. 5) Posted: Mon Sep 15, 2003 11:19 pm
Post subject: Re: tool to reformat text? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
In article <1g1ahp3.1s4wpdx131r9j6N%burt@mindstorm-inc.com>,
burt.TakeThisOut@mindstorm-inc.com (Burt Johnson) wrote:
> Is there any program out there to go through and properly reformat the
> existing code?
BBEdit, I think.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: tool to reformat text? |
|
| Back to top |
|
 |  |
External

Since: Jan 15, 2004 Posts: 198
|
(Msg. 6) Posted: Tue Sep 16, 2003 10:23 am
Post subject: Re: tool to reformat text? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
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.RemoveThis@cs.uri.edu> wrote:
> There is Artistic Style for Mac
>
<font color=purple> > <a style='text-decoration: underline;' href="http://www.bio.ic.ac.uk/evolve/software/astyle/index.html</font" target="_blank">http://www.bio.ic.ac.uk/evolve/software/astyle/index.html</font</a>>
>
> not sure if there is a version for OS X (I am still using Mac OS).
>
> jyh.
--
- Burt Johnson
MindStorm, Inc.
<a style='text-decoration: underline;' href="http://www.mindstorm-inc.com/software.html" target="_blank">http://www.mindstorm-inc.com/software.html</a><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: tool to reformat text? |
|
| Back to top |
|
 |  |
External

Since: Jan 15, 2004 Posts: 198
|
(Msg. 7) Posted: Tue Sep 16, 2003 10:24 am
Post subject: Re: tool to reformat text? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Thanks - that one worked better.
Paul Mitchum <usenet.TakeThisOut@mile23.com.r3m0v3> wrote:
> Paul Russell <prussell.TakeThisOut@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.
<a style='text-decoration: underline;' href="http://www.mindstorm-inc.com/software.html" target="_blank">http://www.mindstorm-inc.com/software.html</a><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: tool to reformat text? |
|
| Back to top |
|
 |  |
External

Since: Jan 15, 2004 Posts: 198
|
(Msg. 8) Posted: Tue Sep 16, 2003 10:24 am
Post subject: Re: tool to reformat text? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
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.TakeThisOut@cam.org> wrote:
> In article <1g1ahp3.1s4wpdx131r9j6N%burt@mindstorm-inc.com>,
> burt.TakeThisOut@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.
<a style='text-decoration: underline;' href="http://www.mindstorm-inc.com/software.html" target="_blank">http://www.mindstorm-inc.com/software.html</a><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: tool to reformat text? |
|
| Back to top |
|
 |  |
External

Since: Apr 25, 2004 Posts: 1083
|
(Msg. 9) Posted: Tue Sep 16, 2003 6:33 pm
Post subject: Re: tool to reformat text? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
In article <1g1croc.i2cgks1u5gyyoN%burt@mindstorm-inc.com>,
burt.RemoveThis@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<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: tool to reformat text? |
|
| Back to top |
|
 |  |
External

Since: Jan 05, 2004 Posts: 498
|
(Msg. 10) Posted: Tue Sep 16, 2003 11:23 pm
Post subject: Re: tool to reformat text? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
In article <1g1crrc.1i7fnhmdz05qoN%burt@mindstorm-inc.com>,
burt DeleteThis @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'.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: tool to reformat text? |
|
| Back to top |
|
 |  |
External

Since: Aug 21, 2003 Posts: 52
|
(Msg. 11) Posted: Wed Sep 17, 2003 6:00 am
Post subject: Re: tool to reformat text? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
In article <1g1byd8.vzdji71vqc69N%usenet@mile23.com.r3m0v3>,
usenet RemoveThis @mile23.com.r3m0v3 (Paul Mitchum) wrote:
> Paul Russell <prussell RemoveThis @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<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: tool to reformat text? |
|
| Back to top |
|
 |  |
External

Since: Jan 15, 2004 Posts: 198
|
(Msg. 12) Posted: Wed Sep 17, 2003 9:34 am
Post subject: Re: tool to reformat text? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Sean McBride <cwatson RemoveThis @cam.org> wrote:
> In article <1g1crrc.1i7fnhmdz05qoN%burt@mindstorm-inc.com>,
> burt RemoveThis @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.
<a style='text-decoration: underline;' href="http://www.mindstorm-inc.com/software.html" target="_blank">http://www.mindstorm-inc.com/software.html</a><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: tool to reformat text? |
|
| Back to top |
|
 |  |