aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llcommon')
-rw-r--r--linden/indra/llcommon/indra_constants.h4
-rw-r--r--linden/indra/llcommon/linden_common.h7
-rw-r--r--linden/indra/llcommon/llapp.cpp11
-rw-r--r--linden/indra/llcommon/llapr.cpp8
-rw-r--r--linden/indra/llcommon/llclickaction.h2
-rw-r--r--linden/indra/llcommon/llcommon_vc8.vcproj1618
-rw-r--r--linden/indra/llcommon/llcommon_vc9.vcproj1616
-rw-r--r--linden/indra/llcommon/llfasttimer.h7
-rw-r--r--linden/indra/llcommon/llfile.cpp28
-rw-r--r--linden/indra/llcommon/llfile.h9
-rw-r--r--linden/indra/llcommon/llkeythrottle.h5
-rw-r--r--linden/indra/llcommon/lllog.cpp3
-rw-r--r--linden/indra/llcommon/llmemory.h50
-rw-r--r--linden/indra/llcommon/llpreprocessor.h27
-rw-r--r--linden/indra/llcommon/llsdserialize.cpp763
-rw-r--r--linden/indra/llcommon/llsdserialize.h232
-rw-r--r--linden/indra/llcommon/llsdserialize_xml.cpp23
-rw-r--r--linden/indra/llcommon/llstreamtools.cpp27
-rw-r--r--linden/indra/llcommon/llstreamtools.h7
-rw-r--r--linden/indra/llcommon/llsys.cpp3
-rw-r--r--linden/indra/llcommon/llthread.cpp7
-rw-r--r--linden/indra/llcommon/llthread.h10
-rw-r--r--linden/indra/llcommon/llversionserver.h6
-rw-r--r--linden/indra/llcommon/llversionviewer.h4
24 files changed, 2509 insertions, 1968 deletions
diff --git a/linden/indra/llcommon/indra_constants.h b/linden/indra/llcommon/indra_constants.h
index 16e471d..eceb576 100644
--- a/linden/indra/llcommon/indra_constants.h
+++ b/linden/indra/llcommon/indra_constants.h
@@ -323,6 +323,10 @@ const U32 PARCEL_MEDIA_COMMAND_TIME = 6;
323const U32 PARCEL_MEDIA_COMMAND_AGENT = 7; 323const U32 PARCEL_MEDIA_COMMAND_AGENT = 7;
324const U32 PARCEL_MEDIA_COMMAND_UNLOAD = 8; 324const U32 PARCEL_MEDIA_COMMAND_UNLOAD = 8;
325const U32 PARCEL_MEDIA_COMMAND_AUTO_ALIGN = 9; 325const U32 PARCEL_MEDIA_COMMAND_AUTO_ALIGN = 9;
326const U32 PARCEL_MEDIA_COMMAND_TYPE = 10;
327const U32 PARCEL_MEDIA_COMMAND_SIZE = 11;
328const U32 PARCEL_MEDIA_COMMAND_DESC = 12;
329const U32 PARCEL_MEDIA_COMMAND_LOOP_SET = 13;
326 330
327// map item types 331// map item types
328const U32 MAP_ITEM_TELEHUB = 0x01; 332const U32 MAP_ITEM_TELEHUB = 0x01;
diff --git a/linden/indra/llcommon/linden_common.h b/linden/indra/llcommon/linden_common.h
index 01540c1..547cceb 100644
--- a/linden/indra/llcommon/linden_common.h
+++ b/linden/indra/llcommon/linden_common.h
@@ -58,6 +58,13 @@
58 58
59#ifdef LL_WINDOWS 59#ifdef LL_WINDOWS
60#pragma warning (3 : 4702) // we like level 3, not 4 60#pragma warning (3 : 4702) // we like level 3, not 4
61// level 4 warnings that we need to disable:
62#pragma warning (disable : 4100) // unreferenced formal parameter
63#pragma warning (disable : 4127) // conditional expression is constant (e.g. while(1) )
64#pragma warning (disable : 4244) // possible loss of data on conversions
65#pragma warning (disable : 4396) // the inline specifier cannot be used when a friend declaration refers to a specialization of a function template
66#pragma warning (disable : 4512) // assignment operator could not be generated
67#pragma warning (disable : 4706) // assignment within conditional (even if((x = y)) )
61#endif // LL_WINDOWS 68#endif // LL_WINDOWS
62 69
63// Linden only libs in alpha-order other than stdtypes.h 70// Linden only libs in alpha-order other than stdtypes.h
diff --git a/linden/indra/llcommon/llapp.cpp b/linden/indra/llcommon/llapp.cpp
index 5ae0727..a10436a 100644
--- a/linden/indra/llcommon/llapp.cpp
+++ b/linden/indra/llcommon/llapp.cpp
@@ -166,7 +166,16 @@ bool LLApp::parseCommandOptions(int argc, char** argv)
166 // we found another option after this one or we have 166 // we found another option after this one or we have
167 // reached the end. simply record that this option was 167 // reached the end. simply record that this option was
168 // found and continue. 168 // found and continue.
169 commands[name] = true; 169 int flag = name.compare("logfile");
170 if (0 == flag)
171 {
172 commands[name] = "log";
173 }
174 else
175 {
176 commands[name] = true;
177 }
178
170 continue; 179 continue;
171 } 180 }
172 ++ii; 181 ++ii;
diff --git a/linden/indra/llcommon/llapr.cpp b/linden/indra/llcommon/llapr.cpp
index 2a81e5e..770cd3f 100644
--- a/linden/indra/llcommon/llapr.cpp
+++ b/linden/indra/llcommon/llapr.cpp
@@ -292,7 +292,7 @@ bool ll_apr_file_remove(const LLString& filename, apr_pool_t* pool)
292 s = apr_file_remove(filename.c_str(), pool); 292 s = apr_file_remove(filename.c_str(), pool);
293 if (s != APR_SUCCESS) 293 if (s != APR_SUCCESS)
294 { 294 {
295 llwarns << "ll_apr_file_remove failed on file: " << filename << llendl; 295 lldebugs << "ll_apr_file_remove failed on file: " << filename << llendl;
296 ll_apr_warn_status(s); 296 ll_apr_warn_status(s);
297 return false; 297 return false;
298 } 298 }
@@ -306,7 +306,7 @@ bool ll_apr_file_rename(const LLString& filename, const LLString& newname, apr_p
306 s = apr_file_rename(filename.c_str(), newname.c_str(), pool); 306 s = apr_file_rename(filename.c_str(), newname.c_str(), pool);
307 if (s != APR_SUCCESS) 307 if (s != APR_SUCCESS)
308 { 308 {
309 llwarns << "ll_apr_file_rename failed on file: " << filename << llendl; 309 lldebugs << "ll_apr_file_rename failed on file: " << filename << llendl;
310 ll_apr_warn_status(s); 310 ll_apr_warn_status(s);
311 return false; 311 return false;
312 } 312 }
@@ -363,7 +363,7 @@ bool ll_apr_dir_make(const LLString& dirname, apr_pool_t* pool)
363 s = apr_dir_make(dirname.c_str(), APR_FPROT_OS_DEFAULT, pool); 363 s = apr_dir_make(dirname.c_str(), APR_FPROT_OS_DEFAULT, pool);
364 if (s != APR_SUCCESS) 364 if (s != APR_SUCCESS)
365 { 365 {
366 llwarns << "ll_apr_file_remove failed on file: " << dirname << llendl; 366 lldebugs << "ll_apr_dir_make failed on file: " << dirname << llendl;
367 ll_apr_warn_status(s); 367 ll_apr_warn_status(s);
368 return false; 368 return false;
369 } 369 }
@@ -377,7 +377,7 @@ bool ll_apr_dir_remove(const LLString& dirname, apr_pool_t* pool)
377 s = apr_file_remove(dirname.c_str(), pool); 377 s = apr_file_remove(dirname.c_str(), pool);
378 if (s != APR_SUCCESS) 378 if (s != APR_SUCCESS)
379 { 379 {
380 llwarns << "ll_apr_file_remove failed on file: " << dirname << llendl; 380 lldebugs << "ll_apr_dir_remove failed on file: " << dirname << llendl;
381 ll_apr_warn_status(s); 381 ll_apr_warn_status(s);
382 return false; 382 return false;
383 } 383 }
diff --git a/linden/indra/llcommon/llclickaction.h b/linden/indra/llcommon/llclickaction.h
index 20bfbfd..b69ca15 100644
--- a/linden/indra/llcommon/llclickaction.h
+++ b/linden/indra/llcommon/llclickaction.h
@@ -39,5 +39,7 @@ const U8 CLICK_ACTION_SIT = 1;
39const U8 CLICK_ACTION_BUY = 2; 39const U8 CLICK_ACTION_BUY = 2;
40const U8 CLICK_ACTION_PAY = 3; 40const U8 CLICK_ACTION_PAY = 3;
41const U8 CLICK_ACTION_OPEN = 4; 41const U8 CLICK_ACTION_OPEN = 4;
42const U8 CLICK_ACTION_PLAY = 5;
43const U8 CLICK_ACTION_OPEN_MEDIA = 6;
42 44
43#endif 45#endif
diff --git a/linden/indra/llcommon/llcommon_vc8.vcproj b/linden/indra/llcommon/llcommon_vc8.vcproj
index fc3060a..5578075 100644
--- a/linden/indra/llcommon/llcommon_vc8.vcproj
+++ b/linden/indra/llcommon/llcommon_vc8.vcproj
@@ -1,807 +1,811 @@
1<?xml version="1.0" encoding="Windows-1252"?> 1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject 2<VisualStudioProject
3 ProjectType="Visual C++" 3 ProjectType="Visual C++"
4 Version="8.00" 4 Version="8.00"
5 Name="llcommon" 5 Name="llcommon"
6 ProjectGUID="{7BCB4B2C-8378-4186-88EA-5742B5ABE17F}" 6 ProjectGUID="{7BCB4B2C-8378-4186-88EA-5742B5ABE17F}"
7 RootNamespace="llcommon" 7 RootNamespace="llcommon"
8 Keyword="Win32Proj" 8 Keyword="Win32Proj"
9 > 9 >
10 <Platforms> 10 <Platforms>
11 <Platform 11 <Platform
12 Name="Win32" 12 Name="Win32"
13 /> 13 />
14 </Platforms> 14 </Platforms>
15 <ToolFiles> 15 <ToolFiles>
16 </ToolFiles> 16 </ToolFiles>
17 <Configurations> 17 <Configurations>
18 <Configuration 18 <Configuration
19 Name="Debug|Win32" 19 Name="Debug|Win32"
20 OutputDirectory="../lib_$(ConfigurationName)/i686-win32" 20 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
21 IntermediateDirectory="$(ConfigurationName)" 21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="4" 22 ConfigurationType="4"
23 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 23 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
24 CharacterSet="1" 24 CharacterSet="1"
25 > 25 >
26 <Tool 26 <Tool
27 Name="VCPreBuildEventTool" 27 Name="VCPreBuildEventTool"
28 /> 28 />
29 <Tool 29 <Tool
30 Name="VCCustomBuildTool" 30 Name="VCCustomBuildTool"
31 /> 31 />
32 <Tool 32 <Tool
33 Name="VCXMLDataGeneratorTool" 33 Name="VCXMLDataGeneratorTool"
34 /> 34 />
35 <Tool 35 <Tool
36 Name="VCWebServiceProxyGeneratorTool" 36 Name="VCWebServiceProxyGeneratorTool"
37 /> 37 />
38 <Tool 38 <Tool
39 Name="VCMIDLTool" 39 Name="VCMIDLTool"
40 /> 40 />
41 <Tool 41 <Tool
42 Name="VCCLCompilerTool" 42 Name="VCCLCompilerTool"
43 Optimization="0" 43 Optimization="0"
44 AdditionalIncludeDirectories="..\..\libraries\i686-win32\include;..\..\libraries\include\" 44 AdditionalIncludeDirectories="..\..\libraries\i686-win32\include;..\..\libraries\include\"
45 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG;XML_STATIC;APR_DECLARE_STATIC" 45 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG;XML_STATIC;APR_DECLARE_STATIC"
46 MinimalRebuild="true" 46 MinimalRebuild="true"
47 BasicRuntimeChecks="3" 47 BasicRuntimeChecks="3"
48 RuntimeLibrary="1" 48 RuntimeLibrary="1"
49 StructMemberAlignment="4" 49 StructMemberAlignment="4"
50 TreatWChar_tAsBuiltInType="false" 50 TreatWChar_tAsBuiltInType="false"
51 ForceConformanceInForLoopScope="true" 51 ForceConformanceInForLoopScope="true"
52 UsePrecompiledHeader="0" 52 UsePrecompiledHeader="0"
53 WarningLevel="3" 53 WarningLevel="3"
54 WarnAsError="true" 54 WarnAsError="true"
55 Detect64BitPortabilityProblems="false" 55 Detect64BitPortabilityProblems="false"
56 DebugInformationFormat="4" 56 DebugInformationFormat="4"
57 /> 57 />
58 <Tool 58 <Tool
59 Name="VCManagedResourceCompilerTool" 59 Name="VCManagedResourceCompilerTool"
60 /> 60 />
61 <Tool 61 <Tool
62 Name="VCResourceCompilerTool" 62 Name="VCResourceCompilerTool"
63 /> 63 />
64 <Tool 64 <Tool
65 Name="VCPreLinkEventTool" 65 Name="VCPreLinkEventTool"
66 /> 66 />
67 <Tool 67 <Tool
68 Name="VCLibrarianTool" 68 Name="VCLibrarianTool"
69 OutputFile="$(OutDir)/llcommon.lib" 69 OutputFile="$(OutDir)/llcommon.lib"
70 /> 70 />
71 <Tool 71 <Tool
72 Name="VCALinkTool" 72 Name="VCALinkTool"
73 /> 73 />
74 <Tool 74 <Tool
75 Name="VCXDCMakeTool" 75 Name="VCXDCMakeTool"
76 /> 76 />
77 <Tool 77 <Tool
78 Name="VCBscMakeTool" 78 Name="VCBscMakeTool"
79 /> 79 />
80 <Tool 80 <Tool
81 Name="VCFxCopTool" 81 Name="VCFxCopTool"
82 /> 82 />
83 <Tool 83 <Tool
84 Name="VCPostBuildEventTool" 84 Name="VCPostBuildEventTool"
85 /> 85 />
86 </Configuration> 86 </Configuration>
87 <Configuration 87 <Configuration
88 Name="Release|Win32" 88 Name="Release|Win32"
89 OutputDirectory="../lib_$(ConfigurationName)/i686-win32" 89 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
90 IntermediateDirectory="$(ConfigurationName)" 90 IntermediateDirectory="$(ConfigurationName)"
91 ConfigurationType="4" 91 ConfigurationType="4"
92 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 92 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
93 CharacterSet="1" 93 CharacterSet="1"
94 > 94 >
95 <Tool 95 <Tool
96 Name="VCPreBuildEventTool" 96 Name="VCPreBuildEventTool"
97 /> 97 />
98 <Tool 98 <Tool
99 Name="VCCustomBuildTool" 99 Name="VCCustomBuildTool"
100 /> 100 />
101 <Tool 101 <Tool
102 Name="VCXMLDataGeneratorTool" 102 Name="VCXMLDataGeneratorTool"
103 /> 103 />
104 <Tool 104 <Tool
105 Name="VCWebServiceProxyGeneratorTool" 105 Name="VCWebServiceProxyGeneratorTool"
106 /> 106 />
107 <Tool 107 <Tool
108 Name="VCMIDLTool" 108 Name="VCMIDLTool"
109 /> 109 />
110 <Tool 110 <Tool
111 Name="VCCLCompilerTool" 111 Name="VCCLCompilerTool"
112 AdditionalOptions="/Oy-" 112 AdditionalOptions="/Oy-"
113 InlineFunctionExpansion="2" 113 InlineFunctionExpansion="2"
114 EnableIntrinsicFunctions="true" 114 EnableIntrinsicFunctions="true"
115 AdditionalIncludeDirectories="..\..\libraries\i686-win32\include;..\..\libraries\include\" 115 AdditionalIncludeDirectories="..\..\libraries\i686-win32\include;..\..\libraries\include\"
116 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE;XML_STATIC;APR_DECLARE_STATIC" 116 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE;XML_STATIC;APR_DECLARE_STATIC"
117 RuntimeLibrary="0" 117 RuntimeLibrary="0"
118 StructMemberAlignment="0" 118 StructMemberAlignment="0"
119 TreatWChar_tAsBuiltInType="false" 119 TreatWChar_tAsBuiltInType="false"
120 ForceConformanceInForLoopScope="true" 120 ForceConformanceInForLoopScope="true"
121 UsePrecompiledHeader="0" 121 UsePrecompiledHeader="0"
122 WarningLevel="3" 122 WarningLevel="3"
123 WarnAsError="true" 123 WarnAsError="true"
124 Detect64BitPortabilityProblems="false" 124 Detect64BitPortabilityProblems="false"
125 DebugInformationFormat="3" 125 DebugInformationFormat="3"
126 /> 126 />
127 <Tool 127 <Tool
128 Name="VCManagedResourceCompilerTool" 128 Name="VCManagedResourceCompilerTool"
129 /> 129 />
130 <Tool 130 <Tool
131 Name="VCResourceCompilerTool" 131 Name="VCResourceCompilerTool"
132 /> 132 />
133 <Tool 133 <Tool
134 Name="VCPreLinkEventTool" 134 Name="VCPreLinkEventTool"
135 /> 135 />
136 <Tool 136 <Tool
137 Name="VCLibrarianTool" 137 Name="VCLibrarianTool"
138 OutputFile="$(OutDir)/llcommon.lib" 138 OutputFile="$(OutDir)/llcommon.lib"
139 /> 139 />
140 <Tool 140 <Tool
141 Name="VCALinkTool" 141 Name="VCALinkTool"
142 /> 142 />
143 <Tool 143 <Tool
144 Name="VCXDCMakeTool" 144 Name="VCXDCMakeTool"
145 /> 145 />
146 <Tool 146 <Tool
147 Name="VCBscMakeTool" 147 Name="VCBscMakeTool"
148 /> 148 />
149 <Tool 149 <Tool
150 Name="VCFxCopTool" 150 Name="VCFxCopTool"
151 /> 151 />
152 <Tool 152 <Tool
153 Name="VCPostBuildEventTool" 153 Name="VCPostBuildEventTool"
154 /> 154 />
155 </Configuration> 155 </Configuration>
156 <Configuration 156 <Configuration
157 Name="ReleaseNoOpt|Win32" 157 Name="ReleaseNoOpt|Win32"
158 OutputDirectory="../lib_$(ConfigurationName)/i686-win32" 158 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
159 IntermediateDirectory="$(ConfigurationName)" 159 IntermediateDirectory="$(ConfigurationName)"
160 ConfigurationType="4" 160 ConfigurationType="4"
161 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 161 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
162 CharacterSet="1" 162 CharacterSet="1"
163 > 163 >
164 <Tool 164 <Tool
165 Name="VCPreBuildEventTool" 165 Name="VCPreBuildEventTool"
166 /> 166 />
167 <Tool 167 <Tool
168 Name="VCCustomBuildTool" 168 Name="VCCustomBuildTool"
169 /> 169 />
170 <Tool 170 <Tool
171 Name="VCXMLDataGeneratorTool" 171 Name="VCXMLDataGeneratorTool"
172 /> 172 />
173 <Tool 173 <Tool
174 Name="VCWebServiceProxyGeneratorTool" 174 Name="VCWebServiceProxyGeneratorTool"
175 /> 175 />
176 <Tool 176 <Tool
177 Name="VCMIDLTool" 177 Name="VCMIDLTool"
178 /> 178 />
179 <Tool 179 <Tool
180 Name="VCCLCompilerTool" 180 Name="VCCLCompilerTool"
181 AdditionalOptions="/Oy-" 181 AdditionalOptions="/Oy-"
182 Optimization="0" 182 Optimization="0"
183 AdditionalIncludeDirectories="..\..\libraries\i686-win32\include;..\..\libraries\include\" 183 AdditionalIncludeDirectories="..\..\libraries\i686-win32\include;..\..\libraries\include\"
184 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE;XML_STATIC;APR_DECLARE_STATIC" 184 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE;XML_STATIC;APR_DECLARE_STATIC"
185 RuntimeLibrary="0" 185 RuntimeLibrary="0"
186 StructMemberAlignment="0" 186 StructMemberAlignment="0"
187 TreatWChar_tAsBuiltInType="false" 187 TreatWChar_tAsBuiltInType="false"
188 ForceConformanceInForLoopScope="true" 188 ForceConformanceInForLoopScope="true"
189 UsePrecompiledHeader="0" 189 UsePrecompiledHeader="0"
190 WarningLevel="3" 190 WarningLevel="3"
191 WarnAsError="true" 191 WarnAsError="true"
192 Detect64BitPortabilityProblems="false" 192 Detect64BitPortabilityProblems="false"
193 DebugInformationFormat="3" 193 DebugInformationFormat="3"
194 /> 194 />
195 <Tool 195 <Tool
196 Name="VCManagedResourceCompilerTool" 196 Name="VCManagedResourceCompilerTool"
197 /> 197 />
198 <Tool 198 <Tool
199 Name="VCResourceCompilerTool" 199 Name="VCResourceCompilerTool"
200 /> 200 />
201 <Tool 201 <Tool
202 Name="VCPreLinkEventTool" 202 Name="VCPreLinkEventTool"
203 /> 203 />
204 <Tool 204 <Tool
205 Name="VCLibrarianTool" 205 Name="VCLibrarianTool"
206 AdditionalDependencies="psapi.lib" 206 AdditionalDependencies="psapi.lib"
207 OutputFile="$(OutDir)/llcommon.lib" 207 OutputFile="$(OutDir)/llcommon.lib"
208 AdditionalLibraryDirectories="" 208 AdditionalLibraryDirectories=""
209 /> 209 />
210 <Tool 210 <Tool
211 Name="VCALinkTool" 211 Name="VCALinkTool"
212 /> 212 />
213 <Tool 213 <Tool
214 Name="VCXDCMakeTool" 214 Name="VCXDCMakeTool"
215 /> 215 />
216 <Tool 216 <Tool
217 Name="VCBscMakeTool" 217 Name="VCBscMakeTool"
218 /> 218 />
219 <Tool 219 <Tool
220 Name="VCFxCopTool" 220 Name="VCFxCopTool"
221 /> 221 />
222 <Tool 222 <Tool
223 Name="VCPostBuildEventTool" 223 Name="VCPostBuildEventTool"
224 /> 224 />
225 </Configuration> 225 </Configuration>
226 </Configurations> 226 </Configurations>
227 <References> 227 <References>
228 </References> 228 </References>
229 <Files> 229 <Files>
230 <Filter 230 <Filter
231 Name="Source Files" 231 Name="Source Files"
232 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" 232 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
233 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" 233 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
234 > 234 >
235 <File 235 <File
236 RelativePath=".\llapp.cpp" 236 RelativePath=".\llapp.cpp"
237 > 237 >
238 </File> 238 </File>
239 <File 239 <File
240 RelativePath=".\llapr.cpp" 240 RelativePath=".\llapr.cpp"
241 > 241 >
242 </File> 242 </File>
243 <File 243 <File
244 RelativePath=".\llares.cpp" 244 RelativePath=".\llares.cpp"
245 > 245 >
246 </File> 246 </File>
247 <File 247 <File
248 RelativePath=".\llassettype.cpp" 248 RelativePath=".\llassettype.cpp"
249 > 249 >
250 </File> 250 </File>
251 <File 251 <File
252 RelativePath=".\llbase32.cpp" 252 RelativePath=".\llbase32.cpp"
253 > 253 >
254 </File> 254 </File>
255 <File 255 <File
256 RelativePath=".\llbase64.cpp" 256 RelativePath=".\llbase64.cpp"
257 > 257 >
258 </File> 258 </File>
259 <File 259 <File
260 RelativePath=".\llcommon.cpp" 260 RelativePath=".\llcommon.cpp"
261 > 261 >
262 </File> 262 </File>
263 <File 263 <File
264 RelativePath=".\llcriticaldamp.cpp" 264 RelativePath=".\llcriticaldamp.cpp"
265 > 265 >
266 </File> 266 </File>
267 <File 267 <File
268 RelativePath=".\lldate.cpp" 268 RelativePath=".\lldate.cpp"
269 > 269 >
270 </File> 270 </File>
271 <File 271 <File
272 RelativePath=".\llerror.cpp" 272 RelativePath=".\llerror.cpp"
273 > 273 >
274 </File> 274 </File>
275 <File 275 <File
276 RelativePath=".\llerrorthread.cpp" 276 RelativePath=".\llerrorthread.cpp"
277 > 277 >
278 </File> 278 </File>
279 <File 279 <File
280 RelativePath=".\llevent.cpp" 280 RelativePath=".\llevent.cpp"
281 > 281 >
282 </File> 282 </File>
283 <File 283 <File
284 RelativePath=".\llfasttimer.cpp" 284 RelativePath=".\llfasttimer.cpp"
285 > 285 >
286 </File> 286 </File>
287 <File 287 <File
288 RelativePath=".\llfile.cpp" 288 RelativePath=".\llfile.cpp"
289 > 289 >
290 </File> 290 </File>
291 <File 291 <File
292 RelativePath=".\llfixedbuffer.cpp" 292 RelativePath=".\llfixedbuffer.cpp"
293 > 293 >
294 </File> 294 </File>
295 <File 295 <File
296 RelativePath=".\llformat.cpp" 296 RelativePath=".\llformat.cpp"
297 > 297 >
298 </File> 298 </File>
299 <File 299 <File
300 RelativePath=".\llframetimer.cpp" 300 RelativePath=".\llframetimer.cpp"
301 > 301 >
302 </File> 302 </File>
303 <File 303 <File
304 RelativePath=".\llliveappconfig.cpp" 304 RelativePath=".\llliveappconfig.cpp"
305 > 305 >
306 </File> 306 </File>
307 <File 307 <File
308 RelativePath=".\lllivefile.cpp" 308 RelativePath=".\lllivefile.cpp"
309 > 309 >
310 </File> 310 </File>
311 <File 311 <File
312 RelativePath=".\lllog.cpp" 312 RelativePath=".\lllog.cpp"
313 > 313 >
314 </File> 314 </File>
315 <File 315 <File
316 RelativePath=".\llmemory.cpp" 316 RelativePath=".\llmemory.cpp"
317 > 317 >
318 </File> 318 </File>
319 <File 319 <File
320 RelativePath=".\llmemorystream.cpp" 320 RelativePath=".\llmemorystream.cpp"
321 > 321 >
322 </File> 322 </File>
323 <File 323 <File
324 RelativePath=".\llmetrics.cpp" 324 RelativePath=".\llmetrics.cpp"
325 > 325 >
326 </File> 326 </File>
327 <File 327 <File
328 RelativePath=".\llmortician.cpp" 328 RelativePath=".\llmortician.cpp"
329 > 329 >
330 </File> 330 </File>
331 <File 331 <File
332 RelativePath=".\llprocessor.cpp" 332 RelativePath=".\llprocessor.cpp"
333 > 333 >
334 </File> 334 </File>
335 <File 335 <File
336 RelativePath=".\llqueuedthread.cpp" 336 RelativePath=".\llqueuedthread.cpp"
337 > 337 >
338 </File> 338 </File>
339 <File 339 <File
340 RelativePath=".\llrun.cpp" 340 RelativePath=".\llrun.cpp"
341 > 341 >
342 </File> 342 </File>
343 <File 343 <File
344 RelativePath=".\llsd.cpp" 344 RelativePath=".\llsd.cpp"
345 > 345 >
346 </File> 346 </File>
347 <File 347 <File
348 RelativePath=".\llsdserialize.cpp" 348 RelativePath=".\llsdserialize.cpp"
349 > 349 >
350 </File> 350 </File>
351 <File 351 <File
352 RelativePath=".\llsdserialize_xml.cpp" 352 RelativePath=".\llsdserialize_xml.cpp"
353 > 353 >
354 </File> 354 </File>
355 <File 355 <File
356 RelativePath=".\llsdutil.cpp" 356 RelativePath=".\llsdutil.cpp"
357 > 357 >
358 </File> 358 </File>
359 <File 359 <File
360 RelativePath=".\llsecondlifeurls.cpp" 360 RelativePath=".\llsecondlifeurls.cpp"
361 > 361 >
362 </File> 362 </File>
363 <File 363 <File
364 RelativePath=".\llstat.cpp" 364 RelativePath=".\llstat.cpp"
365 > 365 >
366 </File> 366 </File>
367 <File 367 <File
368 RelativePath=".\llstreamtools.cpp" 368 RelativePath=".\llstreamtools.cpp"
369 > 369 >
370 </File> 370 </File>
371 <File 371 <File
372 RelativePath=".\llstring.cpp" 372 RelativePath=".\llstring.cpp"
373 > 373 >
374 </File> 374 </File>
375 <File 375 <File
376 RelativePath=".\llstringtable.cpp" 376 RelativePath=".\llstringtable.cpp"
377 > 377 >
378 </File> 378 </File>
379 <File 379 <File
380 RelativePath=".\llsys.cpp" 380 RelativePath=".\llsys.cpp"
381 > 381 >
382 </File> 382 </File>
383 <File 383 <File
384 RelativePath=".\llthread.cpp" 384 RelativePath=".\llthread.cpp"
385 > 385 >
386 </File> 386 </File>
387 <File 387 <File
388 RelativePath=".\lltimer.cpp" 388 RelativePath=".\lltimer.cpp"
389 > 389 >
390 </File> 390 </File>
391 <File 391 <File
392 RelativePath=".\lluri.cpp" 392 RelativePath=".\lluri.cpp"
393 > 393 >
394 </File> 394 </File>
395 <File 395 <File
396 RelativePath=".\llworkerthread.cpp" 396 RelativePath=".\llworkerthread.cpp"
397 > 397 >
398 </File> 398 </File>
399 <File 399 <File
400 RelativePath=".\metaclass.cpp" 400 RelativePath=".\metaclass.cpp"
401 > 401 >
402 </File> 402 </File>
403 <File 403 <File
404 RelativePath=".\metaproperty.cpp" 404 RelativePath=".\metaproperty.cpp"
405 > 405 >
406 </File> 406 </File>
407 <File 407 <File
408 RelativePath=".\reflective.cpp" 408 RelativePath=".\reflective.cpp"
409 > 409 >
410 </File> 410 </File>
411 <File 411 <File
412 RelativePath=".\timing.cpp" 412 RelativePath=".\timing.cpp"
413 > 413 >
414 </File> 414 </File>
415 <File 415 <File
416 RelativePath=".\u64.cpp" 416 RelativePath=".\u64.cpp"
417 > 417 >
418 </File> 418 </File>
419 </Filter> 419 </Filter>
420 <Filter 420 <Filter
421 Name="Header Files" 421 Name="Header Files"
422 Filter="h;hpp;hxx;hm;inl;inc;xsd" 422 Filter="h;hpp;hxx;hm;inl;inc;xsd"
423 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" 423 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
424 > 424 >
425 <File 425 <File
426 RelativePath=".\bitpack.h" 426 RelativePath=".\bitpack.h"
427 > 427 >
428 </File> 428 </File>
429 <File 429 <File
430 RelativePath=".\doublelinkedlist.h" 430 RelativePath=".\doublelinkedlist.h"
431 > 431 >
432 </File> 432 </File>
433 <File 433 <File
434 RelativePath=".\imageids.h" 434 RelativePath=".\imageids.h"
435 > 435 >
436 </File> 436 </File>
437 <File 437 <File
438 RelativePath=".\indra_constants.h" 438 RelativePath=".\indra_constants.h"
439 > 439 >
440 </File> 440 </File>
441 <File 441 <File
442 RelativePath=".\linden_common.h" 442 RelativePath=".\linden_common.h"
443 > 443 >
444 </File> 444 </File>
445 <File 445 <File
446 RelativePath=".\linked_lists.h" 446 RelativePath=".\linked_lists.h"
447 > 447 >
448 </File> 448 </File>
449 <File 449 <File
450 RelativePath=".\llagentconstants.h" 450 RelativePath=".\llagentconstants.h"
451 > 451 >
452 </File> 452 </File>
453 <File 453 <File
454 RelativePath=".\llapp.h" 454 RelativePath=".\llapp.h"
455 > 455 >
456 </File> 456 </File>
457 <File 457 <File
458 RelativePath=".\llapr.h" 458 RelativePath=".\llapr.h"
459 > 459 >
460 </File> 460 </File>
461 <File 461 <File
462 RelativePath=".\llares.h" 462 RelativePath=".\llares.h"
463 > 463 >
464 </File> 464 </File>
465 <File 465 <File
466 RelativePath=".\llassettype.h" 466 RelativePath=".\llassettype.h"
467 > 467 >
468 </File> 468 </File>
469 <File 469 <File
470 RelativePath=".\llassoclist.h" 470 RelativePath=".\llassoclist.h"
471 > 471 >
472 </File> 472 </File>
473 <File 473 <File
474 RelativePath=".\llavatarconstants.h" 474 RelativePath=".\llavatarconstants.h"
475 > 475 >
476 </File> 476 </File>
477 <File 477 <File
478 RelativePath=".\llbase32.h" 478 RelativePath=".\llbase32.h"
479 > 479 >
480 </File> 480 </File>
481 <File 481 <File
482 RelativePath=".\llbase64.h" 482 RelativePath=".\llbase64.h"
483 > 483 >
484 </File> 484 </File>
485 <File 485 <File
486 RelativePath=".\llboost.h" 486 RelativePath=".\llboost.h"
487 > 487 >
488 </File> 488 </File>
489 <File 489 <File
490 RelativePath=".\llchat.h" 490 RelativePath=".\llchat.h"
491 > 491 >
492 </File> 492 </File>
493 <File 493 <File
494 RelativePath=".\llclickaction.h" 494 RelativePath=".\llclickaction.h"
495 > 495 >
496 </File> 496 </File>
497 <File 497 <File
498 RelativePath=".\llcommon.h" 498 RelativePath=".\llcommon.h"
499 > 499 >
500 </File> 500 </File>
501 <File 501 <File
502 RelativePath=".\llcriticaldamp.h" 502 RelativePath=".\llcriticaldamp.h"
503 > 503 >
504 </File> 504 </File>
505 <File 505 <File
506 RelativePath=".\lldarray.h" 506 RelativePath=".\lldarray.h"
507 > 507 >
508 </File> 508 </File>
509 <File 509 <File
510 RelativePath=".\lldarrayptr.h" 510 RelativePath=".\lldarrayptr.h"
511 > 511 >
512 </File> 512 </File>
513 <File 513 <File
514 RelativePath=".\lldate.h" 514 RelativePath=".\lldate.h"
515 > 515 >
516 </File> 516 </File>
517 <File 517 <File
518 RelativePath=".\lldefs.h" 518 RelativePath=".\lldefs.h"
519 > 519 >
520 </File> 520 </File>
521 <File 521 <File
522 RelativePath=".\lldlinked.h" 522 RelativePath=".\lldlinked.h"
523 > 523 >
524 </File> 524 </File>
525 <File 525 <File
526 RelativePath=".\lldqueueptr.h" 526 RelativePath=".\lldqueueptr.h"
527 > 527 >
528 </File> 528 </File>
529 <File 529 <File
530 RelativePath=".\llendianswizzle.h" 530 RelativePath=".\llendianswizzle.h"
531 > 531 >
532 </File> 532 </File>
533 <File 533 <File
534 RelativePath=".\llenum.h" 534 RelativePath=".\llenum.h"
535 > 535 >
536 </File> 536 </File>
537 <File 537 <File
538 RelativePath=".\llerror.h" 538 RelativePath=".\llerror.h"
539 > 539 >
540 </File> 540 </File>
541 <File 541 <File
542 RelativePath=".\llerrorcontrol.h" 542 RelativePath=".\llerrorcontrol.h"
543 > 543 >
544 </File> 544 </File>
545 <File 545 <File
546 RelativePath=".\llerrorthread.h" 546 RelativePath=".\llerrorthread.h"
547 > 547 >
548 </File> 548 </File>
549 <File 549 <File
550 RelativePath=".\llevent.h" 550 RelativePath=".\llevent.h"
551 > 551 >
552 </File> 552 </File>
553 <File 553 <File
554 RelativePath=".\llextendedstatus.h" 554 RelativePath=".\llextendedstatus.h"
555 > 555 >
556 </File> 556 </File>
557 <File 557 <File
558 RelativePath=".\llfasttimer.h" 558 RelativePath=".\llfasttimer.h"
559 > 559 >
560 </File> 560 </File>
561 <File 561 <File
562 RelativePath=".\llfile.h" 562 RelativePath=".\llfile.h"
563 > 563 >
564 </File> 564 </File>
565 <File 565 <File
566 RelativePath=".\llfixedbuffer.h" 566 RelativePath=".\llfixedbuffer.h"
567 > 567 >
568 </File> 568 </File>
569 <File 569 <File
570 RelativePath=".\llformat.h" 570 RelativePath=".\llformat.h"
571 > 571 >
572 </File> 572 </File>
573 <File 573 <File
574 RelativePath=".\llframecallbackmanager.h" 574 RelativePath=".\llframecallbackmanager.h"
575 > 575 >
576 </File> 576 </File>
577 <File 577 <File
578 RelativePath=".\llframetimer.h" 578 RelativePath=".\llframetimer.h"
579 > 579 >
580 </File> 580 </File>
581 <File 581 <File
582 RelativePath=".\llhash.h" 582 RelativePath=".\llhash.h"
583 > 583 >
584 </File> 584 </File>
585 <File 585 <File
586 RelativePath=".\llindexedqueue.h" 586 RelativePath=".\llindexedqueue.h"
587 > 587 >
588 </File> 588 </File>
589 <File 589 <File
590 RelativePath=".\lllinkedqueue.h" 590 RelativePath=".\lllinkedqueue.h"
591 > 591 >
592 </File> 592 </File>
593 <File 593 <File
594 RelativePath=".\llliveappconfig.h" 594 RelativePath=".\llliveappconfig.h"
595 > 595 >
596 </File> 596 </File>
597 <File 597 <File
598 RelativePath=".\lllivefile.h" 598 RelativePath=".\lllivefile.h"
599 > 599 >
600 </File> 600 </File>
601 <File 601 <File
602 RelativePath=".\lllocalidhashmap.h" 602 RelativePath=".\lllocalidhashmap.h"
603 > 603 >
604 </File> 604 </File>
605 <File 605 <File
606 RelativePath=".\lllog.h" 606 RelativePath=".\lllog.h"
607 > 607 >
608 </File> 608 </File>
609 <File 609 <File
610 RelativePath=".\lllslconstants.h" 610 RelativePath=".\lllslconstants.h"
611 > 611 >
612 </File> 612 </File>
613 <File 613 <File
614 RelativePath=".\llmap.h" 614 RelativePath=".\llmap.h"
615 > 615 >
616 </File> 616 </File>
617 <File 617 <File
618 RelativePath=".\llmemory.h" 618 RelativePath=".\llmemory.h"
619 > 619 >
620 </File> 620 </File>
621 <File 621 <File
622 RelativePath=".\llmemorystream.h" 622 RelativePath=".\llmemorystream.h"
623 > 623 >
624 </File> 624 </File>
625 <File 625 <File
626 RelativePath=".\llmemtype.h" 626 RelativePath=".\llmemtype.h"
627 > 627 >
628 </File> 628 </File>
629 <File 629 <File
630 RelativePath=".\llmetrics.h" 630 RelativePath=".\llmetrics.h"
631 > 631 >
632 </File> 632 </File>
633 <File 633 <File
634 RelativePath=".\llmortician.h" 634 RelativePath=".\llmortician.h"
635 > 635 >
636 </File> 636 </File>
637 <File 637 <File
638 RelativePath=".\llnametable.h" 638 RelativePath=".\llnametable.h"
639 > 639 >
640 </File> 640 </File>
641 <File 641 <File
642 RelativePath=".\llpreprocessor.h" 642 RelativePath=".\llnametable.h"
643 > 643 >
644 </File> 644 </File>
645 <File 645 <File
646 RelativePath=".\llpriqueuemap.h" 646 RelativePath=".\llpreprocessor.h"
647 > 647 >
648 </File> 648 </File>
649 <File 649 <File
650 RelativePath=".\llprocessor.h" 650 RelativePath=".\llpriqueuemap.h"
651 > 651 >
652 </File> 652 </File>
653 <File 653 <File
654 RelativePath=".\llptrskiplist.h" 654 RelativePath=".\llprocessor.h"
655 > 655 >
656 </File> 656 </File>
657 <File 657 <File
658 RelativePath=".\llptrskipmap.h" 658 RelativePath=".\llptrskiplist.h"
659 > 659 >
660 </File> 660 </File>
661 <File 661 <File
662 RelativePath=".\llqueuedthread.h" 662 RelativePath=".\llptrskipmap.h"
663 > 663 >
664 </File> 664 </File>
665 <File 665 <File
666 RelativePath=".\llrun.h" 666 RelativePath=".\llqueuedthread.h"
667 > 667 >
668 </File> 668 </File>
669 <File 669 <File
670 RelativePath=".\llsd.h" 670 RelativePath=".\llrun.h"
671 > 671 >
672 </File> 672 </File>
673 <File 673 <File
674 RelativePath=".\llsdserialize.h" 674 RelativePath=".\llsd.h"
675 > 675 >
676 </File> 676 </File>
677 <File 677 <File
678 RelativePath=".\llsdserialize_xml.h" 678 RelativePath=".\llsdserialize.h"
679 > 679 >
680 </File> 680 </File>
681 <File 681 <File
682 RelativePath=".\llsdutil.h" 682 RelativePath=".\llsdserialize_xml.h"
683 > 683 >
684 </File> 684 </File>
685 <File 685 <File
686 RelativePath=".\llsecondlifeurls.h" 686 RelativePath=".\llsdutil.h"
687 > 687 >
688 </File> 688 </File>
689 <File 689 <File
690 RelativePath=".\llskiplist.h" 690 RelativePath=".\llsecondlifeurls.h"
691 > 691 >
692 </File> 692 </File>
693 <File 693 <File
694 RelativePath=".\llskipmap.h" 694 RelativePath=".\llskiplist.h"
695 > 695 >
696 </File> 696 </File>
697 <File 697 <File
698 RelativePath=".\llstat.h" 698 RelativePath=".\llskipmap.h"
699 > 699 >
700 </File> 700 </File>
701 <File 701 <File
702 RelativePath=".\llstatenums.h" 702 RelativePath=".\llstat.h"
703 > 703 >
704 </File> 704 </File>
705 <File 705 <File
706 RelativePath=".\llstl.h" 706 RelativePath=".\llstatenums.h"
707 > 707 >
708 </File> 708 </File>
709 <File 709 <File
710 RelativePath=".\llstreamtools.h" 710 RelativePath=".\llstl.h"
711 > 711 >
712 </File> 712 </File>
713 <File 713 <File
714 RelativePath=".\llstrider.h" 714 RelativePath=".\llstreamtools.h"
715 > 715 >
716 </File> 716 </File>
717 <File 717 <File
718 RelativePath=".\llstring.h" 718 RelativePath=".\llstrider.h"
719 > 719 >
720 </File> 720 </File>
721 <File 721 <File
722 RelativePath=".\llstringtable.h" 722 RelativePath=".\llstring.h"
723 > 723 >
724 </File> 724 </File>
725 <File 725 <File
726 RelativePath=".\llsys.h" 726 RelativePath=".\llstringtable.h"
727 > 727 >
728 </File> 728 </File>
729 <File 729 <File
730 RelativePath=".\llthread.h" 730 RelativePath=".\llsys.h"
731 > 731 >
732 </File> 732 </File>
733 <File 733 <File
734 RelativePath=".\lltimer.h" 734 RelativePath=".\llthread.h"
735 > 735 >
736 </File> 736 </File>
737 <File 737 <File
738 RelativePath=".\lluri.h" 738 RelativePath=".\lltimer.h"
739 > 739 >
740 </File> 740 </File>
741 <File 741 <File
742 RelativePath=".\lluuidhashmap.h" 742 RelativePath=".\lluri.h"
743 > 743 >
744 </File> 744 </File>
745 <File 745 <File
746 RelativePath=".\llversionserver.h" 746 RelativePath=".\lluuidhashmap.h"
747 > 747 >
748 </File> 748 </File>
749 <File 749 <File
750 RelativePath=".\llversionviewer.h" 750 RelativePath=".\llversionserver.h"
751 > 751 >
752 </File> 752 </File>
753 <File 753 <File
754 RelativePath=".\llworkerthread.h" 754 RelativePath=".\llversionviewer.h"
755 > 755 >
756 </File> 756 </File>
757 <File 757 <File
758 RelativePath=".\new_mem_ops.h" 758 RelativePath=".\llworkerthread.h"
759 > 759 >
760 </File> 760 </File>
761 <File 761 <File
762 RelativePath=".\priqueue.h" 762 RelativePath=".\new_mem_ops.h"
763 > 763 >
764 </File> 764 </File>
765 <File 765 <File
766 RelativePath=".\processor.h" 766 RelativePath=".\priqueue.h"
767 > 767 >
768 </File> 768 </File>
769 <File 769 <File
770 RelativePath=".\roles_constants.h" 770 RelativePath=".\processor.h"
771 > 771 >
772 </File> 772 </File>
773 <File 773 <File
774 RelativePath=".\stdenums.h" 774 RelativePath=".\roles_constants.h"
775 > 775 >
776 </File> 776 </File>
777 <File 777 <File
778 RelativePath=".\stdtypes.h" 778 RelativePath=".\stdenums.h"
779 > 779 >
780 </File> 780 </File>
781 <File 781 <File
782 RelativePath=".\string_table.h" 782 RelativePath=".\stdtypes.h"
783 > 783 >
784 </File> 784 </File>
785 <File 785 <File
786 RelativePath=".\timer.h" 786 RelativePath=".\string_table.h"
787 > 787 >
788 </File> 788 </File>
789 <File 789 <File
790 RelativePath=".\timing.h" 790 RelativePath=".\timer.h"
791 > 791 >
792 </File> 792 </File>
793 <File 793 <File
794 RelativePath=".\u64.h" 794 RelativePath=".\timing.h"
795 > 795 >
796 </File> 796 </File>
797 </Filter> 797 <File
798 <Filter 798 RelativePath=".\u64.h"
799 Name="Resource Files" 799 >
800 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" 800 </File>
801 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" 801 </Filter>
802 > 802 <Filter
803 </Filter> 803 Name="Resource Files"
804 </Files> 804 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
805 <Globals> 805 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
806 </Globals> 806 >
807</VisualStudioProject> 807 </Filter>
808 </Files>
809 <Globals>
810 </Globals>
811</VisualStudioProject>
diff --git a/linden/indra/llcommon/llcommon_vc9.vcproj b/linden/indra/llcommon/llcommon_vc9.vcproj
index 752d13f..0bb2d11 100644
--- a/linden/indra/llcommon/llcommon_vc9.vcproj
+++ b/linden/indra/llcommon/llcommon_vc9.vcproj
@@ -1,808 +1,808 @@
1<?xml version="1.0" encoding="Windows-1252"?> 1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject 2<VisualStudioProject
3 ProjectType="Visual C++" 3 ProjectType="Visual C++"
4 Version="9.00" 4 Version="9.00"
5 Name="llcommon" 5 Name="llcommon"
6 ProjectGUID="{7BCB4B2C-8378-4186-88EA-5742B5ABE17F}" 6 ProjectGUID="{7BCB4B2C-8378-4186-88EA-5742B5ABE17F}"
7 RootNamespace="llcommon" 7 RootNamespace="llcommon"
8 Keyword="Win32Proj" 8 Keyword="Win32Proj"
9 TargetFrameworkVersion="131072" 9 TargetFrameworkVersion="131072"
10 > 10 >
11 <Platforms> 11 <Platforms>
12 <Platform 12 <Platform
13 Name="Win32" 13 Name="Win32"
14 /> 14 />
15 </Platforms> 15 </Platforms>
16 <ToolFiles> 16 <ToolFiles>
17 </ToolFiles> 17 </ToolFiles>
18 <Configurations> 18 <Configurations>
19 <Configuration 19 <Configuration
20 Name="Debug|Win32" 20 Name="Debug|Win32"
21 OutputDirectory="../lib_$(ConfigurationName)/i686-win32" 21 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
22 IntermediateDirectory="$(ConfigurationName)" 22 IntermediateDirectory="$(ConfigurationName)"
23 ConfigurationType="4" 23 ConfigurationType="4"
24 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 24 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
25 CharacterSet="1" 25 CharacterSet="1"
26 > 26 >
27 <Tool 27 <Tool
28 Name="VCPreBuildEventTool" 28 Name="VCPreBuildEventTool"
29 /> 29 />
30 <Tool 30 <Tool
31 Name="VCCustomBuildTool" 31 Name="VCCustomBuildTool"
32 /> 32 />
33 <Tool 33 <Tool
34 Name="VCXMLDataGeneratorTool" 34 Name="VCXMLDataGeneratorTool"
35 /> 35 />
36 <Tool 36 <Tool
37 Name="VCWebServiceProxyGeneratorTool" 37 Name="VCWebServiceProxyGeneratorTool"
38 /> 38 />
39 <Tool 39 <Tool
40 Name="VCMIDLTool" 40 Name="VCMIDLTool"
41 /> 41 />
42 <Tool 42 <Tool
43 Name="VCCLCompilerTool" 43 Name="VCCLCompilerTool"
44 Optimization="0" 44 Optimization="0"
45 AdditionalIncludeDirectories="..\..\libraries\i686-win32\include;..\..\libraries\include\" 45 AdditionalIncludeDirectories="..\..\libraries\i686-win32\include;..\..\libraries\include\"
46 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG;XML_STATIC;APR_DECLARE_STATIC" 46 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG;XML_STATIC;APR_DECLARE_STATIC"
47 MinimalRebuild="true" 47 MinimalRebuild="true"
48 BasicRuntimeChecks="3" 48 BasicRuntimeChecks="3"
49 RuntimeLibrary="1" 49 RuntimeLibrary="1"
50 StructMemberAlignment="4" 50 StructMemberAlignment="4"
51 TreatWChar_tAsBuiltInType="false" 51 TreatWChar_tAsBuiltInType="false"
52 ForceConformanceInForLoopScope="true" 52 ForceConformanceInForLoopScope="true"
53 UsePrecompiledHeader="0" 53 UsePrecompiledHeader="0"
54 WarningLevel="3" 54 WarningLevel="3"
55 WarnAsError="true" 55 WarnAsError="true"
56 Detect64BitPortabilityProblems="false" 56 Detect64BitPortabilityProblems="false"
57 DebugInformationFormat="4" 57 DebugInformationFormat="4"
58 /> 58 />
59 <Tool 59 <Tool
60 Name="VCManagedResourceCompilerTool" 60 Name="VCManagedResourceCompilerTool"
61 /> 61 />
62 <Tool 62 <Tool
63 Name="VCResourceCompilerTool" 63 Name="VCResourceCompilerTool"
64 /> 64 />
65 <Tool 65 <Tool
66 Name="VCPreLinkEventTool" 66 Name="VCPreLinkEventTool"
67 /> 67 />
68 <Tool 68 <Tool
69 Name="VCLibrarianTool" 69 Name="VCLibrarianTool"
70 OutputFile="$(OutDir)/llcommon.lib" 70 OutputFile="$(OutDir)/llcommon.lib"
71 /> 71 />
72 <Tool 72 <Tool
73 Name="VCALinkTool" 73 Name="VCALinkTool"
74 /> 74 />
75 <Tool 75 <Tool
76 Name="VCXDCMakeTool" 76 Name="VCXDCMakeTool"
77 /> 77 />
78 <Tool 78 <Tool
79 Name="VCBscMakeTool" 79 Name="VCBscMakeTool"
80 /> 80 />
81 <Tool 81 <Tool
82 Name="VCFxCopTool" 82 Name="VCFxCopTool"
83 /> 83 />
84 <Tool 84 <Tool
85 Name="VCPostBuildEventTool" 85 Name="VCPostBuildEventTool"
86 /> 86 />
87 </Configuration> 87 </Configuration>
88 <Configuration 88 <Configuration
89 Name="Release|Win32" 89 Name="Release|Win32"
90 OutputDirectory="../lib_$(ConfigurationName)/i686-win32" 90 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
91 IntermediateDirectory="$(ConfigurationName)" 91 IntermediateDirectory="$(ConfigurationName)"
92 ConfigurationType="4" 92 ConfigurationType="4"
93 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 93 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
94 CharacterSet="1" 94 CharacterSet="1"
95 > 95 >
96 <Tool 96 <Tool
97 Name="VCPreBuildEventTool" 97 Name="VCPreBuildEventTool"
98 /> 98 />
99 <Tool 99 <Tool
100 Name="VCCustomBuildTool" 100 Name="VCCustomBuildTool"
101 /> 101 />
102 <Tool 102 <Tool
103 Name="VCXMLDataGeneratorTool" 103 Name="VCXMLDataGeneratorTool"
104 /> 104 />
105 <Tool 105 <Tool
106 Name="VCWebServiceProxyGeneratorTool" 106 Name="VCWebServiceProxyGeneratorTool"
107 /> 107 />
108 <Tool 108 <Tool
109 Name="VCMIDLTool" 109 Name="VCMIDLTool"
110 /> 110 />
111 <Tool 111 <Tool
112 Name="VCCLCompilerTool" 112 Name="VCCLCompilerTool"
113 AdditionalOptions="/Oy-" 113 AdditionalOptions="/Oy-"
114 InlineFunctionExpansion="2" 114 InlineFunctionExpansion="2"
115 EnableIntrinsicFunctions="true" 115 EnableIntrinsicFunctions="true"
116 AdditionalIncludeDirectories="..\..\libraries\i686-win32\include;..\..\libraries\include\" 116 AdditionalIncludeDirectories="..\..\libraries\i686-win32\include;..\..\libraries\include\"
117 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE;XML_STATIC;APR_DECLARE_STATIC" 117 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE;XML_STATIC;APR_DECLARE_STATIC"
118 RuntimeLibrary="0" 118 RuntimeLibrary="0"
119 StructMemberAlignment="0" 119 StructMemberAlignment="0"
120 TreatWChar_tAsBuiltInType="false" 120 TreatWChar_tAsBuiltInType="false"
121 ForceConformanceInForLoopScope="true" 121 ForceConformanceInForLoopScope="true"
122 UsePrecompiledHeader="0" 122 UsePrecompiledHeader="0"
123 WarningLevel="3" 123 WarningLevel="3"
124 WarnAsError="true" 124 WarnAsError="true"
125 Detect64BitPortabilityProblems="false" 125 Detect64BitPortabilityProblems="false"
126 DebugInformationFormat="3" 126 DebugInformationFormat="3"
127 /> 127 />
128 <Tool 128 <Tool
129 Name="VCManagedResourceCompilerTool" 129 Name="VCManagedResourceCompilerTool"
130 /> 130 />
131 <Tool 131 <Tool
132 Name="VCResourceCompilerTool" 132 Name="VCResourceCompilerTool"
133 /> 133 />
134 <Tool 134 <Tool
135 Name="VCPreLinkEventTool" 135 Name="VCPreLinkEventTool"
136 /> 136 />
137 <Tool 137 <Tool
138 Name="VCLibrarianTool" 138 Name="VCLibrarianTool"
139 OutputFile="$(OutDir)/llcommon.lib" 139 OutputFile="$(OutDir)/llcommon.lib"
140 /> 140 />
141 <Tool 141 <Tool
142 Name="VCALinkTool" 142 Name="VCALinkTool"
143 /> 143 />
144 <Tool 144 <Tool
145 Name="VCXDCMakeTool" 145 Name="VCXDCMakeTool"
146 /> 146 />
147 <Tool 147 <Tool
148 Name="VCBscMakeTool" 148 Name="VCBscMakeTool"
149 /> 149 />
150 <Tool 150 <Tool
151 Name="VCFxCopTool" 151 Name="VCFxCopTool"
152 /> 152 />
153 <Tool 153 <Tool
154 Name="VCPostBuildEventTool" 154 Name="VCPostBuildEventTool"
155 /> 155 />
156 </Configuration> 156 </Configuration>
157 <Configuration 157 <Configuration
158 Name="ReleaseNoOpt|Win32" 158 Name="ReleaseNoOpt|Win32"
159 OutputDirectory="../lib_$(ConfigurationName)/i686-win32" 159 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
160 IntermediateDirectory="$(ConfigurationName)" 160 IntermediateDirectory="$(ConfigurationName)"
161 ConfigurationType="4" 161 ConfigurationType="4"
162 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 162 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
163 CharacterSet="1" 163 CharacterSet="1"
164 > 164 >
165 <Tool 165 <Tool
166 Name="VCPreBuildEventTool" 166 Name="VCPreBuildEventTool"
167 /> 167 />
168 <Tool 168 <Tool
169 Name="VCCustomBuildTool" 169 Name="VCCustomBuildTool"
170 /> 170 />
171 <Tool 171 <Tool
172 Name="VCXMLDataGeneratorTool" 172 Name="VCXMLDataGeneratorTool"
173 /> 173 />
174 <Tool 174 <Tool
175 Name="VCWebServiceProxyGeneratorTool" 175 Name="VCWebServiceProxyGeneratorTool"
176 /> 176 />
177 <Tool 177 <Tool
178 Name="VCMIDLTool" 178 Name="VCMIDLTool"
179 /> 179 />
180 <Tool 180 <Tool
181 Name="VCCLCompilerTool" 181 Name="VCCLCompilerTool"
182 AdditionalOptions="/Oy-" 182 AdditionalOptions="/Oy-"
183 Optimization="0" 183 Optimization="0"
184 AdditionalIncludeDirectories="..\..\libraries\i686-win32\include;..\..\libraries\include\" 184 AdditionalIncludeDirectories="..\..\libraries\i686-win32\include;..\..\libraries\include\"
185 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE;XML_STATIC;APR_DECLARE_STATIC" 185 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE;XML_STATIC;APR_DECLARE_STATIC"
186 RuntimeLibrary="0" 186 RuntimeLibrary="0"
187 StructMemberAlignment="0" 187 StructMemberAlignment="0"
188 TreatWChar_tAsBuiltInType="false" 188 TreatWChar_tAsBuiltInType="false"
189 ForceConformanceInForLoopScope="true" 189 ForceConformanceInForLoopScope="true"
190 UsePrecompiledHeader="0" 190 UsePrecompiledHeader="0"
191 WarningLevel="3" 191 WarningLevel="3"
192 WarnAsError="true" 192 WarnAsError="true"
193 Detect64BitPortabilityProblems="false" 193 Detect64BitPortabilityProblems="false"
194 DebugInformationFormat="3" 194 DebugInformationFormat="3"
195 /> 195 />
196 <Tool 196 <Tool
197 Name="VCManagedResourceCompilerTool" 197 Name="VCManagedResourceCompilerTool"
198 /> 198 />
199 <Tool 199 <Tool
200 Name="VCResourceCompilerTool" 200 Name="VCResourceCompilerTool"
201 /> 201 />
202 <Tool 202 <Tool
203 Name="VCPreLinkEventTool" 203 Name="VCPreLinkEventTool"
204 /> 204 />
205 <Tool 205 <Tool
206 Name="VCLibrarianTool" 206 Name="VCLibrarianTool"
207 AdditionalDependencies="psapi.lib" 207 AdditionalDependencies="psapi.lib"
208 OutputFile="$(OutDir)/llcommon.lib" 208 OutputFile="$(OutDir)/llcommon.lib"
209 AdditionalLibraryDirectories="" 209 AdditionalLibraryDirectories=""
210 /> 210 />
211 <Tool 211 <Tool
212 Name="VCALinkTool" 212 Name="VCALinkTool"
213 /> 213 />
214 <Tool 214 <Tool
215 Name="VCXDCMakeTool" 215 Name="VCXDCMakeTool"
216 /> 216 />
217 <Tool 217 <Tool
218 Name="VCBscMakeTool" 218 Name="VCBscMakeTool"
219 /> 219 />
220 <Tool 220 <Tool
221 Name="VCFxCopTool" 221 Name="VCFxCopTool"
222 /> 222 />
223 <Tool 223 <Tool
224 Name="VCPostBuildEventTool" 224 Name="VCPostBuildEventTool"
225 /> 225 />
226 </Configuration> 226 </Configuration>
227 </Configurations> 227 </Configurations>
228 <References> 228 <References>
229 </References> 229 </References>
230 <Files> 230 <Files>
231 <Filter 231 <Filter
232 Name="Source Files" 232 Name="Source Files"
233 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" 233 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
234 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" 234 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
235 > 235 >
236 <File 236 <File
237 RelativePath=".\llapp.cpp" 237 RelativePath=".\llapp.cpp"
238 > 238 >
239 </File> 239 </File>
240 <File 240 <File
241 RelativePath=".\llapr.cpp" 241 RelativePath=".\llapr.cpp"
242 > 242 >
243 </File> 243 </File>
244 <File 244 <File
245 RelativePath=".\llares.cpp" 245 RelativePath=".\llares.cpp"
246 > 246 >
247 </File> 247 </File>
248 <File 248 <File
249 RelativePath=".\llassettype.cpp" 249 RelativePath=".\llassettype.cpp"
250 > 250 >
251 </File> 251 </File>
252 <File 252 <File
253 RelativePath=".\llbase32.cpp" 253 RelativePath=".\llbase32.cpp"
254 > 254 >
255 </File> 255 </File>
256 <File 256 <File
257 RelativePath=".\llbase64.cpp" 257 RelativePath=".\llbase64.cpp"
258 > 258 >
259 </File> 259 </File>
260 <File 260 <File
261 RelativePath=".\llcommon.cpp" 261 RelativePath=".\llcommon.cpp"
262 > 262 >
263 </File> 263 </File>
264 <File 264 <File
265 RelativePath=".\llcriticaldamp.cpp" 265 RelativePath=".\llcriticaldamp.cpp"
266 > 266 >
267 </File> 267 </File>
268 <File 268 <File
269 RelativePath=".\lldate.cpp" 269 RelativePath=".\lldate.cpp"
270 > 270 >
271 </File> 271 </File>
272 <File 272 <File
273 RelativePath=".\llerror.cpp" 273 RelativePath=".\llerror.cpp"
274 > 274 >
275 </File> 275 </File>
276 <File 276 <File
277 RelativePath=".\llerrorthread.cpp" 277 RelativePath=".\llerrorthread.cpp"
278 > 278 >
279 </File> 279 </File>
280 <File 280 <File
281 RelativePath=".\llevent.cpp" 281 RelativePath=".\llevent.cpp"
282 > 282 >
283 </File> 283 </File>
284 <File 284 <File
285 RelativePath=".\llfasttimer.cpp" 285 RelativePath=".\llfasttimer.cpp"
286 > 286 >
287 </File> 287 </File>
288 <File 288 <File
289 RelativePath=".\llfile.cpp" 289 RelativePath=".\llfile.cpp"
290 > 290 >
291 </File> 291 </File>
292 <File 292 <File
293 RelativePath=".\llfixedbuffer.cpp" 293 RelativePath=".\llfixedbuffer.cpp"
294 > 294 >
295 </File> 295 </File>
296 <File 296 <File
297 RelativePath=".\llformat.cpp" 297 RelativePath=".\llformat.cpp"
298 > 298 >
299 </File> 299 </File>
300 <File 300 <File
301 RelativePath=".\llframetimer.cpp" 301 RelativePath=".\llframetimer.cpp"
302 > 302 >
303 </File> 303 </File>
304 <File 304 <File
305 RelativePath=".\llliveappconfig.cpp" 305 RelativePath=".\llliveappconfig.cpp"
306 > 306 >
307 </File> 307 </File>
308 <File 308 <File
309 RelativePath=".\lllivefile.cpp" 309 RelativePath=".\lllivefile.cpp"
310 > 310 >
311 </File> 311 </File>
312 <File 312 <File
313 RelativePath=".\lllog.cpp" 313 RelativePath=".\lllog.cpp"
314 > 314 >
315 </File> 315 </File>
316 <File 316 <File
317 RelativePath=".\llmemory.cpp" 317 RelativePath=".\llmemory.cpp"
318 > 318 >
319 </File> 319 </File>
320 <File 320 <File
321 RelativePath=".\llmemorystream.cpp" 321 RelativePath=".\llmemorystream.cpp"
322 > 322 >
323 </File> 323 </File>
324 <File 324 <File
325 RelativePath=".\llmetrics.cpp" 325 RelativePath=".\llmetrics.cpp"
326 > 326 >
327 </File> 327 </File>
328 <File 328 <File
329 RelativePath=".\llmortician.cpp" 329 RelativePath=".\llmortician.cpp"
330 > 330 >
331 </File> 331 </File>
332 <File 332 <File
333 RelativePath=".\llprocessor.cpp" 333 RelativePath=".\llprocessor.cpp"
334 > 334 >
335 </File> 335 </File>
336 <File 336 <File
337 RelativePath=".\llqueuedthread.cpp" 337 RelativePath=".\llqueuedthread.cpp"
338 > 338 >
339 </File> 339 </File>
340 <File 340 <File
341 RelativePath=".\llrun.cpp" 341 RelativePath=".\llrun.cpp"
342 > 342 >
343 </File> 343 </File>
344 <File 344 <File
345 RelativePath=".\llsd.cpp" 345 RelativePath=".\llsd.cpp"
346 > 346 >
347 </File> 347 </File>
348 <File 348 <File
349 RelativePath=".\llsdserialize.cpp" 349 RelativePath=".\llsdserialize.cpp"
350 > 350 >
351 </File> 351 </File>
352 <File 352 <File
353 RelativePath=".\llsdserialize_xml.cpp" 353 RelativePath=".\llsdserialize_xml.cpp"
354 > 354 >
355 </File> 355 </File>
356 <File 356 <File
357 RelativePath=".\llsdutil.cpp" 357 RelativePath=".\llsdutil.cpp"
358 > 358 >
359 </File> 359 </File>
360 <File 360 <File
361 RelativePath=".\llsecondlifeurls.cpp" 361 RelativePath=".\llsecondlifeurls.cpp"
362 > 362 >
363 </File> 363 </File>
364 <File 364 <File
365 RelativePath=".\llstat.cpp" 365 RelativePath=".\llstat.cpp"
366 > 366 >
367 </File> 367 </File>
368 <File 368 <File
369 RelativePath=".\llstreamtools.cpp" 369 RelativePath=".\llstreamtools.cpp"
370 > 370 >
371 </File> 371 </File>
372 <File 372 <File
373 RelativePath=".\llstring.cpp" 373 RelativePath=".\llstring.cpp"
374 > 374 >
375 </File> 375 </File>
376 <File 376 <File
377 RelativePath=".\llstringtable.cpp" 377 RelativePath=".\llstringtable.cpp"
378 > 378 >
379 </File> 379 </File>
380 <File 380 <File
381 RelativePath=".\llsys.cpp" 381 RelativePath=".\llsys.cpp"
382 > 382 >
383 </File> 383 </File>
384 <File 384 <File
385 RelativePath=".\llthread.cpp" 385 RelativePath=".\llthread.cpp"
386 > 386 >
387 </File> 387 </File>
388 <File 388 <File
389 RelativePath=".\lltimer.cpp" 389 RelativePath=".\lltimer.cpp"
390 > 390 >
391 </File> 391 </File>
392 <File 392 <File
393 RelativePath=".\lluri.cpp" 393 RelativePath=".\lluri.cpp"
394 > 394 >
395 </File> 395 </File>
396 <File 396 <File
397 RelativePath=".\llworkerthread.cpp" 397 RelativePath=".\llworkerthread.cpp"
398 > 398 >
399 </File> 399 </File>
400 <File 400 <File
401 RelativePath=".\metaclass.cpp" 401 RelativePath=".\metaclass.cpp"
402 > 402 >
403 </File> 403 </File>
404 <File 404 <File
405 RelativePath=".\metaproperty.cpp" 405 RelativePath=".\metaproperty.cpp"
406 > 406 >
407 </File> 407 </File>
408 <File 408 <File
409 RelativePath=".\reflective.cpp" 409 RelativePath=".\reflective.cpp"
410 > 410 >
411 </File> 411 </File>
412 <File 412 <File
413 RelativePath=".\timing.cpp" 413 RelativePath=".\timing.cpp"
414 > 414 >
415 </File> 415 </File>
416 <File 416 <File
417 RelativePath=".\u64.cpp" 417 RelativePath=".\u64.cpp"
418 > 418 >
419 </File> 419 </File>
420 </Filter> 420 </Filter>
421 <Filter 421 <Filter
422 Name="Header Files" 422 Name="Header Files"
423 Filter="h;hpp;hxx;hm;inl;inc;xsd" 423 Filter="h;hpp;hxx;hm;inl;inc;xsd"
424 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" 424 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
425 > 425 >
426 <File 426 <File
427 RelativePath=".\bitpack.h" 427 RelativePath=".\bitpack.h"
428 > 428 >
429 </File> 429 </File>
430 <File 430 <File
431 RelativePath=".\doublelinkedlist.h" 431 RelativePath=".\doublelinkedlist.h"
432 > 432 >
433 </File> 433 </File>
434 <File 434 <File
435 RelativePath=".\imageids.h" 435 RelativePath=".\imageids.h"
436 > 436 >
437 </File> 437 </File>
438 <File 438 <File
439 RelativePath=".\indra_constants.h" 439 RelativePath=".\indra_constants.h"
440 > 440 >
441 </File> 441 </File>
442 <File 442 <File
443 RelativePath=".\linden_common.h" 443 RelativePath=".\linden_common.h"
444 > 444 >
445 </File> 445 </File>
446 <File 446 <File
447 RelativePath=".\linked_lists.h" 447 RelativePath=".\linked_lists.h"
448 > 448 >
449 </File> 449 </File>
450 <File 450 <File
451 RelativePath=".\llagentconstants.h" 451 RelativePath=".\llagentconstants.h"
452 > 452 >
453 </File> 453 </File>
454 <File 454 <File
455 RelativePath=".\llapp.h" 455 RelativePath=".\llapp.h"
456 > 456 >
457 </File> 457 </File>
458 <File 458 <File
459 RelativePath=".\llapr.h" 459 RelativePath=".\llapr.h"
460 > 460 >
461 </File> 461 </File>
462 <File 462 <File
463 RelativePath=".\llares.h" 463 RelativePath=".\llares.h"
464 > 464 >
465 </File> 465 </File>
466 <File 466 <File
467 RelativePath=".\llassettype.h" 467 RelativePath=".\llassettype.h"
468 > 468 >
469 </File> 469 </File>
470 <File 470 <File
471 RelativePath=".\llassoclist.h" 471 RelativePath=".\llassoclist.h"
472 > 472 >
473 </File> 473 </File>
474 <File 474 <File
475 RelativePath=".\llavatarconstants.h" 475 RelativePath=".\llavatarconstants.h"
476 > 476 >
477 </File> 477 </File>
478 <File 478 <File
479 RelativePath=".\llbase32.h" 479 RelativePath=".\llbase32.h"
480 > 480 >
481 </File> 481 </File>
482 <File 482 <File
483 RelativePath=".\llbase64.h" 483 RelativePath=".\llbase64.h"
484 > 484 >
485 </File> 485 </File>
486 <File 486 <File
487 RelativePath=".\llboost.h" 487 RelativePath=".\llboost.h"
488 > 488 >
489 </File> 489 </File>
490 <File 490 <File
491 RelativePath=".\llchat.h" 491 RelativePath=".\llchat.h"
492 > 492 >
493 </File> 493 </File>
494 <File 494 <File
495 RelativePath=".\llclickaction.h" 495 RelativePath=".\llclickaction.h"
496 > 496 >
497 </File> 497 </File>
498 <File 498 <File
499 RelativePath=".\llcommon.h" 499 RelativePath=".\llcommon.h"
500 > 500 >
501 </File> 501 </File>
502 <File 502 <File
503 RelativePath=".\llcriticaldamp.h" 503 RelativePath=".\llcriticaldamp.h"
504 > 504 >
505 </File> 505 </File>
506 <File 506 <File
507 RelativePath=".\lldarray.h" 507 RelativePath=".\lldarray.h"
508 > 508 >
509 </File> 509 </File>
510 <File 510 <File
511 RelativePath=".\lldarrayptr.h" 511 RelativePath=".\lldarrayptr.h"
512 > 512 >
513 </File> 513 </File>
514 <File 514 <File
515 RelativePath=".\lldate.h" 515 RelativePath=".\lldate.h"
516 > 516 >
517 </File> 517 </File>
518 <File 518 <File
519 RelativePath=".\lldefs.h" 519 RelativePath=".\lldefs.h"
520 > 520 >
521 </File> 521 </File>
522 <File 522 <File
523 RelativePath=".\lldlinked.h" 523 RelativePath=".\lldlinked.h"
524 > 524 >
525 </File> 525 </File>
526 <File 526 <File
527 RelativePath=".\lldqueueptr.h" 527 RelativePath=".\lldqueueptr.h"
528 > 528 >
529 </File> 529 </File>
530 <File 530 <File
531 RelativePath=".\llendianswizzle.h" 531 RelativePath=".\llendianswizzle.h"
532 > 532 >
533 </File> 533 </File>
534 <File 534 <File
535 RelativePath=".\llenum.h" 535 RelativePath=".\llenum.h"
536 > 536 >
537 </File> 537 </File>
538 <File 538 <File
539 RelativePath=".\llerror.h" 539 RelativePath=".\llerror.h"
540 > 540 >
541 </File> 541 </File>
542 <File 542 <File
543 RelativePath=".\llerrorcontrol.h" 543 RelativePath=".\llerrorcontrol.h"
544 > 544 >
545 </File> 545 </File>
546 <File 546 <File
547 RelativePath=".\llerrorthread.h" 547 RelativePath=".\llerrorthread.h"
548 > 548 >
549 </File> 549 </File>
550 <File 550 <File
551 RelativePath=".\llevent.h" 551 RelativePath=".\llevent.h"
552 > 552 >
553 </File> 553 </File>
554 <File 554 <File
555 RelativePath=".\llextendedstatus.h" 555 RelativePath=".\llextendedstatus.h"
556 > 556 >
557 </File> 557 </File>
558 <File 558 <File
559 RelativePath=".\llfasttimer.h" 559 RelativePath=".\llfasttimer.h"
560 > 560 >
561 </File> 561 </File>
562 <File 562 <File
563 RelativePath=".\llfile.h" 563 RelativePath=".\llfile.h"
564 > 564 >
565 </File> 565 </File>
566 <File 566 <File
567 RelativePath=".\llfixedbuffer.h" 567 RelativePath=".\llfixedbuffer.h"
568 > 568 >
569 </File> 569 </File>
570 <File 570 <File
571 RelativePath=".\llformat.h" 571 RelativePath=".\llformat.h"
572 > 572 >
573 </File> 573 </File>
574 <File 574 <File
575 RelativePath=".\llframecallbackmanager.h" 575 RelativePath=".\llframecallbackmanager.h"
576 > 576 >
577 </File> 577 </File>
578 <File 578 <File
579 RelativePath=".\llframetimer.h" 579 RelativePath=".\llframetimer.h"
580 > 580 >
581 </File> 581 </File>
582 <File 582 <File
583 RelativePath=".\llhash.h" 583 RelativePath=".\llhash.h"
584 > 584 >
585 </File> 585 </File>
586 <File 586 <File
587 RelativePath=".\llindexedqueue.h" 587 RelativePath=".\llindexedqueue.h"
588 > 588 >
589 </File> 589 </File>
590 <File 590 <File
591 RelativePath=".\lllinkedqueue.h" 591 RelativePath=".\lllinkedqueue.h"
592 > 592 >
593 </File> 593 </File>
594 <File 594 <File
595 RelativePath=".\llliveappconfig.h" 595 RelativePath=".\llliveappconfig.h"
596 > 596 >
597 </File> 597 </File>
598 <File 598 <File
599 RelativePath=".\lllivefile.h" 599 RelativePath=".\lllivefile.h"
600 > 600 >
601 </File> 601 </File>
602 <File 602 <File
603 RelativePath=".\lllocalidhashmap.h" 603 RelativePath=".\lllocalidhashmap.h"
604 > 604 >
605 </File> 605 </File>
606 <File 606 <File
607 RelativePath=".\lllog.h" 607 RelativePath=".\lllog.h"
608 > 608 >
609 </File> 609 </File>
610 <File 610 <File
611 RelativePath=".\lllslconstants.h" 611 RelativePath=".\lllslconstants.h"
612 > 612 >
613 </File> 613 </File>
614 <File 614 <File
615 RelativePath=".\llmap.h" 615 RelativePath=".\llmap.h"
616 > 616 >
617 </File> 617 </File>
618 <File 618 <File
619 RelativePath=".\llmemory.h" 619 RelativePath=".\llmemory.h"
620 > 620 >
621 </File> 621 </File>
622 <File 622 <File
623 RelativePath=".\llmemorystream.h" 623 RelativePath=".\llmemorystream.h"
624 > 624 >
625 </File> 625 </File>
626 <File 626 <File
627 RelativePath=".\llmemtype.h" 627 RelativePath=".\llmemtype.h"
628 > 628 >
629 </File> 629 </File>
630 <File 630 <File
631 RelativePath=".\llmetrics.h" 631 RelativePath=".\llmetrics.h"
632 > 632 >
633 </File> 633 </File>
634 <File 634 <File
635 RelativePath=".\llmortician.h" 635 RelativePath=".\llmortician.h"
636 > 636 >
637 </File> 637 </File>
638 <File 638 <File
639 RelativePath=".\llnametable.h" 639 RelativePath=".\llnametable.h"
640 > 640 >
641 </File> 641 </File>
642 <File 642 <File
643 RelativePath=".\llpreprocessor.h" 643 RelativePath=".\llpreprocessor.h"
644 > 644 >
645 </File> 645 </File>
646 <File 646 <File
647 RelativePath=".\llpriqueuemap.h" 647 RelativePath=".\llpriqueuemap.h"
648 > 648 >
649 </File> 649 </File>
650 <File 650 <File
651 RelativePath=".\llprocessor.h" 651 RelativePath=".\llprocessor.h"
652 > 652 >
653 </File> 653 </File>
654 <File 654 <File
655 RelativePath=".\llptrskiplist.h" 655 RelativePath=".\llptrskiplist.h"
656 > 656 >
657 </File> 657 </File>
658 <File 658 <File
659 RelativePath=".\llptrskipmap.h" 659 RelativePath=".\llptrskipmap.h"
660 > 660 >
661 </File> 661 </File>
662 <File 662 <File
663 RelativePath=".\llqueuedthread.h" 663 RelativePath=".\llqueuedthread.h"
664 > 664 >
665 </File> 665 </File>
666 <File 666 <File
667 RelativePath=".\llrun.h" 667 RelativePath=".\llrun.h"
668 > 668 >
669 </File> 669 </File>
670 <File 670 <File
671 RelativePath=".\llsd.h" 671 RelativePath=".\llsd.h"
672 > 672 >
673 </File> 673 </File>
674 <File 674 <File
675 RelativePath=".\llsdserialize.h" 675 RelativePath=".\llsdserialize.h"
676 > 676 >
677 </File> 677 </File>
678 <File 678 <File
679 RelativePath=".\llsdserialize_xml.h" 679 RelativePath=".\llsdserialize_xml.h"
680 > 680 >
681 </File> 681 </File>
682 <File 682 <File
683 RelativePath=".\llsdutil.h" 683 RelativePath=".\llsdutil.h"
684 > 684 >
685 </File> 685 </File>
686 <File 686 <File
687 RelativePath=".\llsecondlifeurls.h" 687 RelativePath=".\llsecondlifeurls.h"
688 > 688 >
689 </File> 689 </File>
690 <File 690 <File
691 RelativePath=".\llskiplist.h" 691 RelativePath=".\llskiplist.h"
692 > 692 >
693 </File> 693 </File>
694 <File 694 <File
695 RelativePath=".\llskipmap.h" 695 RelativePath=".\llskipmap.h"
696 > 696 >
697 </File> 697 </File>
698 <File 698 <File
699 RelativePath=".\llstat.h" 699 RelativePath=".\llstat.h"
700 > 700 >
701 </File> 701 </File>
702 <File 702 <File
703 RelativePath=".\llstatenums.h" 703 RelativePath=".\llstatenums.h"
704 > 704 >
705 </File> 705 </File>
706 <File 706 <File
707 RelativePath=".\llstl.h" 707 RelativePath=".\llstl.h"
708 > 708 >
709 </File> 709 </File>
710 <File 710 <File
711 RelativePath=".\llstreamtools.h" 711 RelativePath=".\llstreamtools.h"
712 > 712 >
713 </File> 713 </File>
714 <File 714 <File
715 RelativePath=".\llstrider.h" 715 RelativePath=".\llstrider.h"
716 > 716 >
717 </File> 717 </File>
718 <File 718 <File
719 RelativePath=".\llstring.h" 719 RelativePath=".\llstring.h"
720 > 720 >
721 </File> 721 </File>
722 <File 722 <File
723 RelativePath=".\llstringtable.h" 723 RelativePath=".\llstringtable.h"
724 > 724 >
725 </File> 725 </File>
726 <File 726 <File
727 RelativePath=".\llsys.h" 727 RelativePath=".\llsys.h"
728 > 728 >
729 </File> 729 </File>
730 <File 730 <File
731 RelativePath=".\llthread.h" 731 RelativePath=".\llthread.h"
732 > 732 >
733 </File> 733 </File>
734 <File 734 <File
735 RelativePath=".\lltimer.h" 735 RelativePath=".\lltimer.h"
736 > 736 >
737 </File> 737 </File>
738 <File 738 <File
739 RelativePath=".\lluri.h" 739 RelativePath=".\lluri.h"
740 > 740 >
741 </File> 741 </File>
742 <File 742 <File
743 RelativePath=".\lluuidhashmap.h" 743 RelativePath=".\lluuidhashmap.h"
744 > 744 >
745 </File> 745 </File>
746 <File 746 <File
747 RelativePath=".\llversionserver.h" 747 RelativePath=".\llversionserver.h"
748 > 748 >
749 </File> 749 </File>
750 <File 750 <File
751 RelativePath=".\llversionviewer.h" 751 RelativePath=".\llversionviewer.h"
752 > 752 >
753 </File> 753 </File>
754 <File 754 <File
755 RelativePath=".\llworkerthread.h" 755 RelativePath=".\llworkerthread.h"
756 > 756 >
757 </File> 757 </File>
758 <File 758 <File
759 RelativePath=".\new_mem_ops.h" 759 RelativePath=".\new_mem_ops.h"
760 > 760 >
761 </File> 761 </File>
762 <File 762 <File
763 RelativePath=".\priqueue.h" 763 RelativePath=".\priqueue.h"
764 > 764 >
765 </File> 765 </File>
766 <File 766 <File
767 RelativePath=".\processor.h" 767 RelativePath=".\processor.h"
768 > 768 >
769 </File> 769 </File>
770 <File 770 <File
771 RelativePath=".\roles_constants.h" 771 RelativePath=".\roles_constants.h"
772 > 772 >
773 </File> 773 </File>
774 <File 774 <File
775 RelativePath=".\stdenums.h" 775 RelativePath=".\stdenums.h"
776 > 776 >
777 </File> 777 </File>
778 <File 778 <File
779 RelativePath=".\stdtypes.h" 779 RelativePath=".\stdtypes.h"
780 > 780 >
781 </File> 781 </File>
782 <File 782 <File
783 RelativePath=".\string_table.h" 783 RelativePath=".\string_table.h"
784 > 784 >
785 </File> 785 </File>
786 <File 786 <File
787 RelativePath=".\timer.h" 787 RelativePath=".\timer.h"
788 > 788 >
789 </File> 789 </File>
790 <File 790 <File
791 RelativePath=".\timing.h" 791 RelativePath=".\timing.h"
792 > 792 >
793 </File> 793 </File>
794 <File 794 <File
795 RelativePath=".\u64.h" 795 RelativePath=".\u64.h"
796 > 796 >
797 </File> 797 </File>
798 </Filter> 798 </Filter>
799 <Filter 799 <Filter
800 Name="Resource Files" 800 Name="Resource Files"
801 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" 801 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
802 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" 802 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
803 > 803 >
804 </Filter> 804 </Filter>
805 </Files> 805 </Files>
806 <Globals> 806 <Globals>
807 </Globals> 807 </Globals>
808</VisualStudioProject> 808</VisualStudioProject>
diff --git a/linden/indra/llcommon/llfasttimer.h b/linden/indra/llcommon/llfasttimer.h
index 3ecf176..8ad2667 100644
--- a/linden/indra/llcommon/llfasttimer.h
+++ b/linden/indra/llcommon/llfasttimer.h
@@ -62,6 +62,7 @@ public:
62 FTM_SIMULATE_PARTICLES, 62 FTM_SIMULATE_PARTICLES,
63 FTM_UPDATE_SKY, 63 FTM_UPDATE_SKY,
64 FTM_UPDATE_TEXTURES, 64 FTM_UPDATE_TEXTURES,
65 FTM_UPDATE_WLPARAM,
65 FTM_UPDATE_WATER, 66 FTM_UPDATE_WATER,
66 FTM_UPDATE_CLOUDS, 67 FTM_UPDATE_CLOUDS,
67 FTM_UPDATE_GRASS, 68 FTM_UPDATE_GRASS,
@@ -86,8 +87,12 @@ public:
86 FTM_RENDER_HUD, 87 FTM_RENDER_HUD,
87 FTM_RENDER_PARTICLES, 88 FTM_RENDER_PARTICLES,
88 FTM_RENDER_WATER, 89 FTM_RENDER_WATER,
90 FTM_RENDER_WL_SKY,
91 FTM_RENDER_FAKE_VBO_UPDATE,
89 FTM_RENDER_TIMER, 92 FTM_RENDER_TIMER,
90 FTM_RENDER_UI, 93 FTM_RENDER_UI,
94 FTM_RENDER_BLOOM,
95 FTM_RENDER_BLOOM_FBO,
91 FTM_RENDER_FONTS, 96 FTM_RENDER_FONTS,
92 97
93 // newview specific 98 // newview specific
@@ -124,6 +129,7 @@ public:
124 FTM_GEO_RESERVE, 129 FTM_GEO_RESERVE,
125 FTM_GEO_LIGHT, 130 FTM_GEO_LIGHT,
126 FTM_GEO_SHADOW, 131 FTM_GEO_SHADOW,
132 FTM_GEO_SKY,
127 FTM_GEN_VOLUME, 133 FTM_GEN_VOLUME,
128 FTM_GEN_TRIANGLES, 134 FTM_GEN_TRIANGLES,
129 FTM_GEN_FLEX, 135 FTM_GEN_FLEX,
@@ -150,7 +156,6 @@ public:
150 FTM_PIPELINE, 156 FTM_PIPELINE,
151 FTM_VFILE_WAIT, 157 FTM_VFILE_WAIT,
152 FTM_FLEXIBLE_UPDATE, 158 FTM_FLEXIBLE_UPDATE,
153 FTM_OCCLUSION,
154 FTM_OCCLUSION_READBACK, 159 FTM_OCCLUSION_READBACK,
155 FTM_HUD_EFFECTS, 160 FTM_HUD_EFFECTS,
156 FTM_HUD_UPDATE, 161 FTM_HUD_UPDATE,
diff --git a/linden/indra/llcommon/llfile.cpp b/linden/indra/llcommon/llfile.cpp
index 38157df..6ccf6ac 100644
--- a/linden/indra/llcommon/llfile.cpp
+++ b/linden/indra/llcommon/llfile.cpp
@@ -286,8 +286,36 @@ llofstream::llofstream(const char *_Filename,
286 286
287llofstream::~llofstream() 287llofstream::~llofstream()
288{ // destroy the object 288{ // destroy the object
289 close();
289 delete _Filebuffer; 290 delete _Filebuffer;
290} 291}
291 292
292#endif // #if USE_LLFILESTREAMS 293#endif // #if USE_LLFILESTREAMS
293 294
295/************** helper functions ********************************/
296
297std::streamsize llifstream_size(llifstream& ifstr)
298{
299 if(!ifstr.is_open()) return 0;
300 std::streampos pos_old = ifstr.tellg();
301 ifstr.seekg(0, ios_base::beg);
302 std::streampos pos_beg = ifstr.tellg();
303 ifstr.seekg(0, ios_base::end);
304 std::streampos pos_end = ifstr.tellg();
305 ifstr.seekg(pos_old, ios_base::beg);
306 return pos_end - pos_beg;
307}
308
309std::streamsize llofstream_size(llofstream& ofstr)
310{
311 if(!ofstr.is_open()) return 0;
312 std::streampos pos_old = ofstr.tellp();
313 ofstr.seekp(0, ios_base::beg);
314 std::streampos pos_beg = ofstr.tellp();
315 ofstr.seekp(0, ios_base::end);
316 std::streampos pos_end = ofstr.tellp();
317 ofstr.seekp(pos_old, ios_base::beg);
318 return pos_end - pos_beg;
319}
320
321
diff --git a/linden/indra/llcommon/llfile.h b/linden/indra/llcommon/llfile.h
index 062b183..2650775 100644
--- a/linden/indra/llcommon/llfile.h
+++ b/linden/indra/llcommon/llfile.h
@@ -168,5 +168,14 @@ private:
168 168
169#endif 169#endif
170 170
171/**
172 * @breif filesize helpers.
173 *
174 * The file size helpers are not considered particularly efficient,
175 * and should only be used for config files and the like -- not in a
176 * loop.
177 */
178std::streamsize llifstream_size(llifstream& fstr);
179std::streamsize llofstream_size(llofstream& fstr);
171 180
172#endif // not LL_LLFILE_H 181#endif // not LL_LLFILE_H
diff --git a/linden/indra/llcommon/llkeythrottle.h b/linden/indra/llcommon/llkeythrottle.h
index c2dc9d2..8314269 100644
--- a/linden/indra/llcommon/llkeythrottle.h
+++ b/linden/indra/llcommon/llkeythrottle.h
@@ -192,10 +192,7 @@ public:
192 { 192 {
193 noteAction(id); 193 noteAction(id);
194 typename LLKeyThrottleImpl<T>::Entry& curr = (*m.currMap)[id]; 194 typename LLKeyThrottleImpl<T>::Entry& curr = (*m.currMap)[id];
195 if (curr.count < m.countLimit) 195 curr.count = llmax(m.countLimit, curr.count);
196 {
197 curr.count = m.countLimit;
198 }
199 curr.blocked = TRUE; 196 curr.blocked = TRUE;
200 } 197 }
201 198
diff --git a/linden/indra/llcommon/lllog.cpp b/linden/indra/llcommon/lllog.cpp
index 147b2d3..10f7c00 100644
--- a/linden/indra/llcommon/lllog.cpp
+++ b/linden/indra/llcommon/lllog.cpp
@@ -69,7 +69,8 @@ void LLLogImpl::log(const std::string message, LLSD& info)
69 } 69 }
70 } 70 }
71 } 71 }
72 llinfos << "LLLOGMESSAGE (" << (sequence++) << ") " << message << " " << LLSDNotationStreamer(info) << llendl; 72 llinfos << "LLLOGMESSAGE (" << (sequence++) << ") " << message
73 << " " << LLSDNotationStreamer(info) << llendl;
73} 74}
74 75
75//@brief Function to check if specified legacy log message should be sent. 76//@brief Function to check if specified legacy log message should be sent.
diff --git a/linden/indra/llcommon/llmemory.h b/linden/indra/llcommon/llmemory.h
index 8a3ca0b..e1af7ba 100644
--- a/linden/indra/llcommon/llmemory.h
+++ b/linden/indra/llcommon/llmemory.h
@@ -243,25 +243,25 @@ protected:
243// Expands LLPointer to return a pointer to a special instance of class Type instead of NULL. 243// Expands LLPointer to return a pointer to a special instance of class Type instead of NULL.
244// This is useful in instances where operations on NULL pointers are semantically safe and/or 244// This is useful in instances where operations on NULL pointers are semantically safe and/or
245// when error checking occurs at a different granularity or in a different part of the code 245// when error checking occurs at a different granularity or in a different part of the code
246// than when referencing an object via a LLHandle. 246// than when referencing an object via a LLSafeHandle.
247// 247//
248 248
249template <class Type> 249template <class Type>
250class LLHandle 250class LLSafeHandle
251{ 251{
252public: 252public:
253 LLHandle() : 253 LLSafeHandle() :
254 mPointer(NULL) 254 mPointer(NULL)
255 { 255 {
256 } 256 }
257 257
258 LLHandle(Type* ptr) : 258 LLSafeHandle(Type* ptr) :
259 mPointer(NULL) 259 mPointer(NULL)
260 { 260 {
261 assign(ptr); 261 assign(ptr);
262 } 262 }
263 263
264 LLHandle(const LLHandle<Type>& ptr) : 264 LLSafeHandle(const LLSafeHandle<Type>& ptr) :
265 mPointer(NULL) 265 mPointer(NULL)
266 { 266 {
267 assign(ptr.mPointer); 267 assign(ptr.mPointer);
@@ -269,13 +269,13 @@ public:
269 269
270 // support conversion up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. 270 // support conversion up the type hierarchy. See Item 45 in Effective C++, 3rd Ed.
271 template<typename Subclass> 271 template<typename Subclass>
272 LLHandle(const LLHandle<Subclass>& ptr) : 272 LLSafeHandle(const LLSafeHandle<Subclass>& ptr) :
273 mPointer(NULL) 273 mPointer(NULL)
274 { 274 {
275 assign(ptr.get()); 275 assign(ptr.get());
276 } 276 }
277 277
278 ~LLHandle() 278 ~LLSafeHandle()
279 { 279 {
280 unref(); 280 unref();
281 } 281 }
@@ -300,17 +300,17 @@ public:
300 operator const Type*() const { return mPointer; } 300 operator const Type*() const { return mPointer; }
301 bool operator !=(Type* ptr) const { return (mPointer != ptr); } 301 bool operator !=(Type* ptr) const { return (mPointer != ptr); }
302 bool operator ==(Type* ptr) const { return (mPointer == ptr); } 302 bool operator ==(Type* ptr) const { return (mPointer == ptr); }
303 bool operator ==(const LLHandle<Type>& ptr) const { return (mPointer == ptr.mPointer); } 303 bool operator ==(const LLSafeHandle<Type>& ptr) const { return (mPointer == ptr.mPointer); }
304 bool operator < (const LLHandle<Type>& ptr) const { return (mPointer < ptr.mPointer); } 304 bool operator < (const LLSafeHandle<Type>& ptr) const { return (mPointer < ptr.mPointer); }
305 bool operator > (const LLHandle<Type>& ptr) const { return (mPointer > ptr.mPointer); } 305 bool operator > (const LLSafeHandle<Type>& ptr) const { return (mPointer > ptr.mPointer); }
306 306
307 LLHandle<Type>& operator =(Type* ptr) 307 LLSafeHandle<Type>& operator =(Type* ptr)
308 { 308 {
309 assign(ptr); 309 assign(ptr);
310 return *this; 310 return *this;
311 } 311 }
312 312
313 LLHandle<Type>& operator =(const LLHandle<Type>& ptr) 313 LLSafeHandle<Type>& operator =(const LLSafeHandle<Type>& ptr)
314 { 314 {
315 assign(ptr.mPointer); 315 assign(ptr.mPointer);
316 return *this; 316 return *this;
@@ -318,7 +318,7 @@ public:
318 318
319 // support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. 319 // support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed.
320 template<typename Subclass> 320 template<typename Subclass>
321 LLHandle<Type>& operator =(const LLHandle<Subclass>& ptr) 321 LLSafeHandle<Type>& operator =(const LLSafeHandle<Subclass>& ptr)
322 { 322 {
323 assign(ptr.get()); 323 assign(ptr.get());
324 return *this; 324 return *this;
@@ -399,11 +399,25 @@ protected:
399 399
400//---------------------------------------------------------------------------- 400//----------------------------------------------------------------------------
401 401
402// LLSingleton implements the getInstance() method part of the Singleton pattern. It can't make 402// LLSingleton implements the getInstance() method part of the Singleton
403// the derived class constructors protected, though, so you have to do that yourself. 403// pattern. It can't make the derived class constructors protected, though, so
404// The proper way to use LLSingleton is to inherit from it while using the typename that you'd 404// you have to do that yourself.
405// like to be static as the template parameter, like so: 405//
406// class FooBar: public LLSingleton<FooBar> 406// There are two ways to use LLSingleton. The first way is to inherit from it
407// while using the typename that you'd like to be static as the template
408// parameter, like so:
409//
410// class Foo: public LLSingleton<Foo>{};
411//
412// Foo* instance = Foo::getInstance();
413//
414// The second way is to define a seperate class that exposes the singleton
415// interface:
416//
417// class FooSingleton: public LLSingleton<Foo>{};
418//
419// Foo* instance = FooSingleton::getInstance();
420//
407// As currently written, it is not thread-safe. 421// As currently written, it is not thread-safe.
408template <typename T> 422template <typename T>
409class LLSingleton 423class LLSingleton
diff --git a/linden/indra/llcommon/llpreprocessor.h b/linden/indra/llcommon/llpreprocessor.h
index 8bcad34..8d38904 100644
--- a/linden/indra/llcommon/llpreprocessor.h
+++ b/linden/indra/llcommon/llpreprocessor.h
@@ -52,33 +52,6 @@
52#define LL_FORCE_INLINE __forceinline 52#define LL_FORCE_INLINE __forceinline
53#endif 53#endif
54 54
55// Per-OS feature switches.
56
57#if LL_DARWIN
58 #define LL_QUICKTIME_ENABLED 1
59 #define LL_LIBXUL_ENABLED 1
60#elif LL_WINDOWS
61 #define LL_QUICKTIME_ENABLED 1
62 #define LL_LIBXUL_ENABLED 1
63#elif LL_LINUX
64 #define LL_QUICKTIME_ENABLED 0
65 #ifndef LL_LIBXUL_ENABLED
66 #define LL_LIBXUL_ENABLED 1
67 #endif // def LL_LIBXUL_ENABLED
68#elif LL_SOLARIS
69 #define LL_QUICKTIME_ENABLED 0
70 #ifndef LL_LIBXUL_ENABLED
71 #define LL_LIBXUL_ENABLED 0
72 #endif // def LL_LIBXUL_ENABLED
73#endif
74
75#if LL_LIBXUL_ENABLED && !defined(MOZILLA_INTERNAL_API)
76 // Without this, nsTAString.h errors out with:
77 // "Cannot use internal string classes without MOZILLA_INTERNAL_API defined. Use the frozen header nsStringAPI.h instead."
78 // It might be worth our while to figure out if we can use the frozen apis at some point...
79 #define MOZILLA_INTERNAL_API 1
80#endif
81
82// Figure out differences between compilers 55// Figure out differences between compilers
83#if defined(__GNUC__) 56#if defined(__GNUC__)
84 #define GCC_VERSION (__GNUC__ * 10000 \ 57 #define GCC_VERSION (__GNUC__ * 10000 \
diff --git a/linden/indra/llcommon/llsdserialize.cpp b/linden/indra/llcommon/llsdserialize.cpp
index 7813cf0..a556d5d 100644
--- a/linden/indra/llcommon/llsdserialize.cpp
+++ b/linden/indra/llcommon/llsdserialize.cpp
@@ -45,26 +45,18 @@
45 45
46#include "lldate.h" 46#include "lldate.h"
47#include "llsd.h" 47#include "llsd.h"
48#include "llstring.h"
48#include "lluri.h" 49#include "lluri.h"
49 50
50// File constants 51// File constants
51static const int MAX_HDR_LEN = 20; 52static const int MAX_HDR_LEN = 20;
52static const char LEGACY_NON_HEADER[] = "<llsd>"; 53static const char LEGACY_NON_HEADER[] = "<llsd>";
54const std::string LLSD_BINARY_HEADER("LLSD/Binary");
55const std::string LLSD_XML_HEADER("LLSD/XML");
53 56
54//static 57/**
55const char* LLSDSerialize::LLSDBinaryHeader = "LLSD/Binary"; 58 * LLSDSerialize
56 59 */
57//static
58const char* LLSDSerialize::LLSDXMLHeader = "LLSD/XML";
59
60// virtual
61LLSDParser::~LLSDParser()
62{ }
63
64// virtual
65LLSDNotationParser::~LLSDNotationParser()
66{ }
67
68 60
69// static 61// static
70void LLSDSerialize::serialize(const LLSD& sd, std::ostream& str, ELLSD_Serialize type, U32 options) 62void LLSDSerialize::serialize(const LLSD& sd, std::ostream& str, ELLSD_Serialize type, U32 options)
@@ -74,12 +66,12 @@ void LLSDSerialize::serialize(const LLSD& sd, std::ostream& str, ELLSD_Serialize
74 switch (type) 66 switch (type)
75 { 67 {
76 case LLSD_BINARY: 68 case LLSD_BINARY:
77 str << "<? " << LLSDBinaryHeader << " ?>\n"; 69 str << "<? " << LLSD_BINARY_HEADER << " ?>\n";
78 f = new LLSDBinaryFormatter; 70 f = new LLSDBinaryFormatter;
79 break; 71 break;
80 72
81 case LLSD_XML: 73 case LLSD_XML:
82 str << "<? " << LLSDXMLHeader << " ?>\n"; 74 str << "<? " << LLSD_XML_HEADER << " ?>\n";
83 f = new LLSDXMLFormatter; 75 f = new LLSDXMLFormatter;
84 break; 76 break;
85 77
@@ -94,7 +86,7 @@ void LLSDSerialize::serialize(const LLSD& sd, std::ostream& str, ELLSD_Serialize
94} 86}
95 87
96// static 88// static
97bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str) 89bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes)
98{ 90{
99 LLPointer<LLSDParser> p = NULL; 91 LLPointer<LLSDParser> p = NULL;
100 char hdr_buf[MAX_HDR_LEN + 1] = ""; /* Flawfinder: ignore */ 92 char hdr_buf[MAX_HDR_LEN + 1] = ""; /* Flawfinder: ignore */
@@ -102,8 +94,8 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str)
102 int inbuf = 0; 94 int inbuf = 0;
103 bool legacy_no_header = false; 95 bool legacy_no_header = false;
104 bool fail_if_not_legacy = false; 96 bool fail_if_not_legacy = false;
105 std::string header = ""; 97 std::string header;
106 98
107 /* 99 /*
108 * Get the first line before anything. 100 * Get the first line before anything.
109 */ 101 */
@@ -155,15 +147,15 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str)
155 */ 147 */
156 if (legacy_no_header) 148 if (legacy_no_header)
157 { 149 {
158 LLSDXMLParser *x = new LLSDXMLParser; 150 LLSDXMLParser* x = new LLSDXMLParser;
159 x->parsePart(hdr_buf, inbuf); 151 x->parsePart(hdr_buf, inbuf);
160 p = x; 152 p = x;
161 } 153 }
162 else if (header == LLSDBinaryHeader) 154 else if (header == LLSD_BINARY_HEADER)
163 { 155 {
164 p = new LLSDBinaryParser; 156 p = new LLSDBinaryParser;
165 } 157 }
166 else if (header == LLSDXMLHeader) 158 else if (header == LLSD_XML_HEADER)
167 { 159 {
168 p = new LLSDXMLParser; 160 p = new LLSDXMLParser;
169 } 161 }
@@ -174,7 +166,7 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str)
174 166
175 if (p.notNull()) 167 if (p.notNull())
176 { 168 {
177 p->parse(str, sd); 169 p->parse(str, sd, max_bytes);
178 return true; 170 return true;
179 } 171 }
180 172
@@ -230,11 +222,71 @@ F64 ll_ntohd(F64 netdouble)
230/** 222/**
231 * Local functions. 223 * Local functions.
232 */ 224 */
233bool deserialize_string(std::istream& str, std::string& value); 225/**
234bool deserialize_string_delim(std::istream& str, std::string& value, char d); 226 * @brief Figure out what kind of string it is (raw or delimited) and handoff.
235bool deserialize_string_raw(std::istream& str, std::string& value); 227 *
228 * @param istr The stream to read from.
229 * @param value [out] The string which was found.
230 * @param max_bytes The maximum possible length of the string. Passing in
231 * a negative value will skip this check.
232 * @return Returns number of bytes read off of the stream. Returns
233 * PARSE_FAILURE (-1) on failure.
234 */
235int deserialize_string(std::istream& istr, std::string& value, S32 max_bytes);
236
237/**
238 * @brief Parse a delimited string.
239 *
240 * @param istr The stream to read from, with the delimiter already popped.
241 * @param value [out] The string which was found.
242 * @param d The delimiter to use.
243 * @return Returns number of bytes read off of the stream. Returns
244 * PARSE_FAILURE (-1) on failure.
245 */
246int deserialize_string_delim(std::istream& istr, std::string& value, char d);
247
248/**
249 * @brief Read a raw string off the stream.
250 *
251 * @param istr The stream to read from, with the (len) parameter
252 * leading the stream.
253 * @param value [out] The string which was found.
254 * @param d The delimiter to use.
255 * @param max_bytes The maximum possible length of the string. Passing in
256 * a negative value will skip this check.
257 * @return Returns number of bytes read off of the stream. Returns
258 * PARSE_FAILURE (-1) on failure.
259 */
260int deserialize_string_raw(
261 std::istream& istr,
262 std::string& value,
263 S32 max_bytes);
264
265/**
266 * @brief helper method for dealing with the different notation boolean format.
267 *
268 * @param istr The stream to read from with the leading character stripped.
269 * @param data [out] the result of the parse.
270 * @param compare The string to compare the boolean against
271 * @param vale The value to assign to data if the parse succeeds.
272 * @return Returns number of bytes read off of the stream. Returns
273 * PARSE_FAILURE (-1) on failure.
274 */
275int deserialize_boolean(
276 std::istream& istr,
277 LLSD& data,
278 const std::string& compare,
279 bool value);
280
281/**
282 * @brief Do notation escaping of a string to an ostream.
283 *
284 * @param value The string to escape and serialize
285 * @param str The stream to serialize to.
286 */
236void serialize_string(const std::string& value, std::ostream& str); 287void serialize_string(const std::string& value, std::ostream& str);
237 288
289
238/** 290/**
239 * Local constants. 291 * Local constants.
240 */ 292 */
@@ -244,20 +296,96 @@ static const std::string NOTATION_FALSE_SERIAL("false");
244static const char BINARY_TRUE_SERIAL = '1'; 296static const char BINARY_TRUE_SERIAL = '1';
245static const char BINARY_FALSE_SERIAL = '0'; 297static const char BINARY_FALSE_SERIAL = '0';
246 298
247static const S32 NOTATION_PARSE_FAILURE = -1;
248 299
249/** 300/**
250 * LLSDParser 301 * LLSDParser
251 */ 302 */
252LLSDParser::LLSDParser() 303LLSDParser::LLSDParser() : mCheckLimits(true), mMaxBytesLeft(0)
304{
305}
306
307// virtual
308LLSDParser::~LLSDParser()
309{ }
310
311S32 LLSDParser::parse(std::istream& istr, LLSD& data, S32 max_bytes)
312{
313 mCheckLimits = (LLSDSerialize::SIZE_UNLIMITED == max_bytes) ? false : true;
314 mMaxBytesLeft = max_bytes;
315 return doParse(istr, data);
316}
317
318
319int LLSDParser::get(std::istream& istr) const
320{
321 if(mCheckLimits) --mMaxBytesLeft;
322 return istr.get();
323}
324
325std::istream& LLSDParser::get(
326 std::istream& istr,
327 char* s,
328 std::streamsize n,
329 char delim) const
330{
331 istr.get(s, n, delim);
332 if(mCheckLimits) mMaxBytesLeft -= istr.gcount();
333 return istr;
334}
335
336std::istream& LLSDParser::get(
337 std::istream& istr,
338 std::streambuf& sb,
339 char delim) const
340{
341 istr.get(sb, delim);
342 if(mCheckLimits) mMaxBytesLeft -= istr.gcount();
343 return istr;
344}
345
346std::istream& LLSDParser::ignore(std::istream& istr) const
253{ 347{
348 istr.ignore();
349 if(mCheckLimits) --mMaxBytesLeft;
350 return istr;
254} 351}
255 352
353std::istream& LLSDParser::putback(std::istream& istr, char c) const
354{
355 istr.putback(c);
356 if(mCheckLimits) ++mMaxBytesLeft;
357 return istr;
358}
359
360std::istream& LLSDParser::read(
361 std::istream& istr,
362 char* s,
363 std::streamsize n) const
364{
365 istr.read(s, n);
366 if(mCheckLimits) mMaxBytesLeft -= istr.gcount();
367 return istr;
368}
369
370void LLSDParser::account(S32 bytes) const
371{
372 if(mCheckLimits) mMaxBytesLeft -= bytes;
373}
374
375
256/** 376/**
257 * LLSDNotationParser 377 * LLSDNotationParser
258 */ 378 */
379LLSDNotationParser::LLSDNotationParser()
380{
381}
382
383// virtual
384LLSDNotationParser::~LLSDNotationParser()
385{ }
386
259// virtual 387// virtual
260S32 LLSDNotationParser::parse(std::istream& istr, LLSD& data) const 388S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
261{ 389{
262 // map: { string:object, string:object } 390 // map: { string:object, string:object }
263 // array: [ object, object, object ] 391 // array: [ object, object, object ]
@@ -275,7 +403,7 @@ S32 LLSDNotationParser::parse(std::istream& istr, LLSD& data) const
275 while(isspace(c)) 403 while(isspace(c))
276 { 404 {
277 // pop the whitespace. 405 // pop the whitespace.
278 c = istr.get(); 406 c = get(istr);
279 c = istr.peek(); 407 c = istr.peek();
280 continue; 408 continue;
281 } 409 }
@@ -287,107 +415,142 @@ S32 LLSDNotationParser::parse(std::istream& istr, LLSD& data) const
287 switch(c) 415 switch(c)
288 { 416 {
289 case '{': 417 case '{':
290 parse_count += parseMap(istr, data); 418 {
291 if(istr.fail()) 419 S32 child_count = parseMap(istr, data);
420 if((child_count == PARSE_FAILURE) || data.isUndefined())
292 { 421 {
293 llinfos << "STREAM FAILURE reading map." << llendl; 422 parse_count = PARSE_FAILURE;
294 } 423 }
295 if(data.isUndefined()) 424 else
296 { 425 {
297 parse_count = NOTATION_PARSE_FAILURE; 426 parse_count += child_count;
427 }
428 if(istr.fail())
429 {
430 llinfos << "STREAM FAILURE reading map." << llendl;
431 parse_count = PARSE_FAILURE;
298 } 432 }
299 break; 433 break;
434 }
300 435
301 case '[': 436 case '[':
302 parse_count += parseArray(istr, data); 437 {
303 if(istr.fail()) 438 S32 child_count = parseArray(istr, data);
439 if((child_count == PARSE_FAILURE) || data.isUndefined())
304 { 440 {
305 llinfos << "STREAM FAILURE reading array." << llendl; 441 parse_count = PARSE_FAILURE;
306 } 442 }
307 if(data.isUndefined()) 443 else
308 { 444 {
309 parse_count = NOTATION_PARSE_FAILURE; 445 parse_count += child_count;
446 }
447 if(istr.fail())
448 {
449 llinfos << "STREAM FAILURE reading array." << llendl;
450 parse_count = PARSE_FAILURE;
310 } 451 }
311 break; 452 break;
453 }
312 454
313 case '!': 455 case '!':
314 c = istr.get(); 456 c = get(istr);
315 data.clear(); 457 data.clear();
316 break; 458 break;
317 459
318 case '0': 460 case '0':
319 c = istr.get(); 461 c = get(istr);
320 data = false; 462 data = false;
321 break; 463 break;
322 464
323 case 'F': 465 case 'F':
324 case 'f': 466 case 'f':
325 do 467 ignore(istr);
468 c = istr.peek();
469 if(isalpha(c))
326 { 470 {
327 istr.ignore(); 471 int cnt = deserialize_boolean(
328 c = istr.peek(); 472 istr,
329 } while (isalpha(c)); 473 data,
330 data = false; 474 NOTATION_FALSE_SERIAL,
475 false);
476 if(PARSE_FAILURE == cnt) parse_count = cnt;
477 else account(cnt);
478 }
479 else
480 {
481 data = false;
482 }
331 if(istr.fail()) 483 if(istr.fail())
332 { 484 {
333 llinfos << "STREAM FAILURE reading boolean." << llendl; 485 llinfos << "STREAM FAILURE reading boolean." << llendl;
486 parse_count = PARSE_FAILURE;
334 } 487 }
335 break; 488 break;
336 489
337 case '1': 490 case '1':
338 c = istr.get(); 491 c = get(istr);
339 data = true; 492 data = true;
340 break; 493 break;
341 494
342 case 'T': 495 case 'T':
343 case 't': 496 case 't':
344 do 497 ignore(istr);
498 c = istr.peek();
499 if(isalpha(c))
345 { 500 {
346 istr.ignore(); 501 int cnt = deserialize_boolean(istr,data,NOTATION_TRUE_SERIAL,true);
347 c = istr.peek(); 502 if(PARSE_FAILURE == cnt) parse_count = cnt;
348 } while (isalpha(c)); 503 else account(cnt);
349 data = true; 504 }
505 else
506 {
507 data = true;
508 }
350 if(istr.fail()) 509 if(istr.fail())
351 { 510 {
352 llinfos << "STREAM FAILURE reading boolean." << llendl; 511 llinfos << "STREAM FAILURE reading boolean." << llendl;
512 parse_count = PARSE_FAILURE;
353 } 513 }
354 break; 514 break;
355 515
356 case 'i': 516 case 'i':
357 { 517 {
358 c = istr.get(); 518 c = get(istr);
359 S32 integer = 0; 519 S32 integer = 0;
360 istr >> integer; 520 istr >> integer;
361 data = integer; 521 data = integer;
362 if(istr.fail()) 522 if(istr.fail())
363 { 523 {
364 llinfos << "STREAM FAILURE reading integer." << llendl; 524 llinfos << "STREAM FAILURE reading integer." << llendl;
525 parse_count = PARSE_FAILURE;
365 } 526 }
366 break; 527 break;
367 } 528 }
368 529
369 case 'r': 530 case 'r':
370 { 531 {
371 c = istr.get(); 532 c = get(istr);
372 F64 real = 0.0; 533 F64 real = 0.0;
373 istr >> real; 534 istr >> real;
374 data = real; 535 data = real;
375 if(istr.fail()) 536 if(istr.fail())
376 { 537 {
377 llinfos << "STREAM FAILURE reading real." << llendl; 538 llinfos << "STREAM FAILURE reading real." << llendl;
539 parse_count = PARSE_FAILURE;
378 } 540 }
379 break; 541 break;
380 } 542 }
381 543
382 case 'u': 544 case 'u':
383 { 545 {
384 c = istr.get(); 546 c = get(istr);
385 LLUUID id; 547 LLUUID id;
386 istr >> id; 548 istr >> id;
387 data = id; 549 data = id;
388 if(istr.fail()) 550 if(istr.fail())
389 { 551 {
390 llinfos << "STREAM FAILURE reading uuid." << llendl; 552 llinfos << "STREAM FAILURE reading uuid." << llendl;
553 parse_count = PARSE_FAILURE;
391 } 554 }
392 break; 555 break;
393 } 556 }
@@ -395,126 +558,144 @@ S32 LLSDNotationParser::parse(std::istream& istr, LLSD& data) const
395 case '\"': 558 case '\"':
396 case '\'': 559 case '\'':
397 case 's': 560 case 's':
398 parseString(istr, data); 561 if(!parseString(istr, data))
399 if(istr.fail())
400 { 562 {
401 llinfos << "STREAM FAILURE reading string." << llendl; 563 parse_count = PARSE_FAILURE;
402 } 564 }
403 if(data.isUndefined()) 565 if(istr.fail())
404 { 566 {
405 parse_count = NOTATION_PARSE_FAILURE; 567 llinfos << "STREAM FAILURE reading string." << llendl;
568 parse_count = PARSE_FAILURE;
406 } 569 }
407 break; 570 break;
408 571
409 case 'l': 572 case 'l':
410 { 573 {
411 c = istr.get(); // pop the 'l' 574 c = get(istr); // pop the 'l'
412 c = istr.get(); // pop the delimiter 575 c = get(istr); // pop the delimiter
413 std::string str; 576 std::string str;
414 deserialize_string_delim(istr, str, c); 577 int cnt = deserialize_string_delim(istr, str, c);
415 data = LLURI(str); 578 if(PARSE_FAILURE == cnt)
579 {
580 parse_count = PARSE_FAILURE;
581 }
582 else
583 {
584 data = LLURI(str);
585 account(cnt);
586 }
416 if(istr.fail()) 587 if(istr.fail())
417 { 588 {
418 llinfos << "STREAM FAILURE reading link." << llendl; 589 llinfos << "STREAM FAILURE reading link." << llendl;
590 parse_count = PARSE_FAILURE;
419 } 591 }
420 break; 592 break;
421 } 593 }
422 594
423 case 'd': 595 case 'd':
424 { 596 {
425 c = istr.get(); // pop the 'd' 597 c = get(istr); // pop the 'd'
426 c = istr.get(); // pop the delimiter 598 c = get(istr); // pop the delimiter
427 std::string str; 599 std::string str;
428 deserialize_string_delim(istr, str, c); 600 int cnt = deserialize_string_delim(istr, str, c);
429 data = LLDate(str); 601 if(PARSE_FAILURE == cnt)
602 {
603 parse_count = PARSE_FAILURE;
604 }
605 else
606 {
607 data = LLDate(str);
608 account(cnt);
609 }
430 if(istr.fail()) 610 if(istr.fail())
431 { 611 {
432 llinfos << "STREAM FAILURE reading date." << llendl; 612 llinfos << "STREAM FAILURE reading date." << llendl;
613 parse_count = PARSE_FAILURE;
433 } 614 }
434 break; 615 break;
435 } 616 }
436 617
437 case 'b': 618 case 'b':
438 parseBinary(istr, data); 619 if(!parseBinary(istr, data))
439 if(istr.fail())
440 { 620 {
441 llinfos << "STREAM FAILURE reading data." << llendl; 621 parse_count = PARSE_FAILURE;
442 } 622 }
443 if(data.isUndefined()) 623 if(istr.fail())
444 { 624 {
445 parse_count = NOTATION_PARSE_FAILURE; 625 llinfos << "STREAM FAILURE reading data." << llendl;
626 parse_count = PARSE_FAILURE;
446 } 627 }
447 break; 628 break;
448 629
449 default: 630 default:
450 data.clear(); 631 parse_count = PARSE_FAILURE;
451 parse_count = NOTATION_PARSE_FAILURE;
452 llinfos << "Unrecognized character while parsing: int(" << (int)c 632 llinfos << "Unrecognized character while parsing: int(" << (int)c
453 << ")" << llendl; 633 << ")" << llendl;
454 break; 634 break;
455 } 635 }
636 if(PARSE_FAILURE == parse_count)
637 {
638 data.clear();
639 }
456 return parse_count; 640 return parse_count;
457} 641}
458 642
459// static
460LLSD LLSDNotationParser::parse(std::istream& istr)
461{
462 LLSDNotationParser parser;
463 LLSD rv;
464 S32 count = parser.parse(istr, rv);
465 lldebugs << "LLSDNotationParser::parse parsed " << count << " objects."
466 << llendl;
467 return rv;
468}
469
470S32 LLSDNotationParser::parseMap(std::istream& istr, LLSD& map) const 643S32 LLSDNotationParser::parseMap(std::istream& istr, LLSD& map) const
471{ 644{
472 // map: { string:object, string:object } 645 // map: { string:object, string:object }
473 map = LLSD::emptyMap(); 646 map = LLSD::emptyMap();
474 S32 parse_count = 0; 647 S32 parse_count = 0;
475 char c = istr.get(); 648 char c = get(istr);
476 if(c == '{') 649 if(c == '{')
477 { 650 {
478 // eat commas, white 651 // eat commas, white
479 bool found_name = false; 652 bool found_name = false;
480 std::string name; 653 std::string name;
481 c = istr.get(); 654 c = get(istr);
482 while(c != '}' && istr.good()) 655 while(c != '}' && istr.good())
483 { 656 {
484 if(!found_name) 657 if(!found_name)
485 { 658 {
486 if((c == '\"') || (c == '\'') || (c == 's')) 659 if((c == '\"') || (c == '\'') || (c == 's'))
487 { 660 {
488 istr.putback(c); 661 putback(istr, c);
489 found_name = true; 662 found_name = true;
490 deserialize_string(istr, name); 663 int count = deserialize_string(istr, name, mMaxBytesLeft);
664 if(PARSE_FAILURE == count) return PARSE_FAILURE;
665 account(count);
491 } 666 }
492 c = istr.get(); 667 c = get(istr);
493 } 668 }
494 else 669 else
495 { 670 {
496 if(isspace(c) || (c == ':')) 671 if(isspace(c) || (c == ':'))
497 { 672 {
498 c = istr.get(); 673 c = get(istr);
499 continue; 674 continue;
500 } 675 }
501 istr.putback(c); 676 putback(istr, c);
502 LLSD child; 677 LLSD child;
503 S32 count = parse(istr, child); 678 S32 count = doParse(istr, child);
504 if(count > 0) 679 if(count > 0)
505 { 680 {
681 // There must be a value for every key, thus
682 // child_count must be greater than 0.
506 parse_count += count; 683 parse_count += count;
507 map.insert(name, child); 684 map.insert(name, child);
508 } 685 }
509 else 686 else
510 { 687 {
511 map.clear(); 688 return PARSE_FAILURE;
512 return NOTATION_PARSE_FAILURE;
513 } 689 }
514 found_name = false; 690 found_name = false;
515 c = istr.get(); 691 c = get(istr);
516 } 692 }
517 } 693 }
694 if(c != '}')
695 {
696 map.clear();
697 return PARSE_FAILURE;
698 }
518 } 699 }
519 return parse_count; 700 return parse_count;
520} 701}
@@ -524,52 +705,51 @@ S32 LLSDNotationParser::parseArray(std::istream& istr, LLSD& array) const
524 // array: [ object, object, object ] 705 // array: [ object, object, object ]
525 array = LLSD::emptyArray(); 706 array = LLSD::emptyArray();
526 S32 parse_count = 0; 707 S32 parse_count = 0;
527 char c = istr.get(); 708 char c = get(istr);
528 if(c == '[') 709 if(c == '[')
529 { 710 {
530 // eat commas, white 711 // eat commas, white
531 c = istr.get(); 712 c = get(istr);
532 while((c != ']') && istr.good()) 713 while((c != ']') && istr.good())
533 { 714 {
534 LLSD child; 715 LLSD child;
535 if(isspace(c) || (c == ',')) 716 if(isspace(c) || (c == ','))
536 { 717 {
537 c = istr.get(); 718 c = get(istr);
538 continue; 719 continue;
539 } 720 }
540 istr.putback(c); 721 putback(istr, c);
541 S32 count = parse(istr, child); 722 S32 count = doParse(istr, child);
542 if(count > 0) 723 if(PARSE_FAILURE == count)
543 { 724 {
544 parse_count += count; 725 return PARSE_FAILURE;
545 array.append(child);
546 } 726 }
547 else 727 else
548 { 728 {
549 array.clear(); 729 parse_count += count;
550 return NOTATION_PARSE_FAILURE; 730 array.append(child);
551 } 731 }
552 c = istr.get(); 732 c = get(istr);
733 }
734 if(c != ']')
735 {
736 return PARSE_FAILURE;
553 } 737 }
554 } 738 }
555 return parse_count; 739 return parse_count;
556} 740}
557 741
558void LLSDNotationParser::parseString(std::istream& istr, LLSD& data) const 742bool LLSDNotationParser::parseString(std::istream& istr, LLSD& data) const
559{ 743{
560 std::string value; 744 std::string value;
561 if(deserialize_string(istr, value)) 745 int count = deserialize_string(istr, value, mMaxBytesLeft);
562 { 746 if(PARSE_FAILURE == count) return false;
563 data = value; 747 account(count);
564 } 748 data = value;
565 else 749 return true;
566 {
567 // failed to parse.
568 data.clear();
569 }
570} 750}
571 751
572void LLSDNotationParser::parseBinary(std::istream& istr, LLSD& data) const 752bool LLSDNotationParser::parseBinary(std::istream& istr, LLSD& data) const
573{ 753{
574 // binary: b##"ff3120ab1" 754 // binary: b##"ff3120ab1"
575 // or: b(len)"..." 755 // or: b(len)"..."
@@ -582,40 +762,44 @@ void LLSDNotationParser::parseBinary(std::istream& istr, LLSD& data) const
582 762
583 // need to read the base out. 763 // need to read the base out.
584 char buf[BINARY_BUFFER_SIZE]; /* Flawfinder: ignore */ 764 char buf[BINARY_BUFFER_SIZE]; /* Flawfinder: ignore */
585 istr.get(buf, STREAM_GET_COUNT, '"'); 765 get(istr, buf, STREAM_GET_COUNT, '"');
586 char c = istr.get(); 766 char c = get(istr);
587 if((c == '"') && (0 == strncmp("b(", buf, 2))) 767 if(c != '"') return false;
768 if(0 == strncmp("b(", buf, 2))
588 { 769 {
589 // We probably have a valid raw binary stream. determine 770 // We probably have a valid raw binary stream. determine
590 // the size, and read it. 771 // the size, and read it.
591 // *FIX: Should we set a maximum size?
592 S32 len = strtol(buf + 2, NULL, 0); 772 S32 len = strtol(buf + 2, NULL, 0);
773 if(mCheckLimits && (len > mMaxBytesLeft)) return false;
593 std::vector<U8> value; 774 std::vector<U8> value;
594 if(len) 775 if(len)
595 { 776 {
596 value.resize(len); 777 value.resize(len);
597 fullread(istr, (char *)&value[0], len); 778 account(fullread(istr, (char *)&value[0], len));
598 } 779 }
599 c = istr.get(); // strip off the trailing double-quote 780 c = get(istr); // strip off the trailing double-quote
600 data = value; 781 data = value;
601 } 782 }
602 else if((c == '"') && (0 == strncmp("b64", buf, 3))) 783 else if(0 == strncmp("b64", buf, 3))
603 { 784 {
604 // *FIX: A bit inefficient, but works for now. To make the 785 // *FIX: A bit inefficient, but works for now. To make the
605 // format better, I would need to add a hint into the 786 // format better, I would need to add a hint into the
606 // serialization format that indicated how long it was. 787 // serialization format that indicated how long it was.
607 std::stringstream coded_stream; 788 std::stringstream coded_stream;
608 istr.get(*(coded_stream.rdbuf()), '\"'); 789 get(istr, *(coded_stream.rdbuf()), '\"');
609 c = istr.get(); 790 c = get(istr);
610 std::string encoded(coded_stream.str()); 791 std::string encoded(coded_stream.str());
611 S32 len = apr_base64_decode_len(encoded.c_str()); 792 S32 len = apr_base64_decode_len(encoded.c_str());
612 std::vector<U8> value; 793 std::vector<U8> value;
613 value.resize(len); 794 if(len)
614 len = apr_base64_decode_binary(&value[0], encoded.c_str()); 795 {
615 value.resize(len); 796 value.resize(len);
797 len = apr_base64_decode_binary(&value[0], encoded.c_str());
798 value.resize(len);
799 }
616 data = value; 800 data = value;
617 } 801 }
618 else if((c == '"') && (0 == strncmp("b16", buf, 3))) 802 else if(0 == strncmp("b16", buf, 3))
619 { 803 {
620 // yay, base 16. We pop the next character which is either a 804 // yay, base 16. We pop the next character which is either a
621 // double quote or base 16 data. If it's a double quote, we're 805 // double quote or base 16 data. If it's a double quote, we're
@@ -626,14 +810,14 @@ void LLSDNotationParser::parseBinary(std::istream& istr, LLSD& data) const
626 U8 byte_buffer[BINARY_BUFFER_SIZE]; 810 U8 byte_buffer[BINARY_BUFFER_SIZE];
627 U8* write; 811 U8* write;
628 std::vector<U8> value; 812 std::vector<U8> value;
629 c = istr.get(); 813 c = get(istr);
630 while(c != '"') 814 while(c != '"')
631 { 815 {
632 istr.putback(c); 816 putback(istr, c);
633 read = buf; 817 read = buf;
634 write = byte_buffer; 818 write = byte_buffer;
635 istr.get(buf, STREAM_GET_COUNT, '"'); 819 get(istr, buf, STREAM_GET_COUNT, '"');
636 c = istr.get(); 820 c = get(istr);
637 while(*read != '\0') /*Flawfinder: ignore*/ 821 while(*read != '\0') /*Flawfinder: ignore*/
638 { 822 {
639 byte = hex_as_nybble(*read++); 823 byte = hex_as_nybble(*read++);
@@ -648,8 +832,9 @@ void LLSDNotationParser::parseBinary(std::istream& istr, LLSD& data) const
648 } 832 }
649 else 833 else
650 { 834 {
651 data.clear(); 835 return false;
652 } 836 }
837 return true;
653} 838}
654 839
655 840
@@ -666,7 +851,7 @@ LLSDBinaryParser::~LLSDBinaryParser()
666} 851}
667 852
668// virtual 853// virtual
669S32 LLSDBinaryParser::parse(std::istream& istr, LLSD& data) const 854S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
670{ 855{
671/** 856/**
672 * Undefined: '!'<br> 857 * Undefined: '!'<br>
@@ -685,7 +870,7 @@ S32 LLSDBinaryParser::parse(std::istream& istr, LLSD& data) const
685 * notation format. 870 * notation format.
686 */ 871 */
687 char c; 872 char c;
688 c = istr.get(); 873 c = get(istr);
689 if(!istr.good()) 874 if(!istr.good())
690 { 875 {
691 return 0; 876 return 0;
@@ -694,20 +879,42 @@ S32 LLSDBinaryParser::parse(std::istream& istr, LLSD& data) const
694 switch(c) 879 switch(c)
695 { 880 {
696 case '{': 881 case '{':
697 parse_count += parseMap(istr, data); 882 {
883 S32 child_count = parseMap(istr, data);
884 if((child_count == PARSE_FAILURE) || data.isUndefined())
885 {
886 parse_count = PARSE_FAILURE;
887 }
888 else
889 {
890 parse_count += child_count;
891 }
698 if(istr.fail()) 892 if(istr.fail())
699 { 893 {
700 llinfos << "STREAM FAILURE reading binary map." << llendl; 894 llinfos << "STREAM FAILURE reading binary map." << llendl;
895 parse_count = PARSE_FAILURE;
701 } 896 }
702 break; 897 break;
898 }
703 899
704 case '[': 900 case '[':
705 parse_count += parseArray(istr, data); 901 {
902 S32 child_count = parseArray(istr, data);
903 if((child_count == PARSE_FAILURE) || data.isUndefined())
904 {
905 parse_count = PARSE_FAILURE;
906 }
907 else
908 {
909 parse_count += child_count;
910 }
706 if(istr.fail()) 911 if(istr.fail())
707 { 912 {
708 llinfos << "STREAM FAILURE reading binary array." << llendl; 913 llinfos << "STREAM FAILURE reading binary array." << llendl;
914 parse_count = PARSE_FAILURE;
709 } 915 }
710 break; 916 break;
917 }
711 918
712 case '!': 919 case '!':
713 data.clear(); 920 data.clear();
@@ -724,7 +931,7 @@ S32 LLSDBinaryParser::parse(std::istream& istr, LLSD& data) const
724 case 'i': 931 case 'i':
725 { 932 {
726 U32 value_nbo = 0; 933 U32 value_nbo = 0;
727 istr.read((char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/ 934 read(istr, (char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/
728 data = (S32)ntohl(value_nbo); 935 data = (S32)ntohl(value_nbo);
729 if(istr.fail()) 936 if(istr.fail())
730 { 937 {
@@ -736,7 +943,7 @@ S32 LLSDBinaryParser::parse(std::istream& istr, LLSD& data) const
736 case 'r': 943 case 'r':
737 { 944 {
738 F64 real_nbo = 0.0; 945 F64 real_nbo = 0.0;
739 istr.read((char*)&real_nbo, sizeof(F64)); /*Flawfinder: ignore*/ 946 read(istr, (char*)&real_nbo, sizeof(F64)); /*Flawfinder: ignore*/
740 data = ll_ntohd(real_nbo); 947 data = ll_ntohd(real_nbo);
741 if(istr.fail()) 948 if(istr.fail())
742 { 949 {
@@ -748,7 +955,7 @@ S32 LLSDBinaryParser::parse(std::istream& istr, LLSD& data) const
748 case 'u': 955 case 'u':
749 { 956 {
750 LLUUID id; 957 LLUUID id;
751 istr.read((char*)(&id.mData), UUID_BYTES); /*Flawfinder: ignore*/ 958 read(istr, (char*)(&id.mData), UUID_BYTES); /*Flawfinder: ignore*/
752 data = id; 959 data = id;
753 if(istr.fail()) 960 if(istr.fail())
754 { 961 {
@@ -761,19 +968,40 @@ S32 LLSDBinaryParser::parse(std::istream& istr, LLSD& data) const
761 case '"': 968 case '"':
762 { 969 {
763 std::string value; 970 std::string value;
764 deserialize_string_delim(istr, value, c); 971 int cnt = deserialize_string_delim(istr, value, c);
765 data = value; 972 if(PARSE_FAILURE == cnt)
973 {
974 parse_count = PARSE_FAILURE;
975 }
976 else
977 {
978 data = value;
979 account(cnt);
980 }
981 if(istr.fail())
982 {
983 llinfos << "STREAM FAILURE reading binary (notation-style) string."
984 << llendl;
985 parse_count = PARSE_FAILURE;
986 }
766 break; 987 break;
767 } 988 }
768 989
769 case 's': 990 case 's':
770 { 991 {
771 std::string value; 992 std::string value;
772 parseString(istr, value); 993 if(parseString(istr, value))
773 data = value; 994 {
995 data = value;
996 }
997 else
998 {
999 parse_count = PARSE_FAILURE;
1000 }
774 if(istr.fail()) 1001 if(istr.fail())
775 { 1002 {
776 llinfos << "STREAM FAILURE reading binary string." << llendl; 1003 llinfos << "STREAM FAILURE reading binary string." << llendl;
1004 parse_count = PARSE_FAILURE;
777 } 1005 }
778 break; 1006 break;
779 } 1007 }
@@ -781,11 +1009,18 @@ S32 LLSDBinaryParser::parse(std::istream& istr, LLSD& data) const
781 case 'l': 1009 case 'l':
782 { 1010 {
783 std::string value; 1011 std::string value;
784 parseString(istr, value); 1012 if(parseString(istr, value))
785 data = LLURI(value); 1013 {
1014 data = LLURI(value);
1015 }
1016 else
1017 {
1018 parse_count = PARSE_FAILURE;
1019 }
786 if(istr.fail()) 1020 if(istr.fail())
787 { 1021 {
788 llinfos << "STREAM FAILURE reading binary link." << llendl; 1022 llinfos << "STREAM FAILURE reading binary link." << llendl;
1023 parse_count = PARSE_FAILURE;
789 } 1024 }
790 break; 1025 break;
791 } 1026 }
@@ -793,11 +1028,12 @@ S32 LLSDBinaryParser::parse(std::istream& istr, LLSD& data) const
793 case 'd': 1028 case 'd':
794 { 1029 {
795 F64 real = 0.0; 1030 F64 real = 0.0;
796 istr.read((char*)&real, sizeof(F64)); /*Flawfinder: ignore*/ 1031 read(istr, (char*)&real, sizeof(F64)); /*Flawfinder: ignore*/
797 data = LLDate(real); 1032 data = LLDate(real);
798 if(istr.fail()) 1033 if(istr.fail())
799 { 1034 {
800 llinfos << "STREAM FAILURE reading binary date." << llendl; 1035 llinfos << "STREAM FAILURE reading binary date." << llendl;
1036 parse_count = PARSE_FAILURE;
801 } 1037 }
802 break; 1038 break;
803 } 1039 }
@@ -806,75 +1042,94 @@ S32 LLSDBinaryParser::parse(std::istream& istr, LLSD& data) const
806 { 1042 {
807 // We probably have a valid raw binary stream. determine 1043 // We probably have a valid raw binary stream. determine
808 // the size, and read it. 1044 // the size, and read it.
809 // *FIX: Should we set a maximum size?
810 U32 size_nbo = 0; 1045 U32 size_nbo = 0;
811 istr.read((char*)&size_nbo, sizeof(U32)); /*Flawfinder: ignore*/ 1046 read(istr, (char*)&size_nbo, sizeof(U32)); /*Flawfinder: ignore*/
812 S32 size = (S32)ntohl(size_nbo); 1047 S32 size = (S32)ntohl(size_nbo);
813 std::vector<U8> value; 1048 if(mCheckLimits && (size > mMaxBytesLeft))
814 if(size)
815 { 1049 {
816 value.resize(size); 1050 parse_count = PARSE_FAILURE;
817 istr.read((char*)&value[0], size); /*Flawfinder: ignore*/ 1051 }
1052 else
1053 {
1054 std::vector<U8> value;
1055 if(size > 0)
1056 {
1057 value.resize(size);
1058 account(fullread(istr, (char*)&value[0], size));
1059 }
1060 data = value;
818 } 1061 }
819 data = value;
820 if(istr.fail()) 1062 if(istr.fail())
821 { 1063 {
822 llinfos << "STREAM FAILURE reading binary." << llendl; 1064 llinfos << "STREAM FAILURE reading binary." << llendl;
1065 parse_count = PARSE_FAILURE;
823 } 1066 }
824 break; 1067 break;
825 } 1068 }
826 1069
827 default: 1070 default:
828 --parse_count; 1071 parse_count = PARSE_FAILURE;
829 llinfos << "Unrecognized character while parsing: int(" << (int)c 1072 llinfos << "Unrecognized character while parsing: int(" << (int)c
830 << ")" << llendl; 1073 << ")" << llendl;
831 break; 1074 break;
832 } 1075 }
1076 if(PARSE_FAILURE == parse_count)
1077 {
1078 data.clear();
1079 }
833 return parse_count; 1080 return parse_count;
834} 1081}
835 1082
836// static
837LLSD LLSDBinaryParser::parse(std::istream& istr)
838{
839 LLSDBinaryParser parser;
840 LLSD rv;
841 S32 count = parser.parse(istr, rv);
842 lldebugs << "LLSDBinaryParser::parse parsed " << count << " objects."
843 << llendl;
844 return rv;
845}
846
847S32 LLSDBinaryParser::parseMap(std::istream& istr, LLSD& map) const 1083S32 LLSDBinaryParser::parseMap(std::istream& istr, LLSD& map) const
848{ 1084{
849 map = LLSD::emptyMap(); 1085 map = LLSD::emptyMap();
850 U32 value_nbo = 0; 1086 U32 value_nbo = 0;
851 istr.read((char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/ 1087 read(istr, (char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/
852 S32 size = (S32)ntohl(value_nbo); 1088 S32 size = (S32)ntohl(value_nbo);
853 S32 parse_count = 0; 1089 S32 parse_count = 0;
854 S32 count = 0; 1090 S32 count = 0;
855 char c = istr.get(); 1091 char c = get(istr);
856 while(c != '}' && (count < size) && istr.good()) 1092 while(c != '}' && (count < size) && istr.good())
857 { 1093 {
858 std::string name; 1094 std::string name;
859 switch(c) 1095 switch(c)
860 { 1096 {
861 case 'k': 1097 case 'k':
862 parseString(istr, name); 1098 if(!parseString(istr, name))
1099 {
1100 return PARSE_FAILURE;
1101 }
863 break; 1102 break;
864 case '\'': 1103 case '\'':
865 case '"': 1104 case '"':
866 deserialize_string_delim(istr, name, c); 1105 {
1106 int cnt = deserialize_string_delim(istr, name, c);
1107 if(PARSE_FAILURE == cnt) return PARSE_FAILURE;
1108 account(cnt);
867 break; 1109 break;
868 } 1110 }
1111 }
869 LLSD child; 1112 LLSD child;
870 S32 child_count = parse(istr, child); 1113 S32 child_count = doParse(istr, child);
871 if(child_count) 1114 if(child_count > 0)
872 { 1115 {
1116 // There must be a value for every key, thus child_count
1117 // must be greater than 0.
873 parse_count += child_count; 1118 parse_count += child_count;
874 map.insert(name, child); 1119 map.insert(name, child);
875 } 1120 }
1121 else
1122 {
1123 return PARSE_FAILURE;
1124 }
876 ++count; 1125 ++count;
877 c = istr.get(); 1126 c = get(istr);
1127 }
1128 if((c != '}') || (count < size))
1129 {
1130 // Make sure it is correctly terminated and we parsed as many
1131 // as were said to be there.
1132 return PARSE_FAILURE;
878 } 1133 }
879 return parse_count; 1134 return parse_count;
880} 1135}
@@ -883,7 +1138,7 @@ S32 LLSDBinaryParser::parseArray(std::istream& istr, LLSD& array) const
883{ 1138{
884 array = LLSD::emptyArray(); 1139 array = LLSD::emptyArray();
885 U32 value_nbo = 0; 1140 U32 value_nbo = 0;
886 istr.read((char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/ 1141 read(istr, (char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/
887 S32 size = (S32)ntohl(value_nbo); 1142 S32 size = (S32)ntohl(value_nbo);
888 1143
889 // *FIX: This would be a good place to reserve some space in the 1144 // *FIX: This would be a good place to reserve some space in the
@@ -895,7 +1150,11 @@ S32 LLSDBinaryParser::parseArray(std::istream& istr, LLSD& array) const
895 while((c != ']') && (count < size) && istr.good()) 1150 while((c != ']') && (count < size) && istr.good())
896 { 1151 {
897 LLSD child; 1152 LLSD child;
898 S32 child_count = parse(istr, child); 1153 S32 child_count = doParse(istr, child);
1154 if(PARSE_FAILURE == child_count)
1155 {
1156 return PARSE_FAILURE;
1157 }
899 if(child_count) 1158 if(child_count)
900 { 1159 {
901 parse_count += child_count; 1160 parse_count += child_count;
@@ -904,22 +1163,33 @@ S32 LLSDBinaryParser::parseArray(std::istream& istr, LLSD& array) const
904 ++count; 1163 ++count;
905 c = istr.peek(); 1164 c = istr.peek();
906 } 1165 }
907 c = istr.get(); 1166 c = get(istr);
1167 if((c != ']') || (count < size))
1168 {
1169 // Make sure it is correctly terminated and we parsed as many
1170 // as were said to be there.
1171 return PARSE_FAILURE;
1172 }
908 return parse_count; 1173 return parse_count;
909} 1174}
910 1175
911void LLSDBinaryParser::parseString( 1176bool LLSDBinaryParser::parseString(
912 std::istream& istr, 1177 std::istream& istr,
913 std::string& value) const 1178 std::string& value) const
914{ 1179{
915 // *FIX: This is memory inefficient. 1180 // *FIX: This is memory inefficient.
916 U32 value_nbo = 0; 1181 U32 value_nbo = 0;
917 istr.read((char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/ 1182 read(istr, (char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/
918 S32 size = (S32)ntohl(value_nbo); 1183 S32 size = (S32)ntohl(value_nbo);
1184 if(mCheckLimits && (size > mMaxBytesLeft)) return false;
919 std::vector<char> buf; 1185 std::vector<char> buf;
920 buf.resize(size); 1186 if(size)
921 istr.read(&buf[0], size); /*Flawfinder: ignore*/ 1187 {
922 value.assign(buf.begin(), buf.end()); 1188 buf.resize(size);
1189 account(fullread(istr, &buf[0], size));
1190 value.assign(buf.begin(), buf.end());
1191 }
1192 return true;
923} 1193}
924 1194
925 1195
@@ -1217,33 +1487,38 @@ void LLSDBinaryFormatter::formatString(
1217/** 1487/**
1218 * local functions 1488 * local functions
1219 */ 1489 */
1220bool deserialize_string(std::istream& str, std::string& value) 1490int deserialize_string(std::istream& istr, std::string& value, S32 max_bytes)
1221{ 1491{
1222 char c = str.get(); 1492 char c = istr.get();
1223 if (str.fail()) 1493 if(istr.fail())
1224 { 1494 {
1225 // No data in stream, bail out 1495 // No data in stream, bail out but mention the character we
1226 return false; 1496 // grabbed.
1497 return LLSDParser::PARSE_FAILURE;
1227 } 1498 }
1228 1499
1229 bool rv = false; 1500 int rv = LLSDParser::PARSE_FAILURE;
1230 switch(c) 1501 switch(c)
1231 { 1502 {
1232 case '\'': 1503 case '\'':
1233 case '"': 1504 case '"':
1234 rv = deserialize_string_delim(str, value, c); 1505 rv = deserialize_string_delim(istr, value, c);
1235 break; 1506 break;
1236 case 's': 1507 case 's':
1237 rv = deserialize_string_raw(str, value); 1508 // technically, less than max_bytes, but this is just meant to
1509 // catch egregious protocol errors. parse errors will be
1510 // caught in the case of incorrect counts.
1511 rv = deserialize_string_raw(istr, value, max_bytes);
1238 break; 1512 break;
1239 default: 1513 default:
1240 break; 1514 break;
1241 } 1515 }
1242 return rv; 1516 if(LLSDParser::PARSE_FAILURE == rv) return rv;
1517 return rv + 1; // account for the character grabbed at the top.
1243} 1518}
1244 1519
1245bool deserialize_string_delim( 1520int deserialize_string_delim(
1246 std::istream& str, 1521 std::istream& istr,
1247 std::string& value, 1522 std::string& value,
1248 char delim) 1523 char delim)
1249{ 1524{
@@ -1252,16 +1527,18 @@ bool deserialize_string_delim(
1252 bool found_hex = false; 1527 bool found_hex = false;
1253 bool found_digit = false; 1528 bool found_digit = false;
1254 U8 byte = 0; 1529 U8 byte = 0;
1255 1530 int count = 0;
1531
1256 while (true) 1532 while (true)
1257 { 1533 {
1258 char next_char = str.get(); 1534 char next_char = istr.get();
1259 1535 ++count;
1260 if(str.fail()) 1536
1537 if(istr.fail())
1261 { 1538 {
1262 // If our stream is empty, break out 1539 // If our stream is empty, break out
1263 value = write_buffer.str(); 1540 value = write_buffer.str();
1264 return false; 1541 return LLSDParser::PARSE_FAILURE;
1265 } 1542 }
1266 1543
1267 if(found_escape) 1544 if(found_escape)
@@ -1338,35 +1615,48 @@ bool deserialize_string_delim(
1338 } 1615 }
1339 1616
1340 value = write_buffer.str(); 1617 value = write_buffer.str();
1341 return true; 1618 return count;
1342} 1619}
1343 1620
1344bool deserialize_string_raw(std::istream& str, std::string& value) 1621int deserialize_string_raw(
1622 std::istream& istr,
1623 std::string& value,
1624 S32 max_bytes)
1345{ 1625{
1346 bool ok = false; 1626 int count = 0;
1347 const S32 BUF_LEN = 20; 1627 const S32 BUF_LEN = 20;
1348 char buf[BUF_LEN]; /* Flawfinder: ignore */ 1628 char buf[BUF_LEN]; /* Flawfinder: ignore */
1349 str.get(buf, BUF_LEN - 1, ')'); 1629 istr.get(buf, BUF_LEN - 1, ')');
1350 char c = str.get(); 1630 count += istr.gcount();
1351 c = str.get(); 1631 char c = istr.get();
1632 c = istr.get();
1633 count += 2;
1352 if(((c == '"') || (c == '\'')) && (buf[0] == '(')) 1634 if(((c == '"') || (c == '\'')) && (buf[0] == '('))
1353 { 1635 {
1354 // We probably have a valid raw string. determine 1636 // We probably have a valid raw string. determine
1355 // the size, and read it. 1637 // the size, and read it.
1356 // *FIX: Should we set a maximum size?
1357 // *FIX: This is memory inefficient. 1638 // *FIX: This is memory inefficient.
1358 S32 len = strtol(buf + 1, NULL, 0); 1639 S32 len = strtol(buf + 1, NULL, 0);
1640 if((max_bytes>0)&&(len>max_bytes)) return LLSDParser::PARSE_FAILURE;
1359 std::vector<char> buf; 1641 std::vector<char> buf;
1360 buf.resize(len); 1642 if(len)
1361 str.read(&buf[0], len); /*Flawfinder: ignore*/ 1643 {
1362 value.assign(buf.begin(), buf.end()); 1644 buf.resize(len);
1363 c = str.get(); 1645 count += fullread(istr, (char *)&buf[0], len);
1364 if((c == '"') || (c == '\'')) 1646 value.assign(buf.begin(), buf.end());
1647 }
1648 c = istr.get();
1649 ++count;
1650 if(!((c == '"') || (c == '\'')))
1365 { 1651 {
1366 ok = true; 1652 return LLSDParser::PARSE_FAILURE;
1367 } 1653 }
1368 } 1654 }
1369 return ok; 1655 else
1656 {
1657 return LLSDParser::PARSE_FAILURE;
1658 }
1659 return count;
1370} 1660}
1371 1661
1372static const char* NOTATION_STRING_CHARACTERS[256] = 1662static const char* NOTATION_STRING_CHARACTERS[256] =
@@ -1641,6 +1931,43 @@ void serialize_string(const std::string& value, std::ostream& str)
1641 } 1931 }
1642} 1932}
1643 1933
1934int deserialize_boolean(
1935 std::istream& istr,
1936 LLSD& data,
1937 const std::string& compare,
1938 bool value)
1939{
1940 //
1941 // this method is a little goofy, because it gets the stream at
1942 // the point where the t or f has already been
1943 // consumed. Basically, parse for a patch to the string passed in
1944 // starting at index 1. If it's a match:
1945 // * assign data to value
1946 // * return the number of bytes read
1947 // otherwise:
1948 // * set data to LLSD::null
1949 // * return LLSDParser::PARSE_FAILURE (-1)
1950 //
1951 int bytes_read = 0;
1952 std::string::size_type ii = 0;
1953 char c = istr.peek();
1954 while((++ii < compare.size())
1955 && (tolower(c) == (int)compare[ii])
1956 && istr.good())
1957 {
1958 istr.ignore();
1959 ++bytes_read;
1960 c = istr.peek();
1961 }
1962 if(compare.size() != ii)
1963 {
1964 data.clear();
1965 return LLSDParser::PARSE_FAILURE;
1966 }
1967 data = value;
1968 return bytes_read;
1969}
1970
1644std::ostream& operator<<(std::ostream& s, const LLSD& llsd) 1971std::ostream& operator<<(std::ostream& s, const LLSD& llsd)
1645{ 1972{
1646 s << LLSDNotationStreamer(llsd); 1973 s << LLSDNotationStreamer(llsd);
diff --git a/linden/indra/llcommon/llsdserialize.h b/linden/indra/llcommon/llsdserialize.h
index e1e81d5..41e0aa5 100644
--- a/linden/indra/llcommon/llsdserialize.h
+++ b/linden/indra/llcommon/llsdserialize.h
@@ -40,7 +40,7 @@
40 40
41/** 41/**
42 * @class LLSDParser 42 * @class LLSDParser
43 * @brief Abstract base class for simple LLSD parsers. 43 * @brief Abstract base class for LLSD parsers.
44 */ 44 */
45class LLSDParser : public LLRefCount 45class LLSDParser : public LLRefCount
46{ 46{
@@ -52,6 +52,14 @@ protected:
52 52
53public: 53public:
54 /** 54 /**
55 * @brief Anonymous enum to indicate parsing failure.
56 */
57 enum
58 {
59 PARSE_FAILURE = -1
60 };
61
62 /**
55 * @brief Constructor 63 * @brief Constructor
56 */ 64 */
57 LLSDParser(); 65 LLSDParser();
@@ -67,12 +75,122 @@ public:
67 * caller. 75 * caller.
68 * @param istr The input stream. 76 * @param istr The input stream.
69 * @param data[out] The newly parse structured data. 77 * @param data[out] The newly parse structured data.
70 * @return Returns The number of LLSD objects parsed into data. 78 * @param max_bytes The maximum number of bytes that will be in
79 * the stream. Pass in LLSDSerialize::SIZE_UNLIMITED (-1) to set no
80 * byte limit.
81 * @return Returns the number of LLSD objects parsed into
82 * data. Returns PARSE_FAILURE (-1) on parse failure.
83 */
84 S32 parse(std::istream& istr, LLSD& data, S32 max_bytes);
85
86protected:
87 /**
88 * @brief Pure virtual base for doing the parse.
89 *
90 * This method parses the istream for a structured data. This
91 * method assumes that the istream is a complete llsd object --
92 * for example an opened and closed map with an arbitrary nesting
93 * of elements. This method will return after reading one data
94 * object, allowing continued reading from the stream by the
95 * caller.
96 * @param istr The input stream.
97 * @param data[out] The newly parse structured data.
98 * @return Returns the number of LLSD objects parsed into
99 * data. Returns PARSE_FAILURE (-1) on parse failure.
100 */
101 virtual S32 doParse(std::istream& istr, LLSD& data) const = 0;
102
103 /* @name Simple istream helper methods
104 *
105 * These helper methods exist to help correctly use the
106 * mMaxBytesLeft without really thinking about it for most simple
107 * operations. Use of the streamtools in llstreamtools.h will
108 * require custom wrapping.
109 */
110 //@{
111 /**
112 * @brief get a byte off the stream
113 *
114 * @param istr The istream to work with.
115 * @return returns the next character.
116 */
117 int get(std::istream& istr) const;
118
119 /**
120 * @brief get several bytes off the stream into a buffer.
121 *
122 * @param istr The istream to work with.
123 * @param s The buffer to get into
124 * @param n Extract maximum of n-1 bytes and null temrinate.
125 * @param delim Delimiter to get until found.
126 * @return Returns istr.
127 */
128 std::istream& get(
129 std::istream& istr,
130 char* s,
131 std::streamsize n,
132 char delim) const;
133
134 /**
135 * @brief get several bytes off the stream into a streambuf
136 *
137 * @param istr The istream to work with.
138 * @param sb The streambuf to read into
139 * @param delim Delimiter to get until found.
140 * @return Returns istr.
141 */
142 std::istream& get(
143 std::istream& istr,
144 std::streambuf& sb,
145 char delim) const;
146
147 /**
148 * @brief ignore the next byte on the istream
149 *
150 * @param istr The istream to work with.
151 * @return Returns istr.
152 */
153 std::istream& ignore(std::istream& istr) const;
154
155 /**
156 * @brief put the last character retrieved back on the stream
157 *
158 * @param istr The istream to work with.
159 * @param c The character to put back
160 * @return Returns istr.
161 */
162 std::istream& putback(std::istream& istr, char c) const;
163
164 /**
165 * @brief read a block of n characters into a buffer
166 *
167 * @param istr The istream to work with.
168 * @param s The buffer to read into
169 * @param n The number of bytes to read.
170 * @return Returns istr.
171 */
172 std::istream& read(std::istream& istr, char* s, std::streamsize n) const;
173 //@}
174
175protected:
176 /**
177 * @brief Accunt for bytes read outside of the istream helpers.
178 *
179 * Conceptually const since it only modifies mutable members.
180 * @param bytes The number of bytes read.
71 */ 181 */
72 virtual S32 parse(std::istream& istr, LLSD& data) const = 0; 182 void account(S32 bytes) const;
73 183
74protected: 184protected:
185 /**
186 * @brief boolean to set if byte counts should be checked during parsing.
187 */
188 bool mCheckLimits;
75 189
190 /**
191 * @brief The maximum number of bytes left to be parsed.
192 */
193 mutable S32 mMaxBytesLeft;
76}; 194};
77 195
78/** 196/**
@@ -91,8 +209,9 @@ public:
91 /** 209 /**
92 * @brief Constructor 210 * @brief Constructor
93 */ 211 */
94 LLSDNotationParser() {} 212 LLSDNotationParser();
95 213
214protected:
96 /** 215 /**
97 * @brief Call this method to parse a stream for LLSD. 216 * @brief Call this method to parse a stream for LLSD.
98 * 217 *
@@ -105,21 +224,9 @@ public:
105 * @param istr The input stream. 224 * @param istr The input stream.
106 * @param data[out] The newly parse structured data. Undefined on failure. 225 * @param data[out] The newly parse structured data. Undefined on failure.
107 * @return Returns the number of LLSD objects parsed into 226 * @return Returns the number of LLSD objects parsed into
108 * data. Returns -1 on parse failure. 227 * data. Returns PARSE_FAILURE (-1) on parse failure.
109 */
110 virtual S32 parse(std::istream& istr, LLSD& data) const;
111
112 /**
113 * @brief Simple notation parse.
114 *
115 * This simplified parser cannot not distinguish between a failed
116 * parse and a parse which yields a single undefined LLSD. You can
117 * use this if error checking will be implicit in the use of the
118 * results of the parse.
119 * @param istr The input stream.
120 * @return Returns the parsed LLSD object.
121 */ 228 */
122 static LLSD parse(std::istream& istr); 229 virtual S32 doParse(std::istream& istr, LLSD& data) const;
123 230
124private: 231private:
125 /** 232 /**
@@ -145,16 +252,18 @@ private:
145 * 252 *
146 * @param istr The input stream. 253 * @param istr The input stream.
147 * @param data[out] The data to assign. 254 * @param data[out] The data to assign.
255 * @return Retuns true if a complete string was parsed.
148 */ 256 */
149 void parseString(std::istream& istr, LLSD& data) const; 257 bool parseString(std::istream& istr, LLSD& data) const;
150 258
151 /** 259 /**
152 * @brief Parse binary data from the stream. 260 * @brief Parse binary data from the stream.
153 * 261 *
154 * @param istr The input stream. 262 * @param istr The input stream.
155 * @param data[out] The data to assign. 263 * @param data[out] The data to assign.
264 * @return Retuns true if a complete blob was parsed.
156 */ 265 */
157 void parseBinary(std::istream& istr, LLSD& data) const; 266 bool parseBinary(std::istream& istr, LLSD& data) const;
158}; 267};
159 268
160/** 269/**
@@ -175,6 +284,7 @@ public:
175 */ 284 */
176 LLSDXMLParser(); 285 LLSDXMLParser();
177 286
287protected:
178 /** 288 /**
179 * @brief Call this method to parse a stream for LLSD. 289 * @brief Call this method to parse a stream for LLSD.
180 * 290 *
@@ -186,15 +296,16 @@ public:
186 * caller. 296 * caller.
187 * @param istr The input stream. 297 * @param istr The input stream.
188 * @param data[out] The newly parse structured data. 298 * @param data[out] The newly parse structured data.
189 * @return Returns the number of LLSD objects parsed into data. 299 * @return Returns the number of LLSD objects parsed into
300 * data. Returns PARSE_FAILURE (-1) on parse failure.
190 */ 301 */
191 virtual S32 parse(std::istream& istr, LLSD& data) const; 302 virtual S32 doParse(std::istream& istr, LLSD& data) const;
192 303
193private: 304private:
194 class Impl; 305 class Impl;
195 Impl& impl; 306 Impl& impl;
196 307
197 void parsePart(const char *buf, int len); 308 void parsePart(const char* buf, int len);
198 friend class LLSDSerialize; 309 friend class LLSDSerialize;
199}; 310};
200 311
@@ -216,6 +327,7 @@ public:
216 */ 327 */
217 LLSDBinaryParser(); 328 LLSDBinaryParser();
218 329
330protected:
219 /** 331 /**
220 * @brief Call this method to parse a stream for LLSD. 332 * @brief Call this method to parse a stream for LLSD.
221 * 333 *
@@ -227,21 +339,10 @@ public:
227 * caller. 339 * caller.
228 * @param istr The input stream. 340 * @param istr The input stream.
229 * @param data[out] The newly parse structured data. 341 * @param data[out] The newly parse structured data.
230 * @return Returns the number of LLSD objects parsed into data. 342 * @return Returns the number of LLSD objects parsed into
231 */ 343 * data. Returns -1 on parse failure.
232 virtual S32 parse(std::istream& istr, LLSD& data) const;
233
234 /**
235 * @brief Simple notation parse.
236 *
237 * This simplified parser cannot not distinguish between a failed
238 * parse and a parse which yields a single undefined LLSD. You can
239 * use this if error checking will be implicit in the use of the
240 * results of the parse.
241 * @param istr The input stream.
242 * @return Returns the parsed LLSD object.
243 */ 344 */
244 static LLSD parse(std::istream& istr); 345 virtual S32 doParse(std::istream& istr, LLSD& data) const;
245 346
246private: 347private:
247 /** 348 /**
@@ -267,8 +368,9 @@ private:
267 * 368 *
268 * @param istr The input stream. 369 * @param istr The input stream.
269 * @param value[out] The string to assign. 370 * @param value[out] The string to assign.
371 * @return Retuns true if a complete string was parsed.
270 */ 372 */
271 void parseString(std::istream& istr, std::string& value) const; 373 bool parseString(std::istream& istr, std::string& value) const;
272}; 374};
273 375
274 376
@@ -544,7 +646,7 @@ typedef LLSDOStreamer<LLSDXMLFormatter> LLSDXMLStreamer;
544 646
545/** 647/**
546 * @class LLSDSerialize 648 * @class LLSDSerialize
547 * @Serializer / deserializer for the various LLSD formats 649 * @brief Serializer / deserializer for the various LLSD formats
548 */ 650 */
549class LLSDSerialize 651class LLSDSerialize
550{ 652{
@@ -554,12 +656,32 @@ public:
554 LLSD_BINARY, LLSD_XML 656 LLSD_BINARY, LLSD_XML
555 }; 657 };
556 658
659 /**
660 * @brief anonymouse enumeration for useful max_bytes constants.
661 */
662 enum
663 {
664 // Setting an unlimited size is discouraged and should only be
665 // used when reading cin or another stream source which does
666 // not provide access to size.
667 SIZE_UNLIMITED = -1,
668 };
669
557 /* 670 /*
558 * Generic in/outs 671 * Generic in/outs
559 */ 672 */
560 static void serialize(const LLSD& sd, std::ostream& str, ELLSD_Serialize, 673 static void serialize(const LLSD& sd, std::ostream& str, ELLSD_Serialize,
561 U32 options = LLSDFormatter::OPTIONS_NONE); 674 U32 options = LLSDFormatter::OPTIONS_NONE);
562 static bool deserialize(LLSD& sd, std::istream& str); 675
676 /**
677 * @breif Examine a stream, and parse 1 sd object out based on contents.
678 *
679 * @param sd [out] The data found on the stream
680 * @param str The incoming stream
681 * @param max_bytes the maximum number of bytes to parse
682 * @return Returns true if the stream appears to contain valid data
683 */
684 static bool deserialize(LLSD& sd, std::istream& str, S32 max_bytes);
563 685
564 /* 686 /*
565 * Notation Methods 687 * Notation Methods
@@ -569,10 +691,17 @@ public:
569 LLPointer<LLSDNotationFormatter> f = new LLSDNotationFormatter; 691 LLPointer<LLSDNotationFormatter> f = new LLSDNotationFormatter;
570 return f->format(sd, str, LLSDFormatter::OPTIONS_NONE); 692 return f->format(sd, str, LLSDFormatter::OPTIONS_NONE);
571 } 693 }
572 static S32 fromNotation(LLSD& sd, std::istream& str) 694 static S32 fromNotation(LLSD& sd, std::istream& str, S32 max_bytes)
695 {
696 LLPointer<LLSDNotationParser> p = new LLSDNotationParser;
697 return p->parse(str, sd, max_bytes);
698 }
699 static LLSD fromNotation(std::istream& str, S32 max_bytes)
573 { 700 {
574 LLPointer<LLSDNotationParser> p = new LLSDNotationParser; 701 LLPointer<LLSDNotationParser> p = new LLSDNotationParser;
575 return p->parse(str, sd); 702 LLSD sd;
703 (void)p->parse(str, sd, max_bytes);
704 return sd;
576 } 705 }
577 706
578 /* 707 /*
@@ -588,10 +717,13 @@ public:
588 LLPointer<LLSDXMLFormatter> f = new LLSDXMLFormatter; 717 LLPointer<LLSDXMLFormatter> f = new LLSDXMLFormatter;
589 return f->format(sd, str, LLSDFormatter::OPTIONS_PRETTY); 718 return f->format(sd, str, LLSDFormatter::OPTIONS_PRETTY);
590 } 719 }
720
591 static S32 fromXML(LLSD& sd, std::istream& str) 721 static S32 fromXML(LLSD& sd, std::istream& str)
592 { 722 {
723 // no need for max_bytes since xml formatting is not
724 // subvertable by bad sizes.
593 LLPointer<LLSDXMLParser> p = new LLSDXMLParser; 725 LLPointer<LLSDXMLParser> p = new LLSDXMLParser;
594 return p->parse(str, sd); 726 return p->parse(str, sd, LLSDSerialize::SIZE_UNLIMITED);
595 } 727 }
596 728
597 /* 729 /*
@@ -602,14 +734,18 @@ public:
602 LLPointer<LLSDBinaryFormatter> f = new LLSDBinaryFormatter; 734 LLPointer<LLSDBinaryFormatter> f = new LLSDBinaryFormatter;
603 return f->format(sd, str, LLSDFormatter::OPTIONS_NONE); 735 return f->format(sd, str, LLSDFormatter::OPTIONS_NONE);
604 } 736 }
605 static S32 fromBinary(LLSD& sd, std::istream& str) 737 static S32 fromBinary(LLSD& sd, std::istream& str, S32 max_bytes)
606 { 738 {
607 LLPointer<LLSDBinaryParser> p = new LLSDBinaryParser; 739 LLPointer<LLSDBinaryParser> p = new LLSDBinaryParser;
608 return p->parse(str, sd); 740 return p->parse(str, sd, max_bytes);
741 }
742 static LLSD fromBinary(std::istream& str, S32 max_bytes)
743 {
744 LLPointer<LLSDBinaryParser> p = new LLSDBinaryParser;
745 LLSD sd;
746 (void)p->parse(str, sd, max_bytes);
747 return sd;
609 } 748 }
610private:
611 static const char *LLSDBinaryHeader;
612 static const char *LLSDXMLHeader;
613}; 749};
614 750
615#endif // LL_LLSDSERIALIZE_H 751#endif // LL_LLSDSERIALIZE_H
diff --git a/linden/indra/llcommon/llsdserialize_xml.cpp b/linden/indra/llcommon/llsdserialize_xml.cpp
index b8adcf1..7de0c35 100644
--- a/linden/indra/llcommon/llsdserialize_xml.cpp
+++ b/linden/indra/llcommon/llsdserialize_xml.cpp
@@ -305,6 +305,7 @@ private:
305 XML_Parser mParser; 305 XML_Parser mParser;
306 306
307 LLSD mResult; 307 LLSD mResult;
308 S32 mParseCount;
308 309
309 bool mInLLSDElement; 310 bool mInLLSDElement;
310 bool mGracefullStop; 311 bool mGracefullStop;
@@ -411,12 +412,12 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data)
411 } 412 }
412 llinfos << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << llendl; 413 llinfos << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << llendl;
413 data = LLSD(); 414 data = LLSD();
414 return -1; 415 return LLSDParser::PARSE_FAILURE;
415 } 416 }
416 417
417 clear_eol(input); 418 clear_eol(input);
418 data = mResult; 419 data = mResult;
419 return 1; 420 return mParseCount;
420} 421}
421 422
422void LLSDXMLParser::Impl::reset() 423void LLSDXMLParser::Impl::reset()
@@ -428,6 +429,7 @@ void LLSDXMLParser::Impl::reset()
428 } 429 }
429 430
430 mResult.clear(); 431 mResult.clear();
432 mParseCount = 0;
431 433
432 mInLLSDElement = false; 434 mInLLSDElement = false;
433 mDepth = 0; 435 mDepth = 0;
@@ -472,7 +474,7 @@ LLSDXMLParser::Impl::findAttribute(const XML_Char* name, const XML_Char** pairs)
472 return NULL; 474 return NULL;
473} 475}
474 476
475void LLSDXMLParser::Impl::parsePart(const char *buf, int len) 477void LLSDXMLParser::Impl::parsePart(const char* buf, int len)
476{ 478{
477 void * buffer = XML_GetBuffer(mParser, len); 479 void * buffer = XML_GetBuffer(mParser, len);
478 if (buffer != NULL && buf != NULL) 480 if (buffer != NULL && buf != NULL)
@@ -486,7 +488,7 @@ void LLSDXMLParser::Impl::parsePart(const char *buf, int len)
486 488
487void LLSDXMLParser::Impl::startElementHandler(const XML_Char* name, const XML_Char** attributes) 489void LLSDXMLParser::Impl::startElementHandler(const XML_Char* name, const XML_Char** attributes)
488{ 490{
489 mDepth += 1; 491 ++mDepth;
490 if (mSkipping) 492 if (mSkipping)
491 { 493 {
492 return; 494 return;
@@ -554,6 +556,7 @@ void LLSDXMLParser::Impl::startElementHandler(const XML_Char* name, const XML_Ch
554 return startSkipping(); 556 return startSkipping();
555 } 557 }
556 558
559 ++mParseCount;
557 switch (element) 560 switch (element)
558 { 561 {
559 case ELEMENT_MAP: 562 case ELEMENT_MAP:
@@ -572,7 +575,7 @@ void LLSDXMLParser::Impl::startElementHandler(const XML_Char* name, const XML_Ch
572 575
573void LLSDXMLParser::Impl::endElementHandler(const XML_Char* name) 576void LLSDXMLParser::Impl::endElementHandler(const XML_Char* name)
574{ 577{
575 mDepth -= 1; 578 --mDepth;
576 if (mSkipping) 579 if (mSkipping)
577 { 580 {
578 if (mDepth < mSkipThrough) 581 if (mDepth < mSkipThrough)
@@ -715,10 +718,10 @@ LLSDXMLParser::Impl::Element LLSDXMLParser::Impl::readElement(const XML_Char* na
715 718
716 719
717 720
718 721/**
719 722 * LLSDXMLParser
720LLSDXMLParser::LLSDXMLParser() 723 */
721 : impl(* new Impl) 724LLSDXMLParser::LLSDXMLParser() : impl(* new Impl)
722{ 725{
723} 726}
724 727
@@ -733,7 +736,7 @@ void LLSDXMLParser::parsePart(const char *buf, int len)
733} 736}
734 737
735// virtual 738// virtual
736S32 LLSDXMLParser::parse(std::istream& input, LLSD& data) const 739S32 LLSDXMLParser::doParse(std::istream& input, LLSD& data) const
737{ 740{
738 return impl.parse(input, data); 741 return impl.parse(input, data);
739} 742}
diff --git a/linden/indra/llcommon/llstreamtools.cpp b/linden/indra/llcommon/llstreamtools.cpp
index 5419b24..669bdd0 100644
--- a/linden/indra/llcommon/llstreamtools.cpp
+++ b/linden/indra/llcommon/llstreamtools.cpp
@@ -538,23 +538,32 @@ void get_keyword_and_value(std::string& keyword,
538 } 538 }
539} 539}
540 540
541std::istream& fullread(std::istream& str, char *buf, std::streamsize requested) 541std::streamsize fullread(
542 std::istream& istr,
543 char* buf,
544 std::streamsize requested)
542{ 545{
543 std::streamsize got; 546 std::streamsize got;
544 std::streamsize total = 0; 547 std::streamsize total = 0;
545 548
546 str.read(buf, requested); /*Flawfinder: ignore*/ 549 istr.read(buf, requested); /*Flawfinder: ignore*/
547 got = str.gcount(); 550 got = istr.gcount();
548 total += got; 551 total += got;
549 while (got && total < requested) 552 while(got && total < requested)
550 { 553 {
551 if (str.fail()) 554 if(istr.fail())
552 str.clear(); 555 {
553 str.read(buf + total, requested - total); /*Flawfinder: ignore*/ 556 // If bad is true, not much we can doo -- it implies loss
554 got = str.gcount(); 557 // of stream integrity. Bail in that case, and otherwise
558 // clear and attempt to continue.
559 if(istr.bad()) return total;
560 istr.clear();
561 }
562 istr.read(buf + total, requested - total); /*Flawfinder: ignore*/
563 got = istr.gcount();
555 total += got; 564 total += got;
556 } 565 }
557 return str; 566 return total;
558} 567}
559 568
560std::istream& operator>>(std::istream& str, const char *tocheck) 569std::istream& operator>>(std::istream& str, const char *tocheck)
diff --git a/linden/indra/llcommon/llstreamtools.h b/linden/indra/llcommon/llstreamtools.h
index 0114e4c..9db90c8 100644
--- a/linden/indra/llcommon/llstreamtools.h
+++ b/linden/indra/llcommon/llstreamtools.h
@@ -114,7 +114,12 @@ void get_keyword_and_value(std::string& keyword,
114// continue to read from the stream until you really can't 114// continue to read from the stream until you really can't
115// read anymore or until we hit the count. Some istream 115// read anymore or until we hit the count. Some istream
116// implimentations have a max that they will read. 116// implimentations have a max that they will read.
117std::istream& fullread(std::istream& str, char *buf, std::streamsize requested); 117// Returns the number of bytes read.
118std::streamsize fullread(
119 std::istream& istr,
120 char* buf,
121 std::streamsize requested);
122
118 123
119std::istream& operator>>(std::istream& str, const char *tocheck); 124std::istream& operator>>(std::istream& str, const char *tocheck);
120 125
diff --git a/linden/indra/llcommon/llsys.cpp b/linden/indra/llcommon/llsys.cpp
index 2a6e466..ccdcd00 100644
--- a/linden/indra/llcommon/llsys.cpp
+++ b/linden/indra/llcommon/llsys.cpp
@@ -679,7 +679,8 @@ BOOL gunzip_file(const char *srcfile, const char *dstfile)
679 size_t nwrit = fwrite(buffer, sizeof(U8), bytes, dst); 679 size_t nwrit = fwrite(buffer, sizeof(U8), bytes, dst);
680 if (nwrit < (size_t) bytes) 680 if (nwrit < (size_t) bytes)
681 { 681 {
682 llerrs << "Short write on " << tmpfile << llendl; 682 llwarns << "Short write on " << tmpfile << ": Wrote " << nwrit << " of " << bytes << " bytes." << llendl;
683 goto err;
683 } 684 }
684 } while(gzeof(src) == 0); 685 } while(gzeof(src) == 0);
685 fclose(dst); 686 fclose(dst);
diff --git a/linden/indra/llcommon/llthread.cpp b/linden/indra/llcommon/llthread.cpp
index c0e92ca..48ebc4b 100644
--- a/linden/indra/llcommon/llthread.cpp
+++ b/linden/indra/llcommon/llthread.cpp
@@ -31,6 +31,8 @@
31#include "linden_common.h" 31#include "linden_common.h"
32#include "llapr.h" 32#include "llapr.h"
33 33
34#include "apr-1/apr_portable.h"
35
34#include "llthread.h" 36#include "llthread.h"
35 37
36#include "lltimer.h" 38#include "lltimer.h"
@@ -225,6 +227,11 @@ void LLThread::setQuitting()
225 wake(); 227 wake();
226} 228}
227 229
230// static
231U32 LLThread::currentID()
232{
233 return (U32)apr_os_thread_current();
234}
228 235
229// static 236// static
230void LLThread::yield() 237void LLThread::yield()
diff --git a/linden/indra/llcommon/llthread.h b/linden/indra/llcommon/llthread.h
index 5c71c34..608b218 100644
--- a/linden/indra/llcommon/llthread.h
+++ b/linden/indra/llcommon/llthread.h
@@ -56,14 +56,14 @@ public:
56 virtual ~LLThread(); // Warning! You almost NEVER want to destroy a thread unless it's in the STOPPED state. 56 virtual ~LLThread(); // Warning! You almost NEVER want to destroy a thread unless it's in the STOPPED state.
57 virtual void shutdown(); // stops the thread 57 virtual void shutdown(); // stops the thread
58 58
59 static void yield(); // Static because it can be called by the main thread, which doesn't have an LLThread data structure.
60
61
62 bool isQuitting() const { return (QUITTING == mStatus); } 59 bool isQuitting() const { return (QUITTING == mStatus); }
63 bool isStopped() const { return (STOPPED == mStatus); } 60 bool isStopped() const { return (STOPPED == mStatus); }
64 61
65 // PAUSE / RESUME functionality. See source code for important usage notes. 62 static U32 currentID(); // Return ID of current thread
63 static void yield(); // Static because it can be called by the main thread, which doesn't have an LLThread data structure.
64
66public: 65public:
66 // PAUSE / RESUME functionality. See source code for important usage notes.
67 // Called from MAIN THREAD. 67 // Called from MAIN THREAD.
68 void pause(); 68 void pause();
69 void unpause(); 69 void unpause();
@@ -127,7 +127,7 @@ protected:
127class LLMutex 127class LLMutex
128{ 128{
129public: 129public:
130 LLMutex(apr_pool_t *apr_poolp); // Defaults to global pool, could use the thread pool as well. 130 LLMutex(apr_pool_t *apr_poolp); // NULL pool constructs a new pool for the mutex
131 ~LLMutex(); 131 ~LLMutex();
132 132
133 void lock(); // blocks 133 void lock(); // blocks
diff --git a/linden/indra/llcommon/llversionserver.h b/linden/indra/llcommon/llversionserver.h
index 079fa85..922e4ac 100644
--- a/linden/indra/llcommon/llversionserver.h
+++ b/linden/indra/llcommon/llversionserver.h
@@ -33,9 +33,9 @@
33#define LL_LLVERSIONSERVER_H 33#define LL_LLVERSIONSERVER_H
34 34
35const S32 LL_VERSION_MAJOR = 1; 35const S32 LL_VERSION_MAJOR = 1;
36const S32 LL_VERSION_MINOR = 18; 36const S32 LL_VERSION_MINOR = 19;
37const S32 LL_VERSION_PATCH = 6; 37const S32 LL_VERSION_PATCH = 1;
38const S32 LL_VERSION_BUILD = 76747; 38const S32 LL_VERSION_BUILD = 80913;
39 39
40const char * const LL_CHANNEL = "Second Life Server"; 40const char * const LL_CHANNEL = "Second Life Server";
41 41
diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h
index c14efe8..c1e6778 100644
--- a/linden/indra/llcommon/llversionviewer.h
+++ b/linden/indra/llcommon/llversionviewer.h
@@ -34,8 +34,8 @@
34 34
35const S32 LL_VERSION_MAJOR = 1; 35const S32 LL_VERSION_MAJOR = 1;
36const S32 LL_VERSION_MINOR = 19; 36const S32 LL_VERSION_MINOR = 19;
37const S32 LL_VERSION_PATCH = 0; 37const S32 LL_VERSION_PATCH = 1;
38const S32 LL_VERSION_BUILD = 5; 38const S32 LL_VERSION_BUILD = 0;
39 39
40const char * const LL_CHANNEL = "Second Life Release"; 40const char * const LL_CHANNEL = "Second Life Release";
41 41