if (afmFile==NULL)
{
- wxLogDebug( "GetTextExtent: can't open AFM file '%s'\n", afmName );
- wxLogDebug( " using approximate values\n");
+ wxLogDebug( wxT("GetTextExtent: can't open AFM file '%hs'\n"), afmName );
+ wxLogDebug( wxT(" using approximate values\n"));
for (int i=0; i<256; i++) lastWidths[i] = 500; /* an approximate value */
lastDescender = -150; /* dito. */
}
if ((sscanf(line,"%s%d",descString,&lastDescender)!=2) ||
(strcmp(descString,"Descender")!=0))
{
- wxLogDebug( "AFM-file '%s': line '%s' has error (bad descender)\n", afmName,line );
+ wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad descender)\n"), afmName,line );
}
}
/* JC 1.) check for UnderlinePosition */
if ((sscanf(line,"%s%lf",upString,&UnderlinePosition)!=2) ||
(strcmp(upString,"UnderlinePosition")!=0))
{
- wxLogDebug( "AFM-file '%s': line '%s' has error (bad UnderlinePosition)\n", afmName, line );
+ wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad UnderlinePosition)\n"), afmName, line );
}
}
/* JC 2.) check for UnderlineThickness */
if ((sscanf(line,"%s%lf",utString,&UnderlineThickness)!=2) ||
(strcmp(utString,"UnderlineThickness")!=0))
{
- wxLogDebug( "AFM-file '%s': line '%s' has error (bad UnderlineThickness)\n", afmName, line );
+ wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad UnderlineThickness)\n"), afmName, line );
}
}
/* JC 3.) check for EncodingScheme */
if ((sscanf(line,"%s%s",utString,encString)!=2) ||
(strcmp(utString,"EncodingScheme")!=0))
{
- wxLogDebug("AFM-file '%s': line '%s' has error (bad EncodingScheme)\n", afmName, line );
+ wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad EncodingScheme)\n"), afmName, line );
}
else if (strncmp(encString, "AdobeStandardEncoding", 21))
{
- wxLogDebug( "AFM-file '%s': line '%s' has error (unsupported EncodingScheme %s)\n",
+ wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (unsupported EncodingScheme %hs)\n"),
afmName,line, encString);
}
}
{
if (sscanf(line,"%s%d%s%s%d",cString,&ascii,semiString,WXString,&cWidth)!=5)
{
- wxLogDebug("AFM-file '%s': line '%s' has an error (bad character width)\n",afmName,line);
+ wxLogDebug(wxT("AFM-file '%hs': line '%hs' has an error (bad character width)\n"),afmName,line);
}
if(strcmp(cString,"C")!=0 || strcmp(semiString,";")!=0 || strcmp(WXString,"WX")!=0)
{
- wxLogDebug("AFM-file '%s': line '%s' has a format error\n",afmName,line);
+ wxLogDebug(wxT("AFM-file '%hs': line '%hs' has a format error\n"),afmName,line);
}
/* printf(" char '%c'=%d has width '%d'\n",ascii,ascii,cWidth); */
if (ascii>=0 && ascii<256)
double widthSum=0;
wxCoord height=Size; /* by default */
unsigned char *p;
- for(p=(unsigned char *)strbuf; *p; p++)
+ for(p=(unsigned char *)wxMBSTRINGCAST strbuf; *p; p++)
{
if(lastWidths[*p]== INT_MIN)
{
- wxLogDebug("GetTextExtent: undefined width for character '%c' (%d)\n", *p,*p);
+ wxLogDebug(wxT("GetTextExtent: undefined width for character '%hc' (%d)\n"), *p,*p);
widthSum += /*(wxCoord)*/(lastWidths[' ']/1000.0F * Size); /* assume space */
}
else
do {
new_name = wxT("NewName");
wxString num;
- num.Printf( "%d", i );
+ num.Printf( wxT("%d"), i );
new_name += num;
path = data->m_path;
if (fd2->GetName() == wxT("..")) return 1;
if (fd1->IsDir() && !fd2->IsDir()) return -1;
if (fd2->IsDir() && !fd1->IsDir()) return 1;
- return strcmp( fd1->GetName(), fd2->GetName() );
+ return wxStrcmp( fd1->GetName(), fd2->GetName() );
}
//-----------------------------------------------------------------------------
m_fileName = fname;
struct stat buff;
- stat( m_fileName.GetData(), &buff );
+ stat( m_fileName.fn_str(), &buff );
struct stat lbuff;
- lstat( m_fileName.GetData(), &lbuff );
+ lstat( m_fileName.fn_str(), &lbuff );
struct tm *t = localtime( &lbuff.st_mtime );
// struct passwd *user = getpwuid( buff.st_uid );
m_day = t->tm_mday;
m_year = t->tm_year;
- m_permissions.sprintf( "%c%c%c",
- ((( buff.st_mode & S_IRUSR ) == S_IRUSR ) ? 'r' : '-'),
- ((( buff.st_mode & S_IWUSR ) == S_IWUSR ) ? 'w' : '-'),
- ((( buff.st_mode & S_IXUSR ) == S_IXUSR ) ? 'x' : '-') );
+ m_permissions.sprintf( wxT("%c%c%c"),
+ ((( buff.st_mode & S_IRUSR ) == S_IRUSR ) ? wxT('r') : wxT('-')),
+ ((( buff.st_mode & S_IWUSR ) == S_IWUSR ) ? wxT('w') : wxT('-')),
+ ((( buff.st_mode & S_IXUSR ) == S_IXUSR ) ? wxT('x') : wxT('-')) );
}
wxString wxFileData::GetName() const
bool wxGridTableBase::InsertRows( size_t pos, size_t numRows )
{
- wxLogWarning( "Called grid table class function InsertRows(pos=%d, N=%d)\n"
- "but your derived table class does not override this function",
+ wxLogWarning( wxT("Called grid table class function InsertRows(pos=%d, N=%d)\n"
+ "but your derived table class does not override this function"),
pos, numRows );
return FALSE;
bool wxGridTableBase::AppendRows( size_t numRows )
{
- wxLogWarning( "Called grid table class function AppendRows(N=%d)\n"
- "but your derived table class does not override this function",
+ wxLogWarning( wxT("Called grid table class function AppendRows(N=%d)\n"
+ "but your derived table class does not override this function"),
numRows );
return FALSE;
bool wxGridTableBase::DeleteRows( size_t pos, size_t numRows )
{
- wxLogWarning( "Called grid table class function DeleteRows(pos=%d, N=%d)\n"
- "but your derived table class does not override this function",
+ wxLogWarning( wxT("Called grid table class function DeleteRows(pos=%d, N=%d)\n"
+ "but your derived table class does not override this function"),
pos, numRows );
return FALSE;
bool wxGridTableBase::InsertCols( size_t pos, size_t numCols )
{
- wxLogWarning( "Called grid table class function InsertCols(pos=%d, N=%d)\n"
- "but your derived table class does not override this function",
+ wxLogWarning( wxT("Called grid table class function InsertCols(pos=%d, N=%d)\n"
+ "but your derived table class does not override this function"),
pos, numCols );
return FALSE;
bool wxGridTableBase::AppendCols( size_t numCols )
{
- wxLogWarning( "Called grid table class function AppendCols(N=%d)\n"
- "but your derived table class does not override this function",
+ wxLogWarning( wxT("Called grid table class function AppendCols(N=%d)\n"
+ "but your derived table class does not override this function"),
numCols );
return FALSE;
bool wxGridTableBase::DeleteCols( size_t pos, size_t numCols )
{
- wxLogWarning( "Called grid table class function DeleteCols(pos=%d, N=%d)\n"
- "but your derived table class does not override this function",
+ wxLogWarning( wxT("Called grid table class function DeleteCols(pos=%d, N=%d)\n"
+ "but your derived table class does not override this function"),
pos, numCols );
return FALSE;
if ( pos >= curNumRows )
{
- wxLogError( "Called wxGridStringTable::DeleteRows(pos=%d, N=%d)...\n"
- "Pos value is invalid for present table with %d rows",
+ wxLogError( wxT("Called wxGridStringTable::DeleteRows(pos=%d, N=%d)...\n"
+ "Pos value is invalid for present table with %d rows"),
pos, numRows, curNumRows );
return FALSE;
}
{
// TODO: something better than this ?
//
- wxLogError( "Unable to append cols to a grid table with no rows.\n"
- "Call AppendRows() first" );
+ wxLogError( wxT("Unable to append cols to a grid table with no rows.\n"
+ "Call AppendRows() first") );
return FALSE;
}
if ( pos >= curNumCols )
{
- wxLogError( "Called wxGridStringTable::DeleteCols(pos=%d, N=%d)...\n"
- "Pos value is invalid for present table with %d cols",
+ wxLogError( wxT("Called wxGridStringTable::DeleteCols(pos=%d, N=%d)...\n"
+ "Pos value is invalid for present table with %d cols"),
pos, numCols, curNumCols );
return FALSE;
}
{
// shouldn't be here - we are going round in circles...
//
- wxLogFatalError( "wxGrid::OnKeyDown called while alread active" );
+ wxLogFatalError( wxT("wxGrid::OnKeyDown called while alread active") );
}
m_inOnKeyDown = TRUE;
{
if ( m_created )
{
- wxLogError( "wxGrid::CreateGrid(numRows, numCols) called more than once" );
+ wxLogError( wxT("wxGrid::CreateGrid(numRows, numCols) called more than once") );
return FALSE;
}
else
if ( !m_created )
{
- wxLogError( "Called wxGrid::InsertRows() before calling CreateGrid()" );
+ wxLogError( wxT("Called wxGrid::InsertRows() before calling CreateGrid()") );
return FALSE;
}
if ( !m_created )
{
- wxLogError( "Called wxGrid::AppendRows() before calling CreateGrid()" );
+ wxLogError( wxT("Called wxGrid::AppendRows() before calling CreateGrid()") );
return FALSE;
}
if ( !m_created )
{
- wxLogError( "Called wxGrid::DeleteRows() before calling CreateGrid()" );
+ wxLogError( wxT("Called wxGrid::DeleteRows() before calling CreateGrid()") );
return FALSE;
}
if ( !m_created )
{
- wxLogError( "Called wxGrid::InsertCols() before calling CreateGrid()" );
+ wxLogError( wxT("Called wxGrid::InsertCols() before calling CreateGrid()") );
return FALSE;
}
if ( !m_created )
{
- wxLogError( "Called wxGrid::AppendCols() before calling CreateGrid()" );
+ wxLogError( wxT("Called wxGrid::AppendCols() before calling CreateGrid()") );
return FALSE;
}
if ( !m_created )
{
- wxLogError( "Called wxGrid::DeleteCols() before calling CreateGrid()" );
+ wxLogError( wxT("Called wxGrid::DeleteCols() before calling CreateGrid()") );
return FALSE;
}