X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f03fc89fff2d6e823e7d4d14fbe14822ad6777b1..58c7cd12b9035450e702d36dfdce63bfd008bcd0:/src/common/utilscmn.cpp?ds=sidebyside diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 3fe071d7b3..1dffad113c 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -168,6 +168,12 @@ int strncasecmp(const char *str_1, const char *str_2, size_t maxchar) #endif #else + +#ifdef __EMX__ +#define strcasecmp stricmp +#define strncasecmp strnicmp +#endif + // This declaration is missing in SunOS! // (Yes, I know it is NOT ANSI-C but its in BSD libc) #if defined(__xlC) || defined(__AIX__) || defined(__GNUG__) @@ -355,6 +361,16 @@ StringMatch (char *str1, char *str2, bool subString, bool exact) return FALSE; } +// Don't synthesize KeyUp events holding down a key and producing +// KeyDown events with autorepeat. On by default and always on +// on in wxMSW. wxGTK version in utilsgtk.cpp. +#ifndef __WXGTK__ +bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) ) +{ + return TRUE; // detectable auto-repeat is the only mode MSW supports +} +#endif + // Return the current date/time // [volatile] wxString wxNow( void ) @@ -782,6 +798,7 @@ int wxMessageBox(const wxString& message, const wxString& caption, long style, return ans; } +#if wxUSE_TEXTDLG wxString wxGetTextFromUser(const wxString& message, const wxString& caption, const wxString& defaultValue, wxWindow *parent, int x, int y, bool WXUNUSED(centre) ) @@ -792,6 +809,7 @@ wxString wxGetTextFromUser(const wxString& message, const wxString& caption, else return wxString(""); } +#endif // wxUSE_TEXTDLG #ifdef __MWERKS__ char *strdup(const char *s) @@ -883,3 +901,18 @@ wxString wxGetHostName() return buf; } +wxString wxGetFullHostName() +{ + static const size_t hostnameSize = 257; + + wxString buf; + bool ok = wxGetFullHostName(buf.GetWriteBuf(hostnameSize), hostnameSize); + + buf.UngetWriteBuf(); + + if ( !ok ) + buf.Empty(); + + return buf; +} +