Just a couple of script bindings. The single parameter atan function and a substring function to flesh the string library out a bit. I wasn&#39;t sure if it should finish with an error or finish with what it&#39;s already made if it reached the end of the string while in the copy section.<br>
diff --git a/src/plugins/splash/script/script-lib-math.c b/src/plugins/splash/script/script-lib-math.c<br>index 383fe46..f614b18 100644<br>--- a/src/plugins/splash/script/script-lib-math.c<br>+++ b/src/plugins/splash/script/script-lib-math.c<br>
@@ -85,6 +85,12 @@ script_lib_math_data_t *script_lib_math_setup (script_state_t *state)<br>                               &quot;value&quot;,<br>                               NULL);<br>   script_add_native_function (math_hash,<br>
+                              &quot;ATan&quot;,<br>+                              script_lib_math_double_from_double_function,<br>+                              atan,<br>+                              &quot;value&quot;,<br>
+                              NULL);<br>+  script_add_native_function (math_hash,<br>                               &quot;ATan2&quot;,<br>                               script_lib_math_double_from_double_double_function,<br>
                               atan2,<br>diff --git a/src/plugins/splash/script/script-lib-string.c b/src/plugins/splash/script/script-lib-string.c<br>index 833a377..90c463b 100644<br>--- a/src/plugins/splash/script/script-lib-string.c<br>
+++ b/src/plugins/splash/script/script-lib-string.c<br>@@ -62,6 +62,41 @@ static script_return_t script_lib_string_char_at (script_state_t *state,<br>   return script_return_obj(script_obj_new_string (charstring));<br> }<br>
 <br>+static script_return_t script_lib_string_substring (script_state_t *state,<br>+                                                   void           *user_data)<br>+{<br>+  char *text = script_obj_as_string (state-&gt;this);<br>
+  int start = script_obj_hash_get_number (state-&gt;local, &quot;start&quot;);<br>+  int end = script_obj_hash_get_number (state-&gt;local, &quot;end&quot;);<br>+  int text_count, substring_count;<br>+  char substring [end-start+1];<br>
+  <br>+  if (!text || start &lt; 0 || end &lt; start)<br>+    {<br>+      free (text);<br>+      return script_return_obj_null ();<br>+    }<br>+  for (text_count = 0; text_count &lt; start; text_count++)<br>+    {<br>+      if (text[text_count] == &#39;\0&#39;)<br>
+        {<br>+          free (text);<br>+          return script_return_obj(script_obj_new_string (&quot;&quot;));<br>+        }<br>+    }<br>+  for (text_count = start, substring_count = 0; text_count &lt; end; text_count++, substring_count++)<br>
+    {<br>+      if (text[text_count] == &#39;\0&#39;)<br>+        {<br>+          break;<br>+        }<br>