/**
\page History
\section history History
<pre>
2004-11-07 Vesa Oikonen
2005-01-20 Calle Laakkonen
2005-04-26 Jarkko Johansson
  Functions libtpccurveio_print_readme(), libtpccurveio_print_history(),
  libtpccurveio_print_dreadme() and libtpccurveio_print_dhistory()
  are used for getting the Readme and History messages for libtpccurveio,
  with and without Doxygen style tags. Remember to update the
  functions to get correct Readme and History messages!
  Function libtpccurveio_print_build(), is used for getting the build
  information.
  Merged with libcpt.
2005-06-17 Kaisa Sederholm
  New version of dft.c.
2005-10-30 Vesa Oikonen
  New version of mathfunc.c, result.c, and dft.c.
2005-11-30 Vesa Oikonen
  Added support to Imanet London TAC files (idwc.c and if.c).
2005-12-05 KS
  Added warning if the function dftWrite is writing the file 
  with a name that allready exists.
2006-01-31 VO
  New version of mathfunc.c.
2006-05-15 VO
  New version of dft.c.
2006-06-03 VO
  Added support for Hill function with background (mathfunc.c).
  Added fields in result data structure (result.h and result.c).
  Field names in result data structure are case-insensitive.
  Field names in fit data structure are case-insensitive.
2006-07-12 VO
  New version of result.c.
  New functions in dft.c, dft.h changed accordingly.
2006-07-31 VO
  New version of result.c, result.h changed accordingly.
2006-12-01 VO
  Corrected a bug: existing backup files were not overwritten.
2007-01-15 VO
  New functions in dft.c and result.c.  Additions in dft.h and result.h, accordingly.
  Corrected a bug: existing result backup files were not overwritten.
2007-01-26 VO
  Corrected a bug with XHTML tables of plain DFT data.
2007-02-10 VO
  New functions for processing calibration and time units.
  Programs that work with time unit MUST be updated to use
  DFTTIME_MIN, DFTTIME_SEC or DFTTIME_UNKNOWN.
2007-04-13 VO
  New function for adding extra information in comments.
2007-04-20 VO
  Corrected bugs in reading and writing fit files.
  Added support for Hill function which does not start from 1.0.
2007-04-24 VO
  Corrected bug: crashed when writing DFT file was not successful.
2007-08-12 VO
  Change in DFT writing defaults.
  New functions for setting up results based on DFT data.
  Change in function that corrects DFT frame overlapping.
  Backup file extension can be changed by defining BACKUP_EXTENSION
  before including any TPC libraries; remember to include the '.'.
2007-09-13 VO
  Added fields datanr and fitmethod in RES struct.
  Added function resSelectRegions().
2008-03-20 VO
  Bug correction in writing units.
2008-05-15 VO
  Bug correction in reading result files.
2008-07-14 VO
  Added functions dftSelectBestReference() and dftAllocateWithHeader().
2008-08-04 VO
  Added CSV read functions.
2008-08-26 VO
  Added support for Weibull cdf.
2008-09-04 VO
  Added support for Weibull cdf plus its derivative.
2008-10-10 VO
  DFT data can be saved with higher precision by changing
  DFT_NR_OF_DECIMALS.
2009-01-09 VO
  CPT and *.roi.kbq formats are read with weights initiated to 1.
2009-02-26 VO
  Calibration units in CPT files are better identified.
2009-03-06 VO
  Function 843 was changed (mathfunc.c).
  Added xelRead() in new xeleris.c.
  Added tsvRead() in new tsv.c.
2009-04-15 VO
  MAX_FITPARAMS was changed from 20 to 50 in mathfunc.h.
2009-05-12 VO
  Function 332 was added in mathfunc.c.
2009-06-09 VO
  Added dftFillInitialGap() in dft.c.
2009-06-21 VO
  Function dftAddmem() rewritten in dft.c.
2009-07-28 VO
  Added fitres.c and fitres.h, with functions fitToResult() and
  fit_allocate_with_dft().
2009-07-30 VO
  Tiny change reading study number in dftio.c.
2009-08-10 VO
  Function 334 was added in mathfunc.c.
2009-08-19 VO
  Function 1321 was added in mathfunc.c.
2009-12-29 VO
  Fixed a bug in reading time units in DFT files.
  Added functions for comparing two RES structs.
2010-01-19 VO
  Change in function 332 parameters.
2010-03-30 VO
  DFT frame middle or start and end times are filled also when
  time units are unknown.
2010-04-12 VO
  Added function in dft.c
  petunits.c and petunits.h moved into libtpcmisc.
2010-04-26 VO
  dftRead() can read Inveon PET/CT CSV files.
2010-06-05 VO
  Added function resWriteHTML_table().
2010-08-16 VO
  Added functions 861 and 862 for parent and metabolite fractions.
2010-09-17 VO
  Added functions 846, 847, 863 and 864 for parent and metab fractions.
2010-10-07 VO
  Addition in fitToResult().
2010-10-08 VO
  Correction in dftFrameTimes().
2010-10-12 VO
  Added function dftMinMaxTAC in dft.c.
2010-10-30 VO
  NA definition replaced by NaN (isnan(f) and f=nan() ).
  2010-11-09 VO
  Bug fix in dftAddnullframe().
2010-11-15 VO
  dftRead() reads additional file type containing one title
  which does not start with comment mark.
2010-12-14 1.10.0 VO
  Additional field plasmafile2 in RES struct.
  Fields titleline and unitline is RES struct are depracated
  (but supported for now) and substituted by array fields
  parname[] and parunit[].
  Bug fix in resMatchParametersAbs() and resMatchParameters().
2011-01-13 1.10.1 VO
  Bug fix in resFixParnames().
2011-01-20 1.10.2 VO
  Small changes and additions in mathfunc.c.
2011-01-26 1.10.3 VO
  Added function dftMaxY in dft.c.
2011-01-28 1.10.4 VO
  Bug fix in dftMaxY().
  Change in resMatchParameters().
2011-02-16 1.10.5 VO
  csv2dft() led to unhandled exception in case of non-supported
  csv file; this is now fixed.
2011-02-17 1.10.6 VO
  csv2dft() handels a second type of Inveon data.
2011-04-27 1.10.7 VO
  dftRead() divides long region name into subfields.
2011-06-21 1.10.8 VO
  Small changes and bug fix in result file reading and writing.
2011-06-22 1.10.9 VO
  Further change in resFixParnames().
2011-07-01 1.10.10 VO
  dftUnitConversion() supports additional conversions.
2011-08-10 1.10.11 VO
  Fixed integrals for functions 1313 and 1314 in mathfunc.c.
2011-09-09 2.0.0 VO
  Changes to compile, install and distribute in 64-bit systems.
2011-12-30 2.0.1 VO
  Additional functions and fixed descriptions in mathfunc.c.
2012-02-24 2.0.2 VO
  Tiny changes in unit identification in csv.c.
2012-02-28 2.0.3 VO
  Added defines for DFT format field contents into dft.h.
2012-02-29 2.1.0 VO
  Added function dftFormat().
  dft_fill_hdr_from_title_line() replaced by dftGetPmodTitle().
  Changes in format identification in dftRead().
  dftRead() and dftWrite() support PMOD format.
2012-03-05 2.1.1 VO
  Better data validation in dftRead().
2012-03-07 2.1.2 VO
  Bug fix in fitRead().
2012-03-15 2.1.3 VO
  Change in fitEval() in function 844.
  Bug fix in dftRead() with plain format.
2012-04-20 2.2.0 VO
  dftWrite() uses tab as column separator instead of spaces.
  fitWrite() uses tab as column separator instead of spaces.
  resWrite() uses tab as column separator instead of spaces;
  programs that read result files must be recompiled using this
  or later library version.
2012-05-07 2.2.1 VO
  Bug fix in resRead().
2012-06-01 2.2.2 VO
  When creating voinames, dftRead() pads zeroes only as needed.
2012-06-06 2.2.3 VO
  Another bug fix in resRead().
  Removed some code fragments that had been commented out.
2012-06-11 2.2.4 VO
  And another bug fix in resRead().
2012-06-19 2.2.5 VO
  Additional parameters for dftMinMaxTAC().
  Tiny changes in test printing.
2012-06-28 2.2.6 VO
  Again bug fix in resRead().
2012-07-06 2.2.7 VO
  dftFrametimes() checks that frame start and end times really exist.
2012-08-16 2.2.8 VO
  MAX_RESPARAMS changed from 30 to 100.
  MAX_FITPARAMS changed from 50 to 100.
2012-09-25 2.2.9 VO
  dftWrite() saves PMOD files in format that is compatible with new
  PMOD versions.
2012-09-27 2.2.10 VO
  Change in resWriteHTML_table() in result.c.
2012-09-28 2.3.0 VO
  MAX_REGIONSUBNAME_LEN is used instead of hard-coded value 6(+1).
  Added function dftRNameSimplify() in dft.c.
  PMOD TAC files can have region names with spaces.
2012-10-24 2.3.1 VO
  Changed dftFormat() to try to identify TAC formats first based on
  magic number and only then based on filename extention.
2012-10-25 2.3.2 VO
  Added function dftRemoveTimeRange() in dft.c.
2012-10-30 2.3.3 VO
  Added function dftMeanTAC() in dft.c.
2012-11-10 2.3.4 VO
  dftFormat() identifies CSV international and UK formats separately.
  csv2dft() sets TAC names to defaults unless found in CSV file.
  csv2dft() sets DFT plain format if none of TACs had a name.
2012-11-21 2.3.5 VO
  Change handling NaNs in dftMinMax().
2012-12-03 2.4.0 VO
  Additional fields in RES and FIT structs.
2013-04-17 2.4.1 VO
  Included libtpcmisc.h in all .c files.
2013-05-13 2.4.2 VO
  Small updates in resInit() and res_allocate_with_dft().
2013-06-17 2.4.3 VO
  dftRead() verifies that DFT files do not contain extra title fields.
  Added function dftCopymainhdr2().
  csvRead() can read CSV files with start and end time.
2013-06-18 2.4.4 VO
  Fixed a bug in dftRead().
2013-06-24 VO
  Function dftRead() returns specific error codes in case of format errors.
2013-07-02 2.4.5 VO
  Added dftdecay.c and dftdecay.h.
  Small changes in dft.c, mathfunc.c, and result.c.
2013-08-13 2.4.6 VO
  Small changes in results.c.
2013-10-07 2.4.7 VO
  Function dftRead() can read LinkSet TAC file.
2013-12-13 2.4.8 VO
  Added functions 848 and 849 for parent and metab fractions.
2014-03-05 2.4.9 VO
  dftFormat() and dftType() accept the copyright character.
2014-07-10 2.4.10 VO
  dftRead() should work when the 3rd title line in DFT has (erroneously)
  the concentration unit made up of two parts (by some Carimas versions).


</pre> 
 */
