Improved book. It also now includes HACKING.

This commit is contained in:
Emmanuel Raviart 2004-07-30 17:02:49 +00:00
parent 386d690c3c
commit 7f902ab5cb
3 changed files with 95 additions and 55 deletions

79
HACKING
View File

@ -1,34 +1,45 @@
1) Coding style.
- Use explicit "!= NULL", "!= 0", etc. This makes code easier to read and
remove warnings on some platform. Don't forget SPACES before and after
the comparison operator.
Example:
BAD:
if(a)
BAD:
if(a!=NULL)
GOOD:
if(a != NULL)
GOOD:
if(a != 0)
- Put figure brackets '{}' even if you have only one operator
in "if", "for", etc. This also makes code easier to read and
saves a lot of time when you need to quickly change something.
Example:
BAD:
if(a != NULL)
message(G_LOG_LEVEL_MESSAGE, "Ko");
GOOD:
if(a != NULL) {
message(G_LOG_LEVEL_MESSAGE, "Ok");
}
- Use round brackets '()' for "return".
Example:
BAD:
return 0;
GOOD:
return(0);
- Check for memory leaks.
============
Coding Style
============
- Use explicit ``!= NULL``, ``!= 0``, etc. This makes code easier to read
and remove warnings on some platform. Don't forget SPACES before and
after the comparison operator.
Examples:
BAD:
``if(a)``
BAD:
``if(a!=NULL)``
GOOD:
``if(a != NULL)``
GOOD:
``if(a != 0)``
- Put figure brackets ``{}`` even if you have only one operator
in ``if``, ``for``, etc. This also makes code easier to read and
saves a lot of time when you need to quickly change something.
Examples:
BAD:
.. line-block::
if(a != NULL)
message(G_LOG_LEVEL_MESSAGE, "Ko");
GOOD:
.. line-block::
if(a != NULL) {
message(G_LOG_LEVEL_MESSAGE, "Ok");
}
- Use round brackets ``()`` for ``return``.
Examples:
BAD:
``return 0;``
GOOD:
``return(0);``
- Check for memory leaks.

30
INSTALL
View File

@ -2,9 +2,6 @@
Installing Lasso
================
Configuring and Building
========================
Lasso uses the GNU automake and autoconf to handle system dependency
checking. It is developed and built locally on GNU/Linux (Debian) both
on x86 and PowerPC processors, but is also compiled via Debian
@ -61,6 +58,25 @@ The simplest way to compile this package is:
all sorts of other programs in order to regenerate files that came
with the distribution.
Creating 'configure' Program
----------------------------
If there is no 'configure' program, you can create it by running the
'autogen.sh' script, as long as you have the 'automake' and 'autoconf'
tools. This is done by::
./autogen.sh
and you can also pass along arguments intended for 'configure' (see
below for what these are)::
./autogen.sh --prefix=/usr/local/somewhere
The 'automake' and 'autoconf' tools have many different versions and
at present development is being done with automake 1.4, autoconf 2.59
and libtool 1.5.6. These are only needed when compiling from CVS sources.
'autogen.sh' enforces the requirements.
Compilers and Options
=====================
@ -68,11 +84,11 @@ Some systems require unusual options for compilation or linking that
the 'configure' script does not know about. You can give 'configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
this::
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the 'env' program, you can do it like this:
Or on systems that have the 'env' program, you can do it like this::
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
@ -129,9 +145,6 @@ PACKAGE is something like 'gnu-ld' or 'pic'.
coldfusion
Build Lasso ColdFusion binding (enabled by default).
csharp
Build Lasso C# binding (enabled by default).
debugging
Display debugging messages in 'stderr'.
@ -210,3 +223,4 @@ Operation Controls
script, and exit.
'configure' also accepts some other, not widely useful, options.

View File

@ -19,23 +19,34 @@ General Information
About This Manual
=================
This is the Lasso Book.
FIXME
Because this manual serves as a reference, it does not provide general
instruction on Liberty Alliance or web concepts. It also will not teach
you how to use your operating system or command-line interpreter.
The Lasso Software is under constant development, and this manual is
updated frequently as well. The most recent version of the manual is
available online in at http://lasso.entrouvert.org/book.
Lasso Book Availability
=======================
A copy of this book is distributed with each source code release of
Lasso. For binary distributions, please check with your vendor.
The primary document is the reStructuredText file. The HTML version is
produced automatically using ``rest2html``.
A copy of this book is distributed with each source code release of Lasso. For
binary distributions, please check with your vendor.
If you have any suggestions concerning additions or corrections to this
manual, please send them to the Lasso development mailing-list.
A copy is available online for reference at
http://lasso.entrouvert.org/book.
This manual is maintained by the Lasso Documentation Team (see AUTHORS_
for details). For the many other contributors, see section Credits_.
The copyright to this manual is owned by the French company Entr'ouvert.
See section `Book Copyright and Permissions Notice`_. Lasso and the
Lasso logo are trademarks of Entr'ouvert. Other trademarks and
registered trademarks referred to in this manual are the property of
their respective owners, and are used for identification purposes only.
A packaged version of this book is available from
http://lasso.entrouvert.org/download. This package is primary for those people
wanting to have the book available for offline reference and for printing.
.. _README:
.. include:: ../../README
@ -103,6 +114,10 @@ Contributing
FIXME
.. _HACKING:
.. include:: ../../HACKING
=======
Credits
=======
@ -117,9 +132,9 @@ And to all of you who commented on and helped refine this document.
Thanks.
=========================================
Tutorial Copyright and Permissions Notice
=========================================
=====================================
Book Copyright and Permissions Notice
=====================================
FIXME