summaryrefslogtreecommitdiff
path: root/indra/lscript
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-11-19 17:59:55 -0500
committerOz Linden <oz@lindenlab.com>2013-11-19 17:59:55 -0500
commit0031e9a97be1bf6e9fe773c23506494d09ce91ae (patch)
tree220f195c82174b7cc8e94dceb2553e59fe5837a5 /indra/lscript
parentb7edc965bc77ab21e9a1e3f6b424299a50053529 (diff)
parentebc9bcbf69f7a519677a6522979a6bf6cbb04bb8 (diff)
merge up to 3.6.10-release; some of the storm-68 changes lost
Diffstat (limited to 'indra/lscript')
-rwxr-xr-x[-rw-r--r--]indra/lscript/CMakeLists.txt0
-rwxr-xr-x[-rw-r--r--]indra/lscript/llscriptresource.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/llscriptresourceconsumer.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/llscriptresourcepool.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_alloc.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_byteconvert.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_byteformat.h8
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/CMakeLists.txt9
-rw-r--r--indra/lscript/lscript_compile/bison.bat9
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/indra.l78
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/indra.y7
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_alloc.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_bytecode.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_bytecode.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_error.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_error.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_heap.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_heap.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_resource.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_resource.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_scope.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_scope.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_tree.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_tree.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_typecheck.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/lscript_typecheck.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_compile/windows/unistd.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_execute.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_execute/CMakeLists.txt3
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_execute/llscriptresource.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_execute/llscriptresourceconsumer.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_execute/llscriptresourcepool.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_execute/lscript_execute.cpp11
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_execute/lscript_heapruntime.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_execute/lscript_heapruntime.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_execute/lscript_readlso.cpp11
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_execute/lscript_readlso.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_export.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_http.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_library.h0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_library/CMakeLists.txt3
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_library/lscript_alloc.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_library/lscript_export.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_library/lscript_library.cpp0
-rwxr-xr-x[-rw-r--r--]indra/lscript/lscript_rt_interface.h0
45 files changed, 104 insertions, 35 deletions
diff --git a/indra/lscript/CMakeLists.txt b/indra/lscript/CMakeLists.txt
index 937e2ec0dc..937e2ec0dc 100644..100755
--- a/indra/lscript/CMakeLists.txt
+++ b/indra/lscript/CMakeLists.txt
diff --git a/indra/lscript/llscriptresource.h b/indra/lscript/llscriptresource.h
index 9dab9ff7ce..9dab9ff7ce 100644..100755
--- a/indra/lscript/llscriptresource.h
+++ b/indra/lscript/llscriptresource.h
diff --git a/indra/lscript/llscriptresourceconsumer.h b/indra/lscript/llscriptresourceconsumer.h
index 82a490d28f..82a490d28f 100644..100755
--- a/indra/lscript/llscriptresourceconsumer.h
+++ b/indra/lscript/llscriptresourceconsumer.h
diff --git a/indra/lscript/llscriptresourcepool.h b/indra/lscript/llscriptresourcepool.h
index 4ea2556e0f..4ea2556e0f 100644..100755
--- a/indra/lscript/llscriptresourcepool.h
+++ b/indra/lscript/llscriptresourcepool.h
diff --git a/indra/lscript/lscript_alloc.h b/indra/lscript/lscript_alloc.h
index f8a4e298d2..f8a4e298d2 100644..100755
--- a/indra/lscript/lscript_alloc.h
+++ b/indra/lscript/lscript_alloc.h
diff --git a/indra/lscript/lscript_byteconvert.h b/indra/lscript/lscript_byteconvert.h
index 5b08481d7d..5b08481d7d 100644..100755
--- a/indra/lscript/lscript_byteconvert.h
+++ b/indra/lscript/lscript_byteconvert.h
diff --git a/indra/lscript/lscript_byteformat.h b/indra/lscript/lscript_byteformat.h
index a294def734..54031aaf05 100644..100755
--- a/indra/lscript/lscript_byteformat.h
+++ b/indra/lscript/lscript_byteformat.h
@@ -530,6 +530,10 @@ typedef enum e_lscript_runtime_permissions
SCRIPT_PERMISSION_TRACK_CAMERA,
SCRIPT_PERMISSION_CONTROL_CAMERA,
SCRIPT_PERMISSION_TELEPORT,
+ SCRIPT_PERMISSION_EXPERIENCE,
+ SCRIPT_PERMISSION_SILENT_ESTATE_MANAGEMENT,
+ SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS,
+ SCRIPT_PERMISSION_RETURN_OBJECTS,
SCRIPT_PERMISSION_EOF
} LSCRIPTRunTimePermissions;
@@ -547,6 +551,10 @@ const U32 LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_EOF] =
(0x1 << 10),// SCRIPT_PERMISSION_TRACK_CAMERA
(0x1 << 11),// SCRIPT_PERMISSION_CONTROL_CAMERA
(0x1 << 12),// SCRIPT_PERMISSION_TELEPORT
+ (0x1 << 13),// SCRIPT_PERMISSION_EXPERIENCE,
+ (0x1 << 14),// SCRIPT_PERMISSION_SILENT_ESTATE_MANAGEMENT,
+ (0x1 << 15),// SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS,
+ (0x1 << 16),// SCRIPT_PERMISSION_RETURN_OBJECTS,
};
// http_request string constants
diff --git a/indra/lscript/lscript_compile/CMakeLists.txt b/indra/lscript/lscript_compile/CMakeLists.txt
index 3ed2892e0e..07662005b9 100644..100755
--- a/indra/lscript/lscript_compile/CMakeLists.txt
+++ b/indra/lscript/lscript_compile/CMakeLists.txt
@@ -45,6 +45,9 @@ include_directories(
${LLPRIMITIVE_INCLUDE_DIRS}
${LSCRIPT_INCLUDE_DIRS}
)
+include_directories(SYSTEM
+ ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
+ )
set(lscript_generated_SOURCE_FILES
indra.l.cpp
@@ -95,6 +98,7 @@ add_custom_command(
${CMAKE_CURRENT_BINARY_DIR}/indra.l.cpp
COMMAND ${FLEX}
ARGS
+ -P indra_
-o${CMAKE_CURRENT_BINARY_DIR}/indra.l.cpp
${CMAKE_CURRENT_SOURCE_DIR}/indra.l
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/indra.l
@@ -112,8 +116,10 @@ if (WINDOWS)
${CMAKE_CURRENT_BINARY_DIR}/indra.y.cpp
${CMAKE_CURRENT_BINARY_DIR}/indra.y.hpp
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bison.bat
+ ARGS
${BISON} ${M4_PATH}
- ${CMAKE_CURRENT_BINARY_DIR}/indra.y.cpp
+ -p indra_
+ -d -o ${CMAKE_CURRENT_BINARY_DIR}/indra.y.cpp
${CMAKE_CURRENT_SOURCE_DIR}/indra.y
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/bison.bat
@@ -128,6 +134,7 @@ else (WINDOWS)
COMMAND
${BISON}
ARGS
+ -p indra_
-d -o ${CMAKE_CURRENT_BINARY_DIR}/indra.y.cpp
${CMAKE_CURRENT_SOURCE_DIR}/indra.y
DEPENDS
diff --git a/indra/lscript/lscript_compile/bison.bat b/indra/lscript/lscript_compile/bison.bat
index 0baff4e5ef..d40997225e 100644
--- a/indra/lscript/lscript_compile/bison.bat
+++ b/indra/lscript/lscript_compile/bison.bat
@@ -2,10 +2,11 @@
@REM find m4, even if neither program is present in PATH.
@set bison=%1
-set M4PATH=%2
+shift
+set M4PATH=%1
+shift
set M4=
-@set output=%3
-@set input=%4
set PATH=%M4PATH%;%PATH%
-%bison% -d -o %output% %input%
+@REM %* does not work with shift...
+%bison% %1 %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index 96b7e57e97..88dfc2e9f3 100644..100755
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -56,11 +56,32 @@ void parse_string();
#define ECHO do { } while (0)
-#if defined(__cplusplus)
-extern "C" { int yylex( void ); }
-extern "C" { int yyparse( void ); }
-extern "C" { int yyerror(const char *fmt, ...); }
-#endif
+#define yyparse indra_parse
+#define yyerror indra_error
+#define yylval indra_lval
+#define yy_create_buffer indra__create_buffer
+#define yy_delete_buffer indra__delete_buffer
+#define yy_flex_debug indra__flex_debug
+#define yy_init_buffer indra__init_buffer
+#define yy_flush_buffer indra__flush_buffer
+#define yy_load_buffer_state indra__load_buffer_state
+#define yy_switch_to_buffer indra__switch_to_buffer
+#define yyin indra_in
+#define yyleng indra_leng
+#define yylex indra_lex
+#define yylineno indra_lineno
+#define yyout indra_out
+#define yyrestart indra_restart
+#define yytext indra_text
+#define yywrap indra_wrap
+#define yyalloc indra_alloc
+#define yyrealloc indra_realloc
+#define yyfree indra_free
+
+
+int yyparse( void );
+int yylex( void );
+int yyerror(const char *fmt, ...);
%}
@@ -140,6 +161,7 @@ extern "C" { int yyerror(const char *fmt, ...); }
"STATUS_DIE_AT_EDGE" { count(); yylval.ival = 0x80; return(INTEGER_CONSTANT); }
"STATUS_RETURN_AT_EDGE" { count(); yylval.ival = 0x100; return(INTEGER_CONSTANT); }
"STATUS_CAST_SHADOWS" { count(); yylval.ival = 0x200; return(INTEGER_CONSTANT); }
+"STATUS_BLOCK_GRAB_OBJECT" { count(); yylval.ival = 0x400; return(INTEGER_CONSTANT); }
"AGENT_FLYING" { count(); yylval.ival = AGENT_FLYING; return(INTEGER_CONSTANT); }
"AGENT_ATTACHMENTS" { count(); yylval.ival = AGENT_ATTACHMENTS; return(INTEGER_CONSTANT); }
@@ -214,6 +236,8 @@ extern "C" { int yyerror(const char *fmt, ...); }
"PERMISSION_TRACK_CAMERA" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TRACK_CAMERA]; return(INTEGER_CONSTANT); }
"PERMISSION_CONTROL_CAMERA" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_CONTROL_CAMERA]; return(INTEGER_CONSTANT); }
"PERMISSION_TELEPORT" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TELEPORT]; return(INTEGER_CONSTANT); }
+"PERMISSION_SILENT_ESTATE_MANAGEMENT" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_SILENT_ESTATE_MANAGEMENT]; return(INTEGER_CONSTANT); }
+"PERMISSION_OVERRIDE_ANIMATIONS" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS]; return(INTEGER_CONSTANT); }
"INVENTORY_TEXTURE" { count(); yylval.ival = LLAssetType::AT_TEXTURE; return(INTEGER_CONSTANT); }
"INVENTORY_SOUND" { count(); yylval.ival = LLAssetType::AT_SOUND; return(INTEGER_CONSTANT); }
@@ -250,6 +274,22 @@ extern "C" { int yyerror(const char *fmt, ...); }
"OBJECT_OWNER" { count(); yylval.ival = OBJECT_OWNER; return(INTEGER_CONSTANT); }
"OBJECT_GROUP" { count(); yylval.ival = OBJECT_GROUP; return(INTEGER_CONSTANT); }
"OBJECT_CREATOR" { count(); yylval.ival = OBJECT_CREATOR; return(INTEGER_CONSTANT); }
+"OBJECT_RUNNING_SCRIPT_COUNT" { count(); yylval.ival = OBJECT_RUNNING_SCRIPT_COUNT; return(INTEGER_CONSTANT); }
+"OBJECT_TOTAL_SCRIPT_COUNT" { count(); yylval.ival = OBJECT_TOTAL_SCRIPT_COUNT; return(INTEGER_CONSTANT); }
+"OBJECT_SCRIPT_MEMORY" { count(); yylval.ival = OBJECT_SCRIPT_MEMORY; return(INTEGER_CONSTANT); }
+"OBJECT_SCRIPT_TIME" { count(); yylval.ival = OBJECT_SCRIPT_TIME; return(INTEGER_CONSTANT); }
+"OBJECT_PRIM_EQUIVALENCE" { count(); yylval.ival = OBJECT_PRIM_EQUIVALENCE; return(INTEGER_CONSTANT); }
+"OBJECT_SERVER_COST" { count(); yylval.ival = OBJECT_SERVER_COST; return(INTEGER_CONSTANT); }
+"OBJECT_STREAMING_COST" { count(); yylval.ival = OBJECT_STREAMING_COST; return(INTEGER_CONSTANT); }
+"OBJECT_PHYSICS_COST" { count(); yylval.ival = OBJECT_PHYSICS_COST; return(INTEGER_CONSTANT); }
+"OBJECT_CHARACTER_TIME" { count(); yylval.ival = OBJECT_CHARACTER_TIME; return(INTEGER_CONSTANT); }
+"OBJECT_ROOT" { count(); yylval.ival = OBJECT_ROOT; return(INTEGER_CONSTANT); }
+"OBJECT_ATTACHED_POINT" { count(); yylval.ival = OBJECT_ATTACHED_POINT; return(INTEGER_CONSTANT); }
+"OBJECT_PATHFINDING_TYPE" { count(); yylval.ival = OBJECT_PATHFINDING_TYPE; return(INTEGER_CONSTANT); }
+"OBJECT_PHYSICS" { count(); yylval.ival = OBJECT_PHYSICS; return(INTEGER_CONSTANT); }
+"OBJECT_PHANTOM" { count(); yylval.ival = OBJECT_PHANTOM; return(INTEGER_CONSTANT); }
+"OBJECT_TEMP_ON_REZ" { count(); yylval.ival = OBJECT_TEMP_ON_REZ; return(INTEGER_CONSTANT); }
+"OBJECT_RENDER_WEIGHT" { count(); yylval.ival = OBJECT_RENDER_WEIGHT; return(INTEGER_CONSTANT); }
"TYPE_INTEGER" { count(); yylval.ival = LST_INTEGER; return(INTEGER_CONSTANT); }
"TYPE_FLOAT" { count(); yylval.ival = LST_FLOATINGPOINT; return(INTEGER_CONSTANT); }
@@ -315,6 +355,8 @@ extern "C" { int yyerror(const char *fmt, ...); }
"ATTACH_HUD_BOTTOM_LEFT" { count(); yylval.ival = 36; return(INTEGER_CONSTANT); }
"ATTACH_HUD_BOTTOM" { count(); yylval.ival = 37; return(INTEGER_CONSTANT); }
"ATTACH_HUD_BOTTOM_RIGHT" { count(); yylval.ival = 38; return(INTEGER_CONSTANT); }
+"ATTACH_NECK" { count(); yylval.ival = 39; return(INTEGER_CONSTANT); }
+"ATTACH_AVATAR_CENTER" { count(); yylval.ival = 40; return(INTEGER_CONSTANT); }
"LAND_LEVEL" { count(); yylval.ival = E_LANDBRUSH_LEVEL; return(INTEGER_CONSTANT); }
"LAND_RAISE" { count(); yylval.ival = E_LANDBRUSH_RAISE; return(INTEGER_CONSTANT); }
@@ -353,6 +395,10 @@ extern "C" { int yyerror(const char *fmt, ...); }
"PSYS_PART_END_SCALE" { count(); yylval.ival = LLPS_PART_END_SCALE; return (INTEGER_CONSTANT); }
"PSYS_PART_MAX_AGE" { count(); yylval.ival = LLPS_PART_MAX_AGE; return (INTEGER_CONSTANT); }
+"PSYS_PART_BLEND_FUNC_SOURCE" { count(); yylval.ival = LLPS_PART_BLEND_FUNC_SOURCE; return (INTEGER_CONSTANT); }
+"PSYS_PART_BLEND_FUNC_DEST" { count(); yylval.ival = LLPS_PART_BLEND_FUNC_DEST; return (INTEGER_CONSTANT); }
+"PSYS_PART_START_GLOW" { count(); yylval.ival = LLPS_PART_START_GLOW; return (INTEGER_CONSTANT); }
+"PSYS_PART_END_GLOW" { count(); yylval.ival = LLPS_PART_END_GLOW; return (INTEGER_CONSTANT); }
"PSYS_PART_WIND_MASK" { count(); yylval.ival = LLPartData::LL_PART_WIND_MASK; return(INTEGER_CONSTANT); }
"PSYS_PART_INTERP_COLOR_MASK" { count(); yylval.ival = LLPartData::LL_PART_INTERP_COLOR_MASK; return(INTEGER_CONSTANT); }
@@ -363,6 +409,16 @@ extern "C" { int yyerror(const char *fmt, ...); }
"PSYS_PART_TARGET_POS_MASK" { count(); yylval.ival = LLPartData::LL_PART_TARGET_POS_MASK; return(INTEGER_CONSTANT); }
"PSYS_PART_EMISSIVE_MASK" { count(); yylval.ival = LLPartData::LL_PART_EMISSIVE_MASK; return(INTEGER_CONSTANT); }
"PSYS_PART_TARGET_LINEAR_MASK" { count(); yylval.ival = LLPartData::LL_PART_TARGET_LINEAR_MASK; return(INTEGER_CONSTANT); }
+"PSYS_PART_RIBBON_MASK" { count(); yylval.ival = LLPartData::LL_PART_RIBBON_MASK; return(INTEGER_CONSTANT); }
+
+"PSYS_PART_BF_ONE" { count(); yylval.ival = LLPartData::LL_PART_BF_ONE; return(INTEGER_CONSTANT); }
+"PSYS_PART_BF_ZERO" { count(); yylval.ival = LLPartData::LL_PART_BF_ZERO; return(INTEGER_CONSTANT); }
+"PSYS_PART_BF_DEST_COLOR" { count(); yylval.ival = LLPartData::LL_PART_BF_DEST_COLOR; return(INTEGER_CONSTANT); }
+"PSYS_PART_BF_SOURCE_COLOR" { count(); yylval.ival = LLPartData::LL_PART_BF_SOURCE_COLOR; return(INTEGER_CONSTANT); }
+"PSYS_PART_BF_ONE_MINUS_DEST_COLOR" { count(); yylval.ival = LLPartData::LL_PART_BF_ONE_MINUS_DEST_COLOR; return(INTEGER_CONSTANT); }
+"PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR" { count(); yylval.ival = LLPartData::LL_PART_BF_ONE_MINUS_SOURCE_COLOR; return(INTEGER_CONSTANT); }
+"PSYS_PART_BF_SOURCE_ALPHA" { count(); yylval.ival = LLPartData::LL_PART_BF_SOURCE_ALPHA; return(INTEGER_CONSTANT); }
+"PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA" { count(); yylval.ival = LLPartData::LL_PART_BF_ONE_MINUS_SOURCE_ALPHA; return(INTEGER_CONSTANT); }
"PSYS_SRC_MAX_AGE" { count(); yylval.ival = LLPS_SRC_MAX_AGE; return(INTEGER_CONSTANT); }
@@ -458,7 +514,17 @@ extern "C" { int yyerror(const char *fmt, ...); }
"PRIM_BUMP_SHINY" { count(); yylval.ival = LSL_PRIM_BUMP_SHINY; return(INTEGER_CONSTANT); }
"PRIM_FULLBRIGHT" { count(); yylval.ival = LSL_PRIM_FULLBRIGHT; return(INTEGER_CONSTANT); }
"PRIM_TEXGEN" { count(); yylval.ival = LSL_PRIM_TEXGEN; return(INTEGER_CONSTANT); }
-"PRIM_GLOW" { count(); yylval.ival = LSL_PRIM_GLOW; return(INTEGER_CONSTANT); }
+"PRIM_GLOW" { count(); yylval.ival = LSL_PRIM_GLOW; return(INTEGER_CONSTANT); }
+"PRIM_TEXT" { count(); yylval.ival = LSL_PRIM_TEXT; return(INTEGER_CONSTANT); }
+"PRIM_NAME" { count(); yylval.ival = LSL_PRIM_NAME; return(INTEGER_CONSTANT); }
+"PRIM_DESC" { count(); yylval.ival = LSL_PRIM_DESC; return(INTEGER_CONSTANT); }
+"PRIM_OMEGA" { count(); yylval.ival = LSL_PRIM_OMEGA; return(INTEGER_CONSTANT); }
+"PRIM_LINK_TARGET" { count(); yylval.ival = LSL_PRIM_LINK_TARGET; return(INTEGER_CONSTANT); }
+"PRIM_SLICE" { count(); yylval.ival = LSL_PRIM_SLICE; return(INTEGER_CONSTANT); }
+
+"PRIM_PHYSICS_SHAPE_PRIM" { count(); yylval.ival = LSL_PRIM_PHYSICS_SHAPE_PRIM; return(INTEGER_CONSTANT); }
+"PRIM_PHYSICS_SHAPE_NONE" { count(); yylval.ival = LSL_PRIM_PHYSICS_SHAPE_NONE; return(INTEGER_CONSTANT); }
+"PRIM_PHYSICS_SHAPE_CONVEX" { count(); yylval.ival = LSL_PRIM_PHYSICS_SHAPE_CONVEX; return(INTEGER_CONSTANT); }
"PRIM_TYPE_BOX" { count(); yylval.ival = LSL_PRIM_TYPE_BOX; return(INTEGER_CONSTANT); }
"PRIM_TYPE_CYLINDER" { count(); yylval.ival = LSL_PRIM_TYPE_CYLINDER; return(INTEGER_CONSTANT); }
diff --git a/indra/lscript/lscript_compile/indra.y b/indra/lscript/lscript_compile/indra.y
index e4b10ffdd9..a0a034d21c 100644..100755
--- a/indra/lscript/lscript_compile/indra.y
+++ b/indra/lscript/lscript_compile/indra.y
@@ -2,10 +2,6 @@
#include "linden_common.h"
#include "lscript_tree.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
-
int yylex(void);
int yyparse( void );
int yyerror(const char *fmt, ...);
@@ -20,9 +16,6 @@
#pragma warning( disable : 4065 ) // warning: switch statement contains 'default' but no 'case' labels
#endif
- #ifdef __cplusplus
- }
- #endif
%}
%union
diff --git a/indra/lscript/lscript_compile/lscript_alloc.cpp b/indra/lscript/lscript_compile/lscript_alloc.cpp
index 5856a94e48..5856a94e48 100644..100755
--- a/indra/lscript/lscript_compile/lscript_alloc.cpp
+++ b/indra/lscript/lscript_compile/lscript_alloc.cpp
diff --git a/indra/lscript/lscript_compile/lscript_bytecode.cpp b/indra/lscript/lscript_compile/lscript_bytecode.cpp
index 95b2f35a94..95b2f35a94 100644..100755
--- a/indra/lscript/lscript_compile/lscript_bytecode.cpp
+++ b/indra/lscript/lscript_compile/lscript_bytecode.cpp
diff --git a/indra/lscript/lscript_compile/lscript_bytecode.h b/indra/lscript/lscript_compile/lscript_bytecode.h
index 0933c78b6f..0933c78b6f 100644..100755
--- a/indra/lscript/lscript_compile/lscript_bytecode.h
+++ b/indra/lscript/lscript_compile/lscript_bytecode.h
diff --git a/indra/lscript/lscript_compile/lscript_error.cpp b/indra/lscript/lscript_compile/lscript_error.cpp
index a574981555..a574981555 100644..100755
--- a/indra/lscript/lscript_compile/lscript_error.cpp
+++ b/indra/lscript/lscript_compile/lscript_error.cpp
diff --git a/indra/lscript/lscript_compile/lscript_error.h b/indra/lscript/lscript_compile/lscript_error.h
index 43fb968a40..43fb968a40 100644..100755
--- a/indra/lscript/lscript_compile/lscript_error.h
+++ b/indra/lscript/lscript_compile/lscript_error.h
diff --git a/indra/lscript/lscript_compile/lscript_heap.cpp b/indra/lscript/lscript_compile/lscript_heap.cpp
index 476c1ac5a6..476c1ac5a6 100644..100755
--- a/indra/lscript/lscript_compile/lscript_heap.cpp
+++ b/indra/lscript/lscript_compile/lscript_heap.cpp
diff --git a/indra/lscript/lscript_compile/lscript_heap.h b/indra/lscript/lscript_compile/lscript_heap.h
index 7762a367d6..7762a367d6 100644..100755
--- a/indra/lscript/lscript_compile/lscript_heap.h
+++ b/indra/lscript/lscript_compile/lscript_heap.h
diff --git a/indra/lscript/lscript_compile/lscript_resource.cpp b/indra/lscript/lscript_compile/lscript_resource.cpp
index 6cc3e3c5ee..6cc3e3c5ee 100644..100755
--- a/indra/lscript/lscript_compile/lscript_resource.cpp
+++ b/indra/lscript/lscript_compile/lscript_resource.cpp
diff --git a/indra/lscript/lscript_compile/lscript_resource.h b/indra/lscript/lscript_compile/lscript_resource.h
index 82cece0a85..82cece0a85 100644..100755
--- a/indra/lscript/lscript_compile/lscript_resource.h
+++ b/indra/lscript/lscript_compile/lscript_resource.h
diff --git a/indra/lscript/lscript_compile/lscript_scope.cpp b/indra/lscript/lscript_compile/lscript_scope.cpp
index e0fdf44d7a..e0fdf44d7a 100644..100755
--- a/indra/lscript/lscript_compile/lscript_scope.cpp
+++ b/indra/lscript/lscript_compile/lscript_scope.cpp
diff --git a/indra/lscript/lscript_compile/lscript_scope.h b/indra/lscript/lscript_compile/lscript_scope.h
index 5b2a73ad92..5b2a73ad92 100644..100755
--- a/indra/lscript/lscript_compile/lscript_scope.h
+++ b/indra/lscript/lscript_compile/lscript_scope.h
diff --git a/indra/lscript/lscript_compile/lscript_tree.cpp b/indra/lscript/lscript_compile/lscript_tree.cpp
index 8a70dd9ac1..8a70dd9ac1 100644..100755
--- a/indra/lscript/lscript_compile/lscript_tree.cpp
+++ b/indra/lscript/lscript_compile/lscript_tree.cpp
diff --git a/indra/lscript/lscript_compile/lscript_tree.h b/indra/lscript/lscript_compile/lscript_tree.h
index bf29f44518..bf29f44518 100644..100755
--- a/indra/lscript/lscript_compile/lscript_tree.h
+++ b/indra/lscript/lscript_compile/lscript_tree.h
diff --git a/indra/lscript/lscript_compile/lscript_typecheck.cpp b/indra/lscript/lscript_compile/lscript_typecheck.cpp
index c685621538..c685621538 100644..100755
--- a/indra/lscript/lscript_compile/lscript_typecheck.cpp
+++ b/indra/lscript/lscript_compile/lscript_typecheck.cpp
diff --git a/indra/lscript/lscript_compile/lscript_typecheck.h b/indra/lscript/lscript_compile/lscript_typecheck.h
index 74f723506f..74f723506f 100644..100755
--- a/indra/lscript/lscript_compile/lscript_typecheck.h
+++ b/indra/lscript/lscript_compile/lscript_typecheck.h
diff --git a/indra/lscript/lscript_compile/windows/unistd.h b/indra/lscript/lscript_compile/windows/unistd.h
index 0b7e2581e3..0b7e2581e3 100644..100755
--- a/indra/lscript/lscript_compile/windows/unistd.h
+++ b/indra/lscript/lscript_compile/windows/unistd.h
diff --git a/indra/lscript/lscript_execute.h b/indra/lscript/lscript_execute.h
index fc491ead0f..fc491ead0f 100644..100755
--- a/indra/lscript/lscript_execute.h
+++ b/indra/lscript/lscript_execute.h
diff --git a/indra/lscript/lscript_execute/CMakeLists.txt b/indra/lscript/lscript_execute/CMakeLists.txt
index 3a16ffdc01..49605982a8 100644..100755
--- a/indra/lscript/lscript_execute/CMakeLists.txt
+++ b/indra/lscript/lscript_execute/CMakeLists.txt
@@ -10,6 +10,9 @@ include_directories(
${LLMATH_INCLUDE_DIRS}
${LSCRIPT_INCLUDE_DIRS}
)
+include_directories(SYSTEM
+ ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
+ )
set(lscript_execute_SOURCE_FILES
llscriptresource.cpp
diff --git a/indra/lscript/lscript_execute/llscriptresource.cpp b/indra/lscript/lscript_execute/llscriptresource.cpp
index 2c6811b226..2c6811b226 100644..100755
--- a/indra/lscript/lscript_execute/llscriptresource.cpp
+++ b/indra/lscript/lscript_execute/llscriptresource.cpp
diff --git a/indra/lscript/lscript_execute/llscriptresourceconsumer.cpp b/indra/lscript/lscript_execute/llscriptresourceconsumer.cpp
index 55d47b6de2..55d47b6de2 100644..100755
--- a/indra/lscript/lscript_execute/llscriptresourceconsumer.cpp
+++ b/indra/lscript/lscript_execute/llscriptresourceconsumer.cpp
diff --git a/indra/lscript/lscript_execute/llscriptresourcepool.cpp b/indra/lscript/lscript_execute/llscriptresourcepool.cpp
index 6bdc2bbd48..6bdc2bbd48 100644..100755
--- a/indra/lscript/lscript_execute/llscriptresourcepool.cpp
+++ b/indra/lscript/lscript_execute/llscriptresourcepool.cpp
diff --git a/indra/lscript/lscript_execute/lscript_execute.cpp b/indra/lscript/lscript_execute/lscript_execute.cpp
index d79e9f8bde..b12d2e4a16 100644..100755
--- a/indra/lscript/lscript_execute/lscript_execute.cpp
+++ b/indra/lscript/lscript_execute/lscript_execute.cpp
@@ -806,16 +806,7 @@ void LLScriptExecute::runInstructions(BOOL b_print, const LLUUID &id,
// is there a fault?
// if yes, print out message and exit
S32 value = getVersion();
- S32 major_version = 0;
- if (value == LSL2_VERSION1_END_NUMBER)
- {
- major_version = 1;
- }
- else if (value == LSL2_VERSION_NUMBER)
- {
- major_version = 2;
- }
- else
+ if ( (value != LSL2_VERSION1_END_NUMBER) && (value != LSL2_VERSION_NUMBER) )
{
setFault(LSRF_VERSION_MISMATCH);
}
diff --git a/indra/lscript/lscript_execute/lscript_heapruntime.cpp b/indra/lscript/lscript_execute/lscript_heapruntime.cpp
index 749857753d..749857753d 100644..100755
--- a/indra/lscript/lscript_execute/lscript_heapruntime.cpp
+++ b/indra/lscript/lscript_execute/lscript_heapruntime.cpp
diff --git a/indra/lscript/lscript_execute/lscript_heapruntime.h b/indra/lscript/lscript_execute/lscript_heapruntime.h
index 0e924a2036..0e924a2036 100644..100755
--- a/indra/lscript/lscript_execute/lscript_heapruntime.h
+++ b/indra/lscript/lscript_execute/lscript_heapruntime.h
diff --git a/indra/lscript/lscript_execute/lscript_readlso.cpp b/indra/lscript/lscript_execute/lscript_readlso.cpp
index 35caa41ae1..6384a57100 100644..100755
--- a/indra/lscript/lscript_execute/lscript_readlso.cpp
+++ b/indra/lscript/lscript_execute/lscript_readlso.cpp
@@ -123,7 +123,7 @@ void LLScriptLSOParse::printRegisters(LLFILE *fp)
void LLScriptLSOParse::printGlobals(LLFILE *fp)
{
// print out registers first
- S32 offset, varoffset;
+ S32 varoffset;
S32 ivalue;
F32 fpvalue;
LLVector3 vvalue;
@@ -144,8 +144,7 @@ void LLScriptLSOParse::printGlobals(LLFILE *fp)
// get offset to skip past name
varoffset = global_v_offset;
- offset = bytestream2integer(mRawData, global_v_offset);
-
+ bytestream2integer(mRawData, global_v_offset);
// get typeexport
type = *(mRawData + global_v_offset++);
@@ -262,8 +261,6 @@ void LLScriptLSOParse::printGlobalFunctions(LLFILE *fp)
fprintf(fp, "[Function #%d] [0x%X] %s\n", function_number, orig_function_offset, name);
fprintf(fp, "\tReturn Type: %s\n", LSCRIPTTypeNames[type]);
type = *(mRawData + function_offset++);
- S32 params;
- params = 0;
S32 pcount = 0;
while (type)
{
@@ -347,16 +344,16 @@ void LLScriptLSOParse::printStates(LLFILE *fp)
read_ahead = event_jump_table;
S32 temp_end;
- S32 dummy;
opcode_end = worst_case_opcode_end;
+ (void)opcode_end;
for (k = LSTT_STATE_BEGIN; k < LSTT_STATE_END; k++)
{
if (event_handlers & LSCRIPTStateBitField[k])
{
temp_end = bytestream2integer(mRawData, read_ahead);
- dummy = bytestream2integer(mRawData, read_ahead);
+ bytestream2integer(mRawData, read_ahead);
if ( (temp_end < opcode_end)
&&(temp_end > event_offset))
{
diff --git a/indra/lscript/lscript_execute/lscript_readlso.h b/indra/lscript/lscript_execute/lscript_readlso.h
index a545a9daf8..a545a9daf8 100644..100755
--- a/indra/lscript/lscript_execute/lscript_readlso.h
+++ b/indra/lscript/lscript_execute/lscript_readlso.h
diff --git a/indra/lscript/lscript_export.h b/indra/lscript/lscript_export.h
index 2043dd4558..2043dd4558 100644..100755
--- a/indra/lscript/lscript_export.h
+++ b/indra/lscript/lscript_export.h
diff --git a/indra/lscript/lscript_http.h b/indra/lscript/lscript_http.h
index c6f2325995..c6f2325995 100644..100755
--- a/indra/lscript/lscript_http.h
+++ b/indra/lscript/lscript_http.h
diff --git a/indra/lscript/lscript_library.h b/indra/lscript/lscript_library.h
index 89a473a627..89a473a627 100644..100755
--- a/indra/lscript/lscript_library.h
+++ b/indra/lscript/lscript_library.h
diff --git a/indra/lscript/lscript_library/CMakeLists.txt b/indra/lscript/lscript_library/CMakeLists.txt
index f6bc67a994..5af850c41b 100644..100755
--- a/indra/lscript/lscript_library/CMakeLists.txt
+++ b/indra/lscript/lscript_library/CMakeLists.txt
@@ -28,5 +28,8 @@ include_directories(
${LLMATH_INCLUDE_DIRS}
${LSCRIPT_INCLUDE_DIRS}
)
+include_directories(SYSTEM
+ ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
+ )
add_library (lscript_library ${lscript_library_SOURCE_FILES})
diff --git a/indra/lscript/lscript_library/lscript_alloc.cpp b/indra/lscript/lscript_library/lscript_alloc.cpp
index 92b1ab70fb..92b1ab70fb 100644..100755
--- a/indra/lscript/lscript_library/lscript_alloc.cpp
+++ b/indra/lscript/lscript_library/lscript_alloc.cpp
diff --git a/indra/lscript/lscript_library/lscript_export.cpp b/indra/lscript/lscript_library/lscript_export.cpp
index 0ed85e3686..0ed85e3686 100644..100755
--- a/indra/lscript/lscript_library/lscript_export.cpp
+++ b/indra/lscript/lscript_library/lscript_export.cpp
diff --git a/indra/lscript/lscript_library/lscript_library.cpp b/indra/lscript/lscript_library/lscript_library.cpp
index 7ffe53a307..7ffe53a307 100644..100755
--- a/indra/lscript/lscript_library/lscript_library.cpp
+++ b/indra/lscript/lscript_library/lscript_library.cpp
diff --git a/indra/lscript/lscript_rt_interface.h b/indra/lscript/lscript_rt_interface.h
index cdf2c5bbd7..cdf2c5bbd7 100644..100755
--- a/indra/lscript/lscript_rt_interface.h
+++ b/indra/lscript/lscript_rt_interface.h