/trunk/telegraphics_common/tt/str.c |
---|
166,3 → 166,24 |
return str1; |
} |
*/ |
void strcpy_win_replace_ampersand(char* dst, char* src) { |
size_t i; |
for (i = 0; i < strlen(src); i++) { |
#ifdef WIN_ENV |
// & needs to be replaced to && in: |
// - Labels (SETCTLTEXT) |
// - Menu items (i.e. PIPL) |
// It is not required in: |
// - Filedialog FileName |
// - MessageBox title or content |
// - Window titles |
// - Input boxes, e.g. import+export of an existing filter |
if (src[i] == '&') { |
*dst++ = src[i]; |
} |
#endif |
* dst++ = src[i]; |
} |
*dst++ = '\0'; |
} |
/trunk/telegraphics_common/tt/str.h |
---|
67,4 → 67,6 |
/* in-place conversion from Pascal to C string */ |
//#define INPLACEP2CSTR(s) ((s)[*(s)+1] = 0,(char*)(s)+1) |
void strcpy_win_replace_ampersand(char* dst, char* src); |
#endif |