projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'buttonbox' of git://git.gag.com/fw/altos into buttonbox
[fw/altos]
/
ao-tools
/
altosui
/
AltosParse.java
diff --git
a/ao-tools/altosui/AltosParse.java
b/ao-tools/altosui/AltosParse.java
index a60dc69434a67aa454519979041fee7f7a4d47a3..fbfcaaee7493c86275c0184c1ecfcdf900edd6a2 100644
(file)
--- a/
ao-tools/altosui/AltosParse.java
+++ b/
ao-tools/altosui/AltosParse.java
@@
-21,9
+21,13
@@
import java.text.*;
import java.lang.*;
public class AltosParse {
import java.lang.*;
public class AltosParse {
+ static boolean isdigit(char c) {
+ return '0' <= c && c <= '9';
+ }
+
static int parse_int(String v) throws ParseException {
try {
static int parse_int(String v) throws ParseException {
try {
- return
Integer.parseInt
(v);
+ return
Altos.fromdec
(v);
} catch (NumberFormatException e) {
throw new ParseException("error parsing int " + v, 0);
}
} catch (NumberFormatException e) {
throw new ParseException("error parsing int " + v, 0);
}
@@
-31,7
+35,7
@@
public class AltosParse {
static int parse_hex(String v) throws ParseException {
try {
static int parse_hex(String v) throws ParseException {
try {
- return
Integer.parseInt(v, 16
);
+ return
Altos.fromhex(v
);
} catch (NumberFormatException e) {
throw new ParseException("error parsing hex " + v, 0);
}
} catch (NumberFormatException e) {
throw new ParseException("error parsing hex " + v, 0);
}