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-08-03 00:10:03 -04:00
parent 9d63f03b3d
commit 34c34f227c
514 changed files with 4972 additions and 3910 deletions

View File

@@ -445,7 +445,7 @@ default: throw Err_.new_unhandled(id);
} static byte[][] Bry__;
public static int Id_by_bry(byte[] find) {
if (hash == null) {
hash = Hash_adp_bry.ci_ascii_(); // ASCII: all MW kwds appear to be ASCII; EX: "redirect", "toc", "currentmont", etc.
hash = Hash_adp_bry.ci_a7(); // ASCII: all MW kwds appear to be ASCII; EX: "redirect", "toc", "currentmont", etc.
if (Bry__ == null) Bry_init();
int len = Bry__.length;
for (int i = 0; i < len; i++) {

View File

@@ -84,7 +84,7 @@ public class Xol_kwd_mgr implements GfoInvkAble {
}
public static Hash_adp_bry hash_(Xol_kwd_mgr mgr, int id) {
Xol_kwd_grp grp = mgr.Get_at(id);
Hash_adp_bry rv = Hash_adp_bry.c__utf8_(grp.Case_match(), mgr.lang.Case_mgr());
Hash_adp_bry rv = Hash_adp_bry.c__u8(grp.Case_match(), mgr.lang.Case_mgr());
int len = grp.Itms().length;
for (int i = 0; i < len; i++) {
Xol_kwd_itm itm = grp.Itms()[i];

View File

@@ -30,7 +30,7 @@ public class Xol_lang implements GfoInvkAble {
this.kwd_mgr = new Xol_kwd_mgr(this);
this.msg_mgr = new Xol_msg_mgr(this, true);
this.specials_mgr = new Xol_specials_mgr(this);
this.case_mgr = Env_.Mode_testing() ? Xol_case_mgr_.Ascii() : Xol_case_mgr_.Utf8(); // NOTE: if test load ascii b/c utf8 is large; NOTE: placed here b/c tests do not call load; DATE:2014-07-04
this.case_mgr = Env_.Mode_testing() ? Xol_case_mgr_.A7() : Xol_case_mgr_.U8(); // NOTE: if test load ascii b/c utf8 is large; NOTE: placed here b/c tests do not call load; DATE:2014-07-04
this.num_mgr = Xol_num_mgr_.new_by_lang_id(lang_id);
this.lnki_trail_mgr = new Xol_lnki_trail_mgr(this);
this.vnt_mgr = new Xol_vnt_mgr(this);
@@ -52,7 +52,7 @@ public class Xol_lang implements GfoInvkAble {
public Xol_msg_mgr Msg_mgr() {return msg_mgr;} private final Xol_msg_mgr msg_mgr;
public Xol_specials_mgr Specials_mgr() {return specials_mgr;} private final Xol_specials_mgr specials_mgr;
public Xol_case_mgr Case_mgr() {return case_mgr;} private Xol_case_mgr case_mgr;
public void Case_mgr_utf8_() {case_mgr = Xol_case_mgr_.Utf8();} // TEST:
public void Case_mgr_u8_() {case_mgr = Xol_case_mgr_.U8();} // TEST:
public Xol_font_info Gui_font() {return gui_font;} private Xol_font_info gui_font = new Xol_font_info(null, 0, gplx.gfui.FontStyleAdp_.Plain);
public byte[] Fallback_bry() {return fallback_bry;}
private byte[] X_axis_end() {return dir_ltr ? X_axis_end_right : X_axis_end_left;}

View File

@@ -27,7 +27,7 @@ public class Xol_lang_srl {
byte b = last ? Byte_ascii.Nl : src[pos];
switch (b) {
case Byte_ascii.Pipe:
cur_id = Bry_.Xto_int_or(src, fld_bgn, pos, Int_.MinValue);
cur_id = Bry_.To_int_or(src, fld_bgn, pos, Int_.MinValue);
if (cur_id == Int_.MinValue) throw Err_.new_wo_type("invalid_id", "id", String_.new_u8(src, fld_bgn, pos));
fld_bgn = pos + 1;
break;

View File

@@ -21,7 +21,7 @@ public class Xol_lnki_trail_mgr implements GfoInvkAble {
public Xol_lnki_trail_mgr(Xol_lang lang) {}
public void Clear() {trie.Clear();}
public int Count() {return trie.Count();}
public Btrie_slim_mgr Trie() {return trie;} Btrie_slim_mgr trie = Btrie_slim_mgr.cs_();
public Btrie_slim_mgr Trie() {return trie;} Btrie_slim_mgr trie = Btrie_slim_mgr.cs();
public void Add(byte[] v) {trie.Add_obj(v, v);}
public void Del(byte[] v) {trie.Del(v);}
private void Add(String... ary) {

View File

@@ -267,7 +267,7 @@ public static final int
itm.Atrs_set(val, has_fmt_arg, has_tmpl_txt);
}
public static final byte[] Bry_nbsp = Byte_.Ary_by_ints(194, 160);
private static final Btrie_slim_mgr trie_space = Btrie_slim_mgr.cs_() // MW:cache/MessageCache.php|get|Fix for trailing whitespace, removed by textarea|DATE:2014-04-29
private static final Btrie_slim_mgr trie_space = Btrie_slim_mgr.cs() // MW:cache/MessageCache.php|get|Fix for trailing whitespace, removed by textarea|DATE:2014-04-29
.Add_bry("&#32;" , " ")
.Add_bry("&nbsp;" , Bry_nbsp)
.Add_bry("&#160;" , Bry_nbsp)

View File

@@ -95,7 +95,7 @@ public class Xol_msg_mgr implements GfoInvkAble {
return rv;
}
private static Hash_adp Hash_new(Xol_msg_itm[] ary) {
Hash_adp rv = Hash_adp_bry.ci_ascii_(); // ASCII:MW messages are currently all ASCII
Hash_adp rv = Hash_adp_bry.ci_a7(); // ASCII:MW messages are currently all ASCII
for (int i = 0; i < Xol_msg_itm_.Id__max; i++) {
Xol_msg_itm itm = ary[i]; if (itm == null) continue; // NOTE: can be null when msg_mgr is owned by wiki
rv.Add(itm.Key(), itm);