Changeset 360
- Timestamp:
- May 7, 2012, 10:32:41 AM (13 years ago)
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/Common.pas
r343 r360 9 9 uses 10 10 StopWatch, UCommon, UDebugLog, UDelay, UPrefixMultiplier, UURI, UThreading, 11 UMemory, UResetableThread, UPool, ULastOpenedList, URegistry, 11 UMemory, UResetableThread, UPool, ULastOpenedList, URegistry, 12 12 LazarusPackageIntf; 13 13 -
Common/UCommon.pas
r358 r360 49 49 function SplitString(var Text: string; Count: Word): string; 50 50 function GetBit(Variable: QWord; Index: Byte): Boolean; 51 procedure SetBit(var Variable: QWord; Index: Byte; State: Boolean); 52 procedure SetBit(var Variable: Cardinal; Index: Byte; State: Boolean); 53 procedure SetBit(var Variable: Word; Index: Byte; State: Boolean); 51 procedure SetBit(var Variable: QWord; Index: Byte; State: Boolean); overload; 52 procedure SetBit(var Variable: Cardinal; Index: Byte; State: Boolean); overload; 53 procedure SetBit(var Variable: Word; Index: Byte; State: Boolean); overload; 54 54 function AddLeadingZeroes(const aNumber, Length : integer) : string; 55 55 function LastPos(const SubStr: String; const S: String): Integer; … … 413 413 procedure OpenFileInShell(FileName: string); 414 414 begin 415 ExecuteProgram('cmd.exe /c start ' + FileName);415 ExecuteProgram('cmd.exe /c start "' + FileName + '"'); 416 416 end; 417 417 -
CoolAudio/Systems/UAudioSystem.pas
r353 r360 322 322 NewItem.Name := Name; 323 323 NewItem.SystemClass := SystemClass; 324 NewItem.Supported := True; 324 325 Systems.Add(NewItem); 325 326 end; -
CoolStreaming/UStreamHelper.pas
r307 r360 6 6 7 7 uses 8 Classes, DateUtils, syncobjs ;8 Classes, DateUtils, syncobjs, SysUtils; 9 9 10 10 type … … 49 49 procedure ReadStream(AStream: TStream; Count: Integer); 50 50 procedure ReadStreamPart(AStream: TStream; Count: Integer); 51 function EqualTo(Source: TStream): Boolean; 51 52 function Sum: Byte; 52 53 procedure FillByte(Data: Byte; Count: Integer); … … 159 160 end; 160 161 162 function TStreamHelper.EqualTo(Source: TStream): Boolean; 163 const 164 BlockSize = 4096; 165 var 166 Buffer1: array[0..BlockSize - 1] of Byte; 167 Buffer2: array[0..BlockSize - 1] of Byte; 168 BufferLength: Integer; 169 OldPos1, OldPos2: Integer; 170 begin 171 OldPos1 := Source.Position; 172 Source.Position := 0; 173 OldPos2 := Position; 174 Position := 0; 175 Result := True; 176 if Source.Size = Size then begin 177 while Source.Position < Source.Size do begin 178 BufferLength := Source.Read(Buffer1, BlockSize); 179 Read(Buffer2, BlockSize); 180 if not CompareMem(@Buffer1, @Buffer2, BufferLength) then begin 181 Result := False; 182 Break; 183 end; 184 end; 185 end else Result := False; 186 Source.Position := OldPos1; 187 Position := OldPos2; 188 end; 189 161 190 procedure TStreamHelper.WriteStreamPart(AStream: TStream; Count: Integer); 162 191 var -
Generics/TemplateGenerics/Generic/GenericRectangle.inc
r342 r360 39 39 procedure UnionWith(Rect: TGRectangle); 40 40 41 procedure SetRect(Left, Top, Width, Height: TGRectangleDimension); 42 procedure SetBounds(Left, Top, Right, Bottom: TGRectangleDimension); 43 41 44 property Left: TGRectangleDimension read FLeft write SetLeft; 42 45 property Top: TGRectangleDimension read FTop write SetTop; … … 246 249 end; 247 250 251 procedure TGRectangle.SetRect(Left, Top, Width, Height: TGRectangleDimension); 252 begin 253 Self.Left := Left; 254 Self.Top := Top; 255 Self.Width := Width; 256 Self.Height := Height; 257 end; 258 259 procedure TGRectangle.SetBounds(Left, Top, Right, Bottom: TGRectangleDimension); 260 begin 261 Self.Left := Left; 262 Self.Top := Top; 263 Self.Right := Right; 264 Self.Bottom := Bottom; 265 end; 266 248 267 function TGRectangle.GetEmpty: Boolean; 249 268 begin
Note:
See TracChangeset
for help on using the changeset viewer.