Replace most strdup with gmx_strdup
authorRoland Schulz <roland@utk.edu>
Mon, 7 Jul 2014 21:44:28 +0000 (17:44 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 31 Jul 2014 17:57:03 +0000 (19:57 +0200)
commita38140b32f9a0ab3599fab3b1cec4c72e57063e8
tree26bdd14f7701a01ba58a67ed0519627c6c938cea
parent178c8db507cf9133965c59714132d59ec635c3a9
Replace most strdup with gmx_strdup

gmx_strdup existed but code was using a mixture of it and strdup.
Advantages of using gmx_strudup everywhere:
- consistency
- error handling for out of memory
- strdup might not be available (e.g. Cygwin)

Left strdup in testutils which had already error handling. And fatalerror.cpp
which cannot use gmx_strdup because it could lead to an infinite loop.

If all strdup are removed gnu++0x in gmxTestCXX11.cmake is not required
anymore.

Change-Id: I6ed3e17e34b833b01222d4b45c680db7aadada34
72 files changed:
src/gromacs/commandline/pargs.cpp
src/gromacs/essentialdynamics/edsam.c
src/gromacs/fileio/confio.c
src/gromacs/fileio/enxio.c
src/gromacs/fileio/filenm.c
src/gromacs/fileio/gmxfio.c
src/gromacs/fileio/matio.cpp
src/gromacs/fileio/strdb.c
src/gromacs/fileio/tpxio.c
src/gromacs/fileio/xvgr.cpp
src/gromacs/gmxana/gmx_anaeig.c
src/gromacs/gmxana/gmx_chi.c
src/gromacs/gmxana/gmx_clustsize.c
src/gromacs/gmxana/gmx_density.c
src/gromacs/gmxana/gmx_do_dssp.c
src/gromacs/gmxana/gmx_energy.c
src/gromacs/gmxana/gmx_genion.c
src/gromacs/gmxana/gmx_hbond.c
src/gromacs/gmxana/gmx_make_ndx.c
src/gromacs/gmxana/gmx_mindist.c
src/gromacs/gmxana/gmx_mk_angndx.c
src/gromacs/gmxana/gmx_polystat.c
src/gromacs/gmxana/gmx_rmsdist.c
src/gromacs/gmxana/gmx_saltbr.c
src/gromacs/gmxana/gmx_trjcat.c
src/gromacs/gmxana/gmx_trjconv.c
src/gromacs/gmxana/gmx_tune_pme.c
src/gromacs/gmxana/gmx_vanhove.c
src/gromacs/gmxana/gmx_wham.cpp
src/gromacs/gmxana/gmx_wheel.c
src/gromacs/gmxana/gmx_xpm2ps.c
src/gromacs/gmxana/nrama.c
src/gromacs/gmxana/nsfactor.c
src/gromacs/gmxana/sfactor.c
src/gromacs/gmxlib/readinp.c
src/gromacs/gmxpreprocess/fflibutil.cpp
src/gromacs/gmxpreprocess/genhydro.c
src/gromacs/gmxpreprocess/gmxcpp.c
src/gromacs/gmxpreprocess/h_db.c
src/gromacs/gmxpreprocess/hackblock.c
src/gromacs/gmxpreprocess/hizzie.c
src/gromacs/gmxpreprocess/nm2type.c
src/gromacs/gmxpreprocess/pdb2gmx.c
src/gromacs/gmxpreprocess/pdb2top.cpp
src/gromacs/gmxpreprocess/readir.c
src/gromacs/gmxpreprocess/resall.c
src/gromacs/gmxpreprocess/specbond.c
src/gromacs/gmxpreprocess/ter_db.c
src/gromacs/gmxpreprocess/tomorse.c
src/gromacs/gmxpreprocess/topio.c
src/gromacs/gmxpreprocess/x2top.c
src/gromacs/gmxpreprocess/xlate.c
src/gromacs/mdlib/ebin.c
src/gromacs/mdlib/mdebin.c
src/gromacs/mdlib/qm_gaussian.c
src/gromacs/mdlib/tpi.c
src/gromacs/pulling/pull.c
src/gromacs/pulling/pull_rotation.c
src/gromacs/selection/params.cpp
src/gromacs/selection/parsetree.cpp
src/gromacs/selection/scanner_internal.cpp
src/gromacs/selection/tests/toputils.cpp
src/gromacs/topology/atomprop.cpp
src/gromacs/topology/index.cpp
src/gromacs/topology/symtab.cpp
src/programs/view/buttons.cpp
src/programs/view/fgrid.cpp
src/programs/view/manager.cpp
src/programs/view/x11.cpp
src/programs/view/xdlg.cpp
src/programs/view/xdlgitem.cpp
src/programs/view/xutil.cpp