// Programm: max2unix.C
// Konvertiert MAC textfiles in UNIX textfiles
#include
#include
void mac_to_unix(std::string& s)
// POST: In s wurde jedes Auftreten von linefeed (LF)
// durch carriage-return (CR) ersetzt.
{
typedef std::string::iterator Sit;
for (Sit i = s.begin(); i != s.end(); ++i)
if (*i == '\r') *i = '\n';
}
int main()
{
std::string f;
// Lies eine ganze Zeile auf einmal ein.
std::getline(std::cin, f);
mac_to_unix(f);
std::cout << f;
return 0;
}