X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e3bf2e8cac58d01d6c6a3e486eb5482184be175b..8a31648287be0ef976f133de2786b137f1e98340:/src/msw/wince/crt.cpp diff --git a/src/msw/wince/crt.cpp b/src/msw/wince/crt.cpp index 058e7b260a..87f781002f 100644 --- a/src/msw/wince/crt.cpp +++ b/src/msw/wince/crt.cpp @@ -1,22 +1,26 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: wince/crt.cpp +// Name: src/msw/wince/crt.cpp // Purpose: Implementation of CRT functions missing under Windows CE // Author: Vadim Zeitlin // Modified by: // Created: 03.04.04 -// RCS-ID: +// RCS-ID: $Id$ // Copyright: (c) 2004 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#include "wx/msw/wince/missing.h" - #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif +#ifndef WX_PRECOMP + #include "wx/app.h" +#endif + +#include "wx/msw/wince/missing.h" + extern "C" void * bsearch(const void *key, const void *base, size_t num, size_t size, int (wxCMPFUNC_CONV *cmp)(const void *, const void *)) @@ -42,4 +46,37 @@ bsearch(const void *key, const void *base, size_t num, size_t size, return NULL; } +extern "C" +void abort() +{ + wxString name; + if ( wxTheApp ) + name = wxTheApp->GetAppDisplayName(); + if ( name.empty() ) + name = L"wxWidgets Application"; + + MessageBox(NULL, L"Abnormal program termination", name, MB_ICONHAND | MB_OK); + + _exit(3); +// ::ExitProcess(3); +} + +extern "C" +char *getenv(const char * WXUNUSED(name)) +{ + // no way to implement it in Unicode-only environment without using + // wxCharBuffer and it is of no use in C code which uses this function + // (libjpeg) + return NULL; +} + +int wxCRT_Rename(const wchar_t *src, const wchar_t *dst) +{ + return ::MoveFile(src, dst) ? 0 : -1; +} + +int wxCRT_Remove(const wchar_t *path) +{ + return ::DeleteFile(path) ? 0 : -1; +}