Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastián Barschkis <sebbas@sebbas.org>2020-02-19 20:58:09 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-02-19 20:58:48 +0300
commit888d180164004d121511609da044ea86c3aa9cb0 (patch)
tree217442311b8023be7aa609344fbd312e28d0c2e7 /extern/mantaflow/preprocessed/fileio/ioutil.cpp
parent04b7f052e14ee6ff09b5cc4c85a76c4c5a1b0383 (diff)
Fluid: Updated manta pp files
Updates in the files include: - New manta files now use an platform independent gzopen function - Adjusted argument name for vorticity
Diffstat (limited to 'extern/mantaflow/preprocessed/fileio/ioutil.cpp')
-rw-r--r--extern/mantaflow/preprocessed/fileio/ioutil.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/extern/mantaflow/preprocessed/fileio/ioutil.cpp b/extern/mantaflow/preprocessed/fileio/ioutil.cpp
new file mode 100644
index 00000000000..7c1682dfc5e
--- /dev/null
+++ b/extern/mantaflow/preprocessed/fileio/ioutil.cpp
@@ -0,0 +1,45 @@
+
+
+// DO NOT EDIT !
+// This file is generated using the MantaFlow preprocessor (prep generate).
+
+/******************************************************************************
+ *
+ * MantaFlow fluid solver framework
+ * Copyright 2011-2020 Tobias Pfaff, Nils Thuerey
+ *
+ * This program is free software, distributed under the terms of the
+ * Apache License, Version 2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Helper functions to handle file IO
+ *
+ ******************************************************************************/
+
+#include "mantaio.h"
+
+#if NO_ZLIB != 1
+extern "C" {
+# include <zlib.h>
+}
+
+namespace Manta {
+
+//! helper to handle non ascii filenames correctly, mainly problematic on windows
+void *safeGzopen(const char *filename, const char *mode)
+{
+ gzFile gzfile;
+# if defined(WIN32) || defined(_WIN32)
+ UTF16_ENCODE(filename);
+
+ // gzopen_w() is supported since zlib v1.2.7
+ gzfile = gzopen_w(filename_16, mode);
+ UTF16_UN_ENCODE(filename);
+# else
+ gzfile = gzopen(filename, mode);
+# endif
+ return gzfile;
+}
+#endif
+
+} // namespace