Mercurial > mplayer.hg
changeset 36988:c9ccf9b4a43b
Use strlower() and strupper() in TranslateFilename().
This simplifies the code.
author | ib |
---|---|
date | Thu, 27 Mar 2014 02:22:17 +0000 |
parents | b33ff300128e |
children | 0b80003f6542 |
files | gui/ui/render.c gui/win32/widgetrender.c |
diffstat | 2 files changed, 6 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/ui/render.c Thu Mar 27 02:18:16 2014 +0000 +++ b/gui/ui/render.c Thu Mar 27 02:22:17 2014 +0000 @@ -120,21 +120,10 @@ break; } - if (how) { - p = fname; - - while (*p) { - char t = 0; - - if (how == 1 && *p >= 'A' && *p <= 'Z') - t = 32; - if (how == 2 && *p >= 'a' && *p <= 'z') - t = -32; - - *p = *p + t; - p++; - } - } + if (how == 1) + strlower(fname); + if (how == 2) + strupper(fname); return fname; }
--- a/gui/win32/widgetrender.c Thu Mar 27 02:18:16 2014 +0000 +++ b/gui/win32/widgetrender.c Thu Mar 27 02:22:17 2014 +0000 @@ -198,21 +198,8 @@ break; } - if (how) - { - p = fname; - - while (*p) - { - char t = 0; - - if (how == 1 && *p >= 'A' && *p <= 'Z') t = 32; - if (how == 2 && *p >= 'a' && *p <= 'z') t = -32; - - *p = *p + t; - p++; - } - } + if (how == 1) strlower(fname); + if (how == 2) strupper(fname); return fname; }