Merge branch 'beta' into dev-5.2
This commit is contained in:
@@ -1,18 +0,0 @@
|
|||||||
Use the _astylerc config file and the 'astyle' util to format the
|
|
||||||
project source files in accordance with the project coding style.
|
|
||||||
|
|
||||||
At project top level run these commands:
|
|
||||||
|
|
||||||
1. To format the .c files:
|
|
||||||
$ find . -type f -name "*.c" | xargs astyle --options=_astylerc-c
|
|
||||||
-OR- (to skip creation of backup files)
|
|
||||||
$ find . -type f -name "*.c" | xargs astyle --options=_astylerc-c -n
|
|
||||||
|
|
||||||
2. To format the .h files:
|
|
||||||
$ find . -type f -name "*.h" | xargs astyle --options=_astylerc-h
|
|
||||||
-OR- (to skip creation of backup files)
|
|
||||||
$ find . -type f -name "*.h" | xargs astyle --options=_astylerc-h -n
|
|
||||||
|
|
||||||
3. To remove the backup file created by astyle:
|
|
||||||
$ find . -type f -name "*.bak" -delete # this are *.c backup files
|
|
||||||
$ find . -type f -name "*.orig" -delete # this are *.h backup files
|
|
||||||
@@ -161,3 +161,14 @@ void lv_label_set_text(lv_obj_t * label, const char * text)
|
|||||||
```
|
```
|
||||||
|
|
||||||
Use 4 spaces indentation instead of tab.
|
Use 4 spaces indentation instead of tab.
|
||||||
|
|
||||||
|
You can use **astyle** to format the code. The required config flies are: `docs/astyle_c` and `docs/astyle_h`.
|
||||||
|
To format the header files:
|
||||||
|
`$ find . -type f -name "*.c" | xargs astyle --options=docs/astyle_c`
|
||||||
|
|
||||||
|
To format the sorce files:
|
||||||
|
`$ find . -type f -name "*.h" | xargs astyle --options=docs/astyle_h`
|
||||||
|
|
||||||
|
Append `-n` to the end to skip creation of backup file or use `$ find . -type f -name "*.bak" -delete` (for source file's backups) and `find . -type f -name "*.orig" -delete` (for header file's backups)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1
docs/astyle_c
Normal file
1
docs/astyle_c
Normal file
@@ -0,0 +1 @@
|
|||||||
|
--style=kr --convert-tabs --indent=spaces=4 --indent-switches --pad-oper --unpad-paren --align-pointer=middle --suffix=.bak --lineend=linux --min-conditional-indent=
|
||||||
1
docs/astyle_h
Normal file
1
docs/astyle_h
Normal file
@@ -0,0 +1 @@
|
|||||||
|
--convert-tabs --indent=spaces=4
|
||||||
Reference in New Issue
Block a user