2 * sparse/smatch_files.c
4 * Copyright (C) 2009 Dan Carpenter.
6 * Licensed under the Open Software License version 1.1
16 static int open_file(const char *filename
)
19 char *buf
= malloc(256);
21 fd
= open(filename
, O_RDONLY
);
24 strncpy(buf
, bin_dir
, 254);
26 strncat(buf
, "/smatch_data/", 254);
27 strncat(buf
, filename
, 254);
28 fd
= open(buf
, O_RDONLY
);
37 struct token
*get_tokens_file(const char *filename
)
42 fd
= open_file(filename
);
45 token
= tokenize(filename
, fd
, NULL
, NULL
);