[med-svn] [Git][med-team/edflib][master] 5 commits: New upstream version 1.20
Andreas Tille (@tille)
gitlab at salsa.debian.org
Sat Feb 19 20:13:33 GMT 2022
Andreas Tille pushed to branch master at Debian Med / edflib
Commits:
d0c04ab8 by Nilesh Patra at 2021-11-10T00:06:36+05:30
New upstream version 1.20
- - - - -
7ea78618 by Andreas Tille at 2022-02-19T21:06:07+01:00
New upstream version 1.21
- - - - -
b179f74a by Andreas Tille at 2022-02-19T21:06:07+01:00
routine-update: New upstream version
- - - - -
bbf97d15 by Andreas Tille at 2022-02-19T21:06:07+01:00
Update upstream source from tag 'upstream/1.21'
Update to upstream version '1.21'
with Debian dir 0bc0aa7b4cc133fe3c9f7ad0b62793fa0e16b22a
- - - - -
826c0161 by Andreas Tille at 2022-02-19T21:06:53+01:00
routine-update: Ready to upload to unstable
- - - - -
4 changed files:
- debian/changelog
- edflib.c
- edflib.h
- unittest/unittest.c
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+edflib (1.21-1) unstable; urgency=medium
+
+ * New upstream version
+
+ -- Andreas Tille <tille at debian.org> Sat, 19 Feb 2022 21:06:16 +0100
+
edflib (1.20-1) unstable; urgency=medium
[ Andreas Tille ]
=====================================
edflib.c
=====================================
@@ -1,7 +1,7 @@
/*
*****************************************************************************
*
-* Copyright (c) 2009 - 2021 Teunis van Beelen
+* Copyright (c) 2009 - 2022 Teunis van Beelen
* All rights reserved.
*
* Email: teuniz at protonmail.com
@@ -35,7 +35,7 @@
#include "edflib.h"
-#define EDFLIB_VERSION (120)
+#define EDFLIB_VERSION (121)
#define EDFLIB_MAXFILES (64)
#if defined(__APPLE__) || defined(__MACH__) || defined(__APPLE_CC__) || defined(__HAIKU__)
@@ -2341,7 +2341,7 @@ static struct edfhdrblock * edflib_check_edf_file(FILE *inputfile, int *edf_erro
}
p = 0;
- if(edfhdr->patient[p]=='X')
+ if((edfhdr->patient[p]=='X') && (edfhdr->patient[p+1]==' '))
{
edfhdr->plus_patientcode[0] = 0;
p += 2;
@@ -2550,7 +2550,7 @@ static struct edfhdrblock * edflib_check_edf_file(FILE *inputfile, int *edf_erro
edfhdr->plus_startdate[11] = 0;
p += i + 1;
- if(edfhdr->recording[p]=='X')
+ if((edfhdr->recording[p]=='X') && (edfhdr->recording[p+1]==' '))
{
edfhdr->plus_admincode[0] = 0;
p += 2;
@@ -2570,7 +2570,7 @@ static struct edfhdrblock * edflib_check_edf_file(FILE *inputfile, int *edf_erro
p += i + 1;
}
- if(edfhdr->recording[p]=='X')
+ if((edfhdr->recording[p]=='X') && (edfhdr->recording[p+1]==' '))
{
edfhdr->plus_technician[0] = 0;
p += 2;
@@ -2590,7 +2590,7 @@ static struct edfhdrblock * edflib_check_edf_file(FILE *inputfile, int *edf_erro
p += i + 1;
}
- if(edfhdr->recording[p]=='X')
+ if((edfhdr->recording[p]=='X') && (edfhdr->recording[p+1]==' '))
{
edfhdr->plus_equipment[0] = 0;
p += 2;
=====================================
edflib.h
=====================================
@@ -1,7 +1,7 @@
/*
*****************************************************************************
*
-* Copyright (c) 2009 - 2021 Teunis van Beelen
+* Copyright (c) 2009 - 2022 Teunis van Beelen
* All rights reserved.
*
* Email: teuniz at protonmail.com
=====================================
unittest/unittest.c
=====================================
@@ -78,7 +78,7 @@ int main(void)
setlocale(LC_ALL, "C");
- if(edflib_version() != 120) JUMP_TO_EXIT_ERROR_PROC
+ if(edflib_version() != 121) JUMP_TO_EXIT_ERROR_PROC
ibuf = (int *)malloc(100 * sizeof(int));
if(ibuf == NULL)
@@ -167,6 +167,101 @@ int main(void)
if(strcmp(hdr.signalparam[0].physdimension, "uV ")) JUMP_TO_EXIT_ERROR_PROC
+ if(strcmp(hdr.patientcode, "")) JUMP_TO_EXIT_ERROR_PROC
+
+ if(strcmp(hdr.patient_name, "X")) JUMP_TO_EXIT_ERROR_PROC
+
+ if(strcmp(hdr.admincode, "")) JUMP_TO_EXIT_ERROR_PROC
+
+ if(strcmp(hdr.technician, "")) JUMP_TO_EXIT_ERROR_PROC
+
+ if(strcmp(hdr.equipment, "")) JUMP_TO_EXIT_ERROR_PROC
+
+ if(edfclose_file(hdl))
+ {
+ hdl = -1;
+
+ JUMP_TO_EXIT_ERROR_PROC
+ }
+
+ hdl = -1;
+
+/********************************** EDF writing ******************************/
+
+ hdl = edfopen_file_writeonly_with_params("test.edf", EDFLIB_FILETYPE_EDFPLUS, 65, 633, 3000, "uV");
+
+ if(hdl < 0) JUMP_TO_EXIT_ERROR_PROC
+
+ if(edf_set_patientname(hdl, "XY_Z")) JUMP_TO_EXIT_ERROR_PROC
+
+ if(edf_set_patientcode(hdl, "X2_3")) JUMP_TO_EXIT_ERROR_PROC
+
+ if(edf_set_admincode(hdl, "X6_7")) JUMP_TO_EXIT_ERROR_PROC
+
+ if(edf_set_technician(hdl, "X.Fo_o")) JUMP_TO_EXIT_ERROR_PROC
+
+ if(edf_set_equipment(hdl, "Xe_q")) JUMP_TO_EXIT_ERROR_PROC
+
+ for(i=0; i<633; i++)
+ {
+ dbuf[i] = i;
+ }
+
+ for(i=0; i<10; i++)
+ {
+ for(j=0; j<65; j++)
+ {
+ if(edfwrite_physical_samples(hdl, dbuf)) JUMP_TO_EXIT_ERROR_PROC
+ }
+ }
+
+ if(edfclose_file(hdl))
+ {
+ hdl = -1;
+
+ JUMP_TO_EXIT_ERROR_PROC
+ }
+
+/********************************** EDF reading ******************************/
+
+ if(edfopen_file_readonly("test.edf", &hdr, EDFLIB_READ_ALL_ANNOTATIONS)) JUMP_TO_EXIT_ERROR_PROC
+
+ hdl = hdr.handle;
+
+ if(hdr.filetype != 1) JUMP_TO_EXIT_ERROR_PROC
+
+ if(hdr.edfsignals != 65) JUMP_TO_EXIT_ERROR_PROC
+
+ if(hdr.file_duration != 100000000) JUMP_TO_EXIT_ERROR_PROC
+
+ if(hdr.datarecord_duration != 10000000) JUMP_TO_EXIT_ERROR_PROC
+
+ if(hdr.datarecords_in_file != 10) JUMP_TO_EXIT_ERROR_PROC
+
+ if(hdr.signalparam[0].smp_in_file != 6330) JUMP_TO_EXIT_ERROR_PROC
+
+ if(hdr.signalparam[0].phys_max != 3000) JUMP_TO_EXIT_ERROR_PROC
+
+ if(hdr.signalparam[0].phys_min != -3000) JUMP_TO_EXIT_ERROR_PROC
+
+ if(hdr.signalparam[0].dig_max != 32767) JUMP_TO_EXIT_ERROR_PROC
+
+ if(hdr.signalparam[0].dig_min != -32768) JUMP_TO_EXIT_ERROR_PROC
+
+ if(hdr.signalparam[0].smp_in_datarecord != 633) JUMP_TO_EXIT_ERROR_PROC
+
+ if(strcmp(hdr.signalparam[0].physdimension, "uV ")) JUMP_TO_EXIT_ERROR_PROC
+
+ if(strcmp(hdr.patientcode, "X2 3")) JUMP_TO_EXIT_ERROR_PROC
+
+ if(strcmp(hdr.patient_name, "XY Z")) JUMP_TO_EXIT_ERROR_PROC
+
+ if(strcmp(hdr.admincode, "X6 7")) JUMP_TO_EXIT_ERROR_PROC
+
+ if(strcmp(hdr.technician, "X.Fo o")) JUMP_TO_EXIT_ERROR_PROC
+
+ if(strcmp(hdr.equipment, "Xe q")) JUMP_TO_EXIT_ERROR_PROC
+
if(edfclose_file(hdl))
{
hdl = -1;
View it on GitLab: https://salsa.debian.org/med-team/edflib/-/compare/d9060d9fa56c20cb80cfc83dfa64b1d38d0a19e0...826c0161a161e6d0758e33375b13503a5d14c884
--
View it on GitLab: https://salsa.debian.org/med-team/edflib/-/compare/d9060d9fa56c20cb80cfc83dfa64b1d38d0a19e0...826c0161a161e6d0758e33375b13503a5d14c884
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220219/267f8606/attachment-0001.htm>
More information about the debian-med-commit
mailing list