mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-27 16:38:20 +03:00
premake4 minor fix.
TextDocument minor fix for CLRF.
This commit is contained in:
+5
-1
@@ -496,7 +496,11 @@ end
|
||||
|
||||
function generate_os_links()
|
||||
if os.is_real("linux") then
|
||||
multiple_insert( os_links, { "rt", "pthread", "X11", "openal", "GL", "Xcursor" } )
|
||||
multiple_insert( os_links, { "rt", "pthread", "X11", "GL" } )
|
||||
|
||||
if not _OPTIONS["with-mojoal"] then
|
||||
table.insert( os_links, "openal" )
|
||||
end
|
||||
|
||||
if _OPTIONS["with-static-eepp"] then
|
||||
table.insert( os_links, "dl" )
|
||||
|
||||
@@ -109,16 +109,18 @@ bool TextDocument::loadFromStream( IOStream& file, std::string path, bool callRe
|
||||
lineBuffer += ptrGetLine( bufferPtr, consume, position );
|
||||
bufferPtr += position;
|
||||
consume -= position;
|
||||
size_t lineBufferSize = lineBuffer.size();
|
||||
|
||||
if ( lineBuffer[lineBuffer.size() - 1] == '\n' || !consume ) {
|
||||
if ( mLines.empty() && lineBuffer.size() > 1 &&
|
||||
lineBuffer[lineBuffer.size() - 2] == '\r' ) {
|
||||
if ( lineBuffer[lineBufferSize - 1] == '\n' || !consume ) {
|
||||
if ( mLines.empty() && lineBufferSize > 1 &&
|
||||
lineBuffer[lineBufferSize - 2] == '\r' ) {
|
||||
mLineEnding = LineEnding::CRLF;
|
||||
}
|
||||
|
||||
if ( mLineEnding == LineEnding::CRLF && lineBuffer.size() > 1 ) {
|
||||
if ( mLineEnding == LineEnding::CRLF && lineBufferSize > 1 &&
|
||||
lineBuffer[lineBufferSize - 1] == '\n' ) {
|
||||
lineBuffer[lineBuffer.size() - 2] = '\n';
|
||||
lineBuffer.resize( lineBuffer.size() - 1 );
|
||||
lineBuffer.resize( lineBufferSize - 1 );
|
||||
}
|
||||
|
||||
mLines.push_back( lineBuffer );
|
||||
|
||||
Reference in New Issue
Block a user