Patch level : 12.0 no patch

Files correlati     : 
Commento            :

Aggiunta la funzione DB_pos_perc

git-svn-id: svn://10.65.10.50/branches/R_10_00@23326 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
bonazzi 2016-09-26 22:31:47 +00:00
parent 5727f4090c
commit 5739fa8fd8
2 changed files with 24 additions and 2 deletions

View File

@ -17,8 +17,11 @@
#define XVT_INCL_NATIVE
#include <xvt.h>
#define S4OFF_REPORT
//#define S4DLL
//#define S4WIN32
#if XVT_OS == XVT_OS_WIN32
#define S4DLL
#define S4WIN32
#endif
#include <d4all.h>
#include <codeb.h>
@ -1196,3 +1199,21 @@ long DB_version(char* str, int maxstr)
sprintf(str, "Codebase %d.%03d", S4VERSION/1000, S4VERSION%1000);
return S4VERSION;
}
long double DB_pos_perc(int handle)
{
TAG4* t = NULL;
long double perc;
HANDLE2DATA(handle, data);
t = d4tagDefault(data);
if (t != NULL)
{
if (tfile4position2(t->tagFile, &perc) < 0)
{
perc = 0.0;
return DB_get_error();
}
}
return perc;
}

View File

@ -67,6 +67,7 @@ extern "C" {
long DB_getconf();
long DB_changed(int handle); /* returns true if the index of the key is changed */
long DB_version(char* str, int maxstr);
long double DB_pos_perc(int handle);
#ifdef __cplusplus
};
#endif