aboutsummaryrefslogtreecommitdiffstats
path: root/lib/plpdirent.cc
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2001-03-05 10:12:26 +0000
committerFritz Elfert <felfert@to.com>2001-03-05 10:12:26 +0000
commit3c5877e3f7fcd101a9868e6da86f12b92b6d4896 (patch)
treefb8ca31738d782bb0d11e55dc2e4794db2d17ae3 /lib/plpdirent.cc
parent3ebac278eff9f4ba457a5f1ccbce9857ea00dba5 (diff)
downloadplptools-3c5877e3f7fcd101a9868e6da86f12b92b6d4896.tar.gz
plptools-3c5877e3f7fcd101a9868e6da86f12b92b6d4896.tar.bz2
plptools-3c5877e3f7fcd101a9868e6da86f12b92b6d4896.zip
Fixed some 64bit related stuff in psitime and plpdirent.
More work on restore in kpsion.
Diffstat (limited to 'lib/plpdirent.cc')
-rw-r--r--lib/plpdirent.cc28
1 files changed, 21 insertions, 7 deletions
diff --git a/lib/plpdirent.cc b/lib/plpdirent.cc
index d78260c..fa97232 100644
--- a/lib/plpdirent.cc
+++ b/lib/plpdirent.cc
@@ -3,7 +3,6 @@
*
* This file is part of plptools.
*
- * Copyright (C) 1999 Philip Proudman <philip.proudman@btinternet.com>
* Copyright (C) 1999-2001 Fritz Elfert <felfert@to.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -21,7 +20,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-#include <plpdirent.h>
+#include "plpdirent.h"
#include <stream.h>
#include <iomanip>
@@ -29,16 +28,20 @@ PlpUID::PlpUID() {
memset(uid, 0, sizeof(uid));
}
-PlpUID::PlpUID(const long u1, const long u2, const long u3) {
+PlpUID::PlpUID(const u_int32_t u1, const u_int32_t u2, const u_int32_t u3) {
uid[0] = u1; uid[1] = u2; uid[2] = u3;
}
-long PlpUID::
+u_int32_t PlpUID::
operator[](int idx) {
assert ((idx > -1) && (idx < 3));
return uid[idx];
}
+PlpDirent::PlpDirent()
+ : size(0), attr(0), name(""), time(0L), attrstr("") {
+}
+
PlpDirent::PlpDirent(const PlpDirent &e) {
size = e.size;
attr = e.attr;
@@ -48,17 +51,28 @@ PlpDirent::PlpDirent(const PlpDirent &e) {
attrstr = e.attrstr;
}
-long PlpDirent::
+PlpDirent::PlpDirent(const u_int32_t _size, const u_int32_t _attr,
+ const u_int32_t tHi, const u_int32_t tLo,
+ const char * const _name) {
+ size = _size;
+ attr = _attr;
+ time = PsiTime(tHi, tLo);
+ UID = PlpUID();
+ name = _name;
+ attrstr = "";
+}
+
+u_int32_t PlpDirent::
getSize() {
return size;
}
-long PlpDirent::
+u_int32_t PlpDirent::
getAttr() {
return attr;
}
-long PlpDirent::
+u_int32_t PlpDirent::
getUID(int uididx) {
if ((uididx >= 0) && (uididx < 4))
return UID[uididx];