]> git.saurik.com Git - wxWidgets.git/commitdiff
Unicode-mode typos in string.cpp (where did they suddenly come from?)
authorOve Kaaven <ovek@arcticnet.no>
Tue, 13 Apr 1999 07:38:23 +0000 (07:38 +0000)
committerOve Kaaven <ovek@arcticnet.no>
Tue, 13 Apr 1999 07:38:23 +0000 (07:38 +0000)
More Unicode-build conversion.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/object.cpp
src/common/prntbase.cpp
src/common/string.cpp

index 8c1f4febb784b72dcd4e3cbbdd824a126a73a9f0..ec127bd3ae5a83b0fd1fd9034ac61c6b2421f326 100644 (file)
@@ -45,7 +45,7 @@
 #endif
 
 #if !USE_SHARED_LIBRARY
-wxClassInfo wxObject::sm_classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL);
+wxClassInfo wxObject::sm_classwxObject((wxChar *) _T("wxObject"), (wxChar *) NULL, (wxChar *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL);
 wxClassInfo* wxClassInfo::sm_first = (wxClassInfo *) NULL;
 wxHashTable* wxClassInfo::sm_classTable = (wxHashTable*) NULL;
 #endif
@@ -140,7 +140,7 @@ void wxObject::operator delete[] (void * buf)
  * Class info: provides run-time class type information.
  */
 
-wxClassInfo::wxClassInfo(char *cName, char *baseName1, char *baseName2, int sz, wxObjectConstructorFn constr)
+wxClassInfo::wxClassInfo(wxChar *cName, wxChar *baseName1, wxChar *baseName2, int sz, wxObjectConstructorFn constr)
 {
     m_className = cName;
     m_baseClassName1 = baseName1;
@@ -164,12 +164,12 @@ wxObject *wxClassInfo::CreateObject()
         return (wxObject *) NULL;
 }
 
-wxClassInfo *wxClassInfo::FindClass(char *c)
+wxClassInfo *wxClassInfo::FindClass(wxChar *c)
 {
     wxClassInfo *p = sm_first;
     while (p)
     {
-        if (p && p->GetClassName() && strcmp(p->GetClassName(), c) == 0)
+        if (p && p->GetClassName() && wxStrcmp(p->GetClassName(), c) == 0)
             return p;
         p = p->m_next;
     }
@@ -238,7 +238,7 @@ void wxClassInfo::CleanUpClasses()
     wxClassInfo::sm_classTable = NULL;
 }
 
-wxObject *wxCreateDynamicObject(const char *name)
+wxObject *wxCreateDynamicObject(const wxChar *name)
 {
     if (wxClassInfo::sm_classTable)
     {
@@ -253,7 +253,7 @@ wxObject *wxCreateDynamicObject(const char *name)
         wxClassInfo *info = wxClassInfo::sm_first;
         while (info)
         {
-            if (info->m_className && strcmp(info->m_className, name) == 0)
+            if (info->m_className && wxStrcmp(info->m_className, name) == 0)
                 return info->CreateObject();
             info = info->m_next;
         }
index 8ec6302cbda08658f10ee77ed3c1e1d98b3dc45b..397bc460d150d6a8b7f8f6d44c55e5dd25eae092 100644 (file)
@@ -398,12 +398,12 @@ void wxPreviewControlBar::SetZoomControl(int zoom)
 
 int wxPreviewControlBar::GetZoomControl()
 {
-    char buf[20];
+    wxChar buf[20];
     if (m_zoomControl && (m_zoomControl->GetStringSelection() != ""))
     {
-        strcpy(buf, m_zoomControl->GetStringSelection());
-        buf[strlen(buf) - 1] = 0;
-        return (int)atoi(buf);
+        wxStrcpy(buf, m_zoomControl->GetStringSelection());
+        buf[wxStrlen(buf) - 1] = 0;
+        return (int)wxAtoi(buf);
     }
     else return 0;
 }
@@ -688,11 +688,11 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
 
     memoryDC.SelectObject(wxNullBitmap);
 
-    char buf[200];
+    wxChar buf[200];
     if (m_maxPage != 0)
-        sprintf(buf, _("Page %d of %d"), pageNum, m_maxPage);
+        wxSprintf(buf, _("Page %d of %d"), pageNum, m_maxPage);
     else
-        sprintf(buf, _("Page %d"), pageNum);
+        wxSprintf(buf, _("Page %d"), pageNum);
 
     if (m_previewFrame)
         m_previewFrame->SetStatusText(buf);
index 1009dc8ec4acf2f53a29ea2fbb493111dd6d5fd2..3a74e249914e2e2d5d3d34e8d6b0ac8630b0e6f6 100644 (file)
@@ -253,7 +253,7 @@ wxString::wxString(const void *pStart, const void *pEnd)
 #if wxUSE_UNICODE
 
 // from multibyte string
-wxString::wxString(const char *psz, wxMBConvv& conv, size_t nLength)
+wxString::wxString(const char *psz, wxMBConv& conv, size_t nLength)
 {
   // first get necessary size
 
@@ -1166,7 +1166,7 @@ int wxString::PrintfV(const wxChar* pszFormat, va_list argptr)
            char *val = va_arg(argptr, char *);
 #if wxUSE_UNICODE
            // ASCII->Unicode constructor handles max_width right
-           wxString s(val, max_width);
+           wxString s(val, wxConv_libc, max_width);
 #else
            size_t len = wxSTRING_MAXLEN;
            if (val) {
@@ -1667,7 +1667,7 @@ void wxArrayString::Insert(const wxString& str, size_t nIndex)
 {
   wxASSERT( str.GetStringData()->IsValid() );
 
-  wxCHECK_RET( nIndex <= m_nCount, ("bad index in wxArrayString::Insert") );
+  wxCHECK_RET( nIndex <= m_nCount, _("bad index in wxArrayString::Insert") );
 
   Grow();