Revision: 3114
http://vexi.svn.sourceforge.net/vexi/?rev=3114&view=rev
Author: mkpg2
Date: 2008-09-24 16:30:25 +0000 (Wed, 24 Sep 2008)
Log Message:
-----------
Eliminating compiler warnings.
Modified Paths:
--------------
trunk/core/org.ibex.js/src/org/ibex/js/JSDate.jpp
trunk/core/org.ibex.js/src/org/ibex/js/JSU.jpp
trunk/core/org.ibex.js/src/org/ibex/js/Scope.jpp
trunk/core/org.ibex.js/src/org/vexi/js/VexiJS.jpp
trunk/core/org.ibex.js/src_junit/test/js/exec/rpc/json/TestJSON.java
Modified: trunk/core/org.ibex.js/src/org/ibex/js/JSDate.jpp
===================================================================
--- trunk/core/org.ibex.js/src/org/ibex/js/JSDate.jpp 2008-09-24 16:29:53 UTC
(rev 3113)
+++ trunk/core/org.ibex.js/src/org/ibex/js/JSDate.jpp 2008-09-24 16:30:25 UTC
(rev 3114)
@@ -527,39 +527,8 @@
private static final int MAXARGS = 7;
- private static double jsStaticJSFunction_UTC(JS[] args) throws JSExn {
- double array[] = new double[MAXARGS];
- int loop;
- double d;
- for (loop = 0; loop < MAXARGS; loop++) {
- if (loop < args.length) {
- d = _toNumber(args[loop]);
- if (d != d || Double.isInfinite(d)) {
- return Double.NaN;
- }
- array[loop] = JSU.toDouble(args[loop]);
- } else {
- array[loop] = 0;
- }
- }
- /* adjust 2-digit years into the 20th century */
- if (array[0] >= 0 && array[0] <= 99)
- array[0] += 1900;
-
- /* if we got a 0 for 'date' (which is out of range)
- * pretend it's a 1. (So Date.UTC(1972, 5) works) */
- if (array[2] < 1)
- array[2] = 1;
-
- d = date_msecFromDate(array[0], array[1], array[2],
- array[3], array[4], array[5], array[6]);
- d = TimeClip(d);
- return d;
- // return JSU.N(d);
- }
-
/*
* Use ported code from jsdate.c rather than the locale-specific
* date-parsing code from Java, to keep js and rhino consistent.
@@ -795,10 +764,6 @@
return msec;
}
- private static double jsStaticJSFunction_parse(String s) {
- return date_parseString(s);
- }
-
private static final int FORMATSPEC_FULL = 0;
private static final int FORMATSPEC_DATE = 1;
private static final int FORMATSPEC_TIME = 2;
@@ -888,8 +853,7 @@
}
private static double _toNumber(JS o) throws JSExn { return
JSU.toDouble(o); }
- private static double _toNumber(JS[] o, int index) throws JSExn { return
JSU.toDouble(o[index]); }
-
+
public JSDate(long l) throws JSExn {
this.date = (double)l;
thisTimeZone = java.util.TimeZone.getDefault();
@@ -1127,7 +1091,7 @@
this.date = date;
return date;
}
-
+/*
private double setHours(JS[] args) throws JSExn {
return makeTime(args, 4, true);
}
@@ -1135,7 +1099,7 @@
private double setUTCHours(JS[] args) throws JSExn {
return makeTime(args, 4, false);
}
-
+*/
private double makeDate(JS[] args, int maxargs, boolean local) throws
JSExn {
int i;
double conv[] = new double[3];
@@ -1246,4 +1210,38 @@
public long getRawTime() { return (long)this.date; }
}
-
+////////////
+/// GRAVEYARD
+//
+//private static double jsStaticJSFunction_UTC(JS[] args) throws JSExn {
+// double array[] = new double[MAXARGS];
+// int loop;
+// double d;
+//
+// for (loop = 0; loop < MAXARGS; loop++) {
+// if (loop < args.length) {
+// d = _toNumber(args[loop]);
+// if (d != d || Double.isInfinite(d)) {
+// return Double.NaN;
+// }
+// array[loop] = JSU.toDouble(args[loop]);
+// } else {
+// array[loop] = 0;
+// }
+// }
+//
+// /* adjust 2-digit years into the 20th century */
+// if (array[0] >= 0 && array[0] <= 99)
+// array[0] += 1900;
+//
+// /* if we got a 0 for 'date' (which is out of range)
+// * pretend it's a 1. (So Date.UTC(1972, 5) works) */
+// if (array[2] < 1)
+// array[2] = 1;
+//
+// d = date_msecFromDate(array[0], array[1], array[2],
+// array[3], array[4], array[5], array[6]);
+// d = TimeClip(d);
+// return d;
+// // return JSU.N(d);
+//}
Modified: trunk/core/org.ibex.js/src/org/ibex/js/JSU.jpp
===================================================================
--- trunk/core/org.ibex.js/src/org/ibex/js/JSU.jpp 2008-09-24 16:29:53 UTC
(rev 3113)
+++ trunk/core/org.ibex.js/src/org/ibex/js/JSU.jpp 2008-09-24 16:30:25 UTC
(rev 3114)
@@ -2,7 +2,6 @@
import java.io.*;
-import org.ibex.js.JS.Enumeration;
import org.ibex.util.*;
public class JSU implements Constants{
Modified: trunk/core/org.ibex.js/src/org/ibex/js/Scope.jpp
===================================================================
--- trunk/core/org.ibex.js/src/org/ibex/js/Scope.jpp 2008-09-24 16:29:53 UTC
(rev 3113)
+++ trunk/core/org.ibex.js/src/org/ibex/js/Scope.jpp 2008-09-24 16:30:25 UTC
(rev 3114)
@@ -3,8 +3,6 @@
// You may not use this file except in compliance with the License.
package org.ibex.js;
-import java.io.IOException;
-import java.io.StringReader;
import org.ibex.js.Interpreter.JSArgs;
import org.ibex.js.Interpreter.TrapArgs;
Modified: trunk/core/org.ibex.js/src/org/vexi/js/VexiJS.jpp
===================================================================
--- trunk/core/org.ibex.js/src/org/vexi/js/VexiJS.jpp 2008-09-24 16:29:53 UTC
(rev 3113)
+++ trunk/core/org.ibex.js/src/org/vexi/js/VexiJS.jpp 2008-09-24 16:30:25 UTC
(rev 3114)
@@ -201,10 +201,11 @@
public JS call(JS method, JS[] args) throws JSExn {
//#switch(JSU.toString(method))
case "post":
- JSU.checkArgs(args, ARGTYPES_post);
+ throw new RuntimeException("TODO/REMOVE");
+ /*JSU.checkArgs(args, ARGTYPES_post);
String url = JSU.toString(args[0]);
Fountain in = JSU.getFountain(args[1]);
- return new
Fountain.ByteArray(args.length>0?args[0]:null);
+ return new
Fountain.ByteArray(args.length>0?args[0]:null);*/
//#end
switch(args.length) {
@@ -218,7 +219,7 @@
}
};
- static final private int[] ARGTYPES_post = new int[]{JSU.ANY,JSU.FOUNTAIN};
+ //static final private int[] ARGTYPES_post = new
int[]{JSU.ANY,JSU.FOUNTAIN};
static final private int[] ARGTYPES_parsexml = new
int[]{JSU.FOUNTAIN,JSU.OBJ};
static public Fountain fountainForURL(final String url) throws JSExn{
Modified: trunk/core/org.ibex.js/src_junit/test/js/exec/rpc/json/TestJSON.java
===================================================================
--- trunk/core/org.ibex.js/src_junit/test/js/exec/rpc/json/TestJSON.java
2008-09-24 16:29:53 UTC (rev 3113)
+++ trunk/core/org.ibex.js/src_junit/test/js/exec/rpc/json/TestJSON.java
2008-09-24 16:30:25 UTC (rev 3114)
@@ -3,7 +3,6 @@
import junit.framework.Test;
import junit.framework.TestCase;
import test.js.exec.JSTestSuite;
-import test.js.exec.general.TestGeneral;
/**
* @author mike
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn