~ubuntu-branches/ubuntu/saucy/silversearcher-ag/saucy-proposed

« back to all changes in this revision

Viewing changes to src/ignore.c

  • Committer: Package Import Robot
  • Author(s): Hajime Mizuno
  • Date: 2013-05-12 16:21:12 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130512162112-osdw6ht1jon6l534
Tags: 0.15~pre+20130512-1
* new upstream release
* debian/control
  - add "Build-Depends: liblzma-dev" to search for .xz compressed files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include <ctype.h>
2
2
#include <dirent.h>
3
 
#include <fnmatch.h>
4
3
#include <stdio.h>
5
4
#include <stdlib.h>
6
5
#include <string.h>
12
11
#include "scandir.h"
13
12
#include "util.h"
14
13
 
 
14
#ifdef _WIN32
 
15
# include <shlwapi.h>
 
16
# define fnmatch(x, y, z) (!PathMatchSpec(y,x))
 
17
#else
 
18
# include <fnmatch.h>
 
19
const int fnmatch_flags = 0 & FNM_PATHNAME;
 
20
#endif
 
21
 
15
22
/* TODO: build a huge-ass list of files we want to ignore by default (build cache stuff, pyc files, etc) */
16
23
 
17
24
const char *evil_hardcoded_ignore_files[] = {
30
37
    NULL
31
38
};
32
39
 
33
 
const int fnmatch_flags = 0 & FNM_PATHNAME;
34
 
 
35
40
ignores *init_ignore(ignores *parent) {
36
41
    ignores *ig = ag_malloc(sizeof(ignores));
37
42
    ig->names = NULL;
104
109
    }
105
110
}
106
111
 
107
 
/* For loading git/svn/hg ignore patterns */
 
112
/* For loading git/hg ignore patterns */
108
113
void load_ignore_patterns(ignores *ig, const char *path) {
109
114
    FILE *fp = NULL;
110
115
    fp = fopen(path, "r");