*** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -89,7 +89,7 @@ wxFSFile* wxInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxStri
|
|||||||
s = url.GetInputStream();
|
s = url.GetInputStream();
|
||||||
content = url.GetProtocol().GetContentType();
|
content = url.GetProtocol().GetContentType();
|
||||||
if (content == wxEmptyString) content = GetMimeTypeFromExt(location);
|
if (content == wxEmptyString) content = GetMimeTypeFromExt(location);
|
||||||
if (s)
|
if (s)
|
||||||
{
|
{
|
||||||
wxChar buf[256];
|
wxChar buf[256];
|
||||||
|
|
||||||
@@ -98,20 +98,25 @@ wxFSFile* wxInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxStri
|
|||||||
m_Cache.Put(right, info);
|
m_Cache.Put(right, info);
|
||||||
|
|
||||||
{ // ok, now copy it:
|
{ // ok, now copy it:
|
||||||
|
#if defined(__VISAGECPP__)
|
||||||
|
// VA thinks this is an ambiguous call
|
||||||
|
wxFileOutputStream sout((wxString)buf);
|
||||||
|
#else
|
||||||
wxFileOutputStream sout(buf);
|
wxFileOutputStream sout(buf);
|
||||||
|
#endif
|
||||||
s -> Read(sout); // copy the stream
|
s -> Read(sout); // copy the stream
|
||||||
}
|
}
|
||||||
delete s;
|
delete s;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return (wxFSFile*) NULL; // we can't open the URL
|
return (wxFSFile*) NULL; // we can't open the URL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load item from cache:
|
// Load item from cache:
|
||||||
s = new wxFileInputStream(info->GetTemp());
|
s = new wxFileInputStream(info->GetTemp());
|
||||||
if (s)
|
if (s)
|
||||||
{
|
{
|
||||||
return new wxFSFile(s,
|
return new wxFSFile(s,
|
||||||
right,
|
right,
|
||||||
@@ -129,7 +134,7 @@ wxInternetFSHandler::~wxInternetFSHandler()
|
|||||||
wxInetCacheNode *n2;
|
wxInetCacheNode *n2;
|
||||||
|
|
||||||
m_Cache.BeginFind();
|
m_Cache.BeginFind();
|
||||||
while ((n = m_Cache.Next()) != NULL)
|
while ((n = m_Cache.Next()) != NULL)
|
||||||
{
|
{
|
||||||
n2 = (wxInetCacheNode*) n->GetData();
|
n2 = (wxInetCacheNode*) n->GetData();
|
||||||
wxRemoveFile(n2->GetTemp());
|
wxRemoveFile(n2->GetTemp());
|
||||||
|
@@ -256,6 +256,9 @@ wxColour *wxColourDatabase::FindColour(const wxString& colour)
|
|||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
else return NULL;
|
else return NULL;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __WXPM__
|
||||||
|
else return NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
// TODO for other implementations. This should really go into
|
// TODO for other implementations. This should really go into
|
||||||
// platform-specific directories.
|
// platform-specific directories.
|
||||||
|
@@ -76,7 +76,11 @@ typedef unsigned char size_t8;
|
|||||||
public:
|
public:
|
||||||
IntSizeChecker()
|
IntSizeChecker()
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( sizeof(int) == 4,
|
// Asserting a sizeof directly causes some compilers to
|
||||||
|
// issue a "using constant in a conditional expression" warning
|
||||||
|
size_t intsize = sizeof(int);
|
||||||
|
|
||||||
|
wxASSERT_MSG( intsize == 4,
|
||||||
"size_t32 is incorrectly defined!" );
|
"size_t32 is incorrectly defined!" );
|
||||||
}
|
}
|
||||||
} intsizechecker;
|
} intsizechecker;
|
||||||
|
@@ -604,7 +604,7 @@ bool wxStringList::Member(const wxChar *s) const
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int LINKAGEMODE
|
||||||
wx_comparestrings(const void *arg1, const void *arg2)
|
wx_comparestrings(const void *arg1, const void *arg2)
|
||||||
{
|
{
|
||||||
wxChar **s1 = (wxChar **) arg1;
|
wxChar **s1 = (wxChar **) arg1;
|
||||||
|
@@ -191,7 +191,8 @@ bool wxResourceTable::DeleteResource(const wxString& name)
|
|||||||
// parent's child list.
|
// parent's child list.
|
||||||
BeginFind();
|
BeginFind();
|
||||||
wxNode *node = (wxNode *) NULL;
|
wxNode *node = (wxNode *) NULL;
|
||||||
while ((node = Next()))
|
node = Next();
|
||||||
|
while (node != NULL)
|
||||||
{
|
{
|
||||||
wxItemResource *parent = (wxItemResource *)node->Data();
|
wxItemResource *parent = (wxItemResource *)node->Data();
|
||||||
if (parent->GetChildren().Member(item))
|
if (parent->GetChildren().Member(item))
|
||||||
@@ -199,6 +200,7 @@ bool wxResourceTable::DeleteResource(const wxString& name)
|
|||||||
parent->GetChildren().DeleteObject(item);
|
parent->GetChildren().DeleteObject(item);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
node = Next();
|
||||||
}
|
}
|
||||||
|
|
||||||
delete item;
|
delete item;
|
||||||
@@ -1528,7 +1530,7 @@ static bool wxEatWhiteSpace(FILE *fd)
|
|||||||
default:
|
default:
|
||||||
ungetc(ch, fd);
|
ungetc(ch, fd);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -2041,7 +2043,8 @@ long wxParseWindowStyle(const wxString& bitListString)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
wxChar *word;
|
wxChar *word;
|
||||||
long bitList = 0;
|
long bitList = 0;
|
||||||
while ((word = wxResourceParseWord(WXSTRINGCAST bitListString, &i)))
|
word = wxResourceParseWord(WXSTRINGCAST bitListString, &i);
|
||||||
|
while (word != NULL)
|
||||||
{
|
{
|
||||||
bool found = FALSE;
|
bool found = FALSE;
|
||||||
int j;
|
int j;
|
||||||
@@ -2057,6 +2060,7 @@ long wxParseWindowStyle(const wxString& bitListString)
|
|||||||
wxLogWarning(_("Unrecognized style %s whilst parsing resource."), word);
|
wxLogWarning(_("Unrecognized style %s whilst parsing resource."), word);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
word = wxResourceParseWord(WXSTRINGCAST bitListString, &i);
|
||||||
}
|
}
|
||||||
return bitList;
|
return bitList;
|
||||||
}
|
}
|
||||||
@@ -2605,7 +2609,7 @@ bool wxEatWhiteSpaceString(char *s)
|
|||||||
default:
|
default:
|
||||||
ungetc_string();
|
ungetc_string();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@@ -13,6 +13,12 @@
|
|||||||
#pragma implementation "string.h"
|
#pragma implementation "string.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __WXPM__
|
||||||
|
#define LINKAGECPP _Optlink
|
||||||
|
#else
|
||||||
|
#define LINKAGECPP
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* About ref counting:
|
* About ref counting:
|
||||||
* 1) all empty strings use g_strEmpty, nRefs = -1 (set in Init())
|
* 1) all empty strings use g_strEmpty, nRefs = -1 (set in Init())
|
||||||
@@ -864,8 +870,8 @@ wxString& wxString::MakeLower()
|
|||||||
wxString& wxString::Trim(bool bFromRight)
|
wxString& wxString::Trim(bool bFromRight)
|
||||||
{
|
{
|
||||||
// first check if we're going to modify the string at all
|
// first check if we're going to modify the string at all
|
||||||
if ( !IsEmpty() &&
|
if ( !IsEmpty() &&
|
||||||
(
|
(
|
||||||
(bFromRight && wxIsspace(GetChar(Len() - 1))) ||
|
(bFromRight && wxIsspace(GetChar(Len() - 1))) ||
|
||||||
(!bFromRight && wxIsspace(GetChar(0u)))
|
(!bFromRight && wxIsspace(GetChar(0u)))
|
||||||
)
|
)
|
||||||
@@ -1685,7 +1691,12 @@ void wxArrayString::Grow()
|
|||||||
else {
|
else {
|
||||||
// otherwise when it's called for the first time, nIncrement would be 0
|
// otherwise when it's called for the first time, nIncrement would be 0
|
||||||
// and the array would never be expanded
|
// and the array would never be expanded
|
||||||
|
#if defined(__VISAGECPP__)
|
||||||
|
int array_size = ARRAY_DEFAULT_INITIAL_SIZE;
|
||||||
|
wxASSERT( array_size != 0 );
|
||||||
|
#else
|
||||||
wxASSERT( ARRAY_DEFAULT_INITIAL_SIZE != 0 );
|
wxASSERT( ARRAY_DEFAULT_INITIAL_SIZE != 0 );
|
||||||
|
#endif
|
||||||
|
|
||||||
// add 50% but not too much
|
// add 50% but not too much
|
||||||
size_t nIncrement = m_nSize < ARRAY_DEFAULT_INITIAL_SIZE
|
size_t nIncrement = m_nSize < ARRAY_DEFAULT_INITIAL_SIZE
|
||||||
@@ -1762,7 +1773,7 @@ void wxArrayString::Shrink()
|
|||||||
// only do it if we have some memory to free
|
// only do it if we have some memory to free
|
||||||
if( m_nCount < m_nSize ) {
|
if( m_nCount < m_nSize ) {
|
||||||
// allocates exactly as much memory as we need
|
// allocates exactly as much memory as we need
|
||||||
wxChar **pNew = new wxChar *[m_nCount];
|
wxChar **pNew = new wxChar *[m_nCount];
|
||||||
|
|
||||||
// copy data to new location
|
// copy data to new location
|
||||||
memcpy(pNew, m_pItems, m_nCount*sizeof(wxChar *));
|
memcpy(pNew, m_pItems, m_nCount*sizeof(wxChar *));
|
||||||
@@ -1880,7 +1891,7 @@ static wxArrayString::CompareFunction gs_compareFunction = NULL;
|
|||||||
static bool gs_sortAscending = TRUE;
|
static bool gs_sortAscending = TRUE;
|
||||||
|
|
||||||
// function which is called by quick sort
|
// function which is called by quick sort
|
||||||
static int wxStringCompareFunction(const void *first, const void *second)
|
static int LINKAGEMODE wxStringCompareFunction(const void *first, const void *second)
|
||||||
{
|
{
|
||||||
wxString *strFirst = (wxString *)first;
|
wxString *strFirst = (wxString *)first;
|
||||||
wxString *strSecond = (wxString *)second;
|
wxString *strSecond = (wxString *)second;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* unzip.c -- IO on .zip files using zlib
|
/* unzip.c -- IO on .zip files using zlib
|
||||||
Version 0.15 beta, Mar 19th, 1998,
|
Version 0.15 beta, Mar 19th, 1998,
|
||||||
|
|
||||||
Read unzip.h for more info
|
Read unzip.h for more info
|
||||||
@@ -128,6 +128,10 @@ typedef struct
|
|||||||
file if we are decompressing it */
|
file if we are decompressing it */
|
||||||
} unz_s;
|
} unz_s;
|
||||||
|
|
||||||
|
#if defined (__VISAGECPP__)
|
||||||
|
// VA always requires prototypes
|
||||||
|
int unzlocal_CheckCurrentFileCoherencyHeader (unz_s*, uInt*, uLong*, uInt*);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ===========================================================================
|
/* ===========================================================================
|
||||||
Read a byte from a gz_stream; update next_in and avail_in. Return EOF
|
Read a byte from a gz_stream; update next_in and avail_in. Return EOF
|
||||||
@@ -149,7 +153,7 @@ local int unzlocal_getByte(fin,pi)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ferror(fin))
|
if (ferror(fin))
|
||||||
return UNZ_ERRNO;
|
return UNZ_ERRNO;
|
||||||
else
|
else
|
||||||
return UNZ_EOF;
|
return UNZ_EOF;
|
||||||
@@ -158,7 +162,7 @@ local int unzlocal_getByte(fin,pi)
|
|||||||
|
|
||||||
|
|
||||||
/* ===========================================================================
|
/* ===========================================================================
|
||||||
Reads a long in LSB order from the given gz_stream. Sets
|
Reads a long in LSB order from the given gz_stream. Sets
|
||||||
*/
|
*/
|
||||||
local int unzlocal_getShort (fin,pX)
|
local int unzlocal_getShort (fin,pX)
|
||||||
FILE* fin;
|
FILE* fin;
|
||||||
@@ -170,11 +174,11 @@ local int unzlocal_getShort (fin,pX)
|
|||||||
|
|
||||||
err = unzlocal_getByte(fin,&i);
|
err = unzlocal_getByte(fin,&i);
|
||||||
x = (uLong)i;
|
x = (uLong)i;
|
||||||
|
|
||||||
if (err==UNZ_OK)
|
if (err==UNZ_OK)
|
||||||
err = unzlocal_getByte(fin,&i);
|
err = unzlocal_getByte(fin,&i);
|
||||||
x += ((uLong)i)<<8;
|
x += ((uLong)i)<<8;
|
||||||
|
|
||||||
if (err==UNZ_OK)
|
if (err==UNZ_OK)
|
||||||
*pX = x;
|
*pX = x;
|
||||||
else
|
else
|
||||||
@@ -192,7 +196,7 @@ local int unzlocal_getLong (fin,pX)
|
|||||||
|
|
||||||
err = unzlocal_getByte(fin,&i);
|
err = unzlocal_getByte(fin,&i);
|
||||||
x = (uLong)i;
|
x = (uLong)i;
|
||||||
|
|
||||||
if (err==UNZ_OK)
|
if (err==UNZ_OK)
|
||||||
err = unzlocal_getByte(fin,&i);
|
err = unzlocal_getByte(fin,&i);
|
||||||
x += ((uLong)i)<<8;
|
x += ((uLong)i)<<8;
|
||||||
@@ -204,7 +208,7 @@ local int unzlocal_getLong (fin,pX)
|
|||||||
if (err==UNZ_OK)
|
if (err==UNZ_OK)
|
||||||
err = unzlocal_getByte(fin,&i);
|
err = unzlocal_getByte(fin,&i);
|
||||||
x += ((uLong)i)<<24;
|
x += ((uLong)i)<<24;
|
||||||
|
|
||||||
if (err==UNZ_OK)
|
if (err==UNZ_OK)
|
||||||
*pX = x;
|
*pX = x;
|
||||||
else
|
else
|
||||||
@@ -248,7 +252,7 @@ local int strcmpcasenosensitive_internal (fileName1,fileName2)
|
|||||||
#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal
|
#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Compare two filename (fileName1,fileName2).
|
Compare two filename (fileName1,fileName2).
|
||||||
If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
|
If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
|
||||||
If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
|
If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
|
||||||
@@ -269,7 +273,7 @@ extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivit
|
|||||||
return strcmp(fileName1,fileName2);
|
return strcmp(fileName1,fileName2);
|
||||||
|
|
||||||
return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2);
|
return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define BUFREADCOMMENT (0x400)
|
#define BUFREADCOMMENT (0x400)
|
||||||
|
|
||||||
@@ -304,13 +308,13 @@ local uLong unzlocal_SearchCentralDir(fin)
|
|||||||
{
|
{
|
||||||
uLong uReadSize,uReadPos ;
|
uLong uReadSize,uReadPos ;
|
||||||
int i;
|
int i;
|
||||||
if (uBackRead+BUFREADCOMMENT>uMaxBack)
|
if (uBackRead+BUFREADCOMMENT>uMaxBack)
|
||||||
uBackRead = uMaxBack;
|
uBackRead = uMaxBack;
|
||||||
else
|
else
|
||||||
uBackRead+=BUFREADCOMMENT;
|
uBackRead+=BUFREADCOMMENT;
|
||||||
uReadPos = uSizeFile-uBackRead ;
|
uReadPos = uSizeFile-uBackRead ;
|
||||||
|
|
||||||
uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
|
uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
|
||||||
(BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
|
(BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
|
||||||
if (fseek(fin,uReadPos,SEEK_SET)!=0)
|
if (fseek(fin,uReadPos,SEEK_SET)!=0)
|
||||||
break;
|
break;
|
||||||
@@ -319,7 +323,7 @@ local uLong unzlocal_SearchCentralDir(fin)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
for (i=(int)uReadSize-3; (i--)>0;)
|
for (i=(int)uReadSize-3; (i--)>0;)
|
||||||
if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
|
if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
|
||||||
((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
|
((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
|
||||||
{
|
{
|
||||||
uPosFound = uReadPos+i;
|
uPosFound = uReadPos+i;
|
||||||
@@ -350,12 +354,12 @@ extern unzFile ZEXPORT unzOpen (path)
|
|||||||
uLong central_pos,uL;
|
uLong central_pos,uL;
|
||||||
FILE * fin ;
|
FILE * fin ;
|
||||||
|
|
||||||
uLong number_disk; /* number of the current dist, used for
|
uLong number_disk; /* number of the current dist, used for
|
||||||
spaning ZIP, unsupported, always 0*/
|
spaning ZIP, unsupported, always 0*/
|
||||||
uLong number_disk_with_CD; /* number the the disk with central dir, used
|
uLong number_disk_with_CD; /* number the the disk with central dir, used
|
||||||
for spaning ZIP, unsupported, always 0*/
|
for spaning ZIP, unsupported, always 0*/
|
||||||
uLong number_entry_CD; /* total number of entries in
|
uLong number_entry_CD; /* total number of entries in
|
||||||
the central dir
|
the central dir
|
||||||
(same than number_entry on nospan) */
|
(same than number_entry on nospan) */
|
||||||
|
|
||||||
int err=UNZ_OK;
|
int err=UNZ_OK;
|
||||||
@@ -403,7 +407,7 @@ extern unzFile ZEXPORT unzOpen (path)
|
|||||||
if (unzlocal_getLong(fin,&us.size_central_dir)!=UNZ_OK)
|
if (unzlocal_getLong(fin,&us.size_central_dir)!=UNZ_OK)
|
||||||
err=UNZ_ERRNO;
|
err=UNZ_ERRNO;
|
||||||
|
|
||||||
/* offset of start of central directory with respect to the
|
/* offset of start of central directory with respect to the
|
||||||
starting disk number */
|
starting disk number */
|
||||||
if (unzlocal_getLong(fin,&us.offset_central_dir)!=UNZ_OK)
|
if (unzlocal_getLong(fin,&us.offset_central_dir)!=UNZ_OK)
|
||||||
err=UNZ_ERRNO;
|
err=UNZ_ERRNO;
|
||||||
@@ -412,7 +416,7 @@ extern unzFile ZEXPORT unzOpen (path)
|
|||||||
if (unzlocal_getShort(fin,&us.gi.size_comment)!=UNZ_OK)
|
if (unzlocal_getShort(fin,&us.gi.size_comment)!=UNZ_OK)
|
||||||
err=UNZ_ERRNO;
|
err=UNZ_ERRNO;
|
||||||
|
|
||||||
if ((central_pos<us.offset_central_dir+us.size_central_dir) &&
|
if ((central_pos<us.offset_central_dir+us.size_central_dir) &&
|
||||||
(err==UNZ_OK))
|
(err==UNZ_OK))
|
||||||
err=UNZ_BADZIPFILE;
|
err=UNZ_BADZIPFILE;
|
||||||
|
|
||||||
@@ -421,7 +425,6 @@ extern unzFile ZEXPORT unzOpen (path)
|
|||||||
fclose(fin);
|
fclose(fin);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
us.file=fin;
|
us.file=fin;
|
||||||
us.byte_before_the_zipfile = central_pos -
|
us.byte_before_the_zipfile = central_pos -
|
||||||
(us.offset_central_dir+us.size_central_dir);
|
(us.offset_central_dir+us.size_central_dir);
|
||||||
@@ -498,7 +501,7 @@ local void unzlocal_DosDateToTmuDate (ulDosDate, ptm)
|
|||||||
*/
|
*/
|
||||||
local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file,
|
local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file,
|
||||||
unz_file_info *pfile_info,
|
unz_file_info *pfile_info,
|
||||||
unz_file_info_internal
|
unz_file_info_internal
|
||||||
*pfile_info_internal,
|
*pfile_info_internal,
|
||||||
char *szFileName,
|
char *szFileName,
|
||||||
uLong fileNameBufferSize,
|
uLong fileNameBufferSize,
|
||||||
@@ -629,7 +632,7 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
|
|||||||
lSeek += file_info.size_file_extra - uSizeRead;
|
lSeek += file_info.size_file_extra - uSizeRead;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lSeek+=file_info.size_file_extra;
|
lSeek+=file_info.size_file_extra;
|
||||||
|
|
||||||
|
|
||||||
if ((err==UNZ_OK) && (szComment!=NULL))
|
if ((err==UNZ_OK) && (szComment!=NULL))
|
||||||
@@ -868,7 +871,7 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
|
|||||||
|
|
||||||
if (unzlocal_getLong(s->file,&uData) != UNZ_OK) /* size uncompr */
|
if (unzlocal_getLong(s->file,&uData) != UNZ_OK) /* size uncompr */
|
||||||
err=UNZ_ERRNO;
|
err=UNZ_ERRNO;
|
||||||
else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) &&
|
else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) &&
|
||||||
((uFlags & 8)==0))
|
((uFlags & 8)==0))
|
||||||
err=UNZ_BADZIPFILE;
|
err=UNZ_BADZIPFILE;
|
||||||
|
|
||||||
@@ -955,27 +958,27 @@ extern int ZEXPORT unzOpenCurrentFile (file)
|
|||||||
{
|
{
|
||||||
pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
|
pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
|
||||||
pfile_in_zip_read_info->stream.zfree = (free_func)0;
|
pfile_in_zip_read_info->stream.zfree = (free_func)0;
|
||||||
pfile_in_zip_read_info->stream.opaque = (voidpf)0;
|
pfile_in_zip_read_info->stream.opaque = (voidpf)0;
|
||||||
|
|
||||||
err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
|
err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
|
||||||
if (err == Z_OK)
|
if (err == Z_OK)
|
||||||
pfile_in_zip_read_info->stream_initialised=1;
|
pfile_in_zip_read_info->stream_initialised=1;
|
||||||
/* windowBits is passed < 0 to tell that there is no zlib header.
|
/* windowBits is passed < 0 to tell that there is no zlib header.
|
||||||
* Note that in this case inflate *requires* an extra "dummy" byte
|
* Note that in this case inflate *requires* an extra "dummy" byte
|
||||||
* after the compressed stream in order to complete decompression and
|
* after the compressed stream in order to complete decompression and
|
||||||
* return Z_STREAM_END.
|
* return Z_STREAM_END.
|
||||||
* In unzip, i don't wait absolutely Z_STREAM_END because I known the
|
* In unzip, i don't wait absolutely Z_STREAM_END because I known the
|
||||||
* size of both compressed and uncompressed data
|
* size of both compressed and uncompressed data
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
pfile_in_zip_read_info->rest_read_compressed =
|
pfile_in_zip_read_info->rest_read_compressed =
|
||||||
s->cur_file_info.compressed_size ;
|
s->cur_file_info.compressed_size ;
|
||||||
pfile_in_zip_read_info->rest_read_uncompressed =
|
pfile_in_zip_read_info->rest_read_uncompressed =
|
||||||
s->cur_file_info.uncompressed_size ;
|
s->cur_file_info.uncompressed_size ;
|
||||||
|
|
||||||
|
|
||||||
pfile_in_zip_read_info->pos_in_zipfile =
|
pfile_in_zip_read_info->pos_in_zipfile =
|
||||||
s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +
|
s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +
|
||||||
iSizeVar;
|
iSizeVar;
|
||||||
|
|
||||||
pfile_in_zip_read_info->stream.avail_in = (uInt)0;
|
pfile_in_zip_read_info->stream.avail_in = (uInt)0;
|
||||||
@@ -1024,7 +1027,7 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len)
|
|||||||
pfile_in_zip_read_info->stream.avail_out = (uInt)len;
|
pfile_in_zip_read_info->stream.avail_out = (uInt)len;
|
||||||
|
|
||||||
if (len>pfile_in_zip_read_info->rest_read_uncompressed)
|
if (len>pfile_in_zip_read_info->rest_read_uncompressed)
|
||||||
pfile_in_zip_read_info->stream.avail_out =
|
pfile_in_zip_read_info->stream.avail_out =
|
||||||
(uInt)pfile_in_zip_read_info->rest_read_uncompressed;
|
(uInt)pfile_in_zip_read_info->rest_read_uncompressed;
|
||||||
|
|
||||||
while (pfile_in_zip_read_info->stream.avail_out>0)
|
while (pfile_in_zip_read_info->stream.avail_out>0)
|
||||||
@@ -1038,7 +1041,7 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len)
|
|||||||
if (uReadThis == 0)
|
if (uReadThis == 0)
|
||||||
return UNZ_EOF;
|
return UNZ_EOF;
|
||||||
if (fseek(pfile_in_zip_read_info->file,
|
if (fseek(pfile_in_zip_read_info->file,
|
||||||
pfile_in_zip_read_info->pos_in_zipfile +
|
pfile_in_zip_read_info->pos_in_zipfile +
|
||||||
pfile_in_zip_read_info->byte_before_the_zipfile,SEEK_SET)!=0)
|
pfile_in_zip_read_info->byte_before_the_zipfile,SEEK_SET)!=0)
|
||||||
return UNZ_ERRNO;
|
return UNZ_ERRNO;
|
||||||
if (fread(pfile_in_zip_read_info->read_buffer,uReadThis,1,
|
if (fread(pfile_in_zip_read_info->read_buffer,uReadThis,1,
|
||||||
@@ -1048,7 +1051,7 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len)
|
|||||||
|
|
||||||
pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
|
pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
|
||||||
|
|
||||||
pfile_in_zip_read_info->stream.next_in =
|
pfile_in_zip_read_info->stream.next_in =
|
||||||
(Bytef*)pfile_in_zip_read_info->read_buffer;
|
(Bytef*)pfile_in_zip_read_info->read_buffer;
|
||||||
pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
|
pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
|
||||||
}
|
}
|
||||||
@@ -1056,7 +1059,7 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len)
|
|||||||
if (pfile_in_zip_read_info->compression_method==0)
|
if (pfile_in_zip_read_info->compression_method==0)
|
||||||
{
|
{
|
||||||
uInt uDoCopy,i ;
|
uInt uDoCopy,i ;
|
||||||
if (pfile_in_zip_read_info->stream.avail_out <
|
if (pfile_in_zip_read_info->stream.avail_out <
|
||||||
pfile_in_zip_read_info->stream.avail_in)
|
pfile_in_zip_read_info->stream.avail_in)
|
||||||
uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
|
uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
|
||||||
else
|
else
|
||||||
@@ -1098,7 +1101,7 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len)
|
|||||||
uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
|
uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
|
||||||
uOutThis = uTotalOutAfter-uTotalOutBefore;
|
uOutThis = uTotalOutAfter-uTotalOutBefore;
|
||||||
|
|
||||||
pfile_in_zip_read_info->crc32 =
|
pfile_in_zip_read_info->crc32 =
|
||||||
crc32(pfile_in_zip_read_info->crc32,bufBefore,
|
crc32(pfile_in_zip_read_info->crc32,bufBefore,
|
||||||
(uInt)(uOutThis));
|
(uInt)(uOutThis));
|
||||||
|
|
||||||
@@ -1106,10 +1109,10 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len)
|
|||||||
uOutThis;
|
uOutThis;
|
||||||
|
|
||||||
iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
|
iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
|
||||||
|
|
||||||
if (err==Z_STREAM_END)
|
if (err==Z_STREAM_END)
|
||||||
return (iRead==0) ? UNZ_EOF : iRead;
|
return (iRead==0) ? UNZ_EOF : iRead;
|
||||||
if (err!=Z_OK)
|
if (err!=Z_OK)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1141,7 +1144,7 @@ extern z_off_t ZEXPORT unztell (file)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
return 1 if the end of file was reached, 0 elsewhere
|
return 1 if the end of file was reached, 0 elsewhere
|
||||||
*/
|
*/
|
||||||
extern int ZEXPORT unzeof (file)
|
extern int ZEXPORT unzeof (file)
|
||||||
unzFile file;
|
unzFile file;
|
||||||
@@ -1173,7 +1176,7 @@ extern int ZEXPORT unzeof (file)
|
|||||||
|
|
||||||
if buf!=NULL, len is the size of the buffer, the extra header is copied in
|
if buf!=NULL, len is the size of the buffer, the extra header is copied in
|
||||||
buf.
|
buf.
|
||||||
the return value is the number of bytes copied in buf, or (if <0)
|
the return value is the number of bytes copied in buf, or (if <0)
|
||||||
the error code
|
the error code
|
||||||
*/
|
*/
|
||||||
extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
|
extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
|
||||||
@@ -1194,7 +1197,7 @@ extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
|
|||||||
if (pfile_in_zip_read_info==NULL)
|
if (pfile_in_zip_read_info==NULL)
|
||||||
return UNZ_PARAMERROR;
|
return UNZ_PARAMERROR;
|
||||||
|
|
||||||
size_to_read = (pfile_in_zip_read_info->size_local_extrafield -
|
size_to_read = (pfile_in_zip_read_info->size_local_extrafield -
|
||||||
pfile_in_zip_read_info->pos_local_extrafield);
|
pfile_in_zip_read_info->pos_local_extrafield);
|
||||||
|
|
||||||
if (buf==NULL)
|
if (buf==NULL)
|
||||||
@@ -1209,7 +1212,7 @@ extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (fseek(pfile_in_zip_read_info->file,
|
if (fseek(pfile_in_zip_read_info->file,
|
||||||
pfile_in_zip_read_info->offset_local_extrafield +
|
pfile_in_zip_read_info->offset_local_extrafield +
|
||||||
pfile_in_zip_read_info->pos_local_extrafield,SEEK_SET)!=0)
|
pfile_in_zip_read_info->pos_local_extrafield,SEEK_SET)!=0)
|
||||||
return UNZ_ERRNO;
|
return UNZ_ERRNO;
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* unzip.h -- IO for uncompress .zip files using zlib
|
/* unzip.h -- IO for uncompress .zip files using zlib
|
||||||
Version 0.15 beta, Mar 19th, 1998,
|
Version 0.15 beta, Mar 19th, 1998,
|
||||||
|
|
||||||
Copyright (C) 1998 Gilles Vollant
|
Copyright (C) 1998 Gilles Vollant
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
/* for more info about .ZIP format, see
|
/* for more info about .ZIP format, see
|
||||||
ftp://ftp.cdrom.com/pub/infozip/doc/appnote-970311-iz.zip
|
ftp://ftp.cdrom.com/pub/infozip/doc/appnote-970311-iz.zip
|
||||||
PkWare has also a specification at :
|
PkWare has also a specification at :
|
||||||
ftp://ftp.pkware.com/probdesc.zip */
|
ftp://ftp.pkware.com/probdesc.zip */
|
||||||
@@ -52,7 +52,7 @@ extern "C" {
|
|||||||
#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
|
#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
|
||||||
/* like the STRICT of WIN32, we define a pointer that cannot be converted
|
/* like the STRICT of WIN32, we define a pointer that cannot be converted
|
||||||
from (void*) without cast */
|
from (void*) without cast */
|
||||||
typedef struct TagunzFile__ { int unused; } unzFile__;
|
typedef struct TagunzFile__ { int unused; } unzFile__;
|
||||||
typedef unzFile__ *unzFile;
|
typedef unzFile__ *unzFile;
|
||||||
#else
|
#else
|
||||||
typedef voidp unzFile;
|
typedef voidp unzFile;
|
||||||
@@ -69,7 +69,7 @@ typedef voidp unzFile;
|
|||||||
#define UNZ_CRCERROR (-105)
|
#define UNZ_CRCERROR (-105)
|
||||||
|
|
||||||
/* tm_unz contain date/time info */
|
/* tm_unz contain date/time info */
|
||||||
typedef struct tm_unz_s
|
typedef struct tm_unz_s
|
||||||
{
|
{
|
||||||
uInt tm_sec; /* seconds after the minute - [0,59] */
|
uInt tm_sec; /* seconds after the minute - [0,59] */
|
||||||
uInt tm_min; /* minutes after the hour - [0,59] */
|
uInt tm_min; /* minutes after the hour - [0,59] */
|
||||||
@@ -98,8 +98,8 @@ typedef struct unz_file_info_s
|
|||||||
uLong compression_method; /* compression method 2 bytes */
|
uLong compression_method; /* compression method 2 bytes */
|
||||||
uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
|
uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
|
||||||
uLong crc; /* crc-32 4 bytes */
|
uLong crc; /* crc-32 4 bytes */
|
||||||
uLong compressed_size; /* compressed size 4 bytes */
|
uLong compressed_size; /* compressed size 4 bytes */
|
||||||
uLong uncompressed_size; /* uncompressed size 4 bytes */
|
uLong uncompressed_size; /* uncompressed size 4 bytes */
|
||||||
uLong size_filename; /* filename length 2 bytes */
|
uLong size_filename; /* filename length 2 bytes */
|
||||||
uLong size_file_extra; /* extra field length 2 bytes */
|
uLong size_file_extra; /* extra field length 2 bytes */
|
||||||
uLong size_file_comment; /* file comment length 2 bytes */
|
uLong size_file_comment; /* file comment length 2 bytes */
|
||||||
@@ -176,7 +176,7 @@ extern int ZEXPORT unzGoToNextFile OF((unzFile file));
|
|||||||
return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
|
return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern int ZEXPORT unzLocateFile OF((unzFile file,
|
extern int ZEXPORT unzLocateFile OF((unzFile file,
|
||||||
const char *szFileName,
|
const char *szFileName,
|
||||||
int iCaseSensitivity));
|
int iCaseSensitivity));
|
||||||
/*
|
/*
|
||||||
@@ -228,7 +228,7 @@ extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
|
extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
|
||||||
voidp buf,
|
voidp buf,
|
||||||
unsigned len));
|
unsigned len));
|
||||||
/*
|
/*
|
||||||
@@ -249,7 +249,7 @@ extern z_off_t ZEXPORT unztell OF((unzFile file));
|
|||||||
|
|
||||||
extern int ZEXPORT unzeof OF((unzFile file));
|
extern int ZEXPORT unzeof OF((unzFile file));
|
||||||
/*
|
/*
|
||||||
return 1 if the end of file was reached, 0 elsewhere
|
return 1 if the end of file was reached, 0 elsewhere
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
|
extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
|
||||||
@@ -264,10 +264,20 @@ extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
|
|||||||
|
|
||||||
if buf!=NULL, len is the size of the buffer, the extra header is copied in
|
if buf!=NULL, len is the size of the buffer, the extra header is copied in
|
||||||
buf.
|
buf.
|
||||||
the return value is the number of bytes copied in buf, or (if <0)
|
the return value is the number of bytes copied in buf, or (if <0)
|
||||||
the error code
|
the error code
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(__VISAGECPP__)
|
||||||
|
//Visualage complains of no prototypes
|
||||||
|
int unzlocal_getByte(FILE* , int*);
|
||||||
|
int strcmpcasenosensitive_internal (const char*, const char*);
|
||||||
|
int unzlocal_getShort (FILE*, uLong*);
|
||||||
|
int unzlocal_getLong (FILE*, uLong*);
|
||||||
|
uLong unzlocal_SearchCentralDir(FILE*);
|
||||||
|
void unzlocal_DosDateToTmuDate (uLong, tm_unz*);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
// Author: Kevin Smith
|
// Author: Kevin Smith
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: Jan 22 1999
|
// Created: Jan 22 1999
|
||||||
// RCS-ID:
|
// RCS-ID:
|
||||||
// Copyright: (c) 1999 Kevin Smith
|
// Copyright: (c) 1999 Kevin Smith
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -135,7 +135,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#if wxUSE_RADIOBOX
|
#if wxUSE_RADIOBOX
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioBox)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioBox)) )
|
||||||
@@ -147,7 +147,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#if wxUSE_SCROLLBAR
|
#if wxUSE_SCROLLBAR
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxScrollBar)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxScrollBar)) )
|
||||||
@@ -165,7 +165,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
|
||||||
{
|
{
|
||||||
wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
|
wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
|
||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
pControl->SetValue(*m_pInt) ;
|
pControl->SetValue(*m_pInt) ;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -182,7 +182,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
pControl->SetLabel(*m_pString) ;
|
pControl->SetLabel(*m_pString) ;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#if wxUSE_COMBOBOX
|
#if wxUSE_COMBOBOX
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
|
||||||
{
|
{
|
||||||
@@ -288,7 +288,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
*m_pBool = pControl->GetValue() ;
|
*m_pBool = pControl->GetValue() ;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#if wxUSE_RADIOBTN
|
#if wxUSE_RADIOBTN
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioButton)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioButton)) )
|
||||||
@@ -311,7 +311,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
*m_pInt = pControl->GetValue() ;
|
*m_pInt = pControl->GetValue() ;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#if wxUSE_RADIOBOX
|
#if wxUSE_RADIOBOX
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioBox)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioBox)) )
|
||||||
@@ -322,7 +322,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
*m_pInt = pControl->GetSelection() ;
|
*m_pInt = pControl->GetSelection() ;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#if wxUSE_SCROLLBAR
|
#if wxUSE_SCROLLBAR
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxScrollBar)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxScrollBar)) )
|
||||||
@@ -358,7 +358,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#if wxUSE_COMBOBOX
|
#if wxUSE_COMBOBOX
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
|
||||||
{
|
{
|
||||||
@@ -368,7 +368,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
*m_pString = pControl->GetValue() ;
|
*m_pString = pControl->GetValue() ;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#if wxUSE_CHOICE
|
#if wxUSE_CHOICE
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) )
|
||||||
@@ -379,7 +379,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
*m_pInt = pControl->GetSelection() ;
|
*m_pInt = pControl->GetSelection() ;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
|
||||||
{
|
{
|
||||||
@@ -389,7 +389,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
*m_pString = pControl->GetLabel() ;
|
*m_pString = pControl->GetLabel() ;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) )
|
||||||
{
|
{
|
||||||
wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow;
|
wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow;
|
||||||
@@ -459,4 +459,4 @@ void wxGenericValidator::Initialize()
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
// wxUSE_VALIDATORS
|
// wxUSE_VALIDATORS
|
||||||
|
|
||||||
|
@@ -541,7 +541,7 @@ bool wxWindowBase::SetCursor(const wxCursor& cursor)
|
|||||||
// don't try to set invalid cursor, always fall back to the default
|
// don't try to set invalid cursor, always fall back to the default
|
||||||
const wxCursor& cursorOk = cursor.Ok() ? cursor : *wxSTANDARD_CURSOR;
|
const wxCursor& cursorOk = cursor.Ok() ? cursor : *wxSTANDARD_CURSOR;
|
||||||
|
|
||||||
if ( cursorOk == m_cursor )
|
if ( (wxCursor&)cursorOk == m_cursor )
|
||||||
{
|
{
|
||||||
// no change
|
// no change
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -557,7 +557,7 @@ bool wxWindowBase::SetFont(const wxFont& font)
|
|||||||
// don't try to set invalid font, always fall back to the default
|
// don't try to set invalid font, always fall back to the default
|
||||||
const wxFont& fontOk = font.Ok() ? font : *wxSWISS_FONT;
|
const wxFont& fontOk = font.Ok() ? font : *wxSWISS_FONT;
|
||||||
|
|
||||||
if ( fontOk == m_font )
|
if ( (wxFont&)fontOk == m_font )
|
||||||
{
|
{
|
||||||
// no change
|
// no change
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@@ -49,6 +49,13 @@
|
|||||||
#define wxUSE_DOUBLE_BUFFERING 1
|
#define wxUSE_DOUBLE_BUFFERING 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __WXPM__
|
||||||
|
#define wxIPE_ADJUST -1
|
||||||
|
#define wxIPE_STYLE wxNO_BORDER
|
||||||
|
#define wxIPE_HIGHLIGHT 1
|
||||||
|
#define wxUSE_DOUBLE_BUFFERING 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
#define wxIPE_ADJUST -1
|
#define wxIPE_ADJUST -1
|
||||||
#define wxIPE_STYLE wxNO_BORDER
|
#define wxIPE_STYLE wxNO_BORDER
|
||||||
@@ -1518,8 +1525,16 @@ void wxGenericGrid::OnSelectCellImplementation(wxDC *dc, int row, int col)
|
|||||||
|
|
||||||
m_inPlaceTextItem->Show(TRUE);
|
m_inPlaceTextItem->Show(TRUE);
|
||||||
m_inPlaceTextItem->SetFocus();
|
m_inPlaceTextItem->SetFocus();
|
||||||
if (wxIPE_HIGHLIGHT)
|
#if defined(__VISAGECPP__)
|
||||||
|
{
|
||||||
|
int highlight = wxIPE_HIGHLIGHT;
|
||||||
|
if (highlight != 0)
|
||||||
|
HighlightCell(dc, TRUE);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if (wxIPE_HIGHLIGHT != 0)
|
||||||
HighlightCell(dc, TRUE);
|
HighlightCell(dc, TRUE);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -183,7 +183,7 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
|
|||||||
wxTE_MULTILINE | wxTE_READONLY | wxSUNKEN_BORDER);
|
wxTE_MULTILINE | wxTE_READONLY | wxSUNKEN_BORDER);
|
||||||
m_text->SetFont(wxFont(14, wxROMAN, wxNORMAL, wxNORMAL));
|
m_text->SetFont(wxFont(14, wxROMAN, wxNORMAL, wxNORMAL));
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
wxIcon icon("wxICON_TIP");
|
wxIcon icon("wxICON_TIP");
|
||||||
#else
|
#else
|
||||||
#include "wx/generic/tip.xpm"
|
#include "wx/generic/tip.xpm"
|
||||||
|
@@ -57,11 +57,13 @@ $(CPPFLAGS) /Fo$@ /Tp $<
|
|||||||
<<
|
<<
|
||||||
|
|
||||||
{..\os2}.cpp{..\os2\$D}.obj:
|
{..\os2}.cpp{..\os2\$D}.obj:
|
||||||
|
@echo $<
|
||||||
icc @<<
|
icc @<<
|
||||||
$(CPPFLAGS) /Fo$@ /Tp $<
|
$(CPPFLAGS) /Fo$@ /Tp $<
|
||||||
<<
|
<<
|
||||||
|
|
||||||
{..\html}.cpp{..\html\$D}.obj:
|
{..\html}.cpp{..\html\$D}.obj:
|
||||||
|
@echo $<
|
||||||
icc @<<
|
icc @<<
|
||||||
$(CPPFLAGS) /Fo$@ /Tp $<
|
$(CPPFLAGS) /Fo$@ /Tp $<
|
||||||
<<
|
<<
|
||||||
@@ -181,80 +183,7 @@ COMMONOBJS = \
|
|||||||
|
|
||||||
|
|
||||||
OS2OBJS = \
|
OS2OBJS = \
|
||||||
..\os2\$D\accel.obj \
|
|
||||||
..\os2\$D\app.obj \
|
|
||||||
..\os2\$D\bitmap.obj \
|
|
||||||
..\os2\$D\bmpbuttn.obj \
|
|
||||||
..\os2\$D\brush.obj \
|
|
||||||
..\os2\$D\button.obj \
|
|
||||||
..\os2\$D\checkbox.obj \
|
|
||||||
..\os2\$D\checklst.obj \
|
|
||||||
..\os2\$D\choice.obj \
|
|
||||||
..\os2\$D\clipbrd.obj \
|
|
||||||
..\os2\$D\dcprint.obj \
|
|
||||||
..\os2\$D\dcscreen.obj \
|
|
||||||
..\os2\$D\dde.obj \
|
|
||||||
..\os2\$D\dialog.obj \
|
|
||||||
..\os2\$D\dib.obj \
|
|
||||||
..\os2\$D\dibutils.obj \
|
|
||||||
..\os2\$D\dirdlg.obj \
|
|
||||||
..\os2\$D\filedlg.obj \
|
|
||||||
..\os2\$D\font.obj \
|
|
||||||
..\os2\$D\fontdlg.obj \
|
|
||||||
..\os2\$D\frame.obj \
|
|
||||||
..\os2\$D\gauge.obj \
|
|
||||||
..\os2\$D\gdiobj.obj \
|
|
||||||
..\os2\$D\helpwin.obj \
|
|
||||||
..\os2\$D\icon.obj \
|
|
||||||
..\os2\$D\iniconf.obj \
|
|
||||||
..\os2\$D\joystick.obj \
|
|
||||||
..\os2\$D\imaglist.obj \
|
|
||||||
..\os2\$D\listbox.obj \
|
|
||||||
..\os2\$D\listctrl.obj \
|
|
||||||
..\os2\$D\main.obj \
|
|
||||||
..\os2\$D\mdi.obj \
|
|
||||||
..\os2\$D\menu.obj \
|
|
||||||
..\os2\$D\menuitem.obj \
|
|
||||||
..\os2\$D\metafile.obj \
|
|
||||||
..\os2\$D\minifram.obj \
|
|
||||||
..\os2\$D\msgdlg.obj \
|
|
||||||
..\os2\$D\nativdlg.obj \
|
|
||||||
..\os2\$D\notebook.obj \
|
|
||||||
..\os2\$D\ownerdrw.obj \
|
|
||||||
..\os2\$D\palette.obj \
|
|
||||||
..\os2\$D\pen.obj \
|
|
||||||
..\os2\$D\penwin.obj \
|
|
||||||
..\os2\$D\pnghand.obj \
|
|
||||||
..\os2\$D\printdlg.obj \
|
|
||||||
..\os2\$D\printwin.obj \
|
|
||||||
..\os2\$D\radiobox.obj \
|
|
||||||
..\os2\$D\radiobut.obj \
|
|
||||||
..\os2\$D\region.obj \
|
|
||||||
..\os2\$D\registry.obj \
|
|
||||||
..\os2\$D\regconf.obj \
|
|
||||||
..\os2\$D\scrolbar.obj \
|
|
||||||
..\os2\$D\settings.obj \
|
|
||||||
..\os2\$D\slidrmsw.obj \
|
|
||||||
..\os2\$D\slider95.obj \
|
|
||||||
..\os2\$D\spinbutt.obj \
|
|
||||||
..\os2\$D\statbmp.obj \
|
|
||||||
..\os2\$D\statbox.obj \
|
|
||||||
..\os2\$D\statusbr.obj \
|
|
||||||
..\os2\$D\stattext.obj \
|
|
||||||
..\os2\$D\tabctrl.obj \
|
|
||||||
..\os2\$D\taskbar.obj \
|
|
||||||
..\os2\$D\tbarmsw.obj \
|
|
||||||
..\os2\$D\textctrl.obj \
|
|
||||||
..\os2\$D\thread.obj \
|
|
||||||
..\os2\$D\timer.obj \
|
|
||||||
..\os2\$D\toolbar.obj \
|
|
||||||
..\os2\$D\tooltip.obj \
|
|
||||||
..\os2\$D\treectrl.obj \
|
|
||||||
..\os2\$D\utils.obj \
|
|
||||||
..\os2\$D\utilsexc.obj \
|
|
||||||
..\os2\$D\wave.obj \
|
|
||||||
..\os2\$D\window.obj \
|
..\os2\$D\window.obj \
|
||||||
..\os2\$D\xpmhand.obj \
|
|
||||||
|
|
||||||
HTMLOBJS = \
|
HTMLOBJS = \
|
||||||
..\html\$D\htmlcell.obj \
|
..\html\$D\htmlcell.obj \
|
||||||
|
Reference in New Issue
Block a user