Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 137784 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-2 / +24 lines)
Line  Link Here
0
-- src/eixTk/utils.cc
0
++ src/eixTk/utils.cc
Lines 43-49 Link Here
43
using namespace std;
43
using namespace std;
44
44
45
/** push_back every line of file into v. */
45
/** push_back every line of file into v. */
46
bool pushback_lines(const char *file, vector<string> *v, bool removed_empty)
46
bool pushback_lines_file(const char *file, vector<string> *v, bool removed_empty)
47
{
47
{
48
	string line;
48
	string line;
49
	ifstream ifstr(file);
49
	ifstream ifstr(file);
Lines 71-76 Link Here
71
	return false;
71
	return false;
72
}
72
}
73
73
74
/** push_back every line of file or dir into v. */
75
bool pushback_lines(const char *file_dir, vector<string> *v, bool removed_empty)
76
{
77
	static const char *files_exclude[] = { "..", "." , NULL };
78
	vector<string> files;
79
	string dir(file_dir);
80
	dir += "/";
81
	if(pushback_files(dir, files, files_exclude))
82
	{
83
		bool rvalue=true;
84
		for(vector<string>::iterator it=files.begin();
85
			it<files.end(); ++it)
86
		{
87
			if(! pushback_lines_file(it->c_str(), v, removed_empty))
88
				rvalue=false;
89
		}
90
		return rvalue;
91
	}
92
	else
93
		return pushback_lines_file(file_dir, v, removed_empty);
94
}
95
74
/** List of files in directory.
96
/** List of files in directory.
75
 * Pushed names of file in directory into string-vector if the don't match any
97
 * Pushed names of file in directory into string-vector if the don't match any
76
 * char * in given exlude list.
98
 * char * in given exlude list.

Return to bug 137784