aboutsummaryrefslogtreecommitdiff
path: root/circuitpython/mpy-cross/fmode.h
diff options
context:
space:
mode:
Diffstat (limited to 'circuitpython/mpy-cross/fmode.h')
-rw-r--r--circuitpython/mpy-cross/fmode.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/circuitpython/mpy-cross/fmode.h b/circuitpython/mpy-cross/fmode.h
new file mode 100644
index 0000000..05b4a46
--- /dev/null
+++ b/circuitpython/mpy-cross/fmode.h
@@ -0,0 +1,17 @@
+// SPDX-FileCopyrightText: Copyright (c) 2013-2016 Damien P. George
+// SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+//
+// SPDX-License-Identifier: MIT
+
+#ifndef MICROPY_INCLUDED_WINDOWS_FMODE_H
+#define MICROPY_INCLUDED_WINDOWS_FMODE_H
+
+// Treat files opened by open() as binary. No line ending translation is done.
+void set_fmode_binary(void);
+
+// Treat files opened by open() as text.
+// When reading from the file \r\n will be converted to \n.
+// When writing to the file \n will be converted into \r\n.
+void set_fmode_text(void);
+
+#endif // MICROPY_INCLUDED_WINDOWS_FMODE_H