kopia lustrzana https://github.com/Hamlib/Hamlib
Additional coding and style guidelines.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3049 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.13
rodzic
9083fd9144
commit
7429491ca5
159
README.developer
159
README.developer
|
@ -49,76 +49,69 @@ utility) and USB. Other connectivity will follow afterwards.
|
||||||
General Guidelines.
|
General Guidelines.
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
0. The top level directory looks like this as of 19 Jan 2011
|
0. The top level directory looks like this as of 13 Feb 2011
|
||||||
(Note, it has grown considerably).
|
(Note, it has grown considerably).
|
||||||
|
|
||||||
~/test/hamlib $ tree -d -I .svn
|
$ tree -d -I .svn
|
||||||
|
|
||||||
.
|
.
|
||||||
|-- alinco
|
├── alinco
|
||||||
|-- aor
|
├── aor
|
||||||
|-- ars
|
├── ars
|
||||||
|-- bindings
|
├── bindings
|
||||||
|-- c++
|
├── c++
|
||||||
|-- doc
|
├── doc
|
||||||
| `-- sgml
|
├── drake
|
||||||
|-- drake
|
├── dummy
|
||||||
|-- dummy
|
├── easycomm
|
||||||
|-- easycomm
|
├── flexradio
|
||||||
|-- flexradio
|
├── fodtrack
|
||||||
|-- fodtrack
|
├── gnuradio
|
||||||
|-- gnuradio
|
├── gs232a
|
||||||
|-- gs232a
|
├── heathkit
|
||||||
|-- heathkit
|
├── icom
|
||||||
|-- icom
|
├── include
|
||||||
|-- include
|
│ └── hamlib
|
||||||
| `-- hamlib
|
├── jrc
|
||||||
|-- jrc
|
├── kachina
|
||||||
|-- kachina
|
├── kenwood
|
||||||
|-- kenwood
|
├── kit
|
||||||
|-- kit
|
├── kylix
|
||||||
|-- kylix
|
│ └── tests
|
||||||
| `-- tests
|
├── lib
|
||||||
|-- lib
|
├── lowe
|
||||||
|-- libltdl
|
├── m2
|
||||||
| |-- config
|
├── macros
|
||||||
| |-- libltdl
|
├── microtune
|
||||||
| |-- loaders
|
├── miniVNA
|
||||||
| `-- m4
|
├── pcr
|
||||||
|-- lowe
|
├── perl
|
||||||
|-- m2
|
├── prm80
|
||||||
|-- macros
|
├── racal
|
||||||
|-- microtune
|
├── rft
|
||||||
|-- miniVNA
|
├── rotorez
|
||||||
|-- pcr
|
├── rpcrig
|
||||||
|-- perl
|
├── rpcrot
|
||||||
|-- prm80
|
├── rs
|
||||||
|-- racal
|
├── sartek
|
||||||
|-- rft
|
├── skanti
|
||||||
|-- rotorez
|
├── spid
|
||||||
|-- rpcrig
|
├── src
|
||||||
|-- rpcrot
|
├── tapr
|
||||||
|-- rs
|
├── tentec
|
||||||
|-- sartek
|
├── tests
|
||||||
|-- skanti
|
│ ├── config
|
||||||
|-- spid
|
│ ├── rigctl.test
|
||||||
|-- src
|
│ ├── testbcd.test
|
||||||
|-- tapr
|
│ ├── testfreq.test
|
||||||
|-- tentec
|
│ └── testloc.test
|
||||||
|-- tests
|
├── tuner
|
||||||
| |-- config
|
├── uniden
|
||||||
| |-- rigctl.test
|
├── winradio
|
||||||
| |-- testbcd.test
|
│ └── linradio
|
||||||
| |-- testfreq.test
|
├── wj
|
||||||
| `-- testloc.test
|
└── yaesu
|
||||||
|-- tuner
|
|
||||||
|-- uniden
|
|
||||||
|-- winradio
|
|
||||||
| `-- linradio
|
|
||||||
|-- wj
|
|
||||||
`-- yaesu
|
|
||||||
|
|
||||||
62 directories
|
56 directories
|
||||||
|
|
||||||
|
|
||||||
1. Building
|
1. Building
|
||||||
|
@ -188,7 +181,9 @@ that need to be installed manually.
|
||||||
* libtool 2.2.6b # libtool --version
|
* libtool 2.2.6b # libtool --version
|
||||||
* svn for connection to hamlib.svn.sourceforge.net
|
* svn for connection to hamlib.svn.sourceforge.net
|
||||||
|
|
||||||
N.B. Hamlib requires libtool >= 2.2.6b in compliance with CVE-2009-3736.
|
N.B. Hamlib no longer supports versions of libtool earlier than 2.2.6b in
|
||||||
|
compliance with CVE-2009-3736. If an older version is found, Hamlib will use
|
||||||
|
the bundled libtool 2.2.6b instead.
|
||||||
|
|
||||||
Optional, but highly recommended:
|
Optional, but highly recommended:
|
||||||
* GNU C++ # g++ --version
|
* GNU C++ # g++ --version
|
||||||
|
@ -315,7 +310,8 @@ developer mailing list, hamlib-developer@lists.sourceforge.net
|
||||||
Patches are welcome too! Just send them to the mailing list. Unified diff
|
Patches are welcome too! Just send them to the mailing list. Unified diff
|
||||||
(diff -u) is the prefered format and patches should apply to the current SVN
|
(diff -u) is the prefered format and patches should apply to the current SVN
|
||||||
trunk, if possible. If you're patching against an older released version of
|
trunk, if possible. If you're patching against an older released version of
|
||||||
Hamlib, we can take those as well.
|
Hamlib, we can take those as well but please document the base the diff is
|
||||||
|
against.
|
||||||
|
|
||||||
So far, Hamlib has been tested successfully under the following systems:
|
So far, Hamlib has been tested successfully under the following systems:
|
||||||
(if your system is not present, please report to the mailing list)
|
(if your system is not present, please report to the mailing list)
|
||||||
|
@ -428,7 +424,7 @@ cool GUI development. I would like to see some GTK or Qt apps that use the
|
||||||
hamlib API's so they can be used by end users as a nice part of the Ham shack.
|
hamlib API's so they can be used by end users as a nice part of the Ham shack.
|
||||||
|
|
||||||
Starting points (not exhaustive):
|
Starting points (not exhaustive):
|
||||||
gmfsk, gpredict, grig, klog, kontakt, ktrack, xlog, xtlf
|
Fldigi, CQRlog, gmfsk, gpredict, grig, klog, kontakt, ktrack, xlog
|
||||||
|
|
||||||
|
|
||||||
8. Contributing code
|
8. Contributing code
|
||||||
|
@ -445,6 +441,31 @@ under the GPL, so any contributed code must follow the rule.
|
||||||
8.2 Coding guidelines and style
|
8.2 Coding guidelines and style
|
||||||
|
|
||||||
Try to keep current style of existing code. Improvements are welcome though.
|
Try to keep current style of existing code. Improvements are welcome though.
|
||||||
|
When in doubt, follow the Linux kernel coding style guide:
|
||||||
|
|
||||||
|
http://www.kernel.org/doc/Documentation/CodingStyle
|
||||||
|
|
||||||
|
Hamlib is a code base from many contributors and a variety of styles have
|
||||||
|
been employed. If you work on a source file, go ahead and apply good
|
||||||
|
judgement and clean it up per the kernel style guide. Lining things up
|
||||||
|
nicely with 8 space tabs (use tabs, not spaces) is an excellent start.
|
||||||
|
Next, put spaces in assignments to aid readability. Align closing braces
|
||||||
|
with the opening block's keyword. In function definitions put the opening
|
||||||
|
brace on its own line under the definition's parameter line.
|
||||||
|
|
||||||
|
Hamlib source code is no place for an entry into the obsfucated C contest!
|
||||||
|
Many of us are hobbyists and write this for fun. Easy to read and
|
||||||
|
understand logic is preferred over a clever solution. If your solution must
|
||||||
|
be written in a clever fashion, please document it well in your comments.
|
||||||
|
|
||||||
|
Any header files included from the hamlib/ directory should be enclosed
|
||||||
|
in <>:
|
||||||
|
#include <hamlib/rig.h> # Per GNU GCC documentation
|
||||||
|
|
||||||
|
Other included header files (backend and rig specific headers) should be
|
||||||
|
enclosed in "":
|
||||||
|
#include "yaesu.h"
|
||||||
|
|
||||||
Contributed code should always keep the source base in a compilable state,
|
Contributed code should always keep the source base in a compilable state,
|
||||||
and not regress unless stated otherwise.
|
and not regress unless stated otherwise.
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue