Jim Park's Unicode NSIS merging - Step 1 : switch to TCHARs where relevant.

Compiler output is identical before & after this step

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/branches/wizou@6036 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
wizou 2010-03-24 17:22:56 +00:00
parent 4e48722b63
commit 752d7d239a
209 changed files with 9698 additions and 7658 deletions

View file

@ -1,3 +1,5 @@
// Unicode support by Jim Park -- 08/24/2007
#include <windows.h>
#include <nsis/pluginapi.h> // nsis plugin
@ -8,12 +10,12 @@
extern struct nsDialog g_dialog;
static int NSDFUNC ConvertPlacement(char *str, int total, int height)
static int NSDFUNC ConvertPlacement(TCHAR *str, int total, int height)
{
char unit = *CharPrev(str, str + lstrlen(str));
TCHAR unit = *CharPrev(str, str + lstrlen(str));
int x = myatoi(str);
if (unit == '%')
if (unit == _T('%'))
{
if (x < 0)
{
@ -22,7 +24,7 @@ static int NSDFUNC ConvertPlacement(char *str, int total, int height)
return MulDiv(total, x, 100);
}
else if (unit == 'u')
else if (unit == _T('u'))
{
RECT r;
@ -50,7 +52,7 @@ int NSDFUNC PopPlacement(int *x, int *y, int *width, int *height)
RECT dialogRect;
int dialogWidth;
int dialogHeight;
char buf[1024];
TCHAR buf[1024];
GetClientRect(g_dialog.hwDialog, &dialogRect);
dialogWidth = dialogRect.right;