MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / readLine

Method readLine

source/util/bfile.cpp:90–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90bool BReadFile::readLine(BString& line) {
91 char c = 0;
92 bool result = false;
93 line.removeAll();
94 while (read(c)) {
95 if (c == '\n') {
96 return true;
97 }
98 if (c == '\r') {
99 continue;
100 }
101 line.append(c);
102 result = true;
103 }
104 return result;
105}
106
107bool BReadFile::read(char& value) {
108 return std::fread(&value, 1, 1, file) == 1;

Callers 7

runMethod · 0.80
mainMethod · 0.80
loadPackagesMethod · 0.80
readDefsMethod · 0.80
runMethod · 0.80
readLinesFromFileFunction · 0.80
readCommandMethod · 0.80

Calls 3

readFunction · 0.85
removeAllMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected