mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-29 13:27:59 +03:00
feat: newline stuff
This commit is contained in:
@@ -131,7 +131,31 @@ namespace config
|
|||||||
else if (c == '=')
|
else if (c == '=')
|
||||||
token.type = ASSIGN;
|
token.type = ASSIGN;
|
||||||
else if (c == '\n')
|
else if (c == '\n')
|
||||||
|
{
|
||||||
token.type = NEWLINE;
|
token.type = NEWLINE;
|
||||||
|
|
||||||
|
std::streampos prev_pos;
|
||||||
|
file.get(c);
|
||||||
|
if (c != '\n')
|
||||||
|
{
|
||||||
|
file.seekg(-1, std::ios_base::cur);
|
||||||
|
}
|
||||||
|
else if (file.eof())
|
||||||
|
{
|
||||||
|
file.clear();
|
||||||
|
DBOUT << "cleared" <<ENDL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DBOUT << "no" <<ENDL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// while (c == '\n')
|
||||||
|
// file.get(c);
|
||||||
|
// if (c != '\n')
|
||||||
|
// file.seekg(-1, std::ios_base::cur);
|
||||||
|
|
||||||
|
}
|
||||||
else if (c == '-' || isdigit(c))
|
else if (c == '-' || isdigit(c))
|
||||||
{
|
{
|
||||||
std::streampos prevCharPos;
|
std::streampos prevCharPos;
|
||||||
|
|||||||
Reference in New Issue
Block a user