1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-06 17:53:13 +02:00

doc/dev: update rules for indentation in C sources

This commit is contained in:
Sébastien Helleu
2024-01-22 20:59:51 +01:00
parent 88d391bca3
commit 971d5b6b64
4 changed files with 7 additions and 7 deletions
+2 -3
View File
@@ -557,9 +557,8 @@ Example in C:
Some basic rules you *must* follow when you write C code:
* Use 4 spaces for indentation. Don't use tabs, they are evil.
* Try to not exceed 80 chars by line, except if this is needed to increase
readability.
* Use 4 spaces for indentation (no tabs).
* Try to not exceed 80 chars by line, except if this is needed to increase readability.
* Use comments `+/* comment */+` (not C99-style comments like `+// comment+`).
* Add a comment before any function, to explain what it does (always use a
multi-line comment, even if description is very short).
+1 -2
View File
@@ -559,8 +559,7 @@ Exemple en C :
Quelques règles basiques que vous *devez* suivre quand vous écrivez du code C :
* Utilisez 4 espaces pour l'indentation. N'utilisez pas de tabulations, c'est le
mal.
* Utilisez 4 espaces pour l'indentation (pas de tabulations).
* Essayez de ne pas dépasser 80 caractères par ligne, sauf si cela est
nécessaire pour améliorer la lisibilité.
* Utilisez les commentaires `+/* comment */+` (pas de style C99 comme
+2 -1
View File
@@ -635,7 +635,8 @@ WeeChat とプラグインの翻訳は gettext で行います、ファイルは
C 言語のコードを書く際には以下の基本的なルールを *必ず* 守ってください。:
* インデントは空白文字を 4 個使ってください。タブ文字を使わないでください、タブ文字は良くありません。
// TRANSLATION MISSING
* Use 4 spaces for indentation (no tabs).
* 読みやすくする必要がある場合を除いて、1
行は 80 文字以内に収めてください。
* コメントは `+/* comment */+` のようにしてください (`+// comment+` のような C99 スタイルのコメントは使わないでください)。
+2 -1
View File
@@ -557,7 +557,8 @@ WeeChat „језгро” се налази у следећим директо
Када пишете C кôд, *морате* да се придржавате неких основних правила:
* Користите 4 размака за увлачење редова. Не употребљавајте табове, они су зло.
// TRANSLATION MISSING
* Use 4 spaces for indentation (no tabs).
* Покушајте да не прекорачите 80 карактера по линији, осим ако је то неопходно за читљивост.
* Користите коментаре `+/* коментар */+` (а не коментаре у C99 стилу као што је `+// коментар+`).
* Испред сваке функције додајте коментар који објашњава шта она ради (увек користите вишелинијски коментар, чак и ако је опис кратак).