summaryrefslogtreecommitdiffhomepage
path: root/doc/coding_conventions.md
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-05-13 23:08:40 +0900
committerYukihiro Matsumoto <[email protected]>2012-05-13 23:08:40 +0900
commitc6daff1f92c1a5b777ad318b3a06bbcc444af3dc (patch)
tree86942baef30c3a02b4ded48fcc18a7848e341d93 /doc/coding_conventions.md
parent422f92292378db134a4fad7411b45e4634ba65fb (diff)
downloadmruby-c6daff1f92c1a5b777ad318b3a06bbcc444af3dc.tar.gz
mruby-c6daff1f92c1a5b777ad318b3a06bbcc444af3dc.zip
doc/coding_conventions: word-wrap 80 columns; close #129
Diffstat (limited to 'doc/coding_conventions.md')
-rw-r--r--doc/coding_conventions.md21
1 files changed, 15 insertions, 6 deletions
diff --git a/doc/coding_conventions.md b/doc/coding_conventions.md
index 8493501ef..aa47fe980 100644
--- a/doc/coding_conventions.md
+++ b/doc/coding_conventions.md
@@ -4,17 +4,24 @@ How to style your C and Ruby code which you want to submit.
## C code
-The core part (parser, bytecode-interpreter, core-lib, etc.) of mruby is written in the C programming language. Please note the following hints for your C code:
+The core part (parser, bytecode-interpreter, core-lib, etc.) of mruby is
+written in the C programming language. Please note the following hints for your
+C code:
### Comply with C99 (ISO/IEC 9899:1999)
-mruby should be highly portable to other systems and compilers. For that it is recommended to keep your code as close as possible to the C99 standard (http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf).
+mruby should be highly portable to other systems and compilers. For that it is
+recommended to keep your code as close as possible to the C99 standard
+(http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf).
-Although we target C99, VC is also an important target for mruby, so that we avoid local variable declaration in the middle.
+Although we target C99, VC is also an important target for mruby, so that we
+avoid local variable declaration in the middle.
### Reduce library dependencies to a minimum
-The dependencies to libraries should be put to an absolute minimum. This increases the portability but makes it also easier to cut away parts of mruby on-demand.
+The dependencies to libraries should be put to an absolute minimum. This
+increases the portability but makes it also easier to cut away parts of mruby
+on-demand.
### Don't use C++ style comments
@@ -32,8 +39,10 @@ Use C++ style comments only for temporary comment e.g. commenting out some code
## Ruby code
-Parts of the standard library of mruby is written in the Ruby programming language itself. Please note the following hints for your Ruby code:
+Parts of the standard library of mruby is written in the Ruby programming language
+itself. Please note the following hints for your Ruby code:
### Comply with the Ruby standard (ISO/IEC 30170:2012)
-mruby is currently targeting to execute Ruby code which complies to ISO/IEC 30170:2012 (http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579). \ No newline at end of file
+mruby is currently targeting to execute Ruby code which complies to ISO/IEC
+30170:2012 (http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579).