]>
git.saurik.com Git - wxWidgets.git/blob - src/msw/wince/crt.cpp
87f781002f08fafb647ab1cad6dafd78f9556544
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/msw/wince/crt.cpp
3 // Purpose: Implementation of CRT functions missing under Windows CE
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
22 #include "wx/msw/wince/missing.h"
25 bsearch(const void *key
, const void *base
, size_t num
, size_t size
,
26 int (wxCMPFUNC_CONV
*cmp
)(const void *, const void *))
31 char *lo
= (char *)base
;
32 char *hi
= lo
+ num
*size
;
35 mid
= lo
+ (hi
- lo
)/2;
37 res
= (*cmp
)(key
, mid
);
54 name
= wxTheApp
->GetAppDisplayName();
56 name
= L
"wxWidgets Application";
58 MessageBox(NULL
, L
"Abnormal program termination", name
, MB_ICONHAND
| MB_OK
);
65 char *getenv(const char * WXUNUSED(name
))
67 // no way to implement it in Unicode-only environment without using
68 // wxCharBuffer and it is of no use in C code which uses this function
73 int wxCRT_Rename(const wchar_t *src
, const wchar_t *dst
)
75 return ::MoveFile(src
, dst
) ? 0 : -1;
78 int wxCRT_Remove(const wchar_t *path
)
80 return ::DeleteFile(path
) ? 0 : -1;