Difference between revisions of "UNIX2MAC/de"
From Free Pascal wiki
Jump to navigationJump to searchm |
m (Fixed syntax highlighting; deleted category included in page template) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{UNIX2MAC}} | {{UNIX2MAC}} | ||
− | + | ||
− | + | ||
− | Zurück zur Seite [[Newline/de|Zeilenumbruch / Newline]]. | + | Zurück zur Seite [[Newline/de|Zeilenumbruch / Newline]]. |
− | + | ||
+ | |||
Das Unterprogramm konvertiert die Zeilenumbrüche einer ASCII- bzw. ANSI-Textdatei vom UNIX-Format in das MAC-Format.<br> | Das Unterprogramm konvertiert die Zeilenumbrüche einer ASCII- bzw. ANSI-Textdatei vom UNIX-Format in das MAC-Format.<br> | ||
− | <syntaxhighlight> | + | |
+ | <syntaxhighlight lang=pascal> | ||
uses | uses | ||
FileUtil, ...; | FileUtil, ...; | ||
Line 44: | Line 46: | ||
end; | end; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | ||
Aufruf unter DOS, Windows: | Aufruf unter DOS, Windows: | ||
− | <syntaxhighlight> | + | |
+ | <syntaxhighlight lang=pascal> | ||
subUNIX2MAC('E:\Test_alt.txt', 'E:\Test_neu.txt'); | subUNIX2MAC('E:\Test_alt.txt', 'E:\Test_neu.txt'); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | ||
− | Aufruf unter | + | Aufruf unter Linux: |
− | <syntaxhighlight> | + | |
+ | <syntaxhighlight lang=pascal> | ||
subUNIX2MAC('/home/user/Test_alt.txt', '/home/user/Test_neu.txt'); | subUNIX2MAC('/home/user/Test_alt.txt', '/home/user/Test_neu.txt'); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− |
Latest revision as of 13:00, 3 March 2020
│
Deutsch (de) │
Zurück zur Seite Zeilenumbruch / Newline.
Das Unterprogramm konvertiert die Zeilenumbrüche einer ASCII- bzw. ANSI-Textdatei vom UNIX-Format in das MAC-Format.
uses
FileUtil, ...;
...
procedure subUNIX2MAC(const conStrQuellDateiname, conStrZielDateiname: string);
// konvertiert Zeilenumbrüche von Unix, Linux, Android, Mac OS X, AmigaOS, BSD, usw. ... nach
// Mac OS (bis Version 9), Apple II und C64
var
txtQuelldatei: file of char;
txtZieldatei: file of char;
chrZeichen: char;
begin
assignfile(txtQuelldatei, UTF8ToSys(conStrQuellDateiname));
assignfile(txtZieldatei, UTF8ToSys(conStrZielDateiname));
Rewrite(txtZieldatei);
Reset(txtQuelldatei);
Reset(txtZieldatei);
while not EOF(txtQuelldatei) do
begin
Read(txtQuelldatei, chrZeichen);
if (chrZeichen = #10) then
Write(txtZieldatei, #13)
else
Write(txtZieldatei, chrZeichen);
end;
closefile(txtQuelldatei);
closefile(txtZieldatei);
end;
Aufruf unter DOS, Windows:
subUNIX2MAC('E:\Test_alt.txt', 'E:\Test_neu.txt');
Aufruf unter Linux:
subUNIX2MAC('/home/user/Test_alt.txt', '/home/user/Test_neu.txt');