--- oup/current/Code/Functions.pas 2006/12/23 16:26:43 46 +++ oup/current/Code/Functions.pas 2007/01/11 23:36:52 75 @@ -4,9 +4,6 @@ interface uses Classes, Dialogs, SysUtils, StrUtils, Math, Data; -type - TExportSet = set of (DO_dat, DO_raw, DO_convert, DO_toone); - function BoolToStr(bool: Boolean): String; function HexToLong(hex: String): LongWord; function Decode_Int(buffer: Tdata): LongWord; @@ -16,9 +13,6 @@ function Encode_Float(input: Single): Td function DataToBin(Data: Tdata): String; function BinToInt(bin: String): Byte; -function ExportFile(fileid: LongWord; filename: String; settings: TExportSet; - path: String): Integer; - function StringSmaller(string1, string2: String): Boolean; function FormatNumber(Value: LongWord; Width: Byte; leadingzeros: Char): String; @@ -218,22 +212,25 @@ end; function FormatFileSize(size: LongWord): String; +var + floatformat: TFormatSettings; begin + floatformat.DecimalSeparator := '.'; if size >= 1000 * 1024 * 1024 then begin - Result := FloatToStrF(size / 1024 / 1024 / 1024, ffFixed, 5, 1) + ' GB'; + Result := FloatToStrF(size / 1024 / 1024 / 1024, ffFixed, 5, 1, floatformat) + ' GB'; end else begin if size >= 1000 * 1024 then begin - Result := FloatToStrF(size / 1024 / 1024, ffFixed, 5, 1) + ' MB'; + Result := FloatToStrF(size / 1024 / 1024, ffFixed, 5, 1, floatformat) + ' MB'; end else begin if size >= 1000 then begin - Result := FloatToStrF(size / 1024, ffFixed, 5, 1) + ' KB'; + Result := FloatToStrF(size / 1024, ffFixed, 5, 1, floatformat) + ' KB'; end else begin @@ -323,42 +320,6 @@ end; - -function ExportFile(fileid: LongWord; filename: String; settings: TExportSet; - path: String): Integer; -var - i: Byte; - extension: String; - rawlist: TRawList; -begin - Result := export_noerror; - extension := RightStr(filename, 4); - if DO_toone in settings then - begin - ExportDatFile(fileid, path + '\' + GetWinFileName(filename)); - end - else - begin - if DO_dat in settings then - ExportDatFile(fileid, path + '\' + GetWinFileName(filename)); - if DO_raw in settings then - begin - rawlist := OniDataConnection.GetRawList(fileid); - if Length(rawlist) > 0 then - begin - for i := 0 to High(rawlist) do - begin - ExportRawFile(fileid, rawlist[i].src_offset, path + '\' + - GetWinFileName(filename)); - end; - end; - end; - end; -end; - - - - function Explode(_string: String; delimiter: Char): TStringArray; var start, len: Word;