reduce warning and notes

git-svn-id: trunk@14101 -
This commit is contained in:
paul 2008-02-12 05:59:51 +00:00
parent 3d9b5dd465
commit 47fb1d410c
4 changed files with 16 additions and 5 deletions

View File

@ -75,8 +75,10 @@ end;
function TWin32MemoStrings.Get(Index: Integer): string;
var
len: Integer;
{$ifdef WindowsUnicodeSupport}
WideBuffer: WideString;
AnsiBuffer: string;
{$endif WindowsUnicodeSupport}
begin
len := GetLineLength(Index);

View File

@ -358,11 +358,13 @@ var
FileName: string;
InitialDir: String;
FileNameBuffer: PChar;
{$ifdef WindowsUnicodeSupport}
FileNameWide: WideString;
FileNameWideBuffer: PWideChar;
FileNameBufferSize: Integer;
FilterBuffer: WideString;
TitleBuffer: WideString;
{$endif WindowsUnicodeSupport}
begin
{$ifdef WindowsUnicodeSupport}
if UnicodeEnabledOS then
@ -476,7 +478,9 @@ var
var
I: integer;
pName: PChar;
{$ifdef WindowsUnicodeSupport}
PWideName: PWideChar;
{$endif WindowsUnicodeSupport}
begin
{$ifdef WindowsUnicodeSupport}
if UnicodeEnabledOS then

View File

@ -201,8 +201,10 @@ var
oldFont: HFONT;
newFont: HFONT;
tmpRect: Windows.RECT;
{$ifdef WindowsUnicodeSupport}
AnsiBuffer: ansistring;
WideBuffer: widestring;
{$endif WindowsUnicodeSupport}
begin
FillChar(tmpRect, SizeOf(tmpRect), 0);
newFont := getMenuItemFont(aDecoration);
@ -410,7 +412,6 @@ procedure DrawMenuItemText(const aMenuItem: TMenuItem; const aHDC: HDC; aRect: W
var
crText: COLORREF;
crBkgnd: COLORREF;
TmpLength: integer;
TmpHeight: integer;
oldFont: HFONT;
newFont: HFONT;
@ -420,8 +421,10 @@ var
IsRightToLeft: Boolean;
etoFlags: Cardinal;
dtFlags: Word;
{$ifdef WindowsUnicodeSupport}
AnsiBuffer: ansistring;
WideBuffer: widestring;
{$endif WindowsUnicodeSupport}
begin
crText := TextColorMenu(aSelected, aMenuItem.Enabled);
crBkgnd := BackgroundColorMenu(aSelected, aMenuItem.IsInMenuBar);
@ -446,7 +449,6 @@ begin
end;
ExtTextOut(aHDC, 0, 0, etoFlags, @aRect, PChar(''), 0, nil);
TmpLength := aRect.right - aRect.left;
TmpHeight := aRect.bottom - aRect.top;
{$ifdef WindowsUnicodeSupport}

View File

@ -355,9 +355,12 @@ begin
end;
function ConvertEncoding(const s, FromEncoding, ToEncoding: string): string;
var AFrom,ATo:string;
SL:TStringList;
FN1,FN2:string;
var
AFrom, ATo: String;
{$ifdef Unix}
SL: TStringList;
FN1, FN2: String;
{$endif}
begin
Result:=s;
AFrom:=LowerCase(FromEncoding);