[med-svn] [libvistaio] 01/06: Imported Upstream version 1.2.18

Gert Wollny gert-guest at moszumanska.debian.org
Wed Nov 4 13:31:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

gert-guest pushed a commit to branch master
in repository libvistaio.

commit e1daf1b2c27ff42ed940cb5f61f1a62be842369a
Author: Gert Wollny <gw.fossdev at gmail.com>
Date:   Wed Nov 4 14:13:14 2015 +0100

    Imported Upstream version 1.2.18
---
 .gitignore          |  4 ++++
 CMakeLists.txt      | 10 +++++-----
 ChangeLog           |  6 ++++++
 vistaio/fileio.c    | 14 ++++++++++++++
 vistaio/vcplist.h   |  4 ----
 vistaio/vista.h     |  8 +++++++-
 vistaio/vspline2d.h |  4 ----
 7 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..96e8239
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+build 
+*~
+
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ab82c6..3ead488 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,13 +25,13 @@ SET(VENDOR "Gert Wollny")
 SET(PACKAGE_NAME "vistaio")
 SET(MAJOR_VERSION 1)
 SET(MINOR_VERSION 2)
-SET(MICRO_VERSION 16)
-SET(INTERFACE_AGE 2)
-SET(BINARY_AGE    2)
+SET(MICRO_VERSION 18)
+SET(INTERFACE_AGE 1)
+SET(BINARY_AGE    4)
 
 INCLUDE(GNUInstallDirs)
 
-MATH(EXPR VISTAIO_CURRENT "${MICRO_VERSION} - ${INTERFACE_AGE}")
+MATH(EXPR VISTAIO_CURRENT "${MICRO_VERSION} - ${BINARY_AGE}")
 MATH(EXPR VISTAIO_AGE     "${BINARY_AGE} - ${INTERFACE_AGE}")
 
 SET(LIBRARY_VERSION_INFO "${VISTAIO_CURRENT}.${INTERFACE_AGE}.${VISTAIO_AGE}")
@@ -44,7 +44,7 @@ SET(VISTAIO_PACKAGE "${PACKAGE_NAME}-${PACKAGE_VERSION}")
 INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
 INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
 
-ADD_DEFINITIONS(-D_SVID_SOURCE=2)
+ADD_DEFINITIONS(-D_DEFAULT_SOURCE=2)
 
 ADD_SUBDIRECTORY(vistaio)
 ADD_SUBDIRECTORY(doc)
diff --git a/ChangeLog b/ChangeLog
index c3997ea..cd48b87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2.1.17
+
+   * Add a function to chech whether a file is actually a vista file
+     by only reading the header file.
+   * replace _SVID_SOURCE by _DEFAULT_SOURCE as the former is deprecated.
+
 2.1.16
 
    * Revert licenses of type.c and history.c to original by A. Pope
diff --git a/vistaio/fileio.c b/vistaio/fileio.c
index 0d7b3e2..ec73747 100644
--- a/vistaio/fileio.c
+++ b/vistaio/fileio.c
@@ -237,6 +237,20 @@ EXPORT_VISTA VistaIOAttrList VistaIOReadFile (FILE * f, VistaIOReadFileFilterPro
 	return list;
 }
 
+EXPORT_VISTA VistaIOBoolean VistaIOIsVistaFile (const char *filename)
+{
+	VistaIOBoolean result = FALSE; 
+	FILE *f = fopen(filename, "r");
+	
+	if (!f)
+		return result;
+
+	result = ReadHeader (f);
+	fclose(f);
+	return result; 
+	
+}
+
 
 /*! \brief Read a Vista data file header.
  *
diff --git a/vistaio/vcplist.h b/vistaio/vcplist.h
index 04270ba..e772341 100644
--- a/vistaio/vcplist.h
+++ b/vistaio/vcplist.h
@@ -18,10 +18,6 @@
 #ifndef __VCPEList_h
 #define __VCPEList_h
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <vistaio/vista.h>
 
 
diff --git a/vistaio/vista.h b/vistaio/vista.h
index d0806be..e8253a2 100644
--- a/vistaio/vista.h
+++ b/vistaio/vista.h
@@ -1901,11 +1901,17 @@ extern "C" {
 	 */
 	void AddTrack (Volume v, VistaIOTrack t);
 
+	/*! \brief Test if the given file name refers to a vista file 
+	 *
+	 *  \param filename
+         *  \returns TRUE if the file exists and has a vista header, false otherwise
+	 */
+	EXPORT_VISTA VistaIOBoolean VistaIOIsVistaFile (const char *filename); 
+
 	/*! \brief Note the program name for use in error messages.
 	 *
 	 *  \param name
 	 */
-	EXPORT_VISTA void VistaIOSetProgramName (VistaIOStringConst name);
 	
 #ifdef __cplusplus
 }
diff --git a/vistaio/vspline2d.h b/vistaio/vspline2d.h
index 2c761a7..4419fd0 100644
--- a/vistaio/vspline2d.h
+++ b/vistaio/vspline2d.h
@@ -18,10 +18,6 @@
 #ifndef __VSpline2D_h
 #define __VSpline2D_h
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <vistaio/vfield2d.h>
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/libvistaio.git



More information about the debian-med-commit mailing list