From 1295289a06a3292a3264ff69189c96012dd04e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Fri, 24 Apr 2015 10:00:22 +0000 Subject: [PATCH] Remove done git-svn-id: svn://db.shs.com.ru/pip@119 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src/core/pichar.cpp | 1 + src/io/pifile.cpp | 24 +++++++++++++++--------- utils/system_daemon/daemon.cpp | 4 ++-- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/core/pichar.cpp b/src/core/pichar.cpp index 11898137..5ae89804 100644 --- a/src/core/pichar.cpp +++ b/src/core/pichar.cpp @@ -23,6 +23,7 @@ #include "pichar.h" #ifdef PIP_ICU # include "unicode/ucnv.h" +# include "unicode/ustring.h" char * __syslocname__ = 0; char * __sysoemname__ = 0; #endif diff --git a/src/io/pifile.cpp b/src/io/pifile.cpp index 4ac9bbd3..17b8411a 100755 --- a/src/io/pifile.cpp +++ b/src/io/pifile.cpp @@ -39,11 +39,17 @@ # include #endif #define S_IFHDN 0x40 -#ifdef QNX +#if defined(QNX) || defined(ANDROID) +# define _fopen_call_ fopen +# define _fseek_call_ fseek +# define _ftell_call_ ftell # define _stat_struct_ struct stat # define _stat_call_ stat # define _stat_link_ lstat #else +# define _fopen_call_ fopen64 +# define _fseek_call_ fseeko64 +# define _ftell_call_ ftello64 # define _stat_struct_ struct stat64 # define _stat_call_ stat64 # define _stat_link_ lstat64 @@ -142,7 +148,7 @@ bool PIFile::openDevice() { if (fd != 0) fclose(fd); } } - fd = fopen64(p.data(), strType(mode_).data()); + fd = _fopen_call_(p.data(), strType(mode_).data()); opened_ = (fd != 0); if (opened_) { fdi = fileno(fd); @@ -217,9 +223,9 @@ PIByteArray PIFile::readAll(bool forceRead) { llong PIFile::size() const { if (!opened_) return -1; llong s, cp = pos(); - fseeko64(fd, 0, SEEK_END); clearerr(fd); + _fseek_call_(fd, 0, SEEK_END); clearerr(fd); s = pos(); - fseeko64(fd, cp, SEEK_SET); clearerr(fd); + _fseek_call_(fd, cp, SEEK_SET); clearerr(fd); return s; } @@ -244,7 +250,7 @@ void PIFile::resize(llong new_size, uchar fill_) { bool PIFile::isExists(const PIString & path) { - FILE * f = fopen64(PIString(path).data(), "r"); + FILE * f = _fopen_call_(PIString(path).data(), "r"); bool ok = (f != 0); if (ok) fclose(f); return ok; @@ -288,21 +294,21 @@ void PIFile::flush() { void PIFile::seek(llong position) { if (!opened_) return; - fseeko64(fd, position, SEEK_SET); + _fseek_call_(fd, position, SEEK_SET); clearerr(fd); } void PIFile::seekToBegin() { if (!opened_) return; - fseeko64(fd, 0, SEEK_SET); + _fseek_call_(fd, 0, SEEK_SET); clearerr(fd); } void PIFile::seekToEnd() { if (!opened_) return; - fseeko64(fd, 0, SEEK_END); + _fseek_call_(fd, 0, SEEK_END); clearerr(fd); } @@ -328,7 +334,7 @@ void PIFile::setPath(const PIString & path) { llong PIFile::pos() const { if (!opened_) return -1; - return ftello64(fd); + return _ftell_call_(fd); } diff --git a/utils/system_daemon/daemon.cpp b/utils/system_daemon/daemon.cpp index 08f7c2d4..ab909c45 100644 --- a/utils/system_daemon/daemon.cpp +++ b/utils/system_daemon/daemon.cpp @@ -286,16 +286,16 @@ void Daemon::fillInfoTile(const Daemon::HostInfo & hi) { void Daemon::tileEvent(PIScreenTile * t, TileEvent e) { if (t == list_daemons) { - PIMutexLocker ml(remote_mutex); if (e.type == TileList::RowPressed) { + PIMutexLocker ml(remote_mutex); connectToDaemon(list_daemons->content[e.data.toInt()].first); showActionList(); } return; } if (t == list_actions) { - PIMutexLocker ml(remote_mutex); if (e.type == TileList::RowPressed) { + PIMutexLocker ml(remote_mutex); switch (e.data.toInt()) { case 0: mode = 2; showTile(tile_info, "Information"); break; case 1: