AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Dostounix

Ein Thema von bernhard_LA · begonnen am 8. Jan 2014 · letzter Beitrag vom 8. Jan 2014
 
bernhard_LA

Registriert seit: 8. Jun 2009
Ort: Bayern
1.138 Beiträge
 
Delphi 11 Alexandria
 
#1

Dostounix

  Alt 8. Jan 2014, 13:52
Hat jemand mal ein schöne Implementierung für DOSTOUNIX ??

UNIX2DOS habe ich schon


Delphi-Quellcode:
procedure Unix2Dos(UnixTEXTFile, DosTEXTFile : String);
Const CR : Char = #13;
      LF = #10;
Var InFile, OutFile : File;
    InByte : Char;

begin
  Assign (InFile, UnixTEXTFile); ReSet (InFile, 1);
  Assign (OutFile, DosTEXTFile); ReWrite (OutFile, 1);
  while NOT EOF (InFile) do
    begin
      BlockRead (InFile, InByte, 1);
      if InByte = LF then BlockWrite (OutFile, CR, 1);
      BlockWrite (OutFile, InByte, 1);
    end;
  Close (OutFile);
  Close (InFile);
end;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:01 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz