Lines Matching +full:- +full:p

14 is_comment_line(const char* p)  in is_comment_line()  argument
16 while (*p && isspace(*p)) { in is_comment_line()
17 p++; in is_comment_line()
19 return *p == '#'; in is_comment_line()
34 is_whitespace_line(const char* p) in is_whitespace_line() argument
36 while (*p) { in is_whitespace_line()
37 if (!isspace(*p)) { in is_whitespace_line()
40 p++; in is_whitespace_line()
46 is_exclude_line(const char* p) { in is_exclude_line() argument
47 while (*p) { in is_exclude_line()
48 if (*p == '-') { in is_exclude_line()
51 else if (isspace(*p)) { in is_exclude_line()
52 p++; in is_exclude_line()
62 split_line(const char* p, vector<string>* out) in split_line() argument
64 const char* q = p; in split_line()
66 while (*p) { in split_line()
67 if (*p == '#') { in split_line()
74 if (!isspace(*p)) { in split_line()
75 q = p; in split_line()
76 state = (*p == '"') ? IN_QUOTE : TEXT; in split_line()
80 if (*p == '"') { in split_line()
86 if (state != IN_QUOTE && isspace(*p)) { in split_line()
87 if (q != p) { in split_line()
89 size_t len = p-q; in split_line()
90 if (len > 2 && *start == '"' && start[len - 1] == '"') { in split_line()
92 len -= 2; in split_line()
94 out->push_back(string(start, len)); in split_line()
100 p++; in split_line()
104 size_t len = p-q; in split_line()
105 if (len > 2 && *start == '"' && start[len - 1] == '"') { in split_line()
107 len -= 2; in split_line()
109 out->push_back(string(start, len)); in split_line()
124 files->push_back(rec); in add_file()
153 while((pos = result.find(it->first, pos)) != string::npos) { in replace_variables()
154 result = result.replace(pos, it->first.length(), it->second); in replace_variables()
155 pos += it->second.length(); in replace_variables()
159 if (did_replace && --retries == 0) { in replace_variables()
167 it->first.c_str(), it->second.c_str()); in replace_variables()
187 char *p, *q; in read_list_file() local
232 p = buf; in read_list_file()
235 while (p<q) { in read_list_file()
236 if (*p == '\r' || *p == '\n') { in read_list_file()
237 *p = '\0'; in read_list_file()
240 p++; in read_list_file()
244 p = buf; in read_list_file()
246 int len = strlen(p); in read_list_file()
247 q = p + len + 1; in read_list_file()
248 if (is_whitespace_line(p) || is_comment_line(p)) { in read_list_file()
251 else if (is_exclude_line(p)) { in read_list_file()
252 while (*p != '-') p++; in read_list_file()
253 p++; in read_list_file()
254 excludes->push_back(string(p)); in read_list_file()
259 split_line(p, &words); in read_list_file()
305 filename.c_str(), i+1, p, errstr.c_str()); in read_list_file()
316 p = q; in read_list_file()
333 if (rec->fileOp == FILE_OP_REMOVE) { in locate()
335 rec->sourceMod = 0; in locate()
336 rec->sourceSize = 0; in locate()
337 rec->sourceIsDir = false; in locate()
345 string full = path_append(*it, rec->sourceName); in locate()
349 rec->sourceBase = *it; in locate()
350 rec->sourcePath = full; in locate()
351 rec->sourceMod = st.st_mtime; in locate()
352 rec->sourceSize = st.st_size; in locate()
353 rec->sourceIsDir = S_ISDIR(st.st_mode); in locate()
359 rec->listFile.c_str(), rec->listLine, rec->sourceName.c_str()); in locate()
366 rec->outPath = path_append(base, rec->outName); in stat_out()
370 err = stat(rec->outPath.c_str(), &st); in stat_out()
372 rec->outMod = st.st_mtime; in stat_out()
373 rec->outSize = st.st_size; in stat_out()
374 rec->outIsDir = S_ISDIR(st.st_mode); in stat_out()
376 rec->outMod = 0; in stat_out()
377 rec->outSize = 0; in stat_out()
378 rec->outIsDir = false; in stat_out()
408 more->push_back(r); in add_more()
416 if (0 == fnmatch(it->c_str(), file, FNM_PERIOD)) { in matches_excludes()
440 if (0 == strcmp(".", ent->d_name) in list_dir()
441 || 0 == strcmp("..", ent->d_name)) { in list_dir()
444 if (matches_excludes(ent->d_name, excludes)) { in list_dir()
447 string entry = path_append(path, ent->d_name); in list_dir()
448 bool is_directory = (ent->d_type == DT_DIR); in list_dir()