From 3c5877e3f7fcd101a9868e6da86f12b92b6d4896 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Mon, 5 Mar 2001 10:12:26 +0000 Subject: Fixed some 64bit related stuff in psitime and plpdirent. More work on restore in kpsion. --- lib/plpdirent.cc | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'lib/plpdirent.cc') 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 * Copyright (C) 1999-2001 Fritz Elfert * * 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 +#include "plpdirent.h" #include #include @@ -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]; -- cgit v1.2.3