updated libtool
[vimicxx.git] / src / cscope_db.cc
blob5d1862c59ace2b67de7082220175afbcfd4224aa
1 /*******************************************************************************
2 ********************************************************************************
4 Copyright (c) 2008 Ahmed S. Badran
6 Licensed under the FreeBSD License (see LICENSE)
8 Filename: cscope_db.cc
9 Description: Implementation.
10 Created: 09/17/2008 11:01:30 PM PDT
11 Author: Ahmed S. Badran (Ahmed B.), ahmed.badran@gmail.com
13 ********************************************************************************
14 *******************************************************************************/
15 #include "cscope_db.h"
16 #include "tree_builder.h"
17 #include "fs_item.h"
19 cscope_db::cscope_db (const string& prj_, const string& prj_path_, const
20 string& prj_index_, const string& prj_flist_, const
21 string& prj_cscope_db_, const vector<string>&
22 extensions_):
23 prj(prj_), prj_path(prj_path_), prj_index(prj_index_),
24 prj_flist(prj_flist_), prj_cscope_db(prj_cscope_db_),
25 extension_list(extensions_)
29 bool
30 cscope_db::create ()
32 tree_builder* builder = tree_builder::get_instance();
33 const fs_item* tree = builder->build(prj_path, extension_list,
34 &file_list);
35 FILE* tmp;
36 if ((tmp = fopen(prj_flist.c_str(), "w")) == 0) {
37 perror("fopen");
38 return false;
40 for (i = 0; i < file_list.size(); ++i) {
41 fprintf("%s\n", file_list[i].c_str());
43 fclose(tmp);
46 void
47 cscope_db::add_file (const string& new_file)
51 void
52 cscope_db::update ()
56 cscope_db::~cscope_db ()