From 000993636f25eaa9b0d627e26ba0ab1521e843a2 Mon Sep 17 00:00:00 2001 From: unxed Date: Sun, 25 Oct 2020 19:26:00 +0300 Subject: [PATCH] big slash revolution! changed most of default slashes from '\' to '/' (not all; left some code path for windows network share paths and drive letters untouched). of course we will need some platform-dependent macro for slashes someday, but currently i am working just on working linux port --- DNStdDlg.pas | 8 +++---- DblWnd.pas | 2 +- FLTools.pas | 2 +- advance2.pas | 12 +++++------ advance7.pas | 6 +++--- arch7z.pas | 2 +- archchz.pas | 4 ++-- archdet.pas | 2 +- archha.bak | 2 +- archis3.pas | 2 +- archiver.pas | 16 +++++++------- archlha.pas | 2 +- archlim.pas | 2 +- archrar.pas | 2 +- archread.pas | 10 ++++----- archuc2.pas | 2 +- archzoo.pas | 2 +- arcview.pas | 55 ++++++++++++++++++++++++----------------------- arvid.pas | 42 ++++++++++++++++++------------------ arvidavt.pas | 60 ++++++++++++++++++++++++++-------------------------- arvidtdr.pas | 4 ++-- cmdline.pas | 2 +- diskimg.pas | 4 ++-- dn1.pas | 2 +- dnexec.pas | 2 +- dnutil.pas | 4 ++-- drives.pas | 10 ++++----- eraser.pas | 6 +++--- fbb.pas | 4 ++-- filecopy.pas | 34 ++++++++++++++--------------- filefind.pas | 33 +++++++++++++++-------------- flpanel.pas | 2 +- flpanelx.pas | 22 +++++++++---------- fviewer.pas | 2 +- highlite.pas | 2 +- histries.pas | 8 +++---- lfnvp.pas | 26 +++++++++++------------ modules.pas | 2 +- netbrwsr.pas | 6 +++--- plugrez.pas | 2 +- regexp.pas | 10 ++++----- startupp.pas | 2 +- tree.pas | 12 +++++------ ukeymap.pas | 4 ++-- usermenu.pas | 4 ++-- uucode.bak | 4 ++-- 46 files changed, 225 insertions(+), 223 deletions(-) diff --git a/DNStdDlg.pas b/DNStdDlg.pas index 47cd2bb..83d7a39 100644 --- a/DNStdDlg.pas +++ b/DNStdDlg.pas @@ -312,7 +312,7 @@ function GetCurDir: String; CurDir: String; begin lGetDir(0, CurDir); - if Length(CurDir) > 3 then CurDir:=CurDir+'\'; + if Length(CurDir) > 3 then CurDir:=CurDir+'/'; // slash change by unxed GetCurDir := CurDir; end; } @@ -346,7 +346,7 @@ procedure TFileInputLine.HandleEvent(var Event: TEvent); (State and sfSelected = 0) then begin - Dir := PSearchRec(Event.InfoPtr)^.Name+'\'; + Dir := PSearchRec(Event.InfoPtr)^.Name+'/'; // slash change by unxed if PSearchRec(Event.InfoPtr)^.Attr and Directory <> 0 then Data := Dir+ PFileDialog(Owner)^.WildCard^ @@ -711,7 +711,7 @@ function TDirectoryList.GetText(Item: LongInt; MaxLen: Integer): String; S[12] := FMSetup.RestChar[1]; end; if SR^.Name[2] <> ':' then - GetText := S+'\' + GetText := S+'/' // slash change by unxed else GetText := SR^.Name; end; @@ -1387,7 +1387,7 @@ function TFileDialog.Valid(Command: Word): Boolean; if CheckDirectory(lFName) then begin DisposeStr(Directory); - Directory := NewStr(lFName+'\'); + Directory := NewStr(lFName+'/'); // slash change by unxed DirList^.ReadDirectory(Directory^+WildCard^); FileList^.ReadDirectory(Directory^+WildCard^); if Command <> cmFileInit then diff --git a/DblWnd.pas b/DblWnd.pas index 96b707b..0531de1 100644 --- a/DblWnd.pas +++ b/DblWnd.pas @@ -825,7 +825,7 @@ procedure TDoubleWindow.HandleCommand; if S <> '' then begin if not (S[Length(S)] in ['\', '/']) then - AddStr(S, '\'); + AddStr(S, '/'); // slash change by unxed S := SquashesName(S); Message(CommandLine, evCommand, cmInsertName, @S); end; diff --git a/FLTools.pas b/FLTools.pas index 4703602..1c2a311 100644 --- a/FLTools.pas +++ b/FLTools.pas @@ -1998,7 +1998,7 @@ procedure DoRenameSingle(PF: PFileRec; const S, S2: String; DlgRes: Word); label NameErr; begin - if PosChar('\', S) <> 0 then + if PosChar('/', S) <> 0 then // slash change by unxed begin DosE := 123; // ERROR_INVALID_NAME goto NameErr; diff --git a/advance2.pas b/advance2.pas index 1924b88..68a496e 100644 --- a/advance2.pas +++ b/advance2.pas @@ -818,7 +818,7 @@ function InDirFilter; Delete(S, 1, 1); {DelFC(S);} DelLeft(S); DelRight(S); - if (S <> '') and (S[Length(S)] = '\') + if (S <> '') and (S[Length(S)] = '/') // slash change by unxed and InMask(Name, Copy(S, 1, Length(S)-1)) then Exit; @@ -1124,7 +1124,7 @@ function MakeNormName(const S, S1: String): String; if (S[i] in ['\', '/']) then MakeNormName := Copy(S, 1, i)+Copy(S1, 1, j) else - MakeNormName := Copy(S, 1, i)+'\'+Copy(S1, 1, j); + MakeNormName := Copy(S, 1, i)+'/'+Copy(S1, 1, j); // slash change by unxed end else MakeNormName := S1; @@ -1168,7 +1168,7 @@ function PathExist(s: String): Boolean; else begin S := lFExpand(S); - IsRoot := S[Length(s)] = '\'; + IsRoot := S[Length(s)] = '/'; // slash change by unxed Attr := AnyFileDir or (Directory shl 8); lFindFirst(S, Attr, SR); @@ -1195,7 +1195,7 @@ function PathExist(s: String): Boolean; begin { корень диска } delete(S, Length(s), 1); end; - S := S + '\*.*'; + S := S + '/*.*'; // slash change by unxed lFindFirst(S, Attr, SR); Result := DosError in [0, 2, 18]; FClose: @@ -1403,8 +1403,8 @@ function CompareFiles(const N1, N2: String): Boolean; procedure MakeSlash(var S: String); begin - if (S <> '') and (S[Length(S)] <> '\') then - S := S + '\'; + if (S <> '') and (S[Length(S)] <> '/') then // slash change by unxed + S := S + '/'; // slash change by unxed end; procedure MakeNoSlash(var S: String); diff --git a/advance7.pas b/advance7.pas index 7ce511e..9b194b9 100644 --- a/advance7.pas +++ b/advance7.pas @@ -70,10 +70,10 @@ function ValidLngId(LI: String; CheckForHelp: Boolean): Boolean; if S1 = '' then S1 := SourceDir; if not (S1[Length(S1)] in ['\', '/']) then - S1 := S1+'\'; + S1 := S1+'/'; // slash change by unxed S2 := StartupDir; if not (S2[Length(S2)] in ['\', '/']) then - S2 := S2+'\'; + S2 := S2+'/'; // slash change by unxed if (not CheckForHelp) and (not ExistFile(S1+LI+'.DLG')) and (not ExistFile(S2+LI+'.DLG')) then @@ -86,7 +86,7 @@ function ValidLngId(LI: String; CheckForHelp: Boolean): Boolean; begin S1 := SourceDir; if not (S1[Length(S1)] in ['\', '/']) then - S1 := S1+'\'; + S1 := S1+'/'; // slash change by unxed if (not ExistFile(S1+LI+'.HLP')) and (not ExistFile(S2+LI+'.HLP')) then Exit diff --git a/arch7z.pas b/arch7z.pas index cd69372..81a6936 100644 --- a/arch7z.pas +++ b/arch7z.pas @@ -218,7 +218,7 @@ procedure TS7ZArchive.GetFile; FileInfo.Attr := Directory else FileInfo.Attr := 0; - FileInfo.FName := '\'+fDelRight(Copy(S, 54, 255)); + FileInfo.FName := '/'+fDelRight(Copy(S, 54, 255)); // slash change by unxed FileInfo.Last := 0; end { TS7ZArchive.GetFile }; diff --git a/archchz.pas b/archchz.pas index 814e241..9040482 100644 --- a/archchz.pas +++ b/archchz.pas @@ -178,7 +178,7 @@ procedure TCHZArchive.GetFile; ArcFile^.Seek(FP+9); ArcFile^.Read(S[0], 1); ArcFile^.Read(S[1], Length(S)); - CDir := CDir+S+'\'; + CDir := CDir+S+'/'; // slash change by unxed goto 1; end else if P.Id[4] = 'd' then @@ -186,7 +186,7 @@ procedure TCHZArchive.GetFile; if CDir <> '' then begin SetLength(CDir, Length(CDir)-1); - while (CDir <> '') and (CDir[Length(CDir)] <> '\') do + while (CDir <> '') and (CDir[Length(CDir)] <> '/') do // slash change by unxed SetLength(CDir, Length(CDir)-1); end; goto 1; diff --git a/archdet.pas b/archdet.pas index f6c6a16..d86d104 100644 --- a/archdet.pas +++ b/archdet.pas @@ -472,7 +472,7 @@ function HPKDetect: Boolean; S := S+C until C = #0; if I < P.noDirHdrs - then S := S +'\'; + then S := S +'/'; // slash change by unxed PHPKRec(HPKCol^.At(I))^.Name := NewStr(S); end; Exit; diff --git a/archha.bak b/archha.bak index 3c1f153..cd212a7 100644 --- a/archha.bak +++ b/archha.bak @@ -189,7 +189,7 @@ procedure THAArchive.GetFile; FileInfo.Last := 2; Exit; end; - Replace(#255, '\', FileInfo.FName); + Replace(#255, '/', FileInfo.FName); // slash change by unxed if P.Method and $0f = $0e then FileInfo.Attr := Directory; ArcFile^.Read(C, 1); diff --git a/archis3.pas b/archis3.pas index 934086c..e2cb611 100644 --- a/archis3.pas +++ b/archis3.pas @@ -223,7 +223,7 @@ procedure TIS3Archive.GetFile; begin ArcFile^.Seek(FO); ArcFile^.Read(S[1], P1.SizeOfName); - FileInfo.FName := S+'\'+FileInfo.FName; + FileInfo.FName := S+'/'+FileInfo.FName; // slash change by unxed end; FileInfo.Last := 0; diff --git a/archiver.pas b/archiver.pas index 0ad7f28..d9f2d3f 100644 --- a/archiver.pas +++ b/archiver.pas @@ -918,7 +918,7 @@ procedure MakeArchive; Writeln(F.T, {$IFDEF RecodeWhenDraw}CharToOemStr {$ENDIF}(S1)) {piwamoto.src.begin} else if B then - S := S+#$14+SquashesName(S1+'\*.*') + S := S+#$14+SquashesName(S1+'/*.*') // slash change by unxed else if Arc^.PutDirs then PutDir(S1) else {JO} @@ -941,7 +941,7 @@ procedure MakeArchive; lFindClose(SR); ClrIO; Writeln(F.T, {$IFDEF RecodeWhenDraw}CharToOemStr - {$ENDIF}(S1)+'\*.*'); + {$ENDIF}(S1)+'/*.*'); // slash change by unxed end; {/JO} {piwamoto.src.end} MakeListFile := S; @@ -1276,7 +1276,7 @@ procedure MakeArchive; begin while (SIntern[Length(SIntern)] = '.') do SetLength(SIntern, Length(SIntern)-1); - while (SIntern[1] = '\') do + while (SIntern[1] = '/') do // slash change by unxed Delete(SIntern, 1, 1); MakeNoSlash(SIntern); SIntern := CnvString(Arc^.SetPathInside)+ @@ -1363,8 +1363,8 @@ procedure UnarchiveFiles; DT.S := HistoryStr(hsExtract, 0); if DT.S = cTEMP_ then DT.S := ''; - if (Length(DT.S) > 3) and (DT.S[Length(DT.S)] <> '\') then - DT.S := DT.S+'\'; + if (Length(DT.S) > 3) and (DT.S[Length(DT.S)] <> '/') then // slash change by unxed + DT.S := DT.S+'/'; // slash change by unxed {JO} // пpовеpяем, находится ли диск в списке дисков, на котоpые надо // pазаpхивиpовать не чеpез вpеменный подкаталог (по умолчанию A: и B:) @@ -1405,8 +1405,8 @@ procedure UnarchiveFiles; if (DT.S = '') or (DT.S = '.') then DT.S := GetPath(FName); ExtrDir := DT.S; - if ExtrDir[Length(ExtrDir)] <> '\' then - ExtrDir := ExtrDir+'\'; + if ExtrDir[Length(ExtrDir)] <> '/' then // slash change by unxed + ExtrDir := ExtrDir+'/'; // slash change by unxed {JO} // проверяем, содержит ли каталог назначения файлы @@ -1564,7 +1564,7 @@ procedure UnarchiveFiles; LFNvp.lChDir(S); {$IFDEF DPMI32} {освобождаем каталог} if ActiveDir[2] = ':' then - ChDir(Copy(ActiveDir, 1, 2) + '\'); + ChDir(Copy(ActiveDir, 1, 2) + '/'); // slash change by unxed {$ENDIF} Eraser.EraseFiles(FCT); Confirms := OldConfirms; diff --git a/archlha.pas b/archlha.pas index 1dd1f15..a01deaa 100644 --- a/archlha.pas +++ b/archlha.pas @@ -247,7 +247,7 @@ procedure TLHAArchive.GetFile; AddStr(s, P.Name[i]); Inc(i) end; - Replace(#255, '\', s); + Replace(#255, '/', s); // slash change by unxed System.Insert(s, FileInfo.FName, 1); end; end; diff --git a/archlim.pas b/archlim.pas index 8195869..6d012a3 100644 --- a/archlim.pas +++ b/archlim.pas @@ -209,7 +209,7 @@ procedure TLIMArchive.GetFile; FileInfo.PSize := P.PackedSize; FileInfo.Date := P.Date {P.Date shl 16) or (P.Date shr 16)}; GetName; - FileInfo.FName := CDir+'\'+FileInfo.FName; + FileInfo.FName := CDir+'/'+FileInfo.FName; // slash change by unxed if P.ThreeZeros[3] and Directory <> 0 then goto 1; ArcFile^.Seek(ArcFile^.GetPos+P.PackedSize); diff --git a/archrar.pas b/archrar.pas index b2b2d24..17df433 100644 --- a/archrar.pas +++ b/archrar.pas @@ -317,7 +317,7 @@ procedure TRARArchive.GetFile; SetLength(FileInfo.FName, (PosChar(#0, FileInfo.FName)-1)); {piwamoto: skip unicode names from winrar2.80beta1+ archives} repeat - Ps := System.Pos('.\', FileInfo.FName); + Ps := System.Pos('./', FileInfo.FName); // slash change by unxed if Ps = 0 then Break; System.Delete(FileInfo.FName, Ps, 1); diff --git a/archread.pas b/archread.pas index 24072c7..f35e71c 100644 --- a/archread.pas +++ b/archread.pas @@ -164,7 +164,7 @@ procedure ReadArcList; {changed & AIN added by piwamoto} Continue; SetLength(S, I-1); if P^.Attr = Directory then - S := S+'\'; + S := S+'/'; // slash change by unxed P^.Attr := 0; P^.FName := NewStr(CurDir+S); end @@ -225,14 +225,14 @@ procedure ReadArcList; {changed & AIN added by piwamoto} I := PosChar(' ', S); if I = 0 then begin - P^.FName := NewStr('\'+S); + P^.FName := NewStr('/'+S); // slash change by unxed S := F^.GetStr; DelLeft(S); DelRight(S); end else begin - P^.FName := NewStr('\'+Copy(S, 1, I-1)); + P^.FName := NewStr('/'+Copy(S, 1, I-1)); // slash change by unxed Delete(S, 1, I); DelLeft(S); end; @@ -285,10 +285,10 @@ procedure ReadArcList; {changed & AIN added by piwamoto} if S[21] = 'D' {directory} then begin P^.Attr := Directory; - S := S + '\'; + S := S + '/'; // slash change by unxed end else P^.Attr := 0; - P^.FName := NewStr('\'+fDelRight(Copy(S, 54, 255))); + P^.FName := NewStr('/'+fDelRight(Copy(S, 54, 255))); // slash change by unxed PC^.AddFile(P^.FName^, P^.USize, P^.PSize, P^.Date, P^.Attr); DisposeStr(P^.FName); Dispose(P); diff --git a/archuc2.pas b/archuc2.pas index d6ebee8..288ddcf 100644 --- a/archuc2.pas +++ b/archuc2.pas @@ -255,7 +255,7 @@ procedure TUC2Archive.GetFile; ReadName; ReadDTA; // FileInfo.Attr := Directory; - FileInfo.FName := FileInfo.FName+'\'; + FileInfo.FName := FileInfo.FName+'/'; // slash change by unxed FileInfo.USize := 0; FileInfo.PSize := 0; end diff --git a/archzoo.pas b/archzoo.pas index cac901b..0256c74 100644 --- a/archzoo.pas +++ b/archzoo.pas @@ -198,7 +198,7 @@ procedure TZOOArchive.GetFile; if S <> '' then begin ArcFile^.Read(S[1], Byte(S[0])); - S[Length(S)] := '\'; + S[Length(S)] := '/'; // slash change by unxed end; FileInfo.FName := S+FileInfo.FName; if FileInfo.FName = '' then diff --git a/arcview.pas b/arcview.pas index c742ba5..dd2774c 100644 --- a/arcview.pas +++ b/arcview.pas @@ -170,9 +170,9 @@ implementation procedure CheckSlashDot(var S: String);{piwamoto} begin - if ((S[Length(S)] <> '.') and (S[Length(S)-1] <> '\')) then + if ((S[Length(S)] <> '.') and (S[Length(S)-1] <> '/')) then // slash change by unxed {directory name '.' bugfix by piwamoto} - While (PosChar(S[Length(S)], '.\') > 0) do SetLength(S, Length(S)-1); + While (PosChar(S[Length(S)], './') > 0) do SetLength(S, Length(S)-1); // slash change by unxed end; function MaxAvail: LongInt; @@ -237,7 +237,7 @@ constructor TArcDrive.Init; else begin ArcName := lFExpand(AName); - Q := '\'; + Q := '/'; // slash change by unxed end; {lFSplit(ArcName, FreeStr, Nm, Xt); @@ -349,7 +349,7 @@ constructor TArcDrive.Load; goto Failure; if (ArcDate <> SR.SR.Time) or (ArcSize <> SR.SR.Size) then begin {архив изменился, надо его перечитывать заново} - CurDir := '\'; + CurDir := '/'; // slash change by unxed ReadArchive; end else @@ -494,13 +494,14 @@ function TArcDrive.ReadArchive; AType^.GetFile; if FileInfo.Last = 0 then begin - Replace('/', '\', FileInfo.FName); - if FileInfo.FName[1] <> '\' then - FileInfo.FName := '\'+FileInfo.FName; + //commented by unxed + //Replace('/', '\', FileInfo.FName); + if FileInfo.FName[1] <> '/' then // slash change by unxed + FileInfo.FName := '/'+FileInfo.FName; // slash change by unxed if FileInfo.Attr and Directory <> 0 then - FileInfo.FName := FileInfo.FName+'\'; + FileInfo.FName := FileInfo.FName+'/'; // slash change by unxed - if FileInfo.FName[length(FileInfo.FName)] = '\' then + if FileInfo.FName[length(FileInfo.FName)] = '/' then // slash change by unxed FileInfo.Attr := FileInfo.Attr or Directory; {attribute "Hidden" means "with password"} @@ -580,8 +581,8 @@ procedure TArcDrive.lChDir; else CurDir := ADir; MakeNoSlash(CurDir); - if CurDir[1]<>'\' then - CurDir:='\'+CurDir; + if CurDir[1]<>'/' then // slash change by unxed + CurDir:='/'+CurDir; // slash change by unxed CheckSlashDot(CurDir); AddToDirectoryHistory(ArcName+':'+CurDir, Integer(DriveType)); end { TArcDrive.lChDir }; @@ -596,7 +597,7 @@ function TArcDrive.GetDir; begin CheckSlashDot(CurDir); if (Length(CurDir) > 0) and (not (CurDir[1] in ['\', '/'])) then - CurDir := '\'+CurDir; + CurDir := '/'+CurDir; // slash change by unxed if (Prev <> nil) and (Prev^.DriveType = dtDisk) then lFSplit(VArcName, Dr, Nm, Xt) {JO} else @@ -642,7 +643,7 @@ function TArcDrive.GetDirectory; begin _USize := Files^.CurFile.Size; _PSize := Files^.CurFile.CSize; - if (UpStrg(CurDir+'\') = UpStrg(Files^.LastDir)) and + if (UpStrg(CurDir+'/') = UpStrg(Files^.LastDir)) and // slash change by unxed (AllFiles or InFilter(Files^.CurFile.Name, FileMask)) then begin @@ -661,12 +662,12 @@ function TArcDrive.GetDirectory; TTL := TTL+_USize; TPL := TPL+_PSize; end - else if (UpStrg(CurDir+'\') = UpStrg(Copy(Files^.LastDir, 1, + else if (UpStrg(CurDir+'/') = UpStrg(Copy(Files^.LastDir, 1, // slash change by unxed Length(CurDir)+1))) then begin Dr := Copy(Files^.LastDir, Length(CurDir)+2, MaxStringLength); - I := PosChar('\', Dr); + I := PosChar('/', Dr); // slash change by unxed if I = 0 then I := Length(Dr)+1; SetLength(Dr, I-1); @@ -796,7 +797,7 @@ procedure TArcDrive.UseFile; { Flash <<< } end; SS := MakeNormName(P^.Owner^, P^.FlName[True]); - if SS[1] = '\' then + if SS[1] = '/' then // slash change by unxed Delete(SS, 1, 1); {DelFC(SS);} {$IFNDEF OS2} { @@ -1129,7 +1130,7 @@ function TArcDrive.MakeListFile; S1: String; begin if not (SS[Length(SS)] in ['\', '/']) then - AddStr(SS, '\'); + AddStr(SS, '/'); // slash change by unxed Files^.ResetPointer(''); while not Files^.Last and Files^.GetNextFile do if (SS = Copy(Files^.LastDir, 1, Length(SS))) @@ -1203,7 +1204,7 @@ function TArcDrive.MakeListFile; else Writeln(F.T, S1) else - PutDir('\'+S1+'\'); + PutDir('/'+S1+'/'); // slash change by unxed MakeListFile := S; end; MakeListFile := S; @@ -1269,7 +1270,7 @@ procedure TArcDrive.ExtractFiles(AFiles: PCollection; ExtrDir: String; ; if not (ExtrDir[Length(ExtrDir)] in ['\', '/']) then - ExtrDir := ExtrDir+'\'; + ExtrDir := ExtrDir+'/'; // slash change by unxed SCurDir := CurDir; SCr := ''; @@ -1277,7 +1278,7 @@ procedure TArcDrive.ExtractFiles(AFiles: PCollection; ExtrDir: String; begin while (SCurDir[Length(SCurDir)] = '.') do SetLength(SCurDir, Length(SCurDir)-1); - while (SCurDir <> '') and (SCurDir[1] = '\') do + while (SCurDir <> '') and (SCurDir[1] = '/') do // slash change by unxed Delete(SCurDir, 1, 1); MakeSlash(SCurDir); if (CnvString(AType^.SetPathInside) <> '') then @@ -1618,8 +1619,8 @@ function TArcDrive.GetInternalName; IntPath: String; begin IntPath := GetDir; - if PosChar('\', IntPath) > 0 then - GetInternalName := Copy(IntPath, PosChar('\', IntPath), 255) + if PosChar('/', IntPath) > 0 then // slash change by unxed + GetInternalName := Copy(IntPath, PosChar('/', IntPath), 255) // slash change by unxed else GetInternalName := ''; end; @@ -1769,7 +1770,7 @@ function ArcViewer; begin if Copy(PathInside, Length(PathInside)-1, 2) = '\.' then SetLength(PathInside, Length(PathInside)-2); - if (GetPath(PathInside) <> '\') then + if (GetPath(PathInside) <> '/') then // slash change by unxed begin P^.lChDir(Copy(GetPath(PathInside), 2, 255)); Message(Application, evCommand, cmPanelReread, nil); @@ -1871,7 +1872,7 @@ function TArcDrive.OpenDirectory(const Dir: String; New(Fils, Init($10, $10)); Fils^.SortMode := psmLongName; Files^.ResetPointer(''); - Root := UpStrg(CurDir)+'\'; + Root := UpStrg(CurDir)+'/'; // slash change by unxed l := Length(Root); {JO: сначала один pаз опpеделяем объём доступной памяти, а затем по ходу дела} { подсчтитываем насколько тpебования памяти pастут и не пpевысили ли они } @@ -1906,7 +1907,7 @@ function TArcDrive.OpenDirectory(const Dir: String; repeat SetLength(LDir, Length(LDir)-1); for I := Length(LDir) downto L do - if LDir[I] = '\' then + if LDir[I] = '/' then // slash change by unxed Break; DrName := Copy(LDir, I+1, MaxStringLength); SetLength(LDir, I); @@ -2012,7 +2013,7 @@ procedure TArcDrive.DrvFindFile(FC: PFilesCollection); New(Fils, Init($10, $10)); Fils^.SortMode := psmLongName; Files^.ResetPointer(''); - Root := UpStrg(CurDir)+'\'; + Root := UpStrg(CurDir)+'/'; // slash change by unxed L := Length(Root); {JO: сначала один pаз опpеделяем объём доступной памяти, а затем по ходу дела} { подсчтитываем насколько тpебования памяти pастут и не пpевысили ли они } @@ -2055,7 +2056,7 @@ procedure TArcDrive.DrvFindFile(FC: PFilesCollection); repeat SetLength(LDir, Length(LDir)-1); for I := Length(LDir) downto L do - if LDir[I] = '\' then + if LDir[I] = '/' then // slash change by unxed Break; DrName := Copy(LDir, I+1, MaxStringLength); SetLength(LDir, I); diff --git a/arvid.pas b/arvid.pas index c7d5602..eeba98f 100644 --- a/arvid.pas +++ b/arvid.pas @@ -325,7 +325,7 @@ constructor TArvidDrive.Init; if i > 2 then CurDir := q else - CurDir := '\'; + CurDir := '/'; // slash change by unxed SeekDirectory; if ArvidDrives = nil then New(ArvidDrives, Init($100, $100)); @@ -414,11 +414,11 @@ procedure TArvidDrive.lChDir; begin if Dr <> '' then CurDir := Dr; - if CurDir[1] <> '\' then - Insert('\', CurDir, 1); + if CurDir[1] <> '/' then // slash change by unxed + Insert('/', CurDir, 1); // slash change by unxed repeat SetLength(CurDir, Length(CurDir)-1) - until (CurDir = '') or (CurDir[Length(CurDir)] = '\'); + until (CurDir = '') or (CurDir[Length(CurDir)] = '/'); // slash change by unxed if CurDir <> '' then SetLength(CurDir, Length(CurDir)-1); end @@ -439,9 +439,9 @@ function TArvidDrive.GetDir; lFSplit(Name^, Dr, Nm, Xt); if filetype = avdTdr then - GetDir := 'TDR:'+Nm+'\'+CurDir + GetDir := 'TDR:'+Nm+'/'+CurDir // slash change by unxed else - GetDir := 'AVT:'+Nm+'\'+CurDir; + GetDir := 'AVT:'+Nm+'/'+CurDir; // slash change by unxed end; constructor TArvidDrive.Load; @@ -555,12 +555,12 @@ procedure TArvidDrive.CopyFiles; begin if (FC.Flags and AvtIsDir) <> 0 then begin - S1 := S1+Nam+'\'; - S2 := S2+Nam+'\'; + S1 := S1+Nam+'/'; // slash change by unxed + S2 := S2+Nam+'/'; // slash change by unxed CopyTree(FC2.ChildOrSize); SetLength(S1, Length(S1)-1); SetLength(S2, Length(S2)-1); - while (S1 <> '') and (S1[Length(S1)] <> '\') do + while (S1 <> '') and (S1[Length(S1)] <> '/') do // slash change by unxed begin SetLength(S1, Length(S1)-1); SetLength(S2, Length(S2)-1); @@ -585,9 +585,9 @@ procedure TArvidDrive.CopyFiles; Exit; lFSplit(Name^, Dr, Nm, Xt); if filetype = avdTdr then - S1 := Dr+'TDR:'+Nm+'\' + S1 := Dr+'TDR:'+Nm+'/' // slash change by unxed else - S1 := Dr+'AVT:'+Nm+'\'; + S1 := Dr+'AVT:'+Nm+'/'; // slash change by unxed Message(Application, evCommand, cmPushFirstName, @CopyDirName); if not CopyDialog(CopyDir, Mask, CopyOpt, CopyMode, CopyPrn, MoveMode, AFiles, 0, Panel, True) @@ -615,7 +615,7 @@ procedure TArvidDrive.CopyFiles; Stream^.Seek( {Cat:warn}Round(PF^.PSize)); Stream^.Read(FC, SizeOf(FC)); Desc := AvtCellDesc(FC, Stream^); - S1 := MakeNormName('\'+CurDir, PF^.FlName[True]); + S1 := MakeNormName('/'+CurDir, PF^.FlName[True]); // slash change by unxed S2 := MakeNormName(CopyDir, MkName(PF^.FlName[True], Mask)); if Pos(S1, S2) = 1 then begin @@ -654,8 +654,8 @@ procedure TArvidDrive.CopyFiles; end else if (PF^.Attr and Directory <> 0) then begin - S1 := S1+'\'; - S2 := S2+'\'; + S1 := S1+'/'; // slash change by unxed + S2 := S2+'/'; // slash change by unxed CopyTree(FC2.ChildOrSize); end; end; @@ -713,7 +713,7 @@ procedure TArvidDrive.CopyFiles; for I := 0 to AFiles^.Count-1 do begin PF := AFiles^.At(I); - S1 := MakeNormName('\'+CurDir, PF^.FlName[True]); + S1 := MakeNormName('/'+CurDir, PF^.FlName[True]); // slash change by unxed S2 := MakeNormName(CopyDir, MkName(Mask, PF^.FlName[True])); if (PF^.Attr and Directory) = 0 then Writeln(T.T, @@ -1097,14 +1097,14 @@ procedure TArvidDrive.DrvFindFile(FC: PFilesCollection); else if DD.Level <= LastLv then begin repeat - while (dr[Length(dr)] <> '\') and (dr <> '') do + while (dr[Length(dr)] <> '/') and (dr <> '') do // slash change by unxed SetLength(dr, Length(dr)-1); if dr <> '' then SetLength(dr, Length(dr)-1); Dec(LastLv); until DD.Level > LastLv; if dr = '' then - dr := '\'; + dr := '/'; // slash change by unxed dr := MakeNormName(dr, TdrMakeFileName(SS)) end; LastLv := DD.Level; @@ -1195,12 +1195,12 @@ procedure TArvidDrive.DrvFindFile(FC: PFilesCollection); WasDir := False; SaveLP := LP; LP := L; - dr := dr+AvtCellName(AA0, St0^)+'\'; + dr := dr+AvtCellName(AA0, St0^)+'/'; // slash change by unxed AvtSearchInStream(AA0.ChildOrSize); WasDir := SaveWasDir; LP := SaveLP; SetLength(dr, Length(dr)-1); - while (dr[Length(dr)] <> '\') and (dr <> '') do + while (dr[Length(dr)] <> '/') and (dr <> '') do // slash change by unxed SetLength(dr, Length(dr)-1); end else @@ -1239,7 +1239,7 @@ procedure TArvidDrive.DrvFindFile(FC: PFilesCollection); AA: TAvtHeader; begin WasTape := False; - dr := '\'; + dr := '/'; // slash change by unxed St^.Seek(0); St^.Read(AA, SizeOf(AA)); if AA.signature = $50545641 {'AVTP'} then @@ -1397,7 +1397,7 @@ procedure TArvidDrive.DrvFindFile(FC: PFilesCollection); goto 1; end; CurDir := FreeStr; - if CurDir[1] = '\' then + if CurDir[1] = '/' then // slash change by unxed Delete(CurDir, 1, 1); {DelFC(CurDir);} SeekDirectory; F := FindList^.At(R.A.Y); diff --git a/arvidavt.pas b/arvidavt.pas index ffd5a3c..1f7dc4d 100644 --- a/arvidavt.pas +++ b/arvidavt.pas @@ -766,12 +766,12 @@ function AvtDelFile(AvtDr: PArvidDrive; AName: String): Boolean; goto 1; CurDir2 := CurDir; MakeSlash(CurDir2); - if AName[1] <> '\' then + if AName[1] <> '/' then // slash change by unxed begin AName := CurDir2+AName; end; lFSplit(AName, Dr, Nm, Xt); - if (Dr[1] = '\') and (Length(Dr) > 1) then + if (Dr[1] = '/') and (Length(Dr) > 1) then // slash change by unxed Delete(Dr, 1, 1); {DelFC(Dr);} if CurDir2 <> Dr then begin @@ -923,7 +923,7 @@ function AvtNewFile( begin NewCell := AvtGetCell(AvtDr); FC.Flags := 0; - if (AName[1] = '\') or AIsDir then + if (AName[1] = '/') or AIsDir then // slash change by unxed AAttr := AAttr or Directory else AAttr := AAttr and not Directory; @@ -933,11 +933,11 @@ function AvtNewFile( FC.StartSector := 0; FC.ChildOrSize := AChildOrSize; FC.Time := ATime; - if (AName[1] = '\') or AIsDir then + if (AName[1] = '/') or AIsDir then // slash change by unxed begin FC.Flags := (FC.Flags and (not AvtIsDir)) or AvtIsDir; end; - if (AName = '') or (AName = '\') then + if (AName = '') or (AName = '/') then // slash change by unxed AvtPutDesc(ADescription) else AvtPutDesc(''); @@ -1127,12 +1127,12 @@ function AvtNewFile( NewCellFailed := False; Lv := CurLevel+1; Stream^.Status := stOK; - if AName[1] = '\' then + if AName[1] = '/' then // slash change by unxed Delete(AName, 1, 1); {DelFC(AName);} while AName <> '' do begin SS := ''; - while (AName[1] <> '\') and (AName <> '') do + while (AName[1] <> '/') and (AName <> '') do // slash change by unxed begin AddStr(SS, AName[1]); Delete(AName, 1, 1); {DelFC(AName);} @@ -1140,7 +1140,7 @@ function AvtNewFile( Break; end; if Length(SS) = 12 then - while (AName[1] <> '\') and (AName <> '') do + while (AName[1] <> '/') and (AName <> '') do // slash change by unxed Delete(AName, 1, 1); {DelFC(AName);} SN := CharToOemStr(CurDir2+SS); if (SS = '.') or (SS = '..') or (Pos('?', SS) > 0) @@ -1153,7 +1153,7 @@ function AvtNewFile( Exit; end; NewCurDirPos := AvtTreeNodeInsert(CurDirPos); - NewCellIsDir := (AName[1] = '\') or AIsDir; + NewCellIsDir := (AName[1] = '/') or AIsDir; // slash change by unxed Delete(AName, 1, 1); {DelFC(AName);} if NewCellFailed then begin @@ -1173,8 +1173,8 @@ function AvtNewFile( begin FirstNameProcessed := True; if NewCellIsDir then - if (CurDir[Length(CurDir)] <> '\') and (CurDir <> '') then - CreatedDir := GetDir+'\'+SS + if (CurDir[Length(CurDir)] <> '/') and (CurDir <> '') then // slash change by unxed + CreatedDir := GetDir+'/'+SS // slash change by unxed else CreatedDir := GetDir+SS; end; @@ -1221,11 +1221,11 @@ function AvtNewFile( CurDir2 := CurDir; MakeSlash(CurDir2); SaveCurDir := CurDir2; - if AName[1] <> '\' then + if AName[1] <> '/' then // slash change by unxed begin AName := CurDir2+AName; end; - if (AName <> '') and (AName[1] = '\') then + if (AName <> '') and (AName[1] = '/') then // slash change by unxed Delete(AName, 1, 1); {DelFC(AName);} lFSplit(AName, Dr, Nm, Xt); Stream^.Status := stOK; @@ -1236,7 +1236,7 @@ function AvtNewFile( CurDir2 := CurDir; MakeSlash(CurDir2); end; - if CurDir2 <> '\' then + if CurDir2 <> '/' then // slash change by unxed Dr := Copy(Dr, Length(CurDir2)+1, Length(Dr)); AName := Dr+Nm+Xt; @@ -1246,7 +1246,7 @@ function AvtNewFile( begin SN := Copy(CurDir2, Length(SaveCurDir)+1, Length(CurDir2)); SS := ''; - while (SN <> '\') and (SN <> '') do + while (SN <> '/') and (SN <> '') do // slash change by unxed begin AddStr(SS, SN[1]); Delete(SN, 1, 1); {DelFC(SN);} @@ -1255,8 +1255,8 @@ function AvtNewFile( begin SN := CurDir; CurDir := SaveCurDir; - if (CurDir[Length(CurDir)] <> '\') and (CurDir <> '') then - CreatedDir := GetDir+'\'+SS + if (CurDir[Length(CurDir)] <> '/') and (CurDir <> '') then // slash change by unxed + CreatedDir := GetDir+'/'+SS // slash change by unxed else CreatedDir := GetDir+SS; CurDir := SN; @@ -1296,19 +1296,19 @@ procedure AvtSeekDirectory(AvtDr: PArvidDrive); CurDirCellPos := 0; Stream^.Status := stOK; SeekFailed := False; - if S[1] = '\' then + if S[1] = '/' then // slash change by unxed Delete(S, 1, 1); {DelFC(S);} while S <> '' do begin SS := ''; - while (S[1] <> '\') and (S <> '') do + while (S[1] <> '/') and (S <> '') do // slash change by unxed begin AddStr(SS, S[1]); Delete(S, 1, 1); {DelFC(S);} { if SS[0] = #12 then Break;} end; - { if SS[0] = #12 then while (S[1] <> '\') and (S <> '') do DelFC(S);} - while (S[1] <> '\') and (S <> '') do + { if SS[0] = #12 then while (S[1] <> '/') and (S <> '') do DelFC(S);} // slash change by unxed + while (S[1] <> '/') and (S <> '') do // slash change by unxed Delete(S, 1, 1); {DelFC(S);} Delete(S, 1, 1); {DelFC(S);} while True do @@ -1454,7 +1454,7 @@ function CopyFilesToArvid(const S: String; Files: PCollection; I := J; {TDR found} S2 := Copy(S, 1, I); Inc(I, 5); - while (I <= Length(S)) and (S[I] <> '\') do + while (I <= Length(S)) and (S[I] <> '/') do // slash change by unxed begin AddStr(S2, S[I]); Inc(I); @@ -1469,7 +1469,7 @@ function CopyFilesToArvid(const S: String; Files: PCollection; CopyFilesToArvid := True; ToStr := Copy(S, I, 256); if ToStr = '' then - ToStr := '\'; + ToStr := '/'; // slash change by unxed OldDir := PAD^.CurDir; PAD^.CurDir := ToStr; PAD^.SeekDirectory; @@ -1527,12 +1527,12 @@ procedure AvtCopyFilesInto(AvtDr: PArvidDrive; AFiles: PCollection; PF^.Attr) <> 0 then begin - S1 := S3+'\'; - S2 := S4+'\'; + S1 := S3+'/'; // slash change by unxed + S2 := S4+'/'; // slash change by unxed AvtWalkTree; SetLength(S1, Length(S1)-1); SetLength(S2, Length(S2)-1); - while (S1 <> '') and (S1[Length(S1)] <> '\') do + while (S1 <> '') and (S1[Length(S1)] <> '/') do // slash change by unxed begin SetLength(S1, Length(S1)-1); SetLength(S2, Length(S2)-1); @@ -1593,7 +1593,7 @@ procedure AvtCopyFilesInto(AvtDr: PArvidDrive; AFiles: PCollection; for I := 0 to AFiles^.Count-1 do begin PF := AFiles^.At(I); - S1 := MakeNormName('\'+CurDir, PF^.FlName[True]); + S1 := MakeNormName('/'+CurDir, PF^.FlName[True]); // slash change by unxed S2 := MakeNormName(From, PF^.FlName[True]); if (PF^.Attr and Directory) = 0 then Writeln(T.T, @@ -1629,7 +1629,7 @@ procedure AvtCopyFilesInto(AvtDr: PArvidDrive; AFiles: PCollection; for I := 0 to AFiles^.Count-1 do begin PF := AFiles^.At(I); - S1 := MakeNormName('\'+CurDir, PF^.FlName[True]); + S1 := MakeNormName('/'+CurDir, PF^.FlName[True]); // slash change by unxed S2 := MakeNormName(From, PF^.FlName[True]); Desc := ''; if (PF^.DIZ <> nil) and (PF^.DIZ^.DIZText <> '') then @@ -1641,8 +1641,8 @@ procedure AvtCopyFilesInto(AvtDr: PArvidDrive; AFiles: PCollection; begin AvtNewFile(AvtDr, S1, Desc, True, 0, PackedDate(PF), 0, PF^.Attr); - S1 := S1+'\'; - S2 := S2+'\'; + S1 := S1+'/'; // slash change by unxed + S2 := S2+'/'; // slash change by unxed OldDir := PD^.GetDir; AvtWalkTree; PD^.lChDir(OldDir); diff --git a/arvidtdr.pas b/arvidtdr.pas index f276182..df27479 100644 --- a/arvidtdr.pas +++ b/arvidtdr.pas @@ -109,12 +109,12 @@ procedure TdrSeekDirectory; CurLevel := 0; CurDir := ''; Lv := 1; - if S[1] = '\' then + if S[1] = '/' then // slash change by unxed Delete(S, 1, 1); {DelFC(S);} while S <> '' do begin SS := ''; - while (S[1] <> '\') and (S <> '') do + while (S[1] <> '/') and (S <> '') do // slash change by unxed begin SS := SS+S[1]; {AddStr(SS, S[1]);} Delete(S, 1, 1); {DelFC(S);} diff --git a/cmdline.pas b/cmdline.pas index 901b5cd..1b359f2 100644 --- a/cmdline.pas +++ b/cmdline.pas @@ -421,7 +421,7 @@ procedure TCommandLine.HandleEvent; ls := Length(S); c := CurX; l := Length(Str); - if (S[Length(S)] <> '\') and (Copy(S, Length(S)-1, 2) <> '\"') + if (S[Length(S)] <> '/') and (Copy(S, Length(S)-1, 2) <> '\"') then S := S+' '; Insert(S, Str, CurX+1); diff --git a/diskimg.pas b/diskimg.pas index 5b2bb46..43df846 100644 --- a/diskimg.pas +++ b/diskimg.pas @@ -341,7 +341,7 @@ function UnpackImage(const FName, DestDir: String; PInfo: PWhileView) Move(DR.Name[0], VolumeLabel[1], 11); // fixme: commented by unxed //DelRight(VolumeLabel); - VolumeLabel := VolumeLabel+'\'; + VolumeLabel := VolumeLabel+'/'; // slash change by unxed Break; end else @@ -368,7 +368,7 @@ function UnpackImage(const FName, DestDir: String; PInfo: PWhileView) if DR.Attr and Directory <> 0 then begin if not IsDummyDir(Nm) then - ProcessDir(Dir+Nm+'\', DR.Clus, True); {JO} + ProcessDir(Dir+Nm+'/', DR.Clus, True); {JO} // slash change by unxed Continue; end; WriteFile(Dir, Nm, DR.Clus, DR.len, DR.Date, DR.Attr); diff --git a/dn1.pas b/dn1.pas index 60c3b3e..42b7a21 100644 --- a/dn1.pas +++ b/dn1.pas @@ -92,7 +92,7 @@ function BadTemp(var s: String): Boolean; if (s = '') then Exit; if not (s[Length(s)] in ['\', '/']) then - s := s+'\'; + s := s+'/'; // slash change by unxed ClrIO; if not PathExist(s) then Exit; diff --git a/dnexec.pas b/dnexec.pas index 687d1c7..994a10f 100644 --- a/dnexec.pas +++ b/dnexec.pas @@ -119,7 +119,7 @@ procedure AnsiExec(const Path: String; const ComLine: AnsiString); {$IFNDEF Win32} // освобождаем каталог if ActiveDir[2] = ':' then - ChDir(Copy(ActiveDir, 1, 2) + '\'); + ChDir(Copy(ActiveDir, 1, 2) + '/'); // slash change by unxed {$ENDIF Win32} ChDir(StartDir); diff --git a/dnutil.pas b/dnutil.pas index 40cc1f6..70f2309 100644 --- a/dnutil.pas +++ b/dnutil.pas @@ -1138,7 +1138,7 @@ procedure TDNApplication.RetrieveDesktop; Desktop^.Insert(PV); SetLength(TempExtrDir, Length(TempExtrDir)-1); Str1 := GetPath(TempExtrDir); - CopyDirContent(TempExtrDir+'\'+SCurDir, Str1, True, ForceMod); + CopyDirContent(TempExtrDir+'/'+SCurDir, Str1, True, ForceMod); // slash change by unxed PV^.Free; { удаляем временный каталог со всем, что в нём осталось} FRT := NewFileRec(GetName(TempExtrDir), @@ -1152,7 +1152,7 @@ procedure TDNApplication.RetrieveDesktop; lGetDir(0, DirToChange); LFNvp.lChDir(Str1); if ActiveDir[2] = ':' then {освобождаем каталог} - ChDir(Copy(ActiveDir, 1, 2) + '\'); + ChDir(Copy(ActiveDir, 1, 2) + '/'); // slash change by unxed Eraser.EraseFiles(FCT); LFNvp.lChDir(DirToChange); DirToChange := ''; diff --git a/drives.pas b/drives.pas index 27919cd..dbfb5f2 100644 --- a/drives.pas +++ b/drives.pas @@ -309,11 +309,11 @@ procedure TDrive.ChangeRoot; B: Boolean; begin {Cat: проверяем на сетевой путь} - if CurDir[1] = '\' then + if CurDir[1] = '/' then // slash change by unxed begin B := False; for I := 3 to Length(CurDir) do - if CurDir[I] = '\' then + if CurDir[I] = '/' then // slash change by unxed if B then begin CurDir := Copy(CurDir, 1, I-1); @@ -624,13 +624,13 @@ procedure TDrive.lChDir; NeedAbort := True; ATestDir := lFExpand(ATestDir); {Cat: проверяем на сетевой путь} - if (Length(ATestDir) > 2) and (ATestDir[1] = '\') - and (ATestDir[2] = '\') + if (Length(ATestDir) > 2) and (ATestDir[1] = '/') // slash change by unxed + and (ATestDir[2] = '/') // slash change by unxed then begin OK := False; for I := 3 to Length(ATestDir) do - if ATestDir[I] = '\' then + if ATestDir[I] = '/' then // slash change by unxed begin OK := True; Break; diff --git a/eraser.pas b/eraser.pas index 02e96fa..25fc851 100644 --- a/eraser.pas +++ b/eraser.pas @@ -281,7 +281,7 @@ procedure EraseFiles; Abort := True; Break end; - if FreeStr[Length(FreeStr)] = '\' + if FreeStr[Length(FreeStr)] = '/' // slash change by unxed then TD^.AtInsert(0, NewStr(Copy(FreeStr, 1, Length(FreeStr)-1))) else @@ -559,7 +559,7 @@ procedure EraseFiles; if PFileRec(Files^.At(I))^.Attr and Directory <> 0 then begin PStr1 := NewStr('>'+MakeNormName(PFileRec(Files^.At(I))^.Owner^, - PFileRec(Files^.At(I))^.FlName[True])+'\'); + PFileRec(Files^.At(I))^.FlName[True])+'/'); // slash change by unxed RereadCollection^.Insert(PStr1); end; end; @@ -607,7 +607,7 @@ procedure SetVLabel; Dr: Char; begin Dr := GetCurDrive; - if Dr = '\' then + if Dr = '/' then // slash change by unxed Exit; {!! Это очень некрасивое решение. Лучше бы сделать неактивной команду cmSetVolumeLabel, если на активной панели сетевой диск. А заодно и если там архив. } diff --git a/fbb.pas b/fbb.pas index 4a09e42..2aac76d 100644 --- a/fbb.pas +++ b/fbb.pas @@ -594,9 +594,9 @@ NHdr = record if S = '' then S := '.'; S := lFExpand(S); - if (DTA.S[Length(DTA.S)] = '\') or IsDir(S) then + if (DTA.S[Length(DTA.S)] = '/') or IsDir(S) then // slash change by unxed MakeSlash(S); - if S[Length(S)] = '\' then + if S[Length(S)] = '/' then // slash change by unxed begin CopyDir := S; Mask := x_x diff --git a/filecopy.pas b/filecopy.pas index 5b85e18..5b6d242 100644 --- a/filecopy.pas +++ b/filecopy.pas @@ -368,7 +368,7 @@ constructor TDirName.Init; begin inherited Init; OldName := NewStr(AOld); - NewName := NewStr(fReplace('.\', '\', ANew)); + NewName := NewStr(fReplace('./', '/', ANew)); // slash change by unxed CopyIt := ACopy; Own := AnOwn; Attr := AnAttr; @@ -1615,7 +1615,7 @@ procedure FilesCopy(Files: PCollection; SourcePanel: PView; if CopyPrn then begin NName := CopyDir; - while NName[Length(NName)] = '\' do + while NName[Length(NName)] = '/' do // slash change by unxed SetLength(NName, Length(NName)-1); S1 := lFExpand(FName); {Cat} S2 := lFExpand(NName); {Cat} @@ -1944,13 +1944,13 @@ procedure FilesCopy(Files: PCollection; SourcePanel: PView; L: LongInt; begin ClrIO; - lFindFirst(DirName+'\*.*', AnyFileDir, SR); {JO} + lFindFirst(DirName+'/*.*', AnyFileDir, SR); {JO} // slash change by unxed while (DosError = 0) and not Abort and not CopyCancel do begin SSS := MakeNormName(AddDir, SR.FullName); if SR.SR.Attr and Directory = 0 then begin - CopyFile(DirName+'\'+SR.FullName, Copy(AddDir, + CopyFile(DirName+'/'+SR.FullName, Copy(AddDir, // slash change by unxed Length(CopyDir)+1, MaxStringLength), nil, SR.FullSize, SR.SR.Time, SR.SR.Attr); end; @@ -2051,9 +2051,9 @@ procedure FilesCopy(Files: PCollection; SourcePanel: PView; begin Info^.Write(5, GetString(dlFCCheckingDirs)); - if (not CopyPrn) and (Dest <> '') and (Dest[Length(Dest)] <> '\') + if (not CopyPrn) and (Dest <> '') and (Dest[Length(Dest)] <> '/') // slash change by unxed then - AddStr(Dest, '\'); + AddStr(Dest, '/'); // slash change by unxed q := MakeNormName(Dest, Name); if q[Length(q)] = '.' then SetLength(q, Length(q)-1); @@ -2209,7 +2209,7 @@ procedure FilesCopy(Files: PCollection; SourcePanel: PView; SR: lSearchRec; Drive: Byte; begin - if Dest[Length(Dest)] = '\' then + if Dest[Length(Dest)] = '/' then // slash change by unxed SetLength(Dest, Length(Dest)-1); if Dest[Length(Dest)] = '.' then SetLength(Dest, Length(Dest)-1); @@ -2226,7 +2226,7 @@ procedure FilesCopy(Files: PCollection; SourcePanel: PView; ClrIO; end; {/AK155} - lFindFirst(Source+'\*.*', AnyFileDir, SR); {JO} + lFindFirst(Source+'/*.*', AnyFileDir, SR); {JO} // slash change by unxed while (DosError = 0) and not Abort and not CopyCancel do begin if (SR.SR.Attr and Directory <> 0) and @@ -2288,8 +2288,8 @@ procedure FilesCopy(Files: PCollection; SourcePanel: PView; function IsNetworkPath(const Path: String): Boolean; {KV} begin - IsNetworkPath := ((Length(Path) > 2) and (Path[1] = '\') and - (Path[2] = '\')); + IsNetworkPath := ((Length(Path) > 2) and (Path[1] = '/') and // slash change by unxed + (Path[2] = '/')); // slash change by unxed end; label @@ -2305,7 +2305,7 @@ procedure FilesCopy(Files: PCollection; SourcePanel: PView; Red := [S[1]]; end; - if CopyPrn or (S[1] = '\') then + if CopyPrn or (S[1] = '/') then // slash change by unxed FreeSpc := 0 // устройство или сетевой адрес else begin @@ -2442,7 +2442,7 @@ procedure FilesCopy(Files: PCollection; SourcePanel: PView; if P^.Attr and Marked = 0 then begin SSS := CnvString(P^.Owner); - if SSS[Length(SSS)] = '\' then + if SSS[Length(SSS)] = '/' then // slash change by unxed SetLength(SSS, Length(SSS)-1); if Copy(CopyDir, 1, Length(SSS)) = SSS then Inhr := 0; @@ -2863,7 +2863,7 @@ function CopyDialog; l := I; while S[I] = '.' do Dec(I); - while S[I] = '\' do + while S[I] = '/' do // slash change by unxed Dec(I); if l = I then Break; @@ -2877,7 +2877,7 @@ function CopyDialog; копирование в текущий каталог). Востановление '\' сделано через ':=', а не через 'SetLength(S,I+1)', чтобы не закладывать мину на возможный будущий переход от ShortString к AnsiString } - if (Length(SSS) > I) and (SSS[I+1] = '\') then + if (Length(SSS) > I) and (SSS[I+1] = '/') then // slash change by unxed S := Copy(SSS, 1, I+1); {/AK155 02-01-2003} @@ -2937,7 +2937,7 @@ function CopyDialog; ClrIO; if Length(SSS) = 3 then begin - CopyDir := S+'\'; + CopyDir := S+'/'; // slash change by unxed Mask := x_x end else @@ -2961,7 +2961,7 @@ function CopyDialog; if IsDummyDir(S) or (not DEr and (SR.SR.Attr and Directory <> 0)) then begin - CopyDir := S+'\'; + CopyDir := S+'/'; // slash change by unxed Mask := x_x; end else if (DEr and (Files^.Count <> 1) @@ -2973,7 +2973,7 @@ function CopyDialog; CopyMode := cpmAppend; cmNo: begin - CopyDir := S+'\'; + CopyDir := S+'/'; // slash change by unxed Mask := x_x; end; else {case} diff --git a/filefind.pas b/filefind.pas index 9d438e9..0b80adb 100644 --- a/filefind.pas +++ b/filefind.pas @@ -604,12 +604,13 @@ function FindFiles(var Files: PFilesCollection; AType^.GetFile; if FileInfo.Last = 0 then begin - Replace('/', '\', FileInfo.FName); + // commented by unxed + //Replace('/', '\', FileInfo.FName); with FileInfo do begin - if FName[1] <> '\' then - FName := '\'+FName; - if FName[Length(FName)] = '\' then + if FName[1] <> '/' then // slash change by unxed + FName := '/'+FName; // slash change by unxed + if FName[Length(FName)] = '/' then // slash change by unxed begin SetLength(FName, Length(FName)-1); Attr := Attr or Directory; @@ -628,10 +629,10 @@ function FindFiles(var Files: PFilesCollection; begin if (FileInfo.Attr and Directory) <> 0 then begin - if FileInfo.FName[Length(FileInfo.FName)] = '\' then + if FileInfo.FName[Length(FileInfo.FName)] = '/' then // slash change by unxed PArcLastDir := NewStr(UpStrg(FileInfo.FName)) else - PArcLastDir := NewStr(UpStrg(FileInfo.FName+'\')); + PArcLastDir := NewStr(UpStrg(FileInfo.FName+'/')); // slash change by unxed Inc(MemReq, Length(PArcLastDir^)+1); end; if ( ( (FileInfo.Attr and Directory) = 0) or @@ -686,7 +687,7 @@ function FindFiles(var Files: PFilesCollection; Inc(MemReq, Length(PArcLastDir^)+1); SetLength(LDir, Length(LDir)-1); for I := Length(LDir) downto 1 do - if LDir[I] = '\' then + if LDir[I] = '/' then // slash change by unxed Break; DrName := Copy(LDir, I+1, MaxStringLength); SetLength(LDir, I); @@ -776,7 +777,7 @@ function FindFiles(var Files: PFilesCollection; if (SR.SR.Attr and Directory <> 0) then begin if (FindRec.Options and ffoRecursive <> 0) then - DirCol^.Insert(NewStr(Path+SR.FullName+'\')) + DirCol^.Insert(NewStr(Path+SR.FullName+'/')) // slash change by unxed end else {JO} @@ -812,12 +813,12 @@ function FindFiles(var Files: PFilesCollection; begin MakeSlash(FN); if PathExist(FN+GetPath(FindRec.Mask)) - and (Pos('\', FindRec.Mask) <> 0) + and (Pos('/', FindRec.Mask) <> 0) // slash change by unxed then begin FN := FN+GetPath(FindRec.Mask); - while Pos('\', FindRec.Mask) <> 0 do - Delete(FindRec.Mask, 1, Pos('\', FindRec.Mask)); + while Pos('/', FindRec.Mask) <> 0 do // slash change by unxed + Delete(FindRec.Mask, 1, Pos('/', FindRec.Mask)); // slash change by unxed end; MakeSlash(FN); end; @@ -853,7 +854,7 @@ function FindFiles(var Files: PFilesCollection; for i := 1 to LCol^.Count-1 do begin P1 := LCol^.At(i); - if Pos(P0^+'\', P1^) = 1 then + if Pos(P0^+'/', P1^) = 1 then // slash change by unxed DisposeStr(P1) // удаляем подкаталог else begin @@ -1627,10 +1628,10 @@ procedure DosReread(Files: PFilesCollection; Dir: String; //JO: удаляем всё что лежало в данном каталоге, т.к. оно // заведомо не существует while j < Files^.Count do - if (UpStrg(MakeNormName(p^.Owner^, p^.FlName[True])+'\') + if (UpStrg(MakeNormName(p^.Owner^, p^.FlName[True])+'/') // slash change by unxed = UpStrg(Copy(PFileRec(Files^.At(j))^.Owner^, 1, Length(MakeNormName(p^.Owner^, - p^.FlName[True])+'\')))) + p^.FlName[True])+'/')))) // slash change by unxed then begin Files^.AtFree(j); @@ -1813,7 +1814,7 @@ procedure TFindDrive.UseFile; I := PosChar(':', OwnArc); OwnArc := Copy(P^.Owner^, 1, I-1); PathInside := Copy(P^.Owner^, I+1, MaxStringLength); - if PathInside[1] = '\' then + if PathInside[1] = '/' then // slash change by unxed Delete(PathInside, 1, 1); { детектим тип архива} New(ArcFile, Init(OwnArc, stOpenRead, 512)); @@ -1871,7 +1872,7 @@ procedure TFindDrive.UseFile; { Flash <<< } end; SS := MakeNormName(PathInside, P^.FlName[True]); - if SS[1] = '\' then + if SS[1] = '/' then // slash change by unxed Delete(SS, 1, 1); S2 := OwnArc; {$IFNDEF OS2} diff --git a/flpanel.pas b/flpanel.pas index 32da8ee..8f0ff3c 100644 --- a/flpanel.pas +++ b/flpanel.pas @@ -2003,7 +2003,7 @@ procedure TFilePanel.HandleEvent; pqsAlt)) or ( (Event.KeyCode = kbDoubleCtrl) and (FMSetup.Quick = pqsCtrl)) or ( (Event.CharCode >= #32) and (Event.CharCode <= #254) and - (Event.CharCode <> '\') and (FMSetup.Quick = pqsCaps) and + (Event.CharCode <> '/') and (FMSetup.Quick = pqsCaps) and // slash change by unxed (I and $40 <> 0)) or ( (Event.CharCode >= #32) and (Event.CharCode <= #254) and (ShiftState and 3 <> 0) and (ShiftState and 4 = 0) and diff --git a/flpanelx.pas b/flpanelx.pas index a03f97d..08f9086 100644 --- a/flpanelx.pas +++ b/flpanelx.pas @@ -1018,7 +1018,7 @@ procedure TFilePanelRoot.CommandHandle; if Drive^.DriveType <> dtDisk then ReplaceDrive(FileName[1]); Message(@Self, evCommand, cmInsertDrive, Drv); - if (GetPath(PathInside) <> '\') and (Drive^.DriveType = dtArc) + if (GetPath(PathInside) <> '/') and (Drive^.DriveType = dtArc) // slash change by unxed then begin Drive^.lChDir(Copy(GetPath(PathInside), 2, 255)); @@ -1625,7 +1625,7 @@ procedure TFilePanelRoot.CommandHandle; Message(@Self, evCommand, cmInsertDrive, Dr); {end} end - else if S[Length(S)] = '\' + else if S[Length(S)] = '/' // slash change by unxed then begin if not PathExist(S) then @@ -1773,16 +1773,16 @@ procedure TFilePanelRoot.CommandHandle; if PanSetup^.Show.ColumnsMask and psLFN_InColumns <> 0 then if (ShiftState and kbAltShift <> 0) then - S := lfGetShortFileName(PF^.Owner^)+'\' + S := lfGetShortFileName(PF^.Owner^)+'/' // slash change by unxed else - S := PF^.Owner^+'\' + S := PF^.Owner^+'/' // slash change by unxed else if (ShiftState and kbAltShift <> 0) then - S := PF^.Owner^+'\' + S := PF^.Owner^+'/' // slash change by unxed else - S := lfGetShortFileName(PF^.Owner^)+'\' + S := lfGetShortFileName(PF^.Owner^)+'/' // slash change by unxed {$ELSE} - S := PF^.Owner^+'\' + S := PF^.Owner^+'/' // slash change by unxed {$ENDIF} else if ShiftState and 3 <> 0 then {$IFDEF DualName} @@ -2170,9 +2170,9 @@ procedure TFilePanelRoot.CommandHandle; if (Drive^.DriveType = dtDisk) then begin {JO: сохраняем в S имя каталога верхнего уровня для текущего} - s := Drive^.CurDir+'\'; + s := Drive^.CurDir+'/'; // slash change by unxed l := GetRootStart(s)+1; - s := Copy(s, l, PosChar('\', Copy(s, l, MaxStringLength))-1); + s := Copy(s, l, PosChar('/', Copy(s, l, MaxStringLength))-1); // slash change by unxed end; Drive^.ChangeRoot; ReadDirectory; @@ -2549,12 +2549,12 @@ procedure TFilePanelRoot.CommandHandle; Arg: PChar; begin StrPCopy(@PrgBuf, GetEnv('windir')+'\explorer.exe'); - if Copy(PathName, Length(PathName)-2, 3) = '\..' then + if Copy(PathName, Length(PathName)-2, 3) = '/..' then // slash change by unxed StrPCopy(@ArgBuf, '"'+Copy(PathName, 1, Length(PathName)-3)+'"') else begin Arg := @ArgBuf; - if PathName[Length(PathName)] <> '\' then + if PathName[Length(PathName)] <> '/' then // slash change by unxed Arg := StrECopy(@ArgBuf, '/select,'); StrPCopy(Arg, '"'+PathName+'"'); end; diff --git a/fviewer.pas b/fviewer.pas index 0c1d108..624e220 100644 --- a/fviewer.pas +++ b/fviewer.pas @@ -1732,7 +1732,7 @@ function TFileViewer.ReadFile; если куросор стоит на каталоге AK155} ReadDir := True; I := Length(FName); - if Copy(FName, I-2, 3) = '\..' then + if Copy(FName, I-2, 3) = '/..' then // slash change by unxed begin SetLength(FileName, I-3); DirString := FileName; diff --git a/highlite.pas b/highlite.pas index 42fec6e..d6534d4 100644 --- a/highlite.pas +++ b/highlite.pas @@ -659,7 +659,7 @@ procedure Highlites(Len: Integer; S: PChar; const Params: THighliteParams); k := j+1; while k < len do begin - if (S[k] = '\') and not esc then + if (S[k] = '/') and not esc then // slash change by unxed begin esc := True; end diff --git a/histries.pas b/histries.pas index 430e78b..564d970 100644 --- a/histries.pas +++ b/histries.pas @@ -658,13 +658,13 @@ function TTHistList.GetText; if not RolledFwd then begin WasSlash := False; - if FreeStr[Length(FreeStr)] = '\' then + if FreeStr[Length(FreeStr)] = '/' then // slash change by unxed begin SetLength(FreeStr, Length(FreeStr)-1); WasSlash := True; end; if WasSlash then - FreeStr := Cut(FreeStr, Size.X-2) + '\' + FreeStr := Cut(FreeStr, Size.X-2) + '/' // slash change by unxed else FreeStr := Cut(FreeStr, Size.X-1); end @@ -863,7 +863,7 @@ procedure AddToDirectoryHistory(S: String; DriveType: Integer); begin if InterfaceData.Options and ouiTrackDirs = 0 then Exit; - if (S = '') or ((S[2] <> ':') and ((S[1] <> '\') or (S[2] <> '\'))) + if (S = '') or ((S[2] <> ':') and ((S[1] <> '/') or (S[2] <> '/'))) // slash change by unxed then Exit; {Cat: добавил проверку на сетевые пути} @@ -885,7 +885,7 @@ procedure AddToDirectoryHistory(S: String; DriveType: Integer); if (DriveType = Integer(dtArvid)) or (DriveType = Integer(dtArc)) then - AddStr(S, '\'); + AddStr(S, '/'); // slash change by unxed end; I := -1; P := DirHistory^.FirstThat(@IsThat); diff --git a/lfnvp.pas b/lfnvp.pas index 83be889..334d8f9 100644 --- a/lfnvp.pas +++ b/lfnvp.pas @@ -417,13 +417,13 @@ procedure CheckColonAndSlash(const Name: String; var S: String); S := Name[1] + S; end; - if Name[Length(Name)] <> '\' then - while S[Length(S)] = '\' do Dec(S[0]) - else if (Name[Length(Name)] = '\') and - (S[Length(S)] <> '\') and (Length(S) < 255) then + if Name[Length(Name)] <> '/' then // slash change by unxed + while S[Length(S)] = '/' do Dec(S[0]) // slash change by unxed + else if (Name[Length(Name)] = '/') and // slash change by unxed + (S[Length(S)] <> '/') and (Length(S) < 255) then // slash change by unxed begin Inc(S[0]); - S[Length(S)] := '\'; + S[Length(S)] := '/'; // slash change by unxed end; end; @@ -1155,7 +1155,7 @@ procedure lFSplit(const Path: String; var Dir, Name, ext: String); if SlashPos <> 0 then Break; end; - if (Path[B] = '\') and (SlashPos = 0) then + if (Path[B] = '/') and (SlashPos = 0) then // slash change by unxed begin SlashPos := B; if DotPos <> 0 then @@ -1372,13 +1372,13 @@ function lFExpand(Path: String): String; i, j: Integer; begin for i := 1 to length(Path) do - if Path[i] = '/' then - Path[i] := '\'; + if Path[i] = '/' then // slash change by unxed + Path[i] := '/'; // slash change by unxed if Path = '' then Result := ActiveDir else if (Copy(Path, 2, 2) = ':\') or (Copy(Path, 1, 2) = '\\') then Result := Path // полный путь - else if Path[1] = '\' then + else if Path[1] = '/' then // slash change by unxed Result := CurrentRoot + Path // от корня текущего диска/шары else if (Length(Path) >= 2) and (Path[2] = ':') then begin // относительный путь указанного диска @@ -1391,15 +1391,15 @@ function lFExpand(Path: String): String; { Удаление '\..' } while True do begin - j := Pos('\..', Result); + j := Pos('/..', Result); // slash change by unxed if j = 0 then Break; i := j-1; - while (i <> 0) and (Result[i] <> '\') do + while (i <> 0) and (Result[i] <> '/') do // slash change by unxed Dec(i); Delete(Result, i+1, j-i+2); end; - Replace('.\', '', Result); + Replace('./', '', Result); // slash change by unxed if Result[Length(Result)] = '.' then SetLength(Result, Length(Result)-1); end; @@ -1431,7 +1431,7 @@ procedure lGetDir(D: Byte; var Path: String); if D = 0 then begin Path := ActiveDir; - if Path[1] = '\' then + if Path[1] = '/' then // slash change by unxed goto DelDlash; D := Byte(UpCase(Path[1]))-Byte('A')+1; end; diff --git a/modules.pas b/modules.pas index 4c8121f..487a1a5 100644 --- a/modules.pas +++ b/modules.pas @@ -105,7 +105,7 @@ function LoadPluginModule(const ModuleName: String; Result := LoadModule(@S[1], LibHandle); if not Result then begin - S := SourceDir+ModuleName+'\'+ModuleName+'.DLL'#0; + S := SourceDir+ModuleName+'/'+ModuleName+'.DLL'#0; // slash change by unxed Result := LoadModule(@S[1], LibHandle); end; end; diff --git a/netbrwsr.pas b/netbrwsr.pas index 5e5bd62..1a8a1ec 100644 --- a/netbrwsr.pas +++ b/netbrwsr.pas @@ -531,14 +531,14 @@ procedure TNetDrive.lChDir; if Pos(cNET_, ADir) = 1 then if RootState then - if Pos(ADir+'\', CurDir) = 1 then + if Pos(ADir+'/', CurDir) = 1 then // slash change by unxed if Length(ADir) = Length(cNET_) then while RootCount > 0 do RemoveRootResource(CurDir) else RemoveRootResource(CurDir) else - if Pos(CurDir+'\', ADir) = 1 then + if Pos(CurDir+'/', ADir) = 1 then // slash change by unxed ChangeToSubDir(Copy(ADir, Length(CurDir)+2, MaxLongInt)) else Exit @@ -552,7 +552,7 @@ procedure TNetDrive.lChDir; inherited lChDir(ADir); end else - if (ADir[1] = '\') and (ADir[2] = '\') and (Pos('\', Copy(ADir, 3, MaxLongInt)) = 0) then + if (ADir[1] = '/') and (ADir[2] = '/') and (Pos('/', Copy(ADir, 3, MaxLongInt)) = 0) then // slash change by unxed begin CurDir := RootDirSaved; RootState := True; diff --git a/plugrez.pas b/plugrez.pas index 7b5f202..2a09c75 100644 --- a/plugrez.pas +++ b/plugrez.pas @@ -56,7 +56,7 @@ function OpenRez(const PluginName: ShortString): LongInt; L: String; OffsetTableOffset: LongInt; begin - S := New(PBufStream, Init(SourceDir+PluginName+'\'+LngId+'.REZ', + S := New(PBufStream, Init(SourceDir+PluginName+'/'+LngId+'.REZ', // slash change by unxed stOpenRead, 16384)); S^.Read(L[1], Length(RezLabel)); S^.Read(SC, SizeOf(SC)); diff --git a/regexp.pas b/regexp.pas index 42f9374..001a25c 100644 --- a/regexp.pas +++ b/regexp.pas @@ -1540,7 +1540,7 @@ function TRegExp.RegAtom(var FlagP: TRegExpFlags): PChar; else { EXACTLY or PREDEFINED or TAGGED } exactly: - if (op = '\') and (FInput < FInputEol) then + if (op = '/') and (FInput < FInputEol) then // slash change by unxed begin op := FInput[0]; Inc(FInput); @@ -1964,7 +1964,7 @@ function TRegExp.RegSet: PChar; begin char1 := FInput[0]; Inc(FInput); - if (char1 = '\') and not RegEscape(char1) then + if (char1 = '/') and not RegEscape(char1) then // slash change by unxed Exit; if (FInput < FInputEol) and (FInput[0] = '-') then begin @@ -1976,7 +1976,7 @@ function TRegExp.RegSet: PChar; end; char2 := FInput[0]; Inc(FInput); - if (char2 = '\') and not RegEscape(char2) then + if (char2 = '/') and not RegEscape(char2) then // slash change by unxed Exit; end else @@ -2082,7 +2082,7 @@ function TRegExp.RegExactly(var FlagP: TRegExpFlags): PChar; if b1 >= FInputEol then Break; c := b1[0]; - if (c = '\') then + if (c = '/') then // slash change by unxed begin if (b1+1 < FInputEol) and (b1[1] = ':') then Break; @@ -3164,7 +3164,7 @@ function TRegExp.RegSub(ASrc, AReplace: PChar; ARLen: Integer; begin no := 0; end - else if (c = '\') then + else if (c = '/') then // slash change by unxed begin if (FInput < FInputEol) and (FInput[0] in ['0'..'9']) then begin diff --git a/startupp.pas b/startupp.pas index 201b00f..39cdc9a 100644 --- a/startupp.pas +++ b/startupp.pas @@ -125,7 +125,7 @@ implementation TempFile := ''; SourceDir := lFExpand(ParamStr(0)); -while SourceDir[Length(SourceDir)] <> '\' do +while SourceDir[Length(SourceDir)] <> '/' do // slash change by unxed SetLength(SourceDir, Length(SourceDir)-1); StartupDir := SourceDir; {SourceDir := Dos.GetEnv('DN')} diff --git a/tree.pas b/tree.pas index 958a5f1..fa90b3f 100644 --- a/tree.pas +++ b/tree.pas @@ -445,7 +445,7 @@ function FindDir(DC: PCollection; const Dir: String): Integer; end; repeat S := ''; - while (D[1] <> '\') and (D <> '') do + while (D[1] <> '/') and (D <> '') do // slash change by unxed begin S := S+D[1]; Delete(D, 1, 1); {DelFC(D)} @@ -1117,7 +1117,7 @@ function MkFcFromDirRec(D: PDirRec; var FullName: String) fr: PFileRec; begin l := Length(FullName); - while FullName[l] <> '\' do + while FullName[l] <> '/' do // slash change by unxed Dec(l); SetLength(FullName, l-1); New(Result, Init(1, 1)); @@ -1152,7 +1152,7 @@ procedure TTreeView.HandleCommand; I: Integer; begin SearchForMask := False; - if QSMask[1] = '\' then + if QSMask[1] = '/' then // slash change by unxed begin ScrollBar^.SetValue(0); SearchForMask := True; @@ -1494,7 +1494,7 @@ procedure TTreeView.HandleCommand; begin if QuickSearch then begin - if (Event.CharCode = '\') and (QSMask <> '') + if (Event.CharCode = '/') and (QSMask <> '') // slash change by unxed then begin CE; @@ -1521,7 +1521,7 @@ procedure TTreeView.HandleCommand; InitQuickSearch(@Self); DoQuickSearch(Event.KeyCode); SearchForMask(0); - if QSMask = '\' then + if QSMask = '/' then // slash change by unxed InitQuickSearch(@Self); end; CE; @@ -2102,7 +2102,7 @@ function CreateDirInheritance; J := I; // указывает на '\' перед началом имени на очередном уровне repeat Inc(I); - until (S[I] = '\'); + until (S[I] = '/'); // slash change by unxed // I указывает на первый символ за концом имени M := Copy(S, 1, I-1); // полный путь очередного уровня ClrIO; diff --git a/ukeymap.pas b/ukeymap.pas index ed96d7f..b2c4c85 100644 --- a/ukeymap.pas +++ b/ukeymap.pas @@ -367,8 +367,8 @@ function ReadXlt(FN: string; var N: Integer): PCodeConv; N := 0; if FN <> '' then begin - if Pos('\', FN) = 0 then - FN := SourceDir+'XLT\' + FN; + if Pos('/', FN) = 0 then // slash change by unxed + FN := SourceDir+'XLT/' + FN; // slash change by unxed S.Init(FN, stOpenRead); if (S.GetSize >= 2) and (S.GetSize <= 256*4) then begin diff --git a/usermenu.pas b/usermenu.pas index 855a6ff..6574a04 100644 --- a/usermenu.pas +++ b/usermenu.pas @@ -761,7 +761,7 @@ function ExecUserMenu; I := Length(S); if Abort then goto 2; - while (I > 0) and (S[I] <> '\') do + while (I > 0) and (S[I] <> '/') do // slash change by unxed Dec(I); if I = 0 then goto 2; @@ -770,7 +770,7 @@ function ExecUserMenu; if F <> nil then goto 1; - while (I > 2) and (S[I-1] <> '\') do + while (I > 2) and (S[I-1] <> '/') do // slash change by unxed begin Delete(S, I-1, 1); Dec(I); diff --git a/uucode.bak b/uucode.bak index f840c4c..9381f9a 100644 --- a/uucode.bak +++ b/uucode.bak @@ -2403,10 +2403,10 @@ end; SetLength(S1, Length(S1)-1); if S <> '' then begin - if S[Length(S)] = '\' then + if S[Length(S)] = '/' then // slash change by unxed MakeNormName := S+S1 else - MakeNormName := S+'\'+S1; + MakeNormName := S+'/'+S1; // slash change by unxed end else MakeNormName := S1;