C bites / programming style

Jonathan P. Leech jon at cit-vax
Tue Sep 10 18:33:37 AEST 1985


    Just to change the subject a bit  on  these  interminable  `style'
debates, let me pose a question on the following:

Richard Klappal [..!ihnp4!chinet!uklpl!rlk] writes:
>   I generally try adapting my coding style to the debugging/style
>   aids are available on the system/language I which I have to work.
>   I may not agree entirely with the way those aids put things,
>   but when I have to repair/update someone elses code, one pass
>   thru the PrettyPrinter puts that code into my style.

    I  generally  agree  with  this  attitude,	but  it's  not	always
possible.  Example: I have thousands of lines of poorly-formatted code
I'd LOVE to run through the 4.2 BSD `indent' program.	Unfortunately,
this code is heavily #ifdefed to run  under  different	OS's  (several
variants of Unix, VMS, and AOS/VS). Since indent has no conception  of
the preprocessor, it fails miserably. It won't suffice to run the code
through the preprocessor and then indent it, as it will hardly be made
more readable thereby (:-). I guess what I need  is  a	pretty-printer
that has a built-in preprocessor; does anyone know where to find  such
a beast?

    -- Jon Leech (jon at cit-vax.arpa)
    __@/



More information about the Comp.lang.c mailing list