Permalink
Browse files

Sync biosiglite with upstream

  • Loading branch information...
neurodroid committed Sep 29, 2017
1 parent 44b8ce1 commit c53f74a60961f51e8e0b3890578beac1e8682cfa
@@ -57,7 +57,7 @@ extern int VERBOSE_LEVEL; // used for debugging, variable is always defined
The output files can be zipped, too.
*/
#ifdef WITH_ZLIB
#ifdef HAVE_ZLIB
#include <zlib.h>
#ifndef ZLIB_H
#if defined(__MINGW64__)
@@ -68,15 +68,15 @@ extern int VERBOSE_LEVEL; // used for debugging, variable is always defined
#endif
#endif
#ifdef WITH_CHOLMOD
#ifdef HAVE_CHOLMOD
#ifdef __APPLE__
#include <cholmod.h>
#else
#include <suitesparse/cholmod.h>
#endif
#endif
#ifdef WITH_HDF5
#ifdef HAVE_HDF5
#include <hdf5.h>
#endif
#ifdef WITH_NIFTI
@@ -234,18 +234,6 @@ enum FileFormat {
invalid=0xffff
};
/*
error handling should use error variables local to each HDR
otherwise, sopen() etc. is not re-entrant.
Therefore, use of variables B4C_ERRNUM and B4C_ERRMSG is deprecated;
Instead, use biosigERROR for setting error status, and
serror2(hdr), hdr->AS.B4C_ERRNUM, hdr->AS.B4C_ERRMSG for error handling.
*/
ATT_DEPREC extern int B4C_ERRNUM;
ATT_DEPREC extern const char *B4C_ERRMSG;
/*
This part has moved into biosig-dev.h in v1.4.1, because VERBOSE_LEVEL is just
@@ -931,11 +919,6 @@ static inline void bef64a( double i, void* r) {
# define isnan(a) ((a)!=(a))
#endif
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))
/*
The macro IS_SET() can be used to test for defines in
if (IS_SET(...)) {
@@ -140,6 +140,7 @@
#define BSCS_CANNOT_CONNECT (-4) //
#define BSCS_SERVER_NOT_SUPPORTED (-5) //
#define max(a,b) (((a) > (b)) ? (a) : (b))
typedef struct {
uint32_t STATE;
@@ -60,6 +60,7 @@
int VERBOSE_LEVEL = 0; // this variable is always available, but only used without NDEBUG
#include "config.h"
#include "biosig.h"
#include "biosig-network.h"
@@ -76,6 +77,9 @@ int VERBOSE_LEVEL = 0; // this variable is always available, but only used with
#define FILESEP '/'
#endif
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))
char* getlogin (void);
char* xgethostname (void);
@@ -93,7 +97,7 @@ ATT_DEPREC const char *B4C_ERRMSG;
#endif
#ifdef WITH_CHOLMOD
#ifdef HAVE_CHOLMOD
cholmod_common CHOLMOD_COMMON_VAR;
void CSstop() {
cholmod_finish(&CHOLMOD_COMMON_VAR);
@@ -134,10 +138,10 @@ int sopen_fef_read(HDRTYPE* hdr);
int sclose_fef_read(HDRTYPE* hdr);
#endif
void sopen_heka(HDRTYPE* hdr,FILE *fid);
#ifdef WITH_HDF
#ifdef HAVE_HDF
int sopen_hdf5(HDRTYPE *hdr);
#endif
#ifdef WITH_MATIO
#ifdef HAVE_MATIO
int sopen_matlab(HDRTYPE *hdr);
#endif
#ifdef WITH_DICOM
@@ -8172,7 +8176,7 @@ if (VERBOSE_LEVEL>8)
}
else if (hdr->TYPE==Matlab) {
#ifdef WITH_MATIO
#ifdef HAVE_MATIO
if (sopen_matlab(hdr) != 0) {
biosigERROR(hdr, B4C_FORMAT_UNSUPPORTED, "Error reading MATLAB file");
}
No changes.
@@ -27,7 +27,7 @@
#include <string.h>
#include "physicalunits.h"
#ifdef WITH_PTHREAD
#ifdef HAVE_PTHREAD
// This is optional, because so far there are no multi-threaded applications for libbiosig.
#include <pthread.h>
#endif
@@ -105,6 +105,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <stdlib.h>
using namespace std;
/*
error handling should use error variables local to each HDR
otherwise, sopen() etc. is not re-entrant.
Therefore, use of variables B4C_ERRNUM and B4C_ERRMSG is deprecated;
Instead, use biosigERROR for setting error status, and
serror2(hdr), hdr->AS.B4C_ERRNUM, hdr->AS.B4C_ERRMSG for error handling.
*/
__attribute__ ((deprecated)) extern int B4C_ERRNUM;
__attribute__ ((deprecated)) extern const char *B4C_ERRMSG;
//______________________________________________________________________________
// FILE POINTERS
@@ -35,6 +35,8 @@
#include "axon_structs.h" // ABF2
#include "abfheadr.h" // ABF1
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))
/*
read data block of ATF file into the cache
@@ -29,6 +29,8 @@
#include "../biosig-dev.h"
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))
EXTERN_C void sopen_alpha_read(HDRTYPE* hdr) {
/*
@@ -35,6 +35,9 @@
#include "../biosig-dev.h"
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))
void sopen_axg_read(HDRTYPE* hdr) {
hdr->FILE.LittleEndian = 0;
@@ -28,6 +28,8 @@
#include <string.h>
#include "../biosig-dev.h"
#define min(a,b) (((a) < (b)) ? (a) : (b))
uint16_t cfs_data_type(uint8_t dataType) {
switch (dataType) {
case 0: //int8
@@ -33,6 +33,8 @@
- data swapping
*/
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))
/****************************************************************************
rational :
@@ -40,6 +40,8 @@
#include "../biosig-dev.h"
#define min(a,b) (((a) < (b)) ? (a) : (b))
#include "structures.h"
static const uint8_t _NUM_SECTION = 20; //consider first 19 sections of SCP
static bool add_filter = true; // additional filtering gives better shape, but use with care
@@ -21,6 +21,9 @@
#include <string.h>
#include "../biosig-dev.h"
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))
#ifdef __cplusplus
extern "C" {
#endif
@@ -43,10 +43,10 @@ EXTERN_C int sopen_dicom_read(HDRTYPE* hdr) {
#endif
#ifdef WITH_HDF
#ifdef HAVE_HDF
#include <hdf5.h>
#endif
#ifdef WITH_MATIO
#ifdef HAVE_MATIO
#include <matio.h>
#endif
@@ -201,7 +201,7 @@ int sopen_hdf5(HDRTYPE* hdr) {
}
#endif
#ifdef WITH_MATIO
#ifdef HAVE_MATIO
int sopen_matlab(HDRTYPE* hdr) {
/*
file hdr->FileName is already opened and hdr->HeadLen bytes are read

0 comments on commit c53f74a

Please sign in to comment.