Trivial changes, mostly to clean up diff noise. Majority of changes are comment corrections or licenseinfo updates. (does not include newview directory)

This commit is contained in:
Shyotl
2013-01-07 14:44:54 -06:00
parent 69e0738096
commit d71210e942
187 changed files with 3343 additions and 4244 deletions

View File

@@ -4,31 +4,25 @@
* @date 2006-03-05
* @brief Implementation of LLSD parsers and formatters
*
* $LicenseInfo:firstyear=2006&license=viewergpl$
*
* Copyright (c) 2006-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -39,6 +33,7 @@
#include <iostream>
#include "apr_base64.h"
#ifdef LL_STANDALONE
# include <zlib.h>
#else
@@ -63,6 +58,7 @@ const std::string LLSD_XML_HEADER("LLSD/XML");
//used to deflate a gzipped asset (currently used for navmeshes)
#define windowBits 15
#define ENABLE_ZLIB_GZIP 32
/**
* LLSDSerialize
*/
@@ -118,7 +114,7 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes)
if (!strncasecmp(LEGACY_NON_HEADER, hdr_buf, strlen(LEGACY_NON_HEADER))) /* Flawfinder: ignore */
{
legacy_no_header = true;
inbuf = str.gcount();
inbuf = (int)str.gcount();
}
else
{
@@ -351,7 +347,7 @@ std::istream& LLSDParser::get(
char delim) const
{
istr.get(s, n, delim);
if(mCheckLimits) mMaxBytesLeft -= istr.gcount();
if(mCheckLimits) mMaxBytesLeft -= (int)istr.gcount();
return istr;
}
@@ -361,7 +357,7 @@ std::istream& LLSDParser::get(
char delim) const
{
istr.get(sb, delim);
if(mCheckLimits) mMaxBytesLeft -= istr.gcount();
if(mCheckLimits) mMaxBytesLeft -= (int)istr.gcount();
return istr;
}
@@ -385,7 +381,7 @@ std::istream& LLSDParser::read(
std::streamsize n) const
{
istr.read(s, n);
if(mCheckLimits) mMaxBytesLeft -= istr.gcount();
if(mCheckLimits) mMaxBytesLeft -= (int)istr.gcount();
return istr;
}
@@ -797,7 +793,7 @@ bool LLSDNotationParser::parseBinary(std::istream& istr, LLSD& data) const
if(len)
{
value.resize(len);
account(fullread(istr, (char *)&value[0], len));
account((int)fullread(istr, (char *)&value[0], len));
}
c = get(istr); // strip off the trailing double-quote
data = value;
@@ -1077,7 +1073,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
if(size > 0)
{
value.resize(size);
account(fullread(istr, (char*)&value[0], size));
account((int)fullread(istr, (char*)&value[0], size));
}
data = value;
}
@@ -1208,7 +1204,7 @@ bool LLSDBinaryParser::parseString(
if(size)
{
buf.resize(size);
account(fullread(istr, &buf[0], size));
account((int)fullread(istr, &buf[0], size));
value.assign(buf.begin(), buf.end());
}
return true;
@@ -1455,12 +1451,12 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
}
case LLSD::TypeUUID:
{
{
ostr.put('u');
LLUUID value = data.asUUID();
ostr.write((const char*)(&value.mData), UUID_BYTES);
LLUUID temp = data.asUUID();
ostr.write((const char*)(&(temp.mData)), UUID_BYTES);
break;
}
}
case LLSD::TypeString:
ostr.put('s');
@@ -1653,7 +1649,7 @@ int deserialize_string_raw(
const S32 BUF_LEN = 20;
char buf[BUF_LEN]; /* Flawfinder: ignore */
istr.get(buf, BUF_LEN - 1, ')');
count += istr.gcount();
count += (int)istr.gcount();
int c = istr.get();
c = istr.get();
count += 2;
@@ -1668,7 +1664,7 @@ int deserialize_string_raw(
if(len)
{
buf.resize(len);
count += fullread(istr, (char *)&buf[0], len);
count += (int)fullread(istr, (char *)&buf[0], len);
value.assign(buf.begin(), buf.end());
}
c = istr.get();
@@ -2000,6 +1996,7 @@ std::ostream& operator<<(std::ostream& s, const LLSD& llsd)
return s;
}
//dirty little zippers -- yell at davep if these are horrid
//return a string containing gzipped bytes of binary serialized LLSD
@@ -2106,7 +2103,7 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size)
strm.next_in = in;
S32 ret = inflateInit(&strm);
do
{
strm.avail_out = CHUNK;
@@ -2169,7 +2166,7 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size)
llwarns << "Failed to unzip LLSD block" << llendl;
free(result);
return false;
}
}
}
free(result);
@@ -2252,3 +2249,4 @@ U8* unzip_llsdNavMesh( bool& valid, unsigned int& outsize, std::istream& is, S32
return result;
}