author | groucho <groucho> | 2003-05-07 09:01:39 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-05-07 09:01:39 (UTC) |
commit | 118d03d815a7615b9c53363218a7ac45b3f4c514 (patch) (side-by-side diff) | |
tree | 356953e2413cddcec0f35bd47bb6439767da7051 /noncore/apps/opie-reader/Filedata.h | |
parent | 00894537decf01c5a5cdc565b2740b5e67a2e90f (diff) | |
download | opie-118d03d815a7615b9c53363218a7ac45b3f4c514.zip opie-118d03d815a7615b9c53363218a7ac45b3f4c514.tar.gz opie-118d03d815a7615b9c53363218a7ac45b3f4c514.tar.bz2 |
Incorporated TimWs current source tree and make it compile
Diffstat (limited to 'noncore/apps/opie-reader/Filedata.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/Filedata.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/opie-reader/Filedata.h b/noncore/apps/opie-reader/Filedata.h index f920238..096dd31 100644 --- a/noncore/apps/opie-reader/Filedata.h +++ b/noncore/apps/opie-reader/Filedata.h @@ -5,47 +5,47 @@ class CFiledata { unsigned char* data; bool m_own; public: CFiledata(tchar* d) { data = (unsigned char*)d; m_own = false; } CFiledata(time_t dt, tchar* nm) { int nlen = ustrlen(nm)+1; data = new unsigned char[sizeof(time_t)+sizeof(tchar)*nlen]; *((time_t *)data) = dt; memcpy(data+sizeof(time_t), nm, sizeof(tchar)*nlen); m_own = true; } ~CFiledata() { if (m_own && data != NULL) { delete [] data; - qDebug("~Filedata: deleting"); +// qDebug("~Filedata: deleting"); } else { - qDebug("~Filedata: not deleting"); +// qDebug("~Filedata: not deleting"); } } tchar* name() const { return (tchar*)(data+sizeof(time_t)); } time_t date() { return *((time_t *)data); } void setdate(time_t _t) { *((time_t *)data) = _t; } unsigned char* content() { return data; } size_t length() const { return sizeof(time_t)+sizeof(tchar)*(ustrlen(name())+1); } bool operator==(const CFiledata& rhs) { return ((length() == rhs.length()) && (memcmp(data, rhs.data, length()) == 0)); } bool samename(const CFiledata& rhs) { return (ustrcmp((tchar *)(data+sizeof(time_t)),(tchar *)(rhs.data+sizeof(time_t))) == 0); } }; #endif |