Commit 55aa18d8 authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 1.15

parent 15b48c0e
Loading
Loading
Loading
Loading
+51 −3
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@
#include "edflib.h"


#define EDFLIB_VERSION 114
#define EDFLIB_VERSION 115
#define EDFLIB_MAXFILES 64


@@ -7028,7 +7028,7 @@ static int edflib_sprint_number_nonlocalized(char *str, double nr)

static double edflib_atof_nonlocalized(const char *str)
{
  int i=0, dot_pos=-1, decimals=0, sign=1;
  int i=0, j, dot_pos=-1, decimals=0, sign=1, exp_pos=-1, exp_sign=1, exp_val=0;

  double value, value2=0.0;

@@ -7057,6 +7057,13 @@ static double edflib_atof_nonlocalized(const char *str)
      break;
    }

    if((str[i] == 'e') || (str[i] == 'E'))
    {
      exp_pos = i;

      break;
    }

    if(((str[i] < '0') || (str[i] > '9')) && (str[i] != '.'))
    {
      break;
@@ -7095,9 +7102,50 @@ static double edflib_atof_nonlocalized(const char *str)
    }

    value2 /= i;

    value += value2;
  }

  if(exp_pos > 0)
  {
    i = exp_pos + 1;

    if(str[i])
    {
      if(str[i] == '+')
      {
        i++;
      }
      else if(str[i] == '-')
        {
          exp_sign = -1;

          i++;
        }

  return value + value2;
      if(str[i])
      {
        exp_val = edflib_atoi_nonlocalized(str + i);

        if(exp_val > 0)
        {
          for(j=0; j<exp_val; j++)
          {
            if(exp_sign > 0)
            {
              value *= 10;
            }
            else
            {
              value /= 10;
            }
          }
        }
      }
    }
  }

  return value;
}


+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@


#define EDFLIB_TIME_DIMENSION (10000000LL)
#define EDFLIB_MAXSIGNALS 512
#define EDFLIB_MAXSIGNALS 640
#define EDFLIB_MAX_ANNOTATION_LEN 512

#define EDFSEEK_SET 0