use wx/crt.h as the 'official' header for wxCRT wrappers instead of wxchar.h; add comments explaining that users should include wx/crt.h to implementation headers

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-06-11 06:08:13 +00:00
parent b724bafee0
commit 3a3dde0d44
16 changed files with 29 additions and 21 deletions

View File

@@ -11,6 +11,11 @@
#ifndef _WX_CRT_H_
#define _WX_CRT_H_
#include "wx/wxchar.h"
// include wxChar type definition:
#include "wx/chartype.h"
// and wrappers for CRT functions:
#include "wx/wxcrt.h"
#include "wx/wxcrtvararg.h"
#endif // _WX_CRT_H_

View File

@@ -3094,11 +3094,11 @@ wxStringIteratorNode::~wxStringIteratorNode()
#endif // wxUSE_UNICODE_UTF8
#if WXWIN_COMPATIBILITY_2_8
// lot of code out there doesn't explicitly include wx/wxchar.h, but uses
// lot of code out there doesn't explicitly include wx/crt.h, but uses
// CRT wrappers that are now declared in wx/wxcrt.h and wx/wxcrtvararg.h,
// so let's include this header now that wxString is defined and it's safe
// to do it:
#include "wx/wxchar.h"
#include "wx/crt.h"
#endif
#endif // _WX_WXSTRING_H_

View File

@@ -12,11 +12,8 @@
#ifndef _WX_WXCHAR_H_
#define _WX_WXCHAR_H_
// include wxChar type definition:
#include "wx/chartype.h"
// and wrappers for CRT functions:
#include "wx/wxcrt.h"
#include "wx/wxcrtvararg.h"
// This header used to define CRT functions wrappers in wxWidgets 2.8. This is
// now done in (headers included by) wx/crt.h, so include it for compatibility:
#include "wx/crt.h"
#endif /* _WX_WXCHAR_H_ */

View File

@@ -13,6 +13,9 @@
#ifndef _WX_WXCRT_H_
#define _WX_WXCRT_H_
// NB: User code should include wx/crt.h instead of including this
// header directly.
#include "wx/wxcrtbase.h"
#include "wx/string.h"

View File

@@ -13,6 +13,9 @@
#ifndef _WX_WXCRTVARARG_H_
#define _WX_WXCRTVARARG_H_
// NB: User code should include wx/crt.h instead of including this
// header directly.
#include "wx/wxcrt.h"
#include "wx/strvararg.h"

View File

@@ -43,7 +43,7 @@
#endif
#include "wx/filefn.h"
#include "wx/wxchar.h"
#include "wx/crt.h"
#include <stdio.h>
#include <string.h>

View File

@@ -42,7 +42,7 @@
#include "wx/msgout.h"
#include "wx/textfile.h"
#include "wx/thread.h"
#include "wx/wxchar.h"
#include "wx/crt.h"
// other standard headers
#ifndef __WXWINCE__

View File

@@ -20,7 +20,7 @@
#pragma hdrstop
#endif
#include "wx/wxchar.h"
#include "wx/crt.h"
#define _ISOC9X_SOURCE 1 // to get vsscanf()
#define _BSD_SOURCE 1 // to still get strdup()
@@ -90,7 +90,7 @@ size_t WXDLLEXPORT wxMB2WC(wchar_t *buf, const char *psz, size_t n)
// to just get the size of the needed buffer -- this is needed as otherwise
// we have no idea about how much space we need and if the CRT doesn't
// support it (the only currently known example being Metrowerks, see
// wx/wxchar.h) we don't use its mbstowcs() at all
// wx/crt.h) we don't use its mbstowcs() at all
#ifdef HAVE_WCSRTOMBS
return mbsrtowcs((wchar_t *) NULL, &psz, 0, &mbstate);
#else

View File

@@ -20,7 +20,7 @@
#pragma hdrstop
#endif
#include "wx/wxchar.h"
#include "wx/crt.h"
#include <string.h>

View File

@@ -20,7 +20,7 @@
#ifndef WX_PRECOMP
#include <stdio.h>
#include "wx/wxchar.h"
#include "wx/crt.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/listbox.h"

View File

@@ -28,7 +28,7 @@
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/wxchar.h"
#include "wx/crt.h"
#include "wx/dcclient.h"
#include "wx/frame.h"
#include "wx/textctrl.h"

View File

@@ -40,7 +40,7 @@
#include "wx/dialog.h"
#include "wx/msgdlg.h"
#include "wx/intl.h"
#include "wx/wxchar.h"
#include "wx/crt.h"
#include "wx/log.h"
#include "wx/module.h"
#endif

View File

@@ -28,7 +28,7 @@
#include "wx/dialog.h"
#include "wx/msgdlg.h"
#include "wx/intl.h"
#include "wx/wxchar.h"
#include "wx/crt.h"
#include "wx/log.h"
#include "wx/module.h"
#endif

View File

@@ -18,7 +18,7 @@
#ifndef WX_PRECOMP
#include <stdio.h>
#include "wx/wxchar.h"
#include "wx/crt.h"
#include "wx/string.h"
#include "wx/bitmap.h"
#include "wx/brush.h"

View File

@@ -39,7 +39,7 @@
#include "wx/dialog.h"
#include "wx/msgdlg.h"
#include "wx/intl.h"
#include "wx/wxchar.h"
#include "wx/crt.h"
#include "wx/log.h"
#include "wx/module.h"
#endif

View File

@@ -29,7 +29,7 @@
#include "wx/filefn.h"
#include "wx/ffile.h"
#include "wx/process.h"
#include "wx/wxchar.h"
#include "wx/crt.h"
#include <stdlib.h>