diff options
Diffstat (limited to 'utils/win32/dos2unix.cpp')
-rwxr-xr-x | utils/win32/dos2unix.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/utils/win32/dos2unix.cpp b/utils/win32/dos2unix.cpp new file mode 100755 index 0000000..7010d0b --- /dev/null +++ b/utils/win32/dos2unix.cpp @@ -0,0 +1,19 @@ +#include <iostream>
+#include <string>
+
+#include <io.h>
+#include <fcntl.h>
+
+using namespace std;
+
+int main( void )
+{
+ _setmode( _fileno( stdout ), _O_BINARY );
+
+ string line;
+ while( getline( cin, line ) ) {
+ cout << line << "\n";
+ }
+
+ return 0;
+}
|