NetBSD Kernel Normal Form
BSD
El "Kernel Normal Form" son las reglas que los programadores siguen para poder programar el kernel de una distro BSD, más o menos como el "Coding Style" de los sistemas GNU.
Aquí puedes encontrar el código vigente de NetBSD:
Si usas Emacs puedes agregar la siguiente línea a tu archivo de configuración para usar esta norma:
(load-file "/usr/share/misc/NetBSD.el")
Si por el contrario usas vim:
" Courtesy of phadthai
" This is for KNF C formatting using sw=4 (CTRL-D can be used as needed)
function! KNF()
set ts=8
set sw=4
set cinoptions=>2s,e0,n0,f0,{0,}0,^0,:0,=2s,l1,g2s,h2s,p2s,t0,+3,c3,C0,/0,(0,u0,U0,w1,m1,j1,)20,*30
endfunction
command KNF :call KNF()
" And to revert to other common indenting format
function! KR()
set ts=8
set sw=4
set cinoptions=
endfunction
command KR :call KR()
Muchas gracias a phadthai.
Permalink: http://mononeurona.org/entries/view/asarch/2055
Comentblogs:









