summaryrefslogtreecommitdiffstats
path: root/qtools
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2006-07-16 20:10:06 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2006-07-16 20:10:06 (GMT)
commit243272688a4a3bc7921b7d05dda927f4adf3036c (patch)
treef167dcd5d5f9dcea2ade9e968e78c2a085f0f1fd /qtools
parent9dbdf881dc5f0644777cc5732e7751325b508c91 (diff)
downloadDoxygen-243272688a4a3bc7921b7d05dda927f4adf3036c.zip
Doxygen-243272688a4a3bc7921b7d05dda927f4adf3036c.tar.gz
Doxygen-243272688a4a3bc7921b7d05dda927f4adf3036c.tar.bz2
Release-1.4.7-20060716
Diffstat (limited to 'qtools')
-rw-r--r--qtools/qfile.h3
-rw-r--r--qtools/qfile_unix.cpp21
-rw-r--r--qtools/qfile_win32.cpp23
-rw-r--r--qtools/qglobal.h7
4 files changed, 54 insertions, 0 deletions
diff --git a/qtools/qfile.h b/qtools/qfile.h
index 4ef0685..cfd357b 100644
--- a/qtools/qfile.h
+++ b/qtools/qfile.h
@@ -94,6 +94,9 @@ public:
int handle() const;
+ int64 pos() const;
+ bool seek(int64 pos);
+
protected:
QString fn;
FILE *fh;
diff --git a/qtools/qfile_unix.cpp b/qtools/qfile_unix.cpp
index 6b63d99..fbf6acf 100644
--- a/qtools/qfile_unix.cpp
+++ b/qtools/qfile_unix.cpp
@@ -632,3 +632,24 @@ void QFile::close()
return;
}
+
+int64 QFile::pos() const
+{
+ if (isOpen())
+ {
+ // TODO: support 64 bit size
+ return ftell( fh );
+ }
+ return -1;
+}
+
+bool QFile::seek( int64 pos )
+{
+ if (isOpen())
+ {
+ // TODO: support 64 bit size
+ return fseek( fh, pos, SEEK_SET )!=-1;
+ }
+ return FALSE;
+}
+
diff --git a/qtools/qfile_win32.cpp b/qtools/qfile_win32.cpp
index 39b1fa5..83c8c8d 100644
--- a/qtools/qfile_win32.cpp
+++ b/qtools/qfile_win32.cpp
@@ -591,3 +591,26 @@ void QFile::close()
return;
}
+
+int64 QFile::pos() const
+{
+ if (isOpen())
+ {
+ // TODO: support 64 bit size
+ return ftell( fh );
+ }
+ return -1;
+}
+
+bool QFile::seek( int64 pos )
+{
+ if (isOpen())
+ {
+ // TODO: support 64 bit size
+ return fseek( fh, pos, SEEK_SET )!=-1;
+ }
+ return FALSE;
+}
+
+
+
diff --git a/qtools/qglobal.h b/qtools/qglobal.h
index 7dca39b..0123dee 100644
--- a/qtools/qglobal.h
+++ b/qtools/qglobal.h
@@ -336,6 +336,13 @@ typedef unsigned long ulong;
typedef char *pchar;
typedef uchar *puchar;
typedef const char *pcchar;
+#if defined(_OS_WIN32_) && !defined(_CC_GNU_)
+typedef __int64 int64;
+typedef unsigned __int64 uint64;
+#else
+typedef long long int64;
+typedef unsigned long long uint64;
+#endif
//