1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2015-01-25 20:56:50 -05:00
parent 1b0042ef8a
commit efaf9dcd00
447 changed files with 10258 additions and 3016 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -50,7 +50,7 @@ public class Xow_cfg_wiki_core {
}
public static void Load_ns_(Xow_ns_mgr ns_mgr, byte[] src) {// 10|1|Template
int len = src.length; int pos = 0, fld_bgn = 0, fld_idx = 0, row_bgn = 0;
int cur_id = Int_.MinValue; byte cur_case_match = Byte_.MaxValue_127; byte[] cur_name = Bry_.Empty;
int cur_id = Int_.MinValue; byte cur_case_match = Byte_.Max_value_127; byte[] cur_name = Bry_.Empty;
Xol_csv_parser csv_parser = Xol_csv_parser._;
while (true) {
boolean last = pos == len;
@@ -59,7 +59,7 @@ public class Xow_cfg_wiki_core {
case Byte_ascii.Pipe:
switch (fld_idx) {
case 0: cur_id = Bry_.Xto_int_or(src, fld_bgn, pos, Int_.MinValue); if (cur_id == Int_.MinValue) throw Err_mgr._.fmt_(GRP_KEY, "fail.load.id", "failed to load id: ~{0}", String_.new_utf8_(src, fld_bgn, pos)); break;
case 1: cur_case_match = Bry_.Xto_byte_by_int(src, fld_bgn, pos, Byte_.MaxValue_127); if (cur_id == Byte_.MaxValue_127) throw Err_mgr._.fmt_(GRP_KEY, "fail.load.case_match", "failed to load match: ~{0}", String_.new_utf8_(src, fld_bgn, pos)); break;
case 1: cur_case_match = Bry_.Xto_byte_by_int(src, fld_bgn, pos, Byte_.Max_value_127); if (cur_id == Byte_.Max_value_127) throw Err_mgr._.fmt_(GRP_KEY, "fail.load.case_match", "failed to load match: ~{0}", String_.new_utf8_(src, fld_bgn, pos)); break;
default: throw Err_.unhandled(fld_idx);
}
fld_bgn = pos + 1;
@@ -70,7 +70,7 @@ public class Xow_cfg_wiki_core {
cur_name = csv_parser.Load(src, fld_bgn, pos);
ns_mgr.Add_new(cur_id, cur_name, cur_case_match, false);
}
cur_id = Int_.MinValue; cur_case_match = Byte_.MaxValue_127;
cur_id = Int_.MinValue; cur_case_match = Byte_.Max_value_127;
fld_bgn = pos + 1;
fld_idx = 0;
row_bgn = fld_bgn;