aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/lscript
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/lscript')
-rw-r--r--linden/indra/lscript/lscript_compile/lscript_tree.cpp16
-rw-r--r--linden/indra/lscript/lscript_execute/lscript_execute.cpp8
-rw-r--r--linden/indra/lscript/lscript_library/lscript_library.cpp16
3 files changed, 20 insertions, 20 deletions
diff --git a/linden/indra/lscript/lscript_compile/lscript_tree.cpp b/linden/indra/lscript/lscript_compile/lscript_tree.cpp
index 984e7b0..2a927a4 100644
--- a/linden/indra/lscript/lscript_compile/lscript_tree.cpp
+++ b/linden/indra/lscript/lscript_compile/lscript_tree.cpp
@@ -8805,7 +8805,7 @@ void LLScriptIf::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass p
8805 case LSCP_EMIT_BYTE_CODE: 8805 case LSCP_EMIT_BYTE_CODE:
8806 { 8806 {
8807 char jumpname[32]; /*Flawfinder: ignore*/ 8807 char jumpname[32]; /*Flawfinder: ignore*/
8808 snprintf(jumpname, sizeof(jumpname),"##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */ 8808 ll_snprintf(jumpname, sizeof(jumpname),"##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */
8809 8809
8810 mExpression->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); 8810 mExpression->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL);
8811 chunk->addByte(LSCRIPTOpCodes[LOPC_JUMPNIF]); 8811 chunk->addByte(LSCRIPTOpCodes[LOPC_JUMPNIF]);
@@ -8891,9 +8891,9 @@ void LLScriptIfElse::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePa
8891 case LSCP_EMIT_BYTE_CODE: 8891 case LSCP_EMIT_BYTE_CODE:
8892 { 8892 {
8893 char jumpname1[32]; /*Flawfinder: ignore*/ 8893 char jumpname1[32]; /*Flawfinder: ignore*/
8894 snprintf(jumpname1, sizeof(jumpname1), "##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */ 8894 ll_snprintf(jumpname1, sizeof(jumpname1), "##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */
8895 char jumpname2[32]; /*Flawfinder: ignore*/ 8895 char jumpname2[32]; /*Flawfinder: ignore*/
8896 snprintf(jumpname2, sizeof(jumpname2), "##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */ 8896 ll_snprintf(jumpname2, sizeof(jumpname2), "##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */
8897 8897
8898 mExpression->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); 8898 mExpression->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL);
8899 chunk->addByte(LSCRIPTOpCodes[LOPC_JUMPNIF]); 8899 chunk->addByte(LSCRIPTOpCodes[LOPC_JUMPNIF]);
@@ -8996,9 +8996,9 @@ void LLScriptFor::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass
8996 case LSCP_EMIT_BYTE_CODE: 8996 case LSCP_EMIT_BYTE_CODE:
8997 { 8997 {
8998 char jumpname1[32]; /*Flawfinder: ignore*/ 8998 char jumpname1[32]; /*Flawfinder: ignore*/
8999 snprintf(jumpname1, sizeof(jumpname1), "##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */ 8999 ll_snprintf(jumpname1, sizeof(jumpname1), "##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */
9000 char jumpname2[32]; /*Flawfinder: ignore*/ 9000 char jumpname2[32]; /*Flawfinder: ignore*/
9001 snprintf(jumpname2, sizeof(jumpname2), "##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */ 9001 ll_snprintf(jumpname2, sizeof(jumpname2), "##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */
9002 9002
9003 if(mSequence) 9003 if(mSequence)
9004 mSequence->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); 9004 mSequence->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL);
@@ -9095,7 +9095,7 @@ void LLScriptDoWhile::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompileP
9095 case LSCP_EMIT_BYTE_CODE: 9095 case LSCP_EMIT_BYTE_CODE:
9096 { 9096 {
9097 char jumpname1[32]; /*Flawfinder: ignore*/ 9097 char jumpname1[32]; /*Flawfinder: ignore*/
9098 snprintf(jumpname1, sizeof(jumpname1), "##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */ 9098 ll_snprintf(jumpname1, sizeof(jumpname1), "##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */
9099 9099
9100 chunk->addLabel(jumpname1); 9100 chunk->addLabel(jumpname1);
9101 mStatement->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); 9101 mStatement->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL);
@@ -9171,9 +9171,9 @@ void LLScriptWhile::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePas
9171 case LSCP_EMIT_BYTE_CODE: 9171 case LSCP_EMIT_BYTE_CODE:
9172 { 9172 {
9173 char jumpname1[32]; /*Flawfinder: ignore*/ 9173 char jumpname1[32]; /*Flawfinder: ignore*/
9174 snprintf(jumpname1, sizeof(jumpname1), "##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */ 9174 ll_snprintf(jumpname1, sizeof(jumpname1), "##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */
9175 char jumpname2[32]; /*Flawfinder: ignore*/ 9175 char jumpname2[32]; /*Flawfinder: ignore*/
9176 snprintf(jumpname2, sizeof(jumpname2), "##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */ 9176 ll_snprintf(jumpname2, sizeof(jumpname2), "##Temp Jump %d##", gTempJumpCount++); /* Flawfinder: ignore */
9177 9177
9178 chunk->addLabel(jumpname1); 9178 chunk->addLabel(jumpname1);
9179 mExpression->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); 9179 mExpression->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL);
diff --git a/linden/indra/lscript/lscript_execute/lscript_execute.cpp b/linden/indra/lscript/lscript_execute/lscript_execute.cpp
index b2b54cd..cb9a78e 100644
--- a/linden/indra/lscript/lscript_execute/lscript_execute.cpp
+++ b/linden/indra/lscript/lscript_execute/lscript_execute.cpp
@@ -3426,7 +3426,7 @@ BOOL run_cast(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
3426 case LST_STRING: 3426 case LST_STRING:
3427 { 3427 {
3428 S32 address, source = lscript_pop_int(buffer); 3428 S32 address, source = lscript_pop_int(buffer);
3429 snprintf(caststr, sizeof(caststr), "%d", source); /* Flawfinder: ignore */ 3429 ll_snprintf(caststr, sizeof(caststr), "%d", source); /* Flawfinder: ignore */
3430 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE); 3430 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE);
3431 lscript_push(buffer, address); 3431 lscript_push(buffer, address);
3432 } 3432 }
@@ -3463,7 +3463,7 @@ BOOL run_cast(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
3463 { 3463 {
3464 S32 address; 3464 S32 address;
3465 F32 source = lscript_pop_float(buffer); 3465 F32 source = lscript_pop_float(buffer);
3466 snprintf(caststr, sizeof(caststr), "%f", source); /* Flawfinder: ignore */ 3466 ll_snprintf(caststr, sizeof(caststr), "%f", source); /* Flawfinder: ignore */
3467 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE); 3467 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE);
3468 lscript_push(buffer, address); 3468 lscript_push(buffer, address);
3469 } 3469 }
@@ -3672,7 +3672,7 @@ BOOL run_cast(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
3672 S32 address; 3672 S32 address;
3673 LLVector3 source; 3673 LLVector3 source;
3674 lscript_pop_vector(buffer, source); 3674 lscript_pop_vector(buffer, source);
3675 snprintf(caststr, sizeof(caststr), "<%5.5f, %5.5f, %5.5f>", source.mV[VX], source.mV[VY], source.mV[VZ]); /* Flawfinder: ignore */ 3675 ll_snprintf(caststr, sizeof(caststr), "<%5.5f, %5.5f, %5.5f>", source.mV[VX], source.mV[VY], source.mV[VZ]); /* Flawfinder: ignore */
3676 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE); 3676 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE);
3677 lscript_push(buffer, address); 3677 lscript_push(buffer, address);
3678 } 3678 }
@@ -3705,7 +3705,7 @@ BOOL run_cast(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
3705 S32 address; 3705 S32 address;
3706 LLQuaternion source; 3706 LLQuaternion source;
3707 lscript_pop_quaternion(buffer, source); 3707 lscript_pop_quaternion(buffer, source);
3708 snprintf(caststr, sizeof(caststr), "<%5.5f, %5.5f, %5.5f, %5.5f>", source.mQ[VX], source.mQ[VY], source.mQ[VZ], source.mQ[VS]); /* Flawfinder: ignore */ 3708 ll_snprintf(caststr, sizeof(caststr), "<%5.5f, %5.5f, %5.5f, %5.5f>", source.mQ[VX], source.mQ[VY], source.mQ[VZ], source.mQ[VS]); /* Flawfinder: ignore */
3709 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE); 3709 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE);
3710 lscript_push(buffer, address); 3710 lscript_push(buffer, address);
3711 } 3711 }
diff --git a/linden/indra/lscript/lscript_library/lscript_library.cpp b/linden/indra/lscript/lscript_library/lscript_library.cpp
index e379192..a623a9a 100644
--- a/linden/indra/lscript/lscript_library/lscript_library.cpp
+++ b/linden/indra/lscript/lscript_library/lscript_library.cpp
@@ -156,7 +156,7 @@ void LLScriptLibrary::init()
156 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetVel", "v", NULL, "vector llGetVel()\ngets the velocity")); 156 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetVel", "v", NULL, "vector llGetVel()\ngets the velocity"));
157 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetAccel", "v", NULL, "vector llGetAccel()\ngets the acceleration")); 157 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetAccel", "v", NULL, "vector llGetAccel()\ngets the acceleration"));
158 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetOmega", "v", NULL, "vector llGetOmega()\ngets the omega")); 158 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetOmega", "v", NULL, "vector llGetOmega()\ngets the omega"));
159 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetTimeOfDay", "f", "", "float llGetTimeOfDay()\ngets the time in seconds since Second Life server midnight (or since server up-time; whichever is smaller)")); 159 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetTimeOfDay", "f", "", "float llGetTimeOfDay()\ngets the time in seconds since server midnight (or since server up-time; whichever is smaller)"));
160 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetWallclock", "f", "", "float llGetWallclock()\ngets the time in seconds since midnight")); 160 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetWallclock", "f", "", "float llGetWallclock()\ngets the time in seconds since midnight"));
161 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetTime", "f", NULL, "float llGetTime()\ngets the time in seconds since creation")); 161 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetTime", "f", NULL, "float llGetTime()\ngets the time in seconds since creation"));
162 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llResetTime", NULL, NULL, "llResetTime()\nsets the time to zero")); 162 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llResetTime", NULL, NULL, "llResetTime()\nsets the time to zero"));
@@ -591,7 +591,7 @@ LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_fun
591 char *mDesc_ = new char[512]; 591 char *mDesc_ = new char[512];
592 if (mSleepTime) 592 if (mSleepTime)
593 { 593 {
594 snprintf( /* Flawfinder: ignore */ 594 ll_snprintf( /* Flawfinder: ignore */
595 mDesc_, 595 mDesc_,
596 512, 596 512,
597 "%s\nSleeps script for %.1f seconds.", 597 "%s\nSleeps script for %.1f seconds.",
@@ -652,7 +652,7 @@ void LLScriptLibData::print(std::ostream &s, BOOL b_prepend_comma)
652 s << mInteger; 652 s << mInteger;
653 break; 653 break;
654 case LST_FLOATINGPOINT: 654 case LST_FLOATINGPOINT:
655 snprintf(tmp, 1024, "%f", mFP); /* Flawfinder: ignore */ 655 ll_snprintf(tmp, 1024, "%f", mFP); /* Flawfinder: ignore */
656 s << tmp; 656 s << tmp;
657 break; 657 break;
658 case LST_KEY: 658 case LST_KEY:
@@ -662,12 +662,12 @@ void LLScriptLibData::print(std::ostream &s, BOOL b_prepend_comma)
662 s << mString; 662 s << mString;
663 break; 663 break;
664 case LST_VECTOR: 664 case LST_VECTOR:
665 snprintf(tmp, 1024, "<%f, %f, %f>", mVec.mV[VX], /* Flawfinder: ignore */ 665 ll_snprintf(tmp, 1024, "<%f, %f, %f>", mVec.mV[VX], /* Flawfinder: ignore */
666 mVec.mV[VY], mVec.mV[VZ]); 666 mVec.mV[VY], mVec.mV[VZ]);
667 s << tmp; 667 s << tmp;
668 break; 668 break;
669 case LST_QUATERNION: 669 case LST_QUATERNION:
670 snprintf(tmp, 1024, "<%f, %f, %f, %f>", mQuat.mQ[VX], mQuat.mQ[VY], /* Flawfinder: ignore */ 670 ll_snprintf(tmp, 1024, "<%f, %f, %f, %f>", mQuat.mQ[VX], mQuat.mQ[VY], /* Flawfinder: ignore */
671 mQuat.mQ[VZ], mQuat.mQ[VS]); 671 mQuat.mQ[VZ], mQuat.mQ[VS]);
672 s << tmp; 672 s << tmp;
673 break; 673 break;
@@ -691,7 +691,7 @@ void LLScriptLibData::print_separator(std::ostream& ostr, BOOL b_prepend_sep, ch
691 ostr << mInteger; 691 ostr << mInteger;
692 break; 692 break;
693 case LST_FLOATINGPOINT: 693 case LST_FLOATINGPOINT:
694 snprintf(tmp, 1024, "%f", mFP); /* Flawfinder: ignore */ 694 ll_snprintf(tmp, 1024, "%f", mFP); /* Flawfinder: ignore */
695 ostr << tmp; 695 ostr << tmp;
696 break; 696 break;
697 case LST_KEY: 697 case LST_KEY:
@@ -701,12 +701,12 @@ void LLScriptLibData::print_separator(std::ostream& ostr, BOOL b_prepend_sep, ch
701 ostr << mString; 701 ostr << mString;
702 break; 702 break;
703 case LST_VECTOR: 703 case LST_VECTOR:
704 snprintf(tmp, 1024, "<%f, %f, %f>", mVec.mV[VX], /* Flawfinder: ignore */ 704 ll_snprintf(tmp, 1024, "<%f, %f, %f>", mVec.mV[VX], /* Flawfinder: ignore */
705 mVec.mV[VY], mVec.mV[VZ]); 705 mVec.mV[VY], mVec.mV[VZ]);
706 ostr << tmp; 706 ostr << tmp;
707 break; 707 break;
708 case LST_QUATERNION: 708 case LST_QUATERNION:
709 snprintf(tmp, 1024, "<%f, %f, %f, %f>", mQuat.mQ[VX], mQuat.mQ[VY], /* Flawfinder: ignore */ 709 ll_snprintf(tmp, 1024, "<%f, %f, %f, %f>", mQuat.mQ[VX], mQuat.mQ[VY], /* Flawfinder: ignore */
710 mQuat.mQ[VZ], mQuat.mQ[VS]); 710 mQuat.mQ[VZ], mQuat.mQ[VS]);
711 ostr << tmp; 711 ostr << tmp;
712 break; 712 break;