From 888d180164004d121511609da044ea86c3aa9cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Wed, 19 Feb 2020 18:58:09 +0100 Subject: 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 --- extern/mantaflow/preprocessed/fileio/ioutil.cpp | 45 +++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 extern/mantaflow/preprocessed/fileio/ioutil.cpp (limited to 'extern/mantaflow/preprocessed/fileio/ioutil.cpp') 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 +} + +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 -- cgit v1.2.3