1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

'v3.7.3.1'

This commit is contained in:
gnosygnu
2016-07-17 21:10:59 -04:00
parent b333db45f8
commit 7a851a41a5
290 changed files with 3048 additions and 2124 deletions

View File

@@ -153,57 +153,4 @@ public class Xop_amp_mgr { // TS
return dirty ? bfr.To_bry_and_clear_and_rls() : src;
}
public static final Xop_amp_mgr Instance = new Xop_amp_mgr(); Xop_amp_mgr() {}
// private Xop_tkn_itm Parse_as_tkn_old(Xop_tkn_mkr tkn_mkr, byte[] src, int src_len, int amp_pos, int cur_pos) {
// synchronized (thread_lock_1) {
// rv_pos = amp_pos + 1; // default to fail pos; after amp;
// Object o = amp_trie.Match_bgn(src, cur_pos, src_len);
// cur_pos = amp_trie.Match_pos();
// if (o == null) return null;
// Xop_amp_trie_itm itm = (Xop_amp_trie_itm)o;
// switch (itm.Tid()) {
// case Xop_amp_trie_itm.Tid_name_std:
// case Xop_amp_trie_itm.Tid_name_xowa:
// rv_pos = cur_pos;
// return tkn_mkr.Amp_txt(amp_pos, cur_pos, itm);
// case Xop_amp_trie_itm.Tid_num_hex:
// case Xop_amp_trie_itm.Tid_num_dec:
// boolean ncr_is_hex = itm.Tid() == Xop_amp_trie_itm.Tid_num_hex;
// Xop_amp_mgr_rslt rv = Parse_as_int2(ncr_is_hex, src, src_len, amp_pos, cur_pos);
// return rv.Pass() ? tkn_mkr.Amp_num(amp_pos, rv_pos, rslt_val) : null;
// default: throw Err_.new_unhandled(itm.Tid());
// }
// }
// }
// private boolean Parse_as_int_old(boolean ncr_is_hex, byte[] src, int src_len, int amp_pos, int int_bgn) {
// synchronized (thread_lock_2) {
// rv_pos = amp_pos + 1; // default to fail pos; after amp;
// rslt_val = -1; // clear any previous setting
// int cur_pos = int_bgn, int_end = -1;
// int semic_pos = Bry_find_.Find_fwd(src, Byte_ascii.Semic, cur_pos, src_len);
// if (semic_pos == Bry_find_.Not_found) return false;
// int_end = semic_pos - 1; // int_end = pos before semicolon
// int multiple = ncr_is_hex ? 16 : 10, val = 0, factor = 1, cur = 0;
// for (int i = int_end; i >= int_bgn; i--) {
// byte b = src[i];
// if (ncr_is_hex) {
// if (b >= 48 && b <= 57) cur = b - 48;
// else if (b >= 65 && b <= 70) cur = b - 55;
// else if (b >= 97 && b <= 102) cur = b - 87;
// else if((b >= 71 && b <= 90)
// || (b >= 91 && b <= 122)) continue; // NOTE: wiki discards letters G-Z; PAGE:en.w:Miscellaneous_Symbols "{{Unicode|&#xx26D0;}}"; NOTE 2nd x is discarded
// else return false;
// }
// else {
// cur = b - Byte_ascii.Num_0;
// if (cur < 0 || cur > 10) return false;
// }
// val += cur * factor;
// if (val > gplx.core.intls.Utf8_.Codepoint_max) return false; // fail if value > largest_unicode_codepoint
// factor *= multiple;
// }
// rslt_val = val;
// rv_pos = semic_pos + 1; // position after semic
// return true;
// }
// }
}