corrade-lsl-templates – Diff between revs 5 and 29
?pathlinks?
Rev 5 | Rev 29 | |||
---|---|---|---|---|
Line 1... | Line 1... | |||
1 | /////////////////////////////////////////////////////////////////////////// |
1 | /////////////////////////////////////////////////////////////////////////// |
|
2 | // Copyright (C) Wizardry and Steamworks 2014 - License: GNU GPLv3 // |
2 | // Copyright (C) Wizardry and Steamworks 2014 - 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 | /////////////////////////////////////////////////////////////////////////// |
|
Line 17... | Line 17... | |||
17 | /////////////////////////////////////////////////////////////////////////// |
17 | /////////////////////////////////////////////////////////////////////////// |
|
18 | // END CONFIGURATION // |
18 | // END CONFIGURATION // |
|
19 | /////////////////////////////////////////////////////////////////////////// |
19 | /////////////////////////////////////////////////////////////////////////// |
|
Line 20... | Line 20... | |||
20 | |
20 | |
|
21 | /////////////////////////////////////////////////////////////////////////// |
21 | /////////////////////////////////////////////////////////////////////////// |
|
22 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
22 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
23 | /////////////////////////////////////////////////////////////////////////// |
23 | /////////////////////////////////////////////////////////////////////////// |
|
24 | string wasKeyValueGet(string k, string data) { |
24 | string wasKeyValueGet(string k, string data) { |
|
25 | if(llStringLength(data) == 0) return ""; |
25 | if(llStringLength(data) == 0) return ""; |
|
26 | if(llStringLength(k) == 0) return ""; |
26 | if(llStringLength(k) == 0) return ""; |
|
Line 29... | Line 29... | |||
29 | if(i != -1) return llList2String(a, 2*i+1); |
29 | if(i != -1) return llList2String(a, 2*i+1); |
|
30 | return ""; |
30 | return ""; |
|
31 | } |
31 | } |
|
Line 32... | Line 32... | |||
32 | |
32 | |
|
33 | /////////////////////////////////////////////////////////////////////////// |
33 | /////////////////////////////////////////////////////////////////////////// |
|
34 | // Copyright (C) 2014 Wizardry and Steamworks - License: GNU GPLv3 // |
34 | // Copyright (C) 2014 Wizardry and Steamworks - License: CC BY 2.0 // |
|
35 | /////////////////////////////////////////////////////////////////////////// |
35 | /////////////////////////////////////////////////////////////////////////// |
|
36 | string wasKeyValueSet(string k, string v, string data) { |
36 | string wasKeyValueSet(string k, string v, string data) { |
|
37 | if(llStringLength(k) == 0) return ""; |
37 | if(llStringLength(k) == 0) return ""; |
|
38 | if(llStringLength(v) == 0) return ""; |
38 | if(llStringLength(v) == 0) return ""; |
|
Line 51... | Line 51... | |||
51 | "&"); |
51 | "&"); |
|
52 | return data + "&" + k + "=" + v; |
52 | return data + "&" + k + "=" + v; |
|
53 | } |
53 | } |
|
Line 54... | Line 54... | |||
54 | |
54 | |
|
55 | /////////////////////////////////////////////////////////////////////////// |
55 | /////////////////////////////////////////////////////////////////////////// |
|
56 | // Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3 // |
56 | // Copyright (C) 2013 Wizardry and Steamworks - License: CC BY 2.0 // |
|
57 | /////////////////////////////////////////////////////////////////////////// |
57 | /////////////////////////////////////////////////////////////////////////// |
|
58 | string wasKeyValueEncode(list data) { |
58 | string wasKeyValueEncode(list data) { |
|
59 | list k = llList2ListStrided(data, 0, -1, 2); |
59 | list k = llList2ListStrided(data, 0, -1, 2); |
|
60 | list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2); |
60 | list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2); |
|
Line 66... | Line 66... | |||
66 | } while(llGetListLength(k) != 0); |
66 | } while(llGetListLength(k) != 0); |
|
67 | return llDumpList2String(data, "&"); |
67 | return llDumpList2String(data, "&"); |
|
68 | } |
68 | } |
|
Line 69... | Line 69... | |||
69 | |
69 | |
|
70 | /////////////////////////////////////////////////////////////////////////// |
70 | /////////////////////////////////////////////////////////////////////////// |
|
71 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
71 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
72 | /////////////////////////////////////////////////////////////////////////// |
72 | /////////////////////////////////////////////////////////////////////////// |
|
73 | // escapes a string in conformance with RFC1738 |
73 | // escapes a string in conformance with RFC1738 |
|
74 | string wasURLEscape(string i) { |
74 | string wasURLEscape(string i) { |
|
75 | string o = ""; |
75 | string o = ""; |
|
Line 90... | Line 90... | |||
90 | } while(i != ""); |
90 | } while(i != ""); |
|
91 | return o; |
91 | return o; |
|
92 | } |
92 | } |
|
Line 93... | Line 93... | |||
93 | |
93 | |
|
94 | /////////////////////////////////////////////////////////////////////////// |
94 | /////////////////////////////////////////////////////////////////////////// |
|
95 | // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // |
95 | // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 // |
|
96 | /////////////////////////////////////////////////////////////////////////// |
96 | /////////////////////////////////////////////////////////////////////////// |
|
97 | // unescapes a string in conformance with RFC1738 |
97 | // unescapes a string in conformance with RFC1738 |
|
98 | string wasURLUnescape(string i) { |
98 | string wasURLUnescape(string i) { |
|
99 | return llUnescapeURL( |
99 | return llUnescapeURL( |