More files to C++.
authorTeemu Murtola <teemu.murtola@gmail.com>
Wed, 3 Jul 2013 11:00:39 +0000 (14:00 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Sun, 21 Jul 2013 04:29:38 +0000 (07:29 +0300)
commit9909487191ec1f8910b65713b70ff669743778bb
treeb6e16bda141d26ce4049e38642d42b7bdcd7a6b4
parente6879f39d9cac75a6f80a527696e0a4f7dcb5d6b
More files to C++.

Switch a few more files to C++ compilation and resolve issues found: add
several extern "C" declarations, remove unused variables, move some
static variables from headers to source files.  Move gmx_ctime_r()
declaration to string2.h; it must be better to have one extra
declaration in an installed header than a mass of repeated declarations
in source files.  Remove a hack in smalloc.h; the code that prompted
that seems to have been removed in the kernel reorganization for 4.6,
and we are anyways not yet compiling a lot of legacy code with C++.
Suppress most scanf() warnings in these files.  Make cppcheck correctly
parse #ifdef __cplusplus blocks.  Add gmx_isnan().

The motivation for this selection of files is that these files write
output files where either command_line() or Program() is used to
indicate the currently running program.  Will replace those calls with a
uniform mechanism in a subsequent commit.

Change-Id: Ic1e90fcc08b1be6d4d6d257215f9523625ab347a
26 files changed:
src/gromacs/gmxana/binsearch.h
src/gromacs/gmxana/dens_filter.h
src/gromacs/gmxana/gmx_covar.c
src/gromacs/gmxana/gmx_densorder.cpp [moved from src/gromacs/gmxana/gmx_densorder.c with 97% similarity]
src/gromacs/gmxana/gmx_dipoles.cpp [moved from src/gromacs/gmxana/gmx_dipoles.c with 97% similarity]
src/gromacs/gmxana/powerspect.h
src/gromacs/gmxlib/checkpoint.c
src/gromacs/gmxlib/main.cpp [moved from src/gromacs/gmxlib/main.c with 97% similarity]
src/gromacs/gmxlib/maths.c
src/gromacs/gmxlib/matio.cpp [moved from src/gromacs/gmxlib/matio.c with 98% similarity]
src/gromacs/gmxlib/xvgr.cpp [moved from src/gromacs/gmxlib/xvgr.c with 98% similarity]
src/gromacs/gmxpreprocess/CMakeLists.txt
src/gromacs/gmxpreprocess/add_par.h
src/gromacs/gmxpreprocess/gen_vsite.h
src/gromacs/gmxpreprocess/pdb2top.cpp [moved from src/gromacs/gmxpreprocess/pdb2top.c with 97% similarity]
src/gromacs/gmxpreprocess/pgutil.h
src/gromacs/gmxpreprocess/readir.c
src/gromacs/gmxpreprocess/readir.h
src/gromacs/gmxpreprocess/topdirs.h
src/gromacs/legacyheaders/maths.h
src/gromacs/legacyheaders/pdb2top.h
src/gromacs/legacyheaders/smalloc.h
src/gromacs/legacyheaders/string2.h
src/gromacs/legacyheaders/typedefs.h
src/gromacs/mdlib/sim_util.c
tests/CppCheck.cmake