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

ioutil.cpp « fileio « preprocessed « mantaflow « extern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7c1682dfc5e63d527b5150f3b71a91f616696e54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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