mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.1.4.1
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user