Hallvard B Furuseth wrote:
Setting aside that 4 is an entirely sensible tab width...
This seems to be the showstopper. Unless you now entirely own the code
yourself alone, don't reformat it it, will merely annoy the
collaboration team.
Any style can be used on any platform. if you absolutely MUST do this,
pick your favourite and go for it.
Yes once. Almost at once I realised it was an utter waste of my time.
Even with the best tools, you spend hours manually frigging with the
code to get it to your personal preference. At some point you hopefully
realise you are rearranging the chairs on the boat-deck.
Instead I merely inserted whitespace and braces where the previous
maintenance droid had been overeconomical
int i=j++&&k||z(foo ,f->d>e)&&34)/q+564/z(fr&fq++);//huh?
Frankly it'll be a complete waste of time. Does the code fail to run
because of the formatting? No. So mildly reformat bits which are hard to
read as-and-when you need to for maintenance purposes.
I'd like to reformat an open source package (OpenLDAP) to a new C style.
8M code, 0.3M lines. With some currently hopeless formatting rules like
tab-width=4.
8M code, 0.3M lines. With some currently hopeless formatting rules like
tab-width=4.
The project's normal rule is "don't
reformat unnecessarily" since it makes source control merge/diff
difficult.
reformat unnecessarily" since it makes source control merge/diff
difficult.
yourself alone, don't reformat it it, will merely annoy the
collaboration team.
Anyway, can someone recommend a "tool-friendly" style, which Indent,
Emacs, Vi or whatever all can be easily configured to produce? Doesn't
hurt if whatever is used on Windows can it too.
Emacs, Vi or whatever all can be easily configured to produce? Doesn't
hurt if whatever is used on Windows can it too.
pick your favourite and go for it.
How much work am I looking at? Have anyone here done a similar job?
Even with the best tools, you spend hours manually frigging with the
code to get it to your personal preference. At some point you hopefully
realise you are rearranging the chairs on the boat-deck.
Instead I merely inserted whitespace and braces where the previous
maintenance droid had been overeconomical
int i=j++&&k||z(foo ,f->d>e)&&34)/q+564/z(fr&fq++);//huh?
Even with Indent it looks like it'll be a fair amount of work to re-indent
and then prettify what Indent produces.
and then prettify what Indent produces.
because of the formatting? No. So mildly reformat bits which are hard to
read as-and-when you need to for maintenance purposes.
Comment