corrade-lsl-templates – Diff between revs 5 and 29

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 5 Rev 29
Line 1... Line 1...
1 /////////////////////////////////////////////////////////////////////////// 1 ///////////////////////////////////////////////////////////////////////////
2 // Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3 // 2 // Copyright (C) Wizardry and Steamworks 2013 - License: CC BY 2.0 //
3 // Please see: http://www.gnu.org/licenses/gpl.html for legal details, // 3 // Please see: https://creativecommons.org/licenses/by/2.0 for legal details, //
4 // rights of fair usage, the disclaimer and warranty conditions. // 4 // rights of fair usage, the disclaimer and warranty conditions. //
5 /////////////////////////////////////////////////////////////////////////// 5 ///////////////////////////////////////////////////////////////////////////
Line 6... Line 6...
6   6  
7 /////////////////////////////////////////////////////////////////////////// 7 ///////////////////////////////////////////////////////////////////////////
8 // Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3 // 8 // Copyright (C) 2013 Wizardry and Steamworks - License: CC BY 2.0 //
9 /////////////////////////////////////////////////////////////////////////// 9 ///////////////////////////////////////////////////////////////////////////
10 string wasKeyValueEncode(list data) { 10 string wasKeyValueEncode(list data) {
11 list k = llList2ListStrided(data, 0, -1, 2); 11 list k = llList2ListStrided(data, 0, -1, 2);
12 list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2); 12 list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2);
Line 18... Line 18...
18 } while(llGetListLength(k) != 0); 18 } while(llGetListLength(k) != 0);
19 return llDumpList2String(data, "&"); 19 return llDumpList2String(data, "&");
20 } 20 }
Line 21... Line 21...
21   21  
22 /////////////////////////////////////////////////////////////////////////// 22 ///////////////////////////////////////////////////////////////////////////
23 // Copyright (C) 2014 Wizardry and Steamworks - License: GNU GPLv3 // 23 // Copyright (C) 2014 Wizardry and Steamworks - License: CC BY 2.0 //
24 /////////////////////////////////////////////////////////////////////////// 24 ///////////////////////////////////////////////////////////////////////////
25 string wasKeyValueGet(string k, string data) { 25 string wasKeyValueGet(string k, string data) {
26 if(llStringLength(data) == 0) return ""; 26 if(llStringLength(data) == 0) return "";
27 if(llStringLength(k) == 0) return ""; 27 if(llStringLength(k) == 0) return "";
Line 30... Line 30...
30 if(i != -1) return llList2String(a, i+1); 30 if(i != -1) return llList2String(a, i+1);
31 return ""; 31 return "";
32 } 32 }
Line 33... Line 33...
33   33  
34 /////////////////////////////////////////////////////////////////////////// 34 ///////////////////////////////////////////////////////////////////////////
35 // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // 35 // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 //
36 /////////////////////////////////////////////////////////////////////////// 36 ///////////////////////////////////////////////////////////////////////////
37 // escapes a string in conformance with RFC1738 37 // escapes a string in conformance with RFC1738
38 string wasURLEscape(string i) { 38 string wasURLEscape(string i) {
39 string o = ""; 39 string o = "";
Line 54... Line 54...
54 } while(i != ""); 54 } while(i != "");
55 return o; 55 return o;
56 } 56 }
Line 57... Line 57...
57   57  
58 /////////////////////////////////////////////////////////////////////////// 58 ///////////////////////////////////////////////////////////////////////////
59 // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // 59 // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 //
60 /////////////////////////////////////////////////////////////////////////// 60 ///////////////////////////////////////////////////////////////////////////
61 // unescapes a string in conformance with RFC1738 61 // unescapes a string in conformance with RFC1738
62 string wasURLUnescape(string i) { 62 string wasURLUnescape(string i) {
63 return llUnescapeURL( 63 return llUnescapeURL(