Rev 495 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 495 | Rev 512 | ||
---|---|---|---|
Line 164... | Line 164... | ||
164 | memcpy(str1+1+str1[0],s2,n); |
164 | memcpy(str1+1+str1[0],s2,n); |
165 | str1[0] += (unsigned char)n; |
165 | str1[0] += (unsigned char)n; |
166 | return str1; |
166 | return str1; |
167 | } |
167 | } |
168 | */ |
168 | */ |
- | 169 | ||
- | 170 | void strcpy_win_replace_ampersand(char* dst, char* src) { |
|
- | 171 | size_t i; |
|
- | 172 | for (i = 0; i < strlen(src); i++) { |
|
- | 173 | #ifdef WIN_ENV |
|
- | 174 | // & needs to be replaced to && in: |
|
- | 175 | // - Labels (SETCTLTEXT) |
|
- | 176 | // - Menu items (i.e. PIPL) |
|
- | 177 | // It is not required in: |
|
- | 178 | // - Filedialog FileName |
|
- | 179 | // - MessageBox title or content |
|
- | 180 | // - Window titles |
|
- | 181 | // - Input boxes, e.g. import+export of an existing filter |
|
- | 182 | if (src[i] == '&') { |
|
- | 183 | *dst++ = src[i]; |
|
- | 184 | } |
|
- | 185 | #endif |
|
- | 186 | * dst++ = src[i]; |
|
- | 187 | } |
|
- | 188 | *dst++ = '\0'; |
|
- | 189 | } |
|
169 | 190 |