Home
last modified time | relevance | path

Searched refs:string (Results 1 – 25 of 82) sorted by relevance

1234

/build/kati/
Dfunc.cc45 void StripShellComment(string* cmd) { in StripShellComment()
46 if (cmd->find('#') == string::npos) in StripShellComment()
49 string res; in StripShellComment()
97 void PatsubstFunc(const vector<Value*>& args, Evaluator* ev, string* s) { in PatsubstFunc()
98 const string&& pat_str = args[0]->Eval(ev); in PatsubstFunc()
99 const string&& repl = args[1]->Eval(ev); in PatsubstFunc()
100 const string&& str = args[2]->Eval(ev); in PatsubstFunc()
109 void StripFunc(const vector<Value*>& args, Evaluator* ev, string* s) { in StripFunc()
110 const string&& str = args[0]->Eval(ev); in StripFunc()
117 void SubstFunc(const vector<Value*>& args, Evaluator* ev, string* s) { in SubstFunc()
[all …]
Dninja.cc51 if (found == string::npos || found == 0) in FindCommandLineFlag()
52 return string::npos; in FindCommandLineFlag()
59 if (index == string::npos) in FindCommandLineFlagWithArg()
64 while (index != string::npos) { in FindCommandLineFlagWithArg()
82 if (index == string::npos) in GetGomaccPosForAndroidCompileCommand()
83 return string::npos; in GetGomaccPosForAndroidCompileCommand()
88 return pos == string::npos ? string::npos : pos + index; in GetGomaccPosForAndroidCompileCommand()
91 return string::npos; in GetGomaccPosForAndroidCompileCommand()
93 return string::npos; in GetGomaccPosForAndroidCompileCommand()
96 return string::npos; in GetGomaccPosForAndroidCompileCommand()
[all …]
Dstrutil.h52 explicit WordWriter(string* o);
57 string* out_;
73 inline string JoinStrings(vector<String> v, const char* sep) { in JoinStrings()
74 string r; in JoinStrings()
84 void AppendString(StringPiece str, string* out);
102 void AppendSubst(StringPiece str, StringPiece subst, string* out) const;
104 void AppendSubstRef(StringPiece str, StringPiece subst, string* out) const;
113 string NoLineBreak(const string& s);
123 void NormalizePath(string* o);
124 void AbsPath(StringPiece s, string* o);
[all …]
Dfileutil.cc63 int RunCommand(const string& shell, const string& cmd, in RunCommand()
65 string* s) { in RunCommand()
66 string cmd_escaped = cmd; in RunCommand()
68 string cmd_with_shell = shell + " -c \"" + cmd_escaped + "\""; in RunCommand()
124 void GetExecutablePath(string* path) { in GetExecutablePath()
154 void Get(const char* pat, vector<string>** files) { in Get()
157 vector<string>* files = p.first->second = new vector<string>; in Get()
173 const unordered_map<string, vector<string>*>& GetAll() const { in GetAll()
185 unordered_map<string, vector<string>*> cache_;
192 void Glob(const char* pat, vector<string>** files) { in Glob()
[all …]
Dfind.cc40 virtual bool IsTrue(const string& path, unsigned char type) const = 0;
49 explicit NameCond(const string& n) in NameCond()
52 virtual bool IsTrue(const string& path, unsigned char) const override { in IsTrue()
56 string name_;
64 virtual bool IsTrue(const string&, unsigned char type) const override { in IsTrue() argument
76 virtual bool IsTrue(const string& path, unsigned char type) const override { in IsTrue()
88 virtual bool IsTrue(const string& path, unsigned char type) const override { in IsTrue()
102 virtual bool IsTrue(const string& path, unsigned char type) const override { in IsTrue()
119 string* path,
120 unordered_map<const DirentNode*, string>* cur_read_dirs,
[all …]
Dfileutil.h37 int RunCommand(const string& shell, const string& cmd,
39 string* out);
41 void GetExecutablePath(string* path);
43 void Glob(const char* pat, vector<string>** files);
45 const unordered_map<string, vector<string>*>& GetAllGlobCache();
Dstrutil.cc113 WordWriter::WordWriter(string* o) in WordWriter()
140 void AppendString(StringPiece str, string* out) { in AppendString()
156 if (found == string::npos) in HasWord()
178 if (percent_index_ == string::npos) in Match()
196 string* out) const { in AppendSubst()
197 if (percent_index_ == string::npos) { in AppendSubst()
209 if (subst_percent_index == string::npos) { in AppendSubst()
224 string* out) const { in AppendSubstRef()
225 if (percent_index_ != string::npos && subst.find('%') != string::npos) { in AppendSubstRef()
234 string NoLineBreak(const string& s) { in NoLineBreak()
[all …]
Dcommand.cc47 virtual string DebugString() const override { in DebugString()
48 return string("AutoVar(") + sym_ + ")"; in DebugString()
65 virtual void Eval(Evaluator* ev, string* s) const override; \
81 virtual void Eval(Evaluator* ev, string* s) const override;
92 virtual void Eval(Evaluator* ev, string* s) const override;
98 void AutoAtVar::Eval(Evaluator*, string* s) const { in Eval()
102 void AutoLessVar::Eval(Evaluator*, string* s) const { in Eval()
108 void AutoHatVar::Eval(Evaluator*, string* s) const { in Eval()
117 void AutoPlusVar::Eval(Evaluator*, string* s) const { in Eval()
124 void AutoStarVar::Eval(Evaluator*, string* s) const { in Eval()
[all …]
Dregen.cc50 string pat;
51 vector<string> result;
55 string cmd;
56 string result;
57 vector<string> missing_dirs;
58 vector<string> read_dirs;
76 bool NeedsRegen(double start_time, const string& orig_args) { in NeedsRegen()
114 bool CheckStep1(const string& orig_args) { in CheckStep1()
131 const string& stamp_filename = GetNinjaStampFilename(); in CheckStep1()
150 string s, s2; in CheckStep1()
[all …]
Dninja.h32 const string& orig_args,
35 string GetNinjaFilename();
36 string GetNinjaShellScriptFilename();
37 string GetNinjaStampFilename();
40 bool GetDepfileFromCommand(string* cmd, string* out);
Dvar.h57 virtual string DebugString() const = 0;
66 SimpleVar(const string& v, VarOrigin origin);
75 virtual void Eval(Evaluator* ev, string* s) const override;
81 virtual string DebugString() const override;
83 string* mutable_value() { return &v_; } in mutable_value()
86 string v_;
101 virtual void Eval(Evaluator* ev, string* s) const override;
107 virtual string DebugString() const override;
127 virtual void Eval(Evaluator* ev, string* s) const override;
131 virtual string DebugString() const override;
[all …]
Dstmt.h60 virtual string DebugString() const = 0;
79 virtual string DebugString() const;
96 virtual string DebugString() const;
112 virtual string DebugString() const;
126 virtual string DebugString() const;
137 virtual string DebugString() const;
148 virtual string DebugString() const;
152 string msg;
158 virtual string DebugString() const;
Dfind.h39 bool Parse(const string& cmd);
42 string chdir;
43 string testdir;
52 unique_ptr<unordered_set<string>> read_dirs;
63 virtual bool HandleFind(const string& cmd, const FindCommand& fc,
64 string* out) = 0;
Dninja_test.cc25 string GetDepfile(string cmd, string* new_cmd) { in GetDepfile()
27 string r; in GetDepfile()
36 string new_cmd; in TestGetDepfile()
69 ASSERT_EQ(GetGomaccPosForAndroidCompileCommand("echo foo"), string::npos); in TestGetGomaccPosForAndroidCompileCommand()
Dfile.h29 explicit Makefile(const string& filename);
32 const string& buf() const { return buf_; } in buf()
33 const string& filename() const { return filename_; } in filename()
41 string buf_;
43 string filename_;
Dexpr.cc34 string Evaluable::Eval(Evaluator* ev) const { in Eval()
35 string s; in Eval()
46 string Value::DebugString() const { in DebugString()
61 virtual void Eval(Evaluator*, string* s) const override { in Eval()
68 virtual string DebugString_() const override { in DebugString_()
92 virtual void Eval(Evaluator* ev, string* s) const override { in Eval()
98 virtual string DebugString_() const override { in DebugString_()
99 string r; in DebugString_()
135 virtual void Eval(Evaluator* ev, string* s) const override { in Eval()
140 virtual string DebugString_() const override { in DebugString_()
[all …]
Deval.cc111 const string&& expr = stmt->expr->Eval(this); in EvalRule()
113 if (expr.find_first_not_of(" \t;") == string::npos) { in EvalRule()
189 string var_name; in EvalIf()
192 if (lhs.str().find_first_of(" \t") != string::npos) in EvalIf()
195 const string&& s = v->Eval(this); in EvalIf()
201 const string&& lhs = stmt->lhs->Eval(this); in EvalIf()
202 const string&& rhs = stmt->rhs->Eval(this); in EvalIf()
223 void Evaluator::DoInclude(const string& fname) { in DoInclude()
239 const string&& pats = stmt->expr->Eval(this); in EvalInclude()
242 vector<string>* files; in EvalInclude()
[all …]
Dstmt.cc28 string RuleStmt::DebugString() const { in DebugString()
36 string AssignStmt::DebugString() const { in DebugString()
60 string buf; in GetLhsSymbol()
71 string CommandStmt::DebugString() const { in DebugString()
76 string IfStmt::DebugString() const { in DebugString()
93 string IncludeStmt::DebugString() const { in DebugString()
98 string ExportStmt::DebugString() const { in DebugString()
105 string ParseErrorStmt::DebugString() const { in DebugString()
Drule.cc45 return s.find('%') != string::npos; in IsPatternRule()
59 if (index == string::npos) { in ParseRule()
87 if ((term_index != string::npos && rest[term_index] == '=') || in ParseRule()
88 (term_index == string::npos && term == '=')) { in ParseRule()
89 if (term_index == string::npos) in ParseRule()
107 if (term_index != string::npos && term != ';') { in ParseRule()
116 if (index == string::npos) { in ParseRule()
153 string Rule::DebugString() const { in DebugString()
154 vector<string> v; in DebugString()
Dvar.cc54 SimpleVar::SimpleVar(const string& v, VarOrigin origin) in SimpleVar()
58 void SimpleVar::Eval(Evaluator*, string* s) const { in Eval()
63 string buf; in AppendVar()
73 string SimpleVar::DebugString() const { in DebugString()
81 void RecursiveVar::Eval(Evaluator* ev, string* s) const { in Eval()
93 string RecursiveVar::DebugString() const { in DebugString()
99 void UndefinedVar::Eval(Evaluator*, string*) const { in Eval()
107 string UndefinedVar::DebugString() const { in DebugString()
/build/tools/atree/
Dfiles.h21 string listFile;
24 string sourceBase;
25 string sourceName;
26 string sourcePath;
32 string outName;
33 string outPath;
40 int read_list_file(const string& filename,
41 const map<string, string>& variables,
43 vector<string>* excludes);
44 int locate(FileRecord* rec, const vector<string>& search);
[all …]
Dfiles.cpp22 static string
23 path_append(const string& base, const string& leaf) in path_append()
25 string full = base; in path_append()
62 split_line(const char* p, vector<string>* out) in split_line()
94 out->push_back(string(start, len)); in split_line()
109 out->push_back(string(start, len)); in split_line()
115 const string& listFile, int listLine, in add_file()
116 const string& sourceName, const string& outName) in add_file()
127 static string
128 replace_variables(const string& input, in replace_variables()
[all …]
Datree.cpp16 vector<string> g_listFiles;
17 vector<string> g_inputBases;
18 map<string, string> g_variables;
19 string g_outputBase;
20 string g_dependency;
75 var << "${" << string(arg, p-arg) << "}"; in add_variable()
76 g_variables[var.str()] = string(p+1); in add_variable()
94 static string
95 escape_filename(const string name) in escape_filename()
98 for (string::const_iterator iter = name.begin(); iter != name.end(); ++iter) in escape_filename()
[all …]
Dfs.cpp21 is_dir(const string& path) in is_dir()
30 remove_file(const string& path) in remove_file()
42 remove_recursively(const string& path) in remove_recursively()
54 vector<string> files; in remove_recursively()
55 vector<string> dirs; in remove_recursively()
63 string full = path; in remove_recursively()
75 for (vector<string>::iterator it=files.begin(); it!=files.end(); it++) { in remove_recursively()
82 for (vector<string>::iterator it=dirs.begin(); it!=dirs.end(); it++) { in remove_recursively()
102 mkdir_recursively(const string& path) in mkdir_recursively()
112 string p = path.substr(0, pos); in mkdir_recursively()
[all …]
Dfs.h8 int remove_recursively(const string& path);
9 int mkdir_recursively(const string& path);
10 int copy_file(const string& src, const string& dst);
11 int strip_file(const string& path);

1234