radare2/doc/syntax
pancake cdd80105cb * Initial dummy implementation of r_bp
- Managing breakpoints for the core
  - Initial work on the support for breakpoints
    for the r_debug plugins
* Adding some dummy work for context support in r_anal
* Make asm_set_bits check per-plugin supported bit sizes
  - Now asm plugins have 'arch' and 'bits' attributes
  - Used to setup default callbacks for undefined 'assemble' callback
  - Also used to avoid setting asm.bits eval variable to invalid values
  - We need a way to display all this data
* Added DEFAULT_ARCH in config.h to setup default arch to asm and anal
* Added r_config_set_i_cb()
  - Make r_config_set restore value when callback is called and fails
  - asm.bits now has a config callback
* Added _LAST in some r_anal enums
2009-04-11 21:22:20 +00:00

42 lines
1.4 KiB
Plaintext

Syntax coding style guidelines
==============================
I will try to not being a boring document like most of already available
coding style guidelines ;) Here'r some rules:
* Do not bypass 78 columns
* Use tabs instead of space based indentation
- The code should be smart enought to do not bypass 78 columns
using 5 space indentation.
* function opens brackets at next line
* do/for/if/while open brackets at same line
* Commas and keywords should be followed by a space. f.ex:
if (blabl)
foo(one, two);
* Do not use C99 variable declaration
- This way we reduce the number of local variables per function
and it's easier to find which variables are used, where and so on.
* Comments should be smart. Function names should be enought explicit
to not require a comment to explain what it does. If this is not
possible at all, we can still use a comment. But it is a bad idea
to relay on comment to make the code readable.
* Use 'R_API' define to mark exportable methods
* Try not using oneline comments '//'. Use /* */ instead
* To comment out some code use #if 0 (...) #endif
* Do not write ultra-large functions, split them into multiple or simplify
the algorithm, only external-copy-pasted-not-going-to-be-maintained code
can be accepted in this way (gnu code, external disassemblers, etc..)
VIM syntax configuration:
-------------------------
TODO: