diff options
Diffstat (limited to 'drivers')
49 files changed, 188 insertions, 107 deletions
diff --git a/drivers/nrex/README.md b/drivers/nrex/README.md index 951b301c1e..9ff67992dc 100644 --- a/drivers/nrex/README.md +++ b/drivers/nrex/README.md @@ -1,5 +1,7 @@ # NREX: Node RegEx +Version 0.1 + Small node-based regular expression library. It only does text pattern matchhing, not replacement. To use add the files `nrex.hpp`, `nrex.cpp` and `nrex_config.h` to your project and follow the example: @@ -32,7 +34,7 @@ Currently supported features: * Unicode `\uFFFF` code points * Positive `(?=)` and negative `(?!)` lookahead * Positive `(?<=)` and negative `(?<!)` lookbehind (fixed length and no alternations) - * Backreferences `\1` to `\9` (with option to expand to `\99`) + * Backreferences `\1` and `\g{1}` (limited by default to 9 - can be unlimited) ## License diff --git a/drivers/nrex/nrex.cpp b/drivers/nrex/nrex.cpp index 104e07f887..1eb9ec38c8 100644 --- a/drivers/nrex/nrex.cpp +++ b/drivers/nrex/nrex.cpp @@ -1,4 +1,5 @@ // NREX: Node RegEx +// Version 0.1 // // Copyright (c) 2015, Zher Huei Lee // All rights reserved. @@ -299,6 +300,10 @@ struct nrex_node_group : public nrex_node { length = 1; } + if (mode == LookAhead || mode == LookBehind) + { + quantifiable = false; + } } virtual ~nrex_node_group() @@ -322,6 +327,10 @@ struct nrex_node_group : public nrex_node int offset = 0; if (mode == LookBehind) { + if (pos < length) + { + return -1; + } offset = length; } int res = childset[i]->test(s, pos - offset); @@ -450,7 +459,7 @@ struct nrex_node_char : public nrex_node int test(nrex_search* s, int pos) const { - if (s->end == pos || s->at(pos) != ch) + if (s->end <= pos || 0 > pos || s->at(pos) != ch) { return -1; } @@ -473,7 +482,7 @@ struct nrex_node_range : public nrex_node int test(nrex_search* s, int pos) const { - if (s->end == pos) + if (s->end <= pos || 0 > pos) { return -1; } @@ -555,7 +564,7 @@ struct nrex_node_class : public nrex_node int test(nrex_search* s, int pos) const { - if (s->end == pos) + if (s->end <= pos || 0 > pos) { return -1; } @@ -727,7 +736,7 @@ struct nrex_node_shorthand : public nrex_node int test(nrex_search* s, int pos) const { - if (s->end == pos) + if (s->end <= pos || 0 > pos) { return -1; } @@ -811,16 +820,12 @@ struct nrex_node_quantifier : public nrex_node int test(nrex_search* s, int pos) const { - return test_step(s, pos, 1); + return test_step(s, pos, 0, pos); } - int test_step(nrex_search* s, int pos, int level) const + int test_step(nrex_search* s, int pos, int level, int start) const { - if (max == 0) - { - return pos; - } - if ((max >= 1 && level > max) || pos > s->end) + if (pos > s->end) { return -1; } @@ -840,14 +845,26 @@ struct nrex_node_quantifier : public nrex_node return res; } } - int res = child->test(s, pos); - if (s->complete) + if (max >= 0 && level > max) { - return res; + return -1; + } + if (level > 1 && level > min + 1 && pos == start) + { + return -1; + } + int res = pos; + if (level >= 1) + { + res = child->test(s, pos); + if (s->complete) + { + return res; + } } if (res >= 0) { - int res_step = test_step(s, res, level + 1); + int res_step = test_step(s, res, level + 1, start); if (res_step >= 0) { return res_step; @@ -983,6 +1000,13 @@ nrex::nrex() { } +nrex::nrex(const nrex_char* pattern, int captures) + : _capturing(0) + , _root(NULL) +{ + compile(pattern, captures); +} + nrex::~nrex() { if (_root) @@ -1008,10 +1032,14 @@ void nrex::reset() int nrex::capture_size() const { - return _capturing + 1; + if (_root) + { + return _capturing + 1; + } + return 0; } -bool nrex::compile(const nrex_char* pattern, bool extended) +bool nrex::compile(const nrex_char* pattern, int captures) { reset(); nrex_node_group* root = NREX_NEW(nrex_node_group(_capturing)); @@ -1053,7 +1081,7 @@ bool nrex::compile(const nrex_char* pattern, bool extended) NREX_COMPILE_ERROR("unrecognised qualifier for group"); } } - else if ((!extended && _capturing < 9) || (extended && _capturing < 99)) + else if (captures >= 0 && _capturing < captures) { nrex_node_group* group = NREX_NEW(nrex_node_group(++_capturing)); stack.top()->add_child(group); @@ -1190,15 +1218,6 @@ bool nrex::compile(const nrex_char* pattern, bool extended) } else if (nrex_is_quantifier(c[0])) { - if (stack.top()->back == NULL || !stack.top()->back->quantifiable) - { - if (c[0] == '{') - { - stack.top()->add_child(NREX_NEW(nrex_node_char('{'))); - continue; - } - NREX_COMPILE_ERROR("element not quantifiable"); - } int min = 0; int max = -1; bool valid_quantifier = true; @@ -1270,6 +1289,10 @@ bool nrex::compile(const nrex_char* pattern, bool extended) } if (valid_quantifier) { + if (stack.top()->back == NULL || !stack.top()->back->quantifiable) + { + NREX_COMPILE_ERROR("element not quantifiable"); + } nrex_node_quantifier* quant = NREX_NEW(nrex_node_quantifier(min, max)); if (min == max) { @@ -1323,20 +1346,26 @@ bool nrex::compile(const nrex_char* pattern, bool extended) stack.top()->add_child(NREX_NEW(nrex_node_shorthand(c[1]))); ++c; } - else if ('1' <= c[1] && c[1] <= '9') + else if (('1' <= c[1] && c[1] <= '9') || (c[1] == 'g' && c[2] == '{')) { int ref = 0; - if (extended && '0' <= c[2] && c[2] <= '9') + bool unclosed = false; + if (c[1] == 'g') { - ref = int(c[1] - '0') * 10 + int(c[2] - '0'); + unclosed = true; c = &c[2]; } - else + while ('0' <= c[1] && c[1] <= '9') { - ref = int(c[1] - '0'); + ref = ref * 10 + int(c[1] - '0'); ++c; } - if (ref > _capturing) + if (c[1] == '}') + { + unclosed = false; + ++c; + } + if (ref > _capturing || ref <= 0 || unclosed) { NREX_COMPILE_ERROR("backreference to non-existent capture"); } @@ -1377,6 +1406,10 @@ bool nrex::compile(const nrex_char* pattern, bool extended) bool nrex::match(const nrex_char* str, nrex_result* captures, int offset, int end) const { + if (!_root) + { + return false; + } nrex_search s(str, captures); if (end >= offset) { @@ -1386,7 +1419,7 @@ bool nrex::match(const nrex_char* str, nrex_result* captures, int offset, int en { s.end = NREX_STRLEN(str); } - for (int i = offset; i < s.end; ++i) + for (int i = offset; i <= s.end; ++i) { for (int c = 0; c <= _capturing; ++c) { diff --git a/drivers/nrex/nrex.hpp b/drivers/nrex/nrex.hpp index e26a61c39a..44e950c517 100644 --- a/drivers/nrex/nrex.hpp +++ b/drivers/nrex/nrex.hpp @@ -1,4 +1,5 @@ // NREX: Node RegEx +// Version 0.1 // // Copyright (c) 2015, Zher Huei Lee // All rights reserved. @@ -59,7 +60,32 @@ class nrex int _capturing; nrex_node* _root; public: + + /*! + * \brief Initialises an empty regex container + */ nrex(); + + /*! + * \brief Initialises and compiles the regex pattern + * + * This calls nrex::compile() with the same arguments. To check whether + * the compilation was successfull, use nrex::valid(). + * + * If the NREX_THROW_ERROR was defined it would automatically throw a + * runtime error nrex_compile_error if it encounters a problem when + * parsing the pattern. + * + * \param pattern The regex pattern + * \param captures The maximum number of capture groups to allow. Any + * extra would be converted to non-capturing groups. + * If negative, no limit would be imposed. Defaults + * to 9. + * + * \see nrex::compile() + */ + nrex(const nrex_char* pattern, int captures = 9); + ~nrex(); /*! @@ -78,9 +104,9 @@ class nrex * * This is used to provide the array size of the captures needed for * nrex::match() to work. The size is actually the number of capture - * groups + one for the matching of the entire pattern. The result is - * always capped at 10 or 100, depending on the extend option given in - * nrex::compile() (default 10). + * groups + one for the matching of the entire pattern. This can be + * capped using the extra argument given in nrex::compile() + * (default 10). * * \return The number of captures */ @@ -97,12 +123,13 @@ class nrex * parsing the pattern. * * \param pattern The regex pattern - * \param extended If true, raises the limit on number of capture - * groups and back-references to 99. Otherwise limited - * to 9. Defaults to false. + * \param captures The maximum number of capture groups to allow. Any + * extra would be converted to non-capturing groups. + * If negative, no limit would be imposed. Defaults + * to 9. * \return True if the pattern was succesfully compiled */ - bool compile(const nrex_char* pattern, bool extended = false); + bool compile(const nrex_char* pattern, int captures = 9); /*! * \brief Uses the pattern to search through the provided string diff --git a/drivers/nrex/regex.cpp b/drivers/nrex/regex.cpp index 246384b10a..e8578221a9 100644 --- a/drivers/nrex/regex.cpp +++ b/drivers/nrex/regex.cpp @@ -15,7 +15,7 @@ void RegEx::_bind_methods() { - ObjectTypeDB::bind_method(_MD("compile","pattern", "expanded"),&RegEx::compile, DEFVAL(true)); + ObjectTypeDB::bind_method(_MD("compile","pattern", "capture"),&RegEx::compile, DEFVAL(9)); ObjectTypeDB::bind_method(_MD("find","text","start","end"),&RegEx::find, DEFVAL(0), DEFVAL(-1)); ObjectTypeDB::bind_method(_MD("clear"),&RegEx::clear); ObjectTypeDB::bind_method(_MD("is_valid"),&RegEx::is_valid); @@ -68,11 +68,11 @@ String RegEx::get_capture(int capture) const { } -Error RegEx::compile(const String& p_pattern, bool expanded) { +Error RegEx::compile(const String& p_pattern, int capture) { clear(); - exp.compile(p_pattern.c_str(), expanded); + exp.compile(p_pattern.c_str(), capture); ERR_FAIL_COND_V( !exp.valid(), FAILED ); diff --git a/drivers/nrex/regex.h b/drivers/nrex/regex.h index be52da8149..76aab2aea6 100644 --- a/drivers/nrex/regex.h +++ b/drivers/nrex/regex.h @@ -36,7 +36,7 @@ public: bool is_valid() const; int get_capture_count() const; String get_capture(int capture) const; - Error compile(const String& p_pattern, bool expanded = false); + Error compile(const String& p_pattern, int capture = 9); int find(const String& p_text, int p_start = 0, int p_end = -1) const; RegEx(); diff --git a/drivers/theora/video_stream_theora.cpp b/drivers/theora/video_stream_theora.cpp index 01b6f4d35e..fe248bc911 100644 --- a/drivers/theora/video_stream_theora.cpp +++ b/drivers/theora/video_stream_theora.cpp @@ -411,6 +411,7 @@ void VideoStreamPlaybackTheora::set_file(const String& p_file) { th_decode_ctl(td,TH_DECCTL_GET_PPLEVEL_MAX,&pp_level_max, sizeof(pp_level_max)); pp_level=pp_level_max; + pp_level=0; th_decode_ctl(td,TH_DECCTL_SET_PPLEVEL,&pp_level,sizeof(pp_level)); pp_inc=0; @@ -620,7 +621,6 @@ void VideoStreamPlaybackTheora::update(float p_delta) { if(videobuf_time>=get_time()) { frame_done=true; - } else{ /*If we are too slow, reduce the pp level.*/ pp_inc=pp_level>0?-1:0; diff --git a/drivers/theora/video_stream_theora.h b/drivers/theora/video_stream_theora.h index 3d88ba4e4b..c15ef31cfc 100644 --- a/drivers/theora/video_stream_theora.h +++ b/drivers/theora/video_stream_theora.h @@ -138,20 +138,20 @@ class VideoStreamTheora : public VideoStream { OBJ_TYPE(VideoStreamTheora,VideoStream); String file; - int audio_track; + int audio_track; public: Ref<VideoStreamPlayback> instance_playback() { Ref<VideoStreamPlaybackTheora> pb = memnew( VideoStreamPlaybackTheora ); - pb->set_audio_track(audio_track); + pb->set_audio_track(audio_track); pb->set_file(file); return pb; } void set_file(const String& p_file) { file=p_file; } - void set_audio_track(int p_track) { audio_track=p_track; } + void set_audio_track(int p_track) { audio_track=p_track; } VideoStreamTheora() { audio_track=0; } diff --git a/drivers/unix/SCsub b/drivers/unix/SCsub index 9fbb467baa..e8b3cadfc7 100644 --- a/drivers/unix/SCsub +++ b/drivers/unix/SCsub @@ -1,5 +1,13 @@ Import('env') +ed_gl_set='#include "os_unix.h"\n' +ed_gl_set+='String OS_Unix::get_global_settings_path() const {\n' +ed_gl_set+='\treturn "' + env["unix_global_settings_path"]+'";\n' +ed_gl_set+='}\n' +f = open("os_unix_global_settings_path.cpp","wb") +f.write(ed_gl_set) +f.close() + env.add_source_files(env.drivers_sources,"*.cpp") Export('env') diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index fd8c26f6d9..94a7b03f45 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -477,6 +477,14 @@ String OS_Unix::get_data_dir() const { } +String OS_Unix::get_installed_templates_path() const { + String p=get_global_settings_path(); + if (p!="") + return p+"/templates/"; + else + return ""; +} + String OS_Unix::get_executable_path() const { #ifdef __linux__ diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h index 2ee6102164..9ac18c9055 100644 --- a/drivers/unix/os_unix.h +++ b/drivers/unix/os_unix.h @@ -64,6 +64,8 @@ protected: String stdin_buf; + String get_global_settings_path() const; + public: @@ -111,6 +113,7 @@ public: virtual void debug_break(); + virtual String get_installed_templates_path() const; virtual String get_executable_path() const; virtual String get_data_dir() const; diff --git a/drivers/webp/dec/alpha.c b/drivers/webp/dec/alpha.c index 52216fc4d6..1d029b0e6a 100644 --- a/drivers/webp/dec/alpha.c +++ b/drivers/webp/dec/alpha.c @@ -18,7 +18,7 @@ #include "../dsp/dsp.h" #include "../utils/quant_levels_dec.h" #include "../utils/utils.h" -#include "../webp/format_constants.h" +#include "webp/format_constants.h" //------------------------------------------------------------------------------ // ALPHDecoder object. diff --git a/drivers/webp/dec/decode_vp8.h b/drivers/webp/dec/decode_vp8.h index b9337bbec0..2bf1bdbbf5 100644 --- a/drivers/webp/dec/decode_vp8.h +++ b/drivers/webp/dec/decode_vp8.h @@ -14,7 +14,7 @@ #ifndef WEBP_WEBP_DECODE_VP8_H_ #define WEBP_WEBP_DECODE_VP8_H_ -#include "../webp/decode.h" +#include "webp/decode.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/dec/webp.c b/drivers/webp/dec/webp.c index 952178fa89..93a113a48d 100644 --- a/drivers/webp/dec/webp.c +++ b/drivers/webp/dec/webp.c @@ -17,7 +17,7 @@ #include "./vp8li.h" #include "./webpi.h" #include "../utils/utils.h" -#include "../webp/mux_types.h" // ALPHA_FLAG +#include "webp/mux_types.h" // ALPHA_FLAG //------------------------------------------------------------------------------ // RIFF layout is: diff --git a/drivers/webp/demux/anim_decode.c b/drivers/webp/demux/anim_decode.c index adf84cd193..c81cedfba0 100644 --- a/drivers/webp/demux/anim_decode.c +++ b/drivers/webp/demux/anim_decode.c @@ -11,15 +11,15 @@ // #ifdef HAVE_CONFIG_H -#include "../webp/config.h" +#include "webp/config.h" #endif #include <assert.h> #include <string.h> #include "../utils/utils.h" -#include "../webp/decode.h" -#include "../webp/demux.h" +#include "webp/decode.h" +#include "webp/demux.h" #define NUM_CHANNELS 4 diff --git a/drivers/webp/demux/demux.c b/drivers/webp/demux/demux.c index e8e5418efe..3717e21165 100644 --- a/drivers/webp/demux/demux.c +++ b/drivers/webp/demux/demux.c @@ -11,7 +11,7 @@ // #ifdef HAVE_CONFIG_H -#include "../webp/config.h" +#include "webp/config.h" #endif #include <assert.h> @@ -19,9 +19,9 @@ #include <string.h> #include "../utils/utils.h" -#include "../webp/decode.h" // WebPGetFeatures -#include "../webp/demux.h" -#include "../webp/format_constants.h" +#include "webp/decode.h" // WebPGetFeatures +#include "webp/demux.h" +#include "webp/format_constants.h" #define DMUX_MAJ_VERSION 0 #define DMUX_MIN_VERSION 2 diff --git a/drivers/webp/dsp/dsp.h b/drivers/webp/dsp/dsp.h index 8395df40e4..4613d9c3ff 100644 --- a/drivers/webp/dsp/dsp.h +++ b/drivers/webp/dsp/dsp.h @@ -15,10 +15,10 @@ #define WEBP_DSP_DSP_H_ #ifdef HAVE_CONFIG_H -#include "../webp/config.h" +#include "webp/config.h" #endif -#include "../webp/types.h" +#include "webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/dsp/lossless.h b/drivers/webp/dsp/lossless.h index ee6771333f..149c6a01d3 100644 --- a/drivers/webp/dsp/lossless.h +++ b/drivers/webp/dsp/lossless.h @@ -15,8 +15,8 @@ #ifndef WEBP_DSP_LOSSLESS_H_ #define WEBP_DSP_LOSSLESS_H_ -#include "../webp/types.h" -#include "../webp/decode.h" +#include "webp/types.h" +#include "webp/decode.h" #include "../enc/histogram.h" #include "../utils/utils.h" diff --git a/drivers/webp/enc/alpha.c b/drivers/webp/enc/alpha.c index fad6346e43..1842b36401 100644 --- a/drivers/webp/enc/alpha.c +++ b/drivers/webp/enc/alpha.c @@ -19,7 +19,7 @@ #include "../utils/filters.h" #include "../utils/quant_levels.h" #include "../utils/utils.h" -#include "../webp/format_constants.h" +#include "webp/format_constants.h" // ----------------------------------------------------------------------------- // Encodes the given alpha data via specified compression method 'method'. diff --git a/drivers/webp/enc/backward_references.h b/drivers/webp/enc/backward_references.h index daa084d846..e410b06f7d 100644 --- a/drivers/webp/enc/backward_references.h +++ b/drivers/webp/enc/backward_references.h @@ -15,8 +15,8 @@ #include <assert.h> #include <stdlib.h> -#include "../webp/types.h" -#include "../webp/format_constants.h" +#include "webp/types.h" +#include "webp/format_constants.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/enc/config.c b/drivers/webp/enc/config.c index f9f7961d58..8fd2276cb5 100644 --- a/drivers/webp/enc/config.c +++ b/drivers/webp/enc/config.c @@ -11,7 +11,7 @@ // // Author: Skal (pascal.massimino@gmail.com) -#include "../webp/encode.h" +#include "webp/encode.h" //------------------------------------------------------------------------------ // WebPConfig diff --git a/drivers/webp/enc/delta_palettization.c b/drivers/webp/enc/delta_palettization.c index 062e588d79..8bd3a3d233 100644 --- a/drivers/webp/enc/delta_palettization.c +++ b/drivers/webp/enc/delta_palettization.c @@ -13,7 +13,7 @@ #include "./delta_palettization.h" #ifdef WEBP_EXPERIMENTAL_FEATURES -#include "../webp/types.h" +#include "webp/types.h" #include "../dsp/lossless.h" #define MK_COL(r, g, b) (((r) << 16) + ((g) << 8) + (b)) diff --git a/drivers/webp/enc/delta_palettization.h b/drivers/webp/enc/delta_palettization.h index e41c0c5ab5..54195d452c 100644 --- a/drivers/webp/enc/delta_palettization.h +++ b/drivers/webp/enc/delta_palettization.h @@ -13,7 +13,7 @@ #ifndef WEBP_ENC_DELTA_PALETTIZATION_H_ #define WEBP_ENC_DELTA_PALETTIZATION_H_ -#include "../webp/encode.h" +#include "webp/encode.h" #include "../enc/vp8li.h" // Replaces enc->argb_[] input by a palettizable approximation of it, diff --git a/drivers/webp/enc/frame.c b/drivers/webp/enc/frame.c index 5b7a40b9ad..65a98ada4d 100644 --- a/drivers/webp/enc/frame.c +++ b/drivers/webp/enc/frame.c @@ -17,7 +17,7 @@ #include "./cost.h" #include "./vp8enci.h" #include "../dsp/dsp.h" -#include "../webp/format_constants.h" // RIFF constants +#include "webp/format_constants.h" // RIFF constants #define SEGMENT_VISU 0 #define DEBUG_SEARCH 0 // useful to track search convergence diff --git a/drivers/webp/enc/histogram.c b/drivers/webp/enc/histogram.c index 62c320d809..68c27fb1db 100644 --- a/drivers/webp/enc/histogram.c +++ b/drivers/webp/enc/histogram.c @@ -10,7 +10,7 @@ // Author: Jyrki Alakuijala (jyrki@google.com) // #ifdef HAVE_CONFIG_H -#include "../webp/config.h" +#include "webp/config.h" #endif #include <math.h> diff --git a/drivers/webp/enc/histogram.h b/drivers/webp/enc/histogram.h index adb16c01ca..72f045793a 100644 --- a/drivers/webp/enc/histogram.h +++ b/drivers/webp/enc/histogram.h @@ -17,8 +17,8 @@ #include <string.h> #include "./backward_references.h" -#include "../webp/format_constants.h" -#include "../webp/types.h" +#include "webp/format_constants.h" +#include "webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/enc/syntax.c b/drivers/webp/enc/syntax.c index a0e79ef404..2b65f15ca1 100644 --- a/drivers/webp/enc/syntax.c +++ b/drivers/webp/enc/syntax.c @@ -14,8 +14,8 @@ #include <assert.h> #include "../utils/utils.h" -#include "../webp/format_constants.h" // RIFF constants -#include "../webp/mux_types.h" // ALPHA_FLAG +#include "webp/format_constants.h" // RIFF constants +#include "webp/mux_types.h" // ALPHA_FLAG #include "./vp8enci.h" //------------------------------------------------------------------------------ diff --git a/drivers/webp/enc/vp8enci.h b/drivers/webp/enc/vp8enci.h index 1a7ebe5703..0cb2ccc353 100644 --- a/drivers/webp/enc/vp8enci.h +++ b/drivers/webp/enc/vp8enci.h @@ -20,7 +20,7 @@ #include "../utils/bit_writer.h" #include "../utils/thread.h" #include "../utils/utils.h" -#include "../webp/encode.h" +#include "webp/encode.h" #ifdef WEBP_EXPERIMENTAL_FEATURES #include "./vp8li.h" diff --git a/drivers/webp/enc/vp8l.c b/drivers/webp/enc/vp8l.c index 047c9032ac..284995e830 100644 --- a/drivers/webp/enc/vp8l.c +++ b/drivers/webp/enc/vp8l.c @@ -22,7 +22,7 @@ #include "../utils/bit_writer.h" #include "../utils/huffman_encode.h" #include "../utils/utils.h" -#include "../webp/format_constants.h" +#include "webp/format_constants.h" #include "./delta_palettization.h" diff --git a/drivers/webp/enc/vp8li.h b/drivers/webp/enc/vp8li.h index 6b6db127db..4543c3b260 100644 --- a/drivers/webp/enc/vp8li.h +++ b/drivers/webp/enc/vp8li.h @@ -17,8 +17,8 @@ #include "./backward_references.h" #include "./histogram.h" #include "../utils/bit_writer.h" -#include "../webp/encode.h" -#include "../webp/format_constants.h" +#include "webp/encode.h" +#include "webp/format_constants.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/mux/anim_encode.c b/drivers/webp/mux/anim_encode.c index fa86eaac94..bb7c0f50b9 100644 --- a/drivers/webp/mux/anim_encode.c +++ b/drivers/webp/mux/anim_encode.c @@ -15,10 +15,10 @@ #include <stdio.h> #include "../utils/utils.h" -#include "../webp/decode.h" -#include "../webp/encode.h" -#include "../webp/format_constants.h" -#include "../webp/mux.h" +#include "webp/decode.h" +#include "webp/encode.h" +#include "webp/format_constants.h" +#include "webp/mux.h" #if defined(_MSC_VER) && _MSC_VER < 1900 #define snprintf _snprintf diff --git a/drivers/webp/mux/muxi.h b/drivers/webp/mux/muxi.h index 718b2f5d58..8bd5291661 100644 --- a/drivers/webp/mux/muxi.h +++ b/drivers/webp/mux/muxi.h @@ -17,7 +17,7 @@ #include <stdlib.h> #include "../dec/vp8i.h" #include "../dec/vp8li.h" -#include "../webp/mux.h" +#include "webp/mux.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/bit_reader.c b/drivers/webp/utils/bit_reader.c index cd265321bb..5081d5cd4d 100644 --- a/drivers/webp/utils/bit_reader.c +++ b/drivers/webp/utils/bit_reader.c @@ -12,7 +12,7 @@ // Author: Skal (pascal.massimino@gmail.com) #ifdef HAVE_CONFIG_H -#include "../webp/config.h" +#include "webp/config.h" #endif #include "./bit_reader_inl.h" diff --git a/drivers/webp/utils/bit_reader.h b/drivers/webp/utils/bit_reader.h index 0fc62d33b7..7e09653ebc 100644 --- a/drivers/webp/utils/bit_reader.h +++ b/drivers/webp/utils/bit_reader.h @@ -19,7 +19,7 @@ #ifdef _MSC_VER #include <stdlib.h> // _byteswap_ulong #endif -#include "../webp/types.h" +#include "webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/bit_reader_inl.h b/drivers/webp/utils/bit_reader_inl.h index 37215702d4..20ce5f3cc7 100644 --- a/drivers/webp/utils/bit_reader_inl.h +++ b/drivers/webp/utils/bit_reader_inl.h @@ -17,7 +17,7 @@ #define WEBP_UTILS_BIT_READER_INL_H_ #ifdef HAVE_CONFIG_H -#include "../webp/config.h" +#include "webp/config.h" #endif #ifdef WEBP_FORCE_ALIGNED diff --git a/drivers/webp/utils/bit_writer.h b/drivers/webp/utils/bit_writer.h index ef360d1dc6..867a5ee055 100644 --- a/drivers/webp/utils/bit_writer.h +++ b/drivers/webp/utils/bit_writer.h @@ -14,7 +14,7 @@ #ifndef WEBP_UTILS_BIT_WRITER_H_ #define WEBP_UTILS_BIT_WRITER_H_ -#include "../webp/types.h" +#include "webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/color_cache.h b/drivers/webp/utils/color_cache.h index a9a9f64270..34299e4c4e 100644 --- a/drivers/webp/utils/color_cache.h +++ b/drivers/webp/utils/color_cache.h @@ -15,7 +15,7 @@ #ifndef WEBP_UTILS_COLOR_CACHE_H_ #define WEBP_UTILS_COLOR_CACHE_H_ -#include "../webp/types.h" +#include "webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/endian_inl.h b/drivers/webp/utils/endian_inl.h index e11260ff7d..253b7be8ee 100644 --- a/drivers/webp/utils/endian_inl.h +++ b/drivers/webp/utils/endian_inl.h @@ -13,11 +13,11 @@ #define WEBP_UTILS_ENDIAN_INL_H_ #ifdef HAVE_CONFIG_H -#include "../webp/config.h" +#include "webp/config.h" #endif #include "../dsp/dsp.h" -#include "../webp/types.h" +#include "webp/types.h" // some endian fix (e.g.: mips-gcc doesn't define __BIG_ENDIAN__) #if !defined(WORDS_BIGENDIAN) && \ diff --git a/drivers/webp/utils/filters.h b/drivers/webp/utils/filters.h index 088b132fc5..4aba3fd3b7 100644 --- a/drivers/webp/utils/filters.h +++ b/drivers/webp/utils/filters.h @@ -14,7 +14,7 @@ #ifndef WEBP_UTILS_FILTERS_H_ #define WEBP_UTILS_FILTERS_H_ -#include "../webp/types.h" +#include "webp/types.h" #include "../dsp/dsp.h" #ifdef __cplusplus diff --git a/drivers/webp/utils/huffman.c b/drivers/webp/utils/huffman.c index d57376aa6b..e6f482a6a8 100644 --- a/drivers/webp/utils/huffman.c +++ b/drivers/webp/utils/huffman.c @@ -16,7 +16,7 @@ #include <string.h> #include "./huffman.h" #include "../utils/utils.h" -#include "../webp/format_constants.h" +#include "webp/format_constants.h" // Huffman data read via DecodeImageStream is represented in two (red and green) // bytes. diff --git a/drivers/webp/utils/huffman.h b/drivers/webp/utils/huffman.h index c6dd6aaa45..a8cc0da1c3 100644 --- a/drivers/webp/utils/huffman.h +++ b/drivers/webp/utils/huffman.h @@ -15,8 +15,8 @@ #define WEBP_UTILS_HUFFMAN_H_ #include <assert.h> -#include "../webp/format_constants.h" -#include "../webp/types.h" +#include "webp/format_constants.h" +#include "webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/huffman_encode.c b/drivers/webp/utils/huffman_encode.c index 6421c2beed..d7aad6f56d 100644 --- a/drivers/webp/utils/huffman_encode.c +++ b/drivers/webp/utils/huffman_encode.c @@ -16,7 +16,7 @@ #include <string.h> #include "./huffman_encode.h" #include "../utils/utils.h" -#include "../webp/format_constants.h" +#include "webp/format_constants.h" // ----------------------------------------------------------------------------- // Util function to optimize the symbol map for RLE coding diff --git a/drivers/webp/utils/huffman_encode.h b/drivers/webp/utils/huffman_encode.h index a157165148..93610066f3 100644 --- a/drivers/webp/utils/huffman_encode.h +++ b/drivers/webp/utils/huffman_encode.h @@ -14,7 +14,7 @@ #ifndef WEBP_UTILS_HUFFMAN_ENCODE_H_ #define WEBP_UTILS_HUFFMAN_ENCODE_H_ -#include "../webp/types.h" +#include "webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/quant_levels.h b/drivers/webp/utils/quant_levels.h index 1cb5a32cae..3916b977ab 100644 --- a/drivers/webp/utils/quant_levels.h +++ b/drivers/webp/utils/quant_levels.h @@ -16,7 +16,7 @@ #include <stdlib.h> -#include "../webp/types.h" +#include "webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/quant_levels_dec.h b/drivers/webp/utils/quant_levels_dec.h index 9aab068076..29c7e6e205 100644 --- a/drivers/webp/utils/quant_levels_dec.h +++ b/drivers/webp/utils/quant_levels_dec.h @@ -14,7 +14,7 @@ #ifndef WEBP_UTILS_QUANT_LEVELS_DEC_H_ #define WEBP_UTILS_QUANT_LEVELS_DEC_H_ -#include "../webp/types.h" +#include "webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/random.h b/drivers/webp/utils/random.h index c392a615ca..745f3e2e87 100644 --- a/drivers/webp/utils/random.h +++ b/drivers/webp/utils/random.h @@ -15,7 +15,7 @@ #define WEBP_UTILS_RANDOM_H_ #include <assert.h> -#include "../webp/types.h" +#include "webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/rescaler.h b/drivers/webp/utils/rescaler.h index 98b01a76d0..868467b4d7 100644 --- a/drivers/webp/utils/rescaler.h +++ b/drivers/webp/utils/rescaler.h @@ -18,7 +18,7 @@ extern "C" { #endif -#include "../webp/types.h" +#include "webp/types.h" #define WEBP_RESCALER_RFIX 32 // fixed-point precision for multiplies #define WEBP_RESCALER_ONE (1ull << WEBP_RESCALER_RFIX) diff --git a/drivers/webp/utils/thread.h b/drivers/webp/utils/thread.h index 8408311855..6008bb7c01 100644 --- a/drivers/webp/utils/thread.h +++ b/drivers/webp/utils/thread.h @@ -15,10 +15,10 @@ #define WEBP_UTILS_THREAD_H_ #ifdef HAVE_CONFIG_H -#include "../webp/config.h" +#include "webp/config.h" #endif -#include "../webp/types.h" +#include "webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/utils.c b/drivers/webp/utils/utils.c index d8e30930af..35aeae6ab8 100644 --- a/drivers/webp/utils/utils.c +++ b/drivers/webp/utils/utils.c @@ -13,8 +13,8 @@ #include <stdlib.h> #include <string.h> // for memcpy() -#include "../webp/decode.h" -#include "../webp/encode.h" +#include "webp/decode.h" +#include "webp/encode.h" #include "./utils.h" // If PRINT_MEM_INFO is defined, extra info (like total memory used, number of diff --git a/drivers/webp/utils/utils.h b/drivers/webp/utils/utils.h index fcdb7e139b..d0e1cb250a 100644 --- a/drivers/webp/utils/utils.h +++ b/drivers/webp/utils/utils.h @@ -17,7 +17,7 @@ #include <assert.h> -#include "../webp/types.h" +#include "webp/types.h" #ifdef __cplusplus extern "C" { |