示例#1
0
bool plStatusLog::AddLine( const char *line, uint32_t color )
{
    char    *c, *str;
    if(fLoggingOff && !fForceLog)
        return true;

    bool ret = true;

    /// Scan for carriage returns and feed each section into IAddLine()
    for( str = (char *)line; ( c = strchr( str, '\n' ) ) != nil; str = c + 1 )
    {
        // So if we got here, c points to a carriage return...
        ret = IAddLine( str, (uintptr_t)c - (uintptr_t)str, color );
    }

    /// We might have some left over
    if( strlen( str ) > 0 )
    {
        ret &= IAddLine( str, -1, color );
    }

    return ret;
}
示例#2
0
bool plStatusLog::AddLine(const plString& line)
{
    if (fLoggingOff && !fForceLog) {
        return true;
    }

    bool ret = true;
    std::vector<plString> lines = line.Split("\n");

    for (plString& str : lines)
    {
        ret &= IAddLine(str.c_str(), -1, kWhite);
    }

    return ret;
}