diff --git a/src/sfs/sfsZipFS.pas b/src/sfs/sfsZipFS.pas
index 4abd880bd4d659bf2811c49c00c0b904823675a0..892dd636802cbf3e3e3edbb605a6401468064ce8 100644 (file)
--- a/src/sfs/sfsZipFS.pas
+++ b/src/sfs/sfsZipFS.pas
//
{.$DEFINE SFS_DEBUG_ZIPFS}
{.$DEFINE SFS_ZIPFS_FULL}
-{$MODE DELPHI}
-{.$R-}
+{$MODE OBJFPC}
+{$R+}
unit sfsZipFS;
interface
TSFSZipVolumeFactory = class (TSFSVolumeFactory)
public
- function IsMyVolumePrefix (const prefix: TSFSString): Boolean; override;
- function Produce (const prefix, fileName: TSFSString; st: TStream): TSFSVolume; override;
+ function IsMyVolumePrefix (const prefix: AnsiString): Boolean; override;
+ function Produce (const prefix, fileName: AnsiString; st: TStream): TSFSVolume; override;
procedure Recycle (vol: TSFSVolume); override;
end;
implementation
uses
- zstream, xstreams;
+ zstream, xstreams, utils;
type
for f := 1 to length(s0) do
begin
if f > length(s1) then begin result := f; exit; end;
- if SFSUpCase(s0[f]) <> SFSUpCase(s1[f]) then begin result := f; exit; end;
+ if UpCase1251(s0[f]) <> UpCase1251(s1[f]) then begin result := f; exit; end;
end;
result := length(s0);
end;
{ TSFSZipVolumeFactory }
-function TSFSZipVolumeFactory.IsMyVolumePrefix (const prefix: TSFSString): Boolean;
+function TSFSZipVolumeFactory.IsMyVolumePrefix (const prefix: AnsiString): Boolean;
begin
result :=
- SFSStrEqu(prefix, 'zip') or
- SFSStrEqu(prefix, 'dfwad')
+ StrEquCI1251(prefix, 'zip') or
+ StrEquCI1251(prefix, 'dfwad')
{$IFDEF SFS_ZIPFS_FULL}
- or SFSStrEqu(prefix, 'jar') or
- SFSStrEqu(prefix, 'fout2') or
- SFSStrEqu(prefix, 'vtdb') or
- SFSStrEqu(prefix, 'wad')
+ or StrEquCI1251(prefix, 'jar') or
+ StrEquCI1251(prefix, 'fout2') or
+ StrEquCI1251(prefix, 'vtdb') or
+ StrEquCI1251(prefix, 'wad')
{$ENDIF}
;
end;
vol.Free();
end;
-function TSFSZipVolumeFactory.Produce (const prefix, fileName: TSFSString; st: TStream): TSFSVolume;
+function TSFSZipVolumeFactory.Produce (const prefix, fileName: AnsiString; st: TStream): TSFSVolume;
var
vt: TSFSZipVolumeType;
begin