summaryrefslogtreecommitdiff
path: root/UMain.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-06-14 18:34:02 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-06-14 18:34:02 +0200
commitc9a02bf590248c0bd8e1343198d3f9c13ce118c1 (patch)
treecbd1b07cea6f3ccea7fc98c58d65f568e69e8527 /UMain.pas
parentb1dfa430702770c83c815bec24f1dc72175e1e5e (diff)
downloadtuxcmd-0.6.43.tar.xz
Port to new ULibc unit, drop dependency to compiler Libc libraryv0.6.43
(preparation for PPC port)
Diffstat (limited to 'UMain.pas')
-rw-r--r--UMain.pas34
1 files changed, 17 insertions, 17 deletions
diff --git a/UMain.pas b/UMain.pas
index 0d4d0fa..f131b3d 100644
--- a/UMain.pas
+++ b/UMain.pas
@@ -245,7 +245,7 @@ var
implementation
-uses Libc,
+uses ULibc,
UCore, USelect, UNewDir, UDirDelete, UProgress, UCopyMove,
UCoreUtils, ULocale, UChecksum, UChecksumDruid, USplitFile,
UFileTypeSettings, UFileAssoc, UChmod, UChown, USymlink,
@@ -2735,7 +2735,7 @@ begin
if ConfQuickRenameSkipExt and (ListView.Columns[i - 1].FColumn^.editable_widget <> nil) then begin
s := gtk_entry_get_text(PGtkEntry(ListView.Columns[i - 1].FColumn^.editable_widget));
if (s <> nil) and (g_utf8_strlen(s, -1) > 0) then begin
- DebugMsg(['TFMain.DoQuickRename: s = "', s, '", g_utf8_strlen(s) = ', g_utf8_strlen(s, -1)]);
+// DebugMsg(['TFMain.DoQuickRename: s = "', s, '", g_utf8_strlen(s) = ', g_utf8_strlen(s, -1)]);
if AnsiPos('.', s) > 0 then
gtk_editable_select_region(PGtkEditable(ListView.Columns[i - 1].FColumn^.editable_widget), 0, g_utf8_strlen(s, -1) - g_utf8_strlen(PChar(ExtractFileExt(s)), -1));
end;
@@ -2902,7 +2902,7 @@ begin
g_utf8_strncpy(g, PChar(Entry.Text), g_utf8_strlen(PChar(Entry.Text), -1) - 1);
// DebugMsg(['TFMain.QuickFindSendKey: after delete: "', g, '", ansi = "', UTF8ToStr(g), '"']);
Entry.Text := g;
- Libc.free(g);
+ libc_free(g);
end;
NewText := Entry.Text;
end else
@@ -3533,9 +3533,9 @@ begin
b := True;
if Engine is TVFSEngine then b := HandleRunFromArchive(Path, Engine, Command, FileTypeDesc, False); // not a local engine, extract to local first
if b then begin
- Libc.__chdir(PChar(ExtractFilePath(Path)));
+ libc_chdir(PChar(ExtractFilePath(Path)));
b := ExecuteProgram(QuoteStr(Path), ExtractFilePath(Path), AutodetectGUI, RunInTerminal, i);
- Libc.__chdir(PChar('/'));
+ libc_chdir(PChar('/'));
end else b := True; // Mask cancelled extraction from VFS
end else begin
if Engine is TVFSEngine then begin
@@ -3556,9 +3556,9 @@ begin
else s := Format('%s %s', [s, QuoteStr(Path)]);
// DebugMsg(['execute: ', s, ' , ', Command, ' , ', QuoteStr(Path)]);
if b then begin
- Libc.__chdir(PChar(ExtractFilePath(Path)));
+ libc_chdir(PChar(ExtractFilePath(Path)));
b := ExecuteProgram(s, ExtractFilePath(Path), AutodetectGUI, RunInTerminal, i);
- Libc.__chdir(PChar('/'));
+ libc_chdir(PChar('/'));
end else b := True; // Mask cancelled extraction from VFS
end;
if not b then Application.MessageBox(Format(LANGCannotExecuteSPleaseCheckTheConfiguration, [s]), [mbOK], mbError, mbNone, mbOK);
@@ -3611,10 +3611,10 @@ begin
ChangingDir(LeftLastFocused, ProcessPattern(Engine, UTF8ToStr(Copy(Orig, 4, Length(Orig) - 3)), Engine.Path, '', True));
end else begin
while not (Engine is TLocalTreeEngine) do Engine := Engine.ParentEngine;
- ChDir(Engine.Path);
+ libc_chdir(PChar(Engine.Path));
if not ExecuteProgram(UTF8ToStr(Orig), Engine.Path, ConfCmdLineTerminalBehaviour = 0 , ConfCmdLineTerminalBehaviour = 1, Error) then
Application.MessageBox(LANGErrorExecutingCommand, [mbOK], mbError, mbNone, mbOK);
- ChDir('/');
+ libc_chdir('/');
end;
end;
CommandLineCombo.Entry.Text := '';
@@ -4348,9 +4348,9 @@ begin
b := True;
if Engine is TVFSEngine then b := HandleRunFromArchive(FileName, Engine, '', '', False); // not a local engine, extract to local first
if b then begin
- Libc.__chdir(PChar(ExtractFilePath(FileName)));
+ libc_chdir(PChar(ExtractFilePath(FileName)));
b := ExecuteProgram(QuoteStr(FileName), ExtractFilePath(FileName), True, False, Error);
- Libc.__chdir(PChar('/'));
+ libc_chdir(PChar('/'));
end else b := True; // Mask cancelled extraction from VFS
if not b then Application.MessageBox(LANGErrorExecutingCommand, [mbOK], mbError, mbNone, mbOK);
end;
@@ -4363,10 +4363,10 @@ begin
if Pos('%s', s) > 0 then s := Format(s, ['''' + QuoteStr(FileName) + ''''])
else s := Format('%s %s', [s, QuoteStr(FileName)]);
if b then begin
- Libc.__chdir(PChar(ExtractFilePath(FileName)));
+ libc_chdir(PChar(ExtractFilePath(FileName)));
b := ExecuteProgram(s, ExtractFilePath(FileName), TAssocAction((Sender as TGTKMenuItem).Data).AutodetectGUI,
TAssocAction((Sender as TGTKMenuItem).Data).RunInTerminal, Error);
- Libc.__chdir(PChar('/'));
+ libc_chdir(PChar('/'));
end else b := True; // Mask cancelled extraction from VFS
if not b then Application.MessageBox(Format(LANGCannotExecuteSPleaseCheckTheConfiguration, [FileName]), [mbOK], mbError, mbNone, mbOK);
end;
@@ -5632,7 +5632,7 @@ begin
memset(g, 0, Length(ALabel) + 4);
g_utf8_strncpy(g, PChar(ALabel), ConfTabMaxLength);
ALabel := g + '...';
- Libc.free(g);
+ libc_free(g);
end;
Notebook.SetTabCaption(PageIndex, ALabel);
Notebook.SetTabTooltip(PageIndex, Tooltip);
@@ -6023,9 +6023,9 @@ begin
else AEngine := RightPanelEngine;
while not (AEngine is TLocalTreeEngine) do AEngine := AEngine.ParentEngine;
CurrentPath := AEngine.Path;
- ChDir(CurrentPath);
+ libc_chdir(PChar(CurrentPath));
ExecuteProgram('bash', CurrentPath, False, True, Error);
- ChDir('/');
+ libc_chdir('/');
end;
@@ -6305,7 +6305,7 @@ begin
DebugMsg(['(II) HandleRunFromArchive: New path = ', APath]);
- Libc.free(tmp);
+ libc_free(tmp);
DebugMsg(['(II) HandleRunFromArchive: Copy OK, Result = ', Result]);
end;