projects
/
mussa.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
PyQt compatible Python wrapping using SIP
[mussa.git]
/
alg
/
io.cpp
1
#include "io.hpp"
2
3
void multiplatform_getline(std::istream& in, std::string& line)
4
{
5
line.clear();
6
char c;
7
in.get(c);
8
while(in.good() and !(c == '\012' or c == '\015') ) {
9
line.push_back(c);
10
in.get(c);
11
}
12
// if we have cr-lf eat it
13
c = in.peek();
14
if (c=='\012' or c == '\015') {
15
in.get();
16
}
17
}