Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: C format programs |
| Date | 2012-08-29 19:58 -0700 |
| Organization | None to speak of |
| Message-ID | <lnzk5dulum.fsf@nuthaus.mib.org> (permalink) |
| References | <nuq2h9-p77.ln1@ID-306963.user.uni-berlin.de> <k1mg0e$m0r$1@dont-email.me> <3k03h9-1pf.ln1@ID-306963.user.uni-berlin.de> <aa82k5F8arU1@mid.individual.net> |
Ian Collins <ian-news@hotmail.com> writes:
> On 08/30/12 02:43 PM, songbird wrote:
>>
>> If it is code I'm working on a lot I turn the
>> macros into function calls as much as possible
>> and do the text substitutions. But that makes
>> it hard to do comparisons to the originals to
>> see what of substance has changed...
>
> Use your source control system.
>
> Check in cosmetic changes on their own, never mix them with logic
> changes. Then you should be able to isolate the former from the latter
> quite easily.
Yes, that's definitely a good idea. But comparison can still be
difficult in some cases.
For example, suppose version 5 is very old, version 10 removes the
ugly macros (so the only difference between versions 9 and 10 is
the cleanup), and version 15 is the current version. If you need
to compare versions 5 and 15, or even 8 and 11, you're still going
to see a mixture of functional changes and cleanup changes.
If you can completely automate the process of fixing the macros,
in a way that works correctly even for older versions, you can
compare a converted copy of version 5 against version 15.
On the other hand, if versions of the code prior to version 9 are
uninteresting, it's probably not worth the effort; automating the
cleanup is likely to be worthwhile anyway, but don't worry about
automating 100% of it vs. 95%.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
C format programs songbird <songbird@anthive.com> - 2012-08-29 21:07 -0400
Re: C format programs Don't make my brown eyes China Blue <chine.bleu@yahoo.com> - 2012-08-29 18:35 -0700
Re: C format programs songbird <songbird@anthive.com> - 2012-08-29 21:50 -0400
Re: C format programs ImpalerCore <jadill33@gmail.com> - 2012-08-29 20:32 -0700
Re: C format programs songbird <songbird@anthive.com> - 2012-08-30 02:20 -0400
Re: C format programs ImpalerCore <jadill33@gmail.com> - 2012-08-30 06:06 -0700
Re: C format programs songbird <songbird@anthive.com> - 2012-08-30 22:44 -0400
Re: C format programs Keith Thompson <kst-u@mib.org> - 2012-08-29 19:50 -0700
Re: C format programs Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-29 21:35 -0400
Re: C format programs songbird <songbird@anthive.com> - 2012-08-29 22:43 -0400
Re: C format programs Ian Collins <ian-news@hotmail.com> - 2012-08-30 14:48 +1200
Re: C format programs Keith Thompson <kst-u@mib.org> - 2012-08-29 19:58 -0700
Re: C format programs songbird <songbird@anthive.com> - 2012-08-30 01:07 -0400
Re: C format programs Adrian Ratnapala <raka@scooter.fritz.box> - 2012-09-01 07:10 +0000
Re: C format programs Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2012-08-29 22:13 -0600
Re: C format programs Ian Collins <ian-news@hotmail.com> - 2012-08-30 16:28 +1200
Re: C format programs Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2012-08-30 08:55 -0600
Re: C format programs Adrian Ratnapala <raka@scooter.fritz.box> - 2012-09-01 07:03 +0000
Re: C format programs Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2012-09-06 15:52 +0300
csiph-web