1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
|
#
# AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: 0\n"
"POT-Creation-Date: 2018-05-14 18:03-0500\n"
"PO-Revision-Date: 2018-05-14 18:03-0500\n"
"Last-Translator: Automatically generated\n"
"Language-Team: None\n"
"MIME-Version: 1.0\n"
"Content-Type: application/x-publican; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. Tag: title
#, no-c-format
msgid "C Coding Guidelines"
msgstr ""
#. Tag: para
#, no-c-format
msgid "<anchor id=\"ch-c-coding\" xreflabel=\"Chapter 2, C Coding Guidelines\"></anchor>"
msgstr ""
#. Tag: title
#, no-c-format
msgid "C Boilerplate"
msgstr ""
#. Tag: para
#, no-c-format
msgid "<indexterm> <primary>C</primary><secondary>boilerplate</secondary> </indexterm> <indexterm> <primary>boilerplate</primary> </indexterm> <indexterm> <primary>licensing</primary><secondary>C boilerplate</secondary> </indexterm> <indexterm> <primary>C boilerplate</primary> </indexterm>"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Every C file should start like this:"
msgstr ""
#. Tag: programlisting
#, no-c-format
msgid "/*\n"
" * Copyright <YYYY[-YYYY]> Andrew Beekhof <andrew@beekhof.net>\n"
" *\n"
" * This source code is licensed under <LICENSE> WITHOUT ANY WARRANTY.\n"
" */"
msgstr ""
#. Tag: para
#, no-c-format
msgid "<literal><YYYY></literal> is the year the code was <emphasis>originally</emphasis> created. <footnote><para> See the U.S. Copyright Office’s <ulink url=\"https://www.copyright.gov/comp3/\">\"Compendium of U.S. Copyright Office Practices\"</ulink>, particularly \"Chapter 2200: Notice of Copyright\", sections 2205.1(A) and 2205.1(F), or <ulink url=\"https://techwhirl.com/updating-copyright-notices/\">\"Updating Copyright Notices\"</ulink> for a more readable summary. </para></footnote> If the code is modified in later years, add <literal>-YYYY</literal> with the most recent year of modification."
msgstr ""
#. Tag: para
#, no-c-format
msgid "<literal><LICENSE></literal> should follow the policy set forth in the <ulink url=\"https://github.com/ClusterLabs/pacemaker/blob/master/COPYING\"><literal>COPYING</literal></ulink> file, generally one of \"GNU General Public License version 2 or later (GPLv2+)\" or \"GNU Lesser General Public License version 2.1 or later (LGPLv2.1+)\"."
msgstr ""
#. Tag: title
#, no-c-format
msgid "Formatting"
msgstr ""
#. Tag: title
#, no-c-format
msgid "Whitespace"
msgstr ""
#. Tag: para
#, no-c-format
msgid "<indexterm> <primary>C</primary><secondary>whitespace</secondary> </indexterm> <indexterm> <primary>whitespace</primary> </indexterm>"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Indentation must be 4 spaces, no tabs."
msgstr ""
#. Tag: para
#, no-c-format
msgid "Do not leave trailing whitespace."
msgstr ""
#. Tag: title
#, no-c-format
msgid "Line Length"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Lines should be no longer than 80 characters unless limiting line length significantly impacts readability."
msgstr ""
#. Tag: title
#, no-c-format
msgid "Pointers"
msgstr ""
#. Tag: para
#, no-c-format
msgid "<indexterm> <primary>C</primary><secondary>pointers</secondary> </indexterm> <indexterm> <primary>pointers</primary> </indexterm>"
msgstr ""
#. Tag: para
#, no-c-format
msgid "The <literal>*</literal> goes by the variable name, not the type:"
msgstr ""
#. Tag: programlisting
#, no-c-format
msgid "char *foo;"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Use a space before the <literal>*</literal> and after the closing parenthesis in a cast:"
msgstr ""
#. Tag: programlisting
#, no-c-format
msgid "char *foo = (char *) bar;"
msgstr ""
#. Tag: title
#, no-c-format
msgid "Functions"
msgstr ""
#. Tag: para
#, no-c-format
msgid "<indexterm> <primary>C</primary><secondary>functions</secondary> </indexterm> <indexterm> <primary>functions</primary> </indexterm>"
msgstr ""
#. Tag: para
#, no-c-format
msgid "In the function definition, put the return type on its own line, and place the opening brace by itself on a line:"
msgstr ""
#. Tag: programlisting
#, no-c-format
msgid "static int\n"
"foo(void)\n"
"{"
msgstr ""
#. Tag: para
#, no-c-format
msgid "For functions with enough arguments that they must break to the next line, align arguments with the first argument:"
msgstr ""
#. Tag: programlisting
#, no-c-format
msgid "static int\n"
"function_name(int bar, const char *a, const char *b,\n"
" const char *c, const char *d)\n"
"{"
msgstr ""
#. Tag: para
#, no-c-format
msgid "If a function name gets really long, start the arguments on their own line with 8 spaces of indentation:"
msgstr ""
#. Tag: programlisting
#, no-c-format
msgid "static int\n"
"really_really_long_function_name_this_is_getting_silly_now(\n"
" int bar, const char *a, const char *b,\n"
" const char *c, const char *d)\n"
"{"
msgstr ""
#. Tag: title
#, no-c-format
msgid "Control Statements (if, else, while, for, switch)"
msgstr ""
#. Tag: para
#, no-c-format
msgid "The keyword is followed by one space, then left parenthesis without space, condition, right parenthesis, space, opening bracket on the same line. <literal>else</literal> and <literal>else if</literal> are on the same line with the ending brace and opening brace, separated by a space:"
msgstr ""
#. Tag: programlisting
#, no-c-format
msgid "if (condition1) {\n"
" statement1;\n"
"} else if (condition2) {\n"
" statement2;\n"
"} else {\n"
" statement3;\n"
"}"
msgstr ""
#. Tag: para
#, no-c-format
msgid "In a <literal>switch</literal> statement, <literal>case</literal> is indented one level, and the body of each <literal>case</literal> is indented by another level. The opening brace is on the same line as <literal>switch</literal>."
msgstr ""
#. Tag: programlisting
#, no-c-format
msgid "switch (expression) {\n"
" case 0:\n"
" command1;\n"
" break;\n"
" case 1:\n"
" command2;\n"
" break;\n"
" default:\n"
" command3;\n"
"}"
msgstr ""
#. Tag: title
#, no-c-format
msgid "Operators"
msgstr ""
#. Tag: para
#, no-c-format
msgid "<indexterm> <primary>C</primary><secondary>operators</secondary> </indexterm> <indexterm> <primary>operators</primary> </indexterm>"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Operators have spaces from both sides. Do not rely on operator precedence; use parentheses when mixing operators with different priority."
msgstr ""
#. Tag: para
#, no-c-format
msgid "No space is used after opening parenthesis and before closing parenthesis."
msgstr ""
#. Tag: programlisting
#, no-c-format
msgid "x = a + b - (c * d);"
msgstr ""
#. Tag: title
#, no-c-format
msgid "Naming Conventions"
msgstr ""
#. Tag: para
#, no-c-format
msgid "<indexterm> <primary>C</primary><secondary>naming</secondary> </indexterm> <indexterm> <primary>naming</primary> </indexterm>"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Any exposed symbols in libraries (non-<literal>static</literal> function names, type names, etc.) must begin with a prefix appropriate to the library, for example, <literal>crm_</literal>, <literal>pe_</literal>, <literal>st_</literal>, <literal>lrm_</literal>."
msgstr ""
#. Tag: title
#, no-c-format
msgid "vim Settings"
msgstr ""
#. Tag: para
#, no-c-format
msgid "<indexterm> <primary>vim</primary> </indexterm>"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Developers who use <literal>vim</literal> to edit source code can add the following settings to their <literal>~/.vimrc</literal> file to follow Pacemaker C coding guidelines:"
msgstr ""
#. Tag: screen
#, no-c-format
msgid "\" follow Pacemaker coding guidelines when editing C source code files\n"
"filetype plugin indent on\n"
"au FileType c setlocal expandtab tabstop=4 softtabstop=4 shiftwidth=4 textwidth=80\n"
"autocmd BufNewFile,BufRead *.h set filetype=c\n"
"let c_space_errors = 1"
msgstr ""
|