Diff of /src/script_engine.c [38f5be] .. [dba5ed] Maximize Restore

  Switch to side-by-side view

--- a/src/script_engine.c
+++ b/src/script_engine.c
@@ -293,8 +293,6 @@
   gtk_main_quit();
 
   exit (0);
-
-  return JS_TRUE;
 }
 
 static JSBool show_js_console (JSContext *cx, JSObject *obj, uintN argc,
@@ -318,7 +316,6 @@
 	     uintN argc, jsval *argv, jsval *rval)
 {
   se_t *se = (se_t *) JS_GetContextPrivate (cx);
-  gpointer *buf;
   se_log_fncall ("callback");
   se_argc_check_range (1, 2, "callback");
   se_arg_is_string (0, "callback");
@@ -560,10 +557,10 @@
       logprintf ("script_engine: result: %d\n", n);
       return n;
     }
-    g_printerr (_("script_engine: error: non-numeric result in %s==‘%s’"),
+    g_printerr (_("script_engine: error: non-numeric result in %s==‘%s’\n"),
 	     p->id, p->value);
   } else
-    g_printerr (_("script_engine: error: non-numeric property %s==‘%s’"),
+    g_printerr (_("script_engine: error: non-numeric property %s==‘%s’\n"),
 	     p->id, p->value);
 
   return 0;
@@ -596,10 +593,10 @@
       logprintf ("script_engine: result: %lf\n", n);
       return n;
     }
-    g_printerr (_("script_engine: error: non-numeric result in %s==‘%s’"),
+    g_printerr (_("script_engine: error: non-numeric result in %s==‘%s’\n"),
 	     p->id, p->value);
   } else
-    g_printerr (_("script_engine: error: non-numeric property %s==‘%s’"),
+    g_printerr (_("script_engine: error: non-numeric property %s==‘%s’\n"),
 	     p->id, p->value);
 
   return 0;
@@ -724,14 +721,12 @@
  * function to create and maintain js objects
  */
 
-JSBool generic_JSGetProperty (JSContext *cx, JSObject *obj, jsval id, jsval *vp) {
- 
+static JSBool
+generic_JSGetProperty (JSContext *cx, JSObject *obj, jsval id, jsval *vp)
+{
   se_t   *se = (se_t *) JS_GetContextPrivate(cx);
-  se_o_t *o;
- 
   se_log_fncall ("generic get property");
- 
-  o = JS_GetPrivate (cx, obj);
+  se_o_t *o = JS_GetPrivate (cx, obj);
 
   if (JSVAL_IS_STRING (id)) {
     JSString *str = JS_ValueToString (cx, id);
@@ -780,7 +775,8 @@
   return JS_FALSE;
 }
 
-JSBool generic_JSSetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
+static JSBool
+generic_JSSetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
 {
   se_t   *se = (se_t *) JS_GetContextPrivate(cx);
   se_o_t *o;
@@ -1278,7 +1274,7 @@
     se_prop_set_reader_func (se, o, id, se_prop_read_xine_id_int);
     return;
   case XINE_CONFIG_TYPE_ENUM:
-    g_printerr (_("script_engine: can't create property for xine config enum type"));
+    g_printerr (_("script_engine: can't create property for xine config enum type\n"));
     return;
   case XINE_CONFIG_TYPE_STRING:
     se_prop_create (se, o, id, "", xine_id, 0, SE_TYPE_STRING, FALSE);
@@ -1289,7 +1285,7 @@
     se_prop_set_reader_func (se, o, id, se_prop_read_xine_id_int);
     return;
   default:
-    g_printerr (_("script_engine: can't create property for xine config unknown type"));
+    g_printerr (_("script_engine: can't create property for xine config unknown type\n"));
   }
 }
 
@@ -1310,7 +1306,7 @@
     se_prop_set_reader_func (se, o, id, se_prop_read_xine_param);
     return;
   default:
-    g_printerr (_("script_engine: can't create property for xine param non-int type"));
+    g_printerr (_("script_engine: can't create property for xine param non-int type\n"));
   }
 }