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:
-rw-r--r--source/blender/blenfont/BLF_api.h1
-rw-r--r--source/blender/blenlib/BLI_fnmatch.h2
-rw-r--r--source/blender/editors/space_file/filesel.c12
-rw-r--r--source/blender/editors/space_outliner/outliner.c24
4 files changed, 29 insertions, 10 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h
index 1cec570fd09..933d287bcff 100644
--- a/source/blender/blenfont/BLF_api.h
+++ b/source/blender/blenfont/BLF_api.h
@@ -104,6 +104,7 @@ void BLF_disable_default(int option);
*/
void BLF_rotation(int fontid, float angle);
void BLF_clipping(int fontid, float xmin, float ymin, float xmax, float ymax);
+void BLF_clipping_default(float xmin, float ymin, float xmax, float ymax);
void BLF_blur(int fontid, int size);
void BLF_enable(int fontid, int option);
diff --git a/source/blender/blenlib/BLI_fnmatch.h b/source/blender/blenlib/BLI_fnmatch.h
index 2c122104f1f..1dffb285451 100644
--- a/source/blender/blenlib/BLI_fnmatch.h
+++ b/source/blender/blenlib/BLI_fnmatch.h
@@ -47,7 +47,7 @@ extern "C" {
#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
-
+
#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)
#define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 64ca0a8e572..ea098ffcdb4 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -77,16 +77,10 @@
#include "file_intern.h"
#include "filelist.h"
-#if defined __BeOS
-static int fnmatch(const char *pattern, const char *string, int flags)
-{
- return 0;
-}
-#elif defined WIN32 && !defined _LIBC
- /* use fnmatch included in blenlib */
- #include "BLI_fnmatch.h"
+#if defined WIN32 && !defined _LIBC
+# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
#else
- #include <fnmatch.h>
+# include <fnmatch.h>
#endif
FileSelectParams* ED_fileselect_get_params(struct SpaceFile *sfile)
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index 49cd196231e..1ec203ac740 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -50,6 +50,13 @@
#include "BLI_blenlib.h"
+#if defined WIN32 && !defined _LIBC
+# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
+#else
+# define _GNU_SOURCE
+# include <fnmatch.h>
+#endif
+
#include "IMB_imbuf_types.h"
#include "BKE_animsys.h"
@@ -1237,6 +1244,7 @@ void add_seq_dup(SpaceOops *soops, Sequence *seq, TreeElement *te, short index)
static int outliner_filter_has_name(TreeElement *te, char *name, int flags)
{
+#if 0
int found= 0;
/* determine if match */
@@ -1252,8 +1260,24 @@ static int outliner_filter_has_name(TreeElement *te, char *name, int flags)
else
found= BLI_strcasestr(te->name, name) != NULL;
}
+#else
+
+ int fn_flag= 0;
+ int found= 0;
+ if(flags & SO_FIND_CASE_SENSITIVE)
+ fn_flag |= FNM_CASEFOLD;
+
+ if(flags & SO_FIND_COMPLETE) {
+ found= fnmatch(name, te->name, fn_flag)==0;
+ }
+ else {
+ char fn_name[sizeof(((struct SpaceOops *)NULL)->search_string) + 2];
+ sprintf(fn_name, "*%s*", name);
+ found= fnmatch(fn_name, te->name, fn_flag)==0;
+ }
return found;
+#endif
}
static int outliner_filter_tree(SpaceOops *soops, ListBase *lb)