wxPuts() should output a trailing newline even in Unix/Unicode builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
8d6f95db28
commit
19b65a3033
@ -199,6 +199,13 @@ versions, please update your code to not use them.
|
||||
OTHER CHANGES
|
||||
=============
|
||||
|
||||
2.5.4
|
||||
-----
|
||||
|
||||
Unix:
|
||||
|
||||
- wxPuts() now correctly outputs trailing new line in Unicode build
|
||||
|
||||
2.5.3
|
||||
-----
|
||||
|
||||
|
@ -393,9 +393,11 @@
|
||||
#define wxNEED_UNGETC
|
||||
|
||||
#define wxNEED_FPUTS
|
||||
#define wxNEED_PUTS
|
||||
#define wxNEED_PUTC
|
||||
|
||||
int wxFputs(const wxChar *ch, FILE *stream);
|
||||
int wxPuts(const wxChar *ws);
|
||||
int wxPutc(wxChar ch, FILE *stream);
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -407,7 +409,6 @@
|
||||
#endif
|
||||
|
||||
#define wxPutchar(wch) wxPutc(wch, stdout)
|
||||
#define wxPuts(ws) wxFputs(ws, stdout)
|
||||
|
||||
#define wxNEED_PRINTF_CONVERSION
|
||||
#define wxNEED_WX_STDIO_H
|
||||
@ -498,7 +499,8 @@
|
||||
#ifdef HAVE_PUTWS
|
||||
#define wxPuts putws
|
||||
#else
|
||||
#define wxPuts(ws) wxFputs(ws, stdout)
|
||||
#define wxNEED_PUTS
|
||||
int wxPuts(const wxChar *ws)
|
||||
#endif
|
||||
|
||||
/* we need %s to %ls conversion for printf and scanf etc */
|
||||
|
@ -613,6 +613,22 @@ int wxFputs(const wchar_t *ws, FILE *stream)
|
||||
}
|
||||
#endif // wxNEED_FPUTS
|
||||
|
||||
#ifdef wxNEED_PUTS
|
||||
int wxPuts(const wxChar *ws)
|
||||
{
|
||||
int rc = wxFputs(ws, stdout);
|
||||
if ( rc != -1 )
|
||||
{
|
||||
if ( wxFputs(L"\n", stdout) == -1 )
|
||||
return -1;
|
||||
|
||||
rc++;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
#endif // wxNEED_PUTS
|
||||
|
||||
#ifdef wxNEED_PUTC
|
||||
int /* not wint_t */ wxPutc(wchar_t wc, FILE *stream)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user