1 Star 0 Fork 0

shcnxjy / fixmath

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
HACKING 4.02 KB
一键复制 编辑 原始数据 按行查看 历史
Johan Nystrom 提交于 2012-04-25 00:14 . Initial commit.
Copyright (C) 2012, Axis Communications AB, LUND, SWEDEN
See the end for copying conditions.
Please try and keep the source consistent in style for easy
reading and management.
C-code
======
When writing or editing code, see the surrounding code
and other files for formatting style. Some known
inconsistencies:
- Regarding whitespace and vertically aligned code features:
if you can keep the vertical alignment without changing lines
other than the one where the actual non-whitespace code change
is, please do. Otherwise, whatever helps reading, but no
whitespace-only changes on any line.
- Full stop "." at the end of sentences in comments is
encouraged, and required for multiple sentences in a comment.
- There's also inconsistency regarding spacing and operators in
parentheses. Use one spaces before and after any binary
operator and none before parentheses: '((a + b * d) / c)'.
- Regarding symbols, the exported API functions (and constants)
and nothing else, must have the fx_ prefix.
Shell code
==========
Only use portable Bourne shell constructs and commands.
See the "Portable Shell" section in the autoconf info pages.
- Use "test" rather than "[" ... "]" to keep a nominal common
style with scripts as well as configure.ac where using "["
... "]" is awkward.
- For autoconf-specific issues, see AC_RULES comment in configure.ac.
- Use ${varname} everywhere, not $varname. No reason other than
the amount in the original files.
- Don't over-quote: do it only for ${srcdir}, ${objdir} and
similar or other expressions and variables that *may* be empty
or contain spaces: 'test "${srcdir}" = ..'.
- For constant strings and convenience variables that are always
set by the script itself to constant strings, for example to no
or yes, don't quote them: 'test ${myvar} = yes'.
- Where you have full control of the contents, don't use empty
variables. Set and test for yes and no rather than emptiness.
- Regarding whitespace for vertical alignment, see above for C
code.
Makefiles
=========
- Only use portable make constructs as per the "Portable Make"
section in the autoconf info pages, with the addition of
one-level nested variable expansion: $(FOO_$(BAR)).
- Regarding whitespace for vertical alignment, see above for C
code and shell code.
Testing
=======
- New code and bug-fixes must always be accompanied by a
test-case, which fails or does not compile before the code
change, and passes after the change.
- Use "make many-distchecks" after any changes to configure.ac
or Makefile.am or one of the scripts. Feel free to run
"make release-distchecks" too, but that may take a day or two.
- When changing any of the tuning or benchmarking scripts, also
do a cross-build with --disable-tune-cache as well as a build
with --disable-tune-cache and make check for a non-Linux system
for example as Solaris or NetBSD.
This file is part of Fixmath.
Fixmath is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
You can use the comments under either the terms of the GNU Lesser General
Public License version 3 as published by the Free Software Foundation,
either version 3 of the License or (at your option) any later version, or
the GNU Free Documentation License version 1.3 or any later version
published by the Free Software Foundation; with no Invariant Sections, no
Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the documentation section entitled
"GNU Free Documentation License".
Fixmath is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License and a copy of the GNU Free Documentation License along
with Fixmath. If not, see <http://www.gnu.org/licenses/>.
1
https://gitee.com/shcnxjy/fixmath.git
git@gitee.com:shcnxjy/fixmath.git
shcnxjy
fixmath
fixmath
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891