equal
deleted
inserted
replaced
1 #include <iostream> |
|
2 #include <wx/wxprec.h> |
|
3 #include <wx/wx.h> |
|
4 #include <wx/textctrl.h> |
|
5 #include <iostream> |
|
6 #include "tools.h" |
|
7 |
|
8 void IntToString( int i, char* in_pszbuffer ) |
|
9 { |
|
10 // permet de copier un int dans la chaƮne buffer |
|
11 sprintf( in_pszbuffer, "%d", i); |
|
12 } |
|
13 |
|
14 char *wxstr_to_charbuf(wxString s) |
|
15 { |
|
16 int i = 0; |
|
17 char *str = NULL; |
|
18 |
|
19 str = (char*) malloc((s.Length() + 1) * sizeof(char)); |
|
20 for(i=0; i<s.Length(); i++) |
|
21 { |
|
22 str[i] = s.GetChar(i); |
|
23 } |
|
24 str[s.Length()] = '\0'; |
|
25 return(str); |
|
26 } |
|
27 |
|
28 void charbuf_free(char *s) |
|
29 { |
|
30 free(s); |
|
31 } |
|