mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.6.3.1'
This commit is contained in:
@@ -76,7 +76,7 @@ public class Xol_csv_parser {
|
||||
}
|
||||
}
|
||||
}
|
||||
private static final byte[] Bry_pipe = Bry_.new_a7("\\u007C");
|
||||
private static final Bry_bfr tmp_bfr = Bry_bfr.reset_(255);
|
||||
public static final Xol_csv_parser Instance = new Xol_csv_parser(); Xol_csv_parser() {}
|
||||
private static final byte[] Bry_pipe = Bry_.new_a7("\\u007C");
|
||||
private static final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255);
|
||||
public static final Xol_csv_parser Instance = new Xol_csv_parser(); Xol_csv_parser() {}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class Xol_csv_parser_tst {
|
||||
@Test public void Utf() {fxt.Tst_load(" ", "\\u00c2\\u00a0");} // NOTE: 1st String is nbsp;
|
||||
}
|
||||
class Xol_csv_parser_fxt {
|
||||
Xol_csv_parser parser = Xol_csv_parser.Instance; Bry_bfr tmp_bfr = Bry_bfr.reset_(255);
|
||||
Xol_csv_parser parser = Xol_csv_parser.Instance; Bry_bfr tmp_bfr = Bry_bfr_.Reset(255);
|
||||
public void Clear() {}
|
||||
public void Tst_save(String raw, String expd) {
|
||||
parser.Save(tmp_bfr, Bry_.new_u8(raw));
|
||||
|
||||
@@ -24,7 +24,7 @@ public class Xol_lang_srl {
|
||||
public static Xow_ns[] Load_ns_grps(byte[] src) {
|
||||
int src_len = src.length, pos = 0, fld_bgn = 0;
|
||||
int cur_id = -1;
|
||||
List_adp rv = List_adp_.new_(); Xol_csv_parser csv_parser = Xol_csv_parser.Instance;
|
||||
List_adp rv = List_adp_.New(); Xol_csv_parser csv_parser = Xol_csv_parser.Instance;
|
||||
while (true) {
|
||||
boolean last = pos == src_len; // NOTE: logic occurs b/c of \n}~-> dlm which gobbles up last \n
|
||||
byte b = last ? Byte_ascii.Nl : src[pos];
|
||||
@@ -53,7 +53,7 @@ public class Xol_lang_srl {
|
||||
public static void Load_keywords(Xol_kwd_mgr keyword_mgr, byte[] src) {
|
||||
int src_len = src.length, pos = 0, fld_bgn = 0, fld_idx = 0;
|
||||
boolean cur_cs = false; byte[] cur_key = Bry_.Empty;
|
||||
List_adp cur_words = List_adp_.new_();
|
||||
List_adp cur_words = List_adp_.New();
|
||||
Xol_csv_parser csv_parser = Xol_csv_parser.Instance;
|
||||
while (true) {
|
||||
boolean last = pos == src_len; // NOTE: logic occurs b/c of \n}~-> dlm which gobbles up last \n
|
||||
@@ -199,7 +199,7 @@ public class Xol_lang_srl {
|
||||
bldr.Add_paren_end().Add_proc_cont_one(Invk_lang).Add_nl(); // ).lang\n
|
||||
}
|
||||
public static void Save_specials(Xoa_gfs_bldr bldr, Xol_specials_mgr specials_mgr) {
|
||||
int specials_len = specials_mgr.Count(); Xol_csv_parser csv_parser = Xol_csv_parser.Instance;
|
||||
int specials_len = specials_mgr.Len(); Xol_csv_parser csv_parser = Xol_csv_parser.Instance;
|
||||
if (specials_len == 0) return;
|
||||
Bry_bfr bfr = bldr.Bfr();
|
||||
bldr.Add_proc_cont_one(Xol_lang_itm.Invk_specials).Add_nl();
|
||||
|
||||
@@ -205,7 +205,7 @@ class Xol_lang_srl_fxt {
|
||||
app = Xoa_app_fxt.Make__app__edit();
|
||||
lang = new Xol_lang_itm(app.Lang_mgr(), Bry_.new_a7("fr"));
|
||||
Xoa_gfs_mgr.Msg_parser_init(); // required by fallback_load
|
||||
} GfsCtx ctx = GfsCtx.new_(); Xoa_gfs_bldr bldr = new Xoa_gfs_bldr(); //Bry_bfr tmp_bfr = Bry_bfr.reset_(255);
|
||||
} GfsCtx ctx = GfsCtx.new_(); Xoa_gfs_bldr bldr = new Xoa_gfs_bldr(); //Bry_bfr tmp_bfr = Bry_bfr_.Reset(255);
|
||||
public Xoae_app App() {return app;} private Xoae_app app;
|
||||
public Xol_lang_itm Lang() {return lang;} private Xol_lang_itm lang;
|
||||
public Xow_ns ns_(int id, String s) {return new Xow_ns(id, Xow_ns_case_.Tid__1st, Bry_.new_u8(s), false);}
|
||||
@@ -281,7 +281,7 @@ class Xol_lang_srl_fxt {
|
||||
return sb.To_str_and_clear();
|
||||
}
|
||||
private Xol_specials_itm[] To_ary(Xol_specials_mgr specials_mgr) {
|
||||
int len = specials_mgr.Count();
|
||||
int len = specials_mgr.Len();
|
||||
Xol_specials_itm[] rv = new Xol_specials_itm[len];
|
||||
for (int i = 0; i < len; i++)
|
||||
rv[i] = specials_mgr.Get_at(i);
|
||||
@@ -304,7 +304,7 @@ class Xol_lang_srl_fxt {
|
||||
}
|
||||
Xol_kwd_grp[] To_ary(Xol_kwd_mgr kwd_mgr) {
|
||||
int len = kwd_mgr.Len();
|
||||
List_adp rv = List_adp_.new_();
|
||||
List_adp rv = List_adp_.New();
|
||||
for (int i = 0; i < len; i++) {
|
||||
Xol_kwd_grp kwd_grp = kwd_mgr.Get_at(i);
|
||||
if (kwd_grp == null) continue;
|
||||
@@ -328,7 +328,7 @@ class Xol_lang_srl_fxt {
|
||||
}
|
||||
Xol_msg_itm[] To_ary(Xol_msg_mgr msg_mgr) {
|
||||
int len = msg_mgr.Itms_max();
|
||||
List_adp rv = List_adp_.new_();
|
||||
List_adp rv = List_adp_.New();
|
||||
for (int i = 0; i < len; i++) {
|
||||
Xol_msg_itm itm = msg_mgr.Itm_by_id_or_null(i);
|
||||
if (itm == null || !itm.Dirty()) continue;
|
||||
|
||||
Reference in New Issue
Block a user