~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to intern/cycles/util/util_path.cpp

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#include <stdio.h>
28
28
 
29
 
#define BOOST_FILESYSTEM_VERSION 2
 
29
#include <boost/version.hpp>
 
30
 
 
31
#if (BOOST_VERSION < 104400)
 
32
#  define BOOST_FILESYSTEM_VERSION 2
 
33
#endif
30
34
 
31
35
#include <boost/filesystem.hpp> 
32
36
#include <boost/algorithm/string.hpp>
60
64
 
61
65
string path_filename(const string& path)
62
66
{
 
67
#if (BOOST_FILESYSTEM_VERSION == 2)
63
68
        return boost::filesystem::path(path).filename();
 
69
#else
 
70
        return boost::filesystem::path(path).filename().string();
 
71
#endif
64
72
}
65
73
 
66
74
string path_dirname(const string& path)
162
170
        return true;
163
171
}
164
172
 
165
 
static bool path_read_text(const string& path, string& text)
 
173
bool path_read_text(const string& path, string& text)
166
174
{
167
175
        vector<uint8_t> binary;
168
176
 
176
184
        return true;
177
185
}
178
186
 
 
187
uint64_t path_modified_time(const string& path)
 
188
{
 
189
        if(boost::filesystem::exists(path))
 
190
                return (uint64_t)boost::filesystem::last_write_time(path);
 
191
        
 
192
        return 0;
 
193
}
 
194
 
179
195
string path_source_replace_includes(const string& source_, const string& path)
180
196
{
181
197
        /* our own little c preprocessor that replaces #includes with the file
182
 
           contents, to work around issue of opencl drivers not supporting
183
 
           include paths with spaces in them */
 
198
         * contents, to work around issue of opencl drivers not supporting
 
199
         * include paths with spaces in them */
184
200
        string source = source_;
185
201
        const string include = "#include \"";
186
202
        size_t n, pos = 0;