-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathfiltration.h
More file actions
35 lines (23 loc) · 768 Bytes
/
filtration.h
File metadata and controls
35 lines (23 loc) · 768 Bytes
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
#ifndef FILTRATION_H
#define FILTRATION_H
#include "scorer.h"
#include "vector.h"
struct filename {
char *p;
int dirlength;
int restlen;
};
extern char filter_dir_separator;
extern int dont_sort;
extern int ignore_positions;
// vector of struct filter_result
extern struct vector filtered;
typedef void (*filter_destructor)(void *);
typedef int (*filter_func)(struct filename *, const void *, struct filter_result *, unsigned *);
void *prepare_filter(const char *filter, filter_func *func, filter_destructor *destructor);
void filter_files_sync(char *pattern);
void filter_files(char *pattern, void (*callback)(char *));
int obtain_match(const char *pattern, int files_index, unsigned *match);
void uninit_filter(void);
#define FILTER_LIMIT 1000
#endif