From 971d5b6b64f2e7ab388a4668ae3b0257f9790a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 22 Jan 2024 20:59:51 +0100 Subject: [PATCH] doc/dev: update rules for indentation in C sources --- doc/en/weechat_dev.en.adoc | 5 ++--- doc/fr/weechat_dev.fr.adoc | 3 +-- doc/ja/weechat_dev.ja.adoc | 3 ++- doc/sr/weechat_dev.sr.adoc | 3 ++- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/en/weechat_dev.en.adoc b/doc/en/weechat_dev.en.adoc index 0660b9c5c..b86822afd 100644 --- a/doc/en/weechat_dev.en.adoc +++ b/doc/en/weechat_dev.en.adoc @@ -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). diff --git a/doc/fr/weechat_dev.fr.adoc b/doc/fr/weechat_dev.fr.adoc index 5c975603c..df83e70e2 100644 --- a/doc/fr/weechat_dev.fr.adoc +++ b/doc/fr/weechat_dev.fr.adoc @@ -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 diff --git a/doc/ja/weechat_dev.ja.adoc b/doc/ja/weechat_dev.ja.adoc index 722b9ec93..0983e11c0 100644 --- a/doc/ja/weechat_dev.ja.adoc +++ b/doc/ja/weechat_dev.ja.adoc @@ -635,7 +635,8 @@ WeeChat とプラグインの翻訳は gettext で行います、ファイルは C 言語のコードを書く際には以下の基本的なルールを *必ず* 守ってください。: -* インデントは空白文字を 4 個使ってください。タブ文字を使わないでください、タブ文字は良くありません。 +// TRANSLATION MISSING +* Use 4 spaces for indentation (no tabs). * 読みやすくする必要がある場合を除いて、1 行は 80 文字以内に収めてください。 * コメントは `+/* comment */+` のようにしてください (`+// comment+` のような C99 スタイルのコメントは使わないでください)。 diff --git a/doc/sr/weechat_dev.sr.adoc b/doc/sr/weechat_dev.sr.adoc index f9b1d845e..fd3995e09 100644 --- a/doc/sr/weechat_dev.sr.adoc +++ b/doc/sr/weechat_dev.sr.adoc @@ -557,7 +557,8 @@ WeeChat „језгро” се налази у следећим директо Када пишете C кôд, *морате* да се придржавате неких основних правила: -* Користите 4 размака за увлачење редова. Не употребљавајте табове, они су зло. +// TRANSLATION MISSING +* Use 4 spaces for indentation (no tabs). * Покушајте да не прекорачите 80 карактера по линији, осим ако је то неопходно за читљивост. * Користите коментаре `+/* коментар */+` (а не коментаре у C99 стилу као што је `+// коментар+`). * Испред сваке функције додајте коментар који објашњава шта она ради (увек користите вишелинијски коментар, чак и ако је опис кратак).