projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altoslib: Store saved state in version-independent format
[fw/altos]
/
altoslib
/
AltosParse.java
diff --git
a/altoslib/AltosParse.java
b/altoslib/AltosParse.java
index 12499b7b064ba678618a4eea42884a1a335b6f51..fbd049ae7a3da093c89de7ea5345546a4d3b8bf5 100644
(file)
--- a/
altoslib/AltosParse.java
+++ b/
altoslib/AltosParse.java
@@
-26,6
+26,14
@@
public class AltosParse {
}
public static int parse_int(String v) throws ParseException {
}
public static int parse_int(String v) throws ParseException {
+ try {
+ return (int) AltosLib.fromdec(v);
+ } catch (NumberFormatException e) {
+ throw new ParseException("error parsing int " + v, 0);
+ }
+ }
+
+ public static long parse_long(String v) throws ParseException {
try {
return AltosLib.fromdec(v);
} catch (NumberFormatException e) {
try {
return AltosLib.fromdec(v);
} catch (NumberFormatException e) {