makes sure that the string only contains the characters between 32 and 255 + \r\n\t */
| 169 | |
| 170 | /* makes sure that the string only contains the characters between 32 and 255 + \r\n\t */ |
| 171 | void str_sanitize(char *str_in) |
| 172 | { |
| 173 | unsigned char *str = (unsigned char *)str_in; |
| 174 | while(*str) |
| 175 | { |
| 176 | if(*str < 32 && !(*str == '\r') && !(*str == '\n') && !(*str == '\t')) |
| 177 | *str = ' '; |
| 178 | str++; |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | void str_sanitize_filename(char *str_in) |
| 183 | { |