Re: # not in first column in many source headers

Top Page
Delete this message
Reply to this message
Author: Nigel Metheringham
Date:  
To: Jeffrey Goldberg
CC: Scotty Logan, Philip Hazel, exim-users
Subject: Re: # not in first column in many source headers
} > What's wrong with
} >
} > % find . -name '*.[ch]'|xargs perl -pi.bak -e 's/^( +)#/#$1/'
}
} This is almost exactly what I did.

The alternative is to specify CC to be a script which takes the .c file,
sed's it on the fly (piping it into your real C compiler if this allows
it, otherwise shoving it into a temp file), and compiles that.

Of course you can then attempt to completely unansify the source using
various tools, but I would expect (and rather hope) for that to fail :-0


scotty@??? said:
} Not only does it preserve the indentation while keeping older cpps
} happy, it also helps other tools which rely on pre-processor
} directives starting with # in column 1, such as the syntax colouring
} in Emacs cc-mode.

I'd have to agree with that, however I can't tell Philip how to write (or
even format) code :-) I have to be very careful when working on exim code
to not break the formatting conventions dramatically by letting the editor
run mad!

    Nigel.
-- 
[ Nigel.Metheringham@???   -  Systems Software Engineer ]
[ Tel : +44 113 251 6012                   Fax : +44 113 224 0003 ]
[      Real life is but a pale imitation of a Dilbert strip       ]




--
* This is sent by the exim-users mailing list.  To unsubscribe send a
    mail with subject "unsubscribe" to exim-users-request@???
* Exim information can be found at http://www.exim.org/