Remove done

git-svn-id: svn://db.shs.com.ru/pip@119 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2015-04-24 10:00:22 +00:00
parent 6ebe7e5ce6
commit 1295289a06
3 changed files with 18 additions and 11 deletions

View File

@@ -23,6 +23,7 @@
#include "pichar.h" #include "pichar.h"
#ifdef PIP_ICU #ifdef PIP_ICU
# include "unicode/ucnv.h" # include "unicode/ucnv.h"
# include "unicode/ustring.h"
char * __syslocname__ = 0; char * __syslocname__ = 0;
char * __sysoemname__ = 0; char * __sysoemname__ = 0;
#endif #endif

View File

@@ -39,11 +39,17 @@
# include <utime.h> # include <utime.h>
#endif #endif
#define S_IFHDN 0x40 #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_struct_ struct stat
# define _stat_call_ stat # define _stat_call_ stat
# define _stat_link_ lstat # define _stat_link_ lstat
#else #else
# define _fopen_call_ fopen64
# define _fseek_call_ fseeko64
# define _ftell_call_ ftello64
# define _stat_struct_ struct stat64 # define _stat_struct_ struct stat64
# define _stat_call_ stat64 # define _stat_call_ stat64
# define _stat_link_ lstat64 # define _stat_link_ lstat64
@@ -142,7 +148,7 @@ bool PIFile::openDevice() {
if (fd != 0) fclose(fd); if (fd != 0) fclose(fd);
} }
} }
fd = fopen64(p.data(), strType(mode_).data()); fd = _fopen_call_(p.data(), strType(mode_).data());
opened_ = (fd != 0); opened_ = (fd != 0);
if (opened_) { if (opened_) {
fdi = fileno(fd); fdi = fileno(fd);
@@ -217,9 +223,9 @@ PIByteArray PIFile::readAll(bool forceRead) {
llong PIFile::size() const { llong PIFile::size() const {
if (!opened_) return -1; if (!opened_) return -1;
llong s, cp = pos(); llong s, cp = pos();
fseeko64(fd, 0, SEEK_END); clearerr(fd); _fseek_call_(fd, 0, SEEK_END); clearerr(fd);
s = pos(); s = pos();
fseeko64(fd, cp, SEEK_SET); clearerr(fd); _fseek_call_(fd, cp, SEEK_SET); clearerr(fd);
return s; return s;
} }
@@ -244,7 +250,7 @@ void PIFile::resize(llong new_size, uchar fill_) {
bool PIFile::isExists(const PIString & path) { 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); bool ok = (f != 0);
if (ok) fclose(f); if (ok) fclose(f);
return ok; return ok;
@@ -288,21 +294,21 @@ void PIFile::flush() {
void PIFile::seek(llong position) { void PIFile::seek(llong position) {
if (!opened_) return; if (!opened_) return;
fseeko64(fd, position, SEEK_SET); _fseek_call_(fd, position, SEEK_SET);
clearerr(fd); clearerr(fd);
} }
void PIFile::seekToBegin() { void PIFile::seekToBegin() {
if (!opened_) return; if (!opened_) return;
fseeko64(fd, 0, SEEK_SET); _fseek_call_(fd, 0, SEEK_SET);
clearerr(fd); clearerr(fd);
} }
void PIFile::seekToEnd() { void PIFile::seekToEnd() {
if (!opened_) return; if (!opened_) return;
fseeko64(fd, 0, SEEK_END); _fseek_call_(fd, 0, SEEK_END);
clearerr(fd); clearerr(fd);
} }
@@ -328,7 +334,7 @@ void PIFile::setPath(const PIString & path) {
llong PIFile::pos() const { llong PIFile::pos() const {
if (!opened_) return -1; if (!opened_) return -1;
return ftello64(fd); return _ftell_call_(fd);
} }

View File

@@ -286,16 +286,16 @@ void Daemon::fillInfoTile(const Daemon::HostInfo & hi) {
void Daemon::tileEvent(PIScreenTile * t, TileEvent e) { void Daemon::tileEvent(PIScreenTile * t, TileEvent e) {
if (t == list_daemons) { if (t == list_daemons) {
PIMutexLocker ml(remote_mutex);
if (e.type == TileList::RowPressed) { if (e.type == TileList::RowPressed) {
PIMutexLocker ml(remote_mutex);
connectToDaemon(list_daemons->content[e.data.toInt()].first); connectToDaemon(list_daemons->content[e.data.toInt()].first);
showActionList(); showActionList();
} }
return; return;
} }
if (t == list_actions) { if (t == list_actions) {
PIMutexLocker ml(remote_mutex);
if (e.type == TileList::RowPressed) { if (e.type == TileList::RowPressed) {
PIMutexLocker ml(remote_mutex);
switch (e.data.toInt()) { switch (e.data.toInt()) {
case 0: mode = 2; showTile(tile_info, "Information"); break; case 0: mode = 2; showTile(tile_info, "Information"); break;
case 1: case 1: