On 18 November 2015 at 22:45, Adam Wolk <adam.w...@tintagel.pl> wrote: > On Wed, 18 Nov 2015 11:38:55 -0700 (MST) > Theo de Raadt <dera...@openbsd.org> wrote: > >> >Adam Wolk wrote: >> >> During the LibreSSL early days there were frequent KNFectomy >> >> procedures executed by jsing@. Is the KNFectomy utensil script >> >> available publicly? ;) man -k knf yields only style(9). >> > >> >indent -ci4 -di1 -nlp $1 >> > >> >That's not what joel used, but it's what i have in ~/bin/knf. It >> >usually gets things close enough for some further refinement. > > I'm afraid of tools that redirect me to rcs(1) KEYWORD SUBSTITUTION > documentation in order to be able to decipher their flags :P Though I > do appreciate the info, might be desperate enough on some occasions to > try it out - who am I kidding, I will try it :) > >> >> Until indent -- having come out of the back of a cow -- subtly screws >> your source code and makes a mistake. >> >> Be careful. >> > > Thanks for the heads up. I just had a few occasions lately that I had > to incorporate some broken formatted C code into a project and was > searching for a 'general pass make my eyes not bleed' like tool. > > Regards, > Adam >
Hello, You may have better luck with clang-format : http://clang.llvm.org/docs/ClangFormat.html The Linux Kernel Style looks fairly close to KNF, so it can serve as a base configuration (it's all the way down in the examples section) : http://clang.llvm.org/docs/ClangFormatStyleOptions.html Marios