Lines Matching refs:fcontents
51 def fail(self, fpath, regexp, fcontents, match_txt, correct, fix): argument
65 return fcontents
72 fixed_fcontents = re.sub(match_txt, correct, fcontents)
78 return fcontents
84 fcontents = load(fpath)
86 match = self.ifndef_re.search(fcontents)
98 fcontents = self.fail(fpath, match.re, match.string, match.group(1),
100 if fix: save(fpath, fcontents)
104 fcontents = self.fail(fpath, match.re, match.string, match.group(1),
106 if fix: save(fpath, fcontents)
109 match = self.define_re.search(fcontents)
117 fcontents = self.fail(fpath, match.re, match.string, match.group(1),
119 if fix: save(fpath, fcontents)
123 flines = fcontents.rstrip().splitlines()
134 fcontents = '\n'.join(flines)
135 save(fpath, fcontents)
141 fcontents = self.fail(fpath, endif_re, fcontents, match.group(1),
143 if fix: save(fpath, fcontents)