[GenABEL-dev] [Genabel-commits] r705 - pkg/ProbABEL/src

Yurii Aulchenko yurii.aulchenko at gmail.com
Fri Apr 1 10:03:02 CEST 2011


Hi Lennart,

Defining the error() function in data.h of ProbABEL sounds like a
great solution to the bug, thank you!

Everything compiles well now; examples seem to run well :)

We still need to make distrib and put that on GenABEL-project
web-site. Would you have time for this?

Also, should we reflect the changes in CHANGES.LOG and update the
version to 0.1-9e, say? Not sure it is really necessary, though.

Yurii


On Fri, Apr 1, 2011 at 8:33 AM,  <noreply at r-forge.wu-wien.ac.at> wrote:
> Author: lckarssen
> Date: 2011-04-01 08:33:48 +0200 (Fri, 01 Apr 2011)
> New Revision: 705
>
> Modified:
>   pkg/ProbABEL/src/data.h
> Log:
> Fixes bug #1339:
> Remove the inclusion of fvlib/frerror.h (this file had been removed in r599). The error() function is now defined in this file. The function definition was simply taken from fvlib/frerror.cpp (also deleted in r599).
>
> The changes further down the file is the removal of superfluous spaces (artifact of my emacs).
>
>
> Modified: pkg/ProbABEL/src/data.h
> ===================================================================
> --- pkg/ProbABEL/src/data.h     2011-03-30 23:54:07 UTC (rev 704)
> +++ pkg/ProbABEL/src/data.h     2011-04-01 06:33:48 UTC (rev 705)
> @@ -1,6 +1,7 @@
>  #include <string>
>  #include <sstream>
>  #include <fstream>
> +#include <cstdarg>
>  #include "mematrix.h"
>
>  #include "fvlib/AbstractMatrix.h"
> @@ -8,7 +9,6 @@
>  #include "fvlib/const.h"
>  #include "fvlib/convert_util.h"
>  #include "fvlib/FileVector.h"
> -#include "fvlib/frerror.h"
>  #include "fvlib/frutil.h"
>  #include "fvlib/frversion.h"
>  #include "fvlib/Logger.h"
> @@ -16,6 +16,18 @@
>
>  extern bool is_interaction_excluded;
>
> +void error(const char * format, ...)
> +{
> +    va_list args;
> +    char buffer[256];
> +    va_start(args, format);
> +    vsprintf(buffer, format, args);
> +    va_end(args);
> +
> +    printf("ERROR: %s\n",buffer);
> +    exit(EXIT_FAILURE);
> +}
> +
>  unsigned int Nmeasured(char * fname, int nphenocols, int npeople)


More information about the genabel-devel mailing list