From c4127aa43f48f161572e7cfa9c56d697a3b25f44 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 11 Feb 2016 11:18:22 -0800 Subject: [PATCH] Convert coding style from Open Document to Markdown Markdown is easily readable in text editors. Unlike ODT, markdown can be patched. GitHub shows markdown with pretty formatting. Remove bad examples. Improve explanations for good examples. Use Unicode finger sign to work around the issue of code block after a list. Make coding_style.md distributable. --- Coding_Style.odt | Bin 23360 -> 0 bytes Makefile.am | 3 +- coding_style.md | 195 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 197 insertions(+), 1 deletion(-) delete mode 100644 Coding_Style.odt create mode 100644 coding_style.md diff --git a/Coding_Style.odt b/Coding_Style.odt deleted file mode 100644 index 23aeef120e2e8a1deb4ce96267a892baf8ad57d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23360 zcma&N1#}!s(k0xIC5u@WGg{2d%w(~}%*@Qp%*+-uGcz-@#muzwd-G;z=l}k*+vikw zR>aMS8(CR#GP0^=CBA?l0|4LvfD9@lpXLBPG${Z8_;Y-U02U?|2KFx220GT(<|cYN z_9j-AG>(?~)K)rnCU(?T)&`dPR(cK=2A1~J_6E-Ovj2y%E~^y5?k@nqpW`oM2KGAC z&KBmJJfB~9js~`NpXRs-=%{H4@C+>Vtn^JRjkpLD6@;l+33#|6Ijsy0P4o=d|M5We zNks?mv#X^Y``;=q0tZ`5_P@BWTk2RC*sJRomDOp)r{oB!>82%3NFL(5`w2U-=pa0{@$W~w9{NMQh2;dXTKx0IsuVb%6 za()}H$5#KJryk*6&;%b9UD6> zBRdm4C(ZwWH#ux2ysqlN1A^{J$*! zfAs%nH$4|Ua|1hWI+p)}|4aTi*vP=r;M2O5Ew`kJuC0O0Uz3Q2ftra((!|oiSxbeL zS&Nww??04U*0xrr272~13{12ZbVU3PCg%E7{{;KL&HZiu-?P!q{xbwSdlNmpzXru# zN7vkdO3%u{(*AQw6Z|bSvCuL4xA1e8|An;D{p0K(=s!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6s4?Qx30;};Ed7TamMxrFQKzE_B1x6o7lc(yRHT1;VlhC zq2E3%7^jJw@7iFLWh7iA?+(MYj^)2I>3w%W3pcmRRo~rB!7jG{4eN)h_tLwf{q=CK zAokr+p;FK6qA?}9S-Nm_LA8C6Z?p2ymoef_Jkd@OQbmKUK09-$-W90ipW@Mj0wAI0I1 zr&B-L-%-C?&7PrD5HFFYmB`BR6m@!qe|AYjO1HD%M`ZT1kLB;kpIhURE^22nkNu0M z+9~iK>PD=l*`hS*fzh2-o8~}h6Zf8+)4$nVi+@HyQO=|fZvY%z$|H?zB{LjJtEc5=% zgA{sap>qz;ud?sYOh^fL7V+mWoyoxem8It#mNQxSzp{KihviHrerGwoX^|s1)p|&w zcoux%f6nnAWaH^wc}n{8@{N>= 0); + } + + +Braces +------ + +* Opening brace is always on a separate line +* Align braces with the line preceding the opening brace + +☞ + + struct stream + { + int flags; + char *data; + }; + + void + process_data(struct stream *s) + { + if (stream == NULL) + { + return; + } + } + + +`if` statements +--------------- + +* Always use braces +* Put both braces on separate lines + +☞ + + if (val <= 0xff) + { + out_uint8(s, val); + } + else if (val <= 0xffff) + { + out_uint16_le(s, val); + } + else + { + out_uint32_le(s, val); + } + + +`for` statements +---------------- + +* Always use braces +* Put both braces on separate lines + +☞ + + for (i = 0; i < 10; i++) + { + printf("i = %d\n", i); + } + + +`while` and `do while` statements +--------------------------------- + +* Always use braces +* `while` after the closing brace is on the same line + +☞ + + while (cptr) + { + cptr—; + } + + do + { + cptr--; + } while (cptr); + + +`switch` statements +------------------- + +* Indent `case` once +* Indent statements under `case` one more time +* Put both braces on separate lines + +☞ + + switch (cmd) + { + case READ: + read(fd, buf, 1024); + break; + + default: + printf("bad cmd\n"); + }