Difference between revisions of "DOS2MAC/de"
From Free Pascal wiki
Jump to navigationJump to searchm (Fixed syntax highlighting; deleted category already in page template) |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{DOS2MAC}} | {{DOS2MAC}} | ||
− | + | ||
− | + | ||
− | 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 DOS-Format in das MAC-Format. | + | |
− | <syntaxhighlight> | + | Das Unterprogramm konvertiert die Zeilenumbrüche einer ASCII- bzw. ANSI-Textdatei vom DOS-Format in das MAC-Format. |
+ | |||
+ | <syntaxhighlight lang=pascal> | ||
uses | uses | ||
FileUtil, ...; | FileUtil, ...; | ||
Line 46: | Line 48: | ||
end; | end; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | ||
Aufruf unter DOS, Windows: | Aufruf unter DOS, Windows: | ||
− | <syntaxhighlight> | + | |
+ | <syntaxhighlight lang=pascal> | ||
subDOS2MAC('E:\Test_alt.txt', 'E:\Test_neu.txt'); | subDOS2MAC('E:\Test_alt.txt', 'E:\Test_neu.txt'); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | ||
− | Aufruf unter | + | Aufruf unter Linux: |
− | <syntaxhighlight> | + | |
+ | <syntaxhighlight lang=pascal> | ||
subDOS2MAC('/home/user/Test_alt.txt', '/home/user/Test_neu.txt'); | subDOS2MAC('/home/user/Test_alt.txt', '/home/user/Test_neu.txt'); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− |
Latest revision as of 10:27, 13 February 2020
│
Deutsch (de) │
Zurück zur Seite Zeilenumbruch / Newline.
Das Unterprogramm konvertiert die Zeilenumbrüche einer ASCII- bzw. ANSI-Textdatei vom DOS-Format in das MAC-Format.
uses
FileUtil, ...;
...
procedure subDOS2MAC(const conStrQuellDateiname, conStrZielDateiname: string);
// konvertiert Zeilenumbrüche von Windows, DOS, OS/2, CP/M oder TOS (Atari) nach
// Mac OS (bis Version 9), Apple II, 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
begin
Continue;
end;
Write(txtZieldatei, chrZeichen);
end;
closefile(txtQuelldatei);
closefile(txtZieldatei);
end;
Aufruf unter DOS, Windows:
subDOS2MAC('E:\Test_alt.txt', 'E:\Test_neu.txt');
Aufruf unter Linux:
subDOS2MAC('/home/user/Test_alt.txt', '/home/user/Test_neu.txt');