Information for developers on UNIX/Linux
----------------------------------------

The plplot build system now requires CMake. The latest instructions for 
building PLplot with cmake can be found on the PLplot wiki.

http://www.miscdebris.net/plplot_wiki


Coding standards for PLplot
---------------------------

When writing / contributing code for PLplot the following standards are 
followed:

C: ISO C99 standards with POSIX.1-2001 base specification (required 
for a number of functions)
C++: ISO C++ 1998 standard plus amendents
Fortran 95: Fortran 95 standard

To check code it is recommended to try compiling with suitable compiler 
flags to enforce these standards and to enable compiler warnings to check
for dubious code.

For gcc / g++ / gfortran the following flags can be used

CFLAGS='-O3 -std=c99 -pedantic -D_POSIX_C_SOURCE=200112L -Wall  \
-Wextra -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs \ 
-Wconversion -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings' 

CCFLAGS='-O3 -fvisibility=hidden -std=c++98 -pedantic -Wall -Wextra'

FFLAGS='-std=f95 -O3 -fall-intrinsics -fvisibility=hidden -pedantic \
-Wall -Wextra'

Adherence to the standards should help make the code more portable.

Some notes and recommendations
------------------------------

- Use C++ style // comments rather than the older /* */ style comments. 
The only exception to this where a comment is embeded in a line of code, 
e.g. to comment out a parameter name in a function definition in C++. 

- To mark function parameters as unused and to suppress at least gcc
warnings about these, mark the parameter names with the PL_UNUSED( )
macro.

Styling of code
---------------

The uncrustify code beautifying program is used to style the source
code consistently and in a readable manner. Running the 
scripts/style_source.sh shell script can be used the check the 
source code, and to apply any styling changes required.
