Mercurial > mplayer.hg
comparison gui/win32/widgetrender.c @ 36988:c9ccf9b4a43b
Use strlower() and strupper() in TranslateFilename().
This simplifies the code.
author | ib |
---|---|
date | Thu, 27 Mar 2014 02:22:17 +0000 |
parents | 3f3a415d605b |
children | d3dc725d4c89 |
comparison
equal
deleted
inserted
replaced
36987:b33ff300128e | 36988:c9ccf9b4a43b |
---|---|
196 | 196 |
197 av_strlcpy(fname, MSGTR_GUI_MSG_NoMediaOpened, maxlen); | 197 av_strlcpy(fname, MSGTR_GUI_MSG_NoMediaOpened, maxlen); |
198 break; | 198 break; |
199 } | 199 } |
200 | 200 |
201 if (how) | 201 if (how == 1) strlower(fname); |
202 { | 202 if (how == 2) strupper(fname); |
203 p = fname; | |
204 | |
205 while (*p) | |
206 { | |
207 char t = 0; | |
208 | |
209 if (how == 1 && *p >= 'A' && *p <= 'Z') t = 32; | |
210 if (how == 2 && *p >= 'a' && *p <= 'z') t = -32; | |
211 | |
212 *p = *p + t; | |
213 p++; | |
214 } | |
215 } | |
216 | 203 |
217 return fname; | 204 return fname; |
218 } | 205 } |
219 | 206 |
220 /* replaces the chars with special meaning with the associated data from the player info struct */ | 207 /* replaces the chars with special meaning with the associated data from the player info struct */ |