diff --git a/100_core/src/gplx/Err_.java b/100_core/src/gplx/Err_.java index 4108f44d6..c54b54453 100644 --- a/100_core/src/gplx/Err_.java +++ b/100_core/src/gplx/Err_.java @@ -36,6 +36,7 @@ public class Err_ { public static Err new_parse_exc(Exception e, Class c, String raw) {return new_parse(Type_adp_.FullNameOf_type(c), raw).Args_add("e", Err_.Message_lang(e));} public static Err new_parse(String type, String raw) {return new Err(Bool_.Y, Trace_null, Type__gplx, "parse failed", "type", type, "raw", raw);} public static Err new_null() {return new Err(Bool_.Y, Trace_null, Type__gplx, "null obj");} + public static Err new_null(String arg) {return new Err(Bool_.Y, Trace_null, Type__gplx, "null obj", "arg", arg);} public static Err new_missing_idx(int idx, int len) {return new Err(Bool_.Y, Trace_null, Type__gplx, "index is out of bounds", "idx", idx, "len", len);} public static Err new_missing_key(String key) {return new Err(Bool_.Y, Trace_null, Type__gplx, "key not found", "key", key);} public static Err new_invalid_op(String msg) {return new Err(Bool_.Y, Trace_null, Type__gplx, msg);} diff --git a/100_core/src/gplx/core/brys/Bry_rdr.java b/100_core/src/gplx/core/brys/Bry_rdr.java index 657f5ee77..0fefaf6b6 100644 --- a/100_core/src/gplx/core/brys/Bry_rdr.java +++ b/100_core/src/gplx/core/brys/Bry_rdr.java @@ -29,14 +29,14 @@ public class Bry_rdr { public void Pos_add_one() {++pos;} public int Or_int() {return or_int;} public void Or_int_(int v) {or_int = v;} private int or_int = Int_.Min_value; public byte[] Or_bry() {return or_bry;} public void Or_bry_(byte[] v) {or_bry = v;} private byte[] or_bry; - public int Find_fwd(byte find) {return Bry_finder.Find_fwd(src, find, pos);} - public int Find_fwd_ws() {return Bry_finder.Find_fwd_until_ws(src, pos, src_len);} + public int Find_fwd(byte find) {return Bry_find_.Find_fwd(src, find, pos);} + public int Find_fwd_ws() {return Bry_find_.Find_fwd_until_ws(src, pos, src_len);} public int Find_fwd__pos_at_lhs(byte[] find_bry) {return Find_fwd__pos_at(find_bry, Bool_.N);} public int Find_fwd__pos_at_rhs(byte[] find_bry) {return Find_fwd__pos_at(find_bry, Bool_.Y);} public int Find_fwd__pos_at(byte[] find_bry, boolean pos_at_rhs) { - int find_pos = Bry_finder.Find_fwd(src, find_bry, pos, src_len); + int find_pos = Bry_find_.Find_fwd(src, find_bry, pos, src_len); if (pos_at_rhs) find_pos += find_bry.length; - if (find_pos != Bry_finder.Not_found) pos = find_pos; + if (find_pos != Bry_find_.Not_found) pos = find_pos; return find_pos; } public int Read_int_to_semic() {return Read_int_to(Byte_ascii.Semic);} diff --git a/100_core/src/gplx/core/btries/Btrie_u8_itm.java b/100_core/src/gplx/core/btries/Btrie_u8_itm.java index 24e3ae289..6127f9a79 100644 --- a/100_core/src/gplx/core/btries/Btrie_u8_itm.java +++ b/100_core/src/gplx/core/btries/Btrie_u8_itm.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.core.btries; import gplx.*; import gplx.core.*; -import gplx.intl.*; +import gplx.core.intls.*; class Btrie_u8_itm { private Hash_adp_bry nxts; private byte[] asymmetric_bry; @@ -40,8 +40,8 @@ class Btrie_u8_itm { else { // itm has asymmetric_bry; EX: "İ" was added to trie, must match "İ" and "i"; if (called_by_match) { // called by mgr.Match return - ( Bry_.Eq(rv.key, src, c_bgn, c_end) // key matches src; EX: "aİ" - || Bry_.Eq(rv.asymmetric_bry, src, c_bgn, c_end) // asymmetric_bry matches src; EX: "ai"; note that "aI" won't match + ( Bry_.Eq(src, c_bgn, c_end, rv.key) // key matches src; EX: "aİ" + || Bry_.Eq(src, c_bgn, c_end, rv.asymmetric_bry) // asymmetric_bry matches src; EX: "ai"; note that "aI" won't match ) ? rv : null; } diff --git a/100_core/src/gplx/core/btries/Btrie_u8_mgr.java b/100_core/src/gplx/core/btries/Btrie_u8_mgr.java index c3ece4eac..3934876fd 100644 --- a/100_core/src/gplx/core/btries/Btrie_u8_mgr.java +++ b/100_core/src/gplx/core/btries/Btrie_u8_mgr.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.core.btries; import gplx.*; import gplx.core.*; -import gplx.intl.*; +import gplx.core.intls.*; public class Btrie_u8_mgr implements Btrie_mgr { private Btrie_u8_itm root; private Gfo_case_mgr case_mgr; Btrie_u8_mgr(Gfo_case_mgr case_mgr) { diff --git a/100_core/src_150_text/gplx/intl/Gfo_case_itm.java b/100_core/src/gplx/core/intls/Gfo_case_itm.java similarity index 92% rename from 100_core/src_150_text/gplx/intl/Gfo_case_itm.java rename to 100_core/src/gplx/core/intls/Gfo_case_itm.java index 1842f860c..d4ce4846a 100644 --- a/100_core/src_150_text/gplx/intl/Gfo_case_itm.java +++ b/100_core/src/gplx/core/intls/Gfo_case_itm.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.intl; import gplx.*; +package gplx.core.intls; import gplx.*; import gplx.core.*; public interface Gfo_case_itm { int Hashcode_lo(); int Len_lo(); diff --git a/100_core/src_150_text/gplx/intl/Gfo_case_mgr.java b/100_core/src/gplx/core/intls/Gfo_case_mgr.java similarity index 92% rename from 100_core/src_150_text/gplx/intl/Gfo_case_mgr.java rename to 100_core/src/gplx/core/intls/Gfo_case_mgr.java index ee46b4c35..000f1b8c1 100644 --- a/100_core/src_150_text/gplx/intl/Gfo_case_mgr.java +++ b/100_core/src/gplx/core/intls/Gfo_case_mgr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.intl; import gplx.*; +package gplx.core.intls; import gplx.*; import gplx.core.*; public interface Gfo_case_mgr { byte Tid(); Gfo_case_itm Get_or_null(byte bgn_byte, byte[] src, int bgn, int end); diff --git a/100_core/src_150_text/gplx/intl/Gfo_case_mgr_.java b/100_core/src/gplx/core/intls/Gfo_case_mgr_.java similarity index 92% rename from 100_core/src_150_text/gplx/intl/Gfo_case_mgr_.java rename to 100_core/src/gplx/core/intls/Gfo_case_mgr_.java index 70230673d..ee64006f6 100644 --- a/100_core/src_150_text/gplx/intl/Gfo_case_mgr_.java +++ b/100_core/src/gplx/core/intls/Gfo_case_mgr_.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.intl; import gplx.*; +package gplx.core.intls; import gplx.*; import gplx.core.*; public class Gfo_case_mgr_ { public static final byte Tid_a7 = 0, Tid_u8 = 1, Tid_custom = 2; } diff --git a/100_core/src_150_text/gplx/intl/Utf16_.java b/100_core/src/gplx/core/intls/Utf16_.java similarity index 96% rename from 100_core/src_150_text/gplx/intl/Utf16_.java rename to 100_core/src/gplx/core/intls/Utf16_.java index 181d7cddc..e5a21fb5f 100644 --- a/100_core/src_150_text/gplx/intl/Utf16_.java +++ b/100_core/src/gplx/core/intls/Utf16_.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.intl; import gplx.*; +package gplx.core.intls; import gplx.*; import gplx.core.*; import gplx.core.primitives.*; public class Utf16_ { public static int Surrogate_merge(int hi, int lo) { // REF: http://perldoc.perl.org/Encode/Unicode.html diff --git a/100_core/src_150_text/gplx/intl/Utf16__tst.java b/100_core/src/gplx/core/intls/Utf16__tst.java similarity index 94% rename from 100_core/src_150_text/gplx/intl/Utf16__tst.java rename to 100_core/src/gplx/core/intls/Utf16__tst.java index a5a9a9b61..35bd8c8a9 100644 --- a/100_core/src_150_text/gplx/intl/Utf16__tst.java +++ b/100_core/src/gplx/core/intls/Utf16__tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.intl; import gplx.*; +package gplx.core.intls; import gplx.*; import gplx.core.*; import org.junit.*; import gplx.core.primitives.*; public class Utf16__tst { private Utf16__fxt fxt = new Utf16__fxt(); @@ -38,7 +38,7 @@ public class Utf16__tst { class Utf16__fxt { private Int_obj_ref hi_ref = Int_obj_ref.neg1_(), lo_ref = Int_obj_ref.neg1_(); public void Test_encode_decode(int expd_c_int, int... expd_int) { - byte[] expd = Bry_.ints_(expd_int); + byte[] expd = Bry_.new_ints(expd_int); byte[] bfr = new byte[10]; int bfr_len = Utf16_.Encode_int(expd_c_int, bfr, 0); byte[] actl = Bry_.Mid_by_len(bfr, 0, bfr_len); diff --git a/100_core/src_150_text/gplx/intl/Utf8_.java b/100_core/src/gplx/core/intls/Utf8_.java similarity index 97% rename from 100_core/src_150_text/gplx/intl/Utf8_.java rename to 100_core/src/gplx/core/intls/Utf8_.java index 0c93d90ac..5947a859a 100644 --- a/100_core/src_150_text/gplx/intl/Utf8_.java +++ b/100_core/src/gplx/core/intls/Utf8_.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.intl; import gplx.*; +package gplx.core.intls; import gplx.*; import gplx.core.*; public class Utf8_ { public static int Len_of_bry(byte[] ary) { if (ary == null) return 0; diff --git a/100_core/src_150_text/gplx/intl/Utf8__tst.java b/100_core/src/gplx/core/intls/Utf8__tst.java similarity index 96% rename from 100_core/src_150_text/gplx/intl/Utf8__tst.java rename to 100_core/src/gplx/core/intls/Utf8__tst.java index 605460376..69ce5e489 100644 --- a/100_core/src_150_text/gplx/intl/Utf8__tst.java +++ b/100_core/src/gplx/core/intls/Utf8__tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.intl; import gplx.*; +package gplx.core.intls; import gplx.*; import gplx.core.*; import org.junit.*; public class Utf8__tst { private Utf8__fxt fxt = new Utf8__fxt(); diff --git a/100_core/src/gplx/core/regxs/Regx_adp.java b/100_core/src/gplx/langs/regxs/Regx_adp.java similarity index 96% rename from 100_core/src/gplx/core/regxs/Regx_adp.java rename to 100_core/src/gplx/langs/regxs/Regx_adp.java index 05e43d252..6636cdaac 100644 --- a/100_core/src/gplx/core/regxs/Regx_adp.java +++ b/100_core/src/gplx/langs/regxs/Regx_adp.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.regxs; import gplx.*; import gplx.core.*; +package gplx.langs.regxs; import gplx.*; import gplx.langs.*; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Regx_adp { diff --git a/100_core/src/gplx/core/regxs/Regx_adp_.java b/100_core/src/gplx/langs/regxs/Regx_adp_.java similarity index 94% rename from 100_core/src/gplx/core/regxs/Regx_adp_.java rename to 100_core/src/gplx/langs/regxs/Regx_adp_.java index 02c1b1130..8a58d0bd8 100644 --- a/100_core/src/gplx/core/regxs/Regx_adp_.java +++ b/100_core/src/gplx/langs/regxs/Regx_adp_.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.regxs; import gplx.*; import gplx.core.*; +package gplx.langs.regxs; import gplx.*; import gplx.langs.*; public class Regx_adp_ { public static Regx_adp new_(String pattern) {return new Regx_adp(pattern);} public static List_adp Find_all(String input, String find) { diff --git a/100_core/src/gplx/core/regxs/Regx_adp__tst.java b/100_core/src/gplx/langs/regxs/Regx_adp__tst.java similarity index 96% rename from 100_core/src/gplx/core/regxs/Regx_adp__tst.java rename to 100_core/src/gplx/langs/regxs/Regx_adp__tst.java index f9a015b7f..1d3eae357 100644 --- a/100_core/src/gplx/core/regxs/Regx_adp__tst.java +++ b/100_core/src/gplx/langs/regxs/Regx_adp__tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.regxs; import gplx.*; import gplx.core.*; +package gplx.langs.regxs; import gplx.*; import gplx.langs.*; import org.junit.*; public class Regx_adp__tst implements TfdsEqListItmStr { @Test public void Match() { diff --git a/100_core/src/gplx/core/regxs/Regx_bldr.java b/100_core/src/gplx/langs/regxs/Regx_bldr.java similarity index 95% rename from 100_core/src/gplx/core/regxs/Regx_bldr.java rename to 100_core/src/gplx/langs/regxs/Regx_bldr.java index a29f0c18e..5328c9d19 100644 --- a/100_core/src/gplx/core/regxs/Regx_bldr.java +++ b/100_core/src/gplx/langs/regxs/Regx_bldr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.regxs; import gplx.*; import gplx.core.*; +package gplx.langs.regxs; import gplx.*; import gplx.langs.*; import gplx.core.strings.*; public class Regx_bldr { public static String Includes(String characters) {return String_.Concat_any(Regx_bldr.Tkn_CharSetBegin, characters, Regx_bldr.Tkn_CharSetEnd);} diff --git a/100_core/src/gplx/core/regxs/Regx_group.java b/100_core/src/gplx/langs/regxs/Regx_group.java similarity index 94% rename from 100_core/src/gplx/core/regxs/Regx_group.java rename to 100_core/src/gplx/langs/regxs/Regx_group.java index d126d087d..eb32176f7 100644 --- a/100_core/src/gplx/core/regxs/Regx_group.java +++ b/100_core/src/gplx/langs/regxs/Regx_group.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.regxs; import gplx.*; import gplx.core.*; +package gplx.langs.regxs; import gplx.*; import gplx.langs.*; public class Regx_group { public Regx_group(boolean rslt, int bgn, int end, String val) {this.rslt = rslt; this.bgn = bgn; this.end = end; this.val = val;} public boolean Rslt() {return rslt;} private boolean rslt; diff --git a/100_core/src/gplx/core/regxs/Regx_match.java b/100_core/src/gplx/langs/regxs/Regx_match.java similarity index 95% rename from 100_core/src/gplx/core/regxs/Regx_match.java rename to 100_core/src/gplx/langs/regxs/Regx_match.java index b780ec042..34617151f 100644 --- a/100_core/src/gplx/core/regxs/Regx_match.java +++ b/100_core/src/gplx/langs/regxs/Regx_match.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.regxs; import gplx.*; import gplx.core.*; +package gplx.langs.regxs; import gplx.*; import gplx.langs.*; public class Regx_match { public Regx_match(boolean rslt, int find_bgn, int find_end, Regx_group[] groups) {this.rslt = rslt; this.find_bgn = find_bgn; this.find_end = find_end; this.groups = groups;} public boolean Rslt() {return rslt;} private boolean rslt; diff --git a/100_core/src_101_types_object/gplx/String_.java b/100_core/src_101_types_object/gplx/String_.java index 60588e952..f5ae28f1f 100644 --- a/100_core/src_101_types_object/gplx/String_.java +++ b/100_core/src_101_types_object/gplx/String_.java @@ -43,7 +43,7 @@ public class String_ implements GfoInvkAble { } catch (Exception e) {throw Err_.new_exc(e, "core", "unsupported encoding");} } - public static String new_u8_by_len(byte[] v, int bgn, int len) { + public static String new_u8__by_len(byte[] v, int bgn, int len) { int v_len = v.length; if (bgn + len > v_len) len = v_len - bgn; return new_u8(v, bgn, bgn + len); diff --git a/100_core/src_120_basicDataType/gplx/Enm_.java b/100_core/src_120_basicDataType/gplx/Enm_.java index 345bf99eb..2917ce502 100644 --- a/100_core/src_120_basicDataType/gplx/Enm_.java +++ b/100_core/src_120_basicDataType/gplx/Enm_.java @@ -19,7 +19,19 @@ package gplx; public class Enm_ { public static int To_int(Object enm) {return Ordinal_lang(enm);} public static boolean Has_int(int val, int find) {return find == (val & find);} - public static int Add_int(int lhs, int rhs) {return lhs | rhs;} + public static int Add_int(int lhs, int rhs) {return lhs | rhs;} + public static int Add_int_ary(int... ary) { + int rv = 0; + int len = ary.length; + for (int i = 0; i < len; ++i) { + int itm = ary[i]; + if (rv == 0) + rv = itm; + else + rv = Flip_int(true, rv, itm); + } + return rv; + } public static int Flip_int(boolean enable, int val, int find) { boolean has = find == (val & find); return (has ^ enable) ? val ^ find : val; diff --git a/100_core/src_130_brys/gplx/Bry_.java b/100_core/src_130_brys/gplx/Bry_.java index 48774859b..42c9324e4 100644 --- a/100_core/src_130_brys/gplx/Bry_.java +++ b/100_core/src_130_brys/gplx/Bry_.java @@ -24,8 +24,8 @@ public class Bry_ { public static final byte[] Empty = new byte[0]; public static final byte[][] Ary_empty = new byte[0][]; public static final Class Cls_ref_type = byte[].class; - public static byte[] bytes_(byte... ary) {return ary;} - public static byte[] ints_ (int... ary) { + public static byte[] new_bytes(byte... ary) {return ary;} + public static byte[] new_ints(int... ary) { int len = ary.length; byte[] rv = new byte[len]; for (int i = 0; i < len; i++) @@ -33,32 +33,29 @@ public class Bry_ { return rv; } public static byte[] new_a7(String str) { - try { - if (str == null) return null; - int str_len = str.length(); - if (str_len == 0) return Bry_.Empty; - byte[] rv = new byte[str_len]; - for (int i = 0; i < str_len; ++i) { - char c = str.charAt(i); - if (c > 128) c = '?'; - rv[i] = (byte)c; - } - return rv; + if (str == null) return null; + int str_len = str.length(); + if (str_len == 0) return Bry_.Empty; + byte[] rv = new byte[str_len]; + for (int i = 0; i < str_len; ++i) { + char c = str.charAt(i); + if (c > 128) c = '?'; + rv[i] = (byte)c; } - catch (Exception e) {throw Err_.new_exc(e, "core", "invalid ASCII sequence", "str", str);} + return rv; } public static byte[] new_u8_safe(String str) {return str == null ? null : new_u8(str);} public static byte[] new_u8(String str) { try { int str_len = str.length(); - int bry_len = new_u8_by_len(str, str_len); + int bry_len = new_u8__by_len(str, str_len); byte[] rv = new byte[bry_len]; - new_u8_write(str, str_len, rv, 0); + new_u8__write(str, str_len, rv, 0); return rv; } catch (Exception e) {throw Err_.new_exc(e, "core", "invalid UTF-8 sequence", "s", str);} } - public static int new_u8_by_len(String s, int s_len) { + public static int new_u8__by_len(String s, int s_len) { int rv = 0; for (int i = 0; i < s_len; ++i) { char c = s.charAt(i); @@ -73,7 +70,7 @@ public class Bry_ { } return rv; } - public static void new_u8_write(String str, int str_len, byte[] bry, int bry_pos) { + public static void new_u8__write(String str, int str_len, byte[] bry, int bry_pos) { for (int i = 0; i < str_len; ++i) { char c = str.charAt(i); if ( c < 128) { @@ -101,58 +98,19 @@ public class Bry_ { } } } - public static byte[] Coalesce(byte[] orig, byte[] val_if_not_blank) {return Bry_.Len_eq_0(orig) ? val_if_not_blank : orig;} - public static byte Get_at_end_or_fail(byte[] bry) { - if (bry == null) throw Err_.new_wo_type("bry is null"); - int bry_len = bry.length; - if (bry_len == 0) throw Err_.new_wo_type("bry has 0 len"); - return bry[bry_len - 1]; + public static byte[] Copy(byte[] src) { + int src_len = src.length; + byte[] trg = new byte[src_len]; + for (int i = 0; i < src_len; ++i) + trg[i] = src[i]; + return trg; } - public static int While_fwd(byte[] src, byte while_byte, int bgn, int end) { - for (int i = bgn; i < end; i++) - if (src[i] != while_byte) return i; - return end; - } - public static byte[][] Ary_add(byte[][] lhs, byte[][] rhs) { - int lhs_len = lhs.length, rhs_len = rhs.length; - if (lhs_len == 0) return rhs; - else if (rhs_len == 0) return lhs; - else { - byte[][] rv = new byte[lhs_len + rhs_len][]; - for (int i = 0; i < lhs_len; i++) - rv[i] = lhs[i]; - for (int i = 0; i < rhs_len; i++) - rv[i + lhs_len] = rhs[i]; - return rv; - } - } - public static byte[][] Ary(byte[]... ary) {return ary;} - public static byte[][] Ary(String... ary) { - int ary_len = ary.length; - byte[][] rv = new byte[ary_len][]; - for (int i = 0; i < ary_len; i++) { - String itm = ary[i]; - rv[i] = itm == null ? null : Bry_.new_u8(itm); - } - return rv; - } - public static byte[][] Ary_obj(Object... ary) { - if (ary == null) return Bry_.Ary_empty; - int ary_len = ary.length; - byte[][] rv = new byte[ary_len][]; - for (int i = 0; i < ary_len; i++) { - Object itm = ary[i]; - rv[i] = itm == null ? null : Bry_.new_u8(Object_.Xto_str_strict_or_empty(itm)); - } - return rv; - } - public static boolean Ary_eq(byte[][] lhs, byte[][] rhs) { - int lhs_len = lhs.length; - int rhs_len = rhs.length; - if (lhs_len != rhs_len) return false; - for (int i = 0; i < lhs_len; ++i) - if (!Bry_.Eq(lhs[i], rhs[i])) return false; - return true; + public static byte[] Resize(byte[] src, int trg_len) {return Resize(src, 0, trg_len);} + public static byte[] Resize(byte[] src, int src_bgn, int trg_len) { + byte[] trg = new byte[trg_len]; + int src_len = src.length; if (src_len > trg_len) src_len = trg_len; // trg_len can be less than src_len + Copy_by_len(src, src_bgn, src_len, trg, 0); + return trg; } public static byte[] Repeat_space(int len) {return Repeat(Byte_ascii.Space, len);} public static byte[] Repeat(byte b, int len) { @@ -161,39 +119,35 @@ public class Bry_ { rv[i] = b; return rv; } - public static byte[] Copy(byte[] src) { + public static byte[] Add(byte[] src, byte b) { int src_len = src.length; - byte[] trg = new byte[src_len]; - for (int i = 0; i < src_len; i++) - trg[i] = src[i]; - return trg; - } - public static void Copy_by_pos(byte[] src, int src_bgn, int src_end, byte[] trg, int trg_bgn) { - int trg_adj = trg_bgn - src_bgn; - for (int i = src_bgn; i < src_end; i++) - trg[i + trg_adj] = src[i]; - } - public static void Copy_by_len(byte[] src, int src_bgn, int src_len, byte[] trg, int trg_bgn) { - for (int i = 0; i < src_len; i++) - trg[i + trg_bgn] = src[i + src_bgn]; - } - public static byte[] Replace_one(byte[] src, byte[] find, byte[] repl) { - int src_len = src.length; - int findPos = Bry_finder.Find(src, find, 0, src_len, true); if (findPos == Bry_.NotFound) return src; - int findLen = find.length, replLen = repl.length; - int rvLen = src_len + replLen - findLen; - byte[] rv = new byte[rvLen]; - Copy_by_len(src , 0 , findPos , rv, 0 ); - Copy_by_len(repl, 0 , replLen , rv, findPos ); - Copy_by_len(src , findPos + findLen , src_len - findPos - findLen , rv, findPos + replLen); + byte[] rv = new byte[src_len + 1]; + Copy_by_pos(src, 0, src_len, rv, 0); + rv[src_len] = b; return rv; } - public static void Replace_all_direct(byte[] src, byte find, byte repl) {Replace_all_direct(src, find, repl, 0, src.length);} - public static void Replace_all_direct(byte[] src, byte find, byte repl, int bgn, int end) { - for (int i = bgn; i < end; i++) { - byte b = src[i]; - if (b == find) src[i] = repl; + public static byte[] Add(byte b, byte[] src) { + int src_len = src.length; + byte[] rv = new byte[src_len + 1]; + Copy_by_pos(src, 0, src_len, rv, 1); + rv[0] = b; + return rv; + } + public static byte[] Add(byte[]... all) { + int all_len = all.length, rv_len = 0; + for (int i = 0; i < all_len; ++i) { + byte[] cur = all[i]; if (cur == null) continue; + rv_len += cur.length; } + byte[] rv = new byte[rv_len]; + int rv_idx = 0; + for (int i = 0; i < all_len; ++i) { + byte[] cur = all[i]; if (cur == null) continue; + int cur_len = cur.length; + for (int j = 0; j < cur_len; ++j) + rv[rv_idx++] = cur[j]; + } + return rv; } public static byte[] Add_w_dlm(byte[] dlm, byte[]... ary) { int ary_len = ary.length; @@ -242,39 +196,71 @@ public class Bry_ { } return rv; } - public static byte[] Add(byte[] ary, byte b) { - int ary_len = ary.length; - byte[] rv = new byte[ary_len + 1]; - for (int i = 0; i < ary_len; i++) - rv[i] = ary[i]; - rv[ary_len] = b; - return rv; + public static int Len(byte[] v) {return v == null ? 0 : v.length;} + public static boolean Len_gt_0(byte[] v) {return v != null && v.length > 0;} + public static boolean Len_eq_0(byte[] v) {return v == null || v.length == 0;} + public static byte Get_at_end(byte[] bry) {return bry[bry.length - 1];} // don't bother checking for errors; depend on error trace + public static boolean Has_at(byte[] src, int src_len, int pos, byte b) {return (pos < src_len) && (src[pos] == b);} + public static boolean Has(byte[] src, byte[] lkp) {return Bry_find_.Find_fwd(src, lkp) != Bry_find_.Not_found;} + public static boolean Has(byte[] src, byte lkp) { + if (src == null) return false; + int len = src.length; + for (int i = 0; i < len; i++) + if (src[i] == lkp) return true; + return false; } - public static byte[] Add(byte b, byte[] ary) { - int ary_len = ary.length + 1; - byte[] rv = new byte[ary_len]; - for (int i = 1; i < ary_len; i++) - rv[i] = ary[i - 1]; - rv[0] = b; - return rv; - } - public static byte[] Add(byte[]... all) { - int all_len = all.length, rv_len = 0; - for (int i = 0; i < all_len; i++) { - byte[] cur = all[i]; if (all[i] == null) continue; - rv_len += cur.length; + public static boolean Has_at_bgn(byte[] src, byte[] lkp) {return Has_at_bgn(src, lkp, 0, src.length);} + public static boolean Has_at_bgn(byte[] src, byte[] lkp, int src_bgn, int src_end) { + int lkp_len = lkp.length; + if (lkp_len + src_bgn > src_end) return false; // lkp is longer than src + for (int i = 0; i < lkp_len; i++) { + if (lkp[i] != src[i + src_bgn]) return false; } - byte[] rv = new byte[rv_len]; - int rv_idx = 0; - for (int i = 0; i < all_len; i++) { - byte[] cur = all[i]; if (all[i] == null) continue; - int cur_len = cur.length; - for (int j = 0; j < cur_len; j++) - rv[rv_idx++] = cur[j]; + return true; + } + public static boolean Has_at_end(byte[] src, byte[] lkp) {int src_len = src.length; return Has_at_end(src, lkp, src_len - lkp.length, src_len);} + public static boolean Has_at_end(byte[] src, byte[] lkp, int src_bgn, int src_end) { + int lkp_len = lkp.length; + if (src_bgn < 0) return false; + int pos = src_end - lkp_len; if (pos < src_bgn) return false; // lkp is longer than src + for (int i = 0; i < lkp_len; i++) { + if (lkp[i] != src[i + pos]) return false; } + return true; + } + public static boolean Has_at_bgn(byte[] src, byte lkp, int src_bgn) {return src_bgn < src.length ? src[src_bgn] == lkp : false;} + public static void Set(byte[] src, int bgn, int end, byte[] repl) { + int repl_len = repl.length; + for (int i = 0; i < repl_len; i++) + src[i + bgn] = repl[i]; + } + public static void Copy_by_pos(byte[] src, int src_bgn, int src_end, byte[] trg, int trg_bgn) { + int trg_adj = trg_bgn - src_bgn; + for (int i = src_bgn; i < src_end; i++) + trg[i + trg_adj] = src[i]; + } + private static void Copy_by_len(byte[] src, int src_bgn, int src_len, byte[] trg, int trg_bgn) { + for (int i = 0; i < src_len; i++) + trg[i + trg_bgn] = src[i + src_bgn]; + } + public static byte[] Replace_one(byte[] src, byte[] find, byte[] repl) { + int src_len = src.length; + int findPos = Bry_find_.Find(src, find, 0, src_len, true); if (findPos == Bry_.NotFound) return src; + int findLen = find.length, replLen = repl.length; + int rvLen = src_len + replLen - findLen; + byte[] rv = new byte[rvLen]; + Copy_by_len(src , 0 , findPos , rv, 0 ); + Copy_by_len(repl, 0 , replLen , rv, findPos ); + Copy_by_len(src , findPos + findLen , src_len - findPos - findLen , rv, findPos + replLen); return rv; } - public static int LastIdx(byte[] src) {return src.length - 1;} + public static void Replace_all_direct(byte[] src, byte find, byte repl) {Replace_all_direct(src, find, repl, 0, src.length);} + public static void Replace_all_direct(byte[] src, byte find, byte repl, int bgn, int end) { + for (int i = bgn; i < end; i++) { + byte b = src[i]; + if (b == find) src[i] = repl; + } + } public static byte[] Limit(byte[] src, int len) { if (src == null) return null; int src_len = src.length; @@ -314,20 +300,46 @@ public class Bry_ { return Mid(src, bgn, src.length); } public static byte[] Mid(byte[] src, int bgn, int end) { - try { - int len = end - bgn; if (len == 0) return Bry_.Empty; - byte[] rv = new byte[len]; - for (int i = bgn; i < end; i++) - rv[i - bgn] = src[i]; - return rv; - } catch (Exception e) { - String msg = ""; - if (src == null) msg = "src is null"; - else if (bgn < 0 || bgn > src.length) msg = "invalid bgn"; - else if (end < 0 || end > src.length) msg = "invalid end"; - else if (end < bgn) msg = "end < bgn"; - throw Err_.new_exc(e, "core", msg, "bgn", bgn, "end", end, "src", src == null ? "" : String_.new_u8_by_len(src, bgn, 32)); + int len = end - bgn; if (len == 0) return Bry_.Empty; + byte[] rv = new byte[len]; + for (int i = bgn; i < end; i++) + rv[i - bgn] = src[i]; + return rv; + } + public static byte[] Mid_w_trim(byte[] src, int bgn, int end) { + int len = end - bgn; if (len == 0) return Bry_.Empty; + int actl_bgn = bgn, actl_end = end; + // trim at bgn + boolean chars_seen = false; + for (int i = bgn; i < end; ++i) { + switch (src[i]) { + case Byte_ascii.Space: case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: + break; + default: + chars_seen = true; + actl_bgn = i; + i = end; + break; + } } + if (!chars_seen) return Bry_.Empty; // all ws + // trim at end + for (int i = end - 1; i >= actl_bgn; --i) { + switch (src[i]) { + case Byte_ascii.Space: case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: + break; + default: + actl_end = i + 1; + i = -1; + break; + } + } + // extract mid + len = actl_end - actl_bgn; if (len == 0) return Bry_.Empty; + byte[] rv = new byte[len]; + for (int i = actl_bgn; i < actl_end; ++i) + rv[i - actl_bgn] = src[i]; + return rv; } public static byte[] mask_(int len, byte... itms) { byte[] rv = new byte[len]; @@ -380,91 +392,49 @@ public class Bry_ { } return trimmed ? Bry_.Mid(v, 0, pos + 1) : v; } - public static boolean Has(byte[] src, byte[] lkp) {return Bry_finder.Find_fwd(src, lkp) != Bry_finder.Not_found;} - public static boolean Has(byte[] src, byte lkp) { - if (src == null) return false; - int len = src.length; - for (int i = 0; i < len; i++) - if (src[i] == lkp) return true; - return false; + public static int Compare(byte[] lhs, byte[] rhs) { + if (lhs == null) return CompareAble_.More; + else if (rhs == null) return CompareAble_.Less; + else return Compare(lhs, 0, lhs.length, rhs, 0, rhs.length); } - public static boolean Has_at_end(byte[] src, byte[] lkp) {int src_len = src.length; return Has_at_end(src, lkp, src_len - lkp.length, src_len);} - public static boolean Has_at_end(byte[] src, byte[] lkp, int src_bgn, int src_end) { - int lkp_len = lkp.length; + public static int Compare(byte[] lhs, int lhs_bgn, int lhs_end, byte[] rhs, int rhs_bgn, int rhs_end) { + int lhs_len = lhs_end - lhs_bgn, rhs_len = rhs_end - rhs_bgn; + int min = lhs_len < rhs_len ? lhs_len : rhs_len; + int rv = CompareAble_.Same; + for (int i = 0; i < min; i++) { + rv = (lhs[i + lhs_bgn] & 0xff) - (rhs[i + rhs_bgn] & 0xff); // PATCH.JAVA:need to convert to unsigned byte + if (rv != CompareAble_.Same) return rv > CompareAble_.Same ? CompareAble_.More : CompareAble_.Less; // NOTE: changed from if (rv != CompareAble_.Same) return rv; DATE:2013-04-25 + } + return Int_.Compare(lhs_len, rhs_len); // lhs and rhs share same beginning bytes; return len comparisons + } + public static boolean Eq(byte[] src, byte[] val) {return Eq(src, 0, src == null ? 0 : src.length, val);} + public static boolean Eq(byte[] src, int src_bgn, int src_end, byte[] val) { + if (src == null && val == null) return true; + else if (src == null || val == null) return false; if (src_bgn < 0) return false; - int pos = src_end - lkp_len; if (pos < src_bgn) return false; // lkp is longer than src - for (int i = 0; i < lkp_len; i++) { - if (lkp[i] != src[i + pos]) return false; + int val_len = val.length; + if (val_len != src_end - src_bgn) return false; + int src_len = src.length; + for (int i = 0; i < val_len; i++) { + int src_pos = i + src_bgn; + if (src_pos == src_len) return false; + if (val[i] != src[src_pos]) return false; } return true; } - public static boolean Has_at_bgn(byte[] src, byte lkp, int src_bgn) { - return src_bgn < src.length ? src[src_bgn] == lkp : false; - } - public static boolean Has_at_bgn(byte[] src, byte[] lkp) {return Has_at_bgn(src, lkp, 0, src.length);} - public static boolean Has_at_bgn(byte[] src, byte[] lkp, int src_bgn, int src_end) { - int lkp_len = lkp.length; - if (lkp_len + src_bgn > src_end) return false; // lkp is longer than src - for (int i = 0; i < lkp_len; i++) { - if (lkp[i] != src[i + src_bgn]) return false; + public static boolean Eq_ci_a7(byte[] lhs, byte[] rhs, int rhs_bgn, int rhs_end) { + if (lhs == null && rhs == null) return true; + else if (lhs == null || rhs == null) return false; + int lhs_len = lhs.length; + int rhs_len = rhs_end - rhs_bgn; + if (lhs_len != rhs_len) return false; + for (int i = 0; i < lhs_len; i++) { + byte lhs_b = lhs[i]; if (lhs_b > 64 && lhs_b < 91) lhs_b += 32; // lowercase + byte rhs_b = rhs[i + rhs_bgn]; if (rhs_b > 64 && rhs_b < 91) rhs_b += 32; // lowercase + if (lhs_b != rhs_b) return false; } return true; } - public static int Skip_fwd(byte[] src, int src_bgn, byte skip) { - int src_len = src.length; - for (int i = src_bgn; i < src_len; i++) { - byte b = src[i]; - if (b != skip) return i; - } - return 0; - } - public static int Skip_bwd(byte[] src, int src_bgn, byte skip) { - for (int i = src_bgn; i > -1; i--) { - byte b = src[i]; - if (b != skip) return i; - } - return src.length; - } - public static int Skip_fwd_nl(byte[] src, int src_bgn) { - int src_len = src.length; - for (int i = src_bgn; i < src_len; i++) { - byte b = src[i]; - switch (b) { - case Byte_ascii.Nl: case Byte_ascii.Cr: - break; - default: - return i; - } - } - return 0; - } - public static int Skip_bwd_nl(byte[] src, int src_bgn) { - for (int i = src_bgn; i > -1; i--) { - byte b = src[i]; - switch (b) { - case Byte_ascii.Nl: case Byte_ascii.Cr: - break; - default: - return i; - } - } - return src.length; - } - public static byte[] Resize_manual(byte[] src, int rvLen) { - byte[] rv = new byte[rvLen]; - int src_len = src.length; - if (src_len > rvLen) src_len = rvLen; // resizing smaller; only copy as many elements as in rvLen - for (int i = 0; i < src_len; i++) - rv[i] = src[i]; - return rv; - } - public static byte[] Resize(byte[] src, int trgLen) {return Resize(src, 0, trgLen);} - public static byte[] Resize(byte[] src, int src_bgn, int trgLen) { - byte[] trg = new byte[trgLen]; - int src_len = src.length > trgLen ? trgLen : src.length; // trgLen can either expand or shrink - Copy_by_len(src, src_bgn, src_len, trg, 0); - return trg; - } public static boolean Match(byte[] src, byte[] find) {return Match(src, 0, src.length, find, 0, find.length);} public static boolean Match(byte[] src, int src_bgn, byte[] find) {return Match(src, src_bgn, src.length, find, 0, find.length);} public static boolean Match(byte[] src, int src_bgn, int src_end, byte[] find) {return Match(src, src_bgn, src_end, find, 0, find.length);} @@ -491,65 +461,6 @@ public class Bry_ { } return true; } - public static int Compare(byte[] lhs, byte[] rhs) { - if (lhs == null) return CompareAble_.More; - else if (rhs == null) return CompareAble_.Less; - else return Compare(lhs, 0, lhs.length, rhs, 0, rhs.length); - } - public static int Compare(byte[] lhs, int lhs_bgn, int lhs_end, byte[] rhs, int rhs_bgn, int rhs_end) { - int lhs_len = lhs_end - lhs_bgn, rhs_len = rhs_end - rhs_bgn; - int min = lhs_len < rhs_len ? lhs_len : rhs_len; - int rv = CompareAble_.Same; - for (int i = 0; i < min; i++) { - rv = (lhs[i + lhs_bgn] & 0xff) - (rhs[i + rhs_bgn] & 0xff); // PATCH.JAVA:need to convert to unsigned byte - if (rv != CompareAble_.Same) return rv > CompareAble_.Same ? CompareAble_.More : CompareAble_.Less; // NOTE: changed from if (rv != CompareAble_.Same) return rv; DATE:2013-04-25 - } - return Int_.Compare(lhs_len, rhs_len); // lhs and rhs share same beginning bytes; return len comparisons - } - public static int Len(byte[] v) {return v == null ? 0 : v.length;} - public static boolean Len_gt_0(byte[] v) {return v != null && v.length > 0;} - public static boolean Len_eq_0(byte[] v) {return v == null || v.length == 0;} - public static void Set(byte[] src, int bgn, int end, byte[] repl) { - int repl_len = repl.length; - for (int i = 0; i < repl_len; i++) - src[i + bgn] = repl[i]; - } - public static boolean Eq_itm(byte[] src, int src_len, int pos, byte chk) { - return pos < src_len - && src[pos] == chk; - } - public static boolean Eq(byte[] lhs, byte[] rhs) { - if (lhs == null && rhs == null) return true; - else if (lhs == null || rhs == null) return false; - int lhs_len = lhs.length; - if (lhs_len != rhs.length) return false; - for (int i = 0; i < lhs_len; i++) // NOTE: lhs_len == rhsLen - if (lhs[i] != rhs[i]) return false; - return true; - } - public static boolean Eq(byte[] lhs, byte[] rhs, int rhs_bgn, int rhs_end) { - if (lhs == null && rhs == null) return true; - else if (lhs == null || rhs == null) return false; - int lhs_len = lhs.length; - int rhs_len = rhs_end - rhs_bgn; - if (lhs_len != rhs_len) return false; - for (int i = 0; i < lhs_len; i++) - if (lhs[i] != rhs[i + rhs_bgn]) return false; - return true; - } - public static boolean Eq_ci_a7(byte[] lhs, byte[] rhs, int rhs_bgn, int rhs_end) { - if (lhs == null && rhs == null) return true; - else if (lhs == null || rhs == null) return false; - int lhs_len = lhs.length; - int rhs_len = rhs_end - rhs_bgn; - if (lhs_len != rhs_len) return false; - for (int i = 0; i < lhs_len; i++) { - byte lhs_b = lhs[i]; if (lhs_b > 64 && lhs_b < 91) lhs_b += 32; // lowercase - byte rhs_b = rhs[i + rhs_bgn]; if (rhs_b > 64 && rhs_b < 91) rhs_b += 32; // lowercase - if (lhs_b != rhs_b) return false; - } - return true; - } public static int To_int_by_a7(byte[] v) { int v_len = v.length; int mod = 8 * (v_len - 1); @@ -745,6 +656,47 @@ public class Bry_ { public static double To_double_or(byte[] bry, double or) {return Double_.parse_or(String_.new_u8(bry, 0, bry.length), or);} public static double To_double_or(byte[] ary, int bgn, int end, double or) {return Double_.parse_or(String_.new_u8(ary, bgn, end), or);} public static Decimal_adp To_decimal(byte[] ary, int bgn, int end) {return Decimal_adp_.parse(String_.new_u8(ary, bgn, end));} + public static byte[][] Ary_add(byte[][] lhs, byte[][] rhs) { + int lhs_len = lhs.length, rhs_len = rhs.length; + if (lhs_len == 0) return rhs; + else if (rhs_len == 0) return lhs; + else { + byte[][] rv = new byte[lhs_len + rhs_len][]; + for (int i = 0; i < lhs_len; i++) + rv[i] = lhs[i]; + for (int i = 0; i < rhs_len; i++) + rv[i + lhs_len] = rhs[i]; + return rv; + } + } + public static byte[][] Ary(byte[]... ary) {return ary;} + public static byte[][] Ary(String... ary) { + int ary_len = ary.length; + byte[][] rv = new byte[ary_len][]; + for (int i = 0; i < ary_len; i++) { + String itm = ary[i]; + rv[i] = itm == null ? null : Bry_.new_u8(itm); + } + return rv; + } + public static byte[][] Ary_obj(Object... ary) { + if (ary == null) return Bry_.Ary_empty; + int ary_len = ary.length; + byte[][] rv = new byte[ary_len][]; + for (int i = 0; i < ary_len; i++) { + Object itm = ary[i]; + rv[i] = itm == null ? null : Bry_.new_u8(Object_.Xto_str_strict_or_empty(itm)); + } + return rv; + } + public static boolean Ary_eq(byte[][] lhs, byte[][] rhs) { + int lhs_len = lhs.length; + int rhs_len = rhs.length; + if (lhs_len != rhs_len) return false; + for (int i = 0; i < lhs_len; ++i) + if (!Bry_.Eq(lhs[i], rhs[i])) return false; + return true; + } public static final byte Dlm_fld = (byte)'|', Dlm_row = (byte)'\n', Dlm_quote = (byte)'"', Dlm_null = 0, Ascii_zero = 48; public static final String Fmt_csvDte = "yyyyMMdd HHmmss.fff"; public static DateAdp ReadCsvDte(byte[] ary, Int_obj_ref posRef, byte lkp) {// ASSUME: fmt = yyyyMMdd HHmmss.fff @@ -767,7 +719,7 @@ public class Bry_ { f += (ary[bgn + 16] - Ascii_zero) * 100; f += (ary[bgn + 17] - Ascii_zero) * 10; f += (ary[bgn + 18] - Ascii_zero); - if (ary[bgn + 19] != lkp) throw Err_.new_wo_type("csv date is invalid", "txt", String_.new_u8_by_len(ary, bgn, 20)); + if (ary[bgn + 19] != lkp) throw Err_.new_wo_type("csv date is invalid", "txt", String_.new_u8__by_len(ary, bgn, 20)); posRef.Val_add(19 + 1); // +1=lkp.len return DateAdp_.new_(y, M, d, H, m, s, f); } @@ -780,10 +732,10 @@ public class Bry_ { int pos = bgn + 1; // +1 to skip quote if (make) bb = Bry_bfr.new_(16); while (true) { - if (pos == aryLen) throw Err_.new_wo_type("endOfAry reached, but no quote found", "txt", String_.new_u8_by_len(ary, bgn, pos)); + if (pos == aryLen) throw Err_.new_wo_type("endOfAry reached, but no quote found", "txt", String_.new_u8__by_len(ary, bgn, pos)); byte b = ary[pos]; if (b == Dlm_quote) { - if (pos == aryLen - 1) throw Err_.new_wo_type("endOfAry reached, quote found but lkp not", "txt", String_.new_u8_by_len(ary, bgn, pos)); + if (pos == aryLen - 1) throw Err_.new_wo_type("endOfAry reached, quote found but lkp not", "txt", String_.new_u8__by_len(ary, bgn, pos)); byte next = ary[pos + 1]; if (next == Dlm_quote) { // byte followed by quote if (make) bb.Add_byte(b); @@ -793,7 +745,7 @@ public class Bry_ { posRef.Val_(pos + 2); // 1=endQuote;1=lkp; return make ? bb.Xto_bry() : Bry_.Empty; } - else throw Err_.new_wo_type("quote found, but not doubled", "txt", String_.new_u8_by_len(ary, bgn, pos + 1)); + else throw Err_.new_wo_type("quote found, but not doubled", "txt", String_.new_u8__by_len(ary, bgn, pos + 1)); } else { if (make) bb.Add_byte(b); @@ -808,12 +760,12 @@ public class Bry_ { return make ? Bry_.Mid(ary, bgn, i) : Bry_.Empty; } } - throw Err_.new_wo_type("lkp failed", "lkp", (char)lkp, "txt", String_.new_u8_by_len(ary, bgn, aryLen)); + throw Err_.new_wo_type("lkp failed", "lkp", (char)lkp, "txt", String_.new_u8__by_len(ary, bgn, aryLen)); } } public static int ReadCsvInt(byte[] ary, Int_obj_ref posRef, byte lkp) { int bgn = posRef.Val(); - int pos = Bry_finder.Find_fwd(ary, lkp, bgn, ary.length); + int pos = Bry_find_.Find_fwd(ary, lkp, bgn, ary.length); if (pos == Bry_.NotFound) throw Err_.new_wo_type("lkp failed", "lkp", (char)lkp, "bgn", bgn); int rv = Bry_.To_int_or(ary, posRef.Val(), pos, -1); posRef.Val_(pos + 1); // +1 = lkp.Len @@ -821,7 +773,7 @@ public class Bry_ { } public static double ReadCsvDouble(byte[] ary, Int_obj_ref posRef, byte lkp) { int bgn = posRef.Val(); - int pos = Bry_finder.Find_fwd(ary, lkp, bgn, ary.length); + int pos = Bry_find_.Find_fwd(ary, lkp, bgn, ary.length); if (pos == Bry_.NotFound) throw Err_.new_wo_type("lkp failed", "lkp", (char)lkp, "bgn", bgn); double rv = Bry_.To_double(ary, posRef.Val(), pos); posRef.Val_(pos + 1); // +1 = lkp.Len @@ -829,32 +781,10 @@ public class Bry_ { } public static void ReadCsvNext(byte[] ary, Int_obj_ref posRef, byte lkp) { int bgn = posRef.Val(); - int pos = Bry_finder.Find_fwd(ary, lkp, bgn, ary.length); + int pos = Bry_find_.Find_fwd(ary, lkp, bgn, ary.length); posRef.Val_(pos + 1); // +1 = lkp.Len } public static byte Byte_NegSign = (byte)'-'; - public static byte[][] Split(byte[] src, byte dlm) {return Split(src, dlm, false);} - public static byte[][] Split(byte[] src, byte dlm, boolean trim) { - if (Bry_.Len_eq_0(src)) return Bry_.Ary_empty; - int src_len = src.length, src_pos = 0, fld_bgn = 0; - List_adp rv = List_adp_.new_(); - while (true) { - boolean last = src_pos == src_len; - byte b = last ? dlm : src[src_pos]; - if (b == dlm) { - if (last && (src_pos - fld_bgn == 0)) {} - else { - byte[] itm = Bry_.Mid(src, fld_bgn, src_pos); - if (trim) itm = Bry_.Trim(itm); - rv.Add(itm); - } - fld_bgn = src_pos + 1; - } - if (last) break; - ++src_pos; - } - return (byte[][])rv.To_ary(byte[].class); - } public static byte[] Replace_create(byte[] src, byte find, byte replace) { byte[] rv = Bry_.Copy(src); Replace_reuse(rv, find, replace); @@ -888,8 +818,8 @@ public class Bry_ { int bfr_bgn = pos; int replace_count = 0; while (pos < src_end) { - int find_pos = Bry_finder.Find_fwd(src, find, pos); - if (find_pos == Bry_finder.Not_found) break; + int find_pos = Bry_find_.Find_fwd(src, find, pos); + if (find_pos == Bry_find_.Not_found) break; dirty = true; bfr.Add_mid(src, bfr_bgn, find_pos); bfr.Add(repl); @@ -910,14 +840,14 @@ public class Bry_ { int pos = 0; while (true) { if (pos >= src_len) break; - int bgn_pos = Bry_finder.Find_fwd(src, bgn, pos); + int bgn_pos = Bry_find_.Find_fwd(src, bgn, pos); if (bgn_pos == Bry_.NotFound) { bfr.Add_mid(src, pos, src_len); break; } else { int bgn_rhs = bgn_pos + bgn_len; - int end_pos = replace_all ? bgn_rhs : Bry_finder.Find_fwd(src, end, bgn_rhs); + int end_pos = replace_all ? bgn_rhs : Bry_find_.Find_fwd(src, end, bgn_rhs); if (end_pos == Bry_.NotFound) { bfr.Add_mid(src, pos, src_len); break; @@ -942,48 +872,6 @@ public class Bry_ { } return 0; } - public static byte[][] Split(byte[] src, byte[] dlm) { - if (Bry_.Len_eq_0(src)) return Bry_.Ary_empty; - int cur_pos = 0, src_len = src.length, dlm_len = dlm.length; - List_adp rv = List_adp_.new_(); - while (true) { - int find_pos = Bry_finder.Find_fwd(src, dlm, cur_pos); - if (find_pos == Bry_.NotFound) { - if (cur_pos == src_len) break; // dlm is last sequence in src; do not create empty itm - find_pos = src_len; - } - rv.Add(Bry_.Mid(src, cur_pos, find_pos)); - if (find_pos == src_len) break; - cur_pos = find_pos + dlm_len; - } - return (byte[][])rv.To_ary(byte[].class); - } - public static byte[][] Split_lines(byte[] src) { - if (Bry_.Len_eq_0(src)) return Bry_.Ary_empty; - int src_len = src.length, src_pos = 0, fld_bgn = 0; - List_adp rv = List_adp_.new_(); - while (true) { - boolean last = src_pos == src_len; - byte b = last ? Byte_ascii.Nl : src[src_pos]; - int nxt_bgn = src_pos + 1; - switch (b) { - case Byte_ascii.Cr: - case Byte_ascii.Nl: - if ( b == Byte_ascii.Cr // check for crlf - && nxt_bgn < src_len && src[nxt_bgn] == Byte_ascii.Nl) { - ++nxt_bgn; - } - if (last && (src_pos - fld_bgn == 0)) {} // ignore trailing itms - else - rv.Add(Bry_.Mid(src, fld_bgn, src_pos)); - fld_bgn = nxt_bgn; - break; - } - if (last) break; - src_pos = nxt_bgn; - } - return (byte[][])rv.To_ary(byte[].class); - } public static byte[] Increment_last(byte[] ary) {return Increment_last(ary, ary.length - 1);} public static byte[] Increment_last(byte[] ary, int end_idx) { for (int i = end_idx; i > -1; i--) { @@ -1033,8 +921,4 @@ public class Bry_ { return rv; } public static byte[] Null_if_empty(byte[] v) {return Len_eq_0(v) ? null : v;} - public static byte Get_at_end(byte[] v) { - int v_len = v.length; - return v_len == 0 ? Byte_ascii.Null : v[v_len - 1]; - } } diff --git a/100_core/src_130_brys/gplx/Bry__tst.java b/100_core/src_130_brys/gplx/Bry__tst.java index 1fd04c4bd..4f93eceab 100644 --- a/100_core/src_130_brys/gplx/Bry__tst.java +++ b/100_core/src_130_brys/gplx/Bry__tst.java @@ -17,8 +17,37 @@ along with this program. If not, see . */ package gplx; import org.junit.*; import gplx.core.primitives.*; -import gplx.texts.*; public class Bry__tst { + private final Bry__fxt fxt = new Bry__fxt(); + @Test public void new_ascii_() { + fxt.Test_new_a7("a" , Bry_.new_ints(97)); // one + fxt.Test_new_a7("abc" , Bry_.new_ints(97, 98, 99)); // many + fxt.Test_new_a7("" , Bry_.Empty); // none + fxt.Test_new_a7("¢€𤭢" , Bry_.new_ints(63, 63, 63, 63)); // non-ascii -> ? + } + @Test public void new_u8() { + fxt.Test_new_u8("a" , Bry_.new_ints(97)); // one + fxt.Test_new_u8("abc" , Bry_.new_ints(97, 98, 99)); // many + fxt.Test_new_u8("¢" , Bry_.new_ints(194, 162)); // bry_len=2; cent + fxt.Test_new_u8("€" , Bry_.new_ints(226, 130, 172)); // bry_len=3; euro + fxt.Test_new_u8("𤭢" , Bry_.new_ints(240, 164, 173, 162)); // bry_len=3; example from en.w:UTF-8 + } + @Test public void Add__bry_plus_byte() { + fxt.Test_add("a" , Byte_ascii.Pipe , "a|"); // basic + fxt.Test_add("" , Byte_ascii.Pipe , "|"); // empty String + } + @Test public void Add__byte_plus_bry() { + fxt.Test_add(Byte_ascii.Pipe , "a" , "|a"); // basic + fxt.Test_add(Byte_ascii.Pipe , "" , "|"); // empty String + } + @Test public void Add_w_dlm() { + fxt.Test_add_w_dlm(Byte_ascii.Pipe, String_.Ary("a", "b", "c") , "a|b|c"); // basic + fxt.Test_add_w_dlm(Byte_ascii.Pipe, String_.Ary("a") , "a"); // one item + fxt.Test_add_w_dlm(Byte_ascii.Pipe, String_.Ary("a", null, "c") , "a||c"); // null + } + @Test public void Add_w_dlm_bry() { + fxt.Test_add_w_dlm("<>", String_.Ary("a","b","c"), "a<>b<>c"); + } @Test public void MidByPos() { tst_MidByPos("abcba", 0, 1, "a"); tst_MidByPos("abcba", 0, 2, "ab"); @@ -176,16 +205,6 @@ public class Bry__tst { return rv; } void tst_IncrementLast(byte[] ary, byte[] expd) {Tfds.Eq_ary(expd, Bry_.Increment_last(Bry_.Copy(ary)));} - @Test public void Split() { - tst_Split("a|b|c" , Byte_ascii.Pipe, "a", "b", "c"); - tst_Split("a|b|c|" , Byte_ascii.Pipe, "a", "b", "c"); - tst_Split("|" , Byte_ascii.Pipe, ""); - tst_Split("" , Byte_ascii.Pipe); - } - void tst_Split(String raw_str, byte dlm, String... expd) { - byte[][] actl_bry = Bry_.Split(Bry_.new_a7(raw_str), dlm); - Tfds.Eq_ary_str(expd, String_.Ary(actl_bry)); - } @Test public void Replace_between() { tst_Replace_between("a[0]b" , "[", "]", "0", "a0b"); tst_Replace_between("a[0]b[1]c" , "[", "]", "0", "a0b0c"); @@ -209,7 +228,7 @@ public class Bry__tst { Split_bry_tst("a|" , "|" , String_.Ary("a")); } void Split_bry_tst(String src, String dlm, String[] expd) { - String[] actl = String_.Ary(Bry_.Split(Bry_.new_a7(src), Bry_.new_a7(dlm))); + String[] actl = String_.Ary(Bry_split_.Split(Bry_.new_a7(src), Bry_.new_a7(dlm))); Tfds.Eq_ary_str(expd, actl); } @Test public void Split_lines() { @@ -219,7 +238,7 @@ public class Bry__tst { Tst_split_lines("a\rb" , "a", "b"); // cr only } void Tst_split_lines(String src, String... expd) { - Tfds.Eq_ary(expd, New_ary(Bry_.Split_lines(Bry_.new_a7(src)))); + Tfds.Eq_ary(expd, New_ary(Bry_split_.Split_lines(Bry_.new_a7(src)))); } String[] New_ary(byte[][] lines) { int len = lines.length; @@ -239,33 +258,18 @@ public class Bry__tst { void Tst_match_bwd_any(String src, int src_end, int src_bgn, String find, boolean expd) { Tfds.Eq(expd, Bry_.Match_bwd_any(Bry_.new_a7(src), src_end, src_bgn, Bry_.new_a7(find))); } - private Bry__fxt fxt = new Bry__fxt(); @Test public void Trim_end() { fxt.Test_trim_end("a " , Byte_ascii.Space, "a"); // trim.one fxt.Test_trim_end("a " , Byte_ascii.Space, "a"); // trim.many fxt.Test_trim_end("a" , Byte_ascii.Space, "a"); // trim.none fxt.Test_trim_end("" , Byte_ascii.Space, ""); // empty } - @Test public void new_ascii_() { - fxt.Test_new_a7("a" , Bry_.ints_(97)); // one - fxt.Test_new_a7("abc" , Bry_.ints_(97, 98, 99)); // many - fxt.Test_new_a7("" , Bry_.Empty); // none - fxt.Test_new_a7("¢€𤭢" , Bry_.ints_(63, 63, 63, 63)); // non-ascii -> ? - } - @Test public void new_u8() { - fxt.Test_new_u8("a" , Bry_.ints_(97)); // one - fxt.Test_new_u8("abc" , Bry_.ints_(97, 98, 99)); // many - fxt.Test_new_u8("¢" , Bry_.ints_(194, 162)); // bry_len=2; cent - fxt.Test_new_u8("€" , Bry_.ints_(226, 130, 172)); // bry_len=3; euro - fxt.Test_new_u8("𤭢" , Bry_.ints_(240, 164, 173, 162)); // bry_len=3; example from en.w:UTF-8 - } - @Test public void Add_w_dlm() { - fxt.Test_add_w_dlm(Byte_ascii.Pipe, String_.Ary("a", "b", "c") , "a|b|c"); // basic - fxt.Test_add_w_dlm(Byte_ascii.Pipe, String_.Ary("a") , "a"); // one item - fxt.Test_add_w_dlm(Byte_ascii.Pipe, String_.Ary("a", null, "c") , "a||c"); // null - } - @Test public void Add_w_dlm_bry() { - fxt.Test_add_w_dlm("<>", String_.Ary("a","b","c"), "a<>b<>c"); + @Test public void Mid_w_trim() { + fxt.Test_Mid_w_trim("abc", "abc"); // no ws + fxt.Test_Mid_w_trim(" a b c ", "a b c"); // ws at bgn and end + fxt.Test_Mid_w_trim("\r\n\t a\r\n\t b \r\n\t ", "a\r\n\t b"); // space at bgn and end + fxt.Test_Mid_w_trim("", ""); // handle 0 bytes + fxt.Test_Mid_w_trim(" ", ""); // handle all ws } } class Bry__fxt { @@ -274,7 +278,10 @@ class Bry__fxt { Tfds.Eq(expd, String_.new_u8(Bry_.Trim_end(raw_bry, trim, raw_bry.length))); } public void Test_new_u8(String raw, byte[] expd) {Tfds.Eq_ary(expd, Bry_.new_u8(raw));} - public void Test_new_a7(String raw, byte[] expd) {Tfds.Eq_ary(expd, Bry_.new_a7(raw));} + public void Test_new_a7(String raw, byte[] expd) {Tfds.Eq_ary(expd, Bry_.new_a7(raw));} + public void Test_add(String s, byte b, String expd) {Tfds.Eq_str(expd, String_.new_u8(Bry_.Add(Bry_.new_u8(s), b)));} + public void Test_add(byte b, String s, String expd) {Tfds.Eq_str(expd, String_.new_u8(Bry_.Add(b, Bry_.new_u8(s))));} public void Test_add_w_dlm(String dlm, String[] itms, String expd) {Tfds.Eq(expd, String_.new_u8(Bry_.Add_w_dlm(Bry_.new_u8(dlm), Bry_.Ary(itms))));} public void Test_add_w_dlm(byte dlm, String[] itms, String expd) {Tfds.Eq(expd, String_.new_u8(Bry_.Add_w_dlm(dlm, Bry_.Ary(itms))));} + public void Test_Mid_w_trim(String src, String expd) {byte[] bry = Bry_.new_u8(src); Tfds.Eq(expd, String_.new_u8(Bry_.Mid_w_trim(bry, 0, bry.length)));} } diff --git a/100_core/src_130_brys/gplx/Bry_bfr.java b/100_core/src_130_brys/gplx/Bry_bfr.java index 36167ca99..dcf6ffaf0 100644 --- a/100_core/src_130_brys/gplx/Bry_bfr.java +++ b/100_core/src_130_brys/gplx/Bry_bfr.java @@ -89,7 +89,7 @@ public class Bry_bfr { } public Bry_bfr Add_mid(byte[] val, int bgn, int end) { int len = end - bgn; - if (len < 0) throw Err_.new_wo_type("negative len", "bgn", bgn, "end", end, "excerpt", String_.new_u8_by_len(val, bgn, bgn + 16)); // NOTE: check for invalid end < bgn, else difficult to debug errors later; DATE:2014-05-11 + if (len < 0) throw Err_.new_wo_type("negative len", "bgn", bgn, "end", end, "excerpt", String_.new_u8__by_len(val, bgn, bgn + 16)); // NOTE: check for invalid end < bgn, else difficult to debug errors later; DATE:2014-05-11 if (bfr_len + len > bfr_max) Resize((bfr_max + len) * 2); Bry_.Copy_by_pos(val, bgn, end, bfr, bfr_len); // Array_.Copy_to(val, bgn, bfr, bfr_len, len); @@ -183,7 +183,7 @@ public class Bry_bfr { } public Bry_bfr Add_u8_int(int val) { if (bfr_len + 4 > bfr_max) Resize((bfr_max + 4) * 2); - int utf8_len = gplx.intl.Utf16_.Encode_int(val, bfr, bfr_len); + int utf8_len = gplx.core.intls.Utf16_.Encode_int(val, bfr, bfr_len); bfr_len += utf8_len; return this; } @@ -282,9 +282,9 @@ public class Bry_bfr { public Bry_bfr Add_str_u8(String str) { try { int str_len = str.length(); - int bry_len = Bry_.new_u8_by_len(str, str_len); + int bry_len = Bry_.new_u8__by_len(str, str_len); if (bfr_len + bry_len > bfr_max) Resize((bfr_max + bry_len) * 2); - Bry_.new_u8_write(str, str_len, bfr, bfr_len); + Bry_.new_u8__write(str, str_len, bfr, bfr_len); bfr_len += bry_len; return this; } diff --git a/100_core/src_130_brys/gplx/Bry_finder.java b/100_core/src_130_brys/gplx/Bry_find_.java similarity index 76% rename from 100_core/src_130_brys/gplx/Bry_finder.java rename to 100_core/src_130_brys/gplx/Bry_find_.java index 66d80e1ed..ee186c990 100644 --- a/100_core/src_130_brys/gplx/Bry_finder.java +++ b/100_core/src_130_brys/gplx/Bry_find_.java @@ -16,14 +16,14 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx; -public class Bry_finder { +public class Bry_find_ { public static final int Not_found = -1; public static int Find_fwd(byte[] src, byte lkp) {return Find_fwd(src, lkp, 0, src.length);} public static int Find_fwd(byte[] src, byte lkp, int cur) {return Find_fwd(src, lkp, cur, src.length);} public static int Find_fwd(byte[] src, byte lkp, int cur, int end) { for (int i = cur; i < end; i++) if (src[i] == lkp) return i; - return Bry_finder.Not_found; + return Bry_find_.Not_found; } public static int Find_bwd(byte[] src, byte lkp) {return Find_bwd(src, lkp, src.length, 0);} public static int Find_bwd(byte[] src, byte lkp, int cur) {return Find_bwd(src, lkp, cur , 0);} @@ -32,29 +32,29 @@ public class Bry_finder { --end; for (int i = cur; i > end; i--) if (src[i] == lkp) return i; - return Bry_finder.Not_found; + return Bry_find_.Not_found; } public static int Move_fwd(byte[] src, byte lkp, int cur, int end) { int rv = Find_fwd(src, lkp, cur, src.length); - return rv == Bry_finder.Not_found ? rv : rv + 1; + return rv == Bry_find_.Not_found ? rv : rv + 1; } public static int Move_fwd(byte[] src, byte[] lkp, int cur) {return Move_fwd(src, lkp, cur, src.length);} public static int Move_fwd(byte[] src, byte[] lkp, int cur, int end) { int rv = Find_fwd(src, lkp, cur, src.length); - return rv == Bry_finder.Not_found ? rv : rv + lkp.length; + return rv == Bry_find_.Not_found ? rv : rv + lkp.length; } public static int Find_fwd(byte[] src, byte[] lkp) {return Find(src, lkp, 0 , src.length, true);} public static int Find_fwd(byte[] src, byte[] lkp, int cur) {return Find(src, lkp, cur , src.length, true);} public static int Find_fwd(byte[] src, byte[] lkp, int cur, int end) {return Find(src, lkp, cur , end, true);} public static int Find(byte[] src, byte[] lkp, int src_bgn, int src_end, boolean fwd) { - if (src_bgn < 0 || src.length == 0) return Bry_finder.Not_found; + if (src_bgn < 0 || src.length == 0) return Bry_find_.Not_found; int dif, lkp_len = lkp.length, lkp_bgn, lkp_end, src_end_chk; if (fwd) { - if (src_bgn > src_end) return Bry_finder.Not_found; + if (src_bgn > src_end) return Bry_find_.Not_found; dif = 1; lkp_bgn = 0; lkp_end = lkp_len; src_end_chk = src_end - CompareAble_.OffsetCompare; } else { - if (src_bgn < src_end) return Bry_finder.Not_found; + if (src_bgn < src_end) return Bry_find_.Not_found; dif = -1; lkp_bgn = lkp_len - 1; lkp_end = -1; src_end_chk = src.length - CompareAble_.OffsetCompare; // src_end_chk needed when going bwd, b/c lkp_len may be > 1 } while (src_bgn != src_end) { // while src is not done; @@ -70,11 +70,11 @@ public class Bry_finder { if (lkp_cur == lkp_end) return src_bgn; // lkp matches src; exit src_bgn += dif; } - return Bry_finder.Not_found; + return Bry_find_.Not_found; } public static int Find_bwd(byte[] src, byte[] lkp, int cur) {return Find_bwd(src, lkp, cur , 0);} public static int Find_bwd(byte[] src, byte[] lkp, int cur, int end) { - if (cur < 1) return Bry_finder.Not_found; + if (cur < 1) return Bry_find_.Not_found; --cur; // always subtract 1 from cur; allows passing in src_len or cur_pos without forcing caller to subtract - 1; DATE:2014-02-11 --end; int src_len = src.length; @@ -90,12 +90,12 @@ public class Bry_finder { } if (match) return i; } - return Bry_finder.Not_found; + return Bry_find_.Not_found; } public static int Find_bwd_last_ws(byte[] src, int cur) { - if (cur < 1) return Bry_finder.Not_found; + if (cur < 1) return Bry_find_.Not_found; --cur; - int rv = Bry_finder.Not_found; + int rv = Bry_find_.Not_found; for (int i = cur; i > -1; i--) { byte b = src[i]; switch (b) { @@ -117,12 +117,12 @@ public class Bry_finder { return i; } } - return Bry_finder.Not_found; + return Bry_find_.Not_found; } public static int Find_fwd_last_ws(byte[] src, int cur) { int end = src.length; - if (cur >= end) return Bry_finder.Not_found; - int rv = Bry_finder.Not_found; + if (cur >= end) return Bry_find_.Not_found; + int rv = Bry_find_.Not_found; for (int i = cur; i < end; i++) { byte b = src[i]; switch (b) { @@ -137,7 +137,7 @@ public class Bry_finder { return rv; } public static int Find_bwd_non_ws_or_not_found(byte[] src, int cur, int end) { // get pos of 1st char that is not ws; - if (cur >= src.length) return Bry_finder.Not_found; + if (cur >= src.length) return Bry_find_.Not_found; for (int i = cur; i >= end; i--) { byte b = src[i]; switch (b) { @@ -147,10 +147,10 @@ public class Bry_finder { return i; } } - return Bry_finder.Not_found; + return Bry_find_.Not_found; } public static int Find_bwd_non_ws_or_end(byte[] src, int cur, int end) { - if (cur >= src.length) return Bry_finder.Not_found; + if (cur >= src.length) return Bry_find_.Not_found; for (int i = cur; i >= end; i--) { byte b = src[i]; switch (b) { @@ -186,7 +186,7 @@ public class Bry_finder { } public static int Find_fwd_until_space_or_tab(byte[] src, int cur, int end) { while (true) { - if (cur == end) return Bry_finder.Not_found; + if (cur == end) return Bry_find_.Not_found; switch (src[cur]) { case Byte_ascii.Space: case Byte_ascii.Tab: return cur; @@ -198,7 +198,7 @@ public class Bry_finder { } public static int Find_fwd_until_ws(byte[] src, int cur, int end) { while (true) { - if (cur == end) return Bry_finder.Not_found; + if (cur == end) return Bry_find_.Not_found; switch (src[cur]) { case Byte_ascii.Space: case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: return cur; @@ -293,4 +293,28 @@ public class Bry_finder { } } } + public static int Find_bwd_while_alphanum(byte[] src, int cur) {return Find_bwd_while_alphanum(src, cur, -1);} + public static int Find_bwd_while_alphanum(byte[] src, int cur, int end) { + while (cur > end) { + switch (src[cur]) { + case Byte_ascii.Num_0: case Byte_ascii.Num_1: case Byte_ascii.Num_2: case Byte_ascii.Num_3: case Byte_ascii.Num_4: + case Byte_ascii.Num_5: case Byte_ascii.Num_6: case Byte_ascii.Num_7: case Byte_ascii.Num_8: case Byte_ascii.Num_9: + case Byte_ascii.Ltr_A: case Byte_ascii.Ltr_B: case Byte_ascii.Ltr_C: case Byte_ascii.Ltr_D: case Byte_ascii.Ltr_E: + case Byte_ascii.Ltr_F: case Byte_ascii.Ltr_G: case Byte_ascii.Ltr_H: case Byte_ascii.Ltr_I: case Byte_ascii.Ltr_J: + case Byte_ascii.Ltr_K: case Byte_ascii.Ltr_L: case Byte_ascii.Ltr_M: case Byte_ascii.Ltr_N: case Byte_ascii.Ltr_O: + case Byte_ascii.Ltr_P: case Byte_ascii.Ltr_Q: case Byte_ascii.Ltr_R: case Byte_ascii.Ltr_S: case Byte_ascii.Ltr_T: + case Byte_ascii.Ltr_U: case Byte_ascii.Ltr_V: case Byte_ascii.Ltr_W: case Byte_ascii.Ltr_X: case Byte_ascii.Ltr_Y: case Byte_ascii.Ltr_Z: + case Byte_ascii.Ltr_a: case Byte_ascii.Ltr_b: case Byte_ascii.Ltr_c: case Byte_ascii.Ltr_d: case Byte_ascii.Ltr_e: + case Byte_ascii.Ltr_f: case Byte_ascii.Ltr_g: case Byte_ascii.Ltr_h: case Byte_ascii.Ltr_i: case Byte_ascii.Ltr_j: + case Byte_ascii.Ltr_k: case Byte_ascii.Ltr_l: case Byte_ascii.Ltr_m: case Byte_ascii.Ltr_n: case Byte_ascii.Ltr_o: + case Byte_ascii.Ltr_p: case Byte_ascii.Ltr_q: case Byte_ascii.Ltr_r: case Byte_ascii.Ltr_s: case Byte_ascii.Ltr_t: + case Byte_ascii.Ltr_u: case Byte_ascii.Ltr_v: case Byte_ascii.Ltr_w: case Byte_ascii.Ltr_x: case Byte_ascii.Ltr_y: case Byte_ascii.Ltr_z: + --cur; + break; + default: + return cur; + } + } + return 0; // always return a valid index + } } diff --git a/100_core/src_130_brys/gplx/Bry_finder_tst.java b/100_core/src_130_brys/gplx/Bry_find__tst.java similarity index 82% rename from 100_core/src_130_brys/gplx/Bry_finder_tst.java rename to 100_core/src_130_brys/gplx/Bry_find__tst.java index 4707ede16..2b2455948 100644 --- a/100_core/src_130_brys/gplx/Bry_finder_tst.java +++ b/100_core/src_130_brys/gplx/Bry_find__tst.java @@ -17,9 +17,8 @@ along with this program. If not, see . */ package gplx; import org.junit.*; -import gplx.texts.*; -public class Bry_finder_tst { - private Bry_finder_fxt fxt = new Bry_finder_fxt(); +public class Bry_find__tst { + private Bry_find__fxt fxt = new Bry_find__fxt(); @Test public void Find_fwd() { fxt.Test_Find_fwd("abcba", "b", 0, 1); fxt.Test_Find_fwd("abcba", "z", 0, -1); @@ -61,18 +60,18 @@ public class Bry_finder_tst { fxt.Test_Trim_bwd_space_tab(" \t" , 0); } } -class Bry_finder_fxt { - public void Test_Find_fwd(String src, String lkp, int bgn, int expd) {Tfds.Eq(expd, Bry_finder.Find_fwd(Bry_.new_u8(src), Bry_.new_u8(lkp), bgn));} - public void Test_Find_bwd(String src, String lkp, int bgn, int expd) {Tfds.Eq(expd, Bry_finder.Find_bwd(Bry_.new_u8(src), Bry_.new_u8(lkp), bgn));} - public void Test_Find_bwd_1st_ws_tst(String src, int pos, int expd) {Tfds.Eq(expd, Bry_finder.Find_bwd_last_ws(Bry_.new_a7(src), pos));} +class Bry_find__fxt { + public void Test_Find_fwd(String src, String lkp, int bgn, int expd) {Tfds.Eq(expd, Bry_find_.Find_fwd(Bry_.new_u8(src), Bry_.new_u8(lkp), bgn));} + public void Test_Find_bwd(String src, String lkp, int bgn, int expd) {Tfds.Eq(expd, Bry_find_.Find_bwd(Bry_.new_u8(src), Bry_.new_u8(lkp), bgn));} + public void Test_Find_bwd_1st_ws_tst(String src, int pos, int expd) {Tfds.Eq(expd, Bry_find_.Find_bwd_last_ws(Bry_.new_a7(src), pos));} public void Test_Trim_bwd_space_tab(String raw_str, int expd) { byte[] raw_bry = Bry_.new_u8(raw_str); - int actl = Bry_finder.Trim_bwd_space_tab(raw_bry, raw_bry.length, 0); + int actl = Bry_find_.Trim_bwd_space_tab(raw_bry, raw_bry.length, 0); Tfds.Eq(expd, actl, raw_str); } public void Test_Trim_fwd_space_tab(String raw_str, int expd) { byte[] raw_bry = Bry_.new_u8(raw_str); - int actl = Bry_finder.Trim_fwd_space_tab(raw_bry, 0, raw_bry.length); + int actl = Bry_find_.Trim_fwd_space_tab(raw_bry, 0, raw_bry.length); Tfds.Eq(expd, actl, raw_str); } } diff --git a/100_core/src_130_brys/gplx/Bry_fmtr.java b/100_core/src_130_brys/gplx/Bry_fmtr.java index d7a4a38e5..a2657c8bf 100644 --- a/100_core/src_130_brys/gplx/Bry_fmtr.java +++ b/100_core/src_130_brys/gplx/Bry_fmtr.java @@ -216,9 +216,9 @@ public class Bry_fmtr { } } int Compile_eval_cmd(byte[] fmt, int fmt_len, int eval_lhs_bgn, List_adp list) { - int eval_lhs_end = Bry_finder.Find_fwd(fmt, char_eval_end, eval_lhs_bgn + Int_.Const_dlm_len, fmt_len); if (eval_lhs_end == Bry_.NotFound) throw Err_.new_wo_type("eval_lhs_end_invalid: could not find eval_lhs_end", "snip", String_.new_u8(fmt, eval_lhs_bgn, fmt_len)); + int eval_lhs_end = Bry_find_.Find_fwd(fmt, char_eval_end, eval_lhs_bgn + Int_.Const_dlm_len, fmt_len); if (eval_lhs_end == Bry_.NotFound) throw Err_.new_wo_type("eval_lhs_end_invalid: could not find eval_lhs_end", "snip", String_.new_u8(fmt, eval_lhs_bgn, fmt_len)); byte[] eval_dlm = Bry_.Mid(fmt, eval_lhs_bgn , eval_lhs_end + Int_.Const_dlm_len); - int eval_rhs_bgn = Bry_finder.Find_fwd(fmt, eval_dlm , eval_lhs_end + Int_.Const_dlm_len, fmt_len); if (eval_rhs_bgn == Bry_.NotFound) throw Err_.new_wo_type("eval_rhs_bgn_invalid: could not find eval_rhs_bgn", "snip", String_.new_u8(fmt, eval_lhs_end, fmt_len)); + int eval_rhs_bgn = Bry_find_.Find_fwd(fmt, eval_dlm , eval_lhs_end + Int_.Const_dlm_len, fmt_len); if (eval_rhs_bgn == Bry_.NotFound) throw Err_.new_wo_type("eval_rhs_bgn_invalid: could not find eval_rhs_bgn", "snip", String_.new_u8(fmt, eval_lhs_end, fmt_len)); byte[] eval_cmd = Bry_.Mid(fmt, eval_lhs_end + Int_.Const_dlm_len, eval_rhs_bgn); byte[] eval_rslt = eval_mgr.Eval(eval_cmd); int eval_rhs_end = eval_rhs_bgn + Int_.Const_dlm_len + eval_dlm.length; diff --git a/100_core/src_130_brys/gplx/Bry_split_.java b/100_core/src_130_brys/gplx/Bry_split_.java new file mode 100644 index 000000000..5d39e139e --- /dev/null +++ b/100_core/src_130_brys/gplx/Bry_split_.java @@ -0,0 +1,126 @@ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012 gnosygnu@gmail.com + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ +package gplx; +import gplx.core.brys.*; +public class Bry_split_ { + private static final Object thread_lock = new Object(); + public static byte[][] Split(byte[] src, byte dlm) {return Split(src, dlm, false);} + public static byte[][] Split(byte[] src, byte dlm, boolean trim) { + synchronized (thread_lock) { + Bry_split_wkr__to_ary wkr = Bry_split_wkr__to_ary.I; + Split(src, dlm, trim, wkr); + return wkr.To_ary(); + } + } + public static void Split(byte[] src, byte dlm, boolean trim, Bry_split_wkr wkr) { + if (src == null) return; + int src_len = src.length, pos = 0; if (src_len == 0) return; + int itm_bgn = -1, itm_end = -1; + while (true) { + boolean pos_is_last = pos == src_len; + byte b = pos_is_last ? dlm : src[pos]; + int nxt_pos = pos + 1; + boolean process = true; + switch (b) { + case Byte_ascii.Space: case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: // ignore ws; assumes that flags have no ws (they are single char) and vnts have no ws (EX: zh-hans) + if (trim && b != dlm) process = false; // b != dlm handles cases where ws is dlm, but trim is enabled; EX: " a \n b" -> "a", "b" + break; + } + if (process) { + if (b == dlm) { + boolean reset = true; + if (itm_bgn == -1) { + if (pos_is_last) {} // skip dlm at bgn / end; EX: "a," + else {wkr.Split(src, itm_bgn, itm_end);} // else, process "empty" dlm; EX: ",a" + } + else { + int rv = wkr.Split(src, itm_bgn, itm_end); + switch (rv) { + case Rv__ok: break; + case Rv__extend: reset = false; break; + case Rv__cancel: pos_is_last = true; break; + default: throw Err_.new_unhandled(rv); + } + } + if (reset) itm_bgn = itm_end = -1; + } + else { + if (itm_bgn == -1) itm_bgn = pos; + itm_end = nxt_pos; + } + } + if (pos_is_last) break; + pos = nxt_pos; + } + } + public static byte[][] Split(byte[] src, byte[] dlm) { + if (Bry_.Len_eq_0(src)) return Bry_.Ary_empty; + int cur_pos = 0, src_len = src.length, dlm_len = dlm.length; + List_adp rv = List_adp_.new_(); + while (true) { + int find_pos = Bry_find_.Find_fwd(src, dlm, cur_pos); + if (find_pos == Bry_.NotFound) { + if (cur_pos == src_len) break; // dlm is last sequence in src; do not create empty itm + find_pos = src_len; + } + rv.Add(Bry_.Mid(src, cur_pos, find_pos)); + if (find_pos == src_len) break; + cur_pos = find_pos + dlm_len; + } + return (byte[][])rv.To_ary(byte[].class); + } + public static byte[][] Split_lines(byte[] src) { + if (Bry_.Len_eq_0(src)) return Bry_.Ary_empty; + int src_len = src.length, src_pos = 0, fld_bgn = 0; + List_adp rv = List_adp_.new_(); + while (true) { + boolean last = src_pos == src_len; + byte b = last ? Byte_ascii.Nl : src[src_pos]; + int nxt_bgn = src_pos + 1; + switch (b) { + case Byte_ascii.Cr: + case Byte_ascii.Nl: + if ( b == Byte_ascii.Cr // check for crlf + && nxt_bgn < src_len && src[nxt_bgn] == Byte_ascii.Nl) { + ++nxt_bgn; + } + if (last && (src_pos - fld_bgn == 0)) {} // ignore trailing itms + else + rv.Add(Bry_.Mid(src, fld_bgn, src_pos)); + fld_bgn = nxt_bgn; + break; + } + if (last) break; + src_pos = nxt_bgn; + } + return (byte[][])rv.To_ary(byte[].class); + } + public static final int Rv__ok = 0, Rv__extend = 1, Rv__cancel = 2; +} +class Bry_split_wkr__to_ary implements gplx.core.brys.Bry_split_wkr { + private final List_adp list = List_adp_.new_(); + public int Split(byte[] src, int itm_bgn, int itm_end) { + byte[] bry = itm_end == itm_bgn ? Bry_.Empty : Bry_.Mid(src, itm_bgn, itm_end); + list.Add(bry); + return Bry_split_.Rv__ok; + } + public byte[][] To_ary() { + return (byte[][])list.To_ary_and_clear(byte[].class); + } + public static final Bry_split_wkr__to_ary I = new Bry_split_wkr__to_ary(); Bry_split_wkr__to_ary() {} +} diff --git a/100_core/src_130_brys/gplx/Bry_split__tst.java b/100_core/src_130_brys/gplx/Bry_split__tst.java new file mode 100644 index 000000000..cdd0d1f3f --- /dev/null +++ b/100_core/src_130_brys/gplx/Bry_split__tst.java @@ -0,0 +1,45 @@ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012 gnosygnu@gmail.com + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ +package gplx; +import org.junit.*; +public class Bry_split__tst { + private final Bry_split__fxt fxt = new Bry_split__fxt(); + @Test public void Split() { + fxt.Test_Split("a" , Byte_ascii.Pipe, Bool_.N, "a"); // no trim + fxt.Test_Split("a|" , Byte_ascii.Pipe, Bool_.N, "a"); + fxt.Test_Split("|a" , Byte_ascii.Pipe, Bool_.N, "", "a"); + fxt.Test_Split("|" , Byte_ascii.Pipe, Bool_.N, ""); + fxt.Test_Split("" , Byte_ascii.Pipe, Bool_.N); + fxt.Test_Split("a|b|c" , Byte_ascii.Pipe, Bool_.N, "a", "b", "c"); + fxt.Test_Split(" a " , Byte_ascii.Pipe, Bool_.Y, "a"); // trim + fxt.Test_Split(" a |" , Byte_ascii.Pipe, Bool_.Y, "a"); + fxt.Test_Split("| a " , Byte_ascii.Pipe, Bool_.Y, "", "a"); + fxt.Test_Split(" | " , Byte_ascii.Pipe, Bool_.Y, ""); + fxt.Test_Split(" " , Byte_ascii.Pipe, Bool_.Y); + fxt.Test_Split(" a | b | c " , Byte_ascii.Pipe, Bool_.Y, "a", "b", "c"); + fxt.Test_Split(" a b | c d " , Byte_ascii.Pipe, Bool_.Y, "a b", "c d"); + fxt.Test_Split(" a \n b " , Byte_ascii.Nl , Bool_.N, " a ", " b "); // ws as dlm + fxt.Test_Split(" a \n b " , Byte_ascii.Nl , Bool_.Y, "a", "b"); // ws as dlm; trim + } +} +class Bry_split__fxt { + public void Test_Split(String raw_str, byte dlm, boolean trim, String... expd) { + byte[][] actl_ary = Bry_split_.Split(Bry_.new_a7(raw_str), dlm, trim); + Tfds.Eq_ary_str(expd, String_.Ary(actl_ary)); + } +} diff --git a/400_xowa/src/gplx/xowa/langs/cnvs/Xol_cnv_itm.java b/100_core/src_130_brys/gplx/core/brys/Bry_split_wkr.java similarity index 69% rename from 400_xowa/src/gplx/xowa/langs/cnvs/Xol_cnv_itm.java rename to 100_core/src_130_brys/gplx/core/brys/Bry_split_wkr.java index 1f52d98ff..2c0747021 100644 --- a/400_xowa/src/gplx/xowa/langs/cnvs/Xol_cnv_itm.java +++ b/100_core/src_130_brys/gplx/core/brys/Bry_split_wkr.java @@ -15,9 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa.langs.cnvs; import gplx.*; import gplx.xowa.*; import gplx.xowa.langs.*; -public class Xol_cnv_itm { - public Xol_cnv_itm(byte[] src, byte[] trg) {this.src = src; this.trg = trg;} - public byte[] Src() {return src;} private byte[] src; - public byte[] Trg() {return trg;} private byte[] trg; +package gplx.core.brys; import gplx.*; import gplx.core.*; +public interface Bry_split_wkr { + int Split(byte[] src, int itm_bgn, int itm_end); } diff --git a/100_core/src_140_list/gplx/Hash_adp_bry.java b/100_core/src_140_list/gplx/Hash_adp_bry.java index e151894b0..7667dcc1e 100644 --- a/100_core/src_140_list/gplx/Hash_adp_bry.java +++ b/100_core/src_140_list/gplx/Hash_adp_bry.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx; import gplx.core.primitives.*; -import gplx.intl.*; +import gplx.core.intls.*; public class Hash_adp_bry extends gplx.lists.Hash_adp_base implements Hash_adp { private final Hash_adp_bry_itm_base proto, key_ref; Hash_adp_bry(Hash_adp_bry_itm_base proto) { @@ -29,11 +29,17 @@ public class Hash_adp_bry extends gplx.lists.Hash_adp_base implements Hash_adp { @Override protected boolean Has_base(Object key) {return super.Has_base(key_ref.Init((byte[])key));} public int Get_as_int(byte[] key) {return Get_as_int(key, 0, key.length);} public int Get_as_int(byte[] key, int bgn, int end) { - Object o = Get_by_mid(key, bgn, end); if (o == null) throw Err_.new_("core", "unknown key", "key", key); - return ((Int_obj_val)o).Val(); + int rv = Get_as_int_or(key, bgn, end, Int_.Min_value); if (rv == Int_.Min_value) throw Err_.new_("core", "unknown key", "key", key); + return rv; + } + public int Get_as_int_or(byte[] key, int or) {return Get_as_int_or(key, 0, key.length, or);} + public int Get_as_int_or(byte[] key, int bgn, int end, int or) { + Object o = Get_by_mid(key, bgn, end); + return (o == null) ? or : ((Int_obj_val)o).Val(); } public Object Get_by_bry(byte[] src) {return super.Fetch_base(key_ref.Init(src));} public Object Get_by_mid(byte[] src, int bgn, int end) {return super.Fetch_base(key_ref.Init(src, bgn, end));} + public Hash_adp_bry Add_byte_int(byte key, int val) {this.Add_base(Bry_.new_bytes(key), Int_obj_val.new_(val)); return this;} public Hash_adp_bry Add_bry_byte(byte[] key, byte val) {this.Add_base(key, Byte_obj_val.new_(val)); return this;} public Hash_adp_bry Add_bry_int(byte[] key, int val) {this.Add_base(key, Int_obj_val.new_(val)); return this;} public Hash_adp_bry Add_bry_bry(byte[] key) {this.Add_base(key, key); return this;} diff --git a/100_core/src_140_list/gplx/List_adp.java b/100_core/src_140_list/gplx/List_adp.java index fc353db87..2772da4d5 100644 --- a/100_core/src_140_list/gplx/List_adp.java +++ b/100_core/src_140_list/gplx/List_adp.java @@ -33,6 +33,7 @@ public interface List_adp extends EnumerAble { Object To_ary(Class memberType); Object To_ary_and_clear(Class memberType); String[] To_str_ary(); + String To_str(); Object[] To_obj_ary(); void Resize_bounds(int i); void Move_to(int src, int trg); @@ -64,6 +65,7 @@ class List_adp_noop implements List_adp { public Object To_ary(Class memberType) {return Object_.Ary_empty;} public Object To_ary_and_clear(Class memberType) {return Object_.Ary_empty;} public String[] To_str_ary() {return new String[0];} + public String To_str() {return "";} public Object[] To_obj_ary() {return Object_.Ary_empty;} public java.util.Iterator iterator() {return Iterator_null._;} public void Reverse() {} diff --git a/100_core/src_140_list/gplx/List_adp_base.java b/100_core/src_140_list/gplx/List_adp_base.java index 13cc473d4..eabd53602 100644 --- a/100_core/src_140_list/gplx/List_adp_base.java +++ b/100_core/src_140_list/gplx/List_adp_base.java @@ -19,18 +19,8 @@ package gplx; import gplx.core.strings.*; import gplx.lists.*; public abstract class List_adp_base implements List_adp, GfoInvkAble { private Object[] list; private int count; - public Object To_ary_and_clear(Class memberType) {Object rv = To_ary(memberType); this.Clear(); return rv;} - public Object To_ary(Class memberType) { - Object rv = Array_.Create(memberType, count); - for (int i = 0; i < count; i++) - Array_.Set_at(rv, i, list[i]); - return rv; - } - public Object[] To_obj_ary() { - Object[] rv = new Object[count]; - for (int i = 0; i < count; ++i) - rv[i] = list[i]; - return rv; + public List_adp_base(int capacity) { + this.list = new Object[capacity]; } public java.util.Iterator iterator() { if (count == 0) @@ -122,7 +112,6 @@ public abstract class List_adp_base implements List_adp, GfoInvkAble { list[i-1] = tmp; } } - public String[] To_str_ary() {return (String[])To_ary(String.class);} public Object Get_at(int i) {return Get_at_base(i);} public Object Get_at_last() {if (count == 0) throw Err_.new_invalid_op("cannot call Get_at_last on empty list"); return Get_at_base(count - 1);} public void Add(Object item) {Add_base(item);} @@ -132,8 +121,25 @@ public abstract class List_adp_base implements List_adp, GfoInvkAble { public List_adp_base() { list = new Object[List_adp_.Capacity_initial]; } - public List_adp_base(int capacity) { - list = new Object[capacity]; + public Object To_ary_and_clear(Class memberType) {Object rv = To_ary(memberType); this.Clear(); return rv;} + public Object To_ary(Class memberType) { + Object rv = Array_.Create(memberType, count); + for (int i = 0; i < count; i++) + Array_.Set_at(rv, i, list[i]); + return rv; + } + public String[] To_str_ary() {return (String[])To_ary(String.class);} + public Object[] To_obj_ary() { + Object[] rv = new Object[count]; + for (int i = 0; i < count; ++i) + rv[i] = list[i]; + return rv; + } + public String To_str() { + Bry_bfr bfr = Bry_bfr.new_(); + for (int i = 0; i < count; ++i) + bfr.Add_obj(list[i]); + return bfr.Xto_str_and_clear(); } private void BoundsChk(int bgn, int end, int len) { if ( bgn >= 0 && bgn < len diff --git a/100_core/src_150_text/gplx/texts/RegxPatn_cls_ioMatch.java b/100_core/src_150_text/gplx/texts/RegxPatn_cls_ioMatch.java index 12221618b..7720263be 100644 --- a/100_core/src_150_text/gplx/texts/RegxPatn_cls_ioMatch.java +++ b/100_core/src_150_text/gplx/texts/RegxPatn_cls_ioMatch.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.texts; import gplx.*; -import gplx.core.regxs.*; +import gplx.langs.regxs.*; public class RegxPatn_cls_ioMatch { public String Raw() {return raw;} private String raw; public boolean CaseSensitive() {return caseSensitive;} private boolean caseSensitive; diff --git a/100_core/src_150_text/gplx/texts/RegxPatn_cls_ioMatch_.java b/100_core/src_150_text/gplx/texts/RegxPatn_cls_ioMatch_.java index 7b5fbd6ba..26b6e7cb3 100644 --- a/100_core/src_150_text/gplx/texts/RegxPatn_cls_ioMatch_.java +++ b/100_core/src_150_text/gplx/texts/RegxPatn_cls_ioMatch_.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.texts; import gplx.*; -import gplx.core.strings.*; import gplx.core.regxs.*; +import gplx.core.strings.*; import gplx.langs.regxs.*; public class RegxPatn_cls_ioMatch_ { public static final String Wildcard = "*"; public static final String OrDelimiter = "|"; diff --git a/100_core/src_150_text/gplx/texts/RegxPatn_cls_like.java b/100_core/src_150_text/gplx/texts/RegxPatn_cls_like.java index b50f7a734..cb6992244 100644 --- a/100_core/src_150_text/gplx/texts/RegxPatn_cls_like.java +++ b/100_core/src_150_text/gplx/texts/RegxPatn_cls_like.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.texts; import gplx.*; -import gplx.core.regxs.*; +import gplx.langs.regxs.*; public class RegxPatn_cls_like { public char Escape() {return escape;} char escape; public static final char EscapeDefault = '|'; public String Raw() {return raw;} private String raw; diff --git a/100_core/src_150_text/gplx/texts/RegxPatn_cls_like_.java b/100_core/src_150_text/gplx/texts/RegxPatn_cls_like_.java index 62d17faa2..6a5a93f3f 100644 --- a/100_core/src_150_text/gplx/texts/RegxPatn_cls_like_.java +++ b/100_core/src_150_text/gplx/texts/RegxPatn_cls_like_.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.texts; import gplx.*; -import gplx.core.strings.*; import gplx.core.regxs.*; +import gplx.core.strings.*; import gplx.langs.regxs.*; public class RegxPatn_cls_like_ { public static RegxPatn_cls_like parse(String regxRaw, char escape) { String regx = Compile(regxRaw, escape); diff --git a/100_core/src_150_text/gplx/texts/RegxPatn_cls_like_tst.java b/100_core/src_150_text/gplx/texts/RegxPatn_cls_like_tst.java index a21aa590a..ffc1b2eee 100644 --- a/100_core/src_150_text/gplx/texts/RegxPatn_cls_like_tst.java +++ b/100_core/src_150_text/gplx/texts/RegxPatn_cls_like_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.texts; import gplx.*; -import org.junit.*; import gplx.core.regxs.*; +import org.junit.*; import gplx.langs.regxs.*; public class RegxPatn_cls_like_tst { @Test public void Basic() { tst_Match("abcd", "abcd", true); // basic; pass diff --git a/100_core/src_200_io/gplx/Io_mgr.java b/100_core/src_200_io/gplx/Io_mgr.java index 2d30c555d..1100ba833 100644 --- a/100_core/src_200_io/gplx/Io_mgr.java +++ b/100_core/src_200_io/gplx/Io_mgr.java @@ -76,6 +76,7 @@ public class Io_mgr { // exists primarily to gather all cmds under gplx namespac public String LoadFilStr(String url) {return LoadFilStr_args(Io_url_.new_fil_(url)).Exec();} public String LoadFilStr(Io_url url) {return LoadFilStr_args(url).Exec();} public IoEngine_xrg_loadFilStr LoadFilStr_args(Io_url url) {return IoEngine_xrg_loadFilStr.new_(url);} + public byte[] LoadFilBryOrNull(Io_url url) {return ExistsFil(url) ? LoadFilBry(url) : null;} public byte[] LoadFilBry(String url) {return LoadFilBry_reuse(Io_url_.new_fil_(url), Bry_.Empty, Int_obj_ref.zero_());} public byte[] LoadFilBry(Io_url url) {return LoadFilBry_reuse(url, Bry_.Empty, Int_obj_ref.zero_());} public void LoadFilBryByBfr(Io_url url, Bry_bfr bfr) { diff --git a/100_core/src_200_io/gplx/ios/IoStream_mem.java b/100_core/src_200_io/gplx/ios/IoStream_mem.java index c116fa0a5..6bf6897bb 100644 --- a/100_core/src_200_io/gplx/ios/IoStream_mem.java +++ b/100_core/src_200_io/gplx/ios/IoStream_mem.java @@ -39,7 +39,7 @@ class IoStream_mem extends IoStream_base { // expand buffer if needed; necessary to emulate fileStream writing; ex: FileStream fs = new FileStream(); fs.Write(data); where data may be unknown length int length = (int)position + count + -offset; int bufLen = Array_.Len(buffer); - if (bufLen < length) buffer = Bry_.Resize_manual(buffer, length); + if (bufLen < length) buffer = Bry_.Resize(buffer, length); for (int i = 0; i < count; i++) buffer[position + i] = array[offset + i]; position += count +-offset; diff --git a/100_core/src_200_io/gplx/ios/IoStream_mem_tst.java b/100_core/src_200_io/gplx/ios/IoStream_mem_tst.java index 2e0639e06..1d8601494 100644 --- a/100_core/src_200_io/gplx/ios/IoStream_mem_tst.java +++ b/100_core/src_200_io/gplx/ios/IoStream_mem_tst.java @@ -20,7 +20,7 @@ import org.junit.*; //using System.IO; /*Stream*/ public class IoStream_mem_tst { @Test public void Write() { // confirm that changes written to Stream acquired via .AdpObj are written to IoStream_mem.Buffer IoStream_mem stream = IoStream_mem.wtr_data_(Io_url_.Empty, 0); - byte[] data = Bry_.ints_(1); + byte[] data = Bry_.new_ints(1); stream.Write(data, 0, Array_.Len(data)); Tfds.Eq(1L , stream.Len()); diff --git a/100_core/src_311_gfoObj/gplx/GfoMsg_.java b/100_core/src_311_gfoObj/gplx/GfoMsg_.java index 8021515ba..b9fd9d90a 100644 --- a/100_core/src_311_gfoObj/gplx/GfoMsg_.java +++ b/100_core/src_311_gfoObj/gplx/GfoMsg_.java @@ -170,7 +170,7 @@ class GfoMsg_base implements GfoMsg { public Object ReadObj(String k, ParseAble parseAble) {Object rv = ReadOr(k, null); if (rv == Nil) ThrowNotFound(k); return parse ? parseAble.ParseAsObj((String)rv) : rv;} public Object ReadObjOr(String k, ParseAble parseAble, Object or) {Object rv = ReadOr(k, or) ; if (rv == Nil) return or ; return parse ? parseAble.ParseAsObj((String)rv) : rv;} public String[] ReadStrAry(String k, String spr) {return String_.Split(ReadStr(k), spr);} - public byte[][] ReadBryAry(String k, byte spr) {return Bry_.Split(ReadBry(k), spr);} + public byte[][] ReadBryAry(String k, byte spr) {return Bry_split_.Split(ReadBry(k), spr);} public String[] ReadStrAryIgnore(String k, String spr, String ignore) {return String_.Split(String_.Replace(ReadStr(k), ignore, ""), spr);} public Object ReadValAt(int i) {return Args_getAt(i).Val();} @gplx.Virtual protected Object ReadOr(String k, Object defaultOr) { diff --git a/100_core/src_900_xml/gplx/xmls/XmlSplitRdr.java b/100_core/src_900_xml/gplx/xmls/XmlSplitRdr.java index 83dec3b2c..b4c118d90 100644 --- a/100_core/src_900_xml/gplx/xmls/XmlSplitRdr.java +++ b/100_core/src_900_xml/gplx/xmls/XmlSplitRdr.java @@ -45,7 +45,7 @@ public class XmlSplitRdr { curSum += curRead; done = curSum == curLen; if (done && curRead != curAry.length) // on last pass, readAry may have garbage at end, remove - curAry = (byte[])Bry_.Resize_manual(curAry, curRead); + curAry = Bry_.Resize(curAry, curRead); } public void Rls() {stream.Rls();} } diff --git a/140_dbs/src/gplx/dbs/metas/parsers/Meta_fld_wkr__base.java b/140_dbs/src/gplx/dbs/metas/parsers/Meta_fld_wkr__base.java index ddad955de..5e9b3f9f8 100644 --- a/140_dbs/src/gplx/dbs/metas/parsers/Meta_fld_wkr__base.java +++ b/140_dbs/src/gplx/dbs/metas/parsers/Meta_fld_wkr__base.java @@ -97,7 +97,7 @@ class Meta_fld_wkr__default extends Meta_fld_wkr__base { case Byte_ascii.Quote: case Byte_ascii.Apos: int bgn_pos = rdr.Pos() + 1; - int end_pos = Bry_finder.Find_fwd(src, b, bgn_pos); if (end_pos == Bry_finder.Not_found) throw Err_.new_wo_type("unclosed quote", "snip", rdr.Mid_by_len_safe(40)); + int end_pos = Bry_find_.Find_fwd(src, b, bgn_pos); if (end_pos == Bry_find_.Not_found) throw Err_.new_wo_type("unclosed quote", "snip", rdr.Mid_by_len_safe(40)); default_val = Bry_.Mid(src, bgn_pos, end_pos); rdr.Pos_(end_pos + 1); break; diff --git a/140_dbs/src/gplx/dbs/metas/parsers/Sql_bry_rdr.java b/140_dbs/src/gplx/dbs/metas/parsers/Sql_bry_rdr.java index eeed92a75..25df49e50 100644 --- a/140_dbs/src/gplx/dbs/metas/parsers/Sql_bry_rdr.java +++ b/140_dbs/src/gplx/dbs/metas/parsers/Sql_bry_rdr.java @@ -48,8 +48,8 @@ public class Sql_bry_rdr extends Bry_rdr { public byte[] Read_sql_identifier() } byte b_1 = pos + 1 < src_len ? src[pos + 1] : Byte_ascii.Null; if (b_1 != bgn_1) return this; - int end_pos = Bry_finder.Find_fwd(src, end_bry, pos + 2, src_len); - if (end_pos == Bry_finder.Not_found) return this; + int end_pos = Bry_find_.Find_fwd(src, end_bry, pos + 2, src_len); + if (end_pos == Bry_find_.Not_found) return this; pos = end_pos + end_bry.length; return this.Skip_ws(); } diff --git a/140_dbs/src/gplx/dbs/qrys/Db_qry_sql.java b/140_dbs/src/gplx/dbs/qrys/Db_qry_sql.java index 192e5f2da..4295fe114 100644 --- a/140_dbs/src/gplx/dbs/qrys/Db_qry_sql.java +++ b/140_dbs/src/gplx/dbs/qrys/Db_qry_sql.java @@ -44,7 +44,7 @@ public class Db_qry_sql implements Db_qry { int args_idx = 0, args_len = args.length, pos = 0; Bry_bfr bfr = Bry_bfr.new_(src_len); while (pos < src_len) { - int question_pos = Bry_finder.Find_fwd(src, Byte_ascii.Question, pos); + int question_pos = Bry_find_.Find_fwd(src, Byte_ascii.Question, pos); if (question_pos == Bry_.NotFound) question_pos = src_len; bfr.Add_mid(src, pos, question_pos); diff --git a/140_dbs/src/gplx/dbs/qrys/Db_stmt_sql.java b/140_dbs/src/gplx/dbs/qrys/Db_stmt_sql.java index a47907596..9a3992167 100644 --- a/140_dbs/src/gplx/dbs/qrys/Db_stmt_sql.java +++ b/140_dbs/src/gplx/dbs/qrys/Db_stmt_sql.java @@ -145,7 +145,7 @@ public class Db_stmt_sql implements Db_stmt {// used for formatting SQL statemen int arg_idx = 0; int pos_prv = 0; tmp_bfr.Clear(); while (true) { - int pos_cur = Bry_finder.Find_fwd(sql_bry, Byte_ascii.Question, pos_prv); if (pos_cur == Bry_.NotFound) break; + int pos_cur = Bry_find_.Find_fwd(sql_bry, Byte_ascii.Question, pos_prv); if (pos_cur == Bry_.NotFound) break; tmp_bfr.Add_mid(sql_bry, pos_prv, pos_cur); tmp_bfr.Add_byte(Byte_ascii.Tilde).Add_byte(Byte_ascii.Curly_bgn); tmp_bfr.Add_int_variable(arg_idx++); diff --git a/140_dbs/xtn/gplx/dbs/SqliteDbMain.java b/140_dbs/xtn/gplx/dbs/SqliteDbMain.java index 1f3f30f20..1e7a68622 100644 --- a/140_dbs/xtn/gplx/dbs/SqliteDbMain.java +++ b/140_dbs/xtn/gplx/dbs/SqliteDbMain.java @@ -228,7 +228,7 @@ public class SqliteDbMain { stmt.setInt(3, Bry_.new_a7(flds[3])[0] - 32); byte[] orig = Bry_.new_a7(flds[4]); int orig_mode = orig[0] - Byte_ascii.Num_0; - int comma_pos = Bry_finder.Find_fwd(orig, Byte_ascii.Comma); + int comma_pos = Bry_find_.Find_fwd(orig, Byte_ascii.Comma); int orig_w = Bry_.To_int_or(orig, 2, comma_pos, -1); int orig_h = Bry_.To_int_or(orig, comma_pos + 1, orig.length, -1); stmt.setInt(4, orig_mode); diff --git a/400_xowa/.classpath b/400_xowa/.classpath index fbb3e43c3..3af6986cc 100644 --- a/400_xowa/.classpath +++ b/400_xowa/.classpath @@ -1,18 +1,12 @@ - - - - - - - - + + + - diff --git a/400_xowa/src/gplx/core/brys/Bit_.java b/400_xowa/src/gplx/core/brys/Bit_.java index 605f18686..f2f04a6f3 100644 --- a/400_xowa/src/gplx/core/brys/Bit_.java +++ b/400_xowa/src/gplx/core/brys/Bit_.java @@ -30,6 +30,7 @@ public class Bit_ { rv[i] = bits[i] ? Byte_ascii.Num_1 : Byte_ascii.Num_0; return String_.new_a7(rv); } + public static int Get_flag(int i) {return Base2_ary[i];} public static int[] Bld_pow_ary(int... seg_ary) { int seg_ary_len = seg_ary.length; int pow = 0; diff --git a/400_xowa/src/gplx/core/btries/Btrie_u8_mgr_tst.java b/400_xowa/src/gplx/core/btries/Btrie_u8_mgr_tst.java index 8cd8ac637..158f32403 100644 --- a/400_xowa/src/gplx/core/btries/Btrie_u8_mgr_tst.java +++ b/400_xowa/src/gplx/core/btries/Btrie_u8_mgr_tst.java @@ -45,9 +45,9 @@ public class Btrie_u8_mgr_tst { } @Test public void Uft8_asymmetric() { fxt.Init_add(Bry_.new_u8("İ") , "1"); - fxt.Test_match("İ" , "1"); // exact=y; İ = Bry_.ints_(196,176) - fxt.Test_match("i" , "1"); // lower=y; i = Bry_.ints_(105) - fxt.Test_match("I" , null); // upper=n; I = Bry_.ints_( 73); see Btrie_u8_itm and rv.asymmetric_bry + fxt.Test_match("İ" , "1"); // exact=y; İ = Bry_.new_ints(196,176) + fxt.Test_match("i" , "1"); // lower=y; i = Bry_.new_ints(105) + fxt.Test_match("I" , null); // upper=n; I = Bry_.new_ints( 73); see Btrie_u8_itm and rv.asymmetric_bry fxt.Clear(); fxt.Init_add(Bry_.new_u8("i") , "1"); diff --git a/400_xowa/src_060_utl/gplx/GfoCacheMgr_tst.java b/400_xowa/src/gplx/core/caches/GfoCacheMgr_tst.java similarity index 96% rename from 400_xowa/src_060_utl/gplx/GfoCacheMgr_tst.java rename to 400_xowa/src/gplx/core/caches/GfoCacheMgr_tst.java index 7490462e7..e8c00d9c1 100644 --- a/400_xowa/src_060_utl/gplx/GfoCacheMgr_tst.java +++ b/400_xowa/src/gplx/core/caches/GfoCacheMgr_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.core.caches; import gplx.*; import gplx.core.*; import org.junit.*; public class GfoCacheMgr_tst { @Before public void init() {fxt = new GfoCacheMgr_fxt();} GfoCacheMgr_fxt fxt; diff --git a/400_xowa/src_060_utl/gplx/Gfo_cache_mgr.java b/400_xowa/src/gplx/core/caches/Gfo_cache_mgr.java similarity index 80% rename from 400_xowa/src_060_utl/gplx/Gfo_cache_mgr.java rename to 400_xowa/src/gplx/core/caches/Gfo_cache_mgr.java index ecd829fe9..5af60c121 100644 --- a/400_xowa/src_060_utl/gplx/Gfo_cache_mgr.java +++ b/400_xowa/src/gplx/core/caches/Gfo_cache_mgr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.core.caches; import gplx.*; import gplx.core.*; import gplx.core.consoles.*; public class Gfo_cache_mgr { private Ordered_hash hash = Ordered_hash_.new_bry_(); @@ -26,12 +26,12 @@ public class Gfo_cache_mgr { public int Count() {return hash.Count();} public void Clear() {hash.Clear(); recent.Clear(); cur_size = 0;} @gplx.Internal protected Object Get_at(int i) { - Gfo_cache_itm rv = (Gfo_cache_itm)hash.Get_at(i); + Gfo_cache_data rv = (Gfo_cache_data)hash.Get_at(i); return rv.Val(); } public Object Get_by_key(byte[] key) { Object o = hash.Get_by(key); if (o == null) return null; - Gfo_cache_itm rv = (Gfo_cache_itm)o; + Gfo_cache_data rv = (Gfo_cache_data)o; rv.Timestamp_update(); Object recent_itm = recent.Get_by(key); if (recent_itm == null) recent.Add(key, rv); @@ -39,7 +39,7 @@ public class Gfo_cache_mgr { } public void Del(byte[] key) { Object o = hash.Get_by(key); if (o == null) return; - Gfo_cache_itm itm = (Gfo_cache_itm)o; + Gfo_cache_data itm = (Gfo_cache_data)o; cur_size -= itm.Size(); hash.Del(itm.Key()); itm.Rls(); @@ -51,7 +51,7 @@ public class Gfo_cache_mgr { if (o == null) Add(key, val, size); else { - Gfo_cache_itm itm = (Gfo_cache_itm)o; + Gfo_cache_data itm = (Gfo_cache_data)o; cur_size -= itm.Size(); cur_size += size; itm.Replace(val, size); @@ -61,14 +61,14 @@ public class Gfo_cache_mgr { // if (cur_size + size > 600000000) ReduceCache(); cur_size += size; // ++cur_size; - Gfo_cache_itm itm = new Gfo_cache_itm(key, val, size); + Gfo_cache_data itm = new Gfo_cache_data(key, val, size); hash.Add(key, itm); } public void Reduce_recent() { // Console_adp__sys.I.WriteLine("reducing"); int len = recent.Count(); for (int i = 0; i < len; i++) { - Gfo_cache_itm itm = (Gfo_cache_itm)recent.Get_at(i); + Gfo_cache_data itm = (Gfo_cache_data)recent.Get_at(i); itm.Rls(); // releases root } recent.Clear(); @@ -80,7 +80,7 @@ public class Gfo_cache_mgr { // List_adp deleted = List_adp_.new_(); // int deleted_size = 0, deleted_count = 0; // for (int i = 0; i < len; i++) { -// Gfo_cache_itm itm = (Gfo_cache_itm)hash.Get_at(i); +// Gfo_cache_data itm = (Gfo_cache_data)hash.Get_at(i); // int new_deleted_size = deleted_size + 1;//itm.Size(); // if (new_deleted_size > 4000 && deleted_count > 0) break; // deleted.Add(itm); @@ -89,7 +89,7 @@ public class Gfo_cache_mgr { // } // len = deleted.Count(); // for (int i = 0; i < len; i++) { -// Gfo_cache_itm itm = (Gfo_cache_itm)deleted.Get_at(i); +// Gfo_cache_data itm = (Gfo_cache_data)deleted.Get_at(i); // cur_size --; // hash.Del(bry_ref.Val_(itm.Key())); // itm.Rls(); @@ -98,21 +98,21 @@ public class Gfo_cache_mgr { int len = hash.Count(); for (int i = 0; i < len; i++) { - Gfo_cache_itm itm = (Gfo_cache_itm)hash.Get_at(i); + Gfo_cache_data itm = (Gfo_cache_data)hash.Get_at(i); // hash.Del(bry_ref.Val_(itm.Key())); itm.Rls(); } } } -class Gfo_cache_itm implements gplx.CompareAble, RlsAble { - public Gfo_cache_itm(byte[] key, RlsAble val, int size) {this.key = key; this.val = val; this.size = size; this.timestamp = Env_.TickCount();} +class Gfo_cache_data implements gplx.CompareAble, RlsAble { + public Gfo_cache_data(byte[] key, RlsAble val, int size) {this.key = key; this.val = val; this.size = size; this.timestamp = Env_.TickCount();} public byte[] Key() {return key;} private byte[] key; public RlsAble Val() {return val;} private RlsAble val; public int Size() {return size;} private int size; public void Replace(RlsAble val, int size) {this.val = val; this.size = size;} public long Timestamp() {return timestamp;} public void Timestamp_update() {timestamp = Env_.TickCount();} private long timestamp; public int compareTo(Object obj) { - Gfo_cache_itm comp = (Gfo_cache_itm)obj; + Gfo_cache_data comp = (Gfo_cache_data)obj; return Long_.Compare(timestamp, comp.timestamp); } public void Rls() { diff --git a/400_xowa/src/gplx/cache/Gfo_cache_mgr_base.java b/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_base.java similarity index 95% rename from 400_xowa/src/gplx/cache/Gfo_cache_mgr_base.java rename to 400_xowa/src/gplx/core/caches/Gfo_cache_mgr_base.java index 75d1b6e54..6db1954ac 100644 --- a/400_xowa/src/gplx/cache/Gfo_cache_mgr_base.java +++ b/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_base.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.cache; import gplx.*; +package gplx.core.caches; import gplx.*; import gplx.core.*; public class Gfo_cache_mgr_base { private Ordered_hash hash = Ordered_hash_.new_bry_(); public int Compress_max() {return compress_max;} public void Compress_max_(int v) {compress_max = v;} private int compress_max = 16; diff --git a/400_xowa/src/gplx/cache/Gfo_cache_mgr_bry.java b/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_bry.java similarity index 91% rename from 400_xowa/src/gplx/cache/Gfo_cache_mgr_bry.java rename to 400_xowa/src/gplx/core/caches/Gfo_cache_mgr_bry.java index 6583aa0fd..bf286642f 100644 --- a/400_xowa/src/gplx/cache/Gfo_cache_mgr_bry.java +++ b/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_bry.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.cache; import gplx.*; +package gplx.core.caches; import gplx.*; import gplx.core.*; import gplx.core.primitives.*; public class Gfo_cache_mgr_bry extends Gfo_cache_mgr_base { public Object Get_or_null(byte[] key) {return Base_get_or_null(key);} @@ -38,7 +38,7 @@ class Gfo_cache_itm_comparer implements gplx.lists.ComparerAble { public static final Gfo_cache_itm_comparer Touched_asc = new Gfo_cache_itm_comparer(); } class Io_url_exists_mgr { - private gplx.cache.Gfo_cache_mgr_bry cache_mgr = new gplx.cache.Gfo_cache_mgr_bry(); + private gplx.core.caches.Gfo_cache_mgr_bry cache_mgr = new gplx.core.caches.Gfo_cache_mgr_bry(); public Io_url_exists_mgr() { cache_mgr.Compress_max_(Int_.Max_value); } diff --git a/400_xowa/src_060_utl/gplx/App_cmd_arg.java b/400_xowa/src/gplx/core/consoles/App_cmd_arg.java similarity index 97% rename from 400_xowa/src_060_utl/gplx/App_cmd_arg.java rename to 400_xowa/src/gplx/core/consoles/App_cmd_arg.java index 2e338db77..dd530b9d5 100644 --- a/400_xowa/src_060_utl/gplx/App_cmd_arg.java +++ b/400_xowa/src/gplx/core/consoles/App_cmd_arg.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.core.consoles; import gplx.*; import gplx.core.*; public class App_cmd_arg { App_cmd_arg(byte tid, byte val_tid, String key, boolean reqd) {this.tid = tid; this.val_tid = val_tid; this.key = key; this.reqd = reqd;} public byte Tid() {return tid;} private byte tid; diff --git a/400_xowa/src_060_utl/gplx/App_cmd_mgr.java b/400_xowa/src/gplx/core/consoles/App_cmd_mgr.java similarity index 97% rename from 400_xowa/src_060_utl/gplx/App_cmd_mgr.java rename to 400_xowa/src/gplx/core/consoles/App_cmd_mgr.java index 3c0e4c7d1..b75ea76e7 100644 --- a/400_xowa/src_060_utl/gplx/App_cmd_mgr.java +++ b/400_xowa/src/gplx/core/consoles/App_cmd_mgr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.core.consoles; import gplx.*; import gplx.core.*; import gplx.core.strings.*; public class App_cmd_mgr { private Ordered_hash expd_args = Ordered_hash_.new_(), actl_args = Ordered_hash_.new_(); diff --git a/400_xowa/src_060_utl/gplx/App_cmd_mgr_tst.java b/400_xowa/src/gplx/core/consoles/App_cmd_mgr_tst.java similarity index 96% rename from 400_xowa/src_060_utl/gplx/App_cmd_mgr_tst.java rename to 400_xowa/src/gplx/core/consoles/App_cmd_mgr_tst.java index b88880568..7324503ae 100644 --- a/400_xowa/src_060_utl/gplx/App_cmd_mgr_tst.java +++ b/400_xowa/src/gplx/core/consoles/App_cmd_mgr_tst.java @@ -15,8 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; -import org.junit.*; +package gplx.core.consoles; import gplx.*; import gplx.core.*; +import org.junit.*; import gplx.core.tests.*; public class App_cmd_mgr_tst { App_cmd_mgr_fxt fxt = new App_cmd_mgr_fxt(); @Before public void init() {fxt.Clear();} diff --git a/400_xowa/src/gplx/core/flds/Gfo_fld_rdr.java b/400_xowa/src/gplx/core/flds/Gfo_fld_rdr.java index e29a5e09b..74b7075b7 100644 --- a/400_xowa/src/gplx/core/flds/Gfo_fld_rdr.java +++ b/400_xowa/src/gplx/core/flds/Gfo_fld_rdr.java @@ -54,7 +54,7 @@ public class Gfo_fld_rdr extends Gfo_fld_base { f += (data[fld_bgn + 16] - Byte_ascii.Num_0) * 100; f += (data[fld_bgn + 17] - Byte_ascii.Num_0) * 10; f += (data[fld_bgn + 18] - Byte_ascii.Num_0); - if (data[fld_bgn + 19] != fld_dlm) throw Err_.new_wo_type("csv date is invalid", "txt", String_.new_u8_by_len(data, fld_bgn, 20)); + if (data[fld_bgn + 19] != fld_dlm) throw Err_.new_wo_type("csv date is invalid", "txt", String_.new_u8__by_len(data, fld_bgn, 20)); fld_end = pos + 20; pos = fld_end + 1; ++fld_idx; return DateAdp_.new_(y, M, d, H, m, s, f); diff --git a/400_xowa/src/gplx/intl/Gfo_app.java b/400_xowa/src/gplx/core/intls/Gfo_app.java similarity index 92% rename from 400_xowa/src/gplx/intl/Gfo_app.java rename to 400_xowa/src/gplx/core/intls/Gfo_app.java index 95418194b..7f2e2ad39 100644 --- a/400_xowa/src/gplx/intl/Gfo_app.java +++ b/400_xowa/src/gplx/core/intls/Gfo_app.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.intl; import gplx.*; +package gplx.core.intls; import gplx.*; import gplx.core.*; public class Gfo_app { public Gfo_i18n_mgr I18n_mgr() {return i18n_mgr;} private Gfo_i18n_mgr i18n_mgr = new Gfo_i18n_mgr(); } diff --git a/400_xowa/src/gplx/intl/Gfo_i18n_itm.java b/400_xowa/src/gplx/core/intls/Gfo_i18n_itm.java similarity index 95% rename from 400_xowa/src/gplx/intl/Gfo_i18n_itm.java rename to 400_xowa/src/gplx/core/intls/Gfo_i18n_itm.java index aa318e320..9fee3e231 100644 --- a/400_xowa/src/gplx/intl/Gfo_i18n_itm.java +++ b/400_xowa/src/gplx/core/intls/Gfo_i18n_itm.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.intl; import gplx.*; +package gplx.core.intls; import gplx.*; import gplx.core.*; class Gfo_i18n_itm { public Gfo_i18n_itm(int src, byte[] key, byte[] val, boolean val_fmt_exists, Gfo_i18n_val_cmd val_cmd) { this.src = src; this.key = key; this.val = val; this.val_fmt_exists = val_fmt_exists; this.val_cmd = val_cmd; diff --git a/400_xowa/src/gplx/intl/Gfo_i18n_mgr.java b/400_xowa/src/gplx/core/intls/Gfo_i18n_mgr.java similarity index 95% rename from 400_xowa/src/gplx/intl/Gfo_i18n_mgr.java rename to 400_xowa/src/gplx/core/intls/Gfo_i18n_mgr.java index 1a4f1c4be..4ed2dd9d4 100644 --- a/400_xowa/src/gplx/intl/Gfo_i18n_mgr.java +++ b/400_xowa/src/gplx/core/intls/Gfo_i18n_mgr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.intl; import gplx.*; +package gplx.core.intls; import gplx.*; import gplx.core.*; public class Gfo_i18n_mgr { public String Dflt() {return dflt;} private String dflt = "en"; public Gfo_i18n_mgr Add_txt_dflt(String key, String val) {return this;} diff --git a/400_xowa/src/gplx/intl/Gfo_i18n_val_cmd.java b/400_xowa/src/gplx/core/intls/Gfo_i18n_val_cmd.java similarity index 92% rename from 400_xowa/src/gplx/intl/Gfo_i18n_val_cmd.java rename to 400_xowa/src/gplx/core/intls/Gfo_i18n_val_cmd.java index a1cdde4b6..35a24bd95 100644 --- a/400_xowa/src/gplx/intl/Gfo_i18n_val_cmd.java +++ b/400_xowa/src/gplx/core/intls/Gfo_i18n_val_cmd.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.intl; import gplx.*; +package gplx.core.intls; import gplx.*; import gplx.core.*; interface Gfo_i18n_val_cmd { byte[] Process(int src, byte[] key, byte[] val); } diff --git a/400_xowa/src/gplx/intl/String_surrogate_utl.java b/400_xowa/src/gplx/core/intls/String_surrogate_utl.java similarity index 91% rename from 400_xowa/src/gplx/intl/String_surrogate_utl.java rename to 400_xowa/src/gplx/core/intls/String_surrogate_utl.java index a3e1eaf79..20b35ceea 100644 --- a/400_xowa/src/gplx/intl/String_surrogate_utl.java +++ b/400_xowa/src/gplx/core/intls/String_surrogate_utl.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.intl; import gplx.*; +package gplx.core.intls; import gplx.*; import gplx.core.*; public class String_surrogate_utl { public int Byte_pos() {return byte_pos;} int byte_pos; public int Count_surrogates__char_idx(byte[] src, int src_len, int byte_bgn, int char_idx) {return Count_surrogates(src, src_len, byte_bgn, Bool_.Y, char_idx);} @@ -27,7 +27,7 @@ public class String_surrogate_utl { if ( stop_idx == (stop_idx_is_char ? char_count : codepoint_count) // requested # of chars found || byte_pos >= src_len // eos reached; DATE:2014-09-02 ) return codepoint_count - char_count; - int char_len_in_bytes = gplx.intl.Utf8_.Len_of_char_by_1st_byte(src[byte_pos]); + int char_len_in_bytes = gplx.core.intls.Utf8_.Len_of_char_by_1st_byte(src[byte_pos]); ++char_count; // char_count always incremented by 1 codepoint_count += (char_len_in_bytes == 4) ? 2 : 1; // codepoint_count incremented by 2 if surrogate pair; else 1 byte_pos += char_len_in_bytes; diff --git a/400_xowa/src/gplx/intl/String_surrogate_utl_tst.java b/400_xowa/src/gplx/core/intls/String_surrogate_utl_tst.java similarity index 96% rename from 400_xowa/src/gplx/intl/String_surrogate_utl_tst.java rename to 400_xowa/src/gplx/core/intls/String_surrogate_utl_tst.java index ef15e3d82..c01db4ddf 100644 --- a/400_xowa/src/gplx/intl/String_surrogate_utl_tst.java +++ b/400_xowa/src/gplx/core/intls/String_surrogate_utl_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.intl; import gplx.*; +package gplx.core.intls; import gplx.*; import gplx.core.*; import org.junit.*; public class String_surrogate_utl_tst { @Before public void init() {fxt.Clear();} private String_surrogate_utl_fxt fxt = new String_surrogate_utl_fxt(); diff --git a/400_xowa/src_060_utl/gplx/StatRng.java b/400_xowa/src/gplx/core/lists/StatRng.java similarity index 95% rename from 400_xowa/src_060_utl/gplx/StatRng.java rename to 400_xowa/src/gplx/core/lists/StatRng.java index 47e0cfbd5..3e1ba624a 100644 --- a/400_xowa/src_060_utl/gplx/StatRng.java +++ b/400_xowa/src/gplx/core/lists/StatRng.java @@ -15,8 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; -class StatRng_fxt { +package gplx.core.lists; import gplx.*; import gplx.core.*; +class StatRng_fxt { // UNUSED:useful for stat processing StatRng rng; public StatRng_fxt ini_(int lo_ary_len, int hi_ary_len, int... slot_hi_ary) { rng = new StatRng(lo_ary_len, hi_ary_len, slot_hi_ary); diff --git a/400_xowa/src_060_utl/gplx/StatRng_tst.java b/400_xowa/src/gplx/core/lists/StatRng_tst.java similarity index 95% rename from 400_xowa/src_060_utl/gplx/StatRng_tst.java rename to 400_xowa/src/gplx/core/lists/StatRng_tst.java index 80f4be332..5d15ab691 100644 --- a/400_xowa/src_060_utl/gplx/StatRng_tst.java +++ b/400_xowa/src/gplx/core/lists/StatRng_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.core.lists; import gplx.*; import gplx.core.*; import org.junit.*; public class StatRng_tst { // Mwl_parser_fxt fx = new Mwl_parser_fxt(); Pf_func_lang_rsc rsc = Pf_func_lang_rsc._; diff --git a/400_xowa/src/gplx/core/net/Gfo_inet_conn.java b/400_xowa/src/gplx/core/net/Gfo_inet_conn.java index 3af2df8c8..7c08b7536 100644 --- a/400_xowa/src/gplx/core/net/Gfo_inet_conn.java +++ b/400_xowa/src/gplx/core/net/Gfo_inet_conn.java @@ -18,6 +18,6 @@ along with this program. If not, see . package gplx.core.net; import gplx.*; import gplx.core.*; public interface Gfo_inet_conn { void Clear(); - void Upload_data(byte[] url, byte[] data); - byte[] Download_data(byte[] url); + void Upload_by_bytes(String url, byte[] data); + byte[] Download_as_bytes_or_null(String url); // return null instead of throwing exception } diff --git a/400_xowa/src/gplx/core/net/Gfo_inet_conn_.java b/400_xowa/src/gplx/core/net/Gfo_inet_conn_.java index a1c017678..91c38ae16 100644 --- a/400_xowa/src/gplx/core/net/Gfo_inet_conn_.java +++ b/400_xowa/src/gplx/core/net/Gfo_inet_conn_.java @@ -17,18 +17,19 @@ along with this program. If not, see . */ package gplx.core.net; import gplx.*; import gplx.core.*; public class Gfo_inet_conn_ { - public static Gfo_inet_conn new_mem_hash() {return new Gfo_inet_conn__mem__hash();} - public static Gfo_inet_conn new_mem_pile() {return new Gfo_inet_conn__mem__pile();} + public static Gfo_inet_conn new_http() {return new Gfo_inet_conn__http();} + public static Gfo_inet_conn new_mem_hash() {return new Gfo_inet_conn__mem__hash();} + public static Gfo_inet_conn new_mem_pile() {return new Gfo_inet_conn__mem__pile();} } class Gfo_inet_conn__mem__hash implements Gfo_inet_conn { private final Hash_adp_bry hash = Hash_adp_bry.cs(); public void Clear() {hash.Clear();} - public void Upload_data(byte[] url, byte[] data) {hash.Add(url, data);} - public byte[] Download_data(byte[] url) {return (byte[])hash.Get_by(url);} + public void Upload_by_bytes(String url, byte[] data) {hash.Add(url, data);} + public byte[] Download_as_bytes_or_null(String url) {return (byte[])hash.Get_by(url);} } class Gfo_inet_conn__mem__pile implements Gfo_inet_conn { private final List_adp pile = List_adp_.new_(); public void Clear() {pile.Clear();} - public void Upload_data(byte[] url, byte[] data) {pile.Add(data);} - public byte[] Download_data(byte[] url) {return (byte[])List_adp_.Pop_last(pile);} + public void Upload_by_bytes(String url, byte[] data) {pile.Add(data);} + public byte[] Download_as_bytes_or_null(String url) {return (byte[])List_adp_.Pop_last(pile);} } diff --git a/400_xowa/src/gplx/xowa/wikis/Xow_page_mgr.java b/400_xowa/src/gplx/core/net/Gfo_inet_conn__http.java similarity index 56% rename from 400_xowa/src/gplx/xowa/wikis/Xow_page_mgr.java rename to 400_xowa/src/gplx/core/net/Gfo_inet_conn__http.java index 4fa7dc726..2c3e346fd 100644 --- a/400_xowa/src/gplx/xowa/wikis/Xow_page_mgr.java +++ b/400_xowa/src/gplx/core/net/Gfo_inet_conn__http.java @@ -15,11 +15,14 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa.wikis; import gplx.*; import gplx.xowa.*; -import gplx.xowa.wikis.data.tbls.*; -public class Xow_page_mgr { - public void Create(Xowd_page_tbl core_tbl, Xowd_text_tbl text_tbl, int page_id, int ns_id, byte[] ttl_wo_ns, boolean redirect, DateAdp modified_on, byte[] text_zip_data, int text_raw_len, int random_int, int text_db_id, int html_db_id) { - core_tbl.Insert_cmd_by_batch(page_id, ns_id, ttl_wo_ns, redirect, modified_on, text_raw_len, random_int, text_db_id, html_db_id); - text_tbl.Insert_cmd_by_batch(page_id, text_zip_data); +package gplx.core.net; import gplx.*; import gplx.core.*; +import gplx.ios.*; +class Gfo_inet_conn__http implements Gfo_inet_conn { + private final IoEngine_xrg_downloadFil downloader = IoEngine_xrg_downloadFil.new_("", Io_url_.Empty); + public void Clear() {throw Err_.new_unsupported();} + public void Upload_by_bytes(String url, byte[] data) {throw Err_.new_unsupported();} + public byte[] Download_as_bytes_or_null(String url) { + try {return downloader.Exec_as_bry(url);} + catch (Exception e) {Err_.Noop(e); return null;} } } diff --git a/400_xowa/src/gplx/core/net/Gfo_qarg_mgr.java b/400_xowa/src/gplx/core/net/Gfo_qarg_mgr.java index 9cb3f02a5..53b8b0b43 100644 --- a/400_xowa/src/gplx/core/net/Gfo_qarg_mgr.java +++ b/400_xowa/src/gplx/core/net/Gfo_qarg_mgr.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.core.net; import gplx.*; import gplx.core.*; +import gplx.langs.htmls.encoders.*; public class Gfo_qarg_mgr { private final List_adp list = List_adp_.new_(); private final Hash_adp hash = Hash_adp_bry.cs(); diff --git a/400_xowa/src/gplx/core/net/Gfo_url_parser.java b/400_xowa/src/gplx/core/net/Gfo_url_parser.java index 4e106dfb0..e81ab00a2 100644 --- a/400_xowa/src/gplx/core/net/Gfo_url_parser.java +++ b/400_xowa/src/gplx/core/net/Gfo_url_parser.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.core.net; import gplx.*; import gplx.core.*; -import gplx.core.primitives.*; import gplx.core.btries.*; +import gplx.core.primitives.*; import gplx.core.btries.*; import gplx.langs.htmls.encoders.*; public class Gfo_url_parser { private final Btrie_slim_mgr protocols = Btrie_slim_mgr.ci_a7(); // ASCII:url_protocol; EX:"http:", "ftp:", etc private final Bry_ary segs_ary = new Bry_ary(4), qargs = new Bry_ary(4); @@ -46,7 +46,7 @@ public class Gfo_url_parser { rel = true; } if (!rel) { // search for ":"; NOTE: only search if not rel; i.e.: "//" - int colon_pos = Bry_finder.Find_fwd(src, Byte_ascii.Colon, pos, src_end); // no colon found; EX: "//a.org/b"; "a.org/b" + int colon_pos = Bry_find_.Find_fwd(src, Byte_ascii.Colon, pos, src_end); // no colon found; EX: "//a.org/b"; "a.org/b" if (colon_pos != Bry_.NotFound) // colon found; EX: "http://" or "https://" pos = colon_pos + Int_.Const_dlm_len; if (pos < src_end && src[pos] == Byte_ascii.Slash) { // skip slash after colon @@ -55,7 +55,7 @@ public class Gfo_url_parser { pos += 1; } } - int slash_pos = Bry_finder.Find_fwd(src, Byte_ascii.Slash, pos, src_end); + int slash_pos = Bry_find_.Find_fwd(src, Byte_ascii.Slash, pos, src_end); if (slash_pos == Bry_.NotFound) // no terminating slash; EX: http://a.org slash_pos = src_end; slash_pos = Bry_.Trim_end_pos(src, slash_pos); @@ -79,7 +79,7 @@ public class Gfo_url_parser { int pos = src_bgn; Object protocol_obj = protocols.Match_bgn(src, src_bgn, src_end); pos = protocols.Match_pos(); - pos = Bry_finder.Find_fwd_while(src, pos, src_end, Byte_ascii.Slash); + pos = Bry_find_.Find_fwd_while(src, pos, src_end, Byte_ascii.Slash); if (protocol_obj == null) { this.protocol_tid = Gfo_protocol_itm.Tid_unknown; } @@ -130,7 +130,7 @@ public class Gfo_url_parser { case Area__qarg_key_1st: case Area__qarg_key_nth: if (anch_nth_bgn == -1) - anch_nth_bgn = Bry_finder.Find_bwd(src, Byte_ascii.Hash, src_end); + anch_nth_bgn = Bry_find_.Find_bwd(src, Byte_ascii.Hash, src_end); if (pos == anch_nth_bgn) { End_area(pos, b); area = Area__anch; diff --git a/400_xowa/src/gplx/core/net/Http_request_parser.java b/400_xowa/src/gplx/core/net/Http_request_parser.java index 92469e858..35720ac17 100644 --- a/400_xowa/src/gplx/core/net/Http_request_parser.java +++ b/400_xowa/src/gplx/core/net/Http_request_parser.java @@ -64,7 +64,7 @@ public class Http_request_parser { server_wtr.Write_str_w_nl(String_.Format("http.request.parser; unknown line; line={0} request={1}", line_str, To_str())); continue; } - int val_bgn = Bry_finder.Find_fwd_while_ws(line, trie.Match_pos(), line_len); // skip ws after key; EX: "Host: " + int val_bgn = Bry_find_.Find_fwd_while_ws(line, trie.Match_pos(), line_len); // skip ws after key; EX: "Host: " int tid = ((Int_obj_val)o).Val(); switch (tid) { case Tid_get: @@ -91,7 +91,7 @@ public class Http_request_parser { } } private void Parse_type(int tid, int val_bgn, byte[] line, int line_len) { // EX: "POST /xowa-cmd:exec_as_json HTTP/1.1" - int url_end = Bry_finder.Find_bwd(line, Byte_ascii.Space, line_len); if (url_end == Bry_finder.Not_found) throw Err_.new_wo_type("invalid protocol", "line", line, "request", To_str()); + int url_end = Bry_find_.Find_bwd(line, Byte_ascii.Space, line_len); if (url_end == Bry_find_.Not_found) throw Err_.new_wo_type("invalid protocol", "line", line, "request", To_str()); switch (tid) { case Tid_get : this.type = Http_request_itm.Type_get; break; case Tid_post : this.type = Http_request_itm.Type_post; break; @@ -102,8 +102,8 @@ public class Http_request_parser { } private void Parse_content_type(int val_bgn, byte[] line, int line_len) { // EX: Content-Type: multipart/form-data; boundary=---------------------------72432484930026 // handle wolfram and other clients; DATE:2015-08-03 - int boundary_bgn = Bry_finder.Find_fwd(line, Tkn_boundary, val_bgn, line_len); if (boundary_bgn == Bry_finder.Not_found) return; // PURPOSE: ignore content-type for GET calls like by Mathematica server; DATE:2015-08-04 // throw Err_.new_wo_type("invalid content_type", "line", line, "request", To_str()); - int content_type_end = Bry_finder.Find_bwd(line, Byte_ascii.Semic, boundary_bgn); + int boundary_bgn = Bry_find_.Find_fwd(line, Tkn_boundary, val_bgn, line_len); if (boundary_bgn == Bry_find_.Not_found) return; // PURPOSE: ignore content-type for GET calls like by Mathematica server; DATE:2015-08-04 // throw Err_.new_wo_type("invalid content_type", "line", line, "request", To_str()); + int content_type_end = Bry_find_.Find_bwd(line, Byte_ascii.Semic, boundary_bgn); this.content_type = Bry_.Mid(line, val_bgn, content_type_end); this.content_type_boundary = Bry_.Add(Tkn_content_type_boundary_end, Bry_.Mid(line, boundary_bgn += Tkn_boundary.length, line_len)); } @@ -142,7 +142,7 @@ public class Http_request_parser { int tkn_len = tkn.length; if (!Bry_.Match(src, src_pos, src_pos + tkn_len, tkn)) throw Err_.new_wo_type("http.request.parser; invalid form_data line", "tkn", tkn, "line", src, "request", To_str()); int rv = src_pos += tkn_len; - return Bry_finder.Find_fwd_while_ws(src, rv, src_len); + return Bry_find_.Find_fwd_while_ws(src, rv, src_len); } private String To_str() {return Make_request_itm().To_str(tmp_bfr, Bool_.N);} private static final int Tid_get = 1, Tid_post = 2, Tid_host = 3, Tid_user_agent = 4, Tid_accept = 5, Tid_accept_language = 6, Tid_accept_encoding = 7, Tid_dnt = 8 diff --git a/400_xowa/src/gplx/core/primitives/Int_ary.java b/400_xowa/src/gplx/core/primitives/Int_ary.java index dec9c2e66..047dc4413 100644 --- a/400_xowa/src/gplx/core/primitives/Int_ary.java +++ b/400_xowa/src/gplx/core/primitives/Int_ary.java @@ -46,6 +46,10 @@ public class Int_ary { ary[len] = v; ++len; } + public int Pop_or_fail() { + if (len == 0) throw Err_.new_("core.int_ary", "stack is empty"); + return Pop_or(-1); + } public int Pop_or(int or) { if (len == 0) return or; int rv = ary[len - 1]; diff --git a/400_xowa/src/gplx/core/ints/Int_ary_bldr.java b/400_xowa/src/gplx/core/primitives/Int_ary_bldr.java similarity index 92% rename from 400_xowa/src/gplx/core/ints/Int_ary_bldr.java rename to 400_xowa/src/gplx/core/primitives/Int_ary_bldr.java index 7e39ef74c..5309f7bec 100644 --- a/400_xowa/src/gplx/core/ints/Int_ary_bldr.java +++ b/400_xowa/src/gplx/core/primitives/Int_ary_bldr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.ints; import gplx.*; import gplx.core.*; +package gplx.core.primitives; import gplx.*; import gplx.core.*; public class Int_ary_bldr { public Int_ary_bldr(int len) {ary = new int[len];} public Int_ary_bldr Set(int idx, int val) {ary[idx] = val; return this;} diff --git a/400_xowa/src/gplx/core/primitives/Int_pool.java b/400_xowa/src/gplx/core/primitives/Int_pool.java new file mode 100644 index 000000000..116b9da5b --- /dev/null +++ b/400_xowa/src/gplx/core/primitives/Int_pool.java @@ -0,0 +1,59 @@ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012 gnosygnu@gmail.com + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ +package gplx.core.primitives; import gplx.*; import gplx.core.*; +public class Int_pool { + private final List_adp available_list = List_adp_.new_(); private int available_len; + private int uid_max = -1; + public void Clear() { + available_list.Clear(); + available_len = 0; + uid_max = -1; + } + public int Get_next() { + synchronized (available_list) { + if (available_len == 0) + return ++uid_max; + else { + Int_obj_val val = (Int_obj_val)List_adp_.Pop_last(available_list); + --available_len; + return val.Val(); + } + } + } + public void Del(int v) { + if (v > uid_max) throw Err_.new_("core", "value is greater than range", "value", v, "max", uid_max); + synchronized (available_list) { + if (available_len == 0 && v == uid_max) { + --this.uid_max; + return; + } + if (available_len == uid_max) { + available_list.Sort(); + for (int i = 0; i < available_len; ++i) { + Int_obj_val itm = (Int_obj_val)available_list.Get_at(i); + if (i != itm.Val()) throw Err_.new_("core", "available_list out of order", "contents", available_list.To_str()); + } + this.Clear(); + } + else { + available_list.Add(Int_obj_val.new_(v)); + ++available_len; + } + } + } +} diff --git a/400_xowa/src/gplx/core/primitives/Int_pool_tst.java b/400_xowa/src/gplx/core/primitives/Int_pool_tst.java new file mode 100644 index 000000000..5ab6e2519 --- /dev/null +++ b/400_xowa/src/gplx/core/primitives/Int_pool_tst.java @@ -0,0 +1,67 @@ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012 gnosygnu@gmail.com + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ +package gplx.core.primitives; import gplx.*; import gplx.core.*; +import org.junit.*; +public class Int_pool_tst { + private final Int_pool_tstr tstr = new Int_pool_tstr(); + @Before public void init() {tstr.Clear();} + @Test public void Get__one() { + tstr.Test_get(0); + } + @Test public void Get__many() { + tstr.Test_get(0); + tstr.Test_get(1); + tstr.Test_get(2); + } + @Test public void Del__one() { + tstr.Test_get(0); + tstr.Exec_del(0); + tstr.Test_get(0); + } + @Test public void Del__sequential() { + tstr.Test_get(0); + tstr.Test_get(1); + tstr.Test_get(2); + tstr.Exec_del(2).Test_get(2); + tstr.Exec_del(2); + tstr.Exec_del(1); + tstr.Exec_del(0).Test_get(0); + } + @Test public void Del__out_of_order() { + tstr.Test_get(0); + tstr.Test_get(1); + tstr.Test_get(2); + tstr.Exec_del(0).Test_get(0); + tstr.Exec_del(0); + tstr.Exec_del(1); + tstr.Exec_del(2); + tstr.Test_get(0); + } +} +class Int_pool_tstr { + private final Int_pool pool = new Int_pool(); + public void Clear() {pool.Clear();} + public Int_pool_tstr Test_get(int expd) { + Tfds.Eq(expd, pool.Get_next()); + return this; + } + public Int_pool_tstr Exec_del(int val) { + pool.Del(val); + return this; + } +} diff --git a/400_xowa/src_060_utl/gplx/Number_parser.java b/400_xowa/src/gplx/core/primitives/Number_parser.java similarity index 96% rename from 400_xowa/src_060_utl/gplx/Number_parser.java rename to 400_xowa/src/gplx/core/primitives/Number_parser.java index 4cc8c4ac8..812fe387a 100644 --- a/400_xowa/src_060_utl/gplx/Number_parser.java +++ b/400_xowa/src/gplx/core/primitives/Number_parser.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.core.primitives; import gplx.*; import gplx.core.*; public class Number_parser { public int Rv_as_int() {return (int)int_val;} private long int_val = 0; public Decimal_adp Rv_as_dec() {return dec_val == null ? Decimal_adp_.long_(int_val) : dec_val;} private Decimal_adp dec_val = null; diff --git a/400_xowa/src_060_utl/gplx/Number_parser_tst.java b/400_xowa/src/gplx/core/primitives/Number_parser_tst.java similarity index 96% rename from 400_xowa/src_060_utl/gplx/Number_parser_tst.java rename to 400_xowa/src/gplx/core/primitives/Number_parser_tst.java index 5d018e43f..b736d6770 100644 --- a/400_xowa/src_060_utl/gplx/Number_parser_tst.java +++ b/400_xowa/src/gplx/core/primitives/Number_parser_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.core.primitives; import gplx.*; import gplx.core.*; import org.junit.*; public class Number_parser_tst { private final Number_parser_fxt fxt = new Number_parser_fxt(); diff --git a/400_xowa/src_060_utl/gplx/Obj_ary_parser_base.java b/400_xowa/src/gplx/core/primitives/Obj_ary_parser_base.java similarity index 94% rename from 400_xowa/src_060_utl/gplx/Obj_ary_parser_base.java rename to 400_xowa/src/gplx/core/primitives/Obj_ary_parser_base.java index 8cf1bbf4b..6cc6cfe09 100644 --- a/400_xowa/src_060_utl/gplx/Obj_ary_parser_base.java +++ b/400_xowa/src/gplx/core/primitives/Obj_ary_parser_base.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.core.primitives; import gplx.*; import gplx.core.*; public abstract class Obj_ary_parser_base { int pos_len = 4; int[] pos; protected abstract void Ary_len_(int v); diff --git a/400_xowa/src_060_utl/gplx/Tst_chkr.java b/400_xowa/src/gplx/core/tests/Tst_chkr.java similarity index 94% rename from 400_xowa/src_060_utl/gplx/Tst_chkr.java rename to 400_xowa/src/gplx/core/tests/Tst_chkr.java index fb3173a59..89e185454 100644 --- a/400_xowa/src_060_utl/gplx/Tst_chkr.java +++ b/400_xowa/src/gplx/core/tests/Tst_chkr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.core.tests; import gplx.*; import gplx.core.*; public interface Tst_chkr { Class TypeOf(); int Chk(Tst_mgr mgr, String path, Object actl); diff --git a/400_xowa/src_060_utl/gplx/Tst_mgr.java b/400_xowa/src/gplx/core/tests/Tst_mgr.java similarity index 97% rename from 400_xowa/src_060_utl/gplx/Tst_mgr.java rename to 400_xowa/src/gplx/core/tests/Tst_mgr.java index 771a7e469..4beee35fb 100644 --- a/400_xowa/src_060_utl/gplx/Tst_mgr.java +++ b/400_xowa/src/gplx/core/tests/Tst_mgr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.core.tests; import gplx.*; import gplx.core.*; import gplx.core.strings.*; public class Tst_mgr { public Tst_mgr ThrowError_n_() {throwError = false; return this;} private boolean throwError = true; diff --git a/400_xowa/src/gplx/fsdb/data/Fsd_fil_tbl.java b/400_xowa/src/gplx/fsdb/data/Fsd_fil_tbl.java index 75f735dc8..abf77c1d7 100644 --- a/400_xowa/src/gplx/fsdb/data/Fsd_fil_tbl.java +++ b/400_xowa/src/gplx/fsdb/data/Fsd_fil_tbl.java @@ -88,7 +88,7 @@ public class Fsd_fil_tbl implements RlsAble { } finally {rdr.Rls();} } - public void Select_all(Bry_bfr key_bfr, gplx.cache.Gfo_cache_mgr_bry cache) { + public void Select_all(Bry_bfr key_bfr, gplx.core.caches.Gfo_cache_mgr_bry cache) { Db_rdr rdr = conn.Stmt_select(tbl_name, flds, Db_meta_fld.Ary_empty).Exec_select__rls_auto(); try { while (rdr.Move_next()) { diff --git a/400_xowa/src/gplx/fsdb/meta/Fsm_atr_fil.java b/400_xowa/src/gplx/fsdb/meta/Fsm_atr_fil.java index de484f538..57a12bb95 100644 --- a/400_xowa/src/gplx/fsdb/meta/Fsm_atr_fil.java +++ b/400_xowa/src/gplx/fsdb/meta/Fsm_atr_fil.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.fsdb.meta; import gplx.*; import gplx.fsdb.*; -import gplx.core.primitives.*; import gplx.cache.*; import gplx.ios.*; +import gplx.core.primitives.*; import gplx.core.caches.*; import gplx.ios.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.fsdb.data.*; public class Fsm_atr_fil { private final Fsm_mnt_itm mnt_itm; private final int mnt_id; diff --git a/400_xowa/src/gplx/gfui/Gfui_bnd_parser.java b/400_xowa/src/gplx/gfui/Gfui_bnd_parser.java index 00160e73c..4eaea37e1 100644 --- a/400_xowa/src/gplx/gfui/Gfui_bnd_parser.java +++ b/400_xowa/src/gplx/gfui/Gfui_bnd_parser.java @@ -102,7 +102,7 @@ public class Gfui_bnd_parser { if (is_numeric) { // EX: "key.#10" or "#10" int tkn_bgn = itm_bgn; if (src_is_gfui) { // remove "key." in "key.#10" - tkn_bgn = Bry_finder.Move_fwd(src, Byte_ascii.Dot, itm_bgn, itm_end); + tkn_bgn = Bry_find_.Move_fwd(src, Byte_ascii.Dot, itm_bgn, itm_end); if (tkn_bgn == -1) throw Err_.new_wo_type("invalid keycode.dot", "keycode", Bry_.Mid(src, tkn_bgn, itm_end)); ++tkn_bgn; // skip # } diff --git a/400_xowa/src/gplx/ios/Io_buffer_rdr.java b/400_xowa/src/gplx/ios/Io_buffer_rdr.java index b9cd232b4..12061fb79 100644 --- a/400_xowa/src/gplx/ios/Io_buffer_rdr.java +++ b/400_xowa/src/gplx/ios/Io_buffer_rdr.java @@ -60,7 +60,7 @@ public class Io_buffer_rdr implements RlsAble { if (rdr != null) rdr.Rls(); } @gplx.Internal protected void Dump_to_file(int bgn, int len, String url_str, String msg) { // DBG: - String text = String_.new_u8_by_len(bfr, bgn, len); + String text = String_.new_u8__by_len(bfr, bgn, len); Io_mgr.I.AppendFilStr(Io_url_.new_any_(url_str), msg + text + "\n"); } public static Io_buffer_rdr new_(Io_stream_rdr rdr, int bfr_len) { diff --git a/400_xowa/src/gplx/ios/Io_fil_chkr.java b/400_xowa/src/gplx/ios/Io_fil_chkr.java index d22e112d1..df6d88774 100644 --- a/400_xowa/src/gplx/ios/Io_fil_chkr.java +++ b/400_xowa/src/gplx/ios/Io_fil_chkr.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.ios; import gplx.*; +import gplx.core.tests.*; public class Io_fil_chkr implements Tst_chkr { public Io_fil_chkr(Io_url url, String data) {this.expd_url = url; this.expd_data = data;} public Io_url Expd_url() {return expd_url;} public Io_fil_chkr Expd_url_(Io_url v) {expd_url = v; return this;} Io_url expd_url; diff --git a/400_xowa/src/gplx/ios/Io_line_rdr.java b/400_xowa/src/gplx/ios/Io_line_rdr.java index 11e004bcd..755eef9cc 100644 --- a/400_xowa/src/gplx/ios/Io_line_rdr.java +++ b/400_xowa/src/gplx/ios/Io_line_rdr.java @@ -42,7 +42,7 @@ public class Io_line_rdr { public Io_line_rdr_key_gen Key_gen() {return key_gen;} public Io_line_rdr Key_gen_(Io_line_rdr_key_gen v) {key_gen = v; return this;} Io_line_rdr_key_gen key_gen = Io_line_rdr_key_gen_.first_pipe; public void Truncate(int pos) { this.Read_next(); - int end = Bry_finder.Find_fwd(bfr, Byte_ascii.Null); if (end == -1) end = bfr.length; + int end = Bry_find_.Find_fwd(bfr, Byte_ascii.Null); if (end == -1) end = bfr.length; bfr = Bry_.Mid(bfr, pos, end); bfr_len = bfr.length; bfr_last_read = 0; @@ -139,7 +139,7 @@ public class Io_line_rdr { if (file_skip_line0) { byte[] stream_bry = Io_mgr.I.LoadFilBry(url); int stream_bry_len = stream_bry.length; - int nl_pos = Bry_finder.Find_fwd(stream_bry, Byte_ascii.Nl, 0, stream_bry_len); + int nl_pos = Bry_find_.Find_fwd(stream_bry, Byte_ascii.Nl, 0, stream_bry_len); if (nl_pos == Bry_.NotFound) stream_bry = Bry_.Empty; else diff --git a/400_xowa/src/gplx/srls/dsvs/Dsv_fld_parser.java b/400_xowa/src/gplx/langs/dsvs/Dsv_fld_parser.java similarity index 93% rename from 400_xowa/src/gplx/srls/dsvs/Dsv_fld_parser.java rename to 400_xowa/src/gplx/langs/dsvs/Dsv_fld_parser.java index fe67f1aae..7a9f40185 100644 --- a/400_xowa/src/gplx/srls/dsvs/Dsv_fld_parser.java +++ b/400_xowa/src/gplx/langs/dsvs/Dsv_fld_parser.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.srls.dsvs; import gplx.*; import gplx.srls.*; +package gplx.langs.dsvs; import gplx.*; import gplx.langs.*; public interface Dsv_fld_parser { void Init(byte fld_dlm, byte row_dlm); int Parse(Dsv_tbl_parser tbl_parser, Dsv_wkr_base mgr, byte[] src, int pos, int src_len, int fld_idx, int fld_bgn); diff --git a/400_xowa/src/gplx/srls/dsvs/Dsv_fld_parser_.java b/400_xowa/src/gplx/langs/dsvs/Dsv_fld_parser_.java similarity index 94% rename from 400_xowa/src/gplx/srls/dsvs/Dsv_fld_parser_.java rename to 400_xowa/src/gplx/langs/dsvs/Dsv_fld_parser_.java index 90a55f0ce..fafb57994 100644 --- a/400_xowa/src/gplx/srls/dsvs/Dsv_fld_parser_.java +++ b/400_xowa/src/gplx/langs/dsvs/Dsv_fld_parser_.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.srls.dsvs; import gplx.*; import gplx.srls.*; +package gplx.langs.dsvs; import gplx.*; import gplx.langs.*; public class Dsv_fld_parser_ { public static final Dsv_fld_parser Bry_parser = Dsv_fld_parser_bry._; public static final Dsv_fld_parser Int_parser = Dsv_fld_parser_int._; @@ -35,8 +35,8 @@ class Dsv_fld_parser_line implements Dsv_fld_parser { boolean pos_is_last = pos == src_len; byte b = pos_is_last ? row_dlm : src[pos]; if (b == comment_dlm) { - pos = Bry_finder.Find_fwd_until(src, pos, src_len, row_dlm); - if (pos == Bry_finder.Not_found) + pos = Bry_find_.Find_fwd_until(src, pos, src_len, row_dlm); + if (pos == Bry_find_.Not_found) pos = src_len; } else if (b == row_dlm) { diff --git a/400_xowa/src/gplx/srls/dsvs/Dsv_tbl_parser.java b/400_xowa/src/gplx/langs/dsvs/Dsv_tbl_parser.java similarity index 96% rename from 400_xowa/src/gplx/srls/dsvs/Dsv_tbl_parser.java rename to 400_xowa/src/gplx/langs/dsvs/Dsv_tbl_parser.java index 705ddf227..38963b8c8 100644 --- a/400_xowa/src/gplx/srls/dsvs/Dsv_tbl_parser.java +++ b/400_xowa/src/gplx/langs/dsvs/Dsv_tbl_parser.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.srls.dsvs; import gplx.*; import gplx.srls.*; +package gplx.langs.dsvs; import gplx.*; import gplx.langs.*; public class Dsv_tbl_parser implements GfoInvkAble, RlsAble { private Dsv_wkr_base mgr; private Dsv_fld_parser[] fld_parsers = new Dsv_fld_parser[2]; diff --git a/400_xowa/src/gplx/srls/dsvs/Dsv_tbl_parser_int_tst.java b/400_xowa/src/gplx/langs/dsvs/Dsv_tbl_parser_int_tst.java similarity index 95% rename from 400_xowa/src/gplx/srls/dsvs/Dsv_tbl_parser_int_tst.java rename to 400_xowa/src/gplx/langs/dsvs/Dsv_tbl_parser_int_tst.java index 1c552d2db..e18321865 100644 --- a/400_xowa/src/gplx/srls/dsvs/Dsv_tbl_parser_int_tst.java +++ b/400_xowa/src/gplx/langs/dsvs/Dsv_tbl_parser_int_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.srls.dsvs; import gplx.*; import gplx.srls.*; +package gplx.langs.dsvs; import gplx.*; import gplx.langs.*; import org.junit.*; public class Dsv_tbl_parser_int_tst { private Dsv_mok_fxt fxt = new Dsv_mok_fxt(); diff --git a/400_xowa/src/gplx/srls/dsvs/Dsv_tbl_parser_str_tst.java b/400_xowa/src/gplx/langs/dsvs/Dsv_tbl_parser_str_tst.java similarity index 95% rename from 400_xowa/src/gplx/srls/dsvs/Dsv_tbl_parser_str_tst.java rename to 400_xowa/src/gplx/langs/dsvs/Dsv_tbl_parser_str_tst.java index 94cf09922..67d44c6b7 100644 --- a/400_xowa/src/gplx/srls/dsvs/Dsv_tbl_parser_str_tst.java +++ b/400_xowa/src/gplx/langs/dsvs/Dsv_tbl_parser_str_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.srls.dsvs; import gplx.*; import gplx.srls.*; +package gplx.langs.dsvs; import gplx.*; import gplx.langs.*; import org.junit.*; public class Dsv_tbl_parser_str_tst { private Dsv_mok_fxt fxt = new Dsv_mok_fxt(); diff --git a/400_xowa/src/gplx/srls/dsvs/Dsv_wkr_base.java b/400_xowa/src/gplx/langs/dsvs/Dsv_wkr_base.java similarity index 95% rename from 400_xowa/src/gplx/srls/dsvs/Dsv_wkr_base.java rename to 400_xowa/src/gplx/langs/dsvs/Dsv_wkr_base.java index c59763d23..a5244e682 100644 --- a/400_xowa/src/gplx/srls/dsvs/Dsv_wkr_base.java +++ b/400_xowa/src/gplx/langs/dsvs/Dsv_wkr_base.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.srls.dsvs; import gplx.*; import gplx.srls.*; +package gplx.langs.dsvs; import gplx.*; import gplx.langs.*; public abstract class Dsv_wkr_base implements GfoInvkAble { public abstract Dsv_fld_parser[] Fld_parsers(); public byte[] Src() {return src;} private byte[] src; diff --git a/400_xowa/src/gplx/gfs/Gfs_lxr.java b/400_xowa/src/gplx/langs/gfss/Gfs_lxr.java similarity index 87% rename from 400_xowa/src/gplx/gfs/Gfs_lxr.java rename to 400_xowa/src/gplx/langs/gfss/Gfs_lxr.java index 1361df77e..e47b6950f 100644 --- a/400_xowa/src/gplx/gfs/Gfs_lxr.java +++ b/400_xowa/src/gplx/langs/gfss/Gfs_lxr.java @@ -15,13 +15,13 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.gfs; import gplx.*; +package gplx.langs.gfss; import gplx.*; import gplx.langs.*; interface Gfs_lxr { - byte Lxr_tid(); + int Lxr_tid(); int Process(Gfs_parser_ctx ctx, int bgn, int end); } class Gfs_lxr_whitespace implements Gfs_lxr { - public byte Lxr_tid() {return Gfs_lxr_.Tid_whitespace;} + public int Lxr_tid() {return Gfs_lxr_.Tid_whitespace;} public int Process(Gfs_parser_ctx ctx, int bgn, int end) { byte[] src = ctx.Src(); int src_len = ctx.Src_len(); int rv = Gfs_lxr_.Rv_eos, cur_pos; @@ -52,10 +52,10 @@ class Gfs_lxr_comment_flat implements Gfs_lxr { this.bgn_bry = bgn_bry; this.bgn_bry_len = bgn_bry.length; this.end_bry = end_bry; this.end_bry_len = end_bry.length; } byte[] bgn_bry, end_bry; int bgn_bry_len, end_bry_len; - public byte Lxr_tid() {return Gfs_lxr_.Tid_comment;} + public int Lxr_tid() {return Gfs_lxr_.Tid_comment;} public int Process(Gfs_parser_ctx ctx, int lxr_bgn, int lxr_end) { byte[] src = ctx.Src(); int src_len = ctx.Src_len(); - int end_pos = Bry_finder.Find_fwd(src, end_bry, lxr_end, src_len); + int end_pos = Bry_find_.Find_fwd(src, end_bry, lxr_end, src_len); // if (end_pos == Bry_.NotFound) throw Err_.new_fmt_("comment is not closed: {0}", String_.new_u8(end_bry)); return (end_pos == Bry_.NotFound) ? src_len // allow eos to terminate flat comment; needed for "tidy-always-adds-nl-in-textarea" fix; NOTE: DATE:2014-06-21 @@ -63,7 +63,7 @@ class Gfs_lxr_comment_flat implements Gfs_lxr { } } class Gfs_lxr_identifier implements Gfs_lxr { - public byte Lxr_tid() {return Gfs_lxr_.Tid_identifier;} + public int Lxr_tid() {return Gfs_lxr_.Tid_identifier;} public int Process(Gfs_parser_ctx ctx, int bgn, int end) { byte[] src = ctx.Src(); int src_len = ctx.Src_len(); int pos, rv = Gfs_lxr_.Rv_eos; @@ -92,7 +92,7 @@ class Gfs_lxr_identifier implements Gfs_lxr { public static final Gfs_lxr_identifier _ = new Gfs_lxr_identifier(); Gfs_lxr_identifier() {} } class Gfs_lxr_semic implements Gfs_lxr { - public byte Lxr_tid() {return Gfs_lxr_.Tid_semic;} + public int Lxr_tid() {return Gfs_lxr_.Tid_semic;} public int Process(Gfs_parser_ctx ctx, int bgn, int end) { switch (ctx.Prv_lxr()) { case Gfs_lxr_.Tid_identifier: ctx.Make_nde(bgn, end); ctx.Cur_nde_from_stack(); break; // a; @@ -106,7 +106,7 @@ class Gfs_lxr_semic implements Gfs_lxr { public static final Gfs_lxr_semic _ = new Gfs_lxr_semic(); Gfs_lxr_semic() {} } class Gfs_lxr_dot implements Gfs_lxr { - public byte Lxr_tid() {return Gfs_lxr_.Tid_dot;} + public int Lxr_tid() {return Gfs_lxr_.Tid_dot;} public int Process(Gfs_parser_ctx ctx, int bgn, int end) { switch (ctx.Prv_lxr()) { case Gfs_lxr_.Tid_identifier: ctx.Make_nde(bgn, end); break; // a. @@ -118,7 +118,7 @@ class Gfs_lxr_dot implements Gfs_lxr { public static final Gfs_lxr_dot _ = new Gfs_lxr_dot(); Gfs_lxr_dot() {} } class Gfs_lxr_paren_bgn implements Gfs_lxr { - public byte Lxr_tid() {return Gfs_lxr_.Tid_paren_bgn;} + public int Lxr_tid() {return Gfs_lxr_.Tid_paren_bgn;} public int Process(Gfs_parser_ctx ctx, int bgn, int end) { switch (ctx.Prv_lxr()) { case Gfs_lxr_.Tid_identifier: ctx.Make_nde(bgn, end); break; // a(; @@ -129,7 +129,7 @@ class Gfs_lxr_paren_bgn implements Gfs_lxr { public static final Gfs_lxr_paren_bgn _ = new Gfs_lxr_paren_bgn(); Gfs_lxr_paren_bgn() {} } class Gfs_lxr_paren_end implements Gfs_lxr { - public byte Lxr_tid() {return Gfs_lxr_.Tid_paren_end;} + public int Lxr_tid() {return Gfs_lxr_.Tid_paren_end;} public int Process(Gfs_parser_ctx ctx, int bgn, int end) { switch (ctx.Prv_lxr()) { case Gfs_lxr_.Tid_paren_bgn: @@ -146,10 +146,10 @@ class Gfs_lxr_quote implements Gfs_lxr { this.bgn_bry_len = bgn_bry.length; this.end_bry = end_bry; this.end_bry_len = end_bry.length; } private byte[] end_bry; private int bgn_bry_len, end_bry_len; - public byte Lxr_tid() {return Gfs_lxr_.Tid_quote;} + public int Lxr_tid() {return Gfs_lxr_.Tid_quote;} public int Process(Gfs_parser_ctx ctx, int lxr_bgn, int lxr_end) { byte[] src = ctx.Src(); int src_len = ctx.Src_len(); - int end_pos = Bry_finder.Find_fwd(src, end_bry, lxr_end, src_len); + int end_pos = Bry_find_.Find_fwd(src, end_bry, lxr_end, src_len); if (end_pos == Bry_.NotFound) throw Err_.new_wo_type("quote is not closed", "end", String_.new_u8(end_bry)); Bry_bfr bfr = ctx.Tmp_bfr().Clear(); int prv_pos = lxr_end; @@ -159,7 +159,7 @@ class Gfs_lxr_quote implements Gfs_lxr { bfr.Add_mid(src, prv_pos, end_pos); // add everything up to end_bry bfr.Add(end_bry); // add end_bry prv_pos = nxt_pos + end_bry_len; // set prv_pos to after doubled end_bry - end_pos = Bry_finder.Find_fwd(src, end_bry, prv_pos, src_len); + end_pos = Bry_find_.Find_fwd(src, end_bry, prv_pos, src_len); if (end_pos == Bry_.NotFound) throw Err_.new_wo_type("quote is not closed", "end", String_.new_u8(end_bry)); nxt_pos = end_pos + end_bry_len; if (!Bry_.Match(src, nxt_pos, nxt_pos + end_bry_len, end_bry)) { @@ -175,7 +175,7 @@ class Gfs_lxr_quote implements Gfs_lxr { } } class Gfs_lxr_curly_bgn implements Gfs_lxr { - public byte Lxr_tid() {return Gfs_lxr_.Tid_curly_bgn;} + public int Lxr_tid() {return Gfs_lxr_.Tid_curly_bgn;} public int Process(Gfs_parser_ctx ctx, int bgn, int end) { switch (ctx.Prv_lxr()) { case Gfs_lxr_.Tid_identifier: ctx.Make_nde(bgn, end); ctx.Stack_add(); break; // a{; @@ -187,7 +187,7 @@ class Gfs_lxr_curly_bgn implements Gfs_lxr { public static final Gfs_lxr_curly_bgn _ = new Gfs_lxr_curly_bgn(); Gfs_lxr_curly_bgn() {} } class Gfs_lxr_curly_end implements Gfs_lxr { - public byte Lxr_tid() {return Gfs_lxr_.Tid_curly_end;} + public int Lxr_tid() {return Gfs_lxr_.Tid_curly_end;} public int Process(Gfs_parser_ctx ctx, int bgn, int end) { ctx.Stack_pop(bgn); return end; @@ -195,7 +195,7 @@ class Gfs_lxr_curly_end implements Gfs_lxr { public static final Gfs_lxr_curly_end _ = new Gfs_lxr_curly_end(); Gfs_lxr_curly_end() {} } class Gfs_lxr_equal implements Gfs_lxr { - public byte Lxr_tid() {return Gfs_lxr_.Tid_eq;} + public int Lxr_tid() {return Gfs_lxr_.Tid_eq;} public int Process(Gfs_parser_ctx ctx, int bgn, int end) { ctx.Make_nde(bgn, end).Op_tid_(Gfs_nde.Op_tid_assign); return end; @@ -203,7 +203,7 @@ class Gfs_lxr_equal implements Gfs_lxr { public static final Gfs_lxr_equal _ = new Gfs_lxr_equal(); Gfs_lxr_equal() {} } class Gfs_lxr_comma implements Gfs_lxr { - public byte Lxr_tid() {return Gfs_lxr_.Tid_comma;} + public int Lxr_tid() {return Gfs_lxr_.Tid_comma;} public int Process(Gfs_parser_ctx ctx, int bgn, int end) { switch (ctx.Prv_lxr()) { case Gfs_lxr_.Tid_identifier: ctx.Make_atr_by_idf(); break; // 123, diff --git a/400_xowa/src/gplx/gfs/Gfs_lxr_.java b/400_xowa/src/gplx/langs/gfss/Gfs_lxr_.java similarity index 79% rename from 400_xowa/src/gplx/gfs/Gfs_lxr_.java rename to 400_xowa/src/gplx/langs/gfss/Gfs_lxr_.java index 41e058b89..8f532c2ea 100644 --- a/400_xowa/src/gplx/gfs/Gfs_lxr_.java +++ b/400_xowa/src/gplx/langs/gfss/Gfs_lxr_.java @@ -15,11 +15,11 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.gfs; import gplx.*; +package gplx.langs.gfss; import gplx.*; import gplx.langs.*; class Gfs_lxr_ { public static final int Rv_init = -1, Rv_null = -2, Rv_eos = -3, Rv_lxr = -4; - public static final byte Tid_identifier = 1, Tid_dot = 2, Tid_semic = 3, Tid_paren_bgn = 4, Tid_paren_end = 5, Tid_curly_bgn = 6, Tid_curly_end = 7, Tid_quote = 8, Tid_comma = 9, Tid_whitespace = 10, Tid_comment = 11, Tid_eq = 12; - public static String Tid__name(byte tid) { + public static final int Tid_identifier = 1, Tid_dot = 2, Tid_semic = 3, Tid_paren_bgn = 4, Tid_paren_end = 5, Tid_curly_bgn = 6, Tid_curly_end = 7, Tid_quote = 8, Tid_comma = 9, Tid_whitespace = 10, Tid_comment = 11, Tid_eq = 12; + public static String Tid__name(int tid) { switch (tid) { case Tid_identifier: return "identifier"; case Tid_dot: return "dot"; diff --git a/400_xowa/src/gplx/gfs/Gfs_msg_bldr.java b/400_xowa/src/gplx/langs/gfss/Gfs_msg_bldr.java similarity index 95% rename from 400_xowa/src/gplx/gfs/Gfs_msg_bldr.java rename to 400_xowa/src/gplx/langs/gfss/Gfs_msg_bldr.java index 4839f1399..e850a4d5d 100644 --- a/400_xowa/src/gplx/gfs/Gfs_msg_bldr.java +++ b/400_xowa/src/gplx/langs/gfss/Gfs_msg_bldr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.gfs; import gplx.*; +package gplx.langs.gfss; import gplx.*; import gplx.langs.*; public class Gfs_msg_bldr implements GfoMsgParser { Gfs_parser parser = new Gfs_parser(); public GfoMsg ParseToMsg(String s) {return Bld(s);} diff --git a/400_xowa/src/gplx/gfs/Gfs_msg_bldr_tst.java b/400_xowa/src/gplx/langs/gfss/Gfs_msg_bldr_tst.java similarity index 95% rename from 400_xowa/src/gplx/gfs/Gfs_msg_bldr_tst.java rename to 400_xowa/src/gplx/langs/gfss/Gfs_msg_bldr_tst.java index 2c4d311ec..3ed2ec52b 100644 --- a/400_xowa/src/gplx/gfs/Gfs_msg_bldr_tst.java +++ b/400_xowa/src/gplx/langs/gfss/Gfs_msg_bldr_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.gfs; import gplx.*; +package gplx.langs.gfss; import gplx.*; import gplx.langs.*; import org.junit.*; import gplx.core.strings.*; public class Gfs_msg_bldr_tst { @Before public void init() {fxt.Clear();} Gfs_msg_bldr_fxt fxt = new Gfs_msg_bldr_fxt(); diff --git a/400_xowa/src/gplx/gfs/Gfs_nde.java b/400_xowa/src/gplx/langs/gfss/Gfs_nde.java similarity index 96% rename from 400_xowa/src/gplx/gfs/Gfs_nde.java rename to 400_xowa/src/gplx/langs/gfss/Gfs_nde.java index de61ec372..77b1cec35 100644 --- a/400_xowa/src/gplx/gfs/Gfs_nde.java +++ b/400_xowa/src/gplx/langs/gfss/Gfs_nde.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.gfs; import gplx.*; +package gplx.langs.gfss; import gplx.*; import gplx.langs.*; public class Gfs_nde { public byte[] Name_bry(byte[] src) {return name == null ? Bry_.Mid(src, name_bgn, name_end) : name;} public byte[] Name() {return name;} public Gfs_nde Name_(byte[] v) {name = v; return this;} private byte[] name; diff --git a/400_xowa/src/gplx/gfs/Gfs_parser.java b/400_xowa/src/gplx/langs/gfss/Gfs_parser.java similarity index 96% rename from 400_xowa/src/gplx/gfs/Gfs_parser.java rename to 400_xowa/src/gplx/langs/gfss/Gfs_parser.java index 6d106b78a..5ac530d6c 100644 --- a/400_xowa/src/gplx/gfs/Gfs_parser.java +++ b/400_xowa/src/gplx/langs/gfss/Gfs_parser.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.gfs; import gplx.*; +package gplx.langs.gfss; import gplx.*; import gplx.langs.*; import gplx.core.btries.*; public class Gfs_parser { Btrie_fast_mgr trie = Gfs_parser_.trie_(); diff --git a/400_xowa/src/gplx/gfs/Gfs_parser_ctx.java b/400_xowa/src/gplx/langs/gfss/Gfs_parser_ctx.java similarity index 91% rename from 400_xowa/src/gplx/gfs/Gfs_parser_ctx.java rename to 400_xowa/src/gplx/langs/gfss/Gfs_parser_ctx.java index 2e1faa9f0..32c67d363 100644 --- a/400_xowa/src/gplx/gfs/Gfs_parser_ctx.java +++ b/400_xowa/src/gplx/langs/gfss/Gfs_parser_ctx.java @@ -15,14 +15,14 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.gfs; import gplx.*; +package gplx.langs.gfss; import gplx.*; import gplx.langs.*; import gplx.core.btries.*; class Gfs_parser_ctx { public Btrie_fast_mgr Trie() {return trie;} Btrie_fast_mgr trie; public Gfs_nde Root() {return root;} Gfs_nde root = new Gfs_nde(); public byte[] Src() {return src;} private byte[] src; public int Src_len() {return src_len;} private int src_len; - public byte Prv_lxr() {return prv_lxr;} public Gfs_parser_ctx Prv_lxr_(byte v) {prv_lxr = v; return this;} private byte prv_lxr; + public int Prv_lxr() {return prv_lxr;} public Gfs_parser_ctx Prv_lxr_(int v) {prv_lxr = v; return this;} private int prv_lxr; public Gfs_nde Cur_nde() {return cur_nde;} Gfs_nde cur_nde; public int Nxt_pos() {return nxt_pos;} private int nxt_pos; public Gfs_lxr Nxt_lxr() {return nxt_lxr;} Gfs_lxr nxt_lxr; @@ -68,8 +68,8 @@ class Gfs_err_mgr { public void Fail_eos(Gfs_parser_ctx ctx) {Fail(ctx, Fail_msg_eos, ctx.Src_len());} public void Fail_unknown_char(Gfs_parser_ctx ctx, int pos, byte c) {Fail(ctx, Fail_msg_unknown_char, pos, KeyVal_.new_("char", Char_.To_str((char)c)));} public void Fail_nde_stack_empty(Gfs_parser_ctx ctx, int pos) {Fail(ctx, Fail_msg_nde_stack_empty, pos);} - public void Fail_invalid_lxr(Gfs_parser_ctx ctx, int pos, byte cur_lxr, byte c) { - Fail(ctx, Fail_msg_invalid_lxr, pos, KeyVal_.new_("char", Char_.To_str((char)c)), KeyVal_.new_("cur_lxr", Gfs_lxr_.Tid__name(cur_lxr)), KeyVal_.new_("prv_lxr", Gfs_lxr_.Tid__name(ctx.Prv_lxr()))); + public void Fail_invalid_lxr(Gfs_parser_ctx ctx, int pos, int lxr_tid, byte c) { + Fail(ctx, Fail_msg_invalid_lxr, pos, KeyVal_.new_("char", Char_.To_str((char)c)), KeyVal_.new_("cur_lxr", Gfs_lxr_.Tid__name(lxr_tid)), KeyVal_.new_("prv_lxr", Gfs_lxr_.Tid__name(ctx.Prv_lxr()))); } private void Fail(Gfs_parser_ctx ctx, String msg, int pos, KeyVal... args) { byte[] src = ctx.Src(); int src_len = ctx.Src_len(); diff --git a/400_xowa/src/gplx/gfs/Gfs_parser_tst.java b/400_xowa/src/gplx/langs/gfss/Gfs_parser_tst.java similarity index 96% rename from 400_xowa/src/gplx/gfs/Gfs_parser_tst.java rename to 400_xowa/src/gplx/langs/gfss/Gfs_parser_tst.java index 475e79efd..16cff1b49 100644 --- a/400_xowa/src/gplx/gfs/Gfs_parser_tst.java +++ b/400_xowa/src/gplx/langs/gfss/Gfs_parser_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.gfs; import gplx.*; +package gplx.langs.gfss; import gplx.*; import gplx.langs.*; import org.junit.*; public class Gfs_parser_tst { @Before public void init() {fxt.Clear();} Gfs_parser_fxt fxt = new Gfs_parser_fxt(); diff --git a/400_xowa/src/gplx/gfs/Gfs_wtr.java b/400_xowa/src/gplx/langs/gfss/Gfs_wtr.java similarity index 94% rename from 400_xowa/src/gplx/gfs/Gfs_wtr.java rename to 400_xowa/src/gplx/langs/gfss/Gfs_wtr.java index 8402415f7..ed6737900 100644 --- a/400_xowa/src/gplx/gfs/Gfs_wtr.java +++ b/400_xowa/src/gplx/langs/gfss/Gfs_wtr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.gfs; import gplx.*; +package gplx.langs.gfss; import gplx.*; import gplx.langs.*; public class Gfs_wtr { public byte Quote_char() {return quote_char;} public Gfs_wtr Quote_char_(byte v) {quote_char = v; return this;} private byte quote_char = Byte_ascii.Apos; public Bry_bfr Bfr() {return bfr;} private Bry_bfr bfr = Bry_bfr.reset_(255); diff --git a/400_xowa/src/gplx/html/Html_atr_.java b/400_xowa/src/gplx/langs/htmls/Html_atr_.java similarity index 92% rename from 400_xowa/src/gplx/html/Html_atr_.java rename to 400_xowa/src/gplx/langs/htmls/Html_atr_.java index 536ad8374..e9c4ee217 100644 --- a/400_xowa/src/gplx/html/Html_atr_.java +++ b/400_xowa/src/gplx/langs/htmls/Html_atr_.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.html; import gplx.*; +package gplx.langs.htmls; import gplx.*; import gplx.langs.*; public class Html_atr_ { public static final String Src_str = "src" diff --git a/400_xowa/src/gplx/html/Html_entity_.java b/400_xowa/src/gplx/langs/htmls/Html_entity_.java similarity index 94% rename from 400_xowa/src/gplx/html/Html_entity_.java rename to 400_xowa/src/gplx/langs/htmls/Html_entity_.java index 3017c88ab..aadab3b89 100644 --- a/400_xowa/src/gplx/html/Html_entity_.java +++ b/400_xowa/src/gplx/langs/htmls/Html_entity_.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.html; import gplx.*; +package gplx.langs.htmls; import gplx.*; import gplx.langs.*; public class Html_entity_ { public static final String Nl_str = " " diff --git a/400_xowa/src/gplx/html/Html_nde.java b/400_xowa/src/gplx/langs/htmls/Html_nde.java similarity index 96% rename from 400_xowa/src/gplx/html/Html_nde.java rename to 400_xowa/src/gplx/langs/htmls/Html_nde.java index 2185d9c83..cbd72bff7 100644 --- a/400_xowa/src/gplx/html/Html_nde.java +++ b/400_xowa/src/gplx/langs/htmls/Html_nde.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.html; import gplx.*; +package gplx.langs.htmls; import gplx.*; import gplx.langs.*; public class Html_nde { public Html_nde(byte[] src, boolean tag_tid_is_inline, int tag_lhs_bgn, int tag_lhs_end, int tag_rhs_bgn, int tag_rhs_end, int name_bgn, int name_end, int[] cur_atrs, int atrs_idx) { this.src = src; diff --git a/400_xowa/src/gplx/html/Html_parser.java b/400_xowa/src/gplx/langs/htmls/Html_parser.java similarity index 96% rename from 400_xowa/src/gplx/html/Html_parser.java rename to 400_xowa/src/gplx/langs/htmls/Html_parser.java index 2bb341550..e377830de 100644 --- a/400_xowa/src/gplx/html/Html_parser.java +++ b/400_xowa/src/gplx/langs/htmls/Html_parser.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.html; import gplx.*; +package gplx.langs.htmls; import gplx.*; import gplx.langs.*; import gplx.core.brys.*; public class Html_parser { public Html_parser() { diff --git a/400_xowa/src/gplx/html/Html_parser_tst.java b/400_xowa/src/gplx/langs/htmls/Html_parser_tst.java similarity index 96% rename from 400_xowa/src/gplx/html/Html_parser_tst.java rename to 400_xowa/src/gplx/langs/htmls/Html_parser_tst.java index 39769df50..4fbd175a8 100644 --- a/400_xowa/src/gplx/html/Html_parser_tst.java +++ b/400_xowa/src/gplx/langs/htmls/Html_parser_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.html; import gplx.*; +package gplx.langs.htmls; import gplx.*; import gplx.langs.*; import org.junit.*; public class Html_parser_tst { @Before public void init() {fxt.Clear();} private Xoh_parser_fxt fxt = new Xoh_parser_fxt(); diff --git a/400_xowa/src/gplx/html/Html_selecter.java b/400_xowa/src/gplx/langs/htmls/Html_selecter.java similarity index 94% rename from 400_xowa/src/gplx/html/Html_selecter.java rename to 400_xowa/src/gplx/langs/htmls/Html_selecter.java index b5134b06e..0217fba01 100644 --- a/400_xowa/src/gplx/html/Html_selecter.java +++ b/400_xowa/src/gplx/langs/htmls/Html_selecter.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.html; import gplx.*; +package gplx.langs.htmls; import gplx.*; import gplx.langs.*; public class Html_selecter { public static Html_nde[] Select(byte[] src, Html_nde[] ary, Hash_adp_bry hash) { List_adp list = List_adp_.new_(); diff --git a/400_xowa/src/gplx/html/Html_tag_.java b/400_xowa/src/gplx/langs/htmls/Html_tag_.java similarity index 95% rename from 400_xowa/src/gplx/html/Html_tag_.java rename to 400_xowa/src/gplx/langs/htmls/Html_tag_.java index ef4f00ccd..819d93a44 100644 --- a/400_xowa/src/gplx/html/Html_tag_.java +++ b/400_xowa/src/gplx/langs/htmls/Html_tag_.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.html; import gplx.*; +package gplx.langs.htmls; import gplx.*; import gplx.langs.*; public class Html_tag_ { public static final byte[] Ul_name_bry = Bry_.new_a7("ul") diff --git a/400_xowa/src/gplx/html/Html_utl.java b/400_xowa/src/gplx/langs/htmls/Html_utl.java similarity index 91% rename from 400_xowa/src/gplx/html/Html_utl.java rename to 400_xowa/src/gplx/langs/htmls/Html_utl.java index eaf563cbb..dd9bcd24a 100644 --- a/400_xowa/src/gplx/html/Html_utl.java +++ b/400_xowa/src/gplx/langs/htmls/Html_utl.java @@ -15,8 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.html; import gplx.*; -import gplx.core.primitives.*; import gplx.core.btries.*; +package gplx.langs.htmls; import gplx.*; import gplx.langs.*; +import gplx.core.primitives.*; import gplx.core.btries.*; import gplx.langs.htmls.encoders.*; public class Html_utl { private static final Url_encoder encoder_id = Url_encoder.new_html_id_(); private static final Bry_bfr tmp_bfr = Bry_bfr.reset_(255); public static String Encode_id_as_str(byte[] key) {return String_.new_u8(Encode_id_as_bry(key));} @@ -162,13 +162,13 @@ public class Html_utl { public static byte[] Del_comments(Bry_bfr bfr, byte[] src, int pos, int end) { while (true) { if (pos >= end) break; - int comm_bgn = Bry_finder.Find_fwd(src, Html_tag_.Comm_bgn, pos); // look for - if (comm_end == Bry_finder.Not_found) { // not found; consume rest + int comm_end = Bry_find_.Find_fwd(src, Html_tag_.Comm_end, comm_bgn + Html_tag_.Comm_bgn_len); // look for --> + if (comm_end == Bry_find_.Not_found) { // not found; consume rest bfr.Add_mid(src, pos, end); break; } diff --git a/400_xowa/src/gplx/html/Html_utl_tst.java b/400_xowa/src/gplx/langs/htmls/Html_utl_tst.java similarity index 96% rename from 400_xowa/src/gplx/html/Html_utl_tst.java rename to 400_xowa/src/gplx/langs/htmls/Html_utl_tst.java index bf4cc46f5..205c749eb 100644 --- a/400_xowa/src/gplx/html/Html_utl_tst.java +++ b/400_xowa/src/gplx/langs/htmls/Html_utl_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.html; import gplx.*; +package gplx.langs.htmls; import gplx.*; import gplx.langs.*; import org.junit.*; public class Html_utl_tst { @Before public void init() {fxt.Clear();} private Html_utl_fxt fxt = new Html_utl_fxt(); diff --git a/400_xowa/src/gplx/html/Html_wtr.java b/400_xowa/src/gplx/langs/htmls/Html_wtr.java similarity index 96% rename from 400_xowa/src/gplx/html/Html_wtr.java rename to 400_xowa/src/gplx/langs/htmls/Html_wtr.java index 86e86fb50..26b8b16a8 100644 --- a/400_xowa/src/gplx/html/Html_wtr.java +++ b/400_xowa/src/gplx/langs/htmls/Html_wtr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.html; import gplx.*; +package gplx.langs.htmls; import gplx.*; import gplx.langs.*; public class Html_wtr { private Bry_bfr bfr = Bry_bfr.reset_(255); private List_adp nde_stack = List_adp_.new_(); diff --git a/400_xowa/src_060_utl/gplx/Url_encoder.java b/400_xowa/src/gplx/langs/htmls/encoders/Url_encoder.java similarity index 97% rename from 400_xowa/src_060_utl/gplx/Url_encoder.java rename to 400_xowa/src/gplx/langs/htmls/encoders/Url_encoder.java index 979abfda2..d9ce27986 100644 --- a/400_xowa/src_060_utl/gplx/Url_encoder.java +++ b/400_xowa/src/gplx/langs/htmls/encoders/Url_encoder.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.langs.htmls.encoders; import gplx.*; import gplx.langs.*; import gplx.langs.htmls.*; import gplx.core.btries.*; import gplx.xowa.parsers.amps.*; public class Url_encoder implements Url_encoder_interface { diff --git a/400_xowa/src/gplx/xowa/urls/encoders/Url_encoder_mgr.java b/400_xowa/src/gplx/langs/htmls/encoders/Url_encoder_mgr.java similarity index 94% rename from 400_xowa/src/gplx/xowa/urls/encoders/Url_encoder_mgr.java rename to 400_xowa/src/gplx/langs/htmls/encoders/Url_encoder_mgr.java index ff862bfc9..804be50c5 100644 --- a/400_xowa/src/gplx/xowa/urls/encoders/Url_encoder_mgr.java +++ b/400_xowa/src/gplx/langs/htmls/encoders/Url_encoder_mgr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa.urls.encoders; import gplx.*; import gplx.xowa.*; import gplx.xowa.urls.*; +package gplx.langs.htmls.encoders; import gplx.*; import gplx.langs.*; import gplx.langs.htmls.*; public class Url_encoder_mgr { public Url_encoder File() {return file;} private final Url_encoder file = Url_encoder.new_file_(); public Url_encoder Http_url() {return http_url;} private final Url_encoder http_url = Url_encoder.new_http_url_(); diff --git a/400_xowa/src_060_utl/gplx/Url_encoder_tst.java b/400_xowa/src/gplx/langs/htmls/encoders/Url_encoder_tst.java similarity index 96% rename from 400_xowa/src_060_utl/gplx/Url_encoder_tst.java rename to 400_xowa/src/gplx/langs/htmls/encoders/Url_encoder_tst.java index 61f0bd1cd..6a00fc9d4 100644 --- a/400_xowa/src_060_utl/gplx/Url_encoder_tst.java +++ b/400_xowa/src/gplx/langs/htmls/encoders/Url_encoder_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.langs.htmls.encoders; import gplx.*; import gplx.langs.*; import gplx.langs.htmls.*; import org.junit.*; public class Url_encoder_tst { @Before public void init() {fxt = new Url_encoder_fxt();} Url_encoder_fxt fxt; diff --git a/400_xowa/src/gplx/core/html/parsers/Gfo_html_node.java b/400_xowa/src/gplx/langs/htmls/parsers/Gfo_html_node.java similarity index 90% rename from 400_xowa/src/gplx/core/html/parsers/Gfo_html_node.java rename to 400_xowa/src/gplx/langs/htmls/parsers/Gfo_html_node.java index 7a0df0ba2..664b6416f 100644 --- a/400_xowa/src/gplx/core/html/parsers/Gfo_html_node.java +++ b/400_xowa/src/gplx/langs/htmls/parsers/Gfo_html_node.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.html.parsers; import gplx.*; import gplx.core.*; import gplx.core.html.*; +package gplx.langs.htmls.parsers; import gplx.*; import gplx.langs.*; import gplx.langs.htmls.*; class Gfo_html_node { public Gfo_html_node(byte[] src, int bgn, int end) {this.src = src; this.bgn = bgn; this.end = end;} public byte[] Src() {return src;} private final byte[] src; diff --git a/400_xowa/src/gplx/core/html/parsers/Gfo_html_parser.java b/400_xowa/src/gplx/langs/htmls/parsers/Gfo_html_parser.java similarity index 74% rename from 400_xowa/src/gplx/core/html/parsers/Gfo_html_parser.java rename to 400_xowa/src/gplx/langs/htmls/parsers/Gfo_html_parser.java index ec4e9491e..44df2f1e6 100644 --- a/400_xowa/src/gplx/core/html/parsers/Gfo_html_parser.java +++ b/400_xowa/src/gplx/langs/htmls/parsers/Gfo_html_parser.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.html.parsers; import gplx.*; import gplx.core.*; import gplx.core.html.*; +package gplx.langs.htmls.parsers; import gplx.*; import gplx.langs.*; import gplx.langs.htmls.*; import gplx.core.btries.*; import gplx.core.primitives.*; import gplx.xowa.*; import gplx.xowa.parsers.xndes.*; @@ -28,9 +28,9 @@ class Gfo_html_parser { // int css_find_bgn_len = Css_find_bgn.length; // byte[] protocol_prefix_bry = Bry_.new_u8(protocol_prefix); // while (true) { -// int url_bgn = Bry_finder.Find_fwd(src, Css_find_bgn, prv_pos); if (url_bgn == Bry_.NotFound) break; // nothing left; stop +// int url_bgn = Bry_find_.Find_fwd(src, Css_find_bgn, prv_pos); if (url_bgn == Bry_.NotFound) break; // nothing left; stop // url_bgn += css_find_bgn_len; -// int url_end = Bry_finder.Find_fwd(src, Byte_ascii.Quote, url_bgn, src_len); if (url_end == Bry_.NotFound) {usr_dlg.Warn_many("", "main_page.css_parse", "could not find css; pos='~{0}' text='~{1}'", url_bgn, String_.new_u8_by_len(src, url_bgn, url_bgn + 32)); break;} +// int url_end = Bry_find_.Find_fwd(src, Byte_ascii.Quote, url_bgn, src_len); if (url_end == Bry_.NotFound) {usr_dlg.Warn_many("", "main_page.css_parse", "could not find css; pos='~{0}' text='~{1}'", url_bgn, String_.new_u8__by_len(src, url_bgn, url_bgn + 32)); break;} // byte[] css_url_bry = Bry_.Mid(src, url_bgn, url_end); // css_url_bry = Bry_.Replace(css_url_bry, Css_amp_find, Css_amp_repl); // & -> & // css_url_bry = url_encoder.Decode(css_url_bry); // %2C -> %7C -> | @@ -54,13 +54,13 @@ class Gfo_html_parser { } private int Parse_node(Gfo_html_wkr handler, byte[] src, int end, int tkn_bgn, int tkn_end) { int name_bgn = tkn_end; - int name_end = Bry_finder.Find_fwd_until_ws(src, name_bgn, end); - if (name_end == Bry_finder.Not_found) return end; // EOS; EX: "" - int node_end = Bry_finder.Find_fwd(src, Byte_ascii.Angle_end, name_end, end); - if (node_end == Bry_finder.Not_found) return end; // EOS; EX: ". */ -package gplx.core.html.parsers; import gplx.*; import gplx.core.*; import gplx.core.html.*; +package gplx.langs.htmls.parsers; import gplx.*; import gplx.langs.*; import gplx.langs.htmls.*; interface Gfo_html_wkr { Gfo_html_tkn Get_or_null(byte[] src, int bgn, int end); void Process(Gfo_html_node node); diff --git a/400_xowa/src/gplx/core/html/parsers/Xob_html_tkn.java b/400_xowa/src/gplx/langs/htmls/parsers/Xob_html_tkn.java similarity index 91% rename from 400_xowa/src/gplx/core/html/parsers/Xob_html_tkn.java rename to 400_xowa/src/gplx/langs/htmls/parsers/Xob_html_tkn.java index b38704e84..b8a242e1f 100644 --- a/400_xowa/src/gplx/core/html/parsers/Xob_html_tkn.java +++ b/400_xowa/src/gplx/langs/htmls/parsers/Xob_html_tkn.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.html.parsers; import gplx.*; import gplx.core.*; import gplx.core.html.*; +package gplx.langs.htmls.parsers; import gplx.*; import gplx.langs.*; import gplx.langs.htmls.*; import gplx.xowa.*; import gplx.xowa.parsers.xndes.*; interface Gfo_html_tkn { diff --git a/400_xowa/src/gplx/core/json/Json_ary.java b/400_xowa/src/gplx/langs/jsons/Json_ary.java similarity index 96% rename from 400_xowa/src/gplx/core/json/Json_ary.java rename to 400_xowa/src/gplx/langs/jsons/Json_ary.java index 821b9a132..c4448f83a 100644 --- a/400_xowa/src/gplx/core/json/Json_ary.java +++ b/400_xowa/src/gplx/langs/jsons/Json_ary.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; public class Json_ary extends Json_itm_base implements Json_grp { public Json_ary(int src_bgn, int src_end) {this.Ctor(src_bgn, src_end);} @Override public byte Tid() {return Json_itm_.Tid__ary;} diff --git a/400_xowa/src/gplx/core/json/Json_doc.java b/400_xowa/src/gplx/langs/jsons/Json_doc.java similarity index 96% rename from 400_xowa/src/gplx/core/json/Json_doc.java rename to 400_xowa/src/gplx/langs/jsons/Json_doc.java index b92d57db9..2f799600f 100644 --- a/400_xowa/src/gplx/core/json/Json_doc.java +++ b/400_xowa/src/gplx/langs/jsons/Json_doc.java @@ -15,7 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; +import gplx.core.primitives.*; public class Json_doc { private final byte[][] tmp_qry_bry = new byte[1][]; public void Ctor(byte[] src, Json_grp new_root) { diff --git a/400_xowa/src/gplx/core/json/Json_doc_bldr.java b/400_xowa/src/gplx/langs/jsons/Json_doc_bldr.java similarity index 95% rename from 400_xowa/src/gplx/core/json/Json_doc_bldr.java rename to 400_xowa/src/gplx/langs/jsons/Json_doc_bldr.java index 90172610c..14c683820 100644 --- a/400_xowa/src/gplx/core/json/Json_doc_bldr.java +++ b/400_xowa/src/gplx/langs/jsons/Json_doc_bldr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; public class Json_doc_bldr { public Json_nde Nde(Json_doc jdoc) {return factory.Nde(jdoc, -1);} public Json_nde Nde(Json_doc jdoc, Json_grp owner) { diff --git a/400_xowa/src/gplx/core/json/Json_doc_srl.java b/400_xowa/src/gplx/langs/jsons/Json_doc_srl.java similarity index 96% rename from 400_xowa/src/gplx/core/json/Json_doc_srl.java rename to 400_xowa/src/gplx/langs/jsons/Json_doc_srl.java index 6607e27b3..e50916886 100644 --- a/400_xowa/src/gplx/core/json/Json_doc_srl.java +++ b/400_xowa/src/gplx/langs/jsons/Json_doc_srl.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; public class Json_doc_srl { private int indent = -1; private Bry_bfr bfr = Bry_bfr.reset_(255); diff --git a/400_xowa/src/gplx/core/json/Json_doc_tst.java b/400_xowa/src/gplx/langs/jsons/Json_doc_tst.java similarity index 89% rename from 400_xowa/src/gplx/core/json/Json_doc_tst.java rename to 400_xowa/src/gplx/langs/jsons/Json_doc_tst.java index ffdbaafe3..d2e6aa677 100644 --- a/400_xowa/src/gplx/core/json/Json_doc_tst.java +++ b/400_xowa/src/gplx/langs/jsons/Json_doc_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; import org.junit.*; public class Json_doc_tst { private final Json_qry_mgr_fxt fxt = new Json_qry_mgr_fxt(); @@ -40,7 +40,7 @@ class Json_qry_mgr_fxt { private final Json_parser json_parser = new Json_parser(); public Json_doc Make_json(String... ary) {return json_parser.Parse_by_apos_ary(ary);} public void Test_get_val_as_str(Json_doc doc, String qry, String expd){ - byte[][] qry_bry = Bry_.Split(Bry_.new_u8(qry), Byte_ascii.Slash); + byte[][] qry_bry = Bry_split_.Split(Bry_.new_u8(qry), Byte_ascii.Slash); Tfds.Eq(expd, doc.Get_val_as_str_or(qry_bry, null)); } } diff --git a/400_xowa/src/gplx/core/json/Json_doc_wtr.java b/400_xowa/src/gplx/langs/jsons/Json_doc_wtr.java similarity index 96% rename from 400_xowa/src/gplx/core/json/Json_doc_wtr.java rename to 400_xowa/src/gplx/langs/jsons/Json_doc_wtr.java index 99aa7cae8..be0aee648 100644 --- a/400_xowa/src/gplx/core/json/Json_doc_wtr.java +++ b/400_xowa/src/gplx/langs/jsons/Json_doc_wtr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; public class Json_doc_wtr { private int indent = -2; private Bry_bfr bfr = Bry_bfr.reset_(255); diff --git a/400_xowa/src/gplx/core/json/Json_factory.java b/400_xowa/src/gplx/langs/jsons/Json_factory.java similarity index 95% rename from 400_xowa/src/gplx/core/json/Json_factory.java rename to 400_xowa/src/gplx/langs/jsons/Json_factory.java index a6eb5192e..06747899a 100644 --- a/400_xowa/src/gplx/core/json/Json_factory.java +++ b/400_xowa/src/gplx/langs/jsons/Json_factory.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; public class Json_factory { public Json_itm Null() {return Json_itm_null.Null;} public Json_itm Bool_n() {return Json_itm_bool.Bool_n;} diff --git a/400_xowa/src/gplx/core/json/Json_grp.java b/400_xowa/src/gplx/langs/jsons/Json_grp.java similarity index 94% rename from 400_xowa/src/gplx/core/json/Json_grp.java rename to 400_xowa/src/gplx/langs/jsons/Json_grp.java index 9bd7ab14f..90a80fc39 100644 --- a/400_xowa/src/gplx/core/json/Json_grp.java +++ b/400_xowa/src/gplx/langs/jsons/Json_grp.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; public interface Json_grp extends Json_itm { void Src_end_(int v); int Len(); diff --git a/400_xowa/src/gplx/core/json/Json_itm.java b/400_xowa/src/gplx/langs/jsons/Json_itm.java similarity index 96% rename from 400_xowa/src/gplx/core/json/Json_itm.java rename to 400_xowa/src/gplx/langs/jsons/Json_itm.java index a871b58c0..c5dad47d5 100644 --- a/400_xowa/src/gplx/core/json/Json_itm.java +++ b/400_xowa/src/gplx/langs/jsons/Json_itm.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; public interface Json_itm { byte Tid(); int Src_bgn(); diff --git a/400_xowa/src/gplx/core/json/Json_itm_.java b/400_xowa/src/gplx/langs/jsons/Json_itm_.java similarity index 94% rename from 400_xowa/src/gplx/core/json/Json_itm_.java rename to 400_xowa/src/gplx/langs/jsons/Json_itm_.java index 2231d6c7e..4c7c75646 100644 --- a/400_xowa/src/gplx/core/json/Json_itm_.java +++ b/400_xowa/src/gplx/langs/jsons/Json_itm_.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; public class Json_itm_ { public static final Json_itm[] Ary_empty = new Json_itm[0]; public static final byte Tid__unknown = 0, Tid__null = 1, Tid__bool = 2, Tid__int = 3, Tid__decimal = 4, Tid__str = 5, Tid__kv = 6, Tid__ary = 7, Tid__nde = 8; diff --git a/400_xowa/src/gplx/core/json/Json_itm_base.java b/400_xowa/src/gplx/langs/jsons/Json_itm_base.java similarity index 94% rename from 400_xowa/src/gplx/core/json/Json_itm_base.java rename to 400_xowa/src/gplx/langs/jsons/Json_itm_base.java index 43bb69566..c653b9d85 100644 --- a/400_xowa/src/gplx/core/json/Json_itm_base.java +++ b/400_xowa/src/gplx/langs/jsons/Json_itm_base.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; public abstract class Json_itm_base implements Json_itm { public abstract byte Tid(); public void Ctor(int src_bgn, int src_end) {this.src_bgn = src_bgn; this.src_end = src_end;} diff --git a/400_xowa/src/gplx/core/json/Json_itm_int.java b/400_xowa/src/gplx/langs/jsons/Json_itm_int.java similarity index 95% rename from 400_xowa/src/gplx/core/json/Json_itm_int.java rename to 400_xowa/src/gplx/langs/jsons/Json_itm_int.java index db97373b6..212794f82 100644 --- a/400_xowa/src/gplx/core/json/Json_itm_int.java +++ b/400_xowa/src/gplx/langs/jsons/Json_itm_int.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; public class Json_itm_int extends Json_itm_base { private final Json_doc doc; private byte[] data_bry; private int data; private boolean data_is_null = true; diff --git a/400_xowa/src/gplx/core/json/Json_itm_str.java b/400_xowa/src/gplx/langs/jsons/Json_itm_str.java similarity index 86% rename from 400_xowa/src/gplx/core/json/Json_itm_str.java rename to 400_xowa/src/gplx/langs/jsons/Json_itm_str.java index 32702dffb..5f2c5bcd5 100644 --- a/400_xowa/src/gplx/core/json/Json_itm_str.java +++ b/400_xowa/src/gplx/langs/jsons/Json_itm_str.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; class Json_itm_str extends Json_itm_base { private final boolean exact; private final Json_doc doc; private String data_str; private byte[] data_bry = null; @@ -23,7 +23,7 @@ class Json_itm_str extends Json_itm_base { @Override public byte Tid() {return Json_itm_.Tid__str;} @Override public void Print_as_json(Bry_bfr bfr, int depth) { bfr.Add_byte(Byte_ascii.Quote); - gplx.html.Html_utl.Escape_html_to_bfr(bfr, doc.Src(), this.Src_bgn(), this.Src_end(), true, true, true, true, false); // false to apos for backwards compatibility + gplx.langs.htmls.Html_utl.Escape_html_to_bfr(bfr, doc.Src(), this.Src_bgn(), this.Src_end(), true, true, true, true, false); // false to apos for backwards compatibility bfr.Add_byte(Byte_ascii.Quote); } @Override public Object Data() { @@ -36,7 +36,7 @@ class Json_itm_str extends Json_itm_base { } @Override public byte[] Data_bry() {if (data_bry == null) data_bry = Data_make_bry(); return data_bry;} @Override public boolean Data_eq(byte[] comp) { - if (exact) return Bry_.Eq(comp, doc.Src(), this.Src_bgn(), this.Src_end()); + if (exact) return Bry_.Eq(doc.Src(), this.Src_bgn(), this.Src_end(), comp); if (data_bry == null) data_bry = Data_make_bry(); return Bry_.Match(data_bry, comp); } @@ -58,7 +58,7 @@ class Json_itm_str extends Json_itm_base { case Byte_ascii.Ltr_f: bfr.Add_byte(Byte_ascii.Formfeed); break; case Byte_ascii.Ltr_u: int utf8_val = gplx.texts.HexDecUtl.parse_or(src, i + 1, i + 5, -1); - int len = gplx.intl.Utf16_.Encode_int(utf8_val, utf8_bry, 0); + int len = gplx.core.intls.Utf16_.Encode_int(utf8_val, utf8_bry, 0); bfr.Add_mid(utf8_bry, 0, len); i += 4; break; // \uFFFF 4 hex-dec diff --git a/400_xowa/src/gplx/core/json/Json_itm_tmp.java b/400_xowa/src/gplx/langs/jsons/Json_itm_tmp.java similarity index 95% rename from 400_xowa/src/gplx/core/json/Json_itm_tmp.java rename to 400_xowa/src/gplx/langs/jsons/Json_itm_tmp.java index 41cc6868b..f8de40ed7 100644 --- a/400_xowa/src/gplx/core/json/Json_itm_tmp.java +++ b/400_xowa/src/gplx/langs/jsons/Json_itm_tmp.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; public class Json_itm_tmp implements Json_itm { // TEST: public Json_itm_tmp(byte tid, String data) {this.tid = tid; this.data = data;} public byte Tid() {return tid;} private byte tid; diff --git a/400_xowa/src/gplx/core/json/Json_kv.java b/400_xowa/src/gplx/langs/jsons/Json_kv.java similarity index 95% rename from 400_xowa/src/gplx/core/json/Json_kv.java rename to 400_xowa/src/gplx/langs/jsons/Json_kv.java index c503f91c1..cfcb557e2 100644 --- a/400_xowa/src/gplx/core/json/Json_kv.java +++ b/400_xowa/src/gplx/langs/jsons/Json_kv.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; public class Json_kv extends Json_itm_base { public Json_kv(Json_itm key, Json_itm val) {this.key = key; this.val = val;} @Override public byte Tid() {return Json_itm_.Tid__kv;} diff --git a/400_xowa/src/gplx/core/json/Json_kv_ary_srl.java b/400_xowa/src/gplx/langs/jsons/Json_kv_ary_srl.java similarity index 95% rename from 400_xowa/src/gplx/core/json/Json_kv_ary_srl.java rename to 400_xowa/src/gplx/langs/jsons/Json_kv_ary_srl.java index 734512884..21932c3bd 100644 --- a/400_xowa/src/gplx/core/json/Json_kv_ary_srl.java +++ b/400_xowa/src/gplx/langs/jsons/Json_kv_ary_srl.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; public class Json_kv_ary_srl { public static KeyVal Kv_by_itm(Json_itm itm) { switch (itm.Tid()) { diff --git a/400_xowa/src/gplx/core/json/Json_kv_ary_srl_tst.java b/400_xowa/src/gplx/langs/jsons/Json_kv_ary_srl_tst.java similarity index 96% rename from 400_xowa/src/gplx/core/json/Json_kv_ary_srl_tst.java rename to 400_xowa/src/gplx/langs/jsons/Json_kv_ary_srl_tst.java index 995262ff1..73f5a5918 100644 --- a/400_xowa/src/gplx/core/json/Json_kv_ary_srl_tst.java +++ b/400_xowa/src/gplx/langs/jsons/Json_kv_ary_srl_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; import org.junit.*; public class Json_kv_ary_srl_tst { @Before public void init() {fxt.Clear();} private Json_kv_ary_srl_fxt fxt = new Json_kv_ary_srl_fxt(); diff --git a/400_xowa/src/gplx/core/json/Json_nde.java b/400_xowa/src/gplx/langs/jsons/Json_nde.java similarity index 96% rename from 400_xowa/src/gplx/core/json/Json_nde.java rename to 400_xowa/src/gplx/langs/jsons/Json_nde.java index 7a556059c..897a445b7 100644 --- a/400_xowa/src/gplx/core/json/Json_nde.java +++ b/400_xowa/src/gplx/langs/jsons/Json_nde.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; public class Json_nde extends Json_itm_base implements Json_grp { private Json_itm[] subs = Json_itm_.Ary_empty; private int subs_len = 0, subs_max = 0; public Json_nde(Json_doc jdoc, int src_bgn) {this.jdoc = jdoc; this.Ctor(src_bgn, -1);} diff --git a/400_xowa/src/gplx/core/json/Json_parser.java b/400_xowa/src/gplx/langs/jsons/Json_parser.java similarity index 94% rename from 400_xowa/src/gplx/core/json/Json_parser.java rename to 400_xowa/src/gplx/langs/jsons/Json_parser.java index 60bf015f4..9026c821f 100644 --- a/400_xowa/src/gplx/core/json/Json_parser.java +++ b/400_xowa/src/gplx/langs/jsons/Json_parser.java @@ -15,7 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; +import gplx.core.primitives.*; public class Json_parser { private byte[] src; private int src_len, pos; private final Number_parser num_parser = new Number_parser(); public Json_factory Factory() {return factory;} private final Json_factory factory = new Json_factory(); @@ -90,7 +91,7 @@ public class Json_parser { private Json_itm Make_literal(byte[] remainder, int remainder_len, Json_itm singleton) { ++pos; // 1st char int literal_end = pos + remainder_len; - if (Bry_.Eq(remainder, src, pos, literal_end)) { + if (Bry_.Eq(src, pos, literal_end, remainder)) { pos = literal_end; return singleton; } @@ -173,7 +174,7 @@ public class Json_parser { } private Err err_(byte[] src, int bgn, String fmt, Object... args) {return err_(src, bgn, src.length, fmt, args);} private Err err_(byte[] src, int bgn, int src_len, String fmt, Object... args) { - String msg = String_.Format(fmt, args) + " " + Int_.Xto_str(bgn) + " " + String_.new_u8_by_len(src, bgn, 20); + String msg = String_.Format(fmt, args) + " " + Int_.Xto_str(bgn) + " " + String_.new_u8__by_len(src, bgn, 20); return Err_.new_wo_type(msg); } private static final byte[] Bry_bool_rue = Bry_.new_a7("rue"), Bry_bool_alse = Bry_.new_a7("alse"), Bry_null_ull = Bry_.new_a7("ull"); diff --git a/400_xowa/src/gplx/core/json/Json_parser__itm__base.java b/400_xowa/src/gplx/langs/jsons/Json_parser__itm__base.java similarity index 96% rename from 400_xowa/src/gplx/core/json/Json_parser__itm__base.java rename to 400_xowa/src/gplx/langs/jsons/Json_parser__itm__base.java index 6751d0354..da5768691 100644 --- a/400_xowa/src/gplx/core/json/Json_parser__itm__base.java +++ b/400_xowa/src/gplx/langs/jsons/Json_parser__itm__base.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; import gplx.core.primitives.*; public abstract class Json_parser__itm__base { protected String context; diff --git a/400_xowa/src/gplx/core/json/Json_parser__list_nde__base.java b/400_xowa/src/gplx/langs/jsons/Json_parser__list_nde__base.java similarity index 95% rename from 400_xowa/src/gplx/core/json/Json_parser__list_nde__base.java rename to 400_xowa/src/gplx/langs/jsons/Json_parser__list_nde__base.java index c44e2b491..6a560d368 100644 --- a/400_xowa/src/gplx/core/json/Json_parser__list_nde__base.java +++ b/400_xowa/src/gplx/langs/jsons/Json_parser__list_nde__base.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; import gplx.core.primitives.*; public class Json_parser__list_nde__base extends Json_parser__itm__base { public void Parse_grp(String context, Json_grp grp) { diff --git a/400_xowa/src/gplx/core/json/Json_parser_tst.java b/400_xowa/src/gplx/langs/jsons/Json_parser_tst.java similarity index 97% rename from 400_xowa/src/gplx/core/json/Json_parser_tst.java rename to 400_xowa/src/gplx/langs/jsons/Json_parser_tst.java index fdef1f531..7b539f0f4 100644 --- a/400_xowa/src/gplx/core/json/Json_parser_tst.java +++ b/400_xowa/src/gplx/langs/jsons/Json_parser_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; import org.junit.*; public class Json_parser_tst { private final Json_parser_fxt fxt = new Json_parser_fxt(); diff --git a/400_xowa/src/gplx/core/json/Json_wtr.java b/400_xowa/src/gplx/langs/jsons/Json_wtr.java similarity index 96% rename from 400_xowa/src/gplx/core/json/Json_wtr.java rename to 400_xowa/src/gplx/langs/jsons/Json_wtr.java index 05e794436..2222f7688 100644 --- a/400_xowa/src/gplx/core/json/Json_wtr.java +++ b/400_xowa/src/gplx/langs/jsons/Json_wtr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; import gplx.core.primitives.*; public class Json_wtr { private final Bry_bfr bfr = Bry_bfr.new_(255); diff --git a/400_xowa/src/gplx/core/json/Json_wtr_tst.java b/400_xowa/src/gplx/langs/jsons/Json_wtr_tst.java similarity index 94% rename from 400_xowa/src/gplx/core/json/Json_wtr_tst.java rename to 400_xowa/src/gplx/langs/jsons/Json_wtr_tst.java index 5994c736f..cfc6884e5 100644 --- a/400_xowa/src/gplx/core/json/Json_wtr_tst.java +++ b/400_xowa/src/gplx/langs/jsons/Json_wtr_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.json; import gplx.*; import gplx.core.*; +package gplx.langs.jsons; import gplx.*; import gplx.langs.*; import org.junit.*; public class Json_wtr_tst { @Before public void init() {fxt.Clear();} private final Json_wtr_fxt fxt = new Json_wtr_fxt(); diff --git a/400_xowa/src/gplx/php/Php_ctx.java b/400_xowa/src/gplx/langs/phps/Php_ctx.java similarity index 92% rename from 400_xowa/src/gplx/php/Php_ctx.java rename to 400_xowa/src/gplx/langs/phps/Php_ctx.java index 167495169..fde9cb2e8 100644 --- a/400_xowa/src/gplx/php/Php_ctx.java +++ b/400_xowa/src/gplx/langs/phps/Php_ctx.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; public class Php_ctx { public byte[] Src() {return src;} public Php_ctx Src_(byte[] v) {this.src = v; return this;} private byte[] src; } diff --git a/400_xowa/src/gplx/php/Php_evaluator.java b/400_xowa/src/gplx/langs/phps/Php_evaluator.java similarity index 96% rename from 400_xowa/src/gplx/php/Php_evaluator.java rename to 400_xowa/src/gplx/langs/phps/Php_evaluator.java index 7eb52e2c0..3dc34e31f 100644 --- a/400_xowa/src/gplx/php/Php_evaluator.java +++ b/400_xowa/src/gplx/langs/phps/Php_evaluator.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; /* NOTE: naive implementation of PHP evaluator. intended only for parsing Messages**.php files in MediaWiki. Specifically, it assumes the following: - all lines are assignment lines: EX: $a = b; diff --git a/400_xowa/src/gplx/php/Php_itm.java b/400_xowa/src/gplx/langs/phps/Php_itm.java similarity index 95% rename from 400_xowa/src/gplx/php/Php_itm.java rename to 400_xowa/src/gplx/langs/phps/Php_itm.java index 4dc16313e..daf42d0db 100644 --- a/400_xowa/src/gplx/php/Php_itm.java +++ b/400_xowa/src/gplx/langs/phps/Php_itm.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; public interface Php_itm { byte Itm_tid(); byte[] Val_obj_bry(); diff --git a/400_xowa/src/gplx/php/Php_itm_.java b/400_xowa/src/gplx/langs/phps/Php_itm_.java similarity index 94% rename from 400_xowa/src/gplx/php/Php_itm_.java rename to 400_xowa/src/gplx/langs/phps/Php_itm_.java index e076bf9e6..117c54847 100644 --- a/400_xowa/src/gplx/php/Php_itm_.java +++ b/400_xowa/src/gplx/langs/phps/Php_itm_.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; public class Php_itm_ { public static final byte Tid_null = 0, Tid_bool_false = 1, Tid_bool_true = 2, Tid_int = 3, Tid_quote = 4, Tid_ary = 5, Tid_kv = 6, Tid_var = 7; public static int Parse_int_or(Php_itm itm, int or) { diff --git a/400_xowa/src/gplx/php/Php_itm_ary.java b/400_xowa/src/gplx/langs/phps/Php_itm_ary.java similarity index 94% rename from 400_xowa/src/gplx/php/Php_itm_ary.java rename to 400_xowa/src/gplx/langs/phps/Php_itm_ary.java index 9971ffae7..c0d897914 100644 --- a/400_xowa/src/gplx/php/Php_itm_ary.java +++ b/400_xowa/src/gplx/langs/phps/Php_itm_ary.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; public class Php_itm_ary implements Php_itm, Php_itm_sub { public Php_itm_ary() {} public byte Itm_tid() {return Php_itm_.Tid_ary;} diff --git a/400_xowa/src/gplx/php/Php_itm_int.java b/400_xowa/src/gplx/langs/phps/Php_itm_int.java similarity index 93% rename from 400_xowa/src/gplx/php/Php_itm_int.java rename to 400_xowa/src/gplx/langs/phps/Php_itm_int.java index 74b9bfce5..bdfa579a3 100644 --- a/400_xowa/src/gplx/php/Php_itm_int.java +++ b/400_xowa/src/gplx/langs/phps/Php_itm_int.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; public class Php_itm_int implements Php_itm, Php_itm_sub, Php_key { public Php_itm_int(int v) {this.val_obj_int = v;} public byte Itm_tid() {return Php_itm_.Tid_int;} diff --git a/400_xowa/src/gplx/php/Php_itm_kv.java b/400_xowa/src/gplx/langs/phps/Php_itm_kv.java similarity index 94% rename from 400_xowa/src/gplx/php/Php_itm_kv.java rename to 400_xowa/src/gplx/langs/phps/Php_itm_kv.java index bbff32194..a4ccc795d 100644 --- a/400_xowa/src/gplx/php/Php_itm_kv.java +++ b/400_xowa/src/gplx/langs/phps/Php_itm_kv.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; public class Php_itm_kv implements Php_itm, Php_itm_sub { public byte Itm_tid() {return Php_itm_.Tid_kv;} public byte[] Val_obj_bry() {return null;} diff --git a/400_xowa/src/gplx/php/Php_itm_quote.java b/400_xowa/src/gplx/langs/phps/Php_itm_quote.java similarity index 93% rename from 400_xowa/src/gplx/php/Php_itm_quote.java rename to 400_xowa/src/gplx/langs/phps/Php_itm_quote.java index 70e9df602..d595b495d 100644 --- a/400_xowa/src/gplx/php/Php_itm_quote.java +++ b/400_xowa/src/gplx/langs/phps/Php_itm_quote.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; public class Php_itm_quote implements Php_itm, Php_itm_sub, Php_key { public Php_itm_quote(byte[] v) {this.val_obj_bry = v;} // NOTE: use Php_text_itm_parser to parse \" and related public byte Itm_tid() {return Php_itm_.Tid_quote;} diff --git a/400_xowa/src/gplx/php/Php_itm_sub.java b/400_xowa/src/gplx/langs/phps/Php_itm_sub.java similarity index 92% rename from 400_xowa/src/gplx/php/Php_itm_sub.java rename to 400_xowa/src/gplx/langs/phps/Php_itm_sub.java index 3227e9c9b..0cd5ba81b 100644 --- a/400_xowa/src/gplx/php/Php_itm_sub.java +++ b/400_xowa/src/gplx/langs/phps/Php_itm_sub.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; public interface Php_itm_sub extends Php_itm { } class Php_itm_sub_ { diff --git a/400_xowa/src/gplx/php/Php_key.java b/400_xowa/src/gplx/langs/phps/Php_key.java similarity index 92% rename from 400_xowa/src/gplx/php/Php_key.java rename to 400_xowa/src/gplx/langs/phps/Php_key.java index 7d46af8e2..04f85c86b 100644 --- a/400_xowa/src/gplx/php/Php_key.java +++ b/400_xowa/src/gplx/langs/phps/Php_key.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; public interface Php_key extends Php_itm { } class Php_key_ { diff --git a/400_xowa/src/gplx/php/Php_line.java b/400_xowa/src/gplx/langs/phps/Php_line.java similarity index 92% rename from 400_xowa/src/gplx/php/Php_line.java rename to 400_xowa/src/gplx/langs/phps/Php_line.java index 4a3fa2bff..b8b68c75c 100644 --- a/400_xowa/src/gplx/php/Php_line.java +++ b/400_xowa/src/gplx/langs/phps/Php_line.java @@ -15,5 +15,5 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; public interface Php_line {} diff --git a/400_xowa/src/gplx/php/Php_line_assign.java b/400_xowa/src/gplx/langs/phps/Php_line_assign.java similarity index 94% rename from 400_xowa/src/gplx/php/Php_line_assign.java rename to 400_xowa/src/gplx/langs/phps/Php_line_assign.java index 7f926dfa5..9a22ab888 100644 --- a/400_xowa/src/gplx/php/Php_line_assign.java +++ b/400_xowa/src/gplx/langs/phps/Php_line_assign.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; public class Php_line_assign implements Php_line { public Php_key Key() {return key;} public Php_line_assign Key_(Php_key v) {this.key = v; return this;} Php_key key; public Php_key[] Key_subs() {return key_subs;} public Php_line_assign Key_subs_(Php_key[] v) {this.key_subs = v; return this;} Php_key[] key_subs = Php_key_.Ary_empty; diff --git a/400_xowa/src/gplx/php/Php_lxr.java b/400_xowa/src/gplx/langs/phps/Php_lxr.java similarity index 92% rename from 400_xowa/src/gplx/php/Php_lxr.java rename to 400_xowa/src/gplx/langs/phps/Php_lxr.java index 4f5b3f951..ff317c27f 100644 --- a/400_xowa/src/gplx/php/Php_lxr.java +++ b/400_xowa/src/gplx/langs/phps/Php_lxr.java @@ -15,10 +15,10 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; import gplx.core.btries.*; interface Php_lxr { - byte Lxr_tid(); + int Lxr_tid(); void Lxr_ini(Btrie_slim_mgr trie, Php_parser_interrupt[] parser_interrupts); void Lxr_bgn(byte[] src, int src_len, Php_tkn_wkr tkn_wkr, Php_tkn_factory tkn_factory); int Lxr_make(Php_ctx ctx, int bgn, int cur); @@ -28,13 +28,13 @@ class Php_lxr_ { } abstract class Php_lxr_base implements Php_lxr { protected byte[] src; protected int src_len; protected Php_tkn_wkr tkn_wkr; protected Php_tkn_factory tkn_factory; - public abstract byte Lxr_tid(); + public abstract int Lxr_tid(); public abstract void Lxr_ini(Btrie_slim_mgr trie, Php_parser_interrupt[] parser_interrupts); public void Lxr_bgn(byte[] src, int src_len, Php_tkn_wkr tkn_wkr, Php_tkn_factory tkn_factory) {this.src = src; this.src_len = src_len; this.tkn_wkr = tkn_wkr; this.tkn_factory = tkn_factory;} public abstract int Lxr_make(Php_ctx ctx, int bgn, int cur); } class Php_lxr_declaration extends Php_lxr_base { - @Override public byte Lxr_tid() {return Php_lxr_.Tid_declaration;} + @Override public int Lxr_tid() {return Php_lxr_.Tid_declaration;} @Override public void Lxr_ini(Btrie_slim_mgr trie, Php_parser_interrupt[] parser_interrupts) { trie.Add_obj(Bry_declaration, this); parser_interrupts[Byte_ascii.Lt] = Php_parser_interrupt.Char; @@ -73,7 +73,7 @@ class Php_lxr_ws extends Php_lxr_base { } public byte Ws_tid() {return ws_tid;} private byte ws_tid; public byte[] Ws_bry() {return ws_bry;} private byte[] ws_bry; - @Override public byte Lxr_tid() {return Php_lxr_.Tid_ws;} + @Override public int Lxr_tid() {return Php_lxr_.Tid_ws;} @Override public void Lxr_ini(Btrie_slim_mgr trie, Php_parser_interrupt[] parser_interrupts) { trie.Add_obj(ws_bry, this); parser_interrupts[ws_bry[0]] = Php_parser_interrupt.Char; @@ -106,7 +106,7 @@ class Php_lxr_comment extends Php_lxr_base { case Php_tkn_comment.Tid_hash: comment_bgn = Bry_bgn_hash; comment_end = Bry_end_nl; break; } } - @Override public byte Lxr_tid() {return Php_lxr_.Tid_comment;} + @Override public int Lxr_tid() {return Php_lxr_.Tid_comment;} @Override public void Lxr_ini(Btrie_slim_mgr trie, Php_parser_interrupt[] parser_interrupts) { trie.Add_obj(comment_bgn, this); parser_interrupts[Byte_ascii.Slash] = Php_parser_interrupt.Char; @@ -116,7 +116,7 @@ class Php_lxr_comment extends Php_lxr_base { public byte[] Comment_bgn() {return comment_bgn;} private byte[] comment_bgn; public byte[] Comment_end() {return comment_end;} private byte[] comment_end; @Override public int Lxr_make(Php_ctx ctx, int bgn, int cur) { - int end = Bry_finder.Find_fwd(src, comment_end, bgn); + int end = Bry_find_.Find_fwd(src, comment_end, bgn); if (end == Bry_.NotFound) { tkn_wkr.Msg_many(src, bgn, cur, Php_lxr_comment.Dangling_comment, comment_tid, comment_end); cur = src_len; // NOTE: terminating sequence not found; assume rest of src is comment @@ -131,7 +131,7 @@ class Php_lxr_comment extends Php_lxr_base { , Bry_end_mult = Bry_.new_a7("*/"), Bry_end_nl = Bry_.new_a7("\n"); } class Php_lxr_var extends Php_lxr_base { - @Override public byte Lxr_tid() {return Php_lxr_.Tid_var;} + @Override public int Lxr_tid() {return Php_lxr_.Tid_var;} @Override public void Lxr_ini(Btrie_slim_mgr trie, Php_parser_interrupt[] parser_interrupts) { trie.Add_obj(Bry_var, this); parser_interrupts[Byte_ascii.Dollar] = Php_parser_interrupt.Char; @@ -169,7 +169,7 @@ class Php_lxr_var extends Php_lxr_base { } class Php_lxr_sym extends Php_lxr_base { public Php_lxr_sym(String hook_str, byte tkn_tid) {this.hook = Bry_.new_a7(hook_str); this.tkn_tid = tkn_tid;} private byte[] hook; byte tkn_tid; - @Override public byte Lxr_tid() {return Php_lxr_.Tid_sym;} + @Override public int Lxr_tid() {return Php_lxr_.Tid_sym;} @Override public void Lxr_ini(Btrie_slim_mgr trie, Php_parser_interrupt[] parser_interrupts) { trie.Add_obj(hook, this); parser_interrupts[hook[0]] = Php_parser_interrupt.Char; @@ -187,7 +187,7 @@ class Php_lxr_quote extends Php_lxr_base { case Byte_ascii.Quote: quote_bry = Quote_bry_double; break; } } - @Override public byte Lxr_tid() {return Php_lxr_.Tid_quote;} + @Override public int Lxr_tid() {return Php_lxr_.Tid_quote;} @Override public void Lxr_ini(Btrie_slim_mgr trie, Php_parser_interrupt[] parser_interrupts) { trie.Add_obj(quote_bry, this); parser_interrupts[quote_tid] = Php_parser_interrupt.Char; @@ -197,7 +197,7 @@ class Php_lxr_quote extends Php_lxr_base { @Override public int Lxr_make(Php_ctx ctx, int bgn, int cur) { int end = -1; while (true) { - end = Bry_finder.Find_fwd(src, quote_bry, cur); + end = Bry_find_.Find_fwd(src, quote_bry, cur); if (end == Bry_.NotFound) { tkn_wkr.Msg_many(src, bgn, cur, Php_lxr_quote.Dangling_quote, quote_tid, quote_bry); cur = src_len; // NOTE: terminating sequence not found; assume rest of src is comment @@ -232,7 +232,7 @@ class Php_lxr_quote extends Php_lxr_base { } class Php_lxr_keyword extends Php_lxr_base { public Php_lxr_keyword(String hook_str, byte tkn_tid) {this.hook = Bry_.new_a7(hook_str); this.tkn_tid = tkn_tid;} private byte[] hook; byte tkn_tid; - @Override public byte Lxr_tid() {return Php_lxr_.Tid_keyword;} + @Override public int Lxr_tid() {return Php_lxr_.Tid_keyword;} @Override public void Lxr_ini(Btrie_slim_mgr trie, Php_parser_interrupt[] parser_interrupts) {trie.Add_obj(hook, this);} @Override public int Lxr_make(Php_ctx ctx, int bgn, int cur) { if (cur < src_len) { @@ -257,7 +257,7 @@ class Php_lxr_keyword extends Php_lxr_base { } } class Php_lxr_num extends Php_lxr_base { - @Override public byte Lxr_tid() {return Php_lxr_.Tid_keyword;} + @Override public int Lxr_tid() {return Php_lxr_.Tid_keyword;} @Override public void Lxr_ini(Btrie_slim_mgr trie, Php_parser_interrupt[] parser_interrupts) { for (int i = 0; i < 10; i++) trie.Add_obj(new byte[] {(byte)(i + Byte_ascii.Num_0)}, this); diff --git a/400_xowa/src/gplx/php/Php_parser.java b/400_xowa/src/gplx/langs/phps/Php_parser.java similarity index 96% rename from 400_xowa/src/gplx/php/Php_parser.java rename to 400_xowa/src/gplx/langs/phps/Php_parser.java index b93623dea..8d0647019 100644 --- a/400_xowa/src/gplx/php/Php_parser.java +++ b/400_xowa/src/gplx/langs/phps/Php_parser.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; import gplx.core.btries.*; public class Php_parser { Php_lxr[] lxrs; int lxrs_len; diff --git a/400_xowa/src/gplx/php/Php_parser_tst.java b/400_xowa/src/gplx/langs/phps/Php_parser_tst.java similarity index 97% rename from 400_xowa/src/gplx/php/Php_parser_tst.java rename to 400_xowa/src/gplx/langs/phps/Php_parser_tst.java index 7ab8f266b..1f17455c4 100644 --- a/400_xowa/src/gplx/php/Php_parser_tst.java +++ b/400_xowa/src/gplx/langs/phps/Php_parser_tst.java @@ -15,8 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; -import org.junit.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; +import org.junit.*; import gplx.core.tests.*; public class Php_parser_tst { Php_parser_fxt fxt = new Php_parser_fxt(); @Before public void init() {fxt.Clear();} diff --git a/400_xowa/src/gplx/php/Php_srl_itm.java b/400_xowa/src/gplx/langs/phps/Php_srl_itm.java similarity index 97% rename from 400_xowa/src/gplx/php/Php_srl_itm.java rename to 400_xowa/src/gplx/langs/phps/Php_srl_itm.java index a3052378e..966911cd2 100644 --- a/400_xowa/src/gplx/php/Php_srl_itm.java +++ b/400_xowa/src/gplx/langs/phps/Php_srl_itm.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; interface Php_srl_itm { byte Tid(); int Src_bgn(); diff --git a/400_xowa/src/gplx/php/Php_srl_parser.java b/400_xowa/src/gplx/langs/phps/Php_srl_parser.java similarity index 95% rename from 400_xowa/src/gplx/php/Php_srl_parser.java rename to 400_xowa/src/gplx/langs/phps/Php_srl_parser.java index 4faea3405..b351c4636 100644 --- a/400_xowa/src/gplx/php/Php_srl_parser.java +++ b/400_xowa/src/gplx/langs/phps/Php_srl_parser.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; import gplx.texts.*; public class Php_srl_parser { @gplx.Internal protected Php_srl_factory Factory() {return factory;} Php_srl_factory factory = new Php_srl_factory(); @@ -106,7 +106,7 @@ public class Php_srl_parser { break; case Byte_ascii.Ltr_d: // EX: 'd:1.23;' pos = Chk(raw, pos + 1, Byte_ascii.Colon); - int double_end = Bry_finder.Find_fwd(raw, Byte_ascii.Semic, pos, raw_len); + int double_end = Bry_find_.Find_fwd(raw, Byte_ascii.Semic, pos, raw_len); String double_str = String_.new_a7(raw, pos, double_end); double double_val = 0; if (String_.Eq(double_str, "INF")) double_val = Double_.Inf_pos; @@ -190,7 +190,7 @@ public class Php_srl_parser { } Err err_(byte[] raw, int bgn, String fmt, Object... args) {return err_(raw, bgn, raw.length, fmt, args);} Err err_(byte[] raw, int bgn, int raw_len, String fmt, Object... args) { - String msg = String_.Format(fmt, args) + " " + Int_.Xto_str(bgn) + " " + String_.new_u8_by_len(raw, bgn, 20); + String msg = String_.Format(fmt, args) + " " + Int_.Xto_str(bgn) + " " + String_.new_u8__by_len(raw, bgn, 20); return Err_.new_wo_type(msg); } } diff --git a/400_xowa/src/gplx/php/Php_srl_parser_tst.java b/400_xowa/src/gplx/langs/phps/Php_srl_parser_tst.java similarity index 97% rename from 400_xowa/src/gplx/php/Php_srl_parser_tst.java rename to 400_xowa/src/gplx/langs/phps/Php_srl_parser_tst.java index 2d3f495ac..c227303b9 100644 --- a/400_xowa/src/gplx/php/Php_srl_parser_tst.java +++ b/400_xowa/src/gplx/langs/phps/Php_srl_parser_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; import org.junit.*; public class Php_srl_parser_tst { Php_srl_parser_fxt fxt = new Php_srl_parser_fxt(); diff --git a/400_xowa/src/gplx/php/Php_text_itm.java b/400_xowa/src/gplx/langs/phps/Php_text_itm.java similarity index 96% rename from 400_xowa/src/gplx/php/Php_text_itm.java rename to 400_xowa/src/gplx/langs/phps/Php_text_itm.java index 88b7f5d99..7e87d0922 100644 --- a/400_xowa/src/gplx/php/Php_text_itm.java +++ b/400_xowa/src/gplx/langs/phps/Php_text_itm.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; interface Php_text_itm { byte Tid(); int Src_bgn(); diff --git a/400_xowa/src/gplx/php/Php_text_itm_parser.java b/400_xowa/src/gplx/langs/phps/Php_text_itm_parser.java similarity index 95% rename from 400_xowa/src/gplx/php/Php_text_itm_parser.java rename to 400_xowa/src/gplx/langs/phps/Php_text_itm_parser.java index fae4ed013..605181408 100644 --- a/400_xowa/src/gplx/php/Php_text_itm_parser.java +++ b/400_xowa/src/gplx/langs/phps/Php_text_itm_parser.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; import gplx.core.primitives.*; public class Php_text_itm_parser { public static final byte Rslt_orig = 0, Rslt_dirty = 1, Rslt_fmt = 2; @@ -126,7 +126,7 @@ public class Php_text_itm_parser { int end = bgn + 4; if (end >= src_len) throw Err_.new_wo_type("utf16_parse", "src", String_.new_u8(src)); int v = Int_.Xto_int_hex(src, bgn, end); // +2; skip "\" + "u" - byte[] literal = gplx.intl.Utf16_.Encode_int_to_bry(v); + byte[] literal = gplx.core.intls.Utf16_.Encode_int_to_bry(v); rv.Add(new Php_text_itm_utf16(bgn, end, literal)); } public static int Find_fwd_non_int(byte[] src, int bgn, int end) { diff --git a/400_xowa/src/gplx/php/Php_text_itm_tst.java b/400_xowa/src/gplx/langs/phps/Php_text_itm_tst.java similarity index 96% rename from 400_xowa/src/gplx/php/Php_text_itm_tst.java rename to 400_xowa/src/gplx/langs/phps/Php_text_itm_tst.java index 560c98274..973f0a658 100644 --- a/400_xowa/src/gplx/php/Php_text_itm_tst.java +++ b/400_xowa/src/gplx/langs/phps/Php_text_itm_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; import org.junit.*; public class Php_text_itm_tst { @Before public void init() {fxt.Clear();} private Php_text_itm_fxt fxt = new Php_text_itm_fxt(); diff --git a/400_xowa/src/gplx/php/Php_tkn.java b/400_xowa/src/gplx/langs/phps/Php_tkn.java similarity index 97% rename from 400_xowa/src/gplx/php/Php_tkn.java rename to 400_xowa/src/gplx/langs/phps/Php_tkn.java index 63a76dea4..b571cee23 100644 --- a/400_xowa/src/gplx/php/Php_tkn.java +++ b/400_xowa/src/gplx/langs/phps/Php_tkn.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; public interface Php_tkn { byte Tkn_tid(); int Src_bgn(); diff --git a/400_xowa/src/gplx/php/Php_tkn_factory.java b/400_xowa/src/gplx/langs/phps/Php_tkn_factory.java similarity index 95% rename from 400_xowa/src/gplx/php/Php_tkn_factory.java rename to 400_xowa/src/gplx/langs/phps/Php_tkn_factory.java index 6c1b1071f..c66592a4e 100644 --- a/400_xowa/src/gplx/php/Php_tkn_factory.java +++ b/400_xowa/src/gplx/langs/phps/Php_tkn_factory.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; class Php_tkn_factory { public Php_tkn_generic Generic(int bgn, int end, byte tid) {return new Php_tkn_generic(bgn, end, tid);} public Php_tkn_txt Txt(int bgn, int end) {return new Php_tkn_txt(bgn, end);} diff --git a/400_xowa/src/gplx/php/Php_tkn_wkr.java b/400_xowa/src/gplx/langs/phps/Php_tkn_wkr.java similarity index 91% rename from 400_xowa/src/gplx/php/Php_tkn_wkr.java rename to 400_xowa/src/gplx/langs/phps/Php_tkn_wkr.java index d9d6836b4..c30cfcbcb 100644 --- a/400_xowa/src/gplx/php/Php_tkn_wkr.java +++ b/400_xowa/src/gplx/langs/phps/Php_tkn_wkr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.php; import gplx.*; +package gplx.langs.phps; import gplx.*; import gplx.langs.*; public interface Php_tkn_wkr { void Init(Php_ctx ctx); void Process(Php_tkn tkn); @@ -24,7 +24,7 @@ public interface Php_tkn_wkr { class Php_tkn_wkr_tkn implements Php_tkn_wkr { public void Init(Php_ctx ctx) {} public List_adp List() {return lines;} List_adp lines = List_adp_.new_(); - public Gfo_msg_log Msg_log() {return msg_log;} Gfo_msg_log msg_log = new Gfo_msg_log("gplx.php"); + public Gfo_msg_log Msg_log() {return msg_log;} Gfo_msg_log msg_log = new Gfo_msg_log("gplx.langs.phps"); public void Clear() {lines.Clear(); msg_log.Clear();} public void Process(Php_tkn tkn) { lines.Add(tkn); diff --git a/400_xowa/src/gplx/core/regxs/Gfo_pattern.java b/400_xowa/src/gplx/langs/regxs/Gfo_pattern.java similarity index 91% rename from 400_xowa/src/gplx/core/regxs/Gfo_pattern.java rename to 400_xowa/src/gplx/langs/regxs/Gfo_pattern.java index ea3f0c916..763179103 100644 --- a/400_xowa/src/gplx/core/regxs/Gfo_pattern.java +++ b/400_xowa/src/gplx/langs/regxs/Gfo_pattern.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.regxs; import gplx.*; import gplx.core.*; +package gplx.langs.regxs; import gplx.*; import gplx.langs.*; public class Gfo_pattern { private final Gfo_pattern_itm[] itms; private final int itms_len; private final Gfo_pattern_ctx ctx = new Gfo_pattern_ctx(); @@ -38,7 +38,7 @@ public class Gfo_pattern { return ctx.Rslt_pass() && val_pos == val_len; } public static Gfo_pattern[] Parse_to_ary(byte[] raw) { - byte[][] patterns = Bry_.Split(raw, Byte_ascii.Semic, true); + byte[][] patterns = Bry_split_.Split(raw, Byte_ascii.Semic, true); int patterns_len = patterns.length; Gfo_pattern[] rv = new Gfo_pattern[patterns_len]; for (int i = 0; i < patterns_len; ++i) { diff --git a/400_xowa/src/gplx/core/regxs/Gfo_pattern_ctx.java b/400_xowa/src/gplx/langs/regxs/Gfo_pattern_ctx.java similarity index 94% rename from 400_xowa/src/gplx/core/regxs/Gfo_pattern_ctx.java rename to 400_xowa/src/gplx/langs/regxs/Gfo_pattern_ctx.java index 994960f1c..af0769d88 100644 --- a/400_xowa/src/gplx/core/regxs/Gfo_pattern_ctx.java +++ b/400_xowa/src/gplx/langs/regxs/Gfo_pattern_ctx.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.regxs; import gplx.*; import gplx.core.*; +package gplx.langs.regxs; import gplx.*; import gplx.langs.*; public class Gfo_pattern_ctx { public boolean Rslt_pass() {return rslt;} private boolean rslt; public void Rslt_fail_() {rslt = false;} diff --git a/400_xowa/src/gplx/core/regxs/Gfo_pattern_itm.java b/400_xowa/src/gplx/langs/regxs/Gfo_pattern_itm.java similarity index 91% rename from 400_xowa/src/gplx/core/regxs/Gfo_pattern_itm.java rename to 400_xowa/src/gplx/langs/regxs/Gfo_pattern_itm.java index b3d98b50b..0762254ae 100644 --- a/400_xowa/src/gplx/core/regxs/Gfo_pattern_itm.java +++ b/400_xowa/src/gplx/langs/regxs/Gfo_pattern_itm.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.regxs; import gplx.*; import gplx.core.*; +package gplx.langs.regxs; import gplx.*; import gplx.langs.*; import gplx.core.strings.*; public interface Gfo_pattern_itm { byte Tid(); @@ -37,8 +37,8 @@ class Gfo_pattern_itm_text implements Gfo_pattern_itm { int text_end = pos + text_len; if (text_end > src_len) text_end = src_len; if (ctx.Prv_was_wild()) { - int text_bgn = Bry_finder.Find_fwd(src, text, pos); - pass = text_bgn != Bry_finder.Not_found; + int text_bgn = Bry_find_.Find_fwd(src, text, pos); + pass = text_bgn != Bry_find_.Not_found; if (pass) pos = text_bgn + text_len; } diff --git a/400_xowa/src/gplx/core/regxs/Gfo_pattern_itm_.java b/400_xowa/src/gplx/langs/regxs/Gfo_pattern_itm_.java similarity index 94% rename from 400_xowa/src/gplx/core/regxs/Gfo_pattern_itm_.java rename to 400_xowa/src/gplx/langs/regxs/Gfo_pattern_itm_.java index fce4328a2..591a54c00 100644 --- a/400_xowa/src/gplx/core/regxs/Gfo_pattern_itm_.java +++ b/400_xowa/src/gplx/langs/regxs/Gfo_pattern_itm_.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.regxs; import gplx.*; import gplx.core.*; +package gplx.langs.regxs; import gplx.*; import gplx.langs.*; public class Gfo_pattern_itm_ { public static final byte Tid_text = 0, Tid_wild = 1; public static Gfo_pattern_itm[] Compile(byte[] raw) { diff --git a/400_xowa/src/gplx/core/regxs/Gfo_pattern_tst.java b/400_xowa/src/gplx/langs/regxs/Gfo_pattern_tst.java similarity index 96% rename from 400_xowa/src/gplx/core/regxs/Gfo_pattern_tst.java rename to 400_xowa/src/gplx/langs/regxs/Gfo_pattern_tst.java index 14563fd5c..240fa57ec 100644 --- a/400_xowa/src/gplx/core/regxs/Gfo_pattern_tst.java +++ b/400_xowa/src/gplx/langs/regxs/Gfo_pattern_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.regxs; import gplx.*; import gplx.core.*; +package gplx.langs.regxs; import gplx.*; import gplx.langs.*; import org.junit.*; import gplx.core.strings.*; public class Gfo_pattern_tst { @Before public void init() {fxt.Clear();} private Gfo_pattern_itm_fxt fxt = new Gfo_pattern_itm_fxt(); diff --git a/400_xowa/src/gplx/core/xmls/Gfo_xml_wtr.java b/400_xowa/src/gplx/langs/xmls/Gfo_xml_wtr.java similarity index 96% rename from 400_xowa/src/gplx/core/xmls/Gfo_xml_wtr.java rename to 400_xowa/src/gplx/langs/xmls/Gfo_xml_wtr.java index ae209ac1f..f8445b432 100644 --- a/400_xowa/src/gplx/core/xmls/Gfo_xml_wtr.java +++ b/400_xowa/src/gplx/langs/xmls/Gfo_xml_wtr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.xmls; import gplx.*; import gplx.core.*; +package gplx.langs.xmls; import gplx.*; import gplx.langs.*; public class Gfo_xml_wtr { private final Bry_bfr bfr = Bry_bfr.reset_(255), txt_bfr = Bry_bfr.reset_(32); private byte quote_byte = Byte_ascii.Apos; diff --git a/400_xowa/src/gplx/core/xmls/Gfo_xml_wtr_tst.java b/400_xowa/src/gplx/langs/xmls/Gfo_xml_wtr_tst.java similarity index 94% rename from 400_xowa/src/gplx/core/xmls/Gfo_xml_wtr_tst.java rename to 400_xowa/src/gplx/langs/xmls/Gfo_xml_wtr_tst.java index 269c012fd..b463fd69d 100644 --- a/400_xowa/src/gplx/core/xmls/Gfo_xml_wtr_tst.java +++ b/400_xowa/src/gplx/langs/xmls/Gfo_xml_wtr_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.core.xmls; import gplx.*; import gplx.core.*; +package gplx.langs.xmls; import gplx.*; import gplx.langs.*; import org.junit.*; public class Gfo_xml_wtr_tst { private final Gfo_xml_wtr_fxt fxt = new Gfo_xml_wtr_fxt(); diff --git a/400_xowa/src/gplx/xowa/Xoa_app.java b/400_xowa/src/gplx/xowa/Xoa_app.java index d8af563a2..20e162aa7 100644 --- a/400_xowa/src/gplx/xowa/Xoa_app.java +++ b/400_xowa/src/gplx/xowa/Xoa_app.java @@ -16,14 +16,14 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa; import gplx.*; -import gplx.ios.*; -import gplx.core.json.*; +import gplx.ios.*; import gplx.core.net.*; +import gplx.langs.jsons.*; import gplx.xowa.apps.*; import gplx.xowa.apps.fsys.*; import gplx.xowa.apps.metas.*; import gplx.xowa.apis.*; import gplx.xowa.bldrs.css.*; import gplx.xowa.files.caches.*; import gplx.xowa.files.imgs.*; -import gplx.xowa.urls.encoders.*; +import gplx.langs.htmls.encoders.*; import gplx.xowa.wikis.*; -import gplx.xowa.wmfs.*; +import gplx.xowa.wms.*; import gplx.xowa.html.hrefs.*; import gplx.xowa.html.wtrs.*; import gplx.xowa.html.js.*; import gplx.xowa.html.bridges.*; import gplx.xowa.users.*; public interface Xoa_app { @@ -48,4 +48,5 @@ public interface Xoa_app { Bry_bfr_mkr Utl__bfr_mkr(); Url_encoder_mgr Utl__encoder_mgr(); Json_parser Utl__json_parser(); + Gfo_inet_conn Utl__inet_conn(); } diff --git a/400_xowa/src/gplx/xowa/Xoa_app_.java b/400_xowa/src/gplx/xowa/Xoa_app_.java index 24b0de4d4..0e5f430e8 100644 --- a/400_xowa/src/gplx/xowa/Xoa_app_.java +++ b/400_xowa/src/gplx/xowa/Xoa_app_.java @@ -17,10 +17,10 @@ along with this program. If not, see . */ package gplx.xowa; import gplx.*; import gplx.core.consoles.*; import gplx.dbs.*; import gplx.ios.*; import gplx.gfui.*; -import gplx.xowa.apps.*; import gplx.xowa.langs.*; import gplx.xowa.users.*; +import gplx.xowa.apps.*; import gplx.xowa.apps.gfss.*; import gplx.xowa.langs.*; import gplx.xowa.users.*; import gplx.xowa.files.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.html.hdumps.core.*; import gplx.xowa.gui.views.boots.*; -import gplx.xowa.urls.encoders.*; +import gplx.langs.htmls.encoders.*; public class Xoa_app_ { public static void Run(String... args) { try { @@ -58,7 +58,7 @@ public class Xoa_app_ { } } public static final String Name = "xowa"; - public static final String Version = "2.9.2.1"; + public static final String Version = "2.9.3.1"; public static String Build_date = "2012-12-30 00:00:00"; public static String Op_sys_str; public static String User_agent = ""; @@ -125,6 +125,8 @@ class Xoa_app_boot_mgr { , App_cmd_arg.opt_("server_port_send").Example_("55001").Note_("applies to --app_mode server; port where xowa server will send messages; clients should listen for messages from this port") , App_cmd_arg.opt_("http_server_port").Example_("8080").Note_("applies to --app_mode http_server; port used by http_server; default is 8080") , App_cmd_arg.opt_("http_server_home").Example_("home/wiki/Main_Page").Note_("applies to --app_mode http_server; default home page for root address. EX: navigating to localhost:8080 will navigate to localhost:8080/home/wiki/Main_Page") + , App_cmd_arg.opt_("http_server.max_clients").Example_("15").Note_("applies to --app_mode http_server; limits maximum number of concurrent connections; default is 0 (no limit)") + , App_cmd_arg.opt_("http_server.max_clients_timeout").Example_("50").Note_("applies to --app_mode http_server; time in milliseconds to wait before checking again to see if a connection is free; default is 50 (wait 50 ms)") , App_cmd_arg.sys_header_("show_license").Dflt_(true) , App_cmd_arg.sys_args_("show_args").Dflt_(true) , App_cmd_arg.sys_help_() @@ -163,6 +165,8 @@ class Xoa_app_boot_mgr { int server_port_send = args_mgr.Args_get("server_port_send").Val_as_int_or(55001); int http_server_port = args_mgr.Args_get("http_server_port").Val_as_int_or(8080); String http_server_home = args_mgr.Args_get("http_server_home").Val_as_str_or("home/wiki/Main_Page"); + int http_server_max_clients = args_mgr.Args_get("http_server.max_clients").Val_as_int_or(0); + int http_server_max_clients_timeout = args_mgr.Args_get("http_server.max_clients_timeout").Val_as_int_or(50); Xoa_app_.Op_sys_str = args_mgr.Args_get("bin_dir_name").Val_as_str_or(Bin_dir_name()); Xoa_app_.User_agent = String_.Format("XOWA/{0} ({1}) [gnosygnu@gmail.com]", Xoa_app_.Version, Xoa_app_.Op_sys_str); String cmd_text = args_mgr.Args_get("cmd_text").Val_as_str_or(null); @@ -179,8 +183,10 @@ class Xoa_app_boot_mgr { if (launch_url != null) app.Api_root().App().Startup().Tabs().Manual_(launch_url); app.Tcp_server().Rdr_port_(server_port_recv).Wtr_port_(server_port_send); - app.Http_server().Port_(http_server_port); - app.Http_server().Home_(http_server_home); + gplx.xowa.servers.http.Http_server_mgr server_mgr = app.Http_server(); + server_mgr.Port_(http_server_port); + server_mgr.Home_(http_server_home); + server_mgr.Wkr_pool().Init(http_server_max_clients, http_server_max_clients_timeout); app.Init_by_app(); chkpoint = "init_gfs"; } catch (Exception e) {usr_dlg.Warn_many("", "", "app init failed: ~{0} ~{1}", chkpoint, Err_.Message_gplx_full(e));} diff --git a/400_xowa/src/gplx/xowa/Xoa_app_fxt.java b/400_xowa/src/gplx/xowa/Xoa_app_fxt.java index 546ef8835..8f39189f0 100644 --- a/400_xowa/src/gplx/xowa/Xoa_app_fxt.java +++ b/400_xowa/src/gplx/xowa/Xoa_app_fxt.java @@ -17,6 +17,9 @@ along with this program. If not, see . */ package gplx.xowa; import gplx.*; import gplx.dbs.*; +import gplx.xowa.bldrs.*; +import gplx.xowa.langs.*; +import gplx.xowa.nss.*; import gplx.xowa.apps.*; import gplx.xowa.files.exts.*; import gplx.xowa.wikis.domains.*; public class Xoa_app_fxt { diff --git a/400_xowa/src/gplx/xowa/Xoa_ttl.java b/400_xowa/src/gplx/xowa/Xoa_ttl.java index 78d23c808..3bb5c59af 100644 --- a/400_xowa/src/gplx/xowa/Xoa_ttl.java +++ b/400_xowa/src/gplx/xowa/Xoa_ttl.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa; import gplx.*; -import gplx.core.primitives.*; import gplx.core.btries.*; import gplx.xowa.wikis.xwikis.*; import gplx.xowa.langs.cases.*; +import gplx.core.primitives.*; import gplx.core.btries.*; import gplx.langs.htmls.encoders.*; import gplx.xowa.wikis.xwikis.*; import gplx.xowa.langs.cases.*; +import gplx.xowa.nss.*; import gplx.xowa.parsers.amps.*; import gplx.xowa.parsers.miscs.*; import gplx.xowa.wikis.ttls.*; public class Xoa_ttl { // PAGE:en.w:http://en.wikipedia.org/wiki/Help:Link; REF.MW: Ttl.php|secureAndSplit; public Xow_ns Ns() {return ns;} private Xow_ns ns; @@ -85,7 +86,7 @@ public class Xoa_ttl { // PAGE:en.w:http://en.wikipedia.org/wiki/Help:Link; REF. } public byte[] Page_txt_wo_qargs() { // assume that no Special page has non-ascii characters int full_txt_len = full_txt.length; - int ques_pos = Bry_finder.Find_bwd(full_txt, Byte_ascii.Question, full_txt_len, page_bgn); + int ques_pos = Bry_find_.Find_bwd(full_txt, Byte_ascii.Question, full_txt_len, page_bgn); return Bry_.Mid(full_txt, page_bgn, ques_pos == Bry_.NotFound ? full_txt_len : ques_pos); } public static Xoa_ttl parse(Xowe_wiki wiki, int ns_id, byte[] ttl) { @@ -99,7 +100,7 @@ public class Xoa_ttl { // PAGE:en.w:http://en.wikipedia.org/wiki/Help:Link; REF. // $dbkey = preg_replace( '/[ _\xA0\x{1680}\x{180E}\x{2000}-\x{200A}\x{2028}\x{2029}\x{202F}\x{205F}\x{3000}]+/u', '_', $dbkey ); private static final int Char__bidi = 1, Char__ws = 2; private static final Btrie_slim_mgr char_trie = Btrie_slim_mgr.cs() - .Add_many_int(Char__bidi , Bry_.ints_(0xE2, 0x80, 0x8E), Bry_.ints_(0xE2, 0x80, 0x8F), Bry_.ints_(0xE2, 0x80, 0xAA), Bry_.ints_(0xE2, 0x80, 0xAB), Bry_.ints_(0xE2, 0x80, 0xAC), Bry_.ints_(0xE2, 0x80, 0xAD), Bry_.ints_(0xE2, 0x80, 0xAE)) + .Add_many_int(Char__bidi , Bry_.new_ints(0xE2, 0x80, 0x8E), Bry_.new_ints(0xE2, 0x80, 0x8F), Bry_.new_ints(0xE2, 0x80, 0xAA), Bry_.new_ints(0xE2, 0x80, 0xAB), Bry_.new_ints(0xE2, 0x80, 0xAC), Bry_.new_ints(0xE2, 0x80, 0xAD), Bry_.new_ints(0xE2, 0x80, 0xAE)) .Add_many_int(Char__ws , "\u00A0", "\u1680", "\u180E", "\u2000", "\u2001", "\u2002", "\u2003", "\u2004", "\u2005", "\u2006", "\u2007", "\u2008", "\u2009", "\u200A", "\u2028", "\u2029", "\u202F", "\u205F", "\u3000") ; public static Xoa_ttl new_(Xowe_wiki wiki, Gfo_msg_log msg_log, byte[] src, int bgn, int end) { @@ -177,7 +178,7 @@ public class Xoa_ttl { // PAGE:en.w:http://en.wikipedia.org/wiki/Help:Link; REF. byte[] ns_name = ns.Name_txt(); int ns_name_len = ns_name.length; int tmp_bfr_end = bfr.Len(); - if (!Bry_.Eq(ns_name, bfr.Bfr(), ltr_bgn, tmp_bfr_end) && ns_name_len == tmp_bfr_end - ltr_bgn) { // if (a) ns_name != bfr_txt (b) both are same length; note that (b) should not happen, but want to safeguard against mismatched arrays + if (!Bry_.Eq(bfr.Bfr(), ltr_bgn, tmp_bfr_end, ns_name) && ns_name_len == tmp_bfr_end - ltr_bgn) { // if (a) ns_name != bfr_txt (b) both are same length; note that (b) should not happen, but want to safeguard against mismatched arrays Bry_.Set(bfr.Bfr(), ltr_bgn, tmp_bfr_end, ns_name); } ns_bgn = ltr_bgn; @@ -232,7 +233,7 @@ public class Xoa_ttl { // PAGE:en.w:http://en.wikipedia.org/wiki/Help:Link; REF. b_ary = amp_itm.Xml_name_bry(); break; case Xop_amp_trie_itm.Char_int_null: // &#xx; - int end_pos = Bry_finder.Find_fwd(src, Byte_ascii.Semic, match_pos, end); + int end_pos = Bry_find_.Find_fwd(src, Byte_ascii.Semic, match_pos, end); if (end_pos == Bry_.NotFound) {} // &# but no terminating ";" noop: defaults to current_byte which will be added below; else { b_ary = amp_itm.Xml_name_bry(); @@ -247,7 +248,7 @@ public class Xoa_ttl { // PAGE:en.w:http://en.wikipedia.org/wiki/Help:Link; REF. else { boolean pass = amp_mgr.Parse_as_int(amp_itm.Tid() == Xop_amp_trie_itm.Tid_num_hex, src, end, cur2, match_pos); if (pass) { - b_ary = gplx.intl.Utf16_.Encode_int_to_bry(amp_mgr.Rslt_val()); + b_ary = gplx.core.intls.Utf16_.Encode_int_to_bry(amp_mgr.Rslt_val()); if (b_ary.length == 1 && b_ary[0] == Byte_ascii.Hash) // NOTE: A#B should be interpreted as A#b; PAGE:en.s:The_English_Constitution_(1894) DATE:2014-09-07 anch_bgn = (txt_bb_len) + 1; match_pos = amp_mgr.Rslt_pos(); @@ -263,7 +264,7 @@ public class Xoa_ttl { // PAGE:en.w:http://en.wikipedia.org/wiki/Help:Link; REF. && src[cur + 3] == Byte_ascii.Dash ) { int cur3 = cur + 3;//cur = ttlTrie.Match_pos(); - int find = Bry_finder.Find_fwd(src, Xop_comm_lxr.End_ary, cur3, end); + int find = Bry_find_.Find_fwd(src, Xop_comm_lxr.End_ary, cur3, end); if (find != -1) { cur = find + Xop_comm_lxr.End_ary.length; continue; @@ -341,7 +342,7 @@ public class Xoa_ttl { // PAGE:en.w:http://en.wikipedia.org/wiki/Help:Link; REF. if ( ns.Case_match() == Xow_ns_case_.Id_1st && wik_bgn == -1 ) { // do not check case if xwiki; EX: "fr:" would have a wik_bgn of 0 (and a wik_end of 3); "A" (and any non-xwiki ttl) would have a wik_bgn == -1 byte char_1st = full_txt[page_bgn]; - int char_1st_len = gplx.intl.Utf8_.Len_of_char_by_1st_byte(char_1st); + int char_1st_len = gplx.core.intls.Utf8_.Len_of_char_by_1st_byte(char_1st); int page_end = page_bgn + char_1st_len; if ( char_1st_len > 1) { // 1st char is multi-byte char int full_txt_len = full_txt.length; @@ -375,30 +376,6 @@ public class Xoa_ttl { // PAGE:en.w:http://en.wikipedia.org/wiki/Help:Link; REF. public static final int Null_wik_bgn = -1; public static final Xoa_ttl Null = null; } -class Xoa_url_encoder { - public byte[] Encode(byte[] src) { - int src_len = src.length; - for (int i = 0; i < src_len; i++) { - byte b = src[i]; - switch (b) { - case Byte_ascii.Space: bb.Add(Bry_underline); break; - case Byte_ascii.Amp: bb.Add(Bry_amp); break; - case Byte_ascii.Apos: bb.Add(Bry_apos); break; - case Byte_ascii.Eq: bb.Add(Bry_eq); break; - case Byte_ascii.Plus: bb.Add(Bry_plus); break; - default: bb.Add_byte(b); break; - // FUTURE: html_entities, etc: - } - } - return bb.Xto_bry_and_clear(); - } - private static final byte[] Bry_amp = Bry_.new_a7("%26"), Bry_eq = Bry_.new_a7("%3D") - , Bry_plus = Bry_.new_a7("%2B"), Bry_apos = Bry_.new_a7("%27") - , Bry_underline = new byte[] {Byte_ascii.Underline} - ; - Bry_bfr bb = Bry_bfr.new_(); - public static final Xoa_url_encoder _ = new Xoa_url_encoder(); Xoa_url_encoder() {} -} class Xoa_ttl_trie { public static Btrie_fast_mgr new_() { Btrie_fast_mgr rv = Btrie_fast_mgr.cs(); diff --git a/400_xowa/src/gplx/xowa/Xoa_url.java b/400_xowa/src/gplx/xowa/Xoa_url.java index 177797c17..7e8ac3d7c 100644 --- a/400_xowa/src/gplx/xowa/Xoa_url.java +++ b/400_xowa/src/gplx/xowa/Xoa_url.java @@ -54,7 +54,7 @@ public class Xoa_url { return Bry_.Mid(raw, page_bgn, raw_len);// else take everything after "/wiki/"; } private int Page_bgn(int raw_len) { - int wiki_pos = Bry_finder.Find_fwd(raw, Xoh_href_.Bry__wiki, 0, raw_len); // look for /wiki/ + int wiki_pos = Bry_find_.Find_fwd(raw, Xoh_href_.Bry__wiki, 0, raw_len); // look for /wiki/ return wiki_pos == Bry_.NotFound ? Bry_.NotFound : wiki_pos + Xoh_href_.Bry__wiki.length; } public boolean Eq_page(Xoa_url comp) {return Bry_.Eq(wiki_bry, comp.wiki_bry) && Bry_.Eq(page_bry, comp.page_bry) && this.Qargs_mgr().Match(Xoa_url_.Qarg__redirect, Xoa_url_.Qarg__redirect__yes) == comp.Qargs_mgr().Match(Xoa_url_.Qarg__redirect, Xoa_url_.Qarg__redirect__yes);} diff --git a/400_xowa/src/gplx/xowa/Xoa_url_encoder.java b/400_xowa/src/gplx/xowa/Xoa_url_encoder.java new file mode 100644 index 000000000..878fbe09b --- /dev/null +++ b/400_xowa/src/gplx/xowa/Xoa_url_encoder.java @@ -0,0 +1,42 @@ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012 gnosygnu@gmail.com + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ +package gplx.xowa; import gplx.*; +public class Xoa_url_encoder { + public byte[] Encode(byte[] src) { + int src_len = src.length; + for (int i = 0; i < src_len; i++) { + byte b = src[i]; + switch (b) { + case Byte_ascii.Space: bb.Add(Bry_underline); break; + case Byte_ascii.Amp: bb.Add(Bry_amp); break; + case Byte_ascii.Apos: bb.Add(Bry_apos); break; + case Byte_ascii.Eq: bb.Add(Bry_eq); break; + case Byte_ascii.Plus: bb.Add(Bry_plus); break; + default: bb.Add_byte(b); break; + // FUTURE: html_entities, etc: + } + } + return bb.Xto_bry_and_clear(); + } + private static final byte[] Bry_amp = Bry_.new_a7("%26"), Bry_eq = Bry_.new_a7("%3D") + , Bry_plus = Bry_.new_a7("%2B"), Bry_apos = Bry_.new_a7("%27") + , Bry_underline = new byte[] {Byte_ascii.Underline} + ; + Bry_bfr bb = Bry_bfr.new_(); + public static final Xoa_url_encoder _ = new Xoa_url_encoder(); Xoa_url_encoder() {} +} diff --git a/400_xowa/src/gplx/xowa/Xoae_app.java b/400_xowa/src/gplx/xowa/Xoae_app.java index f17a55d36..587841a44 100644 --- a/400_xowa/src/gplx/xowa/Xoae_app.java +++ b/400_xowa/src/gplx/xowa/Xoae_app.java @@ -16,17 +16,17 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa; import gplx.*; -import gplx.core.btries.*; import gplx.core.flds.*; import gplx.ios.*; import gplx.core.threads.*; import gplx.core.json.*; -import gplx.xowa.apps.*; import gplx.xowa.apps.caches.*; import gplx.xowa.apps.fsys.*; import gplx.xowa.apis.*; import gplx.xowa.apps.metas.*; import gplx.xowa.urls.encoders.*; import gplx.xowa.apps.progs.*; +import gplx.core.btries.*; import gplx.core.flds.*; import gplx.ios.*; import gplx.core.threads.*; import gplx.langs.jsons.*; import gplx.core.primitives.*; import gplx.core.net.*; +import gplx.xowa.apps.*; import gplx.xowa.apps.caches.*; import gplx.xowa.apps.fsys.*; import gplx.xowa.apis.*; import gplx.xowa.apps.metas.*; import gplx.langs.htmls.encoders.*; import gplx.xowa.apps.progs.*; import gplx.xowa.apps.gfss.*; import gplx.xowa.langs.*; import gplx.xowa.specials.*; import gplx.xowa.cfgs2.*; -import gplx.xowa.bldrs.css.*; import gplx.xowa.bldrs.installs.*; +import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.css.*; import gplx.xowa.bldrs.installs.*; import gplx.xowa.files.*; import gplx.xowa.files.caches.*; import gplx.xowa.files.imgs.*; -import gplx.xowa.wikis.*; import gplx.xowa.users.*; import gplx.xowa.gui.*; import gplx.xowa.cfgs.*; import gplx.xowa.ctgs.*; import gplx.xowa.html.tocs.*; import gplx.xowa.fmtrs.*; import gplx.xowa.html.*; +import gplx.xowa.wikis.*; import gplx.xowa.users.*; import gplx.xowa.gui.*; import gplx.xowa.cfgs.*; import gplx.xowa.ctgs.*; import gplx.xowa.html.tocs.*; import gplx.xowa.apps.fmtrs.*; import gplx.xowa.html.*; import gplx.xowa.html.hrefs.*; import gplx.xowa.html.wtrs.*; import gplx.xowa.html.ns_files.*; import gplx.xowa.html.bridges.*; import gplx.xowa.parsers.*; import gplx.xowa.parsers.amps.*; import gplx.xowa.parsers.tblws.*; import gplx.xowa.parsers.xndes.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.scribunto.*; import gplx.xowa.xtns.math.*; import gplx.xowa.parsers.utils.*; import gplx.xowa.parsers.logs.*; import gplx.xowa.servers.tcp.*; import gplx.xowa.servers.http.*; -import gplx.xowa.wmfs.*; +import gplx.xowa.wms.*; import gplx.xowa.tdbs.*; import gplx.xowa.tdbs.hives.*; public class Xoae_app implements Xoa_app, GfoInvkAble { public Xoae_app(Gfo_usr_dlg usr_dlg, Xoa_app_type app_type, Io_url root_dir, Io_url wiki_dir, Io_url file_dir, Io_url user_dir, Io_url css_dir, String bin_dir_name) { @@ -65,22 +65,24 @@ public class Xoae_app implements Xoa_app, GfoInvkAble { this.html__lnki_bldr = new Xoh_lnki_bldr(this, html__href_wtr); this.html__bridge_mgr = new Xoh_bridge_mgr(utl__json_parser); } - public Xoa_app_type App_type() {return app_type;} private final Xoa_app_type app_type; - public Xoa_fsys_mgr Fsys_mgr() {return fsys_mgr;} private final Xoa_fsys_mgr fsys_mgr; - public Xof_cache_mgr File__cache_mgr() {return file_mgr.Cache_mgr();} - public Xof_img_mgr File__img_mgr() {return file_mgr.Img_mgr();} - public Io_download_fmt File__download_fmt() {return wmf_mgr.Download_wkr().Download_xrg().Download_fmt();} - public Xoh_href_parser Html__href_parser() {return html__href_parser;} private final Xoh_href_parser html__href_parser = new Xoh_href_parser(); - public Xoh_href_wtr Html__href_wtr() {return html__href_wtr;} private final Xoh_href_wtr html__href_wtr = new Xoh_href_wtr(); - public Xoh_lnki_bldr Html__lnki_bldr() {return html__lnki_bldr;} private final Xoh_lnki_bldr html__lnki_bldr; - public Xoa_css_extractor Html__css_installer() {return html__css_installer;} private final Xoa_css_extractor html__css_installer = new Xoa_css_extractor(); - public Xoh_bridge_mgr Html__bridge_mgr() {return html__bridge_mgr;} private final Xoh_bridge_mgr html__bridge_mgr; - public Xowmf_mgr Wmf_mgr() {return wmf_mgr;} private final Xowmf_mgr wmf_mgr = new Xowmf_mgr(); - public Bry_bfr_mkr Utl__bfr_mkr() {return Xoa_app_.Utl__bfr_mkr();} - public Url_encoder_mgr Utl__encoder_mgr() {return Xoa_app_.Utl__encoder_mgr();} - public Json_parser Utl__json_parser() {return utl__json_parser;} private final Json_parser utl__json_parser = new Json_parser(); - public Xoa_meta_mgr Meta_mgr() {return meta_mgr;} private final Xoa_meta_mgr meta_mgr; - public boolean Bldr__running() {return bldr__running;} public void Bldr__running_(boolean v) {this.bldr__running = v;} private boolean bldr__running; + public Xoa_app_type App_type() {return app_type;} private final Xoa_app_type app_type; + public Xoa_fsys_mgr Fsys_mgr() {return fsys_mgr;} private final Xoa_fsys_mgr fsys_mgr; + public Xof_cache_mgr File__cache_mgr() {return file_mgr.Cache_mgr();} + public Xof_img_mgr File__img_mgr() {return file_mgr.Img_mgr();} + public Io_download_fmt File__download_fmt() {return wmf_mgr.Download_wkr().Download_xrg().Download_fmt();} + public Xoh_href_parser Html__href_parser() {return html__href_parser;} private final Xoh_href_parser html__href_parser = new Xoh_href_parser(); + public Xoh_href_wtr Html__href_wtr() {return html__href_wtr;} private final Xoh_href_wtr html__href_wtr = new Xoh_href_wtr(); + public Xoh_lnki_bldr Html__lnki_bldr() {return html__lnki_bldr;} private final Xoh_lnki_bldr html__lnki_bldr; + public Xoa_css_extractor Html__css_installer() {return html__css_installer;} private final Xoa_css_extractor html__css_installer = new Xoa_css_extractor(); + public Xoh_bridge_mgr Html__bridge_mgr() {return html__bridge_mgr;} private final Xoh_bridge_mgr html__bridge_mgr; + public Xowmf_mgr Wmf_mgr() {return wmf_mgr;} private final Xowmf_mgr wmf_mgr = new Xowmf_mgr(); + public Bry_bfr_mkr Utl__bfr_mkr() {return Xoa_app_.Utl__bfr_mkr();} + public Url_encoder_mgr Utl__encoder_mgr() {return Xoa_app_.Utl__encoder_mgr();} + public Json_parser Utl__json_parser() {return utl__json_parser;} private final Json_parser utl__json_parser = new Json_parser(); + public Gfo_inet_conn Utl__inet_conn() {return inet_conn;} public void Utl__inet_conn_(Gfo_inet_conn v) {this.inet_conn = v;} private Gfo_inet_conn inet_conn = Gfo_inet_conn_.new_http(); + public Xoa_meta_mgr Meta_mgr() {return meta_mgr;} private final Xoa_meta_mgr meta_mgr; + public boolean Bldr__running() {return bldr__running;} public void Bldr__running_(boolean v) {this.bldr__running = v;} private boolean bldr__running; + public Xoa_parser_mgr Parser_mgr() {return parser_mgr;} private final Xoa_parser_mgr parser_mgr = new Xoa_parser_mgr(); public Xoae_wiki_mgr Wiki_mgr() {return wiki_mgr;} private Xoae_wiki_mgr wiki_mgr; public Xoa_wiki_mgr Wiki_mgri() {return wiki_mgr;} @@ -93,7 +95,6 @@ public class Xoae_app implements Xoa_app, GfoInvkAble { public Xob_bldr Bldr() {return bldr;} private Xob_bldr bldr; public Xow_xtn_mgr Xtn_mgr() {return xtn_mgr;} private Xow_xtn_mgr xtn_mgr; public Xoapi_root Api_root() {return api_root;} private Xoapi_root api_root; - public Xop_tkn_mkr Tkn_mkr() {return tkn_mkr;} private Xop_tkn_mkr tkn_mkr = new Xop_tkn_mkr(); public Gfo_usr_dlg Usr_dlg() {return Xoa_app_.Usr_dlg();} public Gfo_usr_dlg__log Log_wtr() {return log_wtr;} private Gfo_usr_dlg__log log_wtr; public Xoa_gfs_mgr Gfs_mgr() {return Xoa_app_.Gfs_mgr();} diff --git a/400_xowa/src/gplx/xowa/Xoae_page.java b/400_xowa/src/gplx/xowa/Xoae_page.java index a45347744..3c08060f2 100644 --- a/400_xowa/src/gplx/xowa/Xoae_page.java +++ b/400_xowa/src/gplx/xowa/Xoae_page.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa; import gplx.*; +import gplx.xowa.langs.*; import gplx.xowa.gui.*; import gplx.xowa.gui.views.*; import gplx.xowa.html.*; import gplx.xowa.pages.*; import gplx.xowa.files.*; import gplx.xowa.files.xfers.*; import gplx.xowa.xtns.cite.*; import gplx.xowa.xtns.wdatas.*; import gplx.xowa.parsers.lnkis.redlinks.*; import gplx.xowa.html.tocs.*; import gplx.xowa.html.modules.popups.*; import gplx.xowa.html.hdumps.pages.*; import gplx.xowa.xtns.wdatas.pfuncs.*; diff --git a/400_xowa/src/gplx/xowa/Xop_fxt.java b/400_xowa/src/gplx/xowa/Xop_fxt.java index 85afc13d6..a343eabfc 100644 --- a/400_xowa/src/gplx/xowa/Xop_fxt.java +++ b/400_xowa/src/gplx/xowa/Xop_fxt.java @@ -16,9 +16,12 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa; import gplx.*; +import gplx.core.tests.*; +import gplx.xowa.cfgs.*; import gplx.xowa.langs.*; import gplx.xowa.html.*; import gplx.xowa.parsers.*; import gplx.xowa.parsers.amps.*; import gplx.xowa.parsers.apos.*; import gplx.xowa.parsers.hdrs.*; import gplx.xowa.parsers.lists.*; import gplx.xowa.parsers.paras.*; import gplx.xowa.parsers.xndes.*; import gplx.xowa.parsers.tmpls.*; import gplx.xowa.parsers.miscs.*; import gplx.xowa.parsers.tblws.*; import gplx.xowa.parsers.lnkes.*; import gplx.xowa.parsers.lnkis.*; import gplx.xowa.files.exts.*; import gplx.xowa.files.repos.*; +import gplx.xowa.nss.*; import gplx.xowa.tdbs.hives.*; public class Xop_fxt { public Xop_fxt() { @@ -36,11 +39,11 @@ public class Xop_fxt { app.File_mgr().Repo_mgr().Set("src:wiki", "mem/wiki/repo/src/", wiki.Domain_str()).Ext_rules_(Xof_rule_grp.Grp_app_default).Dir_depth_(2); app.File_mgr().Repo_mgr().Set("trg:wiki", "mem/wiki/repo/trg/", wiki.Domain_str()).Ext_rules_(Xof_rule_grp.Grp_app_default).Dir_depth_(2).Primary_(true); wiki.File_mgr().Repo_mgr().Add_repo(Bry_.new_a7("src:wiki"), Bry_.new_a7("trg:wiki")); - ctx = wiki.Ctx(); + ctx = wiki.Parser_mgr().Ctx(); mock_wkr.Clear_commons(); // assume all files are in repo 0 wiki.File_mgr().Repo_mgr().Page_finder_(mock_wkr); - parser = wiki.Parser(); - tkn_mkr = app.Tkn_mkr(); + parser = wiki.Parser_mgr().Main(); + this.tkn_mkr = app.Parser_mgr().Tkn_mkr(); ctx.Para().Enabled_n_(); hdom_wtr = wiki.Html_mgr().Html_wtr(); wiki.Html_mgr().Img_suppress_missing_src_(false); @@ -343,7 +346,7 @@ public class Xop_fxt { byte[] ttl_bry = Bry_.new_u8(ttl_str); Xoa_url page_url = Xoa_url.new_(wiki.Domain_bry(), ttl_bry); Xoa_ttl ttl = Xoa_ttl.parse(wiki, ttl_bry); - return wiki.Load_page_by_ttl(page_url, ttl).Data_raw(); + return wiki.Data_mgr().Load_page_by_ttl(page_url, ttl).Data_raw(); } public static void Reg_xwiki_alias(Xowe_wiki wiki, String alias, String domain) { byte[] domain_bry = Bry_.new_a7(domain); diff --git a/400_xowa/src_120_wiki/gplx/xowa/Xow_wiki.java b/400_xowa/src/gplx/xowa/Xow_wiki.java similarity index 91% rename from 400_xowa/src_120_wiki/gplx/xowa/Xow_wiki.java rename to 400_xowa/src/gplx/xowa/Xow_wiki.java index 80f550bd5..5fe48e3a9 100644 --- a/400_xowa/src_120_wiki/gplx/xowa/Xow_wiki.java +++ b/400_xowa/src/gplx/xowa/Xow_wiki.java @@ -16,8 +16,9 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa; import gplx.*; -import gplx.core.primitives.*; -import gplx.xowa.wikis.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.ttls.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.xwikis.*; +import gplx.core.primitives.*; +import gplx.xowa.langs.*; +import gplx.xowa.wikis.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.metas.*; import gplx.xowa.wikis.ttls.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.xwikis.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.origs.*; import gplx.xowa.files.bins.*; import gplx.fsdb.meta.*; import gplx.fsdb.*; import gplx.xowa.html.*; import gplx.xowa.html.wtrs.*; import gplx.xowa.html.hzips.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.html.bridges.dbuis.tbls.*; import gplx.xowa.parsers.*; diff --git a/400_xowa/src_120_wiki/gplx/xowa/Xow_wiki_.java b/400_xowa/src/gplx/xowa/Xow_wiki_.java similarity index 100% rename from 400_xowa/src_120_wiki/gplx/xowa/Xow_wiki_.java rename to 400_xowa/src/gplx/xowa/Xow_wiki_.java diff --git a/400_xowa/xtn/gplx/xowa/Xowa_main.java b/400_xowa/src/gplx/xowa/Xowa_main.java similarity index 91% rename from 400_xowa/xtn/gplx/xowa/Xowa_main.java rename to 400_xowa/src/gplx/xowa/Xowa_main.java index 840b3177d..45fdc752c 100644 --- a/400_xowa/xtn/gplx/xowa/Xowa_main.java +++ b/400_xowa/src/gplx/xowa/Xowa_main.java @@ -15,9 +15,9 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; +package gplx.xowa; import gplx.*; public class Xowa_main { public static void main(String[] args) { - gplx.xowa.Xoa_app_.Run(args); + gplx.xowa.Xoa_app_.Run(args); } } diff --git a/400_xowa/src_120_wiki/gplx/xowa/Xowe_wiki.java b/400_xowa/src/gplx/xowa/Xowe_wiki.java similarity index 71% rename from 400_xowa/src_120_wiki/gplx/xowa/Xowe_wiki.java rename to 400_xowa/src/gplx/xowa/Xowe_wiki.java index e189e6bc8..78ca5c9b7 100644 --- a/400_xowa/src_120_wiki/gplx/xowa/Xowe_wiki.java +++ b/400_xowa/src/gplx/xowa/Xowe_wiki.java @@ -16,41 +16,37 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa; import gplx.*; -import gplx.core.primitives.*; import gplx.xowa.apps.*; import gplx.xowa.apps.fsys.*; import gplx.xowa.files.exts.*; +import gplx.core.primitives.*; +import gplx.xowa.apps.*; import gplx.xowa.apps.fsys.*; import gplx.xowa.cfgs.*; import gplx.xowa.cfgs.gui.*; import gplx.xowa.urls.*; +import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; +import gplx.xowa.wikis.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.xwikis.*; import gplx.xowa.nss.*; import gplx.xowa.wikis.metas.*; import gplx.xowa.wikis.ttls.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.wikis.caches.*; import gplx.xowa.users.*; import gplx.xowa.html.*; import gplx.xowa.users.history.*; import gplx.xowa.specials.*; import gplx.xowa.xtns.*; import gplx.xowa.dbs.*; -import gplx.fsdb.*; -import gplx.xowa.wikis.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.ttls.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; -import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.origs.*; import gplx.xowa.files.bins.*; import gplx.fsdb.meta.*; -import gplx.xowa.langs.vnts.*; import gplx.xowa.gui.views.*; import gplx.xowa.wikis.xwikis.*; -import gplx.xowa.html.wtrs.*; import gplx.xowa.html.hzips.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.html.css.*; import gplx.xowa.html.ns_files.*; import gplx.xowa.html.bridges.dbuis.tbls.*; -import gplx.xowa.setup.maints.*; import gplx.xowa.wikis.caches.*; -import gplx.xowa.bldrs.xmls.*; import gplx.xowa.bldrs.installs.*; import gplx.xowa.xtns.pfuncs.*; +import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.origs.*; import gplx.xowa.files.bins.*; import gplx.fsdb.*; import gplx.fsdb.meta.*; import gplx.xowa.files.exts.*; +import gplx.xowa.html.heads.*; import gplx.xowa.html.wtrs.*; import gplx.xowa.html.hzips.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.html.css.*; import gplx.xowa.html.ns_files.*; import gplx.xowa.html.bridges.dbuis.tbls.*; +import gplx.xowa.bldrs.xmls.*; import gplx.xowa.bldrs.installs.*; import gplx.xowa.setup.maints.*; import gplx.xowa.parsers.*; import gplx.xowa.parsers.utils.*; -import gplx.xowa.urls.*; -import gplx.xowa.xtns.gallery.*; +import gplx.xowa.gui.views.*; +import gplx.xowa.xtns.gallery.*; import gplx.xowa.xtns.pfuncs.*; import gplx.xowa.tdbs.*; import gplx.xowa.tdbs.hives.*; public class Xowe_wiki implements Xow_wiki, GfoInvkAble, GfoEvObj { + private boolean init_in_process = false; public Xowe_wiki(Xoae_app app, Xol_lang lang, Xow_ns_mgr ns_mgr, Xow_domain_itm domain_itm, Io_url wiki_dir) { this.ev_mgr = GfoEvMgr.new_(this); this.app = app; this.lang = lang; this.ns_mgr = ns_mgr; this.domain_itm = domain_itm; this.domain_str = domain_itm.Domain_str(); this.domain_bry = domain_itm.Domain_bry(); this.domain_tid = domain_itm.Domain_type_id(); this.domain_abrv = Xow_abrv_wm_.To_abrv(domain_itm); - fsys_mgr = new Xow_fsys_mgr(wiki_dir, app.Fsys_mgr().File_dir().GenSubDir(domain_str)); + this.fsys_mgr = new Xow_fsys_mgr(wiki_dir, app.Fsys_mgr().File_dir().GenSubDir(domain_str)); this.url__parser = new Xoa_url_parser(this); - xwiki_mgr = new Xow_xwiki_mgr(this, url__parser.Url_parser()); - xwiki_mgr.Add_full(domain_bry, domain_bry); // add full name to xwiki_mgr; needed for lookup in home ns; EX: [[en.wikipedia.org:Earth]] + this.xwiki_mgr = new Xow_xwiki_mgr(this, url__parser.Url_parser()); this.html_mgr = new Xow_html_mgr(this); this.html_mgr__hdump_rdr = new Xohd_hdump_rdr(app, this); this.html_mgr__hdump_wtr = new Xohd_hdump_wtr(app, this); tdb_fsys_mgr = new Xotdb_fsys_mgr(wiki_dir, ns_mgr); - xwiki_domain_tid = Xwiki_tid(domain_tid); redirect_mgr = new Xop_redirect_mgr(this); data_mgr = new Xow_data_mgr(this); file_mgr = new Xow_file_mgr(this); - utl_mgr = new Xow_utl_mgr(this); - parser = Xop_parser.new_wiki_(this); + parser_mgr = new Xow_parser_mgr(this); cfg_parser = new Xowc_parser(this); - ctx = Xop_ctx.new_(this); props.SiteName_(domain_tid).ServerName_(domain_bry); props.ContentLanguage_(lang.Key_bry()); Pf_func_.Reg(lang.Func_regy(), lang); @@ -77,6 +73,7 @@ public class Xowe_wiki implements Xow_wiki, GfoInvkAble, GfoEvObj { db_mgr = new gplx.xowa.dbs.Xodb_mgr_txt(this, data_mgr); maint_mgr = new Xow_maint_mgr(this); cache_mgr = new Xow_cache_mgr(this); + /*if (Bry_.Eq(domain_bry, Xow_domain_itm_.Bry__home))*/ xwiki_mgr.Add_full(domain_bry, domain_bry); // add full name to xwiki_mgr; needed for lookup in home ns; EX: [[home:Help/Contents]] } public GfoEvMgr EvMgr() {return ev_mgr;} private final GfoEvMgr ev_mgr; public Xow_ns_mgr Ns_mgr() {return ns_mgr;} private final Xow_ns_mgr ns_mgr; @@ -107,12 +104,11 @@ public class Xowe_wiki implements Xow_wiki, GfoInvkAble, GfoEvObj { public Xow_mw_parser_mgr Mw_parser_mgr() {return mw_parser_mgr;} private final Xow_mw_parser_mgr mw_parser_mgr = new Xow_mw_parser_mgr(); public Xow_xwiki_mgr Xwiki_mgr() {return xwiki_mgr;} private final Xow_xwiki_mgr xwiki_mgr; public Xow_wiki_props Props() {return props;} private final Xow_wiki_props props = new Xow_wiki_props(); + public Xow_parser_mgr Parser_mgr() {return parser_mgr;} private final Xow_parser_mgr parser_mgr; public Xohd_hdump_wtr Html__hdump_wtr() {return html_mgr__hdump_wtr;} private final Xohd_hdump_wtr html_mgr__hdump_wtr; - public int Xwiki_domain_tid() {return xwiki_domain_tid;} private int xwiki_domain_tid; public Xoae_app Appe() {return app;} private Xoae_app app; - public Xow_utl_mgr Utl_mgr() {return utl_mgr;} private Xow_utl_mgr utl_mgr; - public Xow_gui_mgr Gui_mgr() {return gui_mgr;} private Xow_gui_mgr gui_mgr = new Xow_gui_mgr(); + public Xow_gui_mgr Gui_mgr() {return gui_mgr;} private final Xow_gui_mgr gui_mgr = new Xow_gui_mgr(); public Xow_user User() {return user;} private Xow_user user = new Xow_user(); public Xow_data_mgr Data_mgr() {return data_mgr;} private Xow_data_mgr data_mgr; public Xodb_mgr Db_mgr() {return db_mgr;} private Xodb_mgr db_mgr; @@ -121,7 +117,6 @@ public class Xowe_wiki implements Xow_wiki, GfoInvkAble, GfoEvObj { public Xow_html_mgr Html_mgr() {return html_mgr;} private Xow_html_mgr html_mgr; public Xow_xtn_mgr Xtn_mgr() {return xtn_mgr;} private Xow_xtn_mgr xtn_mgr; public Xow_cache_mgr Cache_mgr() {return cache_mgr;} private Xow_cache_mgr cache_mgr; - public Xow_page_mgr Page_mgr() {return page_mgr;} private Xow_page_mgr page_mgr = new Xow_page_mgr(); public byte[] Commons_wiki_key() {return commons_wiki_key;} private byte[] commons_wiki_key = Xow_domain_itm_.Bry__commons; public Xob_hive_mgr Hive_mgr() {return hive_mgr;} private Xob_hive_mgr hive_mgr; @@ -139,82 +134,28 @@ public class Xowe_wiki implements Xow_wiki, GfoInvkAble, GfoEvObj { } private Xow_html_util util; public boolean Init_needed() {return init_needed;} public Xowe_wiki Init_needed_(boolean v) {init_needed = v; return this;} private boolean init_needed = true; - - public Xop_parser Parser() {return parser;} private Xop_parser parser; public Xop_redirect_mgr Redirect_mgr() {return redirect_mgr;} private Xop_redirect_mgr redirect_mgr; - public Xop_ctx Ctx() {return ctx;} private Xop_ctx ctx; public List_adp Rls_list() {if (rls_list == null) rls_list = List_adp_.new_(); return rls_list;} private List_adp rls_list; - - public Xow_file_mgr File_mgr() {return file_mgr;} private Xow_file_mgr file_mgr; - public Xow_cfg_wiki_core Cfg_wiki_core() {return cfg_wiki_core;} private Xow_cfg_wiki_core cfg_wiki_core; + public Xow_file_mgr File_mgr() {return file_mgr;} private Xow_file_mgr file_mgr; + public Xow_cfg_wiki_core Cfg_wiki_core() {return cfg_wiki_core;} private Xow_cfg_wiki_core cfg_wiki_core; public Xob_import_cfg Import_cfg() {return import_cfg;} private Xob_import_cfg import_cfg; - public Xotdb_fsys_mgr Tdb_fsys_mgr() {return tdb_fsys_mgr;} private final Xotdb_fsys_mgr tdb_fsys_mgr; - - public Xow_wiki_stats Stats() {return stats;} private Xow_wiki_stats stats; - public Xou_history_cfg Cfg_history() {return cfg_history;} private Xou_history_cfg cfg_history = new Xou_history_cfg(); - public Xoh_cfg_gallery Cfg_gallery() {return cfg_gallery;} private Xoh_cfg_gallery cfg_gallery = new Xoh_cfg_gallery(); - public Xoh_file_page_wtr Cfg_file_page() {return cfg_file_page;} private Xoh_file_page_wtr cfg_file_page = new Xoh_file_page_wtr(); - public Xow_sys_cfg Sys_cfg() {return sys_cfg;} private Xow_sys_cfg sys_cfg; - public Xowc_parser Cfg_parser() {return cfg_parser;} private Xowc_parser cfg_parser; - public boolean Cfg_parser_lnki_xwiki_repos_enabled() {return cfg_parser_lnki_xwiki_repos_enabled;} public Xowe_wiki Cfg_parser_lnki_xwiki_repos_enabled_(boolean v) {cfg_parser_lnki_xwiki_repos_enabled = v; return this;} private boolean cfg_parser_lnki_xwiki_repos_enabled; - public Xoi_dump_mgr Import_mgr() {return import_mgr;} private Xoi_dump_mgr import_mgr = new Xoi_dump_mgr(); - public Xow_maint_mgr Maint_mgr() {return maint_mgr;} private Xow_maint_mgr maint_mgr; + public Xow_wiki_stats Stats() {return stats;} private Xow_wiki_stats stats; + public Xou_history_cfg Cfg_history() {return cfg_history;} private Xou_history_cfg cfg_history = new Xou_history_cfg(); + public Xoh_cfg_gallery Cfg_gallery() {return cfg_gallery;} private Xoh_cfg_gallery cfg_gallery = new Xoh_cfg_gallery(); + public Xoh_file_page_wtr Cfg_file_page() {return cfg_file_page;} private Xoh_file_page_wtr cfg_file_page = new Xoh_file_page_wtr(); + public Xow_sys_cfg Sys_cfg() {return sys_cfg;} private Xow_sys_cfg sys_cfg; + public Xowc_parser Cfg_parser() {return cfg_parser;} private Xowc_parser cfg_parser; + public boolean Cfg_parser_lnki_xwiki_repos_enabled() {return cfg_parser_lnki_xwiki_repos_enabled;} public Xowe_wiki Cfg_parser_lnki_xwiki_repos_enabled_(boolean v) {cfg_parser_lnki_xwiki_repos_enabled = v; return this;} private boolean cfg_parser_lnki_xwiki_repos_enabled; + public Xoi_dump_mgr Import_mgr() {return import_mgr;} private Xoi_dump_mgr import_mgr = new Xoi_dump_mgr(); + public Xow_maint_mgr Maint_mgr() {return maint_mgr;} private Xow_maint_mgr maint_mgr; public void Clear_for_tests() { // NOTE: these are structures that cache items for PERF; need to be cleared out for multiple test runs file_mgr.Meta_mgr().Clear(); db_mgr.Load_mgr().Clear(); } - public Xoae_page Load_page_by_ttl(Xoa_url url, Xoa_ttl ttl) {return Load_page_by_ttl(url, ttl, lang, app.Gui_mgr().Browser_win().Active_tab(), true);} - public Xoae_page Load_page_by_ttl(Xoa_url url, Xoa_ttl ttl, Xog_tab_itm tab) {return Load_page_by_ttl(url, ttl, lang, tab, true);} - public Xoae_page Load_page_by_ttl(Xoa_url url, Xoa_ttl ttl, Xol_lang lang, Xog_tab_itm tab, boolean parse_page) { - if (init_needed) Init_wiki(app.Usere()); - Xoae_page page = Xoae_page.new_(this, ttl); page.Tab_data().Tab_(tab); - data_mgr.Get_page(page, url, ttl, false, false); // get page from data_mgr - if (page.Missing()) { // page doesn't exist - if (ttl.Ns().Id_file()) { - Xowe_wiki commons_wiki = app.Wiki_mgr().Get_by_key_or_null(commons_wiki_key); - if (commons_wiki != null) { // commons exists - if (!Bry_.Eq(domain_bry, commons_wiki.Domain_bry())) { // !Bry_.Eq is recursion guard - Xoae_page rv = commons_wiki.Load_page_by_ttl(url, ttl, this.lang, tab, true); - if (rv.Exists()) { - rv.Commons_mgr().Source_wiki_(this); - return rv; - } - else { - page.Missing_(false); - page.Commons_mgr().Xowa_mockup_(true); - return page; - } - } - } - } - else - return page.Missing_(); - } - if (page.Missing()) return page; // NOTE: commons can return null page - page.Tab_data().Tab_(tab); - page.Lang_(lang); - if (parse_page) - ParsePage(page, false); // NOTE: do not clear page b/c reused for search - return page; - } - public void ParsePage_root(Xoae_page page, boolean clear) {ParsePage(page, clear);} - public void ParsePage(Xoae_page page, boolean clear) { - if (init_needed && !Env_.Mode_testing()) Init_wiki(app.Usere()); - gplx.xowa.xtns.scribunto.Scrib_core.Core_page_changed(page); // notify scribunto about page changed - ctx.Cur_page_(page); - Xop_root_tkn root = ctx.Tkn_mkr().Root(page.Data_raw()); - if (clear) {page.Clear();} - Xoa_ttl ttl = page.Ttl(); - if (Xow_page_tid.Identify(domain_tid, ttl.Ns().Id(), ttl.Page_db()) == Xow_page_tid.Tid_wikitext) // only parse page if wikitext; skip .js, .css, Module; DATE:2013-11-10 - parser.Parse_text_to_wdom(root, ctx, app.Tkn_mkr(), page.Data_raw(), Xop_parser_.Doc_bgn_bos); - page.Root_(root); - root.Data_htm_(root.Root_src()); - } - public Xodb_mgr_sql Db_mgr_create_as_sql() {Xodb_mgr_sql rv = new Xodb_mgr_sql(this); db_mgr = rv; return rv;} + public Xodb_mgr_sql Db_mgr_create_as_sql() {Xodb_mgr_sql rv = new Xodb_mgr_sql(this); db_mgr = rv; return rv;} public void Init_by_wiki() {Init_assert();} public Xowe_wiki Init_assert() {if (init_needed) Init_wiki(app.Usere()); return this;} - private boolean init_in_process = false; public void Init_db_mgr() { Io_url core_db_url = gplx.xowa.wikis.Xow_fsys_mgr.Find_core_fil(this); if (core_db_url == null) { @@ -252,7 +193,7 @@ public class Xowe_wiki implements Xow_wiki, GfoInvkAble, GfoEvObj { Xow_ns_mgr_.rebuild_(lang, ns_mgr); // always rebuild; may be changed by user_wiki.gfs; different lang will change namespaces; EX: de.wikisource.org will have Seite for File and none of {{#lst}} will work // push lang changes fragment_mgr.Evt_lang_changed(lang); - parser.Init_by_lang(lang); + parser_mgr.Main().Init_by_lang(lang); html_mgr.Init_by_lang(lang); lang.Vnt_mgr().Init_by_wiki(this); // other init @@ -328,19 +269,6 @@ public class Xowe_wiki implements Xow_wiki, GfoInvkAble, GfoEvObj { , Invk_db_mgr_to_sql_ = "db_mgr_to_sql_" , Invk_domain = "domain", Invk_maint = "maint", Invk_hdump_enabled_ = "hdump_enabled_" ; - public static final String // SERIALIZED - Invk_db_mgr = "db_mgr" // SERIALIZED:000.sqlite3|xowa_cfg - ; + public static final String Invk_db_mgr = "db_mgr"; // SERIALIZED:000.sqlite3|xowa_cfg public static final String Invk_lang_ = "lang_"; - private static int Xwiki_tid(int tid) { - switch (tid) { - case Xow_domain_type_.Int__commons: - case Xow_domain_type_.Int__species: - case Xow_domain_type_.Int__incubator: - case Xow_domain_type_.Int__mediawiki: - case Xow_domain_type_.Int__wmfblog: - case Xow_domain_type_.Int__home: return Xow_domain_type_.Int__wikipedia; // set xwiki_tid to wikipedia; allows [[da:Page]] to point to da.wikipedia.org; PAGE:species:Puccinia; DATE:2014-09-14 - default: return tid; - } - } } diff --git a/400_xowa/src_120_wiki/gplx/xowa/Xowe_wiki_bldr.java b/400_xowa/src/gplx/xowa/Xowe_wiki_.java similarity index 97% rename from 400_xowa/src_120_wiki/gplx/xowa/Xowe_wiki_bldr.java rename to 400_xowa/src/gplx/xowa/Xowe_wiki_.java index 9b4fc700a..566412a4f 100644 --- a/400_xowa/src_120_wiki/gplx/xowa/Xowe_wiki_bldr.java +++ b/400_xowa/src/gplx/xowa/Xowe_wiki_.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa; import gplx.*; import gplx.xowa.apis.xowa.bldrs.imports.*; import gplx.xowa.wikis.data.*; import gplx.xowa.bldrs.infos.*; -public class Xowe_wiki_bldr { +public class Xowe_wiki_ { public static void Create(Xowe_wiki wiki, long src_fil_len, String src_fil_name) { wiki.Db_mgr_create_as_sql(); // create db_mgr as sql Xoapi_import import_api = wiki.Appe().Api_root().Bldr().Wiki().Import(); diff --git a/400_xowa/src/gplx/xowa/apps/Xoa_app_eval_tst.java b/400_xowa/src/gplx/xowa/apps/Xoa_app_eval_tst.java index 5e8a38f53..17f58bf8a 100644 --- a/400_xowa/src/gplx/xowa/apps/Xoa_app_eval_tst.java +++ b/400_xowa/src/gplx/xowa/apps/Xoa_app_eval_tst.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.apps; import gplx.*; import gplx.xowa.*; import org.junit.*; -import gplx.xowa.apps.*; +import gplx.xowa.apps.gfss.*; public class Xoa_app_eval_tst { Xoa_app_eval_fxt fxt = new Xoa_app_eval_fxt(); @Before public void init() {fxt.Clear();} diff --git a/400_xowa/src/gplx/xowa/apps/Xoa_shell_tst.java b/400_xowa/src/gplx/xowa/apps/Xoa_shell_tst.java index c4ba1806c..67aced6e0 100644 --- a/400_xowa/src/gplx/xowa/apps/Xoa_shell_tst.java +++ b/400_xowa/src/gplx/xowa/apps/Xoa_shell_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.apps; import gplx.*; import gplx.xowa.*; -import org.junit.*; +import org.junit.*; import gplx.xowa.apps.gfss.*; public class Xoa_shell_tst { @Test public void Fetch_page() { // PURPOSE.fix: fetch_page failed with nullRef; DATE:2013-04-12 Xop_fxt parser_fxt = new Xop_fxt(); diff --git a/400_xowa/src/gplx/xowa2/apps/Xoav_app.java b/400_xowa/src/gplx/xowa/apps/Xoav_app.java similarity index 89% rename from 400_xowa/src/gplx/xowa2/apps/Xoav_app.java rename to 400_xowa/src/gplx/xowa/apps/Xoav_app.java index 819ea91bd..163ebe77c 100644 --- a/400_xowa/src/gplx/xowa2/apps/Xoav_app.java +++ b/400_xowa/src/gplx/xowa/apps/Xoav_app.java @@ -15,18 +15,17 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa2.apps; import gplx.*; import gplx.xowa2.*; -import gplx.core.net.*; import gplx.core.json.*; +package gplx.xowa.apps; import gplx.*; import gplx.xowa.*; +import gplx.core.net.*; import gplx.langs.jsons.*; import gplx.ios.*; -import gplx.dbs.*; import gplx.xowa.apis.*; import gplx.xowa.apps.fsys.*; import gplx.xowa.apps.metas.*; import gplx.xowa.parsers.amps.*; import gplx.xowa.langs.cases.*; import gplx.intl.*; import gplx.xowa.users.data.*; -import gplx.xowa.*; import gplx.xowa.apps.*; -import gplx.xowa2.apps.urls.*; import gplx.xowa.files.caches.*; import gplx.xowa.files.imgs.*; +import gplx.dbs.*; import gplx.xowa.apis.*; import gplx.xowa.apps.fsys.*; import gplx.xowa.apps.metas.*; import gplx.xowa.parsers.amps.*; import gplx.xowa.langs.cases.*; import gplx.core.intls.*; import gplx.xowa.users.data.*; +import gplx.xowa.apps.urls.*; import gplx.xowa.files.caches.*; import gplx.xowa.files.imgs.*; import gplx.xowa.bldrs.css.*; import gplx.xowa.html.hrefs.*; import gplx.xowa.html.wtrs.*; import gplx.xowa.html.bridges.*; import gplx.xowa.users.*; import gplx.xowa.wikis.*; -import gplx.xowa.wmfs.*; -import gplx.xowa.urls.encoders.*; +import gplx.xowa.wms.*; +import gplx.langs.htmls.encoders.*; public class Xoav_app implements Xoa_app { public Xoav_app(Gfo_usr_dlg usr_dlg, Xoa_app_type app_type, String plat_name, Io_url root_dir, Io_url file_dir, Io_url css_dir) { Xoa_app_.Usr_dlg_(usr_dlg); this.usr_dlg = usr_dlg; this.app_type = app_type; @@ -56,6 +55,7 @@ public class Xoav_app implements Xoa_app { public Xoa_css_extractor Html__css_installer() {return html__css_installer;} private final Xoa_css_extractor html__css_installer = new Xoa_css_extractor(); public Xoh_bridge_mgr Html__bridge_mgr() {return html__bridge_mgr;} private final Xoh_bridge_mgr html__bridge_mgr; public Xoa_meta_mgr Meta_mgr() {return meta_mgr;} private final Xoa_meta_mgr meta_mgr; + public Gfo_inet_conn Utl__inet_conn() {return inet_conn;} public void Utl__inet_conn_(Gfo_inet_conn v) {this.inet_conn = v;} private Gfo_inet_conn inet_conn; public boolean Xwiki_mgr__missing(byte[] domain) {return wiki_mgr.Get_by_domain(domain) == null;} public Xowmf_mgr Wmf_mgr() {return wmf_mgr;} private final Xowmf_mgr wmf_mgr = new Xowmf_mgr(); diff --git a/400_xowa/src/gplx/xowa2/apps/Xoav_wiki_mgr.java b/400_xowa/src/gplx/xowa/apps/Xoav_wiki_mgr.java similarity index 92% rename from 400_xowa/src/gplx/xowa2/apps/Xoav_wiki_mgr.java rename to 400_xowa/src/gplx/xowa/apps/Xoav_wiki_mgr.java index 1d7e05a80..2ebedc8c0 100644 --- a/400_xowa/src/gplx/xowa2/apps/Xoav_wiki_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/Xoav_wiki_mgr.java @@ -15,9 +15,9 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa2.apps; import gplx.*; import gplx.xowa2.*; +package gplx.xowa.apps; import gplx.*; import gplx.xowa.*; import gplx.xowa.*; import gplx.xowa.langs.cases.*; import gplx.xowa.users.data.*; -import gplx.xowa.wikis.*; import gplx.xowa2.wikis.*; +import gplx.xowa.wikis.*; public class Xoav_wiki_mgr implements Xoa_wiki_mgr, GfoInvkAble { private final Xoav_app app; private final Ordered_hash hash = Ordered_hash_.new_bry_(); public Xoav_wiki_mgr(Xoav_app app, Xol_case_mgr case_mgr) {this.app = app;} @@ -67,7 +67,7 @@ public class Xoav_wiki_mgr implements Xoa_wiki_mgr, GfoInvkAble { public static final String Invk_import_by_fil = "import_by_fil"; private static String Gen_domain_str(String file_name) { int dash_pos = String_.FindFwd(file_name, "-"); - if (dash_pos != Bry_finder.Not_found) file_name = String_.Mid(file_name, 0, dash_pos); + if (dash_pos != Bry_find_.Not_found) file_name = String_.Mid(file_name, 0, dash_pos); return file_name; } } diff --git a/400_xowa/src/gplx/xowa/fmtrs/Gfo_sort_able.java b/400_xowa/src/gplx/xowa/apps/fmtrs/Gfo_sort_able.java similarity index 89% rename from 400_xowa/src/gplx/xowa/fmtrs/Gfo_sort_able.java rename to 400_xowa/src/gplx/xowa/apps/fmtrs/Gfo_sort_able.java index e3dc51214..7c28c8a29 100644 --- a/400_xowa/src/gplx/xowa/fmtrs/Gfo_sort_able.java +++ b/400_xowa/src/gplx/xowa/apps/fmtrs/Gfo_sort_able.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa.fmtrs; import gplx.*; import gplx.xowa.*; +package gplx.xowa.apps.fmtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; public interface Gfo_sort_able { void Sort(gplx.lists.ComparerAble comparer); } diff --git a/400_xowa/src/gplx/xowa/fmtrs/Xoa_fmtr_itm.java b/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_itm.java similarity index 95% rename from 400_xowa/src/gplx/xowa/fmtrs/Xoa_fmtr_itm.java rename to 400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_itm.java index ad9957942..7d9e3ee5d 100644 --- a/400_xowa/src/gplx/xowa/fmtrs/Xoa_fmtr_itm.java +++ b/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_itm.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa.fmtrs; import gplx.*; import gplx.xowa.*; +package gplx.xowa.apps.fmtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; public class Xoa_fmtr_itm implements GfoInvkAble { public Xoa_fmtr_itm(Xoae_app app) {this.app = app;} private Xoae_app app; public String Src() {return src;} public Xoa_fmtr_itm Src_(String v) {this.src = v; return this;} private String src; diff --git a/400_xowa/src/gplx/xowa/fmtrs/Xoa_fmtr_itm_tst.java b/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_itm_tst.java similarity index 89% rename from 400_xowa/src/gplx/xowa/fmtrs/Xoa_fmtr_itm_tst.java rename to 400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_itm_tst.java index a0527e739..efc6c0f12 100644 --- a/400_xowa/src/gplx/xowa/fmtrs/Xoa_fmtr_itm_tst.java +++ b/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_itm_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa.fmtrs; import gplx.*; import gplx.xowa.*; +package gplx.xowa.apps.fmtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import org.junit.*; public class Xoa_fmtr_itm_tst { @Before public void init() {fxt.Clear();} private Xoa_fmtr_itm_fxt fxt = new Xoa_fmtr_itm_fxt(); @@ -31,7 +31,7 @@ class Xoa_fmtr_itm_fxt { app = Xoa_app_fxt.app_(); Xoa_app_fxt.wiki_tst_(app); // create enwiki itm = new Xoa_fmtr_itm(app); - GfsCore._.MsgParser_(gplx.gfs.Gfs_msg_bldr._); + GfsCore._.MsgParser_(gplx.langs.gfss.Gfs_msg_bldr._); } public Xoa_fmtr_itm_fxt Init_src(String v) {itm.Src_(v); return this;} public Xoa_fmtr_itm_fxt Init_fmt(String v) {itm.Fmt_(Bry_.new_a7(v)); return this;} diff --git a/400_xowa/src/gplx/xowa/fmtrs/Xoa_fmtr_mgr.java b/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_mgr.java similarity index 91% rename from 400_xowa/src/gplx/xowa/fmtrs/Xoa_fmtr_mgr.java rename to 400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_mgr.java index 4e2055344..c6edf8dd0 100644 --- a/400_xowa/src/gplx/xowa/fmtrs/Xoa_fmtr_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_mgr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa.fmtrs; import gplx.*; import gplx.xowa.*; +package gplx.xowa.apps.fmtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.ios.*; public class Xoa_fmtr_mgr implements GfoInvkAble { public Xoa_fmtr_mgr(Xoae_app app) {this.app = app;} private Xoae_app app; diff --git a/400_xowa/src/gplx/xowa/fmtrs/Xoa_fmtr_sort_mgr.java b/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_sort_mgr.java similarity index 95% rename from 400_xowa/src/gplx/xowa/fmtrs/Xoa_fmtr_sort_mgr.java rename to 400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_sort_mgr.java index 430d118ab..b61066931 100644 --- a/400_xowa/src/gplx/xowa/fmtrs/Xoa_fmtr_sort_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_sort_mgr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa.fmtrs; import gplx.*; import gplx.xowa.*; +package gplx.xowa.apps.fmtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; public class Xoa_fmtr_sort_mgr implements GfoInvkAble { private Ordered_hash itms = Ordered_hash_.new_(); private Xoa_fmtr_sort_wkr wkr = new Xoa_fmtr_sort_wkr(); diff --git a/400_xowa/src/gplx/xowa/apps/fsys/Xoa_fsys_mgr.java b/400_xowa/src/gplx/xowa/apps/fsys/Xoa_fsys_mgr.java index 408f15a87..c5c953088 100644 --- a/400_xowa/src/gplx/xowa/apps/fsys/Xoa_fsys_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/fsys/Xoa_fsys_mgr.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.apps.fsys; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; +import gplx.xowa.apps.gfss.*; import gplx.xowa.wikis.domains.*; public class Xoa_fsys_mgr implements GfoInvkAble { public Xoa_fsys_mgr(String plat_name, Io_url root_dir, Io_url wiki_dir, Io_url file_dir, Io_url css_dir) { diff --git a/400_xowa/src_210_bldr_core/gplx/xowa/Gfs_bldr.java b/400_xowa/src/gplx/xowa/apps/gfss/Gfs_bldr.java similarity index 96% rename from 400_xowa/src_210_bldr_core/gplx/xowa/Gfs_bldr.java rename to 400_xowa/src/gplx/xowa/apps/gfss/Gfs_bldr.java index 49dd1535f..333041448 100644 --- a/400_xowa/src_210_bldr_core/gplx/xowa/Gfs_bldr.java +++ b/400_xowa/src/gplx/xowa/apps/gfss/Gfs_bldr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.apps.gfss; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; public class Gfs_bldr { public Bry_bfr Bfr() {return bfr;} private Bry_bfr bfr = Bry_bfr.new_(); public byte[] Xto_bry() {return bfr.Xto_bry_and_clear();} diff --git a/400_xowa/src/gplx/xowa/apps/Xoa_gfs_mgr.java b/400_xowa/src/gplx/xowa/apps/gfss/Xoa_gfs_mgr.java similarity index 93% rename from 400_xowa/src/gplx/xowa/apps/Xoa_gfs_mgr.java rename to 400_xowa/src/gplx/xowa/apps/gfss/Xoa_gfs_mgr.java index 3773312f4..9db691bda 100644 --- a/400_xowa/src/gplx/xowa/apps/Xoa_gfs_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/gfss/Xoa_gfs_mgr.java @@ -15,8 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa.apps; import gplx.*; import gplx.xowa.*; -import gplx.gfs.*; +package gplx.xowa.apps.gfss; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; +import gplx.langs.gfss.*; import gplx.xowa.users.*; import gplx.xowa.apps.fsys.*; public class Xoa_gfs_mgr implements GfoInvkAble, GfoInvkRootWkr { private final GfoInvkAble root_invk; private final Xoa_fsys_mgr app_fsys_mgr; private final Xou_fsys_mgr usr_fsys_mgr; @@ -44,7 +44,7 @@ public class Xoa_gfs_mgr implements GfoInvkAble, GfoInvkRootWkr { Gfo_usr_dlg_.I.Warn_many("", "", "invalid gfs; obsoleting: src=~{0} err=~{1}", url.Raw(), Err_.Message_gplx_full(e)); } } - public GfoMsg Parse_root_msg(String v) {return gplx.gfs.Gfs_msg_bldr._.ParseToMsg(v);} + public GfoMsg Parse_root_msg(String v) {return gplx.langs.gfss.Gfs_msg_bldr._.ParseToMsg(v);} public Gfs_wtr Wtr() {return wtr;} private Gfs_wtr wtr = new Gfs_wtr(); public void Run_url(Io_url url) { Run_url_for(GfsCore._.Root(), url); @@ -97,11 +97,11 @@ public class Xoa_gfs_mgr implements GfoInvkAble, GfoInvkRootWkr { return this; } private static final String Invk_run_file_by_type = "run_file_by_type", Invk_fail_if_unhandled_ = "fail_if_unhandled_", Invk_txns = "txns"; public static void Msg_parser_init() { - GfsCore._.MsgParser_(gplx.gfs.Gfs_msg_bldr._); + GfsCore._.MsgParser_(gplx.langs.gfss.Gfs_msg_bldr._); } public static byte[] Cfg_save_escape(String v) {return Cfg_save_escape(Bry_.new_u8(v));} public static byte[] Cfg_save_escape(byte[] v) { - return Bry_finder.Find_fwd(v, Byte_ascii.Apos) == Bry_.NotFound ? v : Bry_.Replace(v, Bry_apos_1, Bry_apos_2); + return Bry_find_.Find_fwd(v, Byte_ascii.Apos) == Bry_.NotFound ? v : Bry_.Replace(v, Bry_apos_1, Bry_apos_2); } static final byte[] Bry_apos_1 = Bry_.new_a7("'"), Bry_apos_2 = Bry_.new_a7("''"); public static String Build_code(String... ary) { int len = ary.length; diff --git a/400_xowa/src/gplx/xowa/apps/Xoa_gfs_php_mgr.java b/400_xowa/src/gplx/xowa/apps/gfss/Xoa_gfs_php_mgr.java similarity index 90% rename from 400_xowa/src/gplx/xowa/apps/Xoa_gfs_php_mgr.java rename to 400_xowa/src/gplx/xowa/apps/gfss/Xoa_gfs_php_mgr.java index efaec49ee..c9bc6c54d 100644 --- a/400_xowa/src/gplx/xowa/apps/Xoa_gfs_php_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/gfss/Xoa_gfs_php_mgr.java @@ -15,8 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa.apps; import gplx.*; import gplx.xowa.*; -import gplx.php.*; +package gplx.xowa.apps.gfss; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; +import gplx.langs.phps.*; public class Xoa_gfs_php_mgr { public static byte[] Xto_php(Bry_bfr bfr, boolean escape_backslash, byte[] src) { int len = src.length; @@ -67,8 +67,8 @@ public class Xoa_gfs_php_mgr { } case Byte_ascii.Curly_bgn: { int num_bgn = pos + 1; - int num_end = Bry_finder.Find_fwd_while_num(src, num_bgn, len); // +1 to position after { - if ( num_end == Bry_finder.Not_found + int num_end = Bry_find_.Find_fwd_while_num(src, num_bgn, len); // +1 to position after { + if ( num_end == Bry_find_.Not_found || num_end == len || src[num_end] != Byte_ascii.Curly_end ) diff --git a/400_xowa/src/gplx/xowa/apps/Xoa_gfs_php_mgr_tst.java b/400_xowa/src/gplx/xowa/apps/gfss/Xoa_gfs_php_mgr_tst.java similarity index 95% rename from 400_xowa/src/gplx/xowa/apps/Xoa_gfs_php_mgr_tst.java rename to 400_xowa/src/gplx/xowa/apps/gfss/Xoa_gfs_php_mgr_tst.java index 4dde14294..150032fe2 100644 --- a/400_xowa/src/gplx/xowa/apps/Xoa_gfs_php_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/apps/gfss/Xoa_gfs_php_mgr_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa.apps; import gplx.*; import gplx.xowa.*; +package gplx.xowa.apps.gfss; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import org.junit.*; public class Xoa_gfs_php_mgr_tst { @Before public void init() {fxt.Clear();} private Xoa_gfs_php_mgr_fxt fxt = new Xoa_gfs_php_mgr_fxt(); diff --git a/400_xowa/src/gplx/xowa/apps/metas/Xoa_meta_mgr.java b/400_xowa/src/gplx/xowa/apps/metas/Xoa_meta_mgr.java index b6edc6e41..c99e4478a 100644 --- a/400_xowa/src/gplx/xowa/apps/metas/Xoa_meta_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/metas/Xoa_meta_mgr.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.apps.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; -import gplx.xowa.wmfs.data.*; +import gplx.xowa.nss.*; +import gplx.xowa.wms.sites.*; public class Xoa_meta_mgr { private final Xoa_app app; private final Hash_adp_bry ns__hash = Hash_adp_bry.cs(); diff --git a/400_xowa/src/gplx/xowa2/apps/urls/Xoav_url.java b/400_xowa/src/gplx/xowa/apps/urls/Xoav_url.java similarity index 92% rename from 400_xowa/src/gplx/xowa2/apps/urls/Xoav_url.java rename to 400_xowa/src/gplx/xowa/apps/urls/Xoav_url.java index b04a3b298..036393f33 100644 --- a/400_xowa/src/gplx/xowa2/apps/urls/Xoav_url.java +++ b/400_xowa/src/gplx/xowa/apps/urls/Xoav_url.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa2.apps.urls; import gplx.*; import gplx.xowa2.*; import gplx.xowa2.apps.*; +package gplx.xowa.apps.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; public class Xoav_url { public byte[] Wiki_bry() {return wiki_bry;} public void Wiki_bry_(byte[] v) {wiki_bry = v;} private byte[] wiki_bry; public byte[] Page_bry() {return page_bry;} public void Page_bry_(byte[] v) {page_bry = v;} private byte[] page_bry; diff --git a/400_xowa/src/gplx/xowa2/apps/urls/Xoav_url_parser.java b/400_xowa/src/gplx/xowa/apps/urls/Xoav_url_parser.java similarity index 84% rename from 400_xowa/src/gplx/xowa2/apps/urls/Xoav_url_parser.java rename to 400_xowa/src/gplx/xowa/apps/urls/Xoav_url_parser.java index a8120be07..68d0f4623 100644 --- a/400_xowa/src/gplx/xowa2/apps/urls/Xoav_url_parser.java +++ b/400_xowa/src/gplx/xowa/apps/urls/Xoav_url_parser.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa2.apps.urls; import gplx.*; import gplx.xowa2.*; import gplx.xowa2.apps.*; +package gplx.xowa.apps.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; public class Xoav_url_parser { private static final byte[] Bry_site = Bry_.new_a7("/site/"), Bry_wiki = Bry_.new_a7("/wiki/"), Bry_http = Bry_.new_a7("http:"); public void Parse_xo_href(Xoav_url rv, byte[] src, byte[] cur_wiki_bry) { @@ -30,7 +30,7 @@ public class Xoav_url_parser { } private int Parse_wiki(Xoav_url rv, byte[] src, int src_len, int pos) { int wiki_bgn = pos + Bry_site.length; - int wiki_end = Bry_finder.Find_fwd(src, Byte_ascii.Slash, wiki_bgn, src_len); if (wiki_end == Bry_.NotFound) throw Err_.new_wo_type("could not find wiki_end", "src", String_.new_u8(src)); + int wiki_end = Bry_find_.Find_fwd(src, Byte_ascii.Slash, wiki_bgn, src_len); if (wiki_end == Bry_.NotFound) throw Err_.new_wo_type("could not find wiki_end", "src", String_.new_u8(src)); rv.Wiki_bry_(Bry_.Mid(src, wiki_bgn, wiki_end)); return wiki_end; } diff --git a/400_xowa/src/gplx/xowa2/apps/urls/Xoav_url_parser_tst.java b/400_xowa/src/gplx/xowa/apps/urls/Xoav_url_parser_tst.java similarity index 94% rename from 400_xowa/src/gplx/xowa2/apps/urls/Xoav_url_parser_tst.java rename to 400_xowa/src/gplx/xowa/apps/urls/Xoav_url_parser_tst.java index ca3398c59..b75e0ef7d 100644 --- a/400_xowa/src/gplx/xowa2/apps/urls/Xoav_url_parser_tst.java +++ b/400_xowa/src/gplx/xowa/apps/urls/Xoav_url_parser_tst.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa2.apps.urls; import gplx.*; import gplx.xowa2.*; import gplx.xowa2.apps.*; +package gplx.xowa.apps.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import org.junit.*; public class Xoav_url_parser_tst { @Before public void init() {fxt.Clear();} private final Xoav_url_parser_fxt fxt = new Xoav_url_parser_fxt(); diff --git a/400_xowa/src/gplx/xowa/bldrs/Db_mgr_fxt.java b/400_xowa/src/gplx/xowa/bldrs/Db_mgr_fxt.java index 88784857e..75cd665c0 100644 --- a/400_xowa/src/gplx/xowa/bldrs/Db_mgr_fxt.java +++ b/400_xowa/src/gplx/xowa/bldrs/Db_mgr_fxt.java @@ -18,6 +18,7 @@ along with this program. If not, see . package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.core.primitives.*; import gplx.core.strings.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.xowa.dbs.*; import gplx.xowa.specials.search.*; import gplx.xowa.ctgs.*; +import gplx.xowa.nss.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.bldrs.infos.*; public class Db_mgr_fxt { public Db_mgr_fxt Ctor_fsys() {bldr_fxt = new Xob_fxt().Ctor(Xoa_test_.Url_root().GenSubDir("root")); return this;} diff --git a/400_xowa/src_200_bldr/gplx/xowa/Xob_bldr.java b/400_xowa/src/gplx/xowa/bldrs/Xob_bldr.java similarity index 97% rename from 400_xowa/src_200_bldr/gplx/xowa/Xob_bldr.java rename to 400_xowa/src/gplx/xowa/bldrs/Xob_bldr.java index abe7ea6b6..4debb4c78 100644 --- a/400_xowa/src_200_bldr/gplx/xowa/Xob_bldr.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xob_bldr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.core.consoles.*; import gplx.xowa.apps.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.xmls.*; import gplx.xowa.bldrs.cfgs.*; import gplx.xowa.bldrs.langs.*; public class Xob_bldr implements GfoInvkAble { diff --git a/400_xowa/src/gplx/xowa/bldrs/Xob_fxt.java b/400_xowa/src/gplx/xowa/bldrs/Xob_fxt.java index 05eeb555a..b6317440c 100644 --- a/400_xowa/src/gplx/xowa/bldrs/Xob_fxt.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xob_fxt.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; +import gplx.core.tests.*; import gplx.ios.*; import gplx.dbs.*; import gplx.xowa.tdbs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.bldrs.cmds.texts.tdbs.*; public class Xob_fxt { public Xob_fxt Ctor_mem() { diff --git a/400_xowa/src_200_bldr/gplx/xowa/Xob_page_cmd.java b/400_xowa/src/gplx/xowa/bldrs/Xob_page_cmd.java similarity index 92% rename from 400_xowa/src_200_bldr/gplx/xowa/Xob_page_cmd.java rename to 400_xowa/src/gplx/xowa/bldrs/Xob_page_cmd.java index 0d9b79c27..c9603e0d1 100644 --- a/400_xowa/src_200_bldr/gplx/xowa/Xob_page_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xob_page_cmd.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.data.tbls.*; interface Xowd_page_cmd { String Cmd_key(); diff --git a/400_xowa/src_200_bldr/gplx/xowa/Xobd_parser.java b/400_xowa/src/gplx/xowa/bldrs/Xobd_parser.java similarity index 92% rename from 400_xowa/src_200_bldr/gplx/xowa/Xobd_parser.java rename to 400_xowa/src/gplx/xowa/bldrs/Xobd_parser.java index 27cc6e494..3aace0108 100644 --- a/400_xowa/src_200_bldr/gplx/xowa/Xobd_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xobd_parser.java @@ -15,8 +15,9 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; -import gplx.core.btries.*; import gplx.xowa.wikis.data.tbls.*; +package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; +import gplx.core.btries.*; +import gplx.xowa.wikis.data.tbls.*; public class Xobd_parser implements Xobd_wkr { private Btrie_slim_mgr trie = Btrie_slim_mgr.ci_a7(); // NOTE:ci.ascii:MW_const.en; ctg.v1 assumes [[Category: private List_adp wkr_list = List_adp_.new_(); diff --git a/400_xowa/src_200_bldr/gplx/xowa/Xobd_parser_wkr.java b/400_xowa/src/gplx/xowa/bldrs/Xobd_parser_wkr.java similarity index 93% rename from 400_xowa/src_200_bldr/gplx/xowa/Xobd_parser_wkr.java rename to 400_xowa/src/gplx/xowa/bldrs/Xobd_parser_wkr.java index d9b5b7bc3..bdd47859a 100644 --- a/400_xowa/src_200_bldr/gplx/xowa/Xobd_parser_wkr.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xobd_parser_wkr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.data.tbls.*; public interface Xobd_parser_wkr extends GfoInvkAble { Ordered_hash Wkr_hooks(); diff --git a/400_xowa/src_200_bldr/gplx/xowa/Xobd_rdr.java b/400_xowa/src/gplx/xowa/bldrs/Xobd_rdr.java similarity index 94% rename from 400_xowa/src_200_bldr/gplx/xowa/Xobd_rdr.java rename to 400_xowa/src/gplx/xowa/bldrs/Xobd_rdr.java index cfe2dfcf8..7cd2528bf 100644 --- a/400_xowa/src_200_bldr/gplx/xowa/Xobd_rdr.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xobd_rdr.java @@ -15,9 +15,11 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.core.consoles.*; -import gplx.ios.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.xmls.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.parsers.tmpls.*; +import gplx.ios.*; +import gplx.xowa.nss.*; +import gplx.xowa.bldrs.xmls.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.parsers.tmpls.*; public class Xobd_rdr implements Xob_cmd { private Xob_bldr bldr; private Xowe_wiki wiki; public Xobd_rdr(Xob_bldr bldr, Xowe_wiki wiki) {this.bldr = bldr; this.wiki = wiki;} diff --git a/400_xowa/src_200_bldr/gplx/xowa/Xobd_wkr.java b/400_xowa/src/gplx/xowa/bldrs/Xobd_wkr.java similarity index 93% rename from 400_xowa/src_200_bldr/gplx/xowa/Xobd_wkr.java rename to 400_xowa/src/gplx/xowa/bldrs/Xobd_wkr.java index e78e65c8c..662a597ca 100644 --- a/400_xowa/src_200_bldr/gplx/xowa/Xobd_wkr.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xobd_wkr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.data.tbls.*; public interface Xobd_wkr extends GfoInvkAble { String Wkr_key(); diff --git a/400_xowa/src_200_bldr/gplx/xowa/Xobdc_merger.java b/400_xowa/src/gplx/xowa/bldrs/Xobdc_merger.java similarity index 93% rename from 400_xowa/src_200_bldr/gplx/xowa/Xobdc_merger.java rename to 400_xowa/src/gplx/xowa/bldrs/Xobdc_merger.java index b363e2226..79e9671bf 100644 --- a/400_xowa/src_200_bldr/gplx/xowa/Xobdc_merger.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xobdc_merger.java @@ -15,8 +15,10 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.ios.*; import gplx.lists.*; +import gplx.xowa.nss.*; +import gplx.xowa.bldrs.wtrs.*; public class Xobdc_merger { public static void Basic(Gfo_usr_dlg usr_dlg, Io_url_gen dump_url_gen, Io_url sort_dir, int memory_max, Io_line_rdr_key_gen key_gen, Io_sort_cmd make_cmd) {Basic(usr_dlg, dump_url_gen, sort_dir, memory_max, Io_sort_split_itm_sorter._, key_gen, make_cmd);} public static void Basic(Gfo_usr_dlg usr_dlg, Io_url_gen dump_url_gen, Io_url sort_dir, int memory_max, ComparerAble row_comparer, Io_line_rdr_key_gen key_gen, Io_sort_cmd make_cmd) { diff --git a/400_xowa/src_200_bldr/gplx/xowa/Xobdc_utl.java b/400_xowa/src/gplx/xowa/bldrs/Xobdc_utl.java similarity index 96% rename from 400_xowa/src_200_bldr/gplx/xowa/Xobdc_utl.java rename to 400_xowa/src/gplx/xowa/bldrs/Xobdc_utl.java index 56158f61e..84161c7a1 100644 --- a/400_xowa/src_200_bldr/gplx/xowa/Xobdc_utl.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xobdc_utl.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.ios.*; import gplx.lists.*; import gplx.xowa.tdbs.*; class Io_sort_filCmd_reg implements Io_sort_filCmd { // 123|bgn|end|1 diff --git a/400_xowa/src/gplx/xowa/bldrs/aria2/Aria2_lib_mgr.java b/400_xowa/src/gplx/xowa/bldrs/aria2/Aria2_lib_mgr.java index a56fe8847..811598bc0 100644 --- a/400_xowa/src/gplx/xowa/bldrs/aria2/Aria2_lib_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/aria2/Aria2_lib_mgr.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.aria2; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; -import gplx.xowa.apps.fsys.*; import gplx.xowa.wmfs.dumps.*; +import gplx.xowa.apps.fsys.*; import gplx.xowa.wms.dumps.*; public class Aria2_lib_mgr implements GfoInvkAble { public ProcessAdp Lib() {return lib;} private ProcessAdp lib = new ProcessAdp(); public void Init_by_app(Xoae_app app) { diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_dump_mgr_base.java b/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_dump_mgr_base.java index 0bd826806..1f78c00db 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_dump_mgr_base.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_dump_mgr_base.java @@ -17,6 +17,8 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.dbs.*; import gplx.xowa.wikis.caches.*; import gplx.xowa.bldrs.cmds.files.*; import gplx.xowa.files.origs.*; +import gplx.xowa.bldrs.wkrs.*; +import gplx.xowa.nss.*; import gplx.xowa.wikis.data.*; import gplx.xowa.dbs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.parsers.*; import gplx.xowa.parsers.tmpls.*; public abstract class Xob_dump_mgr_base extends Xob_itm_basic_base implements Xob_cmd, GfoInvkAble { @@ -37,8 +39,8 @@ public abstract class Xob_dump_mgr_base extends Xob_itm_basic_base implements Xo poll_mgr = new Xobu_poll_mgr(bldr.App()); // init in ctor so gfs can invoke methods } public void Cmd_bgn(Xob_bldr bldr) { - parser = wiki.Parser(); - ctx = wiki.Ctx(); + parser = wiki.Parser_mgr().Main(); + ctx = wiki.Parser_mgr().Ctx(); root = ctx.Tkn_mkr().Root(Bry_.Empty); wiki.Init_assert(); // NOTE: must init wiki for db_mgr_as_sql wiki.Db_mgr_as_sql().Core_data_mgr().Init_by_load(gplx.xowa.wikis.Xow_fsys_mgr.Find_core_fil(wiki)); // NOTE: must reinit providers as previous steps may have rls'd (and left member variable conn which is closed) diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm.java b/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm.java index 96f3d334a..7e5eb82a1 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; +import gplx.xowa.nss.*; import gplx.xowa.wikis.data.*; public class Xob_ns_file_itm { public Xob_ns_file_itm(byte db_file_tid, String file_name, int[] ns_ids) { diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm_parser.java b/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm_parser.java index 81151efe6..888c5a3b0 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm_parser.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; -import gplx.srls.dsvs.*; +import gplx.langs.dsvs.*; +import gplx.xowa.nss.*; public class Xob_ns_file_itm_parser extends Dsv_wkr_base { private byte[] ns_ids_bry; private String name; private final List_adp rslts = List_adp_.new_(); private Xow_ns_mgr ns_mgr; private byte db_file_tid; private boolean mode_each = false; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Uca_trie.java b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Uca_trie.java index 755f80afd..7b59284d2 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Uca_trie.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Uca_trie.java @@ -20,1030 +20,1030 @@ import gplx.core.btries.*; class Uca_trie { private final Btrie_slim_mgr trie = Btrie_slim_mgr.cs(); public void Init() { -Init_itm(1, Bry_.ints_(1,1)); -Init_itm(2, Bry_.ints_(1,1)); -Init_itm(3, Bry_.ints_(1,1)); -Init_itm(4, Bry_.ints_(1,1)); -Init_itm(5, Bry_.ints_(1,1)); -Init_itm(6, Bry_.ints_(1,1)); -Init_itm(7, Bry_.ints_(1,1)); -Init_itm(8, Bry_.ints_(1,1)); -Init_itm(9, Bry_.ints_(3,64,1,5,1,5)); -Init_itm(10, Bry_.ints_(3,66,1,5,1,5)); -Init_itm(11, Bry_.ints_(3,68,1,5,1,5)); -Init_itm(12, Bry_.ints_(3,70,1,5,1,5)); -Init_itm(13, Bry_.ints_(3,72,1,5,1,5)); -Init_itm(14, Bry_.ints_(1,1)); -Init_itm(15, Bry_.ints_(1,1)); -Init_itm(16, Bry_.ints_(1,1)); -Init_itm(17, Bry_.ints_(1,1)); -Init_itm(18, Bry_.ints_(1,1)); -Init_itm(19, Bry_.ints_(1,1)); -Init_itm(20, Bry_.ints_(1,1)); -Init_itm(21, Bry_.ints_(1,1)); -Init_itm(22, Bry_.ints_(1,1)); -Init_itm(23, Bry_.ints_(1,1)); -Init_itm(24, Bry_.ints_(1,1)); -Init_itm(25, Bry_.ints_(1,1)); -Init_itm(26, Bry_.ints_(1,1)); -Init_itm(27, Bry_.ints_(1,1)); -Init_itm(28, Bry_.ints_(1,1)); -Init_itm(29, Bry_.ints_(1,1)); -Init_itm(30, Bry_.ints_(1,1)); -Init_itm(31, Bry_.ints_(1,1)); -Init_itm(32, Bry_.ints_(4,1,5,1,5)); -Init_itm(33, Bry_.ints_(8,129,1,5,1,5)); -Init_itm(34, Bry_.ints_(10,161,1,5,1,5)); -Init_itm(35, Bry_.ints_(11,177,1,5,1,5)); -Init_itm(36, Bry_.ints_(15,14,1,5,1,5)); -Init_itm(37, Bry_.ints_(11,179,1,5,1,5)); -Init_itm(38, Bry_.ints_(11,173,1,5,1,5)); -Init_itm(39, Bry_.ints_(10,147,1,5,1,5)); -Init_itm(40, Bry_.ints_(10,181,1,5,1,5)); -Init_itm(41, Bry_.ints_(10,183,1,5,1,5)); -Init_itm(42, Bry_.ints_(11,159,1,5,1,5)); -Init_itm(43, Bry_.ints_(13,95,1,5,1,5)); -Init_itm(44, Bry_.ints_(7,1,5,1,5)); -Init_itm(45, Bry_.ints_(6,70,1,5,1,5)); -Init_itm(46, Bry_.ints_(9,1,5,1,5)); -Init_itm(47, Bry_.ints_(11,169,1,5,1,5)); -Init_itm(48, Bry_.ints_(18,1,5,1,5)); -Init_itm(49, Bry_.ints_(20,1,5,1,5)); -Init_itm(50, Bry_.ints_(22,1,5,1,5)); -Init_itm(51, Bry_.ints_(24,1,5,1,5)); -Init_itm(52, Bry_.ints_(26,1,5,1,5)); -Init_itm(53, Bry_.ints_(28,1,5,1,5)); -Init_itm(54, Bry_.ints_(30,1,5,1,5)); -Init_itm(55, Bry_.ints_(32,1,5,1,5)); -Init_itm(56, Bry_.ints_(34,1,5,1,5)); -Init_itm(57, Bry_.ints_(36,1,5,1,5)); -Init_itm(58, Bry_.ints_(8,97,1,5,1,5)); -Init_itm(59, Bry_.ints_(8,88,1,5,1,5)); -Init_itm(60, Bry_.ints_(13,103,1,5,1,5)); -Init_itm(61, Bry_.ints_(13,105,1,5,1,5)); -Init_itm(62, Bry_.ints_(13,107,1,5,1,5)); -Init_itm(63, Bry_.ints_(8,136,1,5,1,5)); -Init_itm(64, Bry_.ints_(11,157,1,5,1,5)); -Init_itm(65, Bry_.ints_(39,1,5,1,143)); -Init_itm(66, Bry_.ints_(41,1,5,1,143)); -Init_itm(67, Bry_.ints_(43,1,5,1,143)); -Init_itm(68, Bry_.ints_(45,1,5,1,143)); -Init_itm(69, Bry_.ints_(47,1,5,1,143)); -Init_itm(70, Bry_.ints_(49,1,5,1,143)); -Init_itm(71, Bry_.ints_(51,1,5,1,143)); -Init_itm(72, Bry_.ints_(53,1,5,1,143)); -Init_itm(73, Bry_.ints_(55,1,5,1,143)); -Init_itm(74, Bry_.ints_(57,1,5,1,143)); -Init_itm(75, Bry_.ints_(59,1,5,1,143)); -Init_itm(76, Bry_.ints_(61,1,5,1,143)); -Init_itm(77, Bry_.ints_(63,1,5,1,143)); -Init_itm(78, Bry_.ints_(65,1,5,1,143)); -Init_itm(79, Bry_.ints_(67,1,5,1,143)); -Init_itm(80, Bry_.ints_(69,1,5,1,143)); -Init_itm(81, Bry_.ints_(71,1,5,1,143)); -Init_itm(82, Bry_.ints_(73,1,5,1,143)); -Init_itm(83, Bry_.ints_(75,1,5,1,143)); -Init_itm(84, Bry_.ints_(77,1,5,1,143)); -Init_itm(85, Bry_.ints_(79,1,5,1,143)); -Init_itm(86, Bry_.ints_(81,1,5,1,143)); -Init_itm(87, Bry_.ints_(83,1,5,1,143)); -Init_itm(88, Bry_.ints_(85,1,5,1,143)); -Init_itm(89, Bry_.ints_(87,1,5,1,143)); -Init_itm(90, Bry_.ints_(89,1,5,1,143)); -Init_itm(91, Bry_.ints_(10,185,1,5,1,5)); -Init_itm(92, Bry_.ints_(11,171,1,5,1,5)); -Init_itm(93, Bry_.ints_(10,187,1,5,1,5)); -Init_itm(94, Bry_.ints_(13,15,1,5,1,5)); -Init_itm(95, Bry_.ints_(6,66,1,5,1,5)); -Init_itm(96, Bry_.ints_(13,10,1,5,1,5)); -Init_itm(97, Bry_.ints_(39,1,5,1,5)); -Init_itm(98, Bry_.ints_(41,1,5,1,5)); -Init_itm(99, Bry_.ints_(43,1,5,1,5)); -Init_itm(100, Bry_.ints_(45,1,5,1,5)); -Init_itm(101, Bry_.ints_(47,1,5,1,5)); -Init_itm(102, Bry_.ints_(49,1,5,1,5)); -Init_itm(103, Bry_.ints_(51,1,5,1,5)); -Init_itm(104, Bry_.ints_(53,1,5,1,5)); -Init_itm(105, Bry_.ints_(55,1,5,1,5)); -Init_itm(106, Bry_.ints_(57,1,5,1,5)); -Init_itm(107, Bry_.ints_(59,1,5,1,5)); -Init_itm(108, Bry_.ints_(61,1,5,1,5)); -Init_itm(109, Bry_.ints_(63,1,5,1,5)); -Init_itm(110, Bry_.ints_(65,1,5,1,5)); -Init_itm(111, Bry_.ints_(67,1,5,1,5)); -Init_itm(112, Bry_.ints_(69,1,5,1,5)); -Init_itm(113, Bry_.ints_(71,1,5,1,5)); -Init_itm(114, Bry_.ints_(73,1,5,1,5)); -Init_itm(115, Bry_.ints_(75,1,5,1,5)); -Init_itm(116, Bry_.ints_(77,1,5,1,5)); -Init_itm(117, Bry_.ints_(79,1,5,1,5)); -Init_itm(118, Bry_.ints_(81,1,5,1,5)); -Init_itm(119, Bry_.ints_(83,1,5,1,5)); -Init_itm(120, Bry_.ints_(85,1,5,1,5)); -Init_itm(121, Bry_.ints_(87,1,5,1,5)); -Init_itm(122, Bry_.ints_(89,1,5,1,5)); -Init_itm(123, Bry_.ints_(10,189,1,5,1,5)); -Init_itm(124, Bry_.ints_(13,111,1,5,1,5)); -Init_itm(125, Bry_.ints_(10,191,1,5,1,5)); -Init_itm(126, Bry_.ints_(13,115,1,5,1,5)); -Init_itm(127, Bry_.ints_(1,1)); -Init_itm(128, Bry_.ints_(1,1)); -Init_itm(129, Bry_.ints_(1,1)); -Init_itm(130, Bry_.ints_(1,1)); -Init_itm(131, Bry_.ints_(1,1)); -Init_itm(132, Bry_.ints_(1,1)); -Init_itm(133, Bry_.ints_(3,74,1,5,1,5)); -Init_itm(134, Bry_.ints_(1,1)); -Init_itm(135, Bry_.ints_(1,1)); -Init_itm(136, Bry_.ints_(1,1)); -Init_itm(137, Bry_.ints_(1,1)); -Init_itm(138, Bry_.ints_(1,1)); -Init_itm(139, Bry_.ints_(1,1)); -Init_itm(140, Bry_.ints_(1,1)); -Init_itm(141, Bry_.ints_(1,1)); -Init_itm(142, Bry_.ints_(1,1)); -Init_itm(143, Bry_.ints_(1,1)); -Init_itm(144, Bry_.ints_(1,1)); -Init_itm(145, Bry_.ints_(1,1)); -Init_itm(146, Bry_.ints_(1,1)); -Init_itm(147, Bry_.ints_(1,1)); -Init_itm(148, Bry_.ints_(1,1)); -Init_itm(149, Bry_.ints_(1,1)); -Init_itm(150, Bry_.ints_(1,1)); -Init_itm(151, Bry_.ints_(1,1)); -Init_itm(152, Bry_.ints_(1,1)); -Init_itm(153, Bry_.ints_(1,1)); -Init_itm(154, Bry_.ints_(1,1)); -Init_itm(155, Bry_.ints_(1,1)); -Init_itm(156, Bry_.ints_(1,1)); -Init_itm(157, Bry_.ints_(1,1)); -Init_itm(158, Bry_.ints_(1,1)); -Init_itm(159, Bry_.ints_(1,1)); -Init_itm(160, Bry_.ints_(4,1,5,1,181)); -Init_itm(161, Bry_.ints_(8,131,1,5,1,5)); -Init_itm(162, Bry_.ints_(15,12,1,5,1,5)); -Init_itm(163, Bry_.ints_(15,16,1,5,1,5)); -Init_itm(164, Bry_.ints_(15,10,1,5,1,5)); -Init_itm(165, Bry_.ints_(15,18,1,5,1,5)); -Init_itm(166, Bry_.ints_(13,113,1,5,1,5)); -Init_itm(167, Bry_.ints_(11,149,1,5,1,5)); -Init_itm(168, Bry_.ints_(13,20,1,5,1,5)); -Init_itm(169, Bry_.ints_(13,86,1,5,1,5)); -Init_itm(170, Bry_.ints_(39,1,5,1,167)); -Init_itm(171, Bry_.ints_(10,177,1,5,1,5)); -Init_itm(172, Bry_.ints_(13,109,1,5,1,5)); -Init_itm(173, Bry_.ints_(1,1)); -Init_itm(174, Bry_.ints_(13,88,1,5,1,5)); -Init_itm(175, Bry_.ints_(13,17,1,5,1,5)); -Init_itm(176, Bry_.ints_(13,79,1,5,1,5)); -Init_itm(177, Bry_.ints_(13,97,1,5,1,5)); -Init_itm(178, Bry_.ints_(22,1,5,1,167)); -Init_itm(179, Bry_.ints_(24,1,5,1,167)); -Init_itm(180, Bry_.ints_(13,12,1,5,1,5)); -Init_itm(181, Bry_.ints_(91,46,1,5,1,137)); -Init_itm(182, Bry_.ints_(11,153,1,5,1,5)); -Init_itm(183, Bry_.ints_(10,78,1,5,1,5)); -Init_itm(184, Bry_.ints_(13,23,1,5,1,5)); -Init_itm(185, Bry_.ints_(20,1,5,1,167)); -Init_itm(186, Bry_.ints_(67,1,5,1,167)); -Init_itm(187, Bry_.ints_(10,179,1,5,1,5)); -Init_itm(188, Bry_.ints_(20,13,117,44,26,1,7,1,187,187,189)); -Init_itm(189, Bry_.ints_(20,13,117,44,22,1,7,1,187,187,189)); -Init_itm(190, Bry_.ints_(24,13,117,44,26,1,7,1,187,187,189)); -Init_itm(191, Bry_.ints_(8,138,1,5,1,5)); -Init_itm(192, Bry_.ints_(39,1,134,143,1,143,5)); -Init_itm(193, Bry_.ints_(39,1,134,141,1,143,5)); -Init_itm(194, Bry_.ints_(39,1,134,147,1,143,5)); -Init_itm(195, Bry_.ints_(39,1,134,161,1,143,5)); -Init_itm(196, Bry_.ints_(39,1,134,157,1,143,5)); -Init_itm(197, Bry_.ints_(39,1,134,153,1,143,5)); -Init_itm(198, Bry_.ints_(39,47,1,134,219,169,5,1,147,137,189)); -Init_itm(199, Bry_.ints_(43,1,134,167,1,143,5)); -Init_itm(200, Bry_.ints_(47,1,134,143,1,143,5)); -Init_itm(201, Bry_.ints_(47,1,134,141,1,143,5)); -Init_itm(202, Bry_.ints_(47,1,134,147,1,143,5)); -Init_itm(203, Bry_.ints_(47,1,134,157,1,143,5)); -Init_itm(204, Bry_.ints_(55,1,134,143,1,143,5)); -Init_itm(205, Bry_.ints_(55,1,134,141,1,143,5)); -Init_itm(206, Bry_.ints_(55,1,134,147,1,143,5)); -Init_itm(207, Bry_.ints_(55,1,134,157,1,143,5)); -Init_itm(208, Bry_.ints_(45,1,134,219,169,1,147,137)); -Init_itm(209, Bry_.ints_(65,1,134,161,1,143,5)); -Init_itm(210, Bry_.ints_(67,1,134,143,1,143,5)); -Init_itm(211, Bry_.ints_(67,1,134,141,1,143,5)); -Init_itm(212, Bry_.ints_(67,1,134,147,1,143,5)); -Init_itm(213, Bry_.ints_(67,1,134,161,1,143,5)); -Init_itm(214, Bry_.ints_(67,1,134,157,1,143,5)); -Init_itm(215, Bry_.ints_(13,101,1,5,1,5)); -Init_itm(216, Bry_.ints_(67,1,134,165,1,143,5)); -Init_itm(217, Bry_.ints_(79,1,134,143,1,143,5)); -Init_itm(218, Bry_.ints_(79,1,134,141,1,143,5)); -Init_itm(219, Bry_.ints_(79,1,134,147,1,143,5)); -Init_itm(220, Bry_.ints_(79,1,134,157,1,143,5)); -Init_itm(221, Bry_.ints_(87,1,134,141,1,143,5)); -Init_itm(222, Bry_.ints_(90,96,1,5,1,143)); -Init_itm(223, Bry_.ints_(75,75,1,134,219,169,5,1,137,137,189)); -Init_itm(224, Bry_.ints_(39,1,134,143,1,6)); -Init_itm(225, Bry_.ints_(39,1,134,141,1,6)); -Init_itm(226, Bry_.ints_(39,1,134,147,1,6)); -Init_itm(227, Bry_.ints_(39,1,134,161,1,6)); -Init_itm(228, Bry_.ints_(39,1,134,157,1,6)); -Init_itm(229, Bry_.ints_(39,1,134,153,1,6)); -Init_itm(230, Bry_.ints_(39,47,1,134,219,169,5,1,137,137,189)); -Init_itm(231, Bry_.ints_(43,1,134,167,1,6)); -Init_itm(232, Bry_.ints_(47,1,134,143,1,6)); -Init_itm(233, Bry_.ints_(47,1,134,141,1,6)); -Init_itm(234, Bry_.ints_(47,1,134,147,1,6)); -Init_itm(235, Bry_.ints_(47,1,134,157,1,6)); -Init_itm(236, Bry_.ints_(55,1,134,143,1,6)); -Init_itm(237, Bry_.ints_(55,1,134,141,1,6)); -Init_itm(238, Bry_.ints_(55,1,134,147,1,6)); -Init_itm(239, Bry_.ints_(55,1,134,157,1,6)); -Init_itm(240, Bry_.ints_(45,1,134,219,169,1,137,137)); -Init_itm(241, Bry_.ints_(65,1,134,161,1,6)); -Init_itm(242, Bry_.ints_(67,1,134,143,1,6)); -Init_itm(243, Bry_.ints_(67,1,134,141,1,6)); -Init_itm(244, Bry_.ints_(67,1,134,147,1,6)); -Init_itm(245, Bry_.ints_(67,1,134,161,1,6)); -Init_itm(246, Bry_.ints_(67,1,134,157,1,6)); -Init_itm(247, Bry_.ints_(13,99,1,5,1,5)); -Init_itm(248, Bry_.ints_(67,1,134,165,1,6)); -Init_itm(249, Bry_.ints_(79,1,134,143,1,6)); -Init_itm(250, Bry_.ints_(79,1,134,141,1,6)); -Init_itm(251, Bry_.ints_(79,1,134,147,1,6)); -Init_itm(252, Bry_.ints_(79,1,134,157,1,6)); -Init_itm(253, Bry_.ints_(87,1,134,141,1,6)); -Init_itm(254, Bry_.ints_(90,96,1,5,1,5)); -Init_itm(255, Bry_.ints_(87,1,134,157,1,6)); -Init_itm(256, Bry_.ints_(39,1,134,171,1,143,5)); -Init_itm(257, Bry_.ints_(39,1,134,171,1,6)); -Init_itm(258, Bry_.ints_(39,1,134,145,1,143,5)); -Init_itm(259, Bry_.ints_(39,1,134,145,1,6)); -Init_itm(260, Bry_.ints_(39,1,134,169,1,143,5)); -Init_itm(261, Bry_.ints_(39,1,134,169,1,6)); -Init_itm(262, Bry_.ints_(43,1,134,141,1,143,5)); -Init_itm(263, Bry_.ints_(43,1,134,141,1,6)); -Init_itm(264, Bry_.ints_(43,1,134,147,1,143,5)); -Init_itm(265, Bry_.ints_(43,1,134,147,1,6)); -Init_itm(266, Bry_.ints_(43,1,134,163,1,143,5)); -Init_itm(267, Bry_.ints_(43,1,134,163,1,6)); -Init_itm(268, Bry_.ints_(43,1,134,151,1,143,5)); -Init_itm(269, Bry_.ints_(43,1,134,151,1,6)); -Init_itm(270, Bry_.ints_(45,1,134,151,1,143,5)); -Init_itm(271, Bry_.ints_(45,1,134,151,1,6)); -Init_itm(272, Bry_.ints_(45,1,134,208,61,1,143,5)); -Init_itm(273, Bry_.ints_(45,1,134,208,61,1,6)); -Init_itm(274, Bry_.ints_(47,1,134,171,1,143,5)); -Init_itm(275, Bry_.ints_(47,1,134,171,1,6)); -Init_itm(276, Bry_.ints_(47,1,134,145,1,143,5)); -Init_itm(277, Bry_.ints_(47,1,134,145,1,6)); -Init_itm(278, Bry_.ints_(47,1,134,163,1,143,5)); -Init_itm(279, Bry_.ints_(47,1,134,163,1,6)); -Init_itm(280, Bry_.ints_(47,1,134,169,1,143,5)); -Init_itm(281, Bry_.ints_(47,1,134,169,1,6)); -Init_itm(282, Bry_.ints_(47,1,134,151,1,143,5)); -Init_itm(283, Bry_.ints_(47,1,134,151,1,6)); -Init_itm(284, Bry_.ints_(51,1,134,147,1,143,5)); -Init_itm(285, Bry_.ints_(51,1,134,147,1,6)); -Init_itm(286, Bry_.ints_(51,1,134,145,1,143,5)); -Init_itm(287, Bry_.ints_(51,1,134,145,1,6)); -Init_itm(288, Bry_.ints_(51,1,134,163,1,143,5)); -Init_itm(289, Bry_.ints_(51,1,134,163,1,6)); -Init_itm(290, Bry_.ints_(51,1,134,167,1,143,5)); -Init_itm(291, Bry_.ints_(51,1,134,167,1,6)); -Init_itm(292, Bry_.ints_(53,1,134,147,1,143,5)); -Init_itm(293, Bry_.ints_(53,1,134,147,1,6)); -Init_itm(294, Bry_.ints_(53,1,134,208,61,1,143,5)); -Init_itm(295, Bry_.ints_(53,1,134,208,61,1,6)); -Init_itm(296, Bry_.ints_(55,1,134,161,1,143,5)); -Init_itm(297, Bry_.ints_(55,1,134,161,1,6)); -Init_itm(298, Bry_.ints_(55,1,134,171,1,143,5)); -Init_itm(299, Bry_.ints_(55,1,134,171,1,6)); -Init_itm(300, Bry_.ints_(55,1,134,145,1,143,5)); -Init_itm(301, Bry_.ints_(55,1,134,145,1,6)); -Init_itm(302, Bry_.ints_(55,1,134,169,1,143,5)); -Init_itm(303, Bry_.ints_(55,1,134,169,1,6)); -Init_itm(304, Bry_.ints_(55,1,134,163,1,143,5)); -Init_itm(305, Bry_.ints_(56,64,1,5,1,5)); -Init_itm(306, Bry_.ints_(55,57,1,6,1,147,147)); -Init_itm(307, Bry_.ints_(55,57,1,6,1,137,137)); -Init_itm(308, Bry_.ints_(57,1,134,147,1,143,5)); -Init_itm(309, Bry_.ints_(57,1,134,147,1,6)); -Init_itm(310, Bry_.ints_(59,1,134,167,1,143,5)); -Init_itm(311, Bry_.ints_(59,1,134,167,1,6)); -Init_itm(312, Bry_.ints_(72,72,1,5,1,5)); -Init_itm(313, Bry_.ints_(61,1,134,141,1,143,5)); -Init_itm(314, Bry_.ints_(61,1,134,141,1,6)); -Init_itm(315, Bry_.ints_(61,1,134,167,1,143,5)); -Init_itm(316, Bry_.ints_(61,1,134,167,1,6)); -Init_itm(317, Bry_.ints_(61,1,134,151,1,143,5)); -Init_itm(318, Bry_.ints_(61,1,134,151,1,6)); -Init_itm(319, Bry_.ints_(61,1,134,219,169,1,143,5)); -Init_itm(320, Bry_.ints_(61,1,134,219,169,1,6)); -Init_itm(321, Bry_.ints_(61,1,134,208,61,1,143,5)); -Init_itm(322, Bry_.ints_(61,1,134,208,61,1,6)); -Init_itm(323, Bry_.ints_(65,1,134,141,1,143,5)); -Init_itm(324, Bry_.ints_(65,1,134,141,1,6)); -Init_itm(325, Bry_.ints_(65,1,134,167,1,143,5)); -Init_itm(326, Bry_.ints_(65,1,134,167,1,6)); -Init_itm(327, Bry_.ints_(65,1,134,151,1,143,5)); -Init_itm(328, Bry_.ints_(65,1,134,151,1,6)); -Init_itm(329, Bry_.ints_(90,134,65,1,6,1,137,137)); -Init_itm(330, Bry_.ints_(66,86,1,5,1,143)); -Init_itm(331, Bry_.ints_(66,86,1,5,1,5)); -Init_itm(332, Bry_.ints_(67,1,134,171,1,143,5)); -Init_itm(333, Bry_.ints_(67,1,134,171,1,6)); -Init_itm(334, Bry_.ints_(67,1,134,145,1,143,5)); -Init_itm(335, Bry_.ints_(67,1,134,145,1,6)); -Init_itm(336, Bry_.ints_(67,1,134,159,1,143,5)); -Init_itm(337, Bry_.ints_(67,1,134,159,1,6)); -Init_itm(338, Bry_.ints_(67,47,1,134,219,169,5,1,147,137,189)); -Init_itm(339, Bry_.ints_(67,47,1,134,219,169,5,1,137,137,189)); -Init_itm(340, Bry_.ints_(73,1,134,141,1,143,5)); -Init_itm(341, Bry_.ints_(73,1,134,141,1,6)); -Init_itm(342, Bry_.ints_(73,1,134,167,1,143,5)); -Init_itm(343, Bry_.ints_(73,1,134,167,1,6)); -Init_itm(344, Bry_.ints_(73,1,134,151,1,143,5)); -Init_itm(345, Bry_.ints_(73,1,134,151,1,6)); -Init_itm(346, Bry_.ints_(75,1,134,141,1,143,5)); -Init_itm(347, Bry_.ints_(75,1,134,141,1,6)); -Init_itm(348, Bry_.ints_(75,1,134,147,1,143,5)); -Init_itm(349, Bry_.ints_(75,1,134,147,1,6)); -Init_itm(350, Bry_.ints_(75,1,134,167,1,143,5)); -Init_itm(351, Bry_.ints_(75,1,134,167,1,6)); -Init_itm(352, Bry_.ints_(75,1,134,151,1,143,5)); -Init_itm(353, Bry_.ints_(75,1,134,151,1,6)); -Init_itm(354, Bry_.ints_(77,1,134,167,1,143,5)); -Init_itm(355, Bry_.ints_(77,1,134,167,1,6)); -Init_itm(356, Bry_.ints_(77,1,134,151,1,143,5)); -Init_itm(357, Bry_.ints_(77,1,134,151,1,6)); -Init_itm(358, Bry_.ints_(78,66,1,5,1,143)); -Init_itm(359, Bry_.ints_(78,66,1,5,1,5)); -Init_itm(360, Bry_.ints_(79,1,134,161,1,143,5)); -Init_itm(361, Bry_.ints_(79,1,134,161,1,6)); -Init_itm(362, Bry_.ints_(79,1,134,171,1,143,5)); -Init_itm(363, Bry_.ints_(79,1,134,171,1,6)); -Init_itm(364, Bry_.ints_(79,1,134,145,1,143,5)); -Init_itm(365, Bry_.ints_(79,1,134,145,1,6)); -Init_itm(366, Bry_.ints_(79,1,134,153,1,143,5)); -Init_itm(367, Bry_.ints_(79,1,134,153,1,6)); -Init_itm(368, Bry_.ints_(79,1,134,159,1,143,5)); -Init_itm(369, Bry_.ints_(79,1,134,159,1,6)); -Init_itm(370, Bry_.ints_(79,1,134,169,1,143,5)); -Init_itm(371, Bry_.ints_(79,1,134,169,1,6)); -Init_itm(372, Bry_.ints_(83,1,134,147,1,143,5)); -Init_itm(373, Bry_.ints_(83,1,134,147,1,6)); -Init_itm(374, Bry_.ints_(87,1,134,147,1,143,5)); -Init_itm(375, Bry_.ints_(87,1,134,147,1,6)); -Init_itm(376, Bry_.ints_(87,1,134,157,1,143,5)); -Init_itm(377, Bry_.ints_(89,1,134,141,1,143,5)); -Init_itm(378, Bry_.ints_(89,1,134,141,1,6)); -Init_itm(379, Bry_.ints_(89,1,134,163,1,143,5)); -Init_itm(380, Bry_.ints_(89,1,134,163,1,6)); -Init_itm(381, Bry_.ints_(89,1,134,151,1,143,5)); -Init_itm(382, Bry_.ints_(89,1,134,151,1,6)); -Init_itm(383, Bry_.ints_(75,1,134,219,185,1,137,137)); -Init_itm(384, Bry_.ints_(42,66,1,5,1,5)); -Init_itm(385, Bry_.ints_(42,76,1,5,1,143)); -Init_itm(386, Bry_.ints_(42,78,1,5,1,143)); -Init_itm(387, Bry_.ints_(42,78,1,5,1,5)); -Init_itm(388, Bry_.ints_(90,126,1,5,1,143)); -Init_itm(389, Bry_.ints_(90,126,1,5,1,5)); -Init_itm(390, Bry_.ints_(68,74,1,5,1,143)); -Init_itm(391, Bry_.ints_(44,70,1,5,1,143)); -Init_itm(392, Bry_.ints_(44,70,1,5,1,5)); -Init_itm(393, Bry_.ints_(46,72,1,5,1,143)); -Init_itm(394, Bry_.ints_(46,74,1,5,1,143)); -Init_itm(395, Bry_.ints_(46,78,1,5,1,143)); -Init_itm(396, Bry_.ints_(46,78,1,5,1,5)); -Init_itm(397, Bry_.ints_(89,83,1,6,1,137,137)); -Init_itm(398, Bry_.ints_(48,72,1,5,1,143)); -Init_itm(399, Bry_.ints_(48,76,1,5,1,143)); -Init_itm(400, Bry_.ints_(48,80,1,5,1,143)); -Init_itm(401, Bry_.ints_(50,70,1,5,1,143)); -Init_itm(402, Bry_.ints_(50,70,1,5,1,5)); -Init_itm(403, Bry_.ints_(52,72,1,5,1,143)); -Init_itm(404, Bry_.ints_(52,80,1,5,1,143)); -Init_itm(405, Bry_.ints_(54,66,1,5,1,5)); -Init_itm(406, Bry_.ints_(56,78,1,5,1,143)); -Init_itm(407, Bry_.ints_(56,72,1,5,1,143)); -Init_itm(408, Bry_.ints_(60,68,1,5,1,143)); -Init_itm(409, Bry_.ints_(60,68,1,5,1,5)); -Init_itm(410, Bry_.ints_(62,72,1,5,1,5)); -Init_itm(411, Bry_.ints_(62,94,1,5,1,5)); -Init_itm(412, Bry_.ints_(80,84,1,5,1,143)); -Init_itm(413, Bry_.ints_(66,72,1,5,1,143)); -Init_itm(414, Bry_.ints_(66,74,1,5,1,5)); -Init_itm(415, Bry_.ints_(68,90,1,5,1,143)); -Init_itm(416, Bry_.ints_(67,1,134,191,1,143,5)); -Init_itm(417, Bry_.ints_(67,1,134,191,1,6)); -Init_itm(418, Bry_.ints_(52,82,1,5,1,143)); -Init_itm(419, Bry_.ints_(52,82,1,5,1,5)); -Init_itm(420, Bry_.ints_(70,74,1,5,1,143)); -Init_itm(421, Bry_.ints_(70,74,1,5,1,5)); -Init_itm(422, Bry_.ints_(74,64,1,5,1,143)); -Init_itm(423, Bry_.ints_(90,122,1,5,1,143)); -Init_itm(424, Bry_.ints_(90,122,1,5,1,5)); -Init_itm(425, Bry_.ints_(76,78,1,5,1,143)); -Init_itm(426, Bry_.ints_(76,82,1,5,1,5)); -Init_itm(427, Bry_.ints_(78,72,1,5,1,5)); -Init_itm(428, Bry_.ints_(78,74,1,5,1,143)); -Init_itm(429, Bry_.ints_(78,74,1,5,1,5)); -Init_itm(430, Bry_.ints_(78,76,1,5,1,143)); -Init_itm(431, Bry_.ints_(79,1,134,191,1,143,5)); -Init_itm(432, Bry_.ints_(79,1,134,191,1,6)); -Init_itm(433, Bry_.ints_(80,92,1,5,1,143)); -Init_itm(434, Bry_.ints_(82,70,1,5,1,143)); -Init_itm(435, Bry_.ints_(88,68,1,5,1,143)); -Init_itm(436, Bry_.ints_(88,68,1,5,1,5)); -Init_itm(437, Bry_.ints_(90,66,1,5,1,143)); -Init_itm(438, Bry_.ints_(90,66,1,5,1,5)); -Init_itm(439, Bry_.ints_(90,84,1,5,1,143)); -Init_itm(440, Bry_.ints_(90,88,1,5,1,143)); -Init_itm(441, Bry_.ints_(90,88,1,5,1,5)); -Init_itm(442, Bry_.ints_(90,92,1,5,1,5)); -Init_itm(443, Bry_.ints_(90,114,1,5,1,5)); -Init_itm(444, Bry_.ints_(90,124,1,5,1,143)); -Init_itm(445, Bry_.ints_(90,124,1,5,1,5)); -Init_itm(446, Bry_.ints_(77,75,1,6,1,137,137)); -Init_itm(447, Bry_.ints_(90,102,1,5,1,5)); -Init_itm(448, Bry_.ints_(90,162,1,5,1,5)); -Init_itm(449, Bry_.ints_(90,164,1,5,1,5)); -Init_itm(450, Bry_.ints_(90,166,1,5,1,5)); -Init_itm(451, Bry_.ints_(90,168,1,5,1,5)); -Init_itm(452, Bry_.ints_(45,89,1,133,151,1,147,147,189)); -Init_itm(453, Bry_.ints_(45,89,1,133,151,1,147,137,189)); -Init_itm(454, Bry_.ints_(45,89,1,133,151,1,137,137,189)); -Init_itm(455, Bry_.ints_(61,57,1,6,1,147,147)); -Init_itm(456, Bry_.ints_(61,57,1,6,1,147,137)); -Init_itm(457, Bry_.ints_(61,57,1,6,1,137,137)); -Init_itm(458, Bry_.ints_(65,57,1,6,1,147,147)); -Init_itm(459, Bry_.ints_(65,57,1,6,1,147,137)); -Init_itm(460, Bry_.ints_(65,57,1,6,1,137,137)); -Init_itm(461, Bry_.ints_(39,1,134,151,1,143,5)); -Init_itm(462, Bry_.ints_(39,1,134,151,1,6)); -Init_itm(463, Bry_.ints_(55,1,134,151,1,143,5)); -Init_itm(464, Bry_.ints_(55,1,134,151,1,6)); -Init_itm(465, Bry_.ints_(67,1,134,151,1,143,5)); -Init_itm(466, Bry_.ints_(67,1,134,151,1,6)); -Init_itm(467, Bry_.ints_(79,1,134,151,1,143,5)); -Init_itm(468, Bry_.ints_(79,1,134,151,1,6)); -Init_itm(469, Bry_.ints_(79,1,134,157,171,1,143,6)); -Init_itm(470, Bry_.ints_(79,1,134,157,171,1,7)); -Init_itm(471, Bry_.ints_(79,1,134,157,141,1,143,6)); -Init_itm(472, Bry_.ints_(79,1,134,157,141,1,7)); -Init_itm(473, Bry_.ints_(79,1,134,157,151,1,143,6)); -Init_itm(474, Bry_.ints_(79,1,134,157,151,1,7)); -Init_itm(475, Bry_.ints_(79,1,134,157,143,1,143,6)); -Init_itm(476, Bry_.ints_(79,1,134,157,143,1,7)); -Init_itm(477, Bry_.ints_(48,72,1,5,1,5)); -Init_itm(478, Bry_.ints_(39,1,134,157,171,1,143,6)); -Init_itm(479, Bry_.ints_(39,1,134,157,171,1,7)); -Init_itm(480, Bry_.ints_(39,1,134,163,171,1,143,6)); -Init_itm(481, Bry_.ints_(39,1,134,163,171,1,7)); -Init_itm(482, Bry_.ints_(39,47,1,134,219,169,134,171,1,147,137,189,5)); -Init_itm(483, Bry_.ints_(39,47,1,134,219,169,134,171,1,137,137,189,5)); -Init_itm(484, Bry_.ints_(52,68,1,5,1,143)); -Init_itm(485, Bry_.ints_(52,68,1,5,1,5)); -Init_itm(486, Bry_.ints_(51,1,134,151,1,143,5)); -Init_itm(487, Bry_.ints_(51,1,134,151,1,6)); -Init_itm(488, Bry_.ints_(59,1,134,151,1,143,5)); -Init_itm(489, Bry_.ints_(59,1,134,151,1,6)); -Init_itm(490, Bry_.ints_(67,1,134,169,1,143,5)); -Init_itm(491, Bry_.ints_(67,1,134,169,1,6)); -Init_itm(492, Bry_.ints_(67,1,134,169,171,1,143,6)); -Init_itm(493, Bry_.ints_(67,1,134,169,171,1,7)); -Init_itm(494, Bry_.ints_(90,84,1,134,151,1,143,5)); -Init_itm(495, Bry_.ints_(90,84,1,134,151,1,6)); -Init_itm(496, Bry_.ints_(57,1,134,151,1,6)); -Init_itm(497, Bry_.ints_(45,89,1,6,1,147,147)); -Init_itm(498, Bry_.ints_(45,89,1,6,1,147,137)); -Init_itm(499, Bry_.ints_(45,89,1,6,1,137,137)); -Init_itm(500, Bry_.ints_(51,1,134,141,1,143,5)); -Init_itm(501, Bry_.ints_(51,1,134,141,1,6)); -Init_itm(502, Bry_.ints_(54,66,1,5,1,143)); -Init_itm(503, Bry_.ints_(90,102,1,5,1,143)); -Init_itm(504, Bry_.ints_(65,1,134,143,1,143,5)); -Init_itm(505, Bry_.ints_(65,1,134,143,1,6)); -Init_itm(506, Bry_.ints_(39,1,134,153,141,1,143,6)); -Init_itm(507, Bry_.ints_(39,1,134,153,141,1,7)); -Init_itm(508, Bry_.ints_(39,47,1,134,219,169,134,141,1,147,137,189,5)); -Init_itm(509, Bry_.ints_(39,47,1,134,219,169,134,141,1,137,137,189,5)); -Init_itm(510, Bry_.ints_(67,1,134,165,141,1,143,6)); -Init_itm(511, Bry_.ints_(67,1,134,165,141,1,7)); -Init_itm(512, Bry_.ints_(39,1,134,185,1,143,5)); -Init_itm(513, Bry_.ints_(39,1,134,185,1,6)); -Init_itm(514, Bry_.ints_(39,1,134,189,1,143,5)); -Init_itm(515, Bry_.ints_(39,1,134,189,1,6)); -Init_itm(516, Bry_.ints_(47,1,134,185,1,143,5)); -Init_itm(517, Bry_.ints_(47,1,134,185,1,6)); -Init_itm(518, Bry_.ints_(47,1,134,189,1,143,5)); -Init_itm(519, Bry_.ints_(47,1,134,189,1,6)); -Init_itm(520, Bry_.ints_(55,1,134,185,1,143,5)); -Init_itm(521, Bry_.ints_(55,1,134,185,1,6)); -Init_itm(522, Bry_.ints_(55,1,134,189,1,143,5)); -Init_itm(523, Bry_.ints_(55,1,134,189,1,6)); -Init_itm(524, Bry_.ints_(67,1,134,185,1,143,5)); -Init_itm(525, Bry_.ints_(67,1,134,185,1,6)); -Init_itm(526, Bry_.ints_(67,1,134,189,1,143,5)); -Init_itm(527, Bry_.ints_(67,1,134,189,1,6)); -Init_itm(528, Bry_.ints_(73,1,134,185,1,143,5)); -Init_itm(529, Bry_.ints_(73,1,134,185,1,6)); -Init_itm(530, Bry_.ints_(73,1,134,189,1,143,5)); -Init_itm(531, Bry_.ints_(73,1,134,189,1,6)); -Init_itm(532, Bry_.ints_(79,1,134,185,1,143,5)); -Init_itm(533, Bry_.ints_(79,1,134,185,1,6)); -Init_itm(534, Bry_.ints_(79,1,134,189,1,143,5)); -Init_itm(535, Bry_.ints_(79,1,134,189,1,6)); -Init_itm(536, Bry_.ints_(75,1,134,203,1,143,5)); -Init_itm(537, Bry_.ints_(75,1,134,203,1,6)); -Init_itm(538, Bry_.ints_(77,1,134,203,1,143,5)); -Init_itm(539, Bry_.ints_(77,1,134,203,1,6)); -Init_itm(540, Bry_.ints_(88,72,1,5,1,143)); -Init_itm(541, Bry_.ints_(88,72,1,5,1,5)); -Init_itm(542, Bry_.ints_(53,1,134,151,1,143,5)); -Init_itm(543, Bry_.ints_(53,1,134,151,1,6)); -Init_itm(544, Bry_.ints_(66,74,1,5,1,143)); -Init_itm(545, Bry_.ints_(46,80,1,5,1,5)); -Init_itm(546, Bry_.ints_(68,96,1,5,1,143)); -Init_itm(547, Bry_.ints_(68,96,1,5,1,5)); -Init_itm(548, Bry_.ints_(90,72,1,5,1,143)); -Init_itm(549, Bry_.ints_(90,72,1,5,1,5)); -Init_itm(550, Bry_.ints_(39,1,134,163,1,143,5)); -Init_itm(551, Bry_.ints_(39,1,134,163,1,6)); -Init_itm(552, Bry_.ints_(47,1,134,167,1,143,5)); -Init_itm(553, Bry_.ints_(47,1,134,167,1,6)); -Init_itm(554, Bry_.ints_(67,1,134,157,171,1,143,6)); -Init_itm(555, Bry_.ints_(67,1,134,157,171,1,7)); -Init_itm(556, Bry_.ints_(67,1,134,161,171,1,143,6)); -Init_itm(557, Bry_.ints_(67,1,134,161,171,1,7)); -Init_itm(558, Bry_.ints_(67,1,134,163,1,143,5)); -Init_itm(559, Bry_.ints_(67,1,134,163,1,6)); -Init_itm(560, Bry_.ints_(67,1,134,163,171,1,143,6)); -Init_itm(561, Bry_.ints_(67,1,134,163,171,1,7)); -Init_itm(562, Bry_.ints_(87,1,134,171,1,143,5)); -Init_itm(563, Bry_.ints_(87,1,134,171,1,6)); -Init_itm(564, Bry_.ints_(62,86,1,5,1,5)); -Init_itm(565, Bry_.ints_(66,82,1,5,1,5)); -Init_itm(566, Bry_.ints_(78,78,1,5,1,5)); -Init_itm(567, Bry_.ints_(58,64,1,5,1,5)); -Init_itm(568, Bry_.ints_(45,41,1,6,1,137,137)); -Init_itm(569, Bry_.ints_(71,69,1,6,1,137,137)); -Init_itm(570, Bry_.ints_(40,66,1,5,1,143)); -Init_itm(571, Bry_.ints_(44,66,1,5,1,143)); -Init_itm(572, Bry_.ints_(44,66,1,5,1,5)); -Init_itm(573, Bry_.ints_(62,72,1,5,1,143)); -Init_itm(574, Bry_.ints_(78,68,1,5,1,143)); -Init_itm(575, Bry_.ints_(76,72,1,5,1,5)); -Init_itm(576, Bry_.ints_(90,78,1,5,1,5)); -Init_itm(577, Bry_.ints_(90,130,1,5,1,143)); -Init_itm(578, Bry_.ints_(90,130,1,5,1,5)); -Init_itm(579, Bry_.ints_(42,66,1,5,1,143)); -Init_itm(580, Bry_.ints_(80,72,1,5,1,143)); -Init_itm(581, Bry_.ints_(82,78,1,5,1,143)); -Init_itm(582, Bry_.ints_(48,66,1,5,1,143)); -Init_itm(583, Bry_.ints_(48,66,1,5,1,5)); -Init_itm(584, Bry_.ints_(58,68,1,5,1,143)); -Init_itm(585, Bry_.ints_(58,68,1,5,1,5)); -Init_itm(586, Bry_.ints_(72,70,1,5,1,143)); -Init_itm(587, Bry_.ints_(72,70,1,5,1,5)); -Init_itm(588, Bry_.ints_(74,70,1,5,1,143)); -Init_itm(589, Bry_.ints_(74,70,1,5,1,5)); -Init_itm(590, Bry_.ints_(88,66,1,5,1,143)); -Init_itm(591, Bry_.ints_(88,66,1,5,1,5)); -Init_itm(592, Bry_.ints_(40,74,1,5,1,5)); -Init_itm(593, Bry_.ints_(40,76,1,5,1,5)); -Init_itm(594, Bry_.ints_(40,80,1,5,1,5)); -Init_itm(595, Bry_.ints_(42,76,1,5,1,5)); -Init_itm(596, Bry_.ints_(68,74,1,5,1,5)); -Init_itm(597, Bry_.ints_(44,72,1,5,1,5)); -Init_itm(598, Bry_.ints_(46,72,1,5,1,5)); -Init_itm(599, Bry_.ints_(46,74,1,5,1,5)); -Init_itm(600, Bry_.ints_(48,84,1,5,1,5)); -Init_itm(601, Bry_.ints_(48,76,1,5,1,5)); -Init_itm(602, Bry_.ints_(48,86,1,5,1,5)); -Init_itm(603, Bry_.ints_(48,80,1,5,1,5)); -Init_itm(604, Bry_.ints_(48,88,1,5,1,5)); -Init_itm(605, Bry_.ints_(48,94,1,5,1,5)); -Init_itm(606, Bry_.ints_(48,96,1,5,1,5)); -Init_itm(607, Bry_.ints_(58,72,1,5,1,5)); -Init_itm(608, Bry_.ints_(52,72,1,5,1,5)); -Init_itm(609, Bry_.ints_(52,64,1,5,1,5)); -Init_itm(610, Bry_.ints_(52,66,1,5,1,5)); -Init_itm(611, Bry_.ints_(52,80,1,5,1,5)); -Init_itm(612, Bry_.ints_(48,100,1,5,1,5)); -Init_itm(613, Bry_.ints_(80,78,1,5,1,5)); -Init_itm(614, Bry_.ints_(54,68,1,5,1,5)); -Init_itm(615, Bry_.ints_(54,76,1,5,1,5)); -Init_itm(616, Bry_.ints_(56,72,1,5,1,5)); -Init_itm(617, Bry_.ints_(56,78,1,5,1,5)); -Init_itm(618, Bry_.ints_(56,66,1,5,1,5)); -Init_itm(619, Bry_.ints_(62,76,1,5,1,5)); -Init_itm(620, Bry_.ints_(62,78,1,5,1,5)); -Init_itm(621, Bry_.ints_(62,82,1,5,1,5)); -Init_itm(622, Bry_.ints_(62,90,1,5,1,5)); -Init_itm(623, Bry_.ints_(80,84,1,5,1,5)); -Init_itm(624, Bry_.ints_(80,90,1,5,1,5)); -Init_itm(625, Bry_.ints_(64,70,1,5,1,5)); -Init_itm(626, Bry_.ints_(66,72,1,5,1,5)); -Init_itm(627, Bry_.ints_(66,80,1,5,1,5)); -Init_itm(628, Bry_.ints_(66,64,1,5,1,5)); -Init_itm(629, Bry_.ints_(68,90,1,5,1,5)); -Init_itm(630, Bry_.ints_(68,68,1,5,1,5)); -Init_itm(631, Bry_.ints_(68,94,1,5,1,5)); -Init_itm(632, Bry_.ints_(70,82,1,5,1,5)); -Init_itm(633, Bry_.ints_(74,74,1,5,1,5)); -Init_itm(634, Bry_.ints_(74,78,1,5,1,5)); -Init_itm(635, Bry_.ints_(74,82,1,5,1,5)); -Init_itm(636, Bry_.ints_(74,86,1,5,1,5)); -Init_itm(637, Bry_.ints_(74,88,1,5,1,5)); -Init_itm(638, Bry_.ints_(74,90,1,5,1,5)); -Init_itm(639, Bry_.ints_(74,94,1,5,1,5)); -Init_itm(640, Bry_.ints_(74,64,1,5,1,5)); -Init_itm(641, Bry_.ints_(74,96,1,5,1,5)); -Init_itm(642, Bry_.ints_(76,70,1,5,1,5)); -Init_itm(643, Bry_.ints_(76,78,1,5,1,5)); -Init_itm(644, Bry_.ints_(58,74,1,5,1,5)); -Init_itm(645, Bry_.ints_(76,84,1,5,1,5)); -Init_itm(646, Bry_.ints_(76,88,1,5,1,5)); -Init_itm(647, Bry_.ints_(78,82,1,5,1,5)); -Init_itm(648, Bry_.ints_(78,76,1,5,1,5)); -Init_itm(649, Bry_.ints_(80,72,1,5,1,5)); -Init_itm(650, Bry_.ints_(80,92,1,5,1,5)); -Init_itm(651, Bry_.ints_(82,70,1,5,1,5)); -Init_itm(652, Bry_.ints_(82,78,1,5,1,5)); -Init_itm(653, Bry_.ints_(84,68,1,5,1,5)); -Init_itm(654, Bry_.ints_(62,96,1,5,1,5)); -Init_itm(655, Bry_.ints_(88,64,1,5,1,5)); -Init_itm(656, Bry_.ints_(90,74,1,5,1,5)); -Init_itm(657, Bry_.ints_(90,76,1,5,1,5)); -Init_itm(658, Bry_.ints_(90,84,1,5,1,5)); -Init_itm(659, Bry_.ints_(90,94,1,5,1,5)); -Init_itm(660, Bry_.ints_(90,128,1,5,1,5)); -Init_itm(661, Bry_.ints_(90,144,1,5,1,5)); -Init_itm(662, Bry_.ints_(90,160,1,5,1,5)); -Init_itm(663, Bry_.ints_(90,170,1,5,1,5)); -Init_itm(664, Bry_.ints_(90,172,1,5,1,5)); -Init_itm(665, Bry_.ints_(42,64,1,5,1,5)); -Init_itm(666, Bry_.ints_(48,98,1,5,1,5)); -Init_itm(667, Bry_.ints_(52,74,1,5,1,5)); -Init_itm(668, Bry_.ints_(54,64,1,5,1,5)); -Init_itm(669, Bry_.ints_(58,70,1,5,1,5)); -Init_itm(670, Bry_.ints_(60,78,1,5,1,5)); -Init_itm(671, Bry_.ints_(62,64,1,5,1,5)); -Init_itm(672, Bry_.ints_(72,68,1,5,1,5)); -Init_itm(673, Bry_.ints_(90,156,1,5,1,5)); -Init_itm(674, Bry_.ints_(90,158,1,5,1,5)); -Init_itm(675, Bry_.ints_(45,89,1,6,1,137,137)); -Init_itm(676, Bry_.ints_(45,90,84,1,6,1,137,137)); -Init_itm(677, Bry_.ints_(45,90,76,1,6,1,137,137)); -Init_itm(678, Bry_.ints_(77,75,1,6,1,137,137)); -Init_itm(679, Bry_.ints_(77,76,78,1,6,1,137,137)); -Init_itm(680, Bry_.ints_(77,44,72,1,6,1,137,137)); -Init_itm(681, Bry_.ints_(49,66,86,1,6,1,137,137)); -Init_itm(682, Bry_.ints_(61,75,1,6,1,137,137)); -Init_itm(683, Bry_.ints_(61,89,1,6,1,137,137)); -Init_itm(684, Bry_.ints_(90,174,1,5,1,5)); -Init_itm(685, Bry_.ints_(90,176,1,5,1,5)); -Init_itm(686, Bry_.ints_(80,80,1,5,1,5)); -Init_itm(687, Bry_.ints_(80,82,1,5,1,5)); -Init_itm(688, Bry_.ints_(53,1,5,1,167)); -Init_itm(689, Bry_.ints_(54,68,1,5,1,167)); -Init_itm(690, Bry_.ints_(57,1,5,1,167)); -Init_itm(691, Bry_.ints_(73,1,5,1,167)); -Init_itm(692, Bry_.ints_(74,74,1,5,1,167)); -Init_itm(693, Bry_.ints_(74,82,1,5,1,167)); -Init_itm(694, Bry_.ints_(74,96,1,5,1,167)); -Init_itm(695, Bry_.ints_(83,1,5,1,167)); -Init_itm(696, Bry_.ints_(87,1,5,1,167)); -Init_itm(697, Bry_.ints_(13,26,1,5,1,5)); -Init_itm(698, Bry_.ints_(13,29,1,5,1,5)); -Init_itm(699, Bry_.ints_(54,78,1,5,1,5)); -Init_itm(700, Bry_.ints_(90,134,1,5,1,5)); -Init_itm(701, Bry_.ints_(54,80,1,5,1,5)); -Init_itm(702, Bry_.ints_(90,138,1,5,1,5)); -Init_itm(703, Bry_.ints_(90,146,1,5,1,5)); -Init_itm(704, Bry_.ints_(90,132,1,5,1,5)); -Init_itm(705, Bry_.ints_(90,148,1,5,1,5)); -Init_itm(706, Bry_.ints_(13,31,4,1,5,1,5)); -Init_itm(707, Bry_.ints_(13,31,12,1,5,1,5)); -Init_itm(708, Bry_.ints_(13,31,20,1,5,1,5)); -Init_itm(709, Bry_.ints_(13,31,28,1,5,1,5)); -Init_itm(710, Bry_.ints_(13,32,1,5,1,5)); -Init_itm(711, Bry_.ints_(13,34,1,5,1,5)); -Init_itm(712, Bry_.ints_(13,36,1,5,1,5)); -Init_itm(713, Bry_.ints_(13,38,1,5,1,5)); -Init_itm(714, Bry_.ints_(13,40,1,5,1,5)); -Init_itm(715, Bry_.ints_(13,42,1,5,1,5)); -Init_itm(716, Bry_.ints_(13,44,1,5,1,5)); -Init_itm(717, Bry_.ints_(13,46,1,5,1,5)); -Init_itm(718, Bry_.ints_(13,48,1,5,1,5)); -Init_itm(719, Bry_.ints_(13,50,1,5,1,5)); -Init_itm(720, Bry_.ints_(14,11,1,5,1,5)); -Init_itm(721, Bry_.ints_(14,13,1,5,1,5)); -Init_itm(722, Bry_.ints_(13,52,4,1,5,1,5)); -Init_itm(723, Bry_.ints_(13,52,12,1,5,1,5)); -Init_itm(724, Bry_.ints_(13,52,20,1,5,1,5)); -Init_itm(725, Bry_.ints_(13,52,28,1,5,1,5)); -Init_itm(726, Bry_.ints_(13,52,36,1,5,1,5)); -Init_itm(727, Bry_.ints_(13,52,44,1,5,1,5)); -Init_itm(728, Bry_.ints_(13,19,4,1,5,1,5)); -Init_itm(729, Bry_.ints_(13,19,12,1,5,1,5)); -Init_itm(730, Bry_.ints_(13,22,4,1,5,1,5)); -Init_itm(731, Bry_.ints_(13,25,4,1,5,1,5)); -Init_itm(732, Bry_.ints_(13,14,4,1,5,1,5)); -Init_itm(733, Bry_.ints_(13,22,12,1,5,1,5)); -Init_itm(734, Bry_.ints_(13,52,52,1,5,1,5)); -Init_itm(735, Bry_.ints_(13,52,60,1,5,1,5)); -Init_itm(736, Bry_.ints_(52,80,1,5,1,167)); -Init_itm(737, Bry_.ints_(61,1,5,1,167)); -Init_itm(738, Bry_.ints_(75,1,5,1,167)); -Init_itm(739, Bry_.ints_(85,1,5,1,167)); -Init_itm(740, Bry_.ints_(90,144,1,5,1,167)); -Init_itm(741, Bry_.ints_(13,52,68,1,5,1,5)); -Init_itm(742, Bry_.ints_(13,52,76,1,5,1,5)); -Init_itm(743, Bry_.ints_(13,52,84,1,5,1,5)); -Init_itm(744, Bry_.ints_(13,52,92,1,5,1,5)); -Init_itm(745, Bry_.ints_(13,52,100,1,5,1,5)); -Init_itm(746, Bry_.ints_(13,52,108,1,5,1,5)); -Init_itm(747, Bry_.ints_(13,52,116,1,5,1,5)); -Init_itm(748, Bry_.ints_(13,53,1,5,1,5)); -Init_itm(749, Bry_.ints_(13,55,4,1,5,1,5)); -Init_itm(750, Bry_.ints_(90,136,1,5,1,5)); -Init_itm(751, Bry_.ints_(13,55,12,1,5,1,5)); -Init_itm(752, Bry_.ints_(13,55,20,1,5,1,5)); -Init_itm(753, Bry_.ints_(13,55,28,1,5,1,5)); -Init_itm(754, Bry_.ints_(13,55,36,1,5,1,5)); -Init_itm(755, Bry_.ints_(13,55,44,1,5,1,5)); -Init_itm(756, Bry_.ints_(13,55,52,1,5,1,5)); -Init_itm(757, Bry_.ints_(13,55,60,1,5,1,5)); -Init_itm(758, Bry_.ints_(13,55,68,1,5,1,5)); -Init_itm(759, Bry_.ints_(13,55,76,1,5,1,5)); -Init_itm(760, Bry_.ints_(13,55,84,1,5,1,5)); -Init_itm(761, Bry_.ints_(13,55,92,1,5,1,5)); -Init_itm(762, Bry_.ints_(13,55,100,1,5,1,5)); -Init_itm(763, Bry_.ints_(13,55,108,1,5,1,5)); -Init_itm(764, Bry_.ints_(13,55,116,1,5,1,5)); -Init_itm(765, Bry_.ints_(13,55,124,1,5,1,5)); -Init_itm(766, Bry_.ints_(13,55,132,1,5,1,5)); -Init_itm(767, Bry_.ints_(13,55,140,1,5,1,5)); -Init_itm(768, Bry_.ints_(1,143,1,5)); -Init_itm(769, Bry_.ints_(1,141,1,5)); -Init_itm(770, Bry_.ints_(1,147,1,5)); -Init_itm(771, Bry_.ints_(1,161,1,5)); -Init_itm(772, Bry_.ints_(1,171,1,5)); -Init_itm(773, Bry_.ints_(1,181,1,5)); -Init_itm(774, Bry_.ints_(1,145,1,5)); -Init_itm(775, Bry_.ints_(1,163,1,5)); -Init_itm(776, Bry_.ints_(1,157,1,5)); -Init_itm(777, Bry_.ints_(1,183,1,5)); -Init_itm(778, Bry_.ints_(1,153,1,5)); -Init_itm(779, Bry_.ints_(1,159,1,5)); -Init_itm(780, Bry_.ints_(1,151,1,5)); -Init_itm(781, Bry_.ints_(1,173,1,5)); -Init_itm(782, Bry_.ints_(1,173,1,5)); -Init_itm(783, Bry_.ints_(1,185,1,5)); -Init_itm(784, Bry_.ints_(1,187,1,5)); -Init_itm(785, Bry_.ints_(1,189,1,5)); -Init_itm(786, Bry_.ints_(1,173,1,5)); -Init_itm(787, Bry_.ints_(1,137,1,5)); -Init_itm(788, Bry_.ints_(1,139,1,5)); -Init_itm(789, Bry_.ints_(1,173,1,5)); -Init_itm(790, Bry_.ints_(1,175,1,5)); -Init_itm(791, Bry_.ints_(1,175,1,5)); -Init_itm(792, Bry_.ints_(1,175,1,5)); -Init_itm(793, Bry_.ints_(1,175,1,5)); -Init_itm(794, Bry_.ints_(1,173,1,5)); -Init_itm(795, Bry_.ints_(1,191,1,5)); -Init_itm(796, Bry_.ints_(1,175,1,5)); -Init_itm(797, Bry_.ints_(1,175,1,5)); -Init_itm(798, Bry_.ints_(1,175,1,5)); -Init_itm(799, Bry_.ints_(1,175,1,5)); -Init_itm(800, Bry_.ints_(1,175,1,5)); -Init_itm(801, Bry_.ints_(1,193,1,5)); -Init_itm(802, Bry_.ints_(1,195,1,5)); -Init_itm(803, Bry_.ints_(1,197,1,5)); -Init_itm(804, Bry_.ints_(1,199,1,5)); -Init_itm(805, Bry_.ints_(1,201,1,5)); -Init_itm(806, Bry_.ints_(1,203,1,5)); -Init_itm(807, Bry_.ints_(1,167,1,5)); -Init_itm(808, Bry_.ints_(1,169,1,5)); -Init_itm(809, Bry_.ints_(1,175,1,5)); -Init_itm(810, Bry_.ints_(1,175,1,5)); -Init_itm(811, Bry_.ints_(1,175,1,5)); -Init_itm(812, Bry_.ints_(1,175,1,5)); -Init_itm(813, Bry_.ints_(1,205,1,5)); -Init_itm(814, Bry_.ints_(1,207,1,5)); -Init_itm(815, Bry_.ints_(1,175,1,5)); -Init_itm(816, Bry_.ints_(1,208,13,1,5)); -Init_itm(817, Bry_.ints_(1,208,29,1,5)); -Init_itm(818, Bry_.ints_(1,135,1,5)); -Init_itm(819, Bry_.ints_(1,175,1,5)); -Init_itm(820, Bry_.ints_(1,208,45,1,5)); -Init_itm(821, Bry_.ints_(1,208,61,1,5)); -Init_itm(822, Bry_.ints_(1,177,1,5)); -Init_itm(823, Bry_.ints_(1,177,1,5)); -Init_itm(824, Bry_.ints_(1,165,1,5)); -Init_itm(825, Bry_.ints_(1,208,77,1,5)); -Init_itm(826, Bry_.ints_(1,175,1,5)); -Init_itm(827, Bry_.ints_(1,175,1,5)); -Init_itm(828, Bry_.ints_(1,175,1,5)); -Init_itm(829, Bry_.ints_(1,173,1,5)); -Init_itm(830, Bry_.ints_(1,173,1,5)); -Init_itm(831, Bry_.ints_(1,173,1,5)); -Init_itm(832, Bry_.ints_(1,143,1,5)); -Init_itm(833, Bry_.ints_(1,141,1,5)); -Init_itm(834, Bry_.ints_(1,155,1,5)); -Init_itm(835, Bry_.ints_(1,137,1,5)); -Init_itm(836, Bry_.ints_(1,157,141,1,6)); -Init_itm(837, Bry_.ints_(1,208,93,1,5)); -Init_itm(838, Bry_.ints_(1,173,1,5)); -Init_itm(839, Bry_.ints_(1,175,1,5)); -Init_itm(840, Bry_.ints_(1,175,1,5)); -Init_itm(841, Bry_.ints_(1,175,1,5)); -Init_itm(842, Bry_.ints_(1,173,1,5)); -Init_itm(843, Bry_.ints_(1,173,1,5)); -Init_itm(844, Bry_.ints_(1,173,1,5)); -Init_itm(845, Bry_.ints_(1,175,1,5)); -Init_itm(846, Bry_.ints_(1,175,1,5)); -Init_itm(847, Bry_.ints_(1,1)); -Init_itm(848, Bry_.ints_(1,173,1,5)); -Init_itm(849, Bry_.ints_(1,173,1,5)); -Init_itm(850, Bry_.ints_(1,173,1,5)); -Init_itm(851, Bry_.ints_(1,175,1,5)); -Init_itm(852, Bry_.ints_(1,175,1,5)); -Init_itm(853, Bry_.ints_(1,175,1,5)); -Init_itm(854, Bry_.ints_(1,175,1,5)); -Init_itm(855, Bry_.ints_(1,173,1,5)); -Init_itm(856, Bry_.ints_(1,208,109,1,5)); -Init_itm(857, Bry_.ints_(1,175,1,5)); -Init_itm(858, Bry_.ints_(1,175,1,5)); -Init_itm(859, Bry_.ints_(1,173,1,5)); -Init_itm(860, Bry_.ints_(1,175,1,5)); -Init_itm(861, Bry_.ints_(1,173,1,5)); -Init_itm(862, Bry_.ints_(1,173,1,5)); -Init_itm(863, Bry_.ints_(1,175,1,5)); -Init_itm(864, Bry_.ints_(1,208,125,1,5)); -Init_itm(865, Bry_.ints_(1,208,141,1,5)); -Init_itm(866, Bry_.ints_(1,175,1,5)); -Init_itm(867, Bry_.ints_(39,1,5,1,137)); -Init_itm(868, Bry_.ints_(47,1,5,1,137)); -Init_itm(869, Bry_.ints_(55,1,5,1,137)); -Init_itm(870, Bry_.ints_(67,1,5,1,137)); -Init_itm(871, Bry_.ints_(79,1,5,1,137)); -Init_itm(872, Bry_.ints_(43,1,5,1,137)); -Init_itm(873, Bry_.ints_(45,1,5,1,137)); -Init_itm(874, Bry_.ints_(53,1,5,1,137)); -Init_itm(875, Bry_.ints_(63,1,5,1,137)); -Init_itm(876, Bry_.ints_(73,1,5,1,137)); -Init_itm(877, Bry_.ints_(77,1,5,1,137)); -Init_itm(878, Bry_.ints_(81,1,5,1,137)); -Init_itm(879, Bry_.ints_(85,1,5,1,137)); -Init_itm(880, Bry_.ints_(91,30,1,5,1,143)); -Init_itm(881, Bry_.ints_(91,30,1,5,1,5)); -Init_itm(882, Bry_.ints_(91,94,1,5,1,143)); -Init_itm(883, Bry_.ints_(91,94,1,5,1,5)); -Init_itm(884, Bry_.ints_(13,26,1,5,1,5)); -Init_itm(885, Bry_.ints_(13,28,4,1,5,1,5)); -Init_itm(886, Bry_.ints_(91,24,1,5,1,143)); -Init_itm(887, Bry_.ints_(91,24,1,5,1,5)); -Init_itm(888, Bry_.ints_(226,232,177,228,1,5,1,5)); -Init_itm(889, Bry_.ints_(226,232,178,4,1,5,1,5)); -Init_itm(890, Bry_.ints_(91,36,1,5,1,137)); -Init_itm(891, Bry_.ints_(91,74,1,5,1,5)); -Init_itm(892, Bry_.ints_(91,72,1,5,1,5)); -Init_itm(893, Bry_.ints_(91,76,1,5,1,5)); -Init_itm(894, Bry_.ints_(8,88,1,5,1,5)); -Init_itm(895, Bry_.ints_(226,232,178,172,1,5,1,5)); -Init_itm(896, Bry_.ints_(226,232,178,200,1,5,1,5)); -Init_itm(897, Bry_.ints_(226,232,178,228,1,5,1,5)); -Init_itm(898, Bry_.ints_(226,232,179,4,1,5,1,5)); -Init_itm(899, Bry_.ints_(226,232,179,32,1,5,1,5)); -Init_itm(900, Bry_.ints_(13,12,1,5,1,5)); -Init_itm(901, Bry_.ints_(13,20,1,134,141,1,6)); -Init_itm(902, Bry_.ints_(91,10,1,134,141,1,143,5)); -Init_itm(903, Bry_.ints_(10,78,1,5,1,5)); -Init_itm(904, Bry_.ints_(91,20,1,134,141,1,143,5)); -Init_itm(905, Bry_.ints_(91,32,1,134,141,1,143,5)); -Init_itm(906, Bry_.ints_(91,36,1,134,141,1,143,5)); -Init_itm(907, Bry_.ints_(226,232,180,4,1,5,1,5)); -Init_itm(908, Bry_.ints_(91,52,1,134,141,1,143,5)); -Init_itm(909, Bry_.ints_(226,232,180,60,1,5,1,5)); -Init_itm(910, Bry_.ints_(91,80,1,134,141,1,143,5)); -Init_itm(911, Bry_.ints_(91,90,1,134,141,1,143,5)); -Init_itm(912, Bry_.ints_(91,36,1,134,157,141,1,7)); -Init_itm(913, Bry_.ints_(91,10,1,5,1,143)); -Init_itm(914, Bry_.ints_(91,12,1,5,1,143)); -Init_itm(915, Bry_.ints_(91,14,1,5,1,143)); -Init_itm(916, Bry_.ints_(91,18,1,5,1,143)); -Init_itm(917, Bry_.ints_(91,20,1,5,1,143)); -Init_itm(918, Bry_.ints_(91,28,1,5,1,143)); -Init_itm(919, Bry_.ints_(91,32,1,5,1,143)); -Init_itm(920, Bry_.ints_(91,34,1,5,1,143)); -Init_itm(921, Bry_.ints_(91,36,1,5,1,143)); -Init_itm(922, Bry_.ints_(91,40,1,5,1,143)); -Init_itm(923, Bry_.ints_(91,42,1,5,1,143)); -Init_itm(924, Bry_.ints_(91,46,1,5,1,143)); -Init_itm(925, Bry_.ints_(91,48,1,5,1,143)); -Init_itm(926, Bry_.ints_(91,50,1,5,1,143)); -Init_itm(927, Bry_.ints_(91,52,1,5,1,143)); -Init_itm(928, Bry_.ints_(91,54,1,5,1,143)); -Init_itm(929, Bry_.ints_(91,64,1,5,1,143)); -Init_itm(930, Bry_.ints_(226,232,182,144,1,5,1,5)); -Init_itm(931, Bry_.ints_(91,70,1,5,1,143)); -Init_itm(932, Bry_.ints_(91,78,1,5,1,143)); -Init_itm(933, Bry_.ints_(91,80,1,5,1,143)); -Init_itm(934, Bry_.ints_(91,82,1,5,1,143)); -Init_itm(935, Bry_.ints_(91,84,1,5,1,143)); -Init_itm(936, Bry_.ints_(91,86,1,5,1,143)); -Init_itm(937, Bry_.ints_(91,90,1,5,1,143)); -Init_itm(938, Bry_.ints_(91,36,1,134,157,1,143,5)); -Init_itm(939, Bry_.ints_(91,80,1,134,157,1,143,5)); -Init_itm(940, Bry_.ints_(91,10,1,134,141,1,6)); -Init_itm(941, Bry_.ints_(91,20,1,134,141,1,6)); -Init_itm(942, Bry_.ints_(91,32,1,134,141,1,6)); -Init_itm(943, Bry_.ints_(91,36,1,134,141,1,6)); -Init_itm(944, Bry_.ints_(91,80,1,134,157,141,1,7)); -Init_itm(945, Bry_.ints_(91,10,1,5,1,5)); -Init_itm(946, Bry_.ints_(91,12,1,5,1,5)); -Init_itm(947, Bry_.ints_(91,14,1,5,1,5)); -Init_itm(948, Bry_.ints_(91,18,1,5,1,5)); -Init_itm(949, Bry_.ints_(91,20,1,5,1,5)); -Init_itm(950, Bry_.ints_(91,28,1,5,1,5)); -Init_itm(951, Bry_.ints_(91,32,1,5,1,5)); -Init_itm(952, Bry_.ints_(91,34,1,5,1,5)); -Init_itm(953, Bry_.ints_(91,36,1,5,1,5)); -Init_itm(954, Bry_.ints_(91,40,1,5,1,5)); -Init_itm(955, Bry_.ints_(91,42,1,5,1,5)); -Init_itm(956, Bry_.ints_(91,46,1,5,1,5)); -Init_itm(957, Bry_.ints_(91,48,1,5,1,5)); -Init_itm(958, Bry_.ints_(91,50,1,5,1,5)); -Init_itm(959, Bry_.ints_(91,52,1,5,1,5)); -Init_itm(960, Bry_.ints_(91,54,1,5,1,5)); -Init_itm(961, Bry_.ints_(91,64,1,5,1,5)); -Init_itm(962, Bry_.ints_(91,70,1,5,1,177)); -Init_itm(963, Bry_.ints_(91,70,1,5,1,5)); -Init_itm(964, Bry_.ints_(91,78,1,5,1,5)); -Init_itm(965, Bry_.ints_(91,80,1,5,1,5)); -Init_itm(966, Bry_.ints_(91,82,1,5,1,5)); -Init_itm(967, Bry_.ints_(91,84,1,5,1,5)); -Init_itm(968, Bry_.ints_(91,86,1,5,1,5)); -Init_itm(969, Bry_.ints_(91,90,1,5,1,5)); -Init_itm(970, Bry_.ints_(91,36,1,134,157,1,6)); -Init_itm(971, Bry_.ints_(91,80,1,134,157,1,6)); -Init_itm(972, Bry_.ints_(91,52,1,134,141,1,6)); -Init_itm(973, Bry_.ints_(91,80,1,134,141,1,6)); -Init_itm(974, Bry_.ints_(91,90,1,134,141,1,6)); -Init_itm(975, Bry_.ints_(91,40,10,36,1,7,1,147,137,189)); -Init_itm(976, Bry_.ints_(91,12,1,5,1,137)); -Init_itm(977, Bry_.ints_(91,34,1,5,1,137)); -Init_itm(978, Bry_.ints_(91,80,1,5,1,147)); -Init_itm(979, Bry_.ints_(91,80,1,134,141,1,147,5)); -Init_itm(980, Bry_.ints_(91,80,1,134,157,1,147,5)); -Init_itm(981, Bry_.ints_(91,82,1,5,1,137)); -Init_itm(982, Bry_.ints_(91,54,1,5,1,137)); -Init_itm(983, Bry_.ints_(91,40,10,36,1,7,1,137,137,189)); -Init_itm(984, Bry_.ints_(91,62,1,5,1,143)); -Init_itm(985, Bry_.ints_(91,62,1,5,1,5)); -Init_itm(986, Bry_.ints_(91,26,1,5,1,143)); -Init_itm(987, Bry_.ints_(91,26,1,5,1,5)); -Init_itm(988, Bry_.ints_(91,22,1,5,1,143)); -Init_itm(989, Bry_.ints_(91,22,1,5,1,5)); -Init_itm(990, Bry_.ints_(91,60,1,5,1,143)); -Init_itm(991, Bry_.ints_(91,60,1,5,1,5)); -Init_itm(992, Bry_.ints_(91,92,1,5,1,143)); -Init_itm(993, Bry_.ints_(91,92,1,5,1,5)); -Init_itm(994, Bry_.ints_(91,98,252,1,5,1,143)); -Init_itm(995, Bry_.ints_(91,98,252,1,5,1,5)); -Init_itm(996, Bry_.ints_(91,99,42,1,5,1,143)); -Init_itm(997, Bry_.ints_(91,99,42,1,5,1,5)); -Init_itm(998, Bry_.ints_(91,99,50,1,5,1,143)); -Init_itm(999, Bry_.ints_(91,99,50,1,5,1,5)); -Init_itm(1000, Bry_.ints_(91,99,74,1,5,1,143)); -Init_itm(1001, Bry_.ints_(91,99,74,1,5,1,5)); -Init_itm(1002, Bry_.ints_(91,99,130,1,5,1,143)); -Init_itm(1003, Bry_.ints_(91,99,130,1,5,1,5)); -Init_itm(1004, Bry_.ints_(91,99,154,1,5,1,143)); -Init_itm(1005, Bry_.ints_(91,99,154,1,5,1,5)); -Init_itm(1006, Bry_.ints_(91,99,186,1,5,1,143)); -Init_itm(1007, Bry_.ints_(91,99,186,1,5,1,5)); -Init_itm(1008, Bry_.ints_(91,40,1,5,1,137)); -Init_itm(1009, Bry_.ints_(91,64,1,5,1,137)); -Init_itm(1010, Bry_.ints_(91,70,1,5,1,137)); -Init_itm(1011, Bry_.ints_(91,38,1,5,1,5)); -Init_itm(1012, Bry_.ints_(91,34,1,5,1,147)); -Init_itm(1013, Bry_.ints_(91,20,1,5,1,137)); -Init_itm(1014, Bry_.ints_(13,94,100,1,5,1,5)); -Init_itm(1015, Bry_.ints_(91,96,1,5,1,143)); -Init_itm(1016, Bry_.ints_(91,96,1,5,1,5)); -Init_itm(1017, Bry_.ints_(91,70,1,5,1,147)); -Init_itm(1018, Bry_.ints_(91,58,1,5,1,143)); -Init_itm(1019, Bry_.ints_(91,58,1,5,1,5)); -Init_itm(1020, Bry_.ints_(91,68,1,5,1,5)); -Init_itm(1021, Bry_.ints_(91,74,1,5,1,143)); -Init_itm(1022, Bry_.ints_(91,72,1,5,1,143)); -Init_itm(1023, Bry_.ints_(91,76,1,5,1,143)); -Init_itm(1024, Bry_.ints_(92,52,1,134,143,1,143,5)); +Init_itm(1, Bry_.new_ints(1,1)); +Init_itm(2, Bry_.new_ints(1,1)); +Init_itm(3, Bry_.new_ints(1,1)); +Init_itm(4, Bry_.new_ints(1,1)); +Init_itm(5, Bry_.new_ints(1,1)); +Init_itm(6, Bry_.new_ints(1,1)); +Init_itm(7, Bry_.new_ints(1,1)); +Init_itm(8, Bry_.new_ints(1,1)); +Init_itm(9, Bry_.new_ints(3,64,1,5,1,5)); +Init_itm(10, Bry_.new_ints(3,66,1,5,1,5)); +Init_itm(11, Bry_.new_ints(3,68,1,5,1,5)); +Init_itm(12, Bry_.new_ints(3,70,1,5,1,5)); +Init_itm(13, Bry_.new_ints(3,72,1,5,1,5)); +Init_itm(14, Bry_.new_ints(1,1)); +Init_itm(15, Bry_.new_ints(1,1)); +Init_itm(16, Bry_.new_ints(1,1)); +Init_itm(17, Bry_.new_ints(1,1)); +Init_itm(18, Bry_.new_ints(1,1)); +Init_itm(19, Bry_.new_ints(1,1)); +Init_itm(20, Bry_.new_ints(1,1)); +Init_itm(21, Bry_.new_ints(1,1)); +Init_itm(22, Bry_.new_ints(1,1)); +Init_itm(23, Bry_.new_ints(1,1)); +Init_itm(24, Bry_.new_ints(1,1)); +Init_itm(25, Bry_.new_ints(1,1)); +Init_itm(26, Bry_.new_ints(1,1)); +Init_itm(27, Bry_.new_ints(1,1)); +Init_itm(28, Bry_.new_ints(1,1)); +Init_itm(29, Bry_.new_ints(1,1)); +Init_itm(30, Bry_.new_ints(1,1)); +Init_itm(31, Bry_.new_ints(1,1)); +Init_itm(32, Bry_.new_ints(4,1,5,1,5)); +Init_itm(33, Bry_.new_ints(8,129,1,5,1,5)); +Init_itm(34, Bry_.new_ints(10,161,1,5,1,5)); +Init_itm(35, Bry_.new_ints(11,177,1,5,1,5)); +Init_itm(36, Bry_.new_ints(15,14,1,5,1,5)); +Init_itm(37, Bry_.new_ints(11,179,1,5,1,5)); +Init_itm(38, Bry_.new_ints(11,173,1,5,1,5)); +Init_itm(39, Bry_.new_ints(10,147,1,5,1,5)); +Init_itm(40, Bry_.new_ints(10,181,1,5,1,5)); +Init_itm(41, Bry_.new_ints(10,183,1,5,1,5)); +Init_itm(42, Bry_.new_ints(11,159,1,5,1,5)); +Init_itm(43, Bry_.new_ints(13,95,1,5,1,5)); +Init_itm(44, Bry_.new_ints(7,1,5,1,5)); +Init_itm(45, Bry_.new_ints(6,70,1,5,1,5)); +Init_itm(46, Bry_.new_ints(9,1,5,1,5)); +Init_itm(47, Bry_.new_ints(11,169,1,5,1,5)); +Init_itm(48, Bry_.new_ints(18,1,5,1,5)); +Init_itm(49, Bry_.new_ints(20,1,5,1,5)); +Init_itm(50, Bry_.new_ints(22,1,5,1,5)); +Init_itm(51, Bry_.new_ints(24,1,5,1,5)); +Init_itm(52, Bry_.new_ints(26,1,5,1,5)); +Init_itm(53, Bry_.new_ints(28,1,5,1,5)); +Init_itm(54, Bry_.new_ints(30,1,5,1,5)); +Init_itm(55, Bry_.new_ints(32,1,5,1,5)); +Init_itm(56, Bry_.new_ints(34,1,5,1,5)); +Init_itm(57, Bry_.new_ints(36,1,5,1,5)); +Init_itm(58, Bry_.new_ints(8,97,1,5,1,5)); +Init_itm(59, Bry_.new_ints(8,88,1,5,1,5)); +Init_itm(60, Bry_.new_ints(13,103,1,5,1,5)); +Init_itm(61, Bry_.new_ints(13,105,1,5,1,5)); +Init_itm(62, Bry_.new_ints(13,107,1,5,1,5)); +Init_itm(63, Bry_.new_ints(8,136,1,5,1,5)); +Init_itm(64, Bry_.new_ints(11,157,1,5,1,5)); +Init_itm(65, Bry_.new_ints(39,1,5,1,143)); +Init_itm(66, Bry_.new_ints(41,1,5,1,143)); +Init_itm(67, Bry_.new_ints(43,1,5,1,143)); +Init_itm(68, Bry_.new_ints(45,1,5,1,143)); +Init_itm(69, Bry_.new_ints(47,1,5,1,143)); +Init_itm(70, Bry_.new_ints(49,1,5,1,143)); +Init_itm(71, Bry_.new_ints(51,1,5,1,143)); +Init_itm(72, Bry_.new_ints(53,1,5,1,143)); +Init_itm(73, Bry_.new_ints(55,1,5,1,143)); +Init_itm(74, Bry_.new_ints(57,1,5,1,143)); +Init_itm(75, Bry_.new_ints(59,1,5,1,143)); +Init_itm(76, Bry_.new_ints(61,1,5,1,143)); +Init_itm(77, Bry_.new_ints(63,1,5,1,143)); +Init_itm(78, Bry_.new_ints(65,1,5,1,143)); +Init_itm(79, Bry_.new_ints(67,1,5,1,143)); +Init_itm(80, Bry_.new_ints(69,1,5,1,143)); +Init_itm(81, Bry_.new_ints(71,1,5,1,143)); +Init_itm(82, Bry_.new_ints(73,1,5,1,143)); +Init_itm(83, Bry_.new_ints(75,1,5,1,143)); +Init_itm(84, Bry_.new_ints(77,1,5,1,143)); +Init_itm(85, Bry_.new_ints(79,1,5,1,143)); +Init_itm(86, Bry_.new_ints(81,1,5,1,143)); +Init_itm(87, Bry_.new_ints(83,1,5,1,143)); +Init_itm(88, Bry_.new_ints(85,1,5,1,143)); +Init_itm(89, Bry_.new_ints(87,1,5,1,143)); +Init_itm(90, Bry_.new_ints(89,1,5,1,143)); +Init_itm(91, Bry_.new_ints(10,185,1,5,1,5)); +Init_itm(92, Bry_.new_ints(11,171,1,5,1,5)); +Init_itm(93, Bry_.new_ints(10,187,1,5,1,5)); +Init_itm(94, Bry_.new_ints(13,15,1,5,1,5)); +Init_itm(95, Bry_.new_ints(6,66,1,5,1,5)); +Init_itm(96, Bry_.new_ints(13,10,1,5,1,5)); +Init_itm(97, Bry_.new_ints(39,1,5,1,5)); +Init_itm(98, Bry_.new_ints(41,1,5,1,5)); +Init_itm(99, Bry_.new_ints(43,1,5,1,5)); +Init_itm(100, Bry_.new_ints(45,1,5,1,5)); +Init_itm(101, Bry_.new_ints(47,1,5,1,5)); +Init_itm(102, Bry_.new_ints(49,1,5,1,5)); +Init_itm(103, Bry_.new_ints(51,1,5,1,5)); +Init_itm(104, Bry_.new_ints(53,1,5,1,5)); +Init_itm(105, Bry_.new_ints(55,1,5,1,5)); +Init_itm(106, Bry_.new_ints(57,1,5,1,5)); +Init_itm(107, Bry_.new_ints(59,1,5,1,5)); +Init_itm(108, Bry_.new_ints(61,1,5,1,5)); +Init_itm(109, Bry_.new_ints(63,1,5,1,5)); +Init_itm(110, Bry_.new_ints(65,1,5,1,5)); +Init_itm(111, Bry_.new_ints(67,1,5,1,5)); +Init_itm(112, Bry_.new_ints(69,1,5,1,5)); +Init_itm(113, Bry_.new_ints(71,1,5,1,5)); +Init_itm(114, Bry_.new_ints(73,1,5,1,5)); +Init_itm(115, Bry_.new_ints(75,1,5,1,5)); +Init_itm(116, Bry_.new_ints(77,1,5,1,5)); +Init_itm(117, Bry_.new_ints(79,1,5,1,5)); +Init_itm(118, Bry_.new_ints(81,1,5,1,5)); +Init_itm(119, Bry_.new_ints(83,1,5,1,5)); +Init_itm(120, Bry_.new_ints(85,1,5,1,5)); +Init_itm(121, Bry_.new_ints(87,1,5,1,5)); +Init_itm(122, Bry_.new_ints(89,1,5,1,5)); +Init_itm(123, Bry_.new_ints(10,189,1,5,1,5)); +Init_itm(124, Bry_.new_ints(13,111,1,5,1,5)); +Init_itm(125, Bry_.new_ints(10,191,1,5,1,5)); +Init_itm(126, Bry_.new_ints(13,115,1,5,1,5)); +Init_itm(127, Bry_.new_ints(1,1)); +Init_itm(128, Bry_.new_ints(1,1)); +Init_itm(129, Bry_.new_ints(1,1)); +Init_itm(130, Bry_.new_ints(1,1)); +Init_itm(131, Bry_.new_ints(1,1)); +Init_itm(132, Bry_.new_ints(1,1)); +Init_itm(133, Bry_.new_ints(3,74,1,5,1,5)); +Init_itm(134, Bry_.new_ints(1,1)); +Init_itm(135, Bry_.new_ints(1,1)); +Init_itm(136, Bry_.new_ints(1,1)); +Init_itm(137, Bry_.new_ints(1,1)); +Init_itm(138, Bry_.new_ints(1,1)); +Init_itm(139, Bry_.new_ints(1,1)); +Init_itm(140, Bry_.new_ints(1,1)); +Init_itm(141, Bry_.new_ints(1,1)); +Init_itm(142, Bry_.new_ints(1,1)); +Init_itm(143, Bry_.new_ints(1,1)); +Init_itm(144, Bry_.new_ints(1,1)); +Init_itm(145, Bry_.new_ints(1,1)); +Init_itm(146, Bry_.new_ints(1,1)); +Init_itm(147, Bry_.new_ints(1,1)); +Init_itm(148, Bry_.new_ints(1,1)); +Init_itm(149, Bry_.new_ints(1,1)); +Init_itm(150, Bry_.new_ints(1,1)); +Init_itm(151, Bry_.new_ints(1,1)); +Init_itm(152, Bry_.new_ints(1,1)); +Init_itm(153, Bry_.new_ints(1,1)); +Init_itm(154, Bry_.new_ints(1,1)); +Init_itm(155, Bry_.new_ints(1,1)); +Init_itm(156, Bry_.new_ints(1,1)); +Init_itm(157, Bry_.new_ints(1,1)); +Init_itm(158, Bry_.new_ints(1,1)); +Init_itm(159, Bry_.new_ints(1,1)); +Init_itm(160, Bry_.new_ints(4,1,5,1,181)); +Init_itm(161, Bry_.new_ints(8,131,1,5,1,5)); +Init_itm(162, Bry_.new_ints(15,12,1,5,1,5)); +Init_itm(163, Bry_.new_ints(15,16,1,5,1,5)); +Init_itm(164, Bry_.new_ints(15,10,1,5,1,5)); +Init_itm(165, Bry_.new_ints(15,18,1,5,1,5)); +Init_itm(166, Bry_.new_ints(13,113,1,5,1,5)); +Init_itm(167, Bry_.new_ints(11,149,1,5,1,5)); +Init_itm(168, Bry_.new_ints(13,20,1,5,1,5)); +Init_itm(169, Bry_.new_ints(13,86,1,5,1,5)); +Init_itm(170, Bry_.new_ints(39,1,5,1,167)); +Init_itm(171, Bry_.new_ints(10,177,1,5,1,5)); +Init_itm(172, Bry_.new_ints(13,109,1,5,1,5)); +Init_itm(173, Bry_.new_ints(1,1)); +Init_itm(174, Bry_.new_ints(13,88,1,5,1,5)); +Init_itm(175, Bry_.new_ints(13,17,1,5,1,5)); +Init_itm(176, Bry_.new_ints(13,79,1,5,1,5)); +Init_itm(177, Bry_.new_ints(13,97,1,5,1,5)); +Init_itm(178, Bry_.new_ints(22,1,5,1,167)); +Init_itm(179, Bry_.new_ints(24,1,5,1,167)); +Init_itm(180, Bry_.new_ints(13,12,1,5,1,5)); +Init_itm(181, Bry_.new_ints(91,46,1,5,1,137)); +Init_itm(182, Bry_.new_ints(11,153,1,5,1,5)); +Init_itm(183, Bry_.new_ints(10,78,1,5,1,5)); +Init_itm(184, Bry_.new_ints(13,23,1,5,1,5)); +Init_itm(185, Bry_.new_ints(20,1,5,1,167)); +Init_itm(186, Bry_.new_ints(67,1,5,1,167)); +Init_itm(187, Bry_.new_ints(10,179,1,5,1,5)); +Init_itm(188, Bry_.new_ints(20,13,117,44,26,1,7,1,187,187,189)); +Init_itm(189, Bry_.new_ints(20,13,117,44,22,1,7,1,187,187,189)); +Init_itm(190, Bry_.new_ints(24,13,117,44,26,1,7,1,187,187,189)); +Init_itm(191, Bry_.new_ints(8,138,1,5,1,5)); +Init_itm(192, Bry_.new_ints(39,1,134,143,1,143,5)); +Init_itm(193, Bry_.new_ints(39,1,134,141,1,143,5)); +Init_itm(194, Bry_.new_ints(39,1,134,147,1,143,5)); +Init_itm(195, Bry_.new_ints(39,1,134,161,1,143,5)); +Init_itm(196, Bry_.new_ints(39,1,134,157,1,143,5)); +Init_itm(197, Bry_.new_ints(39,1,134,153,1,143,5)); +Init_itm(198, Bry_.new_ints(39,47,1,134,219,169,5,1,147,137,189)); +Init_itm(199, Bry_.new_ints(43,1,134,167,1,143,5)); +Init_itm(200, Bry_.new_ints(47,1,134,143,1,143,5)); +Init_itm(201, Bry_.new_ints(47,1,134,141,1,143,5)); +Init_itm(202, Bry_.new_ints(47,1,134,147,1,143,5)); +Init_itm(203, Bry_.new_ints(47,1,134,157,1,143,5)); +Init_itm(204, Bry_.new_ints(55,1,134,143,1,143,5)); +Init_itm(205, Bry_.new_ints(55,1,134,141,1,143,5)); +Init_itm(206, Bry_.new_ints(55,1,134,147,1,143,5)); +Init_itm(207, Bry_.new_ints(55,1,134,157,1,143,5)); +Init_itm(208, Bry_.new_ints(45,1,134,219,169,1,147,137)); +Init_itm(209, Bry_.new_ints(65,1,134,161,1,143,5)); +Init_itm(210, Bry_.new_ints(67,1,134,143,1,143,5)); +Init_itm(211, Bry_.new_ints(67,1,134,141,1,143,5)); +Init_itm(212, Bry_.new_ints(67,1,134,147,1,143,5)); +Init_itm(213, Bry_.new_ints(67,1,134,161,1,143,5)); +Init_itm(214, Bry_.new_ints(67,1,134,157,1,143,5)); +Init_itm(215, Bry_.new_ints(13,101,1,5,1,5)); +Init_itm(216, Bry_.new_ints(67,1,134,165,1,143,5)); +Init_itm(217, Bry_.new_ints(79,1,134,143,1,143,5)); +Init_itm(218, Bry_.new_ints(79,1,134,141,1,143,5)); +Init_itm(219, Bry_.new_ints(79,1,134,147,1,143,5)); +Init_itm(220, Bry_.new_ints(79,1,134,157,1,143,5)); +Init_itm(221, Bry_.new_ints(87,1,134,141,1,143,5)); +Init_itm(222, Bry_.new_ints(90,96,1,5,1,143)); +Init_itm(223, Bry_.new_ints(75,75,1,134,219,169,5,1,137,137,189)); +Init_itm(224, Bry_.new_ints(39,1,134,143,1,6)); +Init_itm(225, Bry_.new_ints(39,1,134,141,1,6)); +Init_itm(226, Bry_.new_ints(39,1,134,147,1,6)); +Init_itm(227, Bry_.new_ints(39,1,134,161,1,6)); +Init_itm(228, Bry_.new_ints(39,1,134,157,1,6)); +Init_itm(229, Bry_.new_ints(39,1,134,153,1,6)); +Init_itm(230, Bry_.new_ints(39,47,1,134,219,169,5,1,137,137,189)); +Init_itm(231, Bry_.new_ints(43,1,134,167,1,6)); +Init_itm(232, Bry_.new_ints(47,1,134,143,1,6)); +Init_itm(233, Bry_.new_ints(47,1,134,141,1,6)); +Init_itm(234, Bry_.new_ints(47,1,134,147,1,6)); +Init_itm(235, Bry_.new_ints(47,1,134,157,1,6)); +Init_itm(236, Bry_.new_ints(55,1,134,143,1,6)); +Init_itm(237, Bry_.new_ints(55,1,134,141,1,6)); +Init_itm(238, Bry_.new_ints(55,1,134,147,1,6)); +Init_itm(239, Bry_.new_ints(55,1,134,157,1,6)); +Init_itm(240, Bry_.new_ints(45,1,134,219,169,1,137,137)); +Init_itm(241, Bry_.new_ints(65,1,134,161,1,6)); +Init_itm(242, Bry_.new_ints(67,1,134,143,1,6)); +Init_itm(243, Bry_.new_ints(67,1,134,141,1,6)); +Init_itm(244, Bry_.new_ints(67,1,134,147,1,6)); +Init_itm(245, Bry_.new_ints(67,1,134,161,1,6)); +Init_itm(246, Bry_.new_ints(67,1,134,157,1,6)); +Init_itm(247, Bry_.new_ints(13,99,1,5,1,5)); +Init_itm(248, Bry_.new_ints(67,1,134,165,1,6)); +Init_itm(249, Bry_.new_ints(79,1,134,143,1,6)); +Init_itm(250, Bry_.new_ints(79,1,134,141,1,6)); +Init_itm(251, Bry_.new_ints(79,1,134,147,1,6)); +Init_itm(252, Bry_.new_ints(79,1,134,157,1,6)); +Init_itm(253, Bry_.new_ints(87,1,134,141,1,6)); +Init_itm(254, Bry_.new_ints(90,96,1,5,1,5)); +Init_itm(255, Bry_.new_ints(87,1,134,157,1,6)); +Init_itm(256, Bry_.new_ints(39,1,134,171,1,143,5)); +Init_itm(257, Bry_.new_ints(39,1,134,171,1,6)); +Init_itm(258, Bry_.new_ints(39,1,134,145,1,143,5)); +Init_itm(259, Bry_.new_ints(39,1,134,145,1,6)); +Init_itm(260, Bry_.new_ints(39,1,134,169,1,143,5)); +Init_itm(261, Bry_.new_ints(39,1,134,169,1,6)); +Init_itm(262, Bry_.new_ints(43,1,134,141,1,143,5)); +Init_itm(263, Bry_.new_ints(43,1,134,141,1,6)); +Init_itm(264, Bry_.new_ints(43,1,134,147,1,143,5)); +Init_itm(265, Bry_.new_ints(43,1,134,147,1,6)); +Init_itm(266, Bry_.new_ints(43,1,134,163,1,143,5)); +Init_itm(267, Bry_.new_ints(43,1,134,163,1,6)); +Init_itm(268, Bry_.new_ints(43,1,134,151,1,143,5)); +Init_itm(269, Bry_.new_ints(43,1,134,151,1,6)); +Init_itm(270, Bry_.new_ints(45,1,134,151,1,143,5)); +Init_itm(271, Bry_.new_ints(45,1,134,151,1,6)); +Init_itm(272, Bry_.new_ints(45,1,134,208,61,1,143,5)); +Init_itm(273, Bry_.new_ints(45,1,134,208,61,1,6)); +Init_itm(274, Bry_.new_ints(47,1,134,171,1,143,5)); +Init_itm(275, Bry_.new_ints(47,1,134,171,1,6)); +Init_itm(276, Bry_.new_ints(47,1,134,145,1,143,5)); +Init_itm(277, Bry_.new_ints(47,1,134,145,1,6)); +Init_itm(278, Bry_.new_ints(47,1,134,163,1,143,5)); +Init_itm(279, Bry_.new_ints(47,1,134,163,1,6)); +Init_itm(280, Bry_.new_ints(47,1,134,169,1,143,5)); +Init_itm(281, Bry_.new_ints(47,1,134,169,1,6)); +Init_itm(282, Bry_.new_ints(47,1,134,151,1,143,5)); +Init_itm(283, Bry_.new_ints(47,1,134,151,1,6)); +Init_itm(284, Bry_.new_ints(51,1,134,147,1,143,5)); +Init_itm(285, Bry_.new_ints(51,1,134,147,1,6)); +Init_itm(286, Bry_.new_ints(51,1,134,145,1,143,5)); +Init_itm(287, Bry_.new_ints(51,1,134,145,1,6)); +Init_itm(288, Bry_.new_ints(51,1,134,163,1,143,5)); +Init_itm(289, Bry_.new_ints(51,1,134,163,1,6)); +Init_itm(290, Bry_.new_ints(51,1,134,167,1,143,5)); +Init_itm(291, Bry_.new_ints(51,1,134,167,1,6)); +Init_itm(292, Bry_.new_ints(53,1,134,147,1,143,5)); +Init_itm(293, Bry_.new_ints(53,1,134,147,1,6)); +Init_itm(294, Bry_.new_ints(53,1,134,208,61,1,143,5)); +Init_itm(295, Bry_.new_ints(53,1,134,208,61,1,6)); +Init_itm(296, Bry_.new_ints(55,1,134,161,1,143,5)); +Init_itm(297, Bry_.new_ints(55,1,134,161,1,6)); +Init_itm(298, Bry_.new_ints(55,1,134,171,1,143,5)); +Init_itm(299, Bry_.new_ints(55,1,134,171,1,6)); +Init_itm(300, Bry_.new_ints(55,1,134,145,1,143,5)); +Init_itm(301, Bry_.new_ints(55,1,134,145,1,6)); +Init_itm(302, Bry_.new_ints(55,1,134,169,1,143,5)); +Init_itm(303, Bry_.new_ints(55,1,134,169,1,6)); +Init_itm(304, Bry_.new_ints(55,1,134,163,1,143,5)); +Init_itm(305, Bry_.new_ints(56,64,1,5,1,5)); +Init_itm(306, Bry_.new_ints(55,57,1,6,1,147,147)); +Init_itm(307, Bry_.new_ints(55,57,1,6,1,137,137)); +Init_itm(308, Bry_.new_ints(57,1,134,147,1,143,5)); +Init_itm(309, Bry_.new_ints(57,1,134,147,1,6)); +Init_itm(310, Bry_.new_ints(59,1,134,167,1,143,5)); +Init_itm(311, Bry_.new_ints(59,1,134,167,1,6)); +Init_itm(312, Bry_.new_ints(72,72,1,5,1,5)); +Init_itm(313, Bry_.new_ints(61,1,134,141,1,143,5)); +Init_itm(314, Bry_.new_ints(61,1,134,141,1,6)); +Init_itm(315, Bry_.new_ints(61,1,134,167,1,143,5)); +Init_itm(316, Bry_.new_ints(61,1,134,167,1,6)); +Init_itm(317, Bry_.new_ints(61,1,134,151,1,143,5)); +Init_itm(318, Bry_.new_ints(61,1,134,151,1,6)); +Init_itm(319, Bry_.new_ints(61,1,134,219,169,1,143,5)); +Init_itm(320, Bry_.new_ints(61,1,134,219,169,1,6)); +Init_itm(321, Bry_.new_ints(61,1,134,208,61,1,143,5)); +Init_itm(322, Bry_.new_ints(61,1,134,208,61,1,6)); +Init_itm(323, Bry_.new_ints(65,1,134,141,1,143,5)); +Init_itm(324, Bry_.new_ints(65,1,134,141,1,6)); +Init_itm(325, Bry_.new_ints(65,1,134,167,1,143,5)); +Init_itm(326, Bry_.new_ints(65,1,134,167,1,6)); +Init_itm(327, Bry_.new_ints(65,1,134,151,1,143,5)); +Init_itm(328, Bry_.new_ints(65,1,134,151,1,6)); +Init_itm(329, Bry_.new_ints(90,134,65,1,6,1,137,137)); +Init_itm(330, Bry_.new_ints(66,86,1,5,1,143)); +Init_itm(331, Bry_.new_ints(66,86,1,5,1,5)); +Init_itm(332, Bry_.new_ints(67,1,134,171,1,143,5)); +Init_itm(333, Bry_.new_ints(67,1,134,171,1,6)); +Init_itm(334, Bry_.new_ints(67,1,134,145,1,143,5)); +Init_itm(335, Bry_.new_ints(67,1,134,145,1,6)); +Init_itm(336, Bry_.new_ints(67,1,134,159,1,143,5)); +Init_itm(337, Bry_.new_ints(67,1,134,159,1,6)); +Init_itm(338, Bry_.new_ints(67,47,1,134,219,169,5,1,147,137,189)); +Init_itm(339, Bry_.new_ints(67,47,1,134,219,169,5,1,137,137,189)); +Init_itm(340, Bry_.new_ints(73,1,134,141,1,143,5)); +Init_itm(341, Bry_.new_ints(73,1,134,141,1,6)); +Init_itm(342, Bry_.new_ints(73,1,134,167,1,143,5)); +Init_itm(343, Bry_.new_ints(73,1,134,167,1,6)); +Init_itm(344, Bry_.new_ints(73,1,134,151,1,143,5)); +Init_itm(345, Bry_.new_ints(73,1,134,151,1,6)); +Init_itm(346, Bry_.new_ints(75,1,134,141,1,143,5)); +Init_itm(347, Bry_.new_ints(75,1,134,141,1,6)); +Init_itm(348, Bry_.new_ints(75,1,134,147,1,143,5)); +Init_itm(349, Bry_.new_ints(75,1,134,147,1,6)); +Init_itm(350, Bry_.new_ints(75,1,134,167,1,143,5)); +Init_itm(351, Bry_.new_ints(75,1,134,167,1,6)); +Init_itm(352, Bry_.new_ints(75,1,134,151,1,143,5)); +Init_itm(353, Bry_.new_ints(75,1,134,151,1,6)); +Init_itm(354, Bry_.new_ints(77,1,134,167,1,143,5)); +Init_itm(355, Bry_.new_ints(77,1,134,167,1,6)); +Init_itm(356, Bry_.new_ints(77,1,134,151,1,143,5)); +Init_itm(357, Bry_.new_ints(77,1,134,151,1,6)); +Init_itm(358, Bry_.new_ints(78,66,1,5,1,143)); +Init_itm(359, Bry_.new_ints(78,66,1,5,1,5)); +Init_itm(360, Bry_.new_ints(79,1,134,161,1,143,5)); +Init_itm(361, Bry_.new_ints(79,1,134,161,1,6)); +Init_itm(362, Bry_.new_ints(79,1,134,171,1,143,5)); +Init_itm(363, Bry_.new_ints(79,1,134,171,1,6)); +Init_itm(364, Bry_.new_ints(79,1,134,145,1,143,5)); +Init_itm(365, Bry_.new_ints(79,1,134,145,1,6)); +Init_itm(366, Bry_.new_ints(79,1,134,153,1,143,5)); +Init_itm(367, Bry_.new_ints(79,1,134,153,1,6)); +Init_itm(368, Bry_.new_ints(79,1,134,159,1,143,5)); +Init_itm(369, Bry_.new_ints(79,1,134,159,1,6)); +Init_itm(370, Bry_.new_ints(79,1,134,169,1,143,5)); +Init_itm(371, Bry_.new_ints(79,1,134,169,1,6)); +Init_itm(372, Bry_.new_ints(83,1,134,147,1,143,5)); +Init_itm(373, Bry_.new_ints(83,1,134,147,1,6)); +Init_itm(374, Bry_.new_ints(87,1,134,147,1,143,5)); +Init_itm(375, Bry_.new_ints(87,1,134,147,1,6)); +Init_itm(376, Bry_.new_ints(87,1,134,157,1,143,5)); +Init_itm(377, Bry_.new_ints(89,1,134,141,1,143,5)); +Init_itm(378, Bry_.new_ints(89,1,134,141,1,6)); +Init_itm(379, Bry_.new_ints(89,1,134,163,1,143,5)); +Init_itm(380, Bry_.new_ints(89,1,134,163,1,6)); +Init_itm(381, Bry_.new_ints(89,1,134,151,1,143,5)); +Init_itm(382, Bry_.new_ints(89,1,134,151,1,6)); +Init_itm(383, Bry_.new_ints(75,1,134,219,185,1,137,137)); +Init_itm(384, Bry_.new_ints(42,66,1,5,1,5)); +Init_itm(385, Bry_.new_ints(42,76,1,5,1,143)); +Init_itm(386, Bry_.new_ints(42,78,1,5,1,143)); +Init_itm(387, Bry_.new_ints(42,78,1,5,1,5)); +Init_itm(388, Bry_.new_ints(90,126,1,5,1,143)); +Init_itm(389, Bry_.new_ints(90,126,1,5,1,5)); +Init_itm(390, Bry_.new_ints(68,74,1,5,1,143)); +Init_itm(391, Bry_.new_ints(44,70,1,5,1,143)); +Init_itm(392, Bry_.new_ints(44,70,1,5,1,5)); +Init_itm(393, Bry_.new_ints(46,72,1,5,1,143)); +Init_itm(394, Bry_.new_ints(46,74,1,5,1,143)); +Init_itm(395, Bry_.new_ints(46,78,1,5,1,143)); +Init_itm(396, Bry_.new_ints(46,78,1,5,1,5)); +Init_itm(397, Bry_.new_ints(89,83,1,6,1,137,137)); +Init_itm(398, Bry_.new_ints(48,72,1,5,1,143)); +Init_itm(399, Bry_.new_ints(48,76,1,5,1,143)); +Init_itm(400, Bry_.new_ints(48,80,1,5,1,143)); +Init_itm(401, Bry_.new_ints(50,70,1,5,1,143)); +Init_itm(402, Bry_.new_ints(50,70,1,5,1,5)); +Init_itm(403, Bry_.new_ints(52,72,1,5,1,143)); +Init_itm(404, Bry_.new_ints(52,80,1,5,1,143)); +Init_itm(405, Bry_.new_ints(54,66,1,5,1,5)); +Init_itm(406, Bry_.new_ints(56,78,1,5,1,143)); +Init_itm(407, Bry_.new_ints(56,72,1,5,1,143)); +Init_itm(408, Bry_.new_ints(60,68,1,5,1,143)); +Init_itm(409, Bry_.new_ints(60,68,1,5,1,5)); +Init_itm(410, Bry_.new_ints(62,72,1,5,1,5)); +Init_itm(411, Bry_.new_ints(62,94,1,5,1,5)); +Init_itm(412, Bry_.new_ints(80,84,1,5,1,143)); +Init_itm(413, Bry_.new_ints(66,72,1,5,1,143)); +Init_itm(414, Bry_.new_ints(66,74,1,5,1,5)); +Init_itm(415, Bry_.new_ints(68,90,1,5,1,143)); +Init_itm(416, Bry_.new_ints(67,1,134,191,1,143,5)); +Init_itm(417, Bry_.new_ints(67,1,134,191,1,6)); +Init_itm(418, Bry_.new_ints(52,82,1,5,1,143)); +Init_itm(419, Bry_.new_ints(52,82,1,5,1,5)); +Init_itm(420, Bry_.new_ints(70,74,1,5,1,143)); +Init_itm(421, Bry_.new_ints(70,74,1,5,1,5)); +Init_itm(422, Bry_.new_ints(74,64,1,5,1,143)); +Init_itm(423, Bry_.new_ints(90,122,1,5,1,143)); +Init_itm(424, Bry_.new_ints(90,122,1,5,1,5)); +Init_itm(425, Bry_.new_ints(76,78,1,5,1,143)); +Init_itm(426, Bry_.new_ints(76,82,1,5,1,5)); +Init_itm(427, Bry_.new_ints(78,72,1,5,1,5)); +Init_itm(428, Bry_.new_ints(78,74,1,5,1,143)); +Init_itm(429, Bry_.new_ints(78,74,1,5,1,5)); +Init_itm(430, Bry_.new_ints(78,76,1,5,1,143)); +Init_itm(431, Bry_.new_ints(79,1,134,191,1,143,5)); +Init_itm(432, Bry_.new_ints(79,1,134,191,1,6)); +Init_itm(433, Bry_.new_ints(80,92,1,5,1,143)); +Init_itm(434, Bry_.new_ints(82,70,1,5,1,143)); +Init_itm(435, Bry_.new_ints(88,68,1,5,1,143)); +Init_itm(436, Bry_.new_ints(88,68,1,5,1,5)); +Init_itm(437, Bry_.new_ints(90,66,1,5,1,143)); +Init_itm(438, Bry_.new_ints(90,66,1,5,1,5)); +Init_itm(439, Bry_.new_ints(90,84,1,5,1,143)); +Init_itm(440, Bry_.new_ints(90,88,1,5,1,143)); +Init_itm(441, Bry_.new_ints(90,88,1,5,1,5)); +Init_itm(442, Bry_.new_ints(90,92,1,5,1,5)); +Init_itm(443, Bry_.new_ints(90,114,1,5,1,5)); +Init_itm(444, Bry_.new_ints(90,124,1,5,1,143)); +Init_itm(445, Bry_.new_ints(90,124,1,5,1,5)); +Init_itm(446, Bry_.new_ints(77,75,1,6,1,137,137)); +Init_itm(447, Bry_.new_ints(90,102,1,5,1,5)); +Init_itm(448, Bry_.new_ints(90,162,1,5,1,5)); +Init_itm(449, Bry_.new_ints(90,164,1,5,1,5)); +Init_itm(450, Bry_.new_ints(90,166,1,5,1,5)); +Init_itm(451, Bry_.new_ints(90,168,1,5,1,5)); +Init_itm(452, Bry_.new_ints(45,89,1,133,151,1,147,147,189)); +Init_itm(453, Bry_.new_ints(45,89,1,133,151,1,147,137,189)); +Init_itm(454, Bry_.new_ints(45,89,1,133,151,1,137,137,189)); +Init_itm(455, Bry_.new_ints(61,57,1,6,1,147,147)); +Init_itm(456, Bry_.new_ints(61,57,1,6,1,147,137)); +Init_itm(457, Bry_.new_ints(61,57,1,6,1,137,137)); +Init_itm(458, Bry_.new_ints(65,57,1,6,1,147,147)); +Init_itm(459, Bry_.new_ints(65,57,1,6,1,147,137)); +Init_itm(460, Bry_.new_ints(65,57,1,6,1,137,137)); +Init_itm(461, Bry_.new_ints(39,1,134,151,1,143,5)); +Init_itm(462, Bry_.new_ints(39,1,134,151,1,6)); +Init_itm(463, Bry_.new_ints(55,1,134,151,1,143,5)); +Init_itm(464, Bry_.new_ints(55,1,134,151,1,6)); +Init_itm(465, Bry_.new_ints(67,1,134,151,1,143,5)); +Init_itm(466, Bry_.new_ints(67,1,134,151,1,6)); +Init_itm(467, Bry_.new_ints(79,1,134,151,1,143,5)); +Init_itm(468, Bry_.new_ints(79,1,134,151,1,6)); +Init_itm(469, Bry_.new_ints(79,1,134,157,171,1,143,6)); +Init_itm(470, Bry_.new_ints(79,1,134,157,171,1,7)); +Init_itm(471, Bry_.new_ints(79,1,134,157,141,1,143,6)); +Init_itm(472, Bry_.new_ints(79,1,134,157,141,1,7)); +Init_itm(473, Bry_.new_ints(79,1,134,157,151,1,143,6)); +Init_itm(474, Bry_.new_ints(79,1,134,157,151,1,7)); +Init_itm(475, Bry_.new_ints(79,1,134,157,143,1,143,6)); +Init_itm(476, Bry_.new_ints(79,1,134,157,143,1,7)); +Init_itm(477, Bry_.new_ints(48,72,1,5,1,5)); +Init_itm(478, Bry_.new_ints(39,1,134,157,171,1,143,6)); +Init_itm(479, Bry_.new_ints(39,1,134,157,171,1,7)); +Init_itm(480, Bry_.new_ints(39,1,134,163,171,1,143,6)); +Init_itm(481, Bry_.new_ints(39,1,134,163,171,1,7)); +Init_itm(482, Bry_.new_ints(39,47,1,134,219,169,134,171,1,147,137,189,5)); +Init_itm(483, Bry_.new_ints(39,47,1,134,219,169,134,171,1,137,137,189,5)); +Init_itm(484, Bry_.new_ints(52,68,1,5,1,143)); +Init_itm(485, Bry_.new_ints(52,68,1,5,1,5)); +Init_itm(486, Bry_.new_ints(51,1,134,151,1,143,5)); +Init_itm(487, Bry_.new_ints(51,1,134,151,1,6)); +Init_itm(488, Bry_.new_ints(59,1,134,151,1,143,5)); +Init_itm(489, Bry_.new_ints(59,1,134,151,1,6)); +Init_itm(490, Bry_.new_ints(67,1,134,169,1,143,5)); +Init_itm(491, Bry_.new_ints(67,1,134,169,1,6)); +Init_itm(492, Bry_.new_ints(67,1,134,169,171,1,143,6)); +Init_itm(493, Bry_.new_ints(67,1,134,169,171,1,7)); +Init_itm(494, Bry_.new_ints(90,84,1,134,151,1,143,5)); +Init_itm(495, Bry_.new_ints(90,84,1,134,151,1,6)); +Init_itm(496, Bry_.new_ints(57,1,134,151,1,6)); +Init_itm(497, Bry_.new_ints(45,89,1,6,1,147,147)); +Init_itm(498, Bry_.new_ints(45,89,1,6,1,147,137)); +Init_itm(499, Bry_.new_ints(45,89,1,6,1,137,137)); +Init_itm(500, Bry_.new_ints(51,1,134,141,1,143,5)); +Init_itm(501, Bry_.new_ints(51,1,134,141,1,6)); +Init_itm(502, Bry_.new_ints(54,66,1,5,1,143)); +Init_itm(503, Bry_.new_ints(90,102,1,5,1,143)); +Init_itm(504, Bry_.new_ints(65,1,134,143,1,143,5)); +Init_itm(505, Bry_.new_ints(65,1,134,143,1,6)); +Init_itm(506, Bry_.new_ints(39,1,134,153,141,1,143,6)); +Init_itm(507, Bry_.new_ints(39,1,134,153,141,1,7)); +Init_itm(508, Bry_.new_ints(39,47,1,134,219,169,134,141,1,147,137,189,5)); +Init_itm(509, Bry_.new_ints(39,47,1,134,219,169,134,141,1,137,137,189,5)); +Init_itm(510, Bry_.new_ints(67,1,134,165,141,1,143,6)); +Init_itm(511, Bry_.new_ints(67,1,134,165,141,1,7)); +Init_itm(512, Bry_.new_ints(39,1,134,185,1,143,5)); +Init_itm(513, Bry_.new_ints(39,1,134,185,1,6)); +Init_itm(514, Bry_.new_ints(39,1,134,189,1,143,5)); +Init_itm(515, Bry_.new_ints(39,1,134,189,1,6)); +Init_itm(516, Bry_.new_ints(47,1,134,185,1,143,5)); +Init_itm(517, Bry_.new_ints(47,1,134,185,1,6)); +Init_itm(518, Bry_.new_ints(47,1,134,189,1,143,5)); +Init_itm(519, Bry_.new_ints(47,1,134,189,1,6)); +Init_itm(520, Bry_.new_ints(55,1,134,185,1,143,5)); +Init_itm(521, Bry_.new_ints(55,1,134,185,1,6)); +Init_itm(522, Bry_.new_ints(55,1,134,189,1,143,5)); +Init_itm(523, Bry_.new_ints(55,1,134,189,1,6)); +Init_itm(524, Bry_.new_ints(67,1,134,185,1,143,5)); +Init_itm(525, Bry_.new_ints(67,1,134,185,1,6)); +Init_itm(526, Bry_.new_ints(67,1,134,189,1,143,5)); +Init_itm(527, Bry_.new_ints(67,1,134,189,1,6)); +Init_itm(528, Bry_.new_ints(73,1,134,185,1,143,5)); +Init_itm(529, Bry_.new_ints(73,1,134,185,1,6)); +Init_itm(530, Bry_.new_ints(73,1,134,189,1,143,5)); +Init_itm(531, Bry_.new_ints(73,1,134,189,1,6)); +Init_itm(532, Bry_.new_ints(79,1,134,185,1,143,5)); +Init_itm(533, Bry_.new_ints(79,1,134,185,1,6)); +Init_itm(534, Bry_.new_ints(79,1,134,189,1,143,5)); +Init_itm(535, Bry_.new_ints(79,1,134,189,1,6)); +Init_itm(536, Bry_.new_ints(75,1,134,203,1,143,5)); +Init_itm(537, Bry_.new_ints(75,1,134,203,1,6)); +Init_itm(538, Bry_.new_ints(77,1,134,203,1,143,5)); +Init_itm(539, Bry_.new_ints(77,1,134,203,1,6)); +Init_itm(540, Bry_.new_ints(88,72,1,5,1,143)); +Init_itm(541, Bry_.new_ints(88,72,1,5,1,5)); +Init_itm(542, Bry_.new_ints(53,1,134,151,1,143,5)); +Init_itm(543, Bry_.new_ints(53,1,134,151,1,6)); +Init_itm(544, Bry_.new_ints(66,74,1,5,1,143)); +Init_itm(545, Bry_.new_ints(46,80,1,5,1,5)); +Init_itm(546, Bry_.new_ints(68,96,1,5,1,143)); +Init_itm(547, Bry_.new_ints(68,96,1,5,1,5)); +Init_itm(548, Bry_.new_ints(90,72,1,5,1,143)); +Init_itm(549, Bry_.new_ints(90,72,1,5,1,5)); +Init_itm(550, Bry_.new_ints(39,1,134,163,1,143,5)); +Init_itm(551, Bry_.new_ints(39,1,134,163,1,6)); +Init_itm(552, Bry_.new_ints(47,1,134,167,1,143,5)); +Init_itm(553, Bry_.new_ints(47,1,134,167,1,6)); +Init_itm(554, Bry_.new_ints(67,1,134,157,171,1,143,6)); +Init_itm(555, Bry_.new_ints(67,1,134,157,171,1,7)); +Init_itm(556, Bry_.new_ints(67,1,134,161,171,1,143,6)); +Init_itm(557, Bry_.new_ints(67,1,134,161,171,1,7)); +Init_itm(558, Bry_.new_ints(67,1,134,163,1,143,5)); +Init_itm(559, Bry_.new_ints(67,1,134,163,1,6)); +Init_itm(560, Bry_.new_ints(67,1,134,163,171,1,143,6)); +Init_itm(561, Bry_.new_ints(67,1,134,163,171,1,7)); +Init_itm(562, Bry_.new_ints(87,1,134,171,1,143,5)); +Init_itm(563, Bry_.new_ints(87,1,134,171,1,6)); +Init_itm(564, Bry_.new_ints(62,86,1,5,1,5)); +Init_itm(565, Bry_.new_ints(66,82,1,5,1,5)); +Init_itm(566, Bry_.new_ints(78,78,1,5,1,5)); +Init_itm(567, Bry_.new_ints(58,64,1,5,1,5)); +Init_itm(568, Bry_.new_ints(45,41,1,6,1,137,137)); +Init_itm(569, Bry_.new_ints(71,69,1,6,1,137,137)); +Init_itm(570, Bry_.new_ints(40,66,1,5,1,143)); +Init_itm(571, Bry_.new_ints(44,66,1,5,1,143)); +Init_itm(572, Bry_.new_ints(44,66,1,5,1,5)); +Init_itm(573, Bry_.new_ints(62,72,1,5,1,143)); +Init_itm(574, Bry_.new_ints(78,68,1,5,1,143)); +Init_itm(575, Bry_.new_ints(76,72,1,5,1,5)); +Init_itm(576, Bry_.new_ints(90,78,1,5,1,5)); +Init_itm(577, Bry_.new_ints(90,130,1,5,1,143)); +Init_itm(578, Bry_.new_ints(90,130,1,5,1,5)); +Init_itm(579, Bry_.new_ints(42,66,1,5,1,143)); +Init_itm(580, Bry_.new_ints(80,72,1,5,1,143)); +Init_itm(581, Bry_.new_ints(82,78,1,5,1,143)); +Init_itm(582, Bry_.new_ints(48,66,1,5,1,143)); +Init_itm(583, Bry_.new_ints(48,66,1,5,1,5)); +Init_itm(584, Bry_.new_ints(58,68,1,5,1,143)); +Init_itm(585, Bry_.new_ints(58,68,1,5,1,5)); +Init_itm(586, Bry_.new_ints(72,70,1,5,1,143)); +Init_itm(587, Bry_.new_ints(72,70,1,5,1,5)); +Init_itm(588, Bry_.new_ints(74,70,1,5,1,143)); +Init_itm(589, Bry_.new_ints(74,70,1,5,1,5)); +Init_itm(590, Bry_.new_ints(88,66,1,5,1,143)); +Init_itm(591, Bry_.new_ints(88,66,1,5,1,5)); +Init_itm(592, Bry_.new_ints(40,74,1,5,1,5)); +Init_itm(593, Bry_.new_ints(40,76,1,5,1,5)); +Init_itm(594, Bry_.new_ints(40,80,1,5,1,5)); +Init_itm(595, Bry_.new_ints(42,76,1,5,1,5)); +Init_itm(596, Bry_.new_ints(68,74,1,5,1,5)); +Init_itm(597, Bry_.new_ints(44,72,1,5,1,5)); +Init_itm(598, Bry_.new_ints(46,72,1,5,1,5)); +Init_itm(599, Bry_.new_ints(46,74,1,5,1,5)); +Init_itm(600, Bry_.new_ints(48,84,1,5,1,5)); +Init_itm(601, Bry_.new_ints(48,76,1,5,1,5)); +Init_itm(602, Bry_.new_ints(48,86,1,5,1,5)); +Init_itm(603, Bry_.new_ints(48,80,1,5,1,5)); +Init_itm(604, Bry_.new_ints(48,88,1,5,1,5)); +Init_itm(605, Bry_.new_ints(48,94,1,5,1,5)); +Init_itm(606, Bry_.new_ints(48,96,1,5,1,5)); +Init_itm(607, Bry_.new_ints(58,72,1,5,1,5)); +Init_itm(608, Bry_.new_ints(52,72,1,5,1,5)); +Init_itm(609, Bry_.new_ints(52,64,1,5,1,5)); +Init_itm(610, Bry_.new_ints(52,66,1,5,1,5)); +Init_itm(611, Bry_.new_ints(52,80,1,5,1,5)); +Init_itm(612, Bry_.new_ints(48,100,1,5,1,5)); +Init_itm(613, Bry_.new_ints(80,78,1,5,1,5)); +Init_itm(614, Bry_.new_ints(54,68,1,5,1,5)); +Init_itm(615, Bry_.new_ints(54,76,1,5,1,5)); +Init_itm(616, Bry_.new_ints(56,72,1,5,1,5)); +Init_itm(617, Bry_.new_ints(56,78,1,5,1,5)); +Init_itm(618, Bry_.new_ints(56,66,1,5,1,5)); +Init_itm(619, Bry_.new_ints(62,76,1,5,1,5)); +Init_itm(620, Bry_.new_ints(62,78,1,5,1,5)); +Init_itm(621, Bry_.new_ints(62,82,1,5,1,5)); +Init_itm(622, Bry_.new_ints(62,90,1,5,1,5)); +Init_itm(623, Bry_.new_ints(80,84,1,5,1,5)); +Init_itm(624, Bry_.new_ints(80,90,1,5,1,5)); +Init_itm(625, Bry_.new_ints(64,70,1,5,1,5)); +Init_itm(626, Bry_.new_ints(66,72,1,5,1,5)); +Init_itm(627, Bry_.new_ints(66,80,1,5,1,5)); +Init_itm(628, Bry_.new_ints(66,64,1,5,1,5)); +Init_itm(629, Bry_.new_ints(68,90,1,5,1,5)); +Init_itm(630, Bry_.new_ints(68,68,1,5,1,5)); +Init_itm(631, Bry_.new_ints(68,94,1,5,1,5)); +Init_itm(632, Bry_.new_ints(70,82,1,5,1,5)); +Init_itm(633, Bry_.new_ints(74,74,1,5,1,5)); +Init_itm(634, Bry_.new_ints(74,78,1,5,1,5)); +Init_itm(635, Bry_.new_ints(74,82,1,5,1,5)); +Init_itm(636, Bry_.new_ints(74,86,1,5,1,5)); +Init_itm(637, Bry_.new_ints(74,88,1,5,1,5)); +Init_itm(638, Bry_.new_ints(74,90,1,5,1,5)); +Init_itm(639, Bry_.new_ints(74,94,1,5,1,5)); +Init_itm(640, Bry_.new_ints(74,64,1,5,1,5)); +Init_itm(641, Bry_.new_ints(74,96,1,5,1,5)); +Init_itm(642, Bry_.new_ints(76,70,1,5,1,5)); +Init_itm(643, Bry_.new_ints(76,78,1,5,1,5)); +Init_itm(644, Bry_.new_ints(58,74,1,5,1,5)); +Init_itm(645, Bry_.new_ints(76,84,1,5,1,5)); +Init_itm(646, Bry_.new_ints(76,88,1,5,1,5)); +Init_itm(647, Bry_.new_ints(78,82,1,5,1,5)); +Init_itm(648, Bry_.new_ints(78,76,1,5,1,5)); +Init_itm(649, Bry_.new_ints(80,72,1,5,1,5)); +Init_itm(650, Bry_.new_ints(80,92,1,5,1,5)); +Init_itm(651, Bry_.new_ints(82,70,1,5,1,5)); +Init_itm(652, Bry_.new_ints(82,78,1,5,1,5)); +Init_itm(653, Bry_.new_ints(84,68,1,5,1,5)); +Init_itm(654, Bry_.new_ints(62,96,1,5,1,5)); +Init_itm(655, Bry_.new_ints(88,64,1,5,1,5)); +Init_itm(656, Bry_.new_ints(90,74,1,5,1,5)); +Init_itm(657, Bry_.new_ints(90,76,1,5,1,5)); +Init_itm(658, Bry_.new_ints(90,84,1,5,1,5)); +Init_itm(659, Bry_.new_ints(90,94,1,5,1,5)); +Init_itm(660, Bry_.new_ints(90,128,1,5,1,5)); +Init_itm(661, Bry_.new_ints(90,144,1,5,1,5)); +Init_itm(662, Bry_.new_ints(90,160,1,5,1,5)); +Init_itm(663, Bry_.new_ints(90,170,1,5,1,5)); +Init_itm(664, Bry_.new_ints(90,172,1,5,1,5)); +Init_itm(665, Bry_.new_ints(42,64,1,5,1,5)); +Init_itm(666, Bry_.new_ints(48,98,1,5,1,5)); +Init_itm(667, Bry_.new_ints(52,74,1,5,1,5)); +Init_itm(668, Bry_.new_ints(54,64,1,5,1,5)); +Init_itm(669, Bry_.new_ints(58,70,1,5,1,5)); +Init_itm(670, Bry_.new_ints(60,78,1,5,1,5)); +Init_itm(671, Bry_.new_ints(62,64,1,5,1,5)); +Init_itm(672, Bry_.new_ints(72,68,1,5,1,5)); +Init_itm(673, Bry_.new_ints(90,156,1,5,1,5)); +Init_itm(674, Bry_.new_ints(90,158,1,5,1,5)); +Init_itm(675, Bry_.new_ints(45,89,1,6,1,137,137)); +Init_itm(676, Bry_.new_ints(45,90,84,1,6,1,137,137)); +Init_itm(677, Bry_.new_ints(45,90,76,1,6,1,137,137)); +Init_itm(678, Bry_.new_ints(77,75,1,6,1,137,137)); +Init_itm(679, Bry_.new_ints(77,76,78,1,6,1,137,137)); +Init_itm(680, Bry_.new_ints(77,44,72,1,6,1,137,137)); +Init_itm(681, Bry_.new_ints(49,66,86,1,6,1,137,137)); +Init_itm(682, Bry_.new_ints(61,75,1,6,1,137,137)); +Init_itm(683, Bry_.new_ints(61,89,1,6,1,137,137)); +Init_itm(684, Bry_.new_ints(90,174,1,5,1,5)); +Init_itm(685, Bry_.new_ints(90,176,1,5,1,5)); +Init_itm(686, Bry_.new_ints(80,80,1,5,1,5)); +Init_itm(687, Bry_.new_ints(80,82,1,5,1,5)); +Init_itm(688, Bry_.new_ints(53,1,5,1,167)); +Init_itm(689, Bry_.new_ints(54,68,1,5,1,167)); +Init_itm(690, Bry_.new_ints(57,1,5,1,167)); +Init_itm(691, Bry_.new_ints(73,1,5,1,167)); +Init_itm(692, Bry_.new_ints(74,74,1,5,1,167)); +Init_itm(693, Bry_.new_ints(74,82,1,5,1,167)); +Init_itm(694, Bry_.new_ints(74,96,1,5,1,167)); +Init_itm(695, Bry_.new_ints(83,1,5,1,167)); +Init_itm(696, Bry_.new_ints(87,1,5,1,167)); +Init_itm(697, Bry_.new_ints(13,26,1,5,1,5)); +Init_itm(698, Bry_.new_ints(13,29,1,5,1,5)); +Init_itm(699, Bry_.new_ints(54,78,1,5,1,5)); +Init_itm(700, Bry_.new_ints(90,134,1,5,1,5)); +Init_itm(701, Bry_.new_ints(54,80,1,5,1,5)); +Init_itm(702, Bry_.new_ints(90,138,1,5,1,5)); +Init_itm(703, Bry_.new_ints(90,146,1,5,1,5)); +Init_itm(704, Bry_.new_ints(90,132,1,5,1,5)); +Init_itm(705, Bry_.new_ints(90,148,1,5,1,5)); +Init_itm(706, Bry_.new_ints(13,31,4,1,5,1,5)); +Init_itm(707, Bry_.new_ints(13,31,12,1,5,1,5)); +Init_itm(708, Bry_.new_ints(13,31,20,1,5,1,5)); +Init_itm(709, Bry_.new_ints(13,31,28,1,5,1,5)); +Init_itm(710, Bry_.new_ints(13,32,1,5,1,5)); +Init_itm(711, Bry_.new_ints(13,34,1,5,1,5)); +Init_itm(712, Bry_.new_ints(13,36,1,5,1,5)); +Init_itm(713, Bry_.new_ints(13,38,1,5,1,5)); +Init_itm(714, Bry_.new_ints(13,40,1,5,1,5)); +Init_itm(715, Bry_.new_ints(13,42,1,5,1,5)); +Init_itm(716, Bry_.new_ints(13,44,1,5,1,5)); +Init_itm(717, Bry_.new_ints(13,46,1,5,1,5)); +Init_itm(718, Bry_.new_ints(13,48,1,5,1,5)); +Init_itm(719, Bry_.new_ints(13,50,1,5,1,5)); +Init_itm(720, Bry_.new_ints(14,11,1,5,1,5)); +Init_itm(721, Bry_.new_ints(14,13,1,5,1,5)); +Init_itm(722, Bry_.new_ints(13,52,4,1,5,1,5)); +Init_itm(723, Bry_.new_ints(13,52,12,1,5,1,5)); +Init_itm(724, Bry_.new_ints(13,52,20,1,5,1,5)); +Init_itm(725, Bry_.new_ints(13,52,28,1,5,1,5)); +Init_itm(726, Bry_.new_ints(13,52,36,1,5,1,5)); +Init_itm(727, Bry_.new_ints(13,52,44,1,5,1,5)); +Init_itm(728, Bry_.new_ints(13,19,4,1,5,1,5)); +Init_itm(729, Bry_.new_ints(13,19,12,1,5,1,5)); +Init_itm(730, Bry_.new_ints(13,22,4,1,5,1,5)); +Init_itm(731, Bry_.new_ints(13,25,4,1,5,1,5)); +Init_itm(732, Bry_.new_ints(13,14,4,1,5,1,5)); +Init_itm(733, Bry_.new_ints(13,22,12,1,5,1,5)); +Init_itm(734, Bry_.new_ints(13,52,52,1,5,1,5)); +Init_itm(735, Bry_.new_ints(13,52,60,1,5,1,5)); +Init_itm(736, Bry_.new_ints(52,80,1,5,1,167)); +Init_itm(737, Bry_.new_ints(61,1,5,1,167)); +Init_itm(738, Bry_.new_ints(75,1,5,1,167)); +Init_itm(739, Bry_.new_ints(85,1,5,1,167)); +Init_itm(740, Bry_.new_ints(90,144,1,5,1,167)); +Init_itm(741, Bry_.new_ints(13,52,68,1,5,1,5)); +Init_itm(742, Bry_.new_ints(13,52,76,1,5,1,5)); +Init_itm(743, Bry_.new_ints(13,52,84,1,5,1,5)); +Init_itm(744, Bry_.new_ints(13,52,92,1,5,1,5)); +Init_itm(745, Bry_.new_ints(13,52,100,1,5,1,5)); +Init_itm(746, Bry_.new_ints(13,52,108,1,5,1,5)); +Init_itm(747, Bry_.new_ints(13,52,116,1,5,1,5)); +Init_itm(748, Bry_.new_ints(13,53,1,5,1,5)); +Init_itm(749, Bry_.new_ints(13,55,4,1,5,1,5)); +Init_itm(750, Bry_.new_ints(90,136,1,5,1,5)); +Init_itm(751, Bry_.new_ints(13,55,12,1,5,1,5)); +Init_itm(752, Bry_.new_ints(13,55,20,1,5,1,5)); +Init_itm(753, Bry_.new_ints(13,55,28,1,5,1,5)); +Init_itm(754, Bry_.new_ints(13,55,36,1,5,1,5)); +Init_itm(755, Bry_.new_ints(13,55,44,1,5,1,5)); +Init_itm(756, Bry_.new_ints(13,55,52,1,5,1,5)); +Init_itm(757, Bry_.new_ints(13,55,60,1,5,1,5)); +Init_itm(758, Bry_.new_ints(13,55,68,1,5,1,5)); +Init_itm(759, Bry_.new_ints(13,55,76,1,5,1,5)); +Init_itm(760, Bry_.new_ints(13,55,84,1,5,1,5)); +Init_itm(761, Bry_.new_ints(13,55,92,1,5,1,5)); +Init_itm(762, Bry_.new_ints(13,55,100,1,5,1,5)); +Init_itm(763, Bry_.new_ints(13,55,108,1,5,1,5)); +Init_itm(764, Bry_.new_ints(13,55,116,1,5,1,5)); +Init_itm(765, Bry_.new_ints(13,55,124,1,5,1,5)); +Init_itm(766, Bry_.new_ints(13,55,132,1,5,1,5)); +Init_itm(767, Bry_.new_ints(13,55,140,1,5,1,5)); +Init_itm(768, Bry_.new_ints(1,143,1,5)); +Init_itm(769, Bry_.new_ints(1,141,1,5)); +Init_itm(770, Bry_.new_ints(1,147,1,5)); +Init_itm(771, Bry_.new_ints(1,161,1,5)); +Init_itm(772, Bry_.new_ints(1,171,1,5)); +Init_itm(773, Bry_.new_ints(1,181,1,5)); +Init_itm(774, Bry_.new_ints(1,145,1,5)); +Init_itm(775, Bry_.new_ints(1,163,1,5)); +Init_itm(776, Bry_.new_ints(1,157,1,5)); +Init_itm(777, Bry_.new_ints(1,183,1,5)); +Init_itm(778, Bry_.new_ints(1,153,1,5)); +Init_itm(779, Bry_.new_ints(1,159,1,5)); +Init_itm(780, Bry_.new_ints(1,151,1,5)); +Init_itm(781, Bry_.new_ints(1,173,1,5)); +Init_itm(782, Bry_.new_ints(1,173,1,5)); +Init_itm(783, Bry_.new_ints(1,185,1,5)); +Init_itm(784, Bry_.new_ints(1,187,1,5)); +Init_itm(785, Bry_.new_ints(1,189,1,5)); +Init_itm(786, Bry_.new_ints(1,173,1,5)); +Init_itm(787, Bry_.new_ints(1,137,1,5)); +Init_itm(788, Bry_.new_ints(1,139,1,5)); +Init_itm(789, Bry_.new_ints(1,173,1,5)); +Init_itm(790, Bry_.new_ints(1,175,1,5)); +Init_itm(791, Bry_.new_ints(1,175,1,5)); +Init_itm(792, Bry_.new_ints(1,175,1,5)); +Init_itm(793, Bry_.new_ints(1,175,1,5)); +Init_itm(794, Bry_.new_ints(1,173,1,5)); +Init_itm(795, Bry_.new_ints(1,191,1,5)); +Init_itm(796, Bry_.new_ints(1,175,1,5)); +Init_itm(797, Bry_.new_ints(1,175,1,5)); +Init_itm(798, Bry_.new_ints(1,175,1,5)); +Init_itm(799, Bry_.new_ints(1,175,1,5)); +Init_itm(800, Bry_.new_ints(1,175,1,5)); +Init_itm(801, Bry_.new_ints(1,193,1,5)); +Init_itm(802, Bry_.new_ints(1,195,1,5)); +Init_itm(803, Bry_.new_ints(1,197,1,5)); +Init_itm(804, Bry_.new_ints(1,199,1,5)); +Init_itm(805, Bry_.new_ints(1,201,1,5)); +Init_itm(806, Bry_.new_ints(1,203,1,5)); +Init_itm(807, Bry_.new_ints(1,167,1,5)); +Init_itm(808, Bry_.new_ints(1,169,1,5)); +Init_itm(809, Bry_.new_ints(1,175,1,5)); +Init_itm(810, Bry_.new_ints(1,175,1,5)); +Init_itm(811, Bry_.new_ints(1,175,1,5)); +Init_itm(812, Bry_.new_ints(1,175,1,5)); +Init_itm(813, Bry_.new_ints(1,205,1,5)); +Init_itm(814, Bry_.new_ints(1,207,1,5)); +Init_itm(815, Bry_.new_ints(1,175,1,5)); +Init_itm(816, Bry_.new_ints(1,208,13,1,5)); +Init_itm(817, Bry_.new_ints(1,208,29,1,5)); +Init_itm(818, Bry_.new_ints(1,135,1,5)); +Init_itm(819, Bry_.new_ints(1,175,1,5)); +Init_itm(820, Bry_.new_ints(1,208,45,1,5)); +Init_itm(821, Bry_.new_ints(1,208,61,1,5)); +Init_itm(822, Bry_.new_ints(1,177,1,5)); +Init_itm(823, Bry_.new_ints(1,177,1,5)); +Init_itm(824, Bry_.new_ints(1,165,1,5)); +Init_itm(825, Bry_.new_ints(1,208,77,1,5)); +Init_itm(826, Bry_.new_ints(1,175,1,5)); +Init_itm(827, Bry_.new_ints(1,175,1,5)); +Init_itm(828, Bry_.new_ints(1,175,1,5)); +Init_itm(829, Bry_.new_ints(1,173,1,5)); +Init_itm(830, Bry_.new_ints(1,173,1,5)); +Init_itm(831, Bry_.new_ints(1,173,1,5)); +Init_itm(832, Bry_.new_ints(1,143,1,5)); +Init_itm(833, Bry_.new_ints(1,141,1,5)); +Init_itm(834, Bry_.new_ints(1,155,1,5)); +Init_itm(835, Bry_.new_ints(1,137,1,5)); +Init_itm(836, Bry_.new_ints(1,157,141,1,6)); +Init_itm(837, Bry_.new_ints(1,208,93,1,5)); +Init_itm(838, Bry_.new_ints(1,173,1,5)); +Init_itm(839, Bry_.new_ints(1,175,1,5)); +Init_itm(840, Bry_.new_ints(1,175,1,5)); +Init_itm(841, Bry_.new_ints(1,175,1,5)); +Init_itm(842, Bry_.new_ints(1,173,1,5)); +Init_itm(843, Bry_.new_ints(1,173,1,5)); +Init_itm(844, Bry_.new_ints(1,173,1,5)); +Init_itm(845, Bry_.new_ints(1,175,1,5)); +Init_itm(846, Bry_.new_ints(1,175,1,5)); +Init_itm(847, Bry_.new_ints(1,1)); +Init_itm(848, Bry_.new_ints(1,173,1,5)); +Init_itm(849, Bry_.new_ints(1,173,1,5)); +Init_itm(850, Bry_.new_ints(1,173,1,5)); +Init_itm(851, Bry_.new_ints(1,175,1,5)); +Init_itm(852, Bry_.new_ints(1,175,1,5)); +Init_itm(853, Bry_.new_ints(1,175,1,5)); +Init_itm(854, Bry_.new_ints(1,175,1,5)); +Init_itm(855, Bry_.new_ints(1,173,1,5)); +Init_itm(856, Bry_.new_ints(1,208,109,1,5)); +Init_itm(857, Bry_.new_ints(1,175,1,5)); +Init_itm(858, Bry_.new_ints(1,175,1,5)); +Init_itm(859, Bry_.new_ints(1,173,1,5)); +Init_itm(860, Bry_.new_ints(1,175,1,5)); +Init_itm(861, Bry_.new_ints(1,173,1,5)); +Init_itm(862, Bry_.new_ints(1,173,1,5)); +Init_itm(863, Bry_.new_ints(1,175,1,5)); +Init_itm(864, Bry_.new_ints(1,208,125,1,5)); +Init_itm(865, Bry_.new_ints(1,208,141,1,5)); +Init_itm(866, Bry_.new_ints(1,175,1,5)); +Init_itm(867, Bry_.new_ints(39,1,5,1,137)); +Init_itm(868, Bry_.new_ints(47,1,5,1,137)); +Init_itm(869, Bry_.new_ints(55,1,5,1,137)); +Init_itm(870, Bry_.new_ints(67,1,5,1,137)); +Init_itm(871, Bry_.new_ints(79,1,5,1,137)); +Init_itm(872, Bry_.new_ints(43,1,5,1,137)); +Init_itm(873, Bry_.new_ints(45,1,5,1,137)); +Init_itm(874, Bry_.new_ints(53,1,5,1,137)); +Init_itm(875, Bry_.new_ints(63,1,5,1,137)); +Init_itm(876, Bry_.new_ints(73,1,5,1,137)); +Init_itm(877, Bry_.new_ints(77,1,5,1,137)); +Init_itm(878, Bry_.new_ints(81,1,5,1,137)); +Init_itm(879, Bry_.new_ints(85,1,5,1,137)); +Init_itm(880, Bry_.new_ints(91,30,1,5,1,143)); +Init_itm(881, Bry_.new_ints(91,30,1,5,1,5)); +Init_itm(882, Bry_.new_ints(91,94,1,5,1,143)); +Init_itm(883, Bry_.new_ints(91,94,1,5,1,5)); +Init_itm(884, Bry_.new_ints(13,26,1,5,1,5)); +Init_itm(885, Bry_.new_ints(13,28,4,1,5,1,5)); +Init_itm(886, Bry_.new_ints(91,24,1,5,1,143)); +Init_itm(887, Bry_.new_ints(91,24,1,5,1,5)); +Init_itm(888, Bry_.new_ints(226,232,177,228,1,5,1,5)); +Init_itm(889, Bry_.new_ints(226,232,178,4,1,5,1,5)); +Init_itm(890, Bry_.new_ints(91,36,1,5,1,137)); +Init_itm(891, Bry_.new_ints(91,74,1,5,1,5)); +Init_itm(892, Bry_.new_ints(91,72,1,5,1,5)); +Init_itm(893, Bry_.new_ints(91,76,1,5,1,5)); +Init_itm(894, Bry_.new_ints(8,88,1,5,1,5)); +Init_itm(895, Bry_.new_ints(226,232,178,172,1,5,1,5)); +Init_itm(896, Bry_.new_ints(226,232,178,200,1,5,1,5)); +Init_itm(897, Bry_.new_ints(226,232,178,228,1,5,1,5)); +Init_itm(898, Bry_.new_ints(226,232,179,4,1,5,1,5)); +Init_itm(899, Bry_.new_ints(226,232,179,32,1,5,1,5)); +Init_itm(900, Bry_.new_ints(13,12,1,5,1,5)); +Init_itm(901, Bry_.new_ints(13,20,1,134,141,1,6)); +Init_itm(902, Bry_.new_ints(91,10,1,134,141,1,143,5)); +Init_itm(903, Bry_.new_ints(10,78,1,5,1,5)); +Init_itm(904, Bry_.new_ints(91,20,1,134,141,1,143,5)); +Init_itm(905, Bry_.new_ints(91,32,1,134,141,1,143,5)); +Init_itm(906, Bry_.new_ints(91,36,1,134,141,1,143,5)); +Init_itm(907, Bry_.new_ints(226,232,180,4,1,5,1,5)); +Init_itm(908, Bry_.new_ints(91,52,1,134,141,1,143,5)); +Init_itm(909, Bry_.new_ints(226,232,180,60,1,5,1,5)); +Init_itm(910, Bry_.new_ints(91,80,1,134,141,1,143,5)); +Init_itm(911, Bry_.new_ints(91,90,1,134,141,1,143,5)); +Init_itm(912, Bry_.new_ints(91,36,1,134,157,141,1,7)); +Init_itm(913, Bry_.new_ints(91,10,1,5,1,143)); +Init_itm(914, Bry_.new_ints(91,12,1,5,1,143)); +Init_itm(915, Bry_.new_ints(91,14,1,5,1,143)); +Init_itm(916, Bry_.new_ints(91,18,1,5,1,143)); +Init_itm(917, Bry_.new_ints(91,20,1,5,1,143)); +Init_itm(918, Bry_.new_ints(91,28,1,5,1,143)); +Init_itm(919, Bry_.new_ints(91,32,1,5,1,143)); +Init_itm(920, Bry_.new_ints(91,34,1,5,1,143)); +Init_itm(921, Bry_.new_ints(91,36,1,5,1,143)); +Init_itm(922, Bry_.new_ints(91,40,1,5,1,143)); +Init_itm(923, Bry_.new_ints(91,42,1,5,1,143)); +Init_itm(924, Bry_.new_ints(91,46,1,5,1,143)); +Init_itm(925, Bry_.new_ints(91,48,1,5,1,143)); +Init_itm(926, Bry_.new_ints(91,50,1,5,1,143)); +Init_itm(927, Bry_.new_ints(91,52,1,5,1,143)); +Init_itm(928, Bry_.new_ints(91,54,1,5,1,143)); +Init_itm(929, Bry_.new_ints(91,64,1,5,1,143)); +Init_itm(930, Bry_.new_ints(226,232,182,144,1,5,1,5)); +Init_itm(931, Bry_.new_ints(91,70,1,5,1,143)); +Init_itm(932, Bry_.new_ints(91,78,1,5,1,143)); +Init_itm(933, Bry_.new_ints(91,80,1,5,1,143)); +Init_itm(934, Bry_.new_ints(91,82,1,5,1,143)); +Init_itm(935, Bry_.new_ints(91,84,1,5,1,143)); +Init_itm(936, Bry_.new_ints(91,86,1,5,1,143)); +Init_itm(937, Bry_.new_ints(91,90,1,5,1,143)); +Init_itm(938, Bry_.new_ints(91,36,1,134,157,1,143,5)); +Init_itm(939, Bry_.new_ints(91,80,1,134,157,1,143,5)); +Init_itm(940, Bry_.new_ints(91,10,1,134,141,1,6)); +Init_itm(941, Bry_.new_ints(91,20,1,134,141,1,6)); +Init_itm(942, Bry_.new_ints(91,32,1,134,141,1,6)); +Init_itm(943, Bry_.new_ints(91,36,1,134,141,1,6)); +Init_itm(944, Bry_.new_ints(91,80,1,134,157,141,1,7)); +Init_itm(945, Bry_.new_ints(91,10,1,5,1,5)); +Init_itm(946, Bry_.new_ints(91,12,1,5,1,5)); +Init_itm(947, Bry_.new_ints(91,14,1,5,1,5)); +Init_itm(948, Bry_.new_ints(91,18,1,5,1,5)); +Init_itm(949, Bry_.new_ints(91,20,1,5,1,5)); +Init_itm(950, Bry_.new_ints(91,28,1,5,1,5)); +Init_itm(951, Bry_.new_ints(91,32,1,5,1,5)); +Init_itm(952, Bry_.new_ints(91,34,1,5,1,5)); +Init_itm(953, Bry_.new_ints(91,36,1,5,1,5)); +Init_itm(954, Bry_.new_ints(91,40,1,5,1,5)); +Init_itm(955, Bry_.new_ints(91,42,1,5,1,5)); +Init_itm(956, Bry_.new_ints(91,46,1,5,1,5)); +Init_itm(957, Bry_.new_ints(91,48,1,5,1,5)); +Init_itm(958, Bry_.new_ints(91,50,1,5,1,5)); +Init_itm(959, Bry_.new_ints(91,52,1,5,1,5)); +Init_itm(960, Bry_.new_ints(91,54,1,5,1,5)); +Init_itm(961, Bry_.new_ints(91,64,1,5,1,5)); +Init_itm(962, Bry_.new_ints(91,70,1,5,1,177)); +Init_itm(963, Bry_.new_ints(91,70,1,5,1,5)); +Init_itm(964, Bry_.new_ints(91,78,1,5,1,5)); +Init_itm(965, Bry_.new_ints(91,80,1,5,1,5)); +Init_itm(966, Bry_.new_ints(91,82,1,5,1,5)); +Init_itm(967, Bry_.new_ints(91,84,1,5,1,5)); +Init_itm(968, Bry_.new_ints(91,86,1,5,1,5)); +Init_itm(969, Bry_.new_ints(91,90,1,5,1,5)); +Init_itm(970, Bry_.new_ints(91,36,1,134,157,1,6)); +Init_itm(971, Bry_.new_ints(91,80,1,134,157,1,6)); +Init_itm(972, Bry_.new_ints(91,52,1,134,141,1,6)); +Init_itm(973, Bry_.new_ints(91,80,1,134,141,1,6)); +Init_itm(974, Bry_.new_ints(91,90,1,134,141,1,6)); +Init_itm(975, Bry_.new_ints(91,40,10,36,1,7,1,147,137,189)); +Init_itm(976, Bry_.new_ints(91,12,1,5,1,137)); +Init_itm(977, Bry_.new_ints(91,34,1,5,1,137)); +Init_itm(978, Bry_.new_ints(91,80,1,5,1,147)); +Init_itm(979, Bry_.new_ints(91,80,1,134,141,1,147,5)); +Init_itm(980, Bry_.new_ints(91,80,1,134,157,1,147,5)); +Init_itm(981, Bry_.new_ints(91,82,1,5,1,137)); +Init_itm(982, Bry_.new_ints(91,54,1,5,1,137)); +Init_itm(983, Bry_.new_ints(91,40,10,36,1,7,1,137,137,189)); +Init_itm(984, Bry_.new_ints(91,62,1,5,1,143)); +Init_itm(985, Bry_.new_ints(91,62,1,5,1,5)); +Init_itm(986, Bry_.new_ints(91,26,1,5,1,143)); +Init_itm(987, Bry_.new_ints(91,26,1,5,1,5)); +Init_itm(988, Bry_.new_ints(91,22,1,5,1,143)); +Init_itm(989, Bry_.new_ints(91,22,1,5,1,5)); +Init_itm(990, Bry_.new_ints(91,60,1,5,1,143)); +Init_itm(991, Bry_.new_ints(91,60,1,5,1,5)); +Init_itm(992, Bry_.new_ints(91,92,1,5,1,143)); +Init_itm(993, Bry_.new_ints(91,92,1,5,1,5)); +Init_itm(994, Bry_.new_ints(91,98,252,1,5,1,143)); +Init_itm(995, Bry_.new_ints(91,98,252,1,5,1,5)); +Init_itm(996, Bry_.new_ints(91,99,42,1,5,1,143)); +Init_itm(997, Bry_.new_ints(91,99,42,1,5,1,5)); +Init_itm(998, Bry_.new_ints(91,99,50,1,5,1,143)); +Init_itm(999, Bry_.new_ints(91,99,50,1,5,1,5)); +Init_itm(1000, Bry_.new_ints(91,99,74,1,5,1,143)); +Init_itm(1001, Bry_.new_ints(91,99,74,1,5,1,5)); +Init_itm(1002, Bry_.new_ints(91,99,130,1,5,1,143)); +Init_itm(1003, Bry_.new_ints(91,99,130,1,5,1,5)); +Init_itm(1004, Bry_.new_ints(91,99,154,1,5,1,143)); +Init_itm(1005, Bry_.new_ints(91,99,154,1,5,1,5)); +Init_itm(1006, Bry_.new_ints(91,99,186,1,5,1,143)); +Init_itm(1007, Bry_.new_ints(91,99,186,1,5,1,5)); +Init_itm(1008, Bry_.new_ints(91,40,1,5,1,137)); +Init_itm(1009, Bry_.new_ints(91,64,1,5,1,137)); +Init_itm(1010, Bry_.new_ints(91,70,1,5,1,137)); +Init_itm(1011, Bry_.new_ints(91,38,1,5,1,5)); +Init_itm(1012, Bry_.new_ints(91,34,1,5,1,147)); +Init_itm(1013, Bry_.new_ints(91,20,1,5,1,137)); +Init_itm(1014, Bry_.new_ints(13,94,100,1,5,1,5)); +Init_itm(1015, Bry_.new_ints(91,96,1,5,1,143)); +Init_itm(1016, Bry_.new_ints(91,96,1,5,1,5)); +Init_itm(1017, Bry_.new_ints(91,70,1,5,1,147)); +Init_itm(1018, Bry_.new_ints(91,58,1,5,1,143)); +Init_itm(1019, Bry_.new_ints(91,58,1,5,1,5)); +Init_itm(1020, Bry_.new_ints(91,68,1,5,1,5)); +Init_itm(1021, Bry_.new_ints(91,74,1,5,1,143)); +Init_itm(1022, Bry_.new_ints(91,72,1,5,1,143)); +Init_itm(1023, Bry_.new_ints(91,76,1,5,1,143)); +Init_itm(1024, Bry_.new_ints(92,52,1,134,143,1,143,5)); } public void Clear() {trie.Clear();} public void Decode(Bry_bfr tmp, byte[] src, int bgn, int end) { @@ -1070,6 +1070,6 @@ Init_itm(1024, Bry_.ints_(92,52,1,134,143,1,143,5)); if (uca_last == 0) return; uca = Bry_.Mid(uca, 0, uca_last); if (trie.Match_bgn(uca, 0, uca.length) == null) - trie.Add_obj(uca, gplx.intl.Utf16_.Encode_int_to_bry(charAsInt)); + trie.Add_obj(uca, gplx.core.intls.Utf16_.Encode_int_to_bry(charAsInt)); } } \ No newline at end of file diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Uca_trie_tst.java b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Uca_trie_tst.java index 57a6ccdd9..4fe815edc 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Uca_trie_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Uca_trie_tst.java @@ -22,11 +22,11 @@ public class Uca_trie_tst { @Test public void Basic() { Uca_trie_fxt fxt = new Uca_trie_fxt(); fxt.Clear(); - fxt.Init_trie_itm("a", Bry_.ints_(10, 11)); - fxt.Init_trie_itm("b", Bry_.ints_(20, 21)); - fxt.Init_trie_itm("c", Bry_.ints_(30, 31)); - fxt.Test_decode(Bry_.ints_(10, 11), "a"); - fxt.Test_decode(Bry_.ints_(10, 11, 20, 21, 30, 31), "abc"); + fxt.Init_trie_itm("a", Bry_.new_ints(10, 11)); + fxt.Init_trie_itm("b", Bry_.new_ints(20, 21)); + fxt.Init_trie_itm("c", Bry_.new_ints(30, 31)); + fxt.Test_decode(Bry_.new_ints(10, 11), "a"); + fxt.Test_decode(Bry_.new_ints(10, 11, 20, 21, 30, 31), "abc"); } } class Uca_trie_fxt { @@ -37,7 +37,7 @@ class Uca_trie_fxt { } trie.Clear(); } Uca_trie trie; Bry_bfr bfr; - public void Init_trie_itm(String charAsStr, byte[] uca) {trie.Init_itm(gplx.intl.Utf16_.Decode_to_int(Bry_.new_u8(charAsStr), 0), uca);} + public void Init_trie_itm(String charAsStr, byte[] uca) {trie.Init_itm(gplx.core.intls.Utf16_.Decode_to_int(Bry_.new_u8(charAsStr), 0), uca);} public void Test_decode(byte[] bry, String expd) { trie.Decode(bfr, bry, 0, bry.length); Tfds.Eq(expd, bfr.Xto_str_and_clear()); diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_category_registry_sql.java b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_category_registry_sql.java index 77eaa072e..542a9b9e8 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_category_registry_sql.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_category_registry_sql.java @@ -17,6 +17,8 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.ios.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.dbs.*; import gplx.xowa.bldrs.*; +import gplx.xowa.nss.*; +import gplx.xowa.bldrs.wtrs.*; public class Xob_category_registry_sql implements Xob_cmd { public Xob_category_registry_sql(Xob_bldr bldr, Xowe_wiki wiki) {this.wiki = wiki;} private Xowe_wiki wiki; public String Cmd_key() {return Xob_cmd_keys.Key_text_cat_core;} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_category_registry_sql_tst.java b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_category_registry_sql_tst.java index da3db9438..39f1208fd 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_category_registry_sql_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_category_registry_sql_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; -import org.junit.*; import gplx.core.primitives.*; import gplx.xowa.bldrs.*; +import org.junit.*; import gplx.core.primitives.*; import gplx.xowa.bldrs.*; import gplx.xowa.nss.*; public class Xob_category_registry_sql_tst { @Before public void init() {if (Xoa_test_.Db_skip()) return; fxt.Clear();} private Xob_category_registry_sql_fxt fxt = new Xob_category_registry_sql_fxt(); @After public void term() {if (Xoa_test_.Db_skip()) return; fxt.Rls();} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_categorylinks_base.java b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_categorylinks_base.java index 65a5c7e9f..6defbc985 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_categorylinks_base.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_categorylinks_base.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.core.brys.*; import gplx.ios.*; import gplx.xowa.ctgs.*; -import gplx.xowa.bldrs.sqls.*; +import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.sqls.*; public abstract class Xob_categorylinks_base extends Xob_sql_dump_base implements Sql_file_parser_cmd { private DateAdp_parser date_parser = DateAdp_parser.new_(); private Sql_file_parser sql_parser; Uca_trie trie; private Bry_bfr uca_bfr = Bry_bfr.reset_(255); public abstract Io_sort_cmd Make_sort_cmd(Sql_file_parser sql_parser); @@ -37,7 +37,7 @@ public abstract class Xob_categorylinks_base extends Xob_sql_dump_base implement ? 0 : Bit_.Xto_int_date_short(cur_modified_on); } else if (Bry_.Eq(fld_key, Fld_cl_sortkey)) { - int nl_pos = Bry_finder.Find_fwd(src, Byte_ascii.Nl, fld_bgn, fld_end); + int nl_pos = Bry_find_.Find_fwd(src, Byte_ascii.Nl, fld_bgn, fld_end); if (nl_pos != Bry_.NotFound) // sortkey sometimes has format of "sortkey\ntitle"; EX: "WALES, JIMMY\nJIMMY WALES"; discard 2nd to conserve hard-disk space fld_end = nl_pos; cur_sortkey = Bry_.Mid(src, fld_bgn, fld_end); @@ -79,8 +79,8 @@ class Xoctg_link_sql_sorter implements gplx.lists.ComparerAble { byte[] lhs_bry = lhs.Bfr(); int lhs_bgn = 0, lhs_end = lhs.Row_bgn() - 1; byte[] rhs_bry = rhs.Bfr(); int rhs_bgn = 0, rhs_end = rhs.Row_bgn() - 1; for (int i = 0; i < 3; i++) { - lhs_bgn = lhs_end + 1; lhs_end = Bry_finder.Find_fwd(lhs_bry, Byte_ascii.Pipe, lhs_bgn); - rhs_bgn = rhs_end + 1; rhs_end = Bry_finder.Find_fwd(rhs_bry, Byte_ascii.Pipe, rhs_bgn); + lhs_bgn = lhs_end + 1; lhs_end = Bry_find_.Find_fwd(lhs_bry, Byte_ascii.Pipe, lhs_bgn); + rhs_bgn = rhs_end + 1; rhs_end = Bry_find_.Find_fwd(rhs_bry, Byte_ascii.Pipe, rhs_bgn); int comp = Bry_.Compare(lhs_bry, lhs_bgn, lhs_end, rhs_bry, rhs_bgn, rhs_end); if (comp != CompareAble_.Same) return comp; } diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_categorylinks_sql_tst.java b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_categorylinks_sql_tst.java index a3873ea47..94c809fa5 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_categorylinks_sql_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_categorylinks_sql_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; -import org.junit.*; import gplx.core.primitives.*; import gplx.dbs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.ctgs.*; import gplx.xowa.bldrs.*; +import org.junit.*; import gplx.core.primitives.*; import gplx.dbs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.ctgs.*; import gplx.xowa.bldrs.*; import gplx.xowa.nss.*; public class Xob_categorylinks_sql_tst { @Before public void init() {if (Xoa_test_.Db_skip()) return; fxt.Ctor_fsys();} Db_mgr_fxt fxt = new Db_mgr_fxt(); @After public void term() {if (Xoa_test_.Db_skip()) return; fxt.Rls();} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_ctg_v1_base.java b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_ctg_v1_base.java index 446595f75..ed7d9ed3a 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_ctg_v1_base.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_ctg_v1_base.java @@ -17,6 +17,9 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.core.primitives.*; import gplx.core.btries.*; import gplx.core.flds.*; import gplx.ios.*; import gplx.xowa.tdbs.*; +import gplx.xowa.bldrs.wkrs.*; +import gplx.xowa.langs.*; +import gplx.xowa.nss.*; import gplx.xowa.wikis.data.tbls.*; public abstract class Xob_ctg_v1_base extends Xob_itm_dump_base implements Xobd_parser_wkr, GfoInvkAble { protected Xob_ctg_v1_base() {} // TEST:needed for fxt diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_ctg_v1_sql.java b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_ctg_v1_sql.java index c435e5bc4..1da8e69d4 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_ctg_v1_sql.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_ctg_v1_sql.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.core.flds.*; import gplx.ios.*; import gplx.dbs.*; import gplx.xowa.dbs.*; import gplx.xowa.ctgs.*; +import gplx.xowa.bldrs.wtrs.*; public class Xob_ctg_v1_sql extends Xob_ctg_v1_base { @Override public String Wkr_key() {return Xob_cmd_keys.Key_text_cat_core_v1;} @Override public Io_sort_cmd Make_sort_cmd() {return new Xob_ctg_v1_sql_make(wiki);} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_ctg_v1_txt.java b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_ctg_v1_txt.java index aa66f2967..90b8c4447 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_ctg_v1_txt.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xob_ctg_v1_txt.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.ios.*; +import gplx.xowa.bldrs.cmds.texts.tdbs.*; public class Xob_ctg_v1_txt extends Xob_ctg_v1_base { @Override public String Wkr_key() {return Xob_cmd_keys.Key_tdb_make_category;} @Override public Io_sort_cmd Make_sort_cmd() {return new Xob_make_cmd_site(bldr.Usr_dlg(), make_dir, make_fil_len);} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xoctg_hiddencat_parser_base.java b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xoctg_hiddencat_parser_base.java index ef1918fdb..54c2c54a0 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xoctg_hiddencat_parser_base.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xoctg_hiddencat_parser_base.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.ios.*; -import gplx.xowa.bldrs.sqls.*; +import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.sqls.*; public abstract class Xoctg_hiddencat_parser_base extends Xob_sql_dump_base implements Sql_file_parser_cmd { public Xoctg_hiddencat_parser_base Ctor(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki); this.make_fil_len = Io_mgr.Len_mb; return this;} @Override public String Sql_file_name() {return "page_props";} @@ -31,7 +31,7 @@ public abstract class Xoctg_hiddencat_parser_base extends Xob_sql_dump_base impl public void Exec(byte[] src, byte[] fld_key, int fld_idx, int fld_bgn, int fld_end, Bry_bfr file_bfr, Sql_file_parser_data data) { switch (fld_idx) { case Fld_id: cur_id = Bry_.To_int_or(src, fld_bgn, fld_end, -1); break; - case Fld_key: cur_is_hiddencat = Bry_.Eq(Key_hiddencat, src, fld_bgn, fld_end); break; + case Fld_key: cur_is_hiddencat = Bry_.Eq(src, fld_bgn, fld_end, Key_hiddencat); break; case Fld_val: if (!cur_is_hiddencat) {data.Cancel_row_y_(); return;} Exec_hook(file_bfr, cur_id, cur_is_hiddencat); diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xoctg_hiddencat_ttl_wkr.java b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xoctg_hiddencat_ttl_wkr.java index fb5d8f2e7..b3010bd3d 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xoctg_hiddencat_ttl_wkr.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xoctg_hiddencat_ttl_wkr.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; -import gplx.ios.*; import gplx.xowa.tdbs.*; import gplx.xowa.bldrs.*; +import gplx.ios.*; import gplx.xowa.tdbs.*; +import gplx.xowa.bldrs.wkrs.*; public class Xoctg_hiddencat_ttl_wkr extends Xob_itm_dump_base implements Xob_cmd, GfoInvkAble { public Xoctg_hiddencat_ttl_wkr(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki); this.make_fil_len = Io_mgr.Len_mb;} private Xob_sql_join_wkr_ctg_hidden join_wkr; public String Cmd_key() {return Xob_cmd_keys.Key_tdb_cat_hidden_ttl;} @@ -57,7 +58,7 @@ class Xob_sql_join_wkr_ctg_hidden implements Xob_sql_join_wkr { public void Process_match(Io_line_rdr main, Io_line_rdr join, byte[] key_bry) { byte[] src = join.Bfr(); int itm_end = join.Itm_pos_end(); - int pipe_pos = Bry_finder.Find_bwd(src, Byte_ascii.Pipe, itm_end); + int pipe_pos = Bry_find_.Find_bwd(src, Byte_ascii.Pipe, itm_end); if (pipe_pos == Bry_.NotFound) throw Err_.new_wo_type("failed to find pipe for name", "excerpt", String_.new_u8(src, join.Itm_pos_bgn(), join.Itm_pos_end())); file_bfr.Add_mid(src, pipe_pos + 1, itm_end - 1).Add_byte_pipe(); file_bfr.Add(key_bry).Add_byte_nl(); diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xoctg_link_idx_wkr.java b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xoctg_link_idx_wkr.java index 2ce464e84..c078f0040 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xoctg_link_idx_wkr.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/ctgs/Xoctg_link_idx_wkr.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.core.flds.*; import gplx.ios.*; import gplx.xowa.ctgs.*; import gplx.xowa.tdbs.*; +import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.cmds.texts.tdbs.*; public class Xoctg_link_idx_wkr extends Xob_idx_base { // NOTE: similar functionality to Xob_make_cmd_site, but more complicated due to p,f,s; not inheriting Io_url src_link_dir; int make_fil_max = Int_.Min_value; public Xoctg_link_idx_wkr(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_bin_db_itm.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_bin_db_itm.java index c58f9c06d..f6573c95b 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_bin_db_itm.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_bin_db_itm.java @@ -45,11 +45,11 @@ class Xob_bin_db_itm { byte[] ns_bgn_tkn = Bry_.new_a7("file-ns."), ns_end_tkn = Bry_.new_a7("-db."), pt_end_tkn = Bry_.new_a7(".xowa"); int ns_bgn_tkn_len = ns_bgn_tkn.length, ns_end_tkn_len = ns_end_tkn.length; byte[] name = Bry_.new_u8(fil.Url_rel()); // EX: en.wikipedia.org-file-ns.000-db.001.xowa - int ns_bgn = Bry_finder.Find_fwd(name, ns_bgn_tkn, 0); if (ns_bgn == Bry_finder.Not_found) throw Err_.new_wo_type("bin_db_itm.parse: invalid ns_bgn", "name", fil.Url_rel(), "conn", fil.Conn().Conn_info().Xto_raw()); + int ns_bgn = Bry_find_.Find_fwd(name, ns_bgn_tkn, 0); if (ns_bgn == Bry_find_.Not_found) throw Err_.new_wo_type("bin_db_itm.parse: invalid ns_bgn", "name", fil.Url_rel(), "conn", fil.Conn().Conn_info().Xto_raw()); ns_bgn += ns_bgn_tkn_len; - int ns_end = Bry_finder.Find_fwd(name, ns_end_tkn, ns_bgn); if (ns_end == Bry_finder.Not_found) throw Err_.new_wo_type("bin_db_itm.parse: invalid ns_end", "name", fil.Url_rel(), "conn", fil.Conn().Conn_info().Xto_raw()); + int ns_end = Bry_find_.Find_fwd(name, ns_end_tkn, ns_bgn); if (ns_end == Bry_find_.Not_found) throw Err_.new_wo_type("bin_db_itm.parse: invalid ns_end", "name", fil.Url_rel(), "conn", fil.Conn().Conn_info().Xto_raw()); int pt_bgn = ns_end + ns_end_tkn_len; - int pt_end = Bry_finder.Find_fwd(name, pt_end_tkn, pt_bgn); if (pt_end == Bry_finder.Not_found) throw Err_.new_wo_type("bin_db_itm.parse: invalid pt_end", "name", fil.Url_rel(), "conn", fil.Conn().Conn_info().Xto_raw()); + int pt_end = Bry_find_.Find_fwd(name, pt_end_tkn, pt_bgn); if (pt_end == Bry_find_.Not_found) throw Err_.new_wo_type("bin_db_itm.parse: invalid pt_end", "name", fil.Url_rel(), "conn", fil.Conn().Conn_info().Xto_raw()); int ns_id = Bry_.To_int_or(name, ns_bgn, ns_end, Int_.Min_value); if (ns_id == Int_.Min_value) throw Err_.new_wo_type("bin_db_itm.parse: invalid ns_id", "name", fil.Url_rel(), "conn", fil.Conn().Conn_info().Xto_raw()); int pt_id = Bry_.To_int_or(name, pt_bgn, pt_end, Int_.Min_value); if (pt_id == Int_.Min_value) throw Err_.new_wo_type("bin_db_itm.parse: invalid pt_id", "name", fil.Url_rel(), "conn", fil.Conn().Conn_info().Xto_raw()); return new Xob_bin_db_itm(fil.Id(), fil.Url(), ns_id, pt_id); diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_diff_regy_exec_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_diff_regy_exec_cmd.java index 44d1c7449..01f9ed40b 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_diff_regy_exec_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_diff_regy_exec_cmd.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.fsdb.*; import gplx.fsdb.meta.*; -import gplx.xowa.bldrs.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_diff_regy_exec_cmd extends Xob_itm_basic_base implements Xob_cmd { private Io_url sql_dir; public Xob_diff_regy_exec_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} @@ -29,7 +29,7 @@ public class Xob_diff_regy_exec_cmd extends Xob_itm_basic_base implements Xob_cm public void Cmd_term() {} private void Exec_main() { if (sql_dir == null) - sql_dir = wiki.Ctx().App().Fsys_mgr().File_dir().GenSubDir_nest(wiki.Domain_str(), "tmp_sql"); + sql_dir = wiki.Parser_mgr().Ctx().App().Fsys_mgr().File_dir().GenSubDir_nest(wiki.Domain_str(), "tmp_sql"); Xob_diff_regy_sql_runner runner = new Xob_diff_regy_sql_runner(); Io_url[] urls = Io_mgr.I.QueryDir_fils(sql_dir); int urls_len = urls.length; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_diff_regy_make_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_diff_regy_make_cmd.java index 3c9352a25..6cb269a1e 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_diff_regy_make_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_diff_regy_make_cmd.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.fsdb.*; import gplx.dbs.engines.sqlite.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_diff_regy_make_cmd extends Xob_itm_basic_base implements Xob_cmd { public Xob_diff_regy_make_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Cmd_key() {return Xob_cmd_keys.Key_diff_regy_make;} @@ -49,7 +50,7 @@ public class Xob_diff_regy_make_cmd extends Xob_itm_basic_base implements Xob_cm DataRdr rdr = make_db_provider.Exec_sql_as_rdr(Xob_diff_regy_tbl.Make_deletes); int cur_db_id = -1, cur_count = 0; Bry_bfr atr_bfr = Bry_bfr.new_(), bin_bfr = Bry_bfr.new_(); - Io_url sql_tmp_dir = wiki.Ctx().App().Fsys_mgr().File_dir().GenSubDir_nest(wiki.Domain_str(), "tmp_sql"); + Io_url sql_tmp_dir = wiki.App().Fsys_mgr().File_dir().GenSubDir_nest(wiki.Domain_str(), "tmp_sql"); while (rdr.MoveNextPeer()) { byte diff_is_orig = rdr.ReadByte("diff_is_orig"); int diff_db_id = rdr.ReadInt("diff_db_id"); diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_fsdb_make_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_fsdb_make_cmd.java index ba4c09fee..01b5a89d6 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_fsdb_make_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_fsdb_make_cmd.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.dbs.engines.sqlite.*; +import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.data.*; import gplx.xowa.dbs.*; import gplx.fsdb.*; import gplx.ios.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.bins.*; import gplx.xowa.files.fsdb.*; import gplx.fsdb.data.*; import gplx.fsdb.meta.*; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_fsdb_reduce_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_fsdb_reduce_cmd.java index 3b049ba89..5cbc0aabb 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_fsdb_reduce_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_fsdb_reduce_cmd.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.fsdb.meta.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_fsdb_reduce_cmd extends Xob_itm_basic_base implements Xob_cmd { public Xob_fsdb_reduce_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Cmd_key() {return Xob_cmd_keys.Key_file_fsdb_reduce;} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_lnki_regy_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_lnki_regy_cmd.java index de2d9f37c..8d8c8ba81 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_lnki_regy_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_lnki_regy_cmd.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.xowa.dbs.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_lnki_regy_cmd extends Xob_itm_basic_base implements Xob_cmd { public Xob_lnki_regy_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Cmd_key() {return Xob_cmd_keys.Key_file_lnki_regy;} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_lnki_temp_wkr.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_lnki_temp_wkr.java index c67c88e5a..2425d59fe 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_lnki_temp_wkr.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_lnki_temp_wkr.java @@ -18,6 +18,7 @@ along with this program. If not, see . package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.pages.*; import gplx.xowa.files.*; +import gplx.xowa.nss.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.parsers.*; import gplx.xowa.parsers.logs.*; import gplx.xowa.parsers.lnkis.*; import gplx.xowa.parsers.lnkis.redlinks.*; import gplx.xowa.parsers.xndes.*; import gplx.xowa.html.hdumps.bldrs.*; import gplx.xowa.xtns.scribunto.*; import gplx.xowa.xtns.wdatas.*; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_orig_regy_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_orig_regy_cmd.java index 17228623e..be1e8faed 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_orig_regy_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_orig_regy_cmd.java @@ -18,6 +18,7 @@ along with this program. If not, see . package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.xowa.wikis.domains.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_orig_regy_cmd extends Xob_itm_basic_base implements Xob_cmd { private boolean repo_0_is_remote = false; public Xob_orig_regy_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_orig_regy_tbl.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_orig_regy_tbl.java index fe3b5f41b..ca078a4a1 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_orig_regy_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_orig_regy_tbl.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.xowa.files.repos.*; +import gplx.xowa.nss.*; import gplx.xowa.wikis.domains.*; import gplx.dbs.engines.sqlite.*; class Xob_orig_regy_tbl { diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_orig_regy_update_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_orig_regy_update_cmd.java index 33cc1f306..42834f1f0 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_orig_regy_update_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_orig_regy_update_cmd.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.xowa.dbs.*; import gplx.xowa.files.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.origs.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_orig_regy_update_cmd extends Xob_itm_basic_base implements Xob_cmd { // downloads latest orig data public Xob_orig_regy_update_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Cmd_key() {return KEY_oimg;} public static final String KEY_oimg = "oimg.orig_qry"; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_page_regy_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_page_regy_cmd.java index c3d9096d8..e8aabac64 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_page_regy_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_page_regy_cmd.java @@ -18,6 +18,7 @@ along with this program. If not, see . package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.files.repos.*; import gplx.xowa.wikis.domains.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_page_regy_cmd extends Xob_itm_basic_base implements Xob_cmd { public Xob_page_regy_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} private boolean build_commons = false; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_regy_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_regy_cmd.java index 3ac4c2f4a..73468d7de 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_regy_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_regy_cmd.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_xfer_regy_cmd extends Xob_itm_basic_base implements Xob_cmd { public Xob_xfer_regy_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Cmd_key() {return Xob_cmd_keys.Key_file_xfer_regy;} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_regy_update_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_regy_update_cmd.java index aca45a44d..fd1a23107 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_regy_update_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_regy_update_cmd.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.fsdb.meta.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_xfer_regy_update_cmd extends Xob_itm_basic_base implements Xob_cmd { public Xob_xfer_regy_update_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Cmd_key() {return Xob_cmd_keys.Key_file_xfer_regy_update;} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_temp_cmd_orig.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_temp_cmd_orig.java index f6ef05e3d..3932d8c55 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_temp_cmd_orig.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_temp_cmd_orig.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.xowa.dbs.*; import gplx.xowa.files.*; import gplx.xowa.files.exts.*; +import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.parsers.lnkis.*; public class Xob_xfer_temp_cmd_orig extends Xob_itm_basic_base implements Xob_cmd { private byte[] ext_rules_key = Bry_.Empty; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_temp_cmd_thumb.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_temp_cmd_thumb.java index 00089ada2..7ae394630 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_temp_cmd_thumb.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_temp_cmd_thumb.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.xowa.files.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_xfer_temp_cmd_thumb extends Xob_itm_basic_base implements Xob_cmd { public Xob_xfer_temp_cmd_thumb(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Cmd_key() {return Xob_cmd_keys.Key_file_xfer_temp_thumb;} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_update_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_update_cmd.java index 649c9865f..0bf6ab6a3 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_update_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/files/Xob_xfer_update_cmd.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.dbs.*; import gplx.xowa.files.*; import gplx.xowa.bldrs.cmds.files.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_xfer_update_cmd extends Xob_itm_basic_base implements Xob_cmd { private Io_url prv_url; public Xob_xfer_update_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/Xob_search_base.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/Xob_search_base.java index 1c8d4b508..21b412efb 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/Xob_search_base.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/Xob_search_base.java @@ -17,7 +17,10 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.texts; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.core.primitives.*; +import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.wtrs.*; import gplx.ios.*; +import gplx.xowa.langs.*; +import gplx.xowa.nss.*; import gplx.xowa.wikis.data.*; import gplx.xowa.dbs.*; import gplx.xowa.tdbs.*; import gplx.xowa.wikis.data.tbls.*; public abstract class Xob_search_base extends Xob_itm_dump_base implements Xobd_wkr, GfoInvkAble { private final Ordered_hash list = Ordered_hash_.new_(); private Xol_lang lang; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_init_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_init_cmd.java index 91e2da5e6..18165cb7d 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_init_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_init_cmd.java @@ -28,6 +28,6 @@ public class Xob_init_cmd extends Xob_init_base { @Override public void Cmd_run_end(Xowe_wiki wiki) { if (gplx.xowa.wikis.Xow_fsys_mgr.Find_core_fil(wiki) != null) throw wiki.Appe().Bldr().Usr_dlg().Fail_many("", "", "directory must not contain any .xowa or .sqlite3 files: dir=~{0}", wiki.Fsys_mgr().Root_dir().Raw()); - Xowe_wiki_bldr.Create(wiki, wiki.Import_cfg().Src_rdr_len(), wiki.Import_cfg().Src_fil().NameOnly()); + Xowe_wiki_.Create(wiki, wiki.Import_cfg().Src_rdr_len(), wiki.Import_cfg().Src_fil().NameOnly()); } } diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_page_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_page_cmd.java index 6af5e726b..878ba008c 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_page_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_page_cmd.java @@ -17,6 +17,8 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.texts.sqls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; import gplx.dbs.*; import gplx.ios.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.wikis.*; +import gplx.xowa.bldrs.wkrs.*; +import gplx.xowa.nss.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.dbs.*; import gplx.xowa.wikis.*; import gplx.xowa.bldrs.filters.dansguardians.*; import gplx.xowa.apis.xowa.bldrs.imports.*; import gplx.xowa.parsers.utils.*; @@ -24,8 +26,8 @@ public class Xob_page_cmd extends Xob_itm_basic_base implements Xobd_wkr, GfoInv private Xowd_db_mgr db_mgr; private Db_idx_mode idx_mode = Db_idx_mode.Itm_end; private Xowd_page_tbl page_core_tbl; private Io_stream_zip_mgr text_zip_mgr; private byte text_zip_tid; private Xop_redirect_mgr redirect_mgr; private Xob_redirect_tbl redirect_tbl; private boolean redirect_id_enabled; private DateAdp modified_latest = DateAdp_.MinValue; private int page_count_all, page_count_main = 0; private int commit_interval = 100000; // 100 k - private Dg_match_mgr dg_match_mgr; private final Xow_page_mgr page_mgr; private Xob_ns_to_db_mgr ns_to_db_mgr; - public Xob_page_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki); this.page_mgr = wiki.Page_mgr();} + private Dg_match_mgr dg_match_mgr; private Xob_ns_to_db_mgr ns_to_db_mgr; + public Xob_page_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Wkr_key() {return Xob_cmd_keys.Key_text_page;} public void Wkr_bgn(Xob_bldr bldr) { Xoae_app app = wiki.Appe(); @@ -60,7 +62,7 @@ public class Xob_page_cmd extends Xob_itm_basic_base implements Xobd_wkr, GfoInv } byte[] text_zip = text_zip_mgr.Zip(text_zip_tid, text_raw); Xowd_db_file text_db = ns_to_db_mgr.Get_by_ns(ns.Bldr_data(), text_zip.length); - try {page_mgr.Create(page_core_tbl, text_db.Tbl__text(), id, page.Ns_id(), page.Ttl_page_db(), redirect, modified, text_zip, text_raw_len, random_int, text_db.Id(), -1);} + try {db_mgr.Create_page(page_core_tbl, text_db.Tbl__text(), id, page.Ns_id(), page.Ttl_page_db(), redirect, modified, text_zip, text_raw_len, random_int, text_db.Id(), -1);} catch (Exception e) { throw Err_.new_exc(e, "bldr", "create page in db failed; skipping page", "id", id, "ns", page.Ns_id(), "name", page.Ttl_page_db(), "redirect", redirect, "modified", modified, "text_len", text_raw_len, "text_db_id", text_db.Id()); } diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_page_cmd_tst.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_page_cmd_tst.java index 3d4b0fe81..aae111925 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_page_cmd_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_page_cmd_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.texts.sqls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; -import org.junit.*; import gplx.dbs.*; import gplx.xowa.specials.search.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.ctgs.*; +import org.junit.*; import gplx.dbs.*; import gplx.xowa.specials.search.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.ctgs.*; import gplx.xowa.nss.*; public class Xob_page_cmd_tst { @Before public void init() {if (Xoa_test_.Db_skip()) return; fxt.Ctor_fsys();} Db_mgr_fxt fxt = new Db_mgr_fxt(); @After public void term() {if (Xoa_test_.Db_skip()) return; fxt.Rls();} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_pagelinks_parser_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_pagelinks_parser_cmd.java index 1820ee37c..1ea2cf732 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_pagelinks_parser_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_pagelinks_parser_cmd.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.texts.sqls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; import gplx.dbs.*; -import gplx.xowa.bldrs.sqls.*; +import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.sqls.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; public class Xob_pagelinks_parser_cmd extends Xob_sql_dump_base implements Sql_file_parser_cmd { private Db_conn core_conn; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_search_sql_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_search_sql_cmd.java index 05e5bb2c0..bfba571d4 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_search_sql_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_search_sql_cmd.java @@ -16,6 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.texts.sqls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; +import gplx.xowa.langs.*; +import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.wikis.data.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.dbs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.bldrs.*; public class Xob_search_sql_cmd extends Xob_itm_basic_base implements Xob_cmd { // search version 2; upgrade private int commit_interval = 100000, progress_interval = 10000; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_search_sql_wkr.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_search_sql_wkr.java index 8e1ef04c1..8f64349d4 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_search_sql_wkr.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_search_sql_wkr.java @@ -17,6 +17,8 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.texts.sqls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; import gplx.ios.*; +import gplx.xowa.bldrs.wkrs.*; +import gplx.xowa.langs.*; import gplx.xowa.wikis.data.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.dbs.*; import gplx.xowa.wikis.data.tbls.*; public class Xob_search_sql_wkr extends Xob_search_base implements Io_make_cmd { // search version 2 private Xowd_db_mgr db_mgr; private Xowd_search_link_tbl search_page_tbl; private Xowd_search_word_tbl search_word_tbl; diff --git a/400_xowa/src_200_bldr/gplx/xowa/Io_sort_cmd_ns.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Io_sort_cmd_ns.java similarity index 90% rename from 400_xowa/src_200_bldr/gplx/xowa/Io_sort_cmd_ns.java rename to 400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Io_sort_cmd_ns.java index 56da07290..af5d7a99c 100644 --- a/400_xowa/src_200_bldr/gplx/xowa/Io_sort_cmd_ns.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Io_sort_cmd_ns.java @@ -15,8 +15,9 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; -import gplx.ios.*; import gplx.xowa.tdbs.*; +package gplx.xowa.bldrs.cmds.texts.tdbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; +import gplx.ios.*; +import gplx.xowa.tdbs.*; import gplx.xowa.tdbs.xdats.*; public class Io_sort_cmd_ns implements Io_make_cmd { Xob_xdat_file_wtr fil_wtr; Bry_bfr reg_bfr = Bry_bfr.new_(), key_bfr_0 = Bry_bfr.new_(512), key_bfr_n = Bry_bfr.new_(512); int fil_count = 0, itm_count = 0; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_calc_stats_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_calc_stats_cmd.java index ea84d5257..9c6c35230 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_calc_stats_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_calc_stats_cmd.java @@ -16,7 +16,10 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.texts.tdbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; -import gplx.xowa.tdbs.*; import gplx.xowa.tdbs.hives.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.xowa.bldrs.wkrs.*; +import gplx.xowa.nss.*; +import gplx.xowa.wikis.metas.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.xowa.tdbs.*; import gplx.xowa.tdbs.hives.*; import gplx.xowa.tdbs.xdats.*; public class Xob_calc_stats_cmd extends Xob_itm_basic_base implements Xob_cmd { public Xob_calc_stats_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Cmd_key() {return Xob_cmd_keys.Key_tdb_calc_stats;} diff --git a/400_xowa/src_200_bldr/gplx/xowa/Xob_make_cmd_site.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_make_cmd_site.java similarity index 94% rename from 400_xowa/src_200_bldr/gplx/xowa/Xob_make_cmd_site.java rename to 400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_make_cmd_site.java index c73e71048..8269c4edf 100644 --- a/400_xowa/src_200_bldr/gplx/xowa/Xob_make_cmd_site.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_make_cmd_site.java @@ -15,8 +15,9 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; -import gplx.ios.*; import gplx.xowa.tdbs.*; +package gplx.xowa.bldrs.cmds.texts.tdbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; +import gplx.ios.*; +import gplx.xowa.tdbs.*; import gplx.xowa.tdbs.xdats.*; public class Xob_make_cmd_site implements Io_make_cmd { Xob_xdat_file_wtr fil_wtr; Bry_bfr cur_bfr = Bry_bfr.new_(), reg_bfr = Bry_bfr.new_(), reg_key_0 = Bry_bfr.new_(512), reg_key_n = Bry_bfr.new_(512); int make_fil_max = 65 * Io_mgr.Len_kb, fil_count = 0, itm_count = 0, itm_key_end = 0; Io_url reg_url; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_make_id_wkr.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_make_id_wkr.java index f07d8696a..14c6cf8e8 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_make_id_wkr.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_make_id_wkr.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.texts.tdbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; import gplx.ios.*; import gplx.xowa.tdbs.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_make_id_wkr extends Xob_itm_dump_base implements Xobd_wkr, GfoInvkAble { public Xob_make_id_wkr(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Wkr_key() {return KEY;} public static final String KEY = "core.make_id"; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_page_txt.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_page_txt.java index 1f98540a1..e6b2824ae 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_page_txt.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_page_txt.java @@ -16,8 +16,11 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.texts.tdbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; -import gplx.ios.*; import gplx.xowa.tdbs.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.ios.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.wtrs.*; +import gplx.xowa.nss.*; import gplx.xowa.parsers.utils.*; +import gplx.xowa.tdbs.*; import gplx.xowa.tdbs.xdats.*; import gplx.xowa.tdbs.stats.*; public class Xob_page_txt extends Xob_itm_dump_base implements Xobd_wkr, GfoInvkAble { public Xob_page_txt(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Wkr_key() {return Xob_cmd_keys.Key_tdb_make_page;} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_parse_dump_templates_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_parse_dump_templates_cmd.java index ecf7a1aa2..805b120c5 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_parse_dump_templates_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_parse_dump_templates_cmd.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.texts.tdbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; -import gplx.ios.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.tdbs.*; +import gplx.ios.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.tdbs.*; import gplx.xowa.nss.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_parse_dump_templates_cmd extends Xob_itm_dump_base implements Xobd_wkr, GfoInvkAble { public Xob_parse_dump_templates_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Wkr_key() {return KEY;} public static final String KEY = "parse.dump_templates"; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_search_base_tst.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_search_base_tst.java index bcc43b42e..851f2a2eb 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_search_base_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_search_base_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.texts.tdbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; -import org.junit.*; import gplx.xowa.tdbs.*; import gplx.xowa.bldrs.*; +import org.junit.*; import gplx.xowa.tdbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.nss.*; public class Xob_search_base_tst { @Test public void Split() { tst_Split("a", "a"); diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_tst.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_tst.java index d1a508248..21dad108f 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_tst.java @@ -18,6 +18,7 @@ along with this program. If not, see . package gplx.xowa.bldrs.cmds.texts.tdbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; import org.junit.*; import gplx.ios.*; import gplx.xowa.tdbs.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.xowa.nss.*; public class Xob_tst { @Before public void init() {fxt = new Xob_fxt().Ctor_mem();} private Xob_fxt fxt; // @After public void term() {fxt.Wiki().Ctx().Sys_load_tmpls_(true);} // commented during wiki.Ctx() removal; DATE:2014-04-22 diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_cleanup_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_cleanup_cmd.java index 1e257f6d2..ddc153d22 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_cleanup_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_cleanup_cmd.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.core.criterias.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_cleanup_cmd extends Xob_itm_basic_base implements Xob_cmd { private String bz2_cmd; private boolean delete_all, delete_tmp; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_core_batch_utl.java b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_core_batch_utl.java index a52c331d6..713171668 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_core_batch_utl.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_core_batch_utl.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.wikis.domains.*; -import gplx.xowa.wmfs.dumps.*; +import gplx.xowa.wms.dumps.*; public class Xob_core_batch_utl implements GfoInvkAble { private final Xob_bldr bldr; private final Bry_fmtr fmtr = Bry_fmtr.keys_("bz2_fil", "wiki_key"); diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_decompress_bz2_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_decompress_bz2_cmd.java index 32ea46803..59e6b3f4d 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_decompress_bz2_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_decompress_bz2_cmd.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; -import gplx.ios.*; import gplx.core.threads.*; import gplx.xowa.bldrs.*; +import gplx.ios.*; import gplx.core.threads.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_decompress_bz2_cmd extends Xob_itm_basic_base implements Xob_cmd { public Xob_decompress_bz2_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Cmd_key() {return Xob_cmd_keys.Key_decompress_bz2;} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_deploy_copy_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_deploy_copy_cmd.java index 20b5a9803..1eb2d3a20 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_deploy_copy_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_deploy_copy_cmd.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; -import gplx.xowa.bldrs.*; import gplx.xowa.tdbs.*; +import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.tdbs.*; public class Xob_deploy_copy_cmd extends Xob_itm_basic_base implements Xob_cmd, GfoInvkAble { public Xob_deploy_copy_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Cmd_key() {return Xob_cmd_keys.Key_deploy_copy;} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_deploy_zip_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_deploy_zip_cmd.java index a5cc2db60..12c21771f 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_deploy_zip_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_deploy_zip_cmd.java @@ -16,7 +16,9 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; -import gplx.ios.*; import gplx.xowa.bldrs.sqls.*; +import gplx.ios.*; +import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.sqls.*; +import gplx.xowa.nss.*; import gplx.xowa.tdbs.*; public class Xob_deploy_zip_cmd extends Xob_itm_basic_base implements Xob_cmd { public Xob_deploy_zip_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_download_wkr.java b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_download_wkr.java index 29d768143..466a664a2 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_download_wkr.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_download_wkr.java @@ -16,8 +16,9 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; -import gplx.dbs.*; import gplx.ios.*; import gplx.xowa.bldrs.*; -import gplx.xowa.wmfs.dumps.*; +import gplx.dbs.*; import gplx.ios.*; +import gplx.xowa.bldrs.wkrs.*; +import gplx.xowa.wms.dumps.*; public class Xob_download_wkr extends Xob_itm_basic_base implements Xob_cmd { private String dump_date = "latest"; private String dump_type = null; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_site_meta_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_site_meta_cmd.java index 9eb59bf45..a115a9cde 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_site_meta_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_site_meta_cmd.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.xowa.bldrs.*; -import gplx.xowa.wmfs.*; import gplx.xowa.wmfs.data.*; +import gplx.xowa.wms.*; import gplx.xowa.wms.sites.*; import gplx.xowa.wikis.domains.*; public class Xob_site_meta_cmd implements Xob_cmd { private final Xob_bldr bldr; @@ -25,10 +25,11 @@ public class Xob_site_meta_cmd implements Xob_cmd { public Xob_site_meta_cmd(Xob_bldr bldr, Xow_wiki wiki) {this.bldr = bldr;} public String Cmd_key() {return Xob_cmd_keys.Key_site_meta;} public void Cmd_run() { - if (wikis == null) wikis = Xow_wmf_api_mgr.Wikis; - if (db_url == null) db_url = bldr.App().Fsys_mgr().Cfg_site_meta_fil(); + Xoa_app app = bldr.App(); + if (wikis == null) wikis = Xow_domain_regy.All; + if (db_url == null) db_url = app.Fsys_mgr().Cfg_site_meta_fil(); if (cutoff_time == null) cutoff_time = DateAdp_.Now().Add_day(-1); - Site_meta_itm.Build_site_meta(bldr.App().Utl__json_parser(), bldr.App().Wmf_mgr(), db_url, wikis, cutoff_time); + new Site_api_mgr().Load_all(app.Usr_dlg(), app.Utl__inet_conn(), db_url, wikis, cutoff_time); } public void Cmd_init(Xob_bldr bldr) {} public void Cmd_bgn(Xob_bldr bldr) {} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_image_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_image_cmd.java index 549c44a90..0702d6b24 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_image_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_image_cmd.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.wikis; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.ios.*; import gplx.xowa.files.*; -import gplx.xowa.bldrs.sqls.*; +import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.sqls.*; public class Xob_image_cmd extends Xob_itm_dump_base implements Xob_cmd, GfoInvkAble, Sql_file_parser_cmd { private Db_conn conn = null; private Db_stmt stmt = null; private Xob_image_tbl tbl_image = new Xob_image_tbl(); diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_page_dump_cmd_drop.java b/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_page_dump_cmd_drop.java index 74db49710..4e6311b59 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_page_dump_cmd_drop.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_page_dump_cmd_drop.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.wikis; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.wikis.data.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.dbs.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_page_dump_cmd_drop extends Xob_itm_basic_base implements Xob_cmd { public Xob_page_dump_cmd_drop(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Cmd_key() {return Xob_cmd_keys.Key_wiki_page_dump_drop;} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_page_dump_cmd_make.java b/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_page_dump_cmd_make.java index 3e57fe91e..59eb19330 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_page_dump_cmd_make.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_page_dump_cmd_make.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.wikis; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.wikis.data.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.dbs.*; +import gplx.xowa.bldrs.wkrs.*; public class Xob_page_dump_cmd_make extends Xob_itm_basic_base implements Xob_cmd { public Xob_page_dump_cmd_make(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} public String Cmd_key() {return Xob_cmd_keys.Key_wiki_page_dump_make;} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_redirect_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_redirect_cmd.java index d96bd808a..b992a83e5 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_redirect_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_redirect_cmd.java @@ -17,6 +17,8 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.wikis; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.xowa.dbs.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.langs.htmls.encoders.*; +import gplx.xowa.nss.*; import gplx.xowa.parsers.utils.*; public class Xob_redirect_cmd extends Xob_dump_mgr_base { private Db_conn conn; private Xob_redirect_tbl redirect_tbl; diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_redirect_tbl.java b/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_redirect_tbl.java index a31aab719..6bc874a98 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_redirect_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/wikis/Xob_redirect_tbl.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.cmds.wikis; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; +import gplx.langs.htmls.encoders.*; public class Xob_redirect_tbl { private Url_encoder encoder; private Db_stmt insert_stmt; public Xob_redirect_tbl(Io_url root_dir, Url_encoder encoder) { diff --git a/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor.java b/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor.java index 622736f51..baeb50a7b 100644 --- a/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor.java +++ b/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor.java @@ -17,6 +17,8 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.css; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.ios.*; import gplx.xowa.html.*; +import gplx.langs.htmls.encoders.*; +import gplx.xowa.nss.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.data.*; import gplx.xowa.files.downloads.*; import gplx.core.net.*; @@ -171,9 +173,9 @@ public class Xoa_css_extractor { private boolean Logo_copy_from_css(Io_url trg_fil) { Io_url commons_file = wiki_html_dir.GenSubFil(Css_common_name); byte[] commons_src = Io_mgr.I.LoadFilBry(commons_file); - int bgn_pos = Bry_finder.Find_fwd(commons_src, Bry_mw_wiki_logo); if (bgn_pos == Bry_finder.Not_found) return false; + int bgn_pos = Bry_find_.Find_fwd(commons_src, Bry_mw_wiki_logo); if (bgn_pos == Bry_find_.Not_found) return false; bgn_pos += Bry_mw_wiki_logo.length; - int end_pos = Bry_finder.Find_fwd(commons_src, Byte_ascii.Quote, bgn_pos + 1); if (end_pos == Bry_finder.Not_found) return false; + int end_pos = Bry_find_.Find_fwd(commons_src, Byte_ascii.Quote, bgn_pos + 1); if (end_pos == Bry_find_.Not_found) return false; byte[] src_bry = Bry_.Mid(commons_src, bgn_pos, end_pos); src_bry = Xob_url_fixer.Fix(wiki_domain, src_bry, src_bry.length); if (wiki_html_dir.Info().DirSpr_byte() == Byte_ascii.Backslash) @@ -185,11 +187,11 @@ public class Xoa_css_extractor { private String Logo_find_src() { if (mainpage_html == null) return null; int main_page_html_len = mainpage_html.length; - int logo_bgn = Bry_finder.Find_fwd(mainpage_html, Logo_find_bgn, 0); if (logo_bgn == Bry_.NotFound) return null; + int logo_bgn = Bry_find_.Find_fwd(mainpage_html, Logo_find_bgn, 0); if (logo_bgn == Bry_.NotFound) return null; logo_bgn += Logo_find_bgn.length; - logo_bgn = Bry_finder.Find_fwd(mainpage_html, Logo_find_end, logo_bgn); if (logo_bgn == Bry_.NotFound) return null; + logo_bgn = Bry_find_.Find_fwd(mainpage_html, Logo_find_end, logo_bgn); if (logo_bgn == Bry_.NotFound) return null; logo_bgn += Logo_find_end.length; - int logo_end = Bry_finder.Find_fwd(mainpage_html, Byte_ascii.Paren_end, logo_bgn, main_page_html_len); if (logo_bgn == Bry_.NotFound) return null; + int logo_end = Bry_find_.Find_fwd(mainpage_html, Byte_ascii.Paren_end, logo_bgn, main_page_html_len); if (logo_bgn == Bry_.NotFound) return null; byte[] logo_bry = Bry_.Mid(mainpage_html, logo_bgn, logo_end); return protocol_prefix + String_.new_u8(logo_bry); } @@ -238,12 +240,13 @@ public class Xoa_css_extractor { byte[] protocol_prefix_bry = Bry_.new_u8(protocol_prefix); Gfo_url gfo_url = new Gfo_url(); while (true) { - int url_bgn = Bry_finder.Find_fwd(raw, Css_find_bgn, prv_pos); if (url_bgn == Bry_.NotFound) break; // nothing left; stop + int url_bgn = Bry_find_.Find_fwd(raw, Css_find_bgn, prv_pos); if (url_bgn == Bry_.NotFound) break; // nothing left; stop url_bgn += css_find_bgn_len; - int url_end = Bry_finder.Find_fwd(raw, Byte_ascii.Quote, url_bgn, raw_len); if (url_end == Bry_.NotFound) {usr_dlg.Warn_many("", "main_page.css_parse", "could not find css; pos='~{0}' text='~{1}'", url_bgn, String_.new_u8_by_len(raw, url_bgn, url_bgn + 32)); break;} + int url_end = Bry_find_.Find_fwd(raw, Byte_ascii.Quote, url_bgn, raw_len); if (url_end == Bry_.NotFound) {usr_dlg.Warn_many("", "main_page.css_parse", "could not find css; pos='~{0}' text='~{1}'", url_bgn, String_.new_u8__by_len(raw, url_bgn, url_bgn + 32)); break;} byte[] css_url_bry = Bry_.Mid(raw, url_bgn, url_end); css_url_bry = Bry_.Replace(css_url_bry, Css_amp_find, Css_amp_repl); // & -> & css_url_bry = url_encoder.Decode(css_url_bry); // %2C -> %7C -> | + css_url_bry = Xoa_css_extractor.Url_root_fix(wiki_domain, css_url_bry); url_parser.Parse(gfo_url, css_url_bry, 0, css_url_bry.length); if ( gfo_url.Protocol_tid() == Gfo_protocol_itm.Tid_relative_1 // if rel url, add protocol_prefix DATE:2015-08-01 || (Env_.Mode_testing() && gfo_url.Protocol_tid() == Gfo_protocol_itm.Tid_unknown)) // TEST: @@ -266,6 +269,15 @@ public class Xoa_css_extractor { } return tmp_bfr.Xto_bry_and_clear(); } + private static byte[] Url_root_fix(byte[] domain, byte[] url) {// DATE:2015-09-20 + if (url.length < 3) return url; // need at least 2 chars + if ( url[0] == Byte_ascii.Slash // starts with "/" EX: "/w/api.php" + && url[1] != Byte_ascii.Slash // but not "//"; EX: "//en.wikipedia.org" + ) + return Bry_.Add(gplx.xowa.html.hrefs.Xoh_href_.Bry__https, domain, url); + else + return url; + } public static final String Css_common_name = "xowa_common.css", Css_wiki_name = "xowa_wiki.css" , Css_common_name_ltr = "xowa_common_ltr.css", Css_common_name_rtl = "xowa_common_rtl.css"; } \ No newline at end of file diff --git a/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor_basic_tst.java b/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor_basic_tst.java index dde52b17e..c7ae5f8a3 100644 --- a/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor_basic_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor_basic_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.css; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; -import org.junit.*; import gplx.ios.*; import gplx.xowa.wikis.data.*; import gplx.xowa.files.downloads.*; +import org.junit.*; import gplx.ios.*; import gplx.langs.htmls.encoders.*; import gplx.xowa.wikis.data.*; import gplx.xowa.files.downloads.*; public class Xoa_css_extractor_basic_tst { @Before public void init() {fxt.Clear();} private Xoa_css_extractor_fxt fxt = new Xoa_css_extractor_fxt(); @Test public void Logo_download() { diff --git a/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor_wiki_tst.java b/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor_wiki_tst.java index 47be0d006..e3261281d 100644 --- a/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor_wiki_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor_wiki_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.css; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; -import org.junit.*; import gplx.ios.*; +import org.junit.*; import gplx.ios.*; import gplx.xowa.nss.*; public class Xoa_css_extractor_wiki_tst { @Before public void init() {fxt.Clear();} private Xoa_css_extractor_fxt fxt = new Xoa_css_extractor_fxt(); @Test public void Css_wiki_generate() { diff --git a/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_img_downloader.java b/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_img_downloader.java index 17d986719..b167682ba 100644 --- a/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_img_downloader.java +++ b/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_img_downloader.java @@ -41,7 +41,7 @@ public class Xoa_css_img_downloader { Bry_bfr bfr = Bry_bfr.new_(src_len); Hash_adp img_hash = Hash_adp_bry.cs(); while (true) { - int url_pos = Bry_finder.Find_fwd(src, Bry_url, prv_pos); + int url_pos = Bry_find_.Find_fwd(src, Bry_url, prv_pos); if (url_pos == Bry_.NotFound) {bfr.Add_mid(src, prv_pos, src_len); break;} // no more "url("; exit; int bgn_pos = url_pos + Bry_url_len; // set bgn_pos after "url(" byte bgn_byte = src[bgn_pos]; @@ -57,14 +57,14 @@ public class Xoa_css_img_downloader { quoted = false; break; } - int end_pos = Bry_finder.Find_fwd(src, end_byte, bgn_pos, src_len); + int end_pos = Bry_find_.Find_fwd(src, end_byte, bgn_pos, src_len); if (end_pos == Bry_.NotFound) { // unclosed "url("; exit since nothing else will be found - usr_dlg.Warn_many(GRP_KEY, "parse.invalid_url.end_missing", "could not find end_sequence for 'url(': bgn='~{0}' end='~{1}'", prv_pos, String_.new_u8_by_len(src, prv_pos, prv_pos + 25)); + usr_dlg.Warn_many(GRP_KEY, "parse.invalid_url.end_missing", "could not find end_sequence for 'url(': bgn='~{0}' end='~{1}'", prv_pos, String_.new_u8__by_len(src, prv_pos, prv_pos + 25)); bfr.Add_mid(src, prv_pos, src_len); break; } if (end_pos - bgn_pos == 0) { // empty; "url()"; ignore - usr_dlg.Warn_many(GRP_KEY, "parse.invalid_url.empty", "'url(' is empty: bgn='~{0}' end='~{1}'", prv_pos, String_.new_u8_by_len(src, prv_pos, prv_pos + 25)); + usr_dlg.Warn_many(GRP_KEY, "parse.invalid_url.empty", "'url(' is empty: bgn='~{0}' end='~{1}'", prv_pos, String_.new_u8__by_len(src, prv_pos, prv_pos + 25)); bfr.Add_mid(src, prv_pos, bgn_pos); prv_pos = bgn_pos; continue; @@ -128,10 +128,10 @@ public class Xoa_css_img_downloader { } bfr.Add_mid(src, old_pos, find_bgn - Bry_import_len).Add_byte_nl(); bfr.Add(Bry_comment_bgn).Add(css_url).Add(Bry_comment_end).Add_byte_nl(); - if (Bry_finder.Find_fwd(css_url, Wikisource_dynimg_ttl) != -1) css_trg_bry = Bry_.Replace(css_trg_bry, Wikisource_dynimg_find, Wikisource_dynimg_repl); // FreedImg hack; PAGE:en.s:Page:Notes_on_Osteology_of_Baptanodon._With_a_Description_of_a_New_Species.pdf/3 DATE:2014-09-06 + if (Bry_find_.Find_fwd(css_url, Wikisource_dynimg_ttl) != -1) css_trg_bry = Bry_.Replace(css_trg_bry, Wikisource_dynimg_find, Wikisource_dynimg_repl); // FreedImg hack; PAGE:en.s:Page:Notes_on_Osteology_of_Baptanodon._With_a_Description_of_a_New_Species.pdf/3 DATE:2014-09-06 bfr.Add(css_trg_bry).Add_byte_nl(); bfr.Add_byte_nl(); - int semic_pos = Bry_finder.Find_fwd(src, Byte_ascii.Semic, find_bgn + url_raw.length, src_len); + int semic_pos = Bry_find_.Find_fwd(src, Byte_ascii.Semic, find_bgn + url_raw.length, src_len); return semic_pos + Int_.Const_dlm_len; } private static final byte[] @@ -143,11 +143,11 @@ public class Xoa_css_img_downloader { int pos_bgn = 0; if (Bry_.Has_at_bgn(raw, Bry_fwd_slashes, 0, raw_len)) pos_bgn = Bry_fwd_slashes.length; if (Bry_.Has_at_bgn(raw, Bry_http, 0, raw_len)) pos_bgn = Bry_http.length; - int pos_slash = Bry_finder.Find_fwd(raw, Byte_ascii.Slash, pos_bgn, raw_len); + int pos_slash = Bry_find_.Find_fwd(raw, Byte_ascii.Slash, pos_bgn, raw_len); if (pos_slash == Bry_.NotFound) return null; // first segment is site_name; at least one slash must be present for image name; EX: site.org/img_name.jpg if (pos_slash == raw_len - 1) return null; // "site.org/" is invalid int pos_end = raw_len; - int pos_question = Bry_finder.Find_bwd(raw, Byte_ascii.Question); + int pos_question = Bry_find_.Find_bwd(raw, Byte_ascii.Question); if (pos_question != Bry_.NotFound) pos_end = pos_question; // remove query params; EX: img_name?key=val return Bry_.Mid(raw, pos_bgn, pos_end); diff --git a/400_xowa/src/gplx/xowa/bldrs/css/Xob_css_parser__import.java b/400_xowa/src/gplx/xowa/bldrs/css/Xob_css_parser__import.java index 42e6dfa83..6da30b0a8 100644 --- a/400_xowa/src/gplx/xowa/bldrs/css/Xob_css_parser__import.java +++ b/400_xowa/src/gplx/xowa/bldrs/css/Xob_css_parser__import.java @@ -22,7 +22,7 @@ class Xob_css_parser__import { private final Xob_css_parser__url url_parser; public Xob_css_parser__import(Xob_css_parser__url url_parser) {this.url_parser = url_parser;} public Xob_css_tkn__base Parse(byte[] src, int src_len, int tkn_bgn, int tkn_end) { // " @import" - int bgn_pos = Bry_finder.Find_fwd_while_ws(src, tkn_end, src_len); // skip any ws after " @import" + int bgn_pos = Bry_find_.Find_fwd_while_ws(src, tkn_end, src_len); // skip any ws after " @import" if (bgn_pos == src_len) return Xob_css_tkn__warn.new_(tkn_bgn, tkn_end, "mirror.parser.import:EOS after import; bgn=~{0}", tkn_bgn); if (!Bry_.Has_at_bgn(src, Tkn_url_bry, bgn_pos, src_len)) return Xob_css_tkn__warn.new_(tkn_bgn, tkn_end, "mirror.parser.import:url missing; bgn=~{0}", tkn_bgn); tkn_end = bgn_pos + Tkn_url_bry.length; @@ -31,7 +31,7 @@ class Xob_css_parser__import { Xob_css_tkn__url url_frag = (Xob_css_tkn__url)frag; byte[] src_url = url_frag.Src_url(); src_url = Bry_.Replace(src_url, Byte_ascii.Space, Byte_ascii.Underline); // NOTE: must replace spaces with underlines else download will fail; EX:https://it.wikivoyage.org/w/index.php?title=MediaWiki:Container e Infobox.css&action=raw&ctype=text/css; DATE:2015-03-08 - int semic_pos = Bry_finder.Find_fwd(src, Byte_ascii.Semic, frag.Pos_end(), src_len); + int semic_pos = Bry_find_.Find_fwd(src, Byte_ascii.Semic, frag.Pos_end(), src_len); return Xob_css_tkn__import.new_(tkn_bgn, semic_pos + 1, src_url, url_frag.Trg_url(), url_frag.Quote_byte()); } private static final byte[] Tkn_url_bry = Bry_.new_a7("url("); diff --git a/400_xowa/src/gplx/xowa/bldrs/css/Xob_css_parser__url.java b/400_xowa/src/gplx/xowa/bldrs/css/Xob_css_parser__url.java index 430ee8b9b..6327f52b4 100644 --- a/400_xowa/src/gplx/xowa/bldrs/css/Xob_css_parser__url.java +++ b/400_xowa/src/gplx/xowa/bldrs/css/Xob_css_parser__url.java @@ -20,7 +20,7 @@ class Xob_css_parser__url { private final byte[] site; public Xob_css_parser__url(byte[] site) {this.site = site;} public Xob_css_tkn__base Parse(byte[] src, int src_len, int tkn_bgn, int tkn_end) { // " url" - int bgn_pos = Bry_finder.Find_fwd_while_ws(src, tkn_end, src_len); // skip any ws after " url(" + int bgn_pos = Bry_find_.Find_fwd_while_ws(src, tkn_end, src_len); // skip any ws after " url(" if (bgn_pos == src_len) return Xob_css_tkn__warn.new_(tkn_bgn, tkn_end, "mirror.parser.url:EOS; bgn=~{0}", tkn_bgn); byte end_byte = src[bgn_pos]; // note that first non-ws byte should determine end_byte byte quote_byte = end_byte; @@ -33,11 +33,11 @@ class Xob_css_parser__url { quote_byte = Byte_ascii.Null; break; } - int end_pos = Bry_finder.Find_fwd(src, end_byte, bgn_pos, src_len); + int end_pos = Bry_find_.Find_fwd(src, end_byte, bgn_pos, src_len); if (end_pos == Bry_.NotFound) // unclosed "url("; exit since nothing else will be found - return Xob_css_tkn__warn.new_(tkn_bgn, tkn_end, "mirror.parser.url:dangling; bgn=~{0} excerpt=~{1}", bgn_pos, String_.new_u8_by_len(src, tkn_bgn, tkn_bgn + 128)); + return Xob_css_tkn__warn.new_(tkn_bgn, tkn_end, "mirror.parser.url:dangling; bgn=~{0} excerpt=~{1}", bgn_pos, String_.new_u8__by_len(src, tkn_bgn, tkn_bgn + 128)); if (end_pos - bgn_pos == 0) // empty; "url()"; ignore - return Xob_css_tkn__warn.new_(tkn_bgn, tkn_end, "mirror.parser.url:empty; bgn=~{0} excerpt=~{1}", bgn_pos, String_.new_u8_by_len(src, tkn_bgn, tkn_bgn + 128)); + return Xob_css_tkn__warn.new_(tkn_bgn, tkn_end, "mirror.parser.url:empty; bgn=~{0} excerpt=~{1}", bgn_pos, String_.new_u8__by_len(src, tkn_bgn, tkn_bgn + 128)); byte[] url_orig = Bry_.Mid(src, bgn_pos, end_pos); int url_orig_len = url_orig.length; ++end_pos; // increment end_pos so rv will be after it; if ( end_byte != Byte_ascii.Paren_end) { // end_byte is apos / quote diff --git a/400_xowa/src/gplx/xowa/bldrs/filters/core/Xob_ttl_filter_mgr_srl.java b/400_xowa/src/gplx/xowa/bldrs/filters/core/Xob_ttl_filter_mgr_srl.java index 622e50bbb..91329f967 100644 --- a/400_xowa/src/gplx/xowa/bldrs/filters/core/Xob_ttl_filter_mgr_srl.java +++ b/400_xowa/src/gplx/xowa/bldrs/filters/core/Xob_ttl_filter_mgr_srl.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.filters.core; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.filters.*; -import gplx.srls.dsvs.*; +import gplx.langs.dsvs.*; class Xob_ttl_filter_mgr_srl extends Dsv_wkr_base { private byte[] ttl; private Hash_adp_bry hash; public Xob_ttl_filter_mgr_srl Init(Hash_adp_bry hash) {this.hash = hash; return this;} diff --git a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_match_mgr.java b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_match_mgr.java index 1c64e3a4e..922c7b3b2 100644 --- a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_match_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_match_mgr.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.filters.dansguardians; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.filters.*; import gplx.core.primitives.*; import gplx.core.btries.*; +import gplx.xowa.langs.*; import gplx.xowa.bldrs.filters.core.*; public class Dg_match_mgr { private int score_init, score_fail; private boolean log_enabled, case_match; diff --git a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_parser.java b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_parser.java index 3964e5c8b..5a3e194fe 100644 --- a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_parser.java @@ -39,7 +39,7 @@ class Dg_parser { int file_id = ++next_id; while (line_bgn < src_len) { ++line_idx; - int line_end = Bry_finder.Find_fwd(src, Byte_ascii.Nl, line_bgn); if (line_end == Bry_finder.Not_found) line_end = src_len; + int line_end = Bry_find_.Find_fwd(src, Byte_ascii.Nl, line_bgn); if (line_end == Bry_find_.Not_found) line_end = src_len; Dg_rule line = Parse_line(rel_path, file_id, line_idx, src, line_bgn, line_end); if (line.Tid() != Dg_rule.Tid_invalid) lines.Add(line); @@ -54,8 +54,8 @@ class Dg_parser { if (src[line_bgn] == Byte_ascii.Hash) return Dg_rule.Itm_comment; // ignore lines starting with hash; EX: "# comment" while (brack_bgn < line_end) { // look for terms bracketed by "<>" if (src[brack_bgn] != Byte_ascii.Lt) {Warn("dg.invalid_line.term must start with angle_bgn", rel_path, line_idx, src, line_bgn, line_end); return Dg_rule.Itm_invalid;} - int brack_end = Bry_finder.Find_fwd(src, Byte_ascii.Gt, brack_bgn); - if (brack_end == Bry_finder.Not_found) {Warn("dg.invalid_line.angle_end not found", rel_path, line_idx, src, line_bgn, line_end); return Dg_rule.Itm_invalid;} + int brack_end = Bry_find_.Find_fwd(src, Byte_ascii.Gt, brack_bgn); + if (brack_end == Bry_find_.Not_found) {Warn("dg.invalid_line.angle_end not found", rel_path, line_idx, src, line_bgn, line_end); return Dg_rule.Itm_invalid;} byte[] word = Bry_.Mid(src, brack_bgn + 1, brack_end); words.Add(word); int next_pos = brack_end + 1; @@ -69,8 +69,8 @@ class Dg_parser { else { brack_bgn = brack_end + 1; if (src[brack_bgn] != Byte_ascii.Lt) {Warn("dg.invalid_line.wrong_term_dlm", rel_path, line_idx, src, line_bgn, line_end); break;} - brack_end = Bry_finder.Find_fwd(src, Byte_ascii.Gt, brack_bgn); - if (brack_end == Bry_finder.Not_found) {Warn("dg.invalid_line.score not found", rel_path, line_idx, src, line_bgn, line_end); break;} + brack_end = Bry_find_.Find_fwd(src, Byte_ascii.Gt, brack_bgn); + if (brack_end == Bry_find_.Not_found) {Warn("dg.invalid_line.score not found", rel_path, line_idx, src, line_bgn, line_end); break;} int parse_score = Bry_.To_int_or(src, brack_bgn + 1, brack_end, Int_.Min_value); if (parse_score == Int_.Min_value) {Warn("dg.invalid_line.score is invalid", rel_path, line_idx, src, line_bgn, line_end); break;} score = parse_score; diff --git a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_base.java b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_base.java index 1f2da6bfa..4f5cbbd49 100644 --- a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_base.java +++ b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_base.java @@ -18,7 +18,7 @@ along with this program. If not, see . package gplx.xowa.bldrs.installs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.core.threads.*; import gplx.xowa.bldrs.*; import gplx.xowa.wikis.domains.*; -import gplx.xowa.wmfs.dumps.*; +import gplx.xowa.wms.dumps.*; abstract class Xoi_cmd_base implements Gfo_thread_cmd { public void Ctor(Xoi_setup_mgr install_mgr, String wiki_key) { this.install_mgr = install_mgr; this.wiki_key = wiki_key; diff --git a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_imageMagick_download.java b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_imageMagick_download.java index a971be19b..5bf70d0ab 100644 --- a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_imageMagick_download.java +++ b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_imageMagick_download.java @@ -23,10 +23,10 @@ class Xoi_cmd_imageMagick_download extends Gfo_thread_cmd_download implements Gf public Xoi_cmd_imageMagick_download(Gfo_usr_dlg usr_dlg, Gfui_kit kit, Io_url trg) {this.Ctor(usr_dlg, kit); this.trg = trg;} Io_url trg; @Override public byte Async_init() { // // byte[] raw = xrg.Exec_as_bry(Src_imageMagick); -// int find_pos = Bry_finder.Find_fwd(raw, Bry_windows_zip); if (find_pos == Bry_.NotFound) return Fail(); -// int bgn_pos = Bry_finder.Find_bwd(raw, Byte_ascii.Quote, find_pos); if (bgn_pos == Bry_.NotFound) return Fail(); +// int find_pos = Bry_find_.Find_fwd(raw, Bry_windows_zip); if (find_pos == Bry_.NotFound) return Fail(); +// int bgn_pos = Bry_find_.Find_bwd(raw, Byte_ascii.Quote, find_pos); if (bgn_pos == Bry_.NotFound) return Fail(); // ++bgn_pos; -// int end_pos = Bry_finder.Find_fwd(raw, Byte_ascii.Quote, bgn_pos); if (end_pos == Bry_.NotFound) return Fail(); +// int end_pos = Bry_find_.Find_fwd(raw, Byte_ascii.Quote, bgn_pos); if (end_pos == Bry_.NotFound) return Fail(); // String src = Src_imageMagick + String_.new_a7(Bry_.Mid(raw, bgn_pos, end_pos)); String src = "http://ftp.sunet.se/pub/multimedia/graphics/ImageMagick/binaries/ImageMagick-6.8.8-1-Q16-x86-windows.zip"; this.Init("downloading", src, trg); diff --git a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_wiki_download.java b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_wiki_download.java index 55d030168..a3bdc015b 100644 --- a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_wiki_download.java +++ b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_wiki_download.java @@ -18,7 +18,7 @@ along with this program. If not, see . package gplx.xowa.bldrs.installs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.gfui.*; import gplx.core.threads.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.utils.*; -import gplx.xowa.wmfs.dumps.*; +import gplx.xowa.wms.dumps.*; class Xoi_cmd_wiki_download extends Gfo_thread_cmd_download implements Gfo_thread_cmd { private Xoi_setup_mgr install_mgr; private String wiki_key, dump_date, dump_type; public Xoi_cmd_wiki_download Ctor_download_(Xoi_setup_mgr install_mgr, String wiki_key, String dump_date, String dump_type) { this.install_mgr = install_mgr; diff --git a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_wiki_tst.java b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_wiki_tst.java index da1ec2f83..5b43f1bbf 100644 --- a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_wiki_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_wiki_tst.java @@ -20,11 +20,11 @@ import org.junit.*; import gplx.core.consoles.*; import gplx.brys.*; import gplx.core.threads.*; import gplx.xowa.setup.maints.*; import gplx.xowa.xtns.wdatas.imports.*; import gplx.xowa.wikis.domains.*; -import gplx.xowa.wmfs.*; import gplx.xowa.wmfs.dumps.*; +import gplx.xowa.wms.*; import gplx.xowa.wms.dumps.*; public class Xoi_cmd_wiki_tst { @Test public void Run() { // MAINT -// Bld_import_list(Xow_wmf_api_mgr.Wikis); -// Bld_cfg_files(Xow_wmf_api_mgr.Wikis); // NOTE: remember to carry over the wikisource / page / index commands from the existing xowa_build_cfg.gfs; also, only run the xowa_build_cfg.gfs once; DATE:2013-10-15; last run: DATE:2014-09-09 +// Bld_import_list(Xow_domain_regy.All); +// Bld_cfg_files(Xow_domain_regy.All); // NOTE: remember to carry over the wikisource / page / index commands from the existing xowa_build_cfg.gfs; also, only run the xowa_build_cfg.gfs once; DATE:2013-10-15; last run: DATE:2014-09-09 } public void Bld_import_list(String... ary) { int ary_len = ary.length; diff --git a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_dump_mgr.java b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_dump_mgr.java index 04106e554..4db011a87 100644 --- a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_dump_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_dump_mgr.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.installs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.ios.*; -import gplx.xowa.wmfs.dumps.*; +import gplx.xowa.wms.dumps.*; public class Xoi_dump_mgr implements GfoInvkAble { public String[] Server_urls() {return server_urls;} private String[] server_urls = String_.Ary(Xowm_dump_file_.Server_wmf_https, Xowm_dump_file_.Server_your_org, Xowm_dump_file_.Server_c3sl, Xowm_dump_file_.Server_masaryk); public String[] Custom_cmds() {return custom_cmds;} private String[] custom_cmds = String_.Ary(Xoi_cmd_wiki_download.Key_wiki_download, Xoi_cmd_wiki_import.KEY); diff --git a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_mirror_parser.java b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_mirror_parser.java index 867ddbbeb..3c1d5b85d 100644 --- a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_mirror_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_mirror_parser.java @@ -23,9 +23,9 @@ public class Xoi_mirror_parser { List_adp rv = List_adp_.new_(); int pos = 0; while (true) { - int bgn = Bry_finder.Find_fwd(raw, CONST_href_bgn, pos); if (bgn == Bry_.NotFound) break; + int bgn = Bry_find_.Find_fwd(raw, CONST_href_bgn, pos); if (bgn == Bry_.NotFound) break; bgn += CONST_href_bgn.length; - int end = Bry_finder.Find_fwd(raw, CONST_href_end, bgn); if (end == Bry_.NotFound) return String_.Ary_empty; + int end = Bry_find_.Find_fwd(raw, CONST_href_end, bgn); if (end == Bry_.NotFound) return String_.Ary_empty; byte[] date = Bry_.Mid(raw, bgn, end); pos = end + CONST_href_end.length; if (Bry_.Match(date, CONST_date_parent_dir)) continue; diff --git a/400_xowa/src/gplx/xowa/bldrs/installs/Xow_cfg_wiki_core.java b/400_xowa/src/gplx/xowa/bldrs/installs/Xow_cfg_wiki_core.java index 79c5181c9..e33e76cc7 100644 --- a/400_xowa/src/gplx/xowa/bldrs/installs/Xow_cfg_wiki_core.java +++ b/400_xowa/src/gplx/xowa/bldrs/installs/Xow_cfg_wiki_core.java @@ -16,6 +16,10 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.installs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; +import gplx.xowa.apps.gfss.*; +import gplx.xowa.langs.*; +import gplx.xowa.nss.*; +import gplx.xowa.wikis.metas.*; public class Xow_cfg_wiki_core { public Xow_cfg_wiki_core(Xowe_wiki wiki) {this.wiki = wiki;} private Xowe_wiki wiki; public void Save() { diff --git a/400_xowa/src/gplx/xowa/bldrs/installs/Xow_cfg_wiki_core_tst.java b/400_xowa/src/gplx/xowa/bldrs/installs/Xow_cfg_wiki_core_tst.java index c8732276e..b22ab49a9 100644 --- a/400_xowa/src/gplx/xowa/bldrs/installs/Xow_cfg_wiki_core_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/installs/Xow_cfg_wiki_core_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.installs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; -import org.junit.*; +import org.junit.*; import gplx.xowa.nss.*; public class Xow_cfg_wiki_core_tst { Xow_cfg_wiki_core_fxt fxt = new Xow_cfg_wiki_core_fxt(); @Before public void init() {fxt.Clear();} diff --git a/400_xowa/src/gplx/xowa/bldrs/langs/Json_itm_wkr__base.java b/400_xowa/src/gplx/xowa/bldrs/langs/Json_itm_wkr__base.java index be9f4d772..d854754b0 100644 --- a/400_xowa/src/gplx/xowa/bldrs/langs/Json_itm_wkr__base.java +++ b/400_xowa/src/gplx/xowa/bldrs/langs/Json_itm_wkr__base.java @@ -16,7 +16,9 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.langs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; -import gplx.core.primitives.*; import gplx.core.json.*; import gplx.php.*; import gplx.gfs.*; +import gplx.core.primitives.*; import gplx.langs.jsons.*; import gplx.langs.phps.*; import gplx.langs.gfss.*; +import gplx.xowa.apps.gfss.*; +import gplx.xowa.langs.*; interface Json_itm_wkr { void Read_kv_sub(byte[] key, byte[] val); } diff --git a/400_xowa/src/gplx/xowa/bldrs/langs/Xob_i18n_parser.java b/400_xowa/src/gplx/xowa/bldrs/langs/Xob_i18n_parser.java index 3126a5e85..8bd89c20c 100644 --- a/400_xowa/src/gplx/xowa/bldrs/langs/Xob_i18n_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/langs/Xob_i18n_parser.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.langs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; +import gplx.xowa.langs.*; public class Xob_i18n_parser { public static void Load_msgs(boolean dirty, Xol_lang lang, Io_url i18n_fil) { String i18n_str = Io_mgr.I.LoadFilStr_args(i18n_fil).MissingIgnored_().Exec(); if (String_.Len_eq_0(i18n_str)) return; diff --git a/400_xowa/src/gplx/xowa/bldrs/langs/Xob_i18n_parser_tst.java b/400_xowa/src/gplx/xowa/bldrs/langs/Xob_i18n_parser_tst.java index 26ef790b0..d71b40592 100644 --- a/400_xowa/src/gplx/xowa/bldrs/langs/Xob_i18n_parser_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/langs/Xob_i18n_parser_tst.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.langs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import org.junit.*; -import gplx.intl.*; +import gplx.core.intls.*; public class Xob_i18n_parser_tst { @Before public void init() {fxt.Clear();} private Xob_i18n_parser_fxt fxt = new Xob_i18n_parser_fxt(); @Test public void Basic() { diff --git a/400_xowa/src/gplx/xowa/bldrs/langs/Xobc_utl_make_lang.java b/400_xowa/src/gplx/xowa/bldrs/langs/Xobc_utl_make_lang.java index 4983562bb..3c49a8c08 100644 --- a/400_xowa/src/gplx/xowa/bldrs/langs/Xobc_utl_make_lang.java +++ b/400_xowa/src/gplx/xowa/bldrs/langs/Xobc_utl_make_lang.java @@ -16,8 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.langs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; -import gplx.xowa.apps.fsys.*; import gplx.xowa.apps.langs.*; -import gplx.xowa.langs.*; +import gplx.xowa.apps.fsys.*; +import gplx.xowa.langs.*; import gplx.xowa.langs.cfgs.*; public class Xobc_utl_make_lang implements GfoInvkAble { private final Xoa_lang_mgr lang_mgr; private final Xoa_fsys_mgr fsys_mgr; Xol_mw_lang_parser lang_parser; public Xobc_utl_make_lang(Xoa_lang_mgr lang_mgr, Xoa_fsys_mgr fsys_mgr, Gfo_msg_log msg_log) { diff --git a/400_xowa/src/gplx/xowa/bldrs/langs/Xobc_utl_make_lang_kwds.java b/400_xowa/src/gplx/xowa/bldrs/langs/Xobc_utl_make_lang_kwds.java index 27a7eb605..f7f1142f0 100644 --- a/400_xowa/src/gplx/xowa/bldrs/langs/Xobc_utl_make_lang_kwds.java +++ b/400_xowa/src/gplx/xowa/bldrs/langs/Xobc_utl_make_lang_kwds.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.langs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; -import gplx.xowa.langs.*; import gplx.xowa.apps.langs.*; +import gplx.xowa.langs.*; import gplx.xowa.langs.cfgs.*; public class Xobc_utl_make_lang_kwds implements GfoInvkAble, Xol_lang_transform { private final Xoa_lang_mgr lang_mgr; public Xobc_utl_make_lang_kwds(Xoa_lang_mgr lang_mgr) {this.lang_mgr = lang_mgr;} @@ -127,7 +127,7 @@ public class Xobc_utl_make_lang_kwds implements GfoInvkAble, Xol_lang_transform case Byte_ascii.Nl: if (pos - fld_bgn > 0 || fld_idx == 1) { byte[] cur_val = csv_parser.Load(src, fld_bgn, pos); - Xobcl_kwd_row row = new Xobcl_kwd_row(cur_key, Bry_.Split(cur_val, Byte_ascii.Tilde)); + Xobcl_kwd_row row = new Xobcl_kwd_row(cur_key, Bry_split_.Split(cur_val, Byte_ascii.Tilde)); rv.Add(row); } fld_bgn = pos + 1; diff --git a/400_xowa/src/gplx/xowa/bldrs/langs/Xobc_utl_make_lang_tst.java b/400_xowa/src/gplx/xowa/bldrs/langs/Xobc_utl_make_lang_tst.java index 47ff28782..eead727e7 100644 --- a/400_xowa/src/gplx/xowa/bldrs/langs/Xobc_utl_make_lang_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/langs/Xobc_utl_make_lang_tst.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.langs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import org.junit.*; import gplx.core.strings.*; +import gplx.xowa.langs.*; public class Xobc_utl_make_lang_tst { @Before public void init() {fxt.Clear();} private Xobc_utl_make_lang_fxt fxt = new Xobc_utl_make_lang_fxt(); @Test public void Parse() { diff --git a/400_xowa/src/gplx/xowa/bldrs/langs/Xol_mw_lang_parser.java b/400_xowa/src/gplx/xowa/bldrs/langs/Xol_mw_lang_parser.java index 25179e1f9..14c1d93be 100644 --- a/400_xowa/src/gplx/xowa/bldrs/langs/Xol_mw_lang_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/langs/Xol_mw_lang_parser.java @@ -16,8 +16,10 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.langs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; -import gplx.core.primitives.*; import gplx.core.btries.*; import gplx.core.consoles.*; import gplx.intl.*; import gplx.php.*; +import gplx.core.primitives.*; import gplx.core.btries.*; import gplx.core.consoles.*; import gplx.core.intls.*; import gplx.langs.phps.*; +import gplx.xowa.apps.gfss.*; import gplx.xowa.apps.fsys.*; import gplx.xowa.langs.*; import gplx.xowa.langs.numbers.*; +import gplx.xowa.nss.*; public class Xol_mw_lang_parser { private Php_parser parser = new Php_parser(); private Php_evaluator evaluator; public Xol_mw_lang_parser(Gfo_msg_log msg_log) {evaluator = new Php_evaluator(msg_log);} diff --git a/400_xowa/src/gplx/xowa/bldrs/langs/Xol_mw_lang_parser_tst.java b/400_xowa/src/gplx/xowa/bldrs/langs/Xol_mw_lang_parser_tst.java index b104820cd..2a7d98b01 100644 --- a/400_xowa/src/gplx/xowa/bldrs/langs/Xol_mw_lang_parser_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/langs/Xol_mw_lang_parser_tst.java @@ -17,7 +17,9 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.langs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import org.junit.*; -import gplx.intl.*; import gplx.xowa.parsers.lnkis.*; +import gplx.core.intls.*; import gplx.xowa.parsers.lnkis.*; +import gplx.xowa.nss.*; +import gplx.xowa.langs.*; public class Xol_mw_lang_parser_tst { @Before public void init() {fxt.Clear();} private Xol_mw_lang_parser_fxt fxt = new Xol_mw_lang_parser_fxt(); @Test public void Core_keywords() { diff --git a/400_xowa/src/gplx/xowa/bldrs/sqls/Sql_file_parser.java b/400_xowa/src/gplx/xowa/bldrs/sqls/Sql_file_parser.java index fcbcb6dee..201d194b0 100644 --- a/400_xowa/src/gplx/xowa/bldrs/sqls/Sql_file_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/sqls/Sql_file_parser.java @@ -72,9 +72,9 @@ public class Sql_file_parser { byte b = bfr[cur_pos]; switch (mode) { case Mode_sql_bgn: - cur_pos = Bry_finder.Find_fwd(bfr, Bry_insert_into, cur_pos); + cur_pos = Bry_find_.Find_fwd(bfr, Bry_insert_into, cur_pos); if (cur_pos == Bry_.NotFound || cur_pos > bfr_len) {reading_file = false; continue;} - cur_pos = Bry_finder.Find_fwd(bfr, Bry_values, cur_pos); + cur_pos = Bry_find_.Find_fwd(bfr, Bry_values, cur_pos); if (cur_pos == Bry_.NotFound || cur_pos > bfr_len) throw Err_.new_wo_type("VALUES not found"); // something went wrong; mode = Mode_fld; cur_pos += Bry_values.length; diff --git a/400_xowa/src/gplx/xowa/bldrs/sqls/Sql_fld_mgr.java b/400_xowa/src/gplx/xowa/bldrs/sqls/Sql_fld_mgr.java index 2c228fc62..86e6b8369 100644 --- a/400_xowa/src/gplx/xowa/bldrs/sqls/Sql_fld_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/sqls/Sql_fld_mgr.java @@ -25,23 +25,23 @@ class Sql_fld_mgr { } private Ordered_hash hash = Ordered_hash_.new_bry_(); public Sql_fld_mgr Parse(byte[] raw) { hash.Clear(); - int bgn = Bry_finder.Find_fwd(raw, Tkn_create_table); if (bgn == Bry_.NotFound) throw Err_.new_wo_type("could not find 'CREATE TABLE'"); - bgn = Bry_finder.Find_fwd(raw, Byte_ascii.Nl, bgn); if (bgn == Bry_.NotFound) throw Err_.new_wo_type("could not find new line after 'CREATE TABLE'"); + int bgn = Bry_find_.Find_fwd(raw, Tkn_create_table); if (bgn == Bry_.NotFound) throw Err_.new_wo_type("could not find 'CREATE TABLE'"); + bgn = Bry_find_.Find_fwd(raw, Byte_ascii.Nl, bgn); if (bgn == Bry_.NotFound) throw Err_.new_wo_type("could not find new line after 'CREATE TABLE'"); bgn += Int_.Const_position_after_char; - int end = Bry_finder.Find_fwd(raw, Tkn_unique_index); if (end == Bry_.NotFound) throw Err_.new_wo_type("could not find 'UNIQUE KEY'"); - end = Bry_finder.Find_bwd(raw, Byte_ascii.Nl, end); if (bgn == Bry_.NotFound) throw Err_.new_wo_type("could not find new line before 'UNIQUE KEY'"); + int end = Bry_find_.Find_fwd(raw, Tkn_unique_index); if (end == Bry_.NotFound) throw Err_.new_wo_type("could not find 'UNIQUE KEY'"); + end = Bry_find_.Find_bwd(raw, Byte_ascii.Nl, end); if (bgn == Bry_.NotFound) throw Err_.new_wo_type("could not find new line before 'UNIQUE KEY'"); Parse_lines(Bry_.Mid(raw, bgn, end)); return this; } private void Parse_lines(byte[] raw) { - byte[][] lines = Bry_.Split(raw, Byte_ascii.Nl); + byte[][] lines = Bry_split_.Split(raw, Byte_ascii.Nl); int lines_len = lines.length; int fld_idx = 0; for (int i = 0; i < lines_len; i++) { byte[] line = lines[i]; - int bgn = Bry_finder.Find_fwd(line, Byte_ascii.Tick); if (bgn == Bry_.NotFound) continue; // skip blank lines + int bgn = Bry_find_.Find_fwd(line, Byte_ascii.Tick); if (bgn == Bry_.NotFound) continue; // skip blank lines bgn += Int_.Const_position_after_char; - int end = Bry_finder.Find_fwd(line, Byte_ascii.Tick, bgn); if (end == Bry_.NotFound) continue; // skip blank lines + int end = Bry_find_.Find_fwd(line, Byte_ascii.Tick, bgn); if (end == Bry_.NotFound) continue; // skip blank lines byte[] key = Bry_.Mid(line, bgn, end); Sql_fld_itm fld = new Sql_fld_itm(fld_idx++, key); hash.Add(fld.Key(), fld); diff --git a/400_xowa/src/gplx/xowa/bldrs/wiki_cfgs/Xob_subpage_parser.java b/400_xowa/src/gplx/xowa/bldrs/wiki_cfgs/Xob_subpage_parser.java index 756034073..120f7709a 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wiki_cfgs/Xob_subpage_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/wiki_cfgs/Xob_subpage_parser.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.wiki_cfgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; -import gplx.php.*; import gplx.xowa.bldrs.langs.*; +import gplx.langs.phps.*; import gplx.xowa.bldrs.langs.*; class Xob_subpage_parser { public Xob_subpage_wiki[] Parse(byte[] src) { src = Bry_.Add(Bry_.new_a7("$a = array("), src, Bry_.new_a7(");")); diff --git a/400_xowa/src_210_bldr_core/gplx/xowa/Xob_idx_base.java b/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_idx_base.java similarity index 91% rename from 400_xowa/src_210_bldr_core/gplx/xowa/Xob_idx_base.java rename to 400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_idx_base.java index 6627e1eb7..03f77a4c5 100644 --- a/400_xowa/src_210_bldr_core/gplx/xowa/Xob_idx_base.java +++ b/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_idx_base.java @@ -15,8 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; -import gplx.core.flds.*; import gplx.ios.*; import gplx.xowa.bldrs.*; +package gplx.xowa.bldrs.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; +import gplx.core.flds.*; import gplx.ios.*; public abstract class Xob_idx_base extends Xob_itm_basic_base implements Xob_cmd, GfoInvkAble { public abstract String Cmd_key(); public Gfo_fld_wtr Fld_wtr() {return fld_wtr;} Gfo_fld_wtr fld_wtr = Gfo_fld_wtr.xowa_(); diff --git a/400_xowa/src_210_bldr_core/gplx/xowa/Xob_itm_basic_base.java b/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_itm_basic_base.java similarity index 93% rename from 400_xowa/src_210_bldr_core/gplx/xowa/Xob_itm_basic_base.java rename to 400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_itm_basic_base.java index 0cbc25c8a..beb98be25 100644 --- a/400_xowa/src_210_bldr_core/gplx/xowa/Xob_itm_basic_base.java +++ b/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_itm_basic_base.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.bldrs.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; public abstract class Xob_itm_basic_base implements GfoInvkAble { protected Xoae_app app; protected Xob_bldr bldr; protected Xowe_wiki wiki; protected Gfo_usr_dlg usr_dlg; public void Cmd_ctor(Xob_bldr bldr, Xowe_wiki wiki) {this.bldr = bldr; this.wiki = wiki; this.app = bldr.App(); usr_dlg = bldr.Usr_dlg(); this.Cmd_ctor_end(bldr, wiki);} diff --git a/400_xowa/src_210_bldr_core/gplx/xowa/Xob_itm_dump_base.java b/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_itm_dump_base.java similarity index 95% rename from 400_xowa/src_210_bldr_core/gplx/xowa/Xob_itm_dump_base.java rename to 400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_itm_dump_base.java index ab83a1f8b..1722a020f 100644 --- a/400_xowa/src_210_bldr_core/gplx/xowa/Xob_itm_dump_base.java +++ b/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_itm_dump_base.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.bldrs.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.ios.*; import gplx.xowa.apps.*; public abstract class Xob_itm_dump_base extends Xob_itm_basic_base { diff --git a/400_xowa/src/gplx/xowa/bldrs/Xob_sql_dump_base.java b/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_sql_dump_base.java similarity index 93% rename from 400_xowa/src/gplx/xowa/bldrs/Xob_sql_dump_base.java rename to 400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_sql_dump_base.java index 52dab3e67..71eb4027d 100644 --- a/400_xowa/src/gplx/xowa/bldrs/Xob_sql_dump_base.java +++ b/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_sql_dump_base.java @@ -15,9 +15,9 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; +package gplx.xowa.bldrs.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.core.flds.*; import gplx.ios.*; import gplx.xowa.tdbs.*; -import gplx.xowa.bldrs.sqls.*; +import gplx.xowa.bldrs.sqls.*; import gplx.xowa.tdbs.bldrs.*; public abstract class Xob_sql_dump_base extends Xob_itm_dump_base implements Xob_cmd, GfoInvkAble { private final Sql_file_parser parser = new Sql_file_parser(); private boolean fail = false; public abstract String Cmd_key(); diff --git a/400_xowa/src_210_bldr_core/gplx/xowa/Xob_tmp_wtr.java b/400_xowa/src/gplx/xowa/bldrs/wtrs/Xob_tmp_wtr.java similarity index 93% rename from 400_xowa/src_210_bldr_core/gplx/xowa/Xob_tmp_wtr.java rename to 400_xowa/src/gplx/xowa/bldrs/wtrs/Xob_tmp_wtr.java index ec0b3106b..6206f1ffd 100644 --- a/400_xowa/src_210_bldr_core/gplx/xowa/Xob_tmp_wtr.java +++ b/400_xowa/src/gplx/xowa/bldrs/wtrs/Xob_tmp_wtr.java @@ -15,8 +15,9 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.bldrs.wtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.ios.*; +import gplx.xowa.nss.*; public class Xob_tmp_wtr { Xob_tmp_wtr(Xow_ns ns_itm, Io_url_gen url_gen, int fil_max) { this.ns_itm = ns_itm; diff --git a/400_xowa/src_210_bldr_core/gplx/xowa/Xob_tmp_wtr_mgr.java b/400_xowa/src/gplx/xowa/bldrs/wtrs/Xob_tmp_wtr_mgr.java similarity index 91% rename from 400_xowa/src_210_bldr_core/gplx/xowa/Xob_tmp_wtr_mgr.java rename to 400_xowa/src/gplx/xowa/bldrs/wtrs/Xob_tmp_wtr_mgr.java index b24403856..44da6ab28 100644 --- a/400_xowa/src_210_bldr_core/gplx/xowa/Xob_tmp_wtr_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/wtrs/Xob_tmp_wtr_mgr.java @@ -15,7 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.bldrs.wtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; +import gplx.xowa.nss.*; public class Xob_tmp_wtr_mgr { public Xob_tmp_wtr[] Regy() {return regy;} private Xob_tmp_wtr[] regy = new Xob_tmp_wtr[Ns_ordinal_max]; public Xob_tmp_wtr_mgr(Xob_tmp_wtr_wkr wkr) {this.wkr = wkr;} private Xob_tmp_wtr_wkr wkr; diff --git a/400_xowa/src_210_bldr_core/gplx/xowa/Xob_tmp_wtr_wkr.java b/400_xowa/src/gplx/xowa/bldrs/wtrs/Xob_tmp_wtr_wkr.java similarity index 87% rename from 400_xowa/src_210_bldr_core/gplx/xowa/Xob_tmp_wtr_wkr.java rename to 400_xowa/src/gplx/xowa/bldrs/wtrs/Xob_tmp_wtr_wkr.java index 7e0a5bf6d..2e80936d1 100644 --- a/400_xowa/src_210_bldr_core/gplx/xowa/Xob_tmp_wtr_wkr.java +++ b/400_xowa/src/gplx/xowa/bldrs/wtrs/Xob_tmp_wtr_wkr.java @@ -15,8 +15,9 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.bldrs.wtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.ios.*; +import gplx.xowa.nss.*; public interface Xob_tmp_wtr_wkr { Xob_tmp_wtr Tmp_wtr_new(Xow_ns ns); } diff --git a/400_xowa/src_210_bldr_core/gplx/xowa/Xob_tmp_wtr_wkr__ttl.java b/400_xowa/src/gplx/xowa/bldrs/wtrs/Xob_tmp_wtr_wkr__ttl.java similarity index 90% rename from 400_xowa/src_210_bldr_core/gplx/xowa/Xob_tmp_wtr_wkr__ttl.java rename to 400_xowa/src/gplx/xowa/bldrs/wtrs/Xob_tmp_wtr_wkr__ttl.java index 784539586..2d16c2050 100644 --- a/400_xowa/src_210_bldr_core/gplx/xowa/Xob_tmp_wtr_wkr__ttl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wtrs/Xob_tmp_wtr_wkr__ttl.java @@ -15,8 +15,9 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.bldrs.wtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.ios.*; +import gplx.xowa.nss.*; public class Xob_tmp_wtr_wkr__ttl implements Xob_tmp_wtr_wkr { public Xob_tmp_wtr_wkr__ttl(Io_url temp_dir, int dump_fil_len) {this.temp_dir = temp_dir; this.dump_fil_len = dump_fil_len;} Io_url temp_dir; int dump_fil_len; public Xob_tmp_wtr Tmp_wtr_new(Xow_ns ns) { diff --git a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_siteinfo_parser.java b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_siteinfo_parser.java index 2f39e8d7e..058f6dd73 100644 --- a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_siteinfo_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_siteinfo_parser.java @@ -17,14 +17,15 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.xmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.ios.*; import gplx.xmls.*; // NOTE: gplx.xmls does not support Android; DATE:2013-01-17 +import gplx.xowa.nss.*; public class Xob_siteinfo_parser { public static byte[] Siteinfo_extract(gplx.ios.Io_stream_rdr src_rdr) { Io_buffer_rdr rdr = Io_buffer_rdr.Null; try { rdr = Io_buffer_rdr.new_(src_rdr, Io_mgr.Len_mb); // ASSUME: siteInfo is fully contained in the 1st MB of the src_xml byte[] src = rdr.Bfr(); - int bgn = Bry_finder.Find_fwd(src, Bry_siteinfo_bgn, 0) ; if (bgn == Bry_.NotFound) return null; - int end = Bry_finder.Find_fwd(src, Bry_siteinfo_end, bgn); if (end == Bry_.NotFound) return null; + int bgn = Bry_find_.Find_fwd(src, Bry_siteinfo_bgn, 0) ; if (bgn == Bry_.NotFound) return null; + int end = Bry_find_.Find_fwd(src, Bry_siteinfo_end, bgn); if (end == Bry_.NotFound) return null; return Bry_.Mid(src, bgn, end + Bry_siteinfo_end.length); } catch (Exception e) {Err_.Noop(e); return null;} @@ -56,9 +57,9 @@ public class Xob_siteinfo_parser { } private static byte[] Siteinfo_parse_mainpage(byte[] url) { byte[] wiki_bry = Xoa_consts.Url_wiki_intermediary; - int bgn_pos = Bry_finder.Find_fwd(url, wiki_bry, 0); + int bgn_pos = Bry_find_.Find_fwd(url, wiki_bry, 0); if (bgn_pos == Bry_.NotFound) { // "/wiki/" not found; EX: http://mywiki/My_main_page - bgn_pos = Bry_finder.Find_bwd(url, Byte_ascii.Slash); // ASSUME last segment is page + bgn_pos = Bry_find_.Find_bwd(url, Byte_ascii.Slash); // ASSUME last segment is page if (bgn_pos == Bry_.NotFound) throw Err_.new_wo_type("could not parse main page url", "url", String_.new_u8(url)); ++bgn_pos; // add 1 to position after slash } diff --git a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_dumper.java b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_dumper.java index caea4e893..e9e4d48e9 100644 --- a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_dumper.java +++ b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_dumper.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.xmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; -import gplx.core.xmls.*; +import gplx.langs.xmls.*; +import gplx.xowa.nss.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.data.tbls.*; public class Xob_xml_dumper { private final Gfo_xml_wtr wtr = new Gfo_xml_wtr(); diff --git a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_dumper_tst.java b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_dumper_tst.java index aa0968605..44dca6dfa 100644 --- a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_dumper_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_dumper_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.xmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; -import org.junit.*; import gplx.xowa.wikis.data.tbls.*; +import org.junit.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.nss.*; public class Xob_xml_dumper_tst { private final Xob_xml_dumper_fxt fxt = new Xob_xml_dumper_fxt(); @Before public void init() {fxt.Clear();} diff --git a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser.java b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser.java index 04933cccf..3eec46ca4 100644 --- a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.bldrs.xmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.core.btries.*; import gplx.ios.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.xowa.nss.*; public class Xob_xml_parser { Btrie_fast_mgr trie = Xob_xml_parser_.trie_(); Bry_bfr data_bfr = Bry_bfr.new_(); DateAdp_parser date_parser = DateAdp_parser.new_(); public Xob_xml_parser Tag_len_max_(int v) {tag_len_max = v; return this;} private int tag_len_max = 255; // max size of any (a) xml tag, (b) int or (c) date; everything else goes into a data_bfr diff --git a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser_tst.java b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser_tst.java index ab803abcd..bd3ed71c1 100644 --- a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.bldrs.xmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; -import org.junit.*; import gplx.ios.*; import gplx.xowa.wikis.data.tbls.*; +import org.junit.*; import gplx.ios.*; import gplx.xowa.nss.*; import gplx.xowa.wikis.data.tbls.*; public class Xob_xml_parser_tst { @Before public void init() { Io_mgr.I.InitEngine_mem(); diff --git a/400_xowa/src/gplx/xowa/cfgs/Xoa_cfg_db_txt.java b/400_xowa/src/gplx/xowa/cfgs/Xoa_cfg_db_txt.java index 85c9cd7d7..84b1e5265 100644 --- a/400_xowa/src/gplx/xowa/cfgs/Xoa_cfg_db_txt.java +++ b/400_xowa/src/gplx/xowa/cfgs/Xoa_cfg_db_txt.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.cfgs; import gplx.*; import gplx.xowa.*; -import gplx.xowa.apps.*; +import gplx.xowa.apps.gfss.*; public class Xoa_cfg_db_txt implements Xoa_cfg_db { private Bry_fmtr fmtr = Bry_fmtr.new_("app.cfgs.get('~{msg}', '~{wiki}').val = '~{val}';\n", "msg", "wiki", "val"); public void Cfg_reset_all(Xoa_cfg_mgr cfg_mgr) { diff --git a/400_xowa/src_120_wiki/gplx/xowa/Xowc_parser.java b/400_xowa/src/gplx/xowa/cfgs/Xowc_parser.java similarity index 95% rename from 400_xowa/src_120_wiki/gplx/xowa/Xowc_parser.java rename to 400_xowa/src/gplx/xowa/cfgs/Xowc_parser.java index 897c16486..d65cc9a34 100644 --- a/400_xowa/src_120_wiki/gplx/xowa/Xowc_parser.java +++ b/400_xowa/src/gplx/xowa/cfgs/Xowc_parser.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.cfgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.parsers.lnkis.cfgs.*; public class Xowc_parser implements GfoInvkAble { public Xowc_parser(Xowe_wiki wiki) { diff --git a/400_xowa/src_120_wiki/gplx/xowa/Xowc_xtn_pages.java b/400_xowa/src/gplx/xowa/cfgs/Xowc_xtn_pages.java similarity index 96% rename from 400_xowa/src_120_wiki/gplx/xowa/Xowc_xtn_pages.java rename to 400_xowa/src/gplx/xowa/cfgs/Xowc_xtn_pages.java index 79bd41917..be0503796 100644 --- a/400_xowa/src_120_wiki/gplx/xowa/Xowc_xtn_pages.java +++ b/400_xowa/src/gplx/xowa/cfgs/Xowc_xtn_pages.java @@ -15,7 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.cfgs; import gplx.*; import gplx.xowa.*; +import gplx.xowa.nss.*; public class Xowc_xtn_pages implements GfoInvkAble { public boolean Init_needed() {return init_needed;} private boolean init_needed = true; public int Ns_page_id() {return ns_page_id;} private int ns_page_id = Int_.Min_value; diff --git a/400_xowa/src_120_wiki/gplx/xowa/Xowc_xtn_pages_tst.java b/400_xowa/src/gplx/xowa/cfgs/Xowc_xtn_pages_tst.java similarity index 94% rename from 400_xowa/src_120_wiki/gplx/xowa/Xowc_xtn_pages_tst.java rename to 400_xowa/src/gplx/xowa/cfgs/Xowc_xtn_pages_tst.java index 37420ea21..a964961a5 100644 --- a/400_xowa/src_120_wiki/gplx/xowa/Xowc_xtn_pages_tst.java +++ b/400_xowa/src/gplx/xowa/cfgs/Xowc_xtn_pages_tst.java @@ -15,8 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; -import org.junit.*; import gplx.xowa.wikis.*; +package gplx.xowa.cfgs; import gplx.*; import gplx.xowa.*; +import org.junit.*; import gplx.xowa.wikis.*; import gplx.xowa.nss.*; public class Xowc_xtn_pages_tst { @Before public void init() {fxt.Clear();} private Xowc_xtn_pages_fxt fxt = new Xowc_xtn_pages_fxt(); @Test public void Init() { diff --git a/400_xowa/src_120_wiki/gplx/xowa/Xowc_xtns.java b/400_xowa/src/gplx/xowa/cfgs/Xowc_xtns.java similarity index 94% rename from 400_xowa/src_120_wiki/gplx/xowa/Xowc_xtns.java rename to 400_xowa/src/gplx/xowa/cfgs/Xowc_xtns.java index b038429a0..fa19809e6 100644 --- a/400_xowa/src_120_wiki/gplx/xowa/Xowc_xtns.java +++ b/400_xowa/src/gplx/xowa/cfgs/Xowc_xtns.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.cfgs; import gplx.*; import gplx.xowa.*; public class Xowc_xtns implements GfoInvkAble { private Hash_adp_bry hash = Hash_adp_bry.ci_a7(); public Xowc_xtns() {hash.Add(Xowc_xtn_pages.Xtn_key, itm_pages);} diff --git a/400_xowa/src/gplx/xowa/cfgs/gui/Xocfg_win.java b/400_xowa/src/gplx/xowa/cfgs/gui/Xocfg_win.java index 653cf5cb1..76a42e517 100644 --- a/400_xowa/src/gplx/xowa/cfgs/gui/Xocfg_win.java +++ b/400_xowa/src/gplx/xowa/cfgs/gui/Xocfg_win.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.cfgs.gui; import gplx.*; import gplx.xowa.*; import gplx.xowa.cfgs.*; +import gplx.xowa.langs.*; public class Xocfg_win implements GfoInvkAble { public Xocfg_win(Xoae_app app) {} public Xol_font_info Font() {return font;} private Xol_font_info font = new Xol_font_info("Arial", 8, gplx.gfui.FontStyleAdp_.Plain); diff --git a/400_xowa/src_120_wiki/gplx/xowa/Xow_gui_mgr.java b/400_xowa/src/gplx/xowa/cfgs/gui/Xow_gui_mgr.java similarity index 92% rename from 400_xowa/src_120_wiki/gplx/xowa/Xow_gui_mgr.java rename to 400_xowa/src/gplx/xowa/cfgs/gui/Xow_gui_mgr.java index fcced5842..385c6728b 100644 --- a/400_xowa/src_120_wiki/gplx/xowa/Xow_gui_mgr.java +++ b/400_xowa/src/gplx/xowa/cfgs/gui/Xow_gui_mgr.java @@ -15,8 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; -import gplx.xowa.cfgs.gui.*; +package gplx.xowa.cfgs.gui; import gplx.*; import gplx.xowa.*; import gplx.xowa.cfgs.*; public class Xow_gui_mgr implements GfoInvkAble { public Xocfg_html Cfg_browser() {return cfg_browser;} private Xocfg_html cfg_browser = new Xocfg_html(); public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { diff --git a/400_xowa/src/gplx/xowa/cfgs2/Xocfg_bnd_itm.java b/400_xowa/src/gplx/xowa/cfgs2/Xocfg_bnd_itm.java index b70373549..2f3b65e2e 100644 --- a/400_xowa/src/gplx/xowa/cfgs2/Xocfg_bnd_itm.java +++ b/400_xowa/src/gplx/xowa/cfgs2/Xocfg_bnd_itm.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.cfgs2; import gplx.*; import gplx.xowa.*; import gplx.gfui.*; import gplx.xowa.gui.bnds.*; import gplx.xowa.gui.cmds.*; -import gplx.gfs.*; import gplx.xowa.apps.*; +import gplx.langs.gfss.*; import gplx.xowa.apps.*; public class Xocfg_bnd_itm implements GfoInvkAble { private Xocfg_bnd_mgr mgr; public Xocfg_bnd_itm(Xocfg_bnd_mgr mgr, Xog_cmd_itm cmd, Xog_bnd_itm bnd) { diff --git a/400_xowa/src/gplx/xowa/cfgs2/Xocfg_bnd_itm_srl.java b/400_xowa/src/gplx/xowa/cfgs2/Xocfg_bnd_itm_srl.java index 64ffb8b8e..b33e0e6d1 100644 --- a/400_xowa/src/gplx/xowa/cfgs2/Xocfg_bnd_itm_srl.java +++ b/400_xowa/src/gplx/xowa/cfgs2/Xocfg_bnd_itm_srl.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.cfgs2; import gplx.*; import gplx.xowa.*; import gplx.gfui.*; import gplx.xowa.gui.bnds.*; -import gplx.gfs.*; import gplx.xowa.apps.*; +import gplx.langs.gfss.*; import gplx.xowa.apps.gfss.*; public class Xocfg_bnd_itm_srl implements GfoInvkAble { private Xoae_app app; public Xocfg_bnd_itm_srl(Xoae_app app, String key) { diff --git a/400_xowa/src/gplx/xowa/cfgs2/Xocfg_bnd_mgr.java b/400_xowa/src/gplx/xowa/cfgs2/Xocfg_bnd_mgr.java index cf3c77c48..ab6d2885d 100644 --- a/400_xowa/src/gplx/xowa/cfgs2/Xocfg_bnd_mgr.java +++ b/400_xowa/src/gplx/xowa/cfgs2/Xocfg_bnd_mgr.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.cfgs2; import gplx.*; import gplx.xowa.*; import gplx.gfui.*; import gplx.xowa.gui.bnds.*; import gplx.xowa.gui.cmds.*; -import gplx.xowa.fmtrs.*; +import gplx.xowa.apps.fmtrs.*; public class Xocfg_bnd_mgr implements GfoInvkAble, Gfo_sort_able { private Xog_bnd_mgr_srl bnd_mgr_srl; private Xog_cmd_mgr cmd_mgr; private Xoa_fmtr_sort_mgr sorter; diff --git a/400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_all.java b/400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_all.java index 184335572..2fdabb1a2 100644 --- a/400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_all.java +++ b/400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_all.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.ctgs; import gplx.*; import gplx.xowa.*; +import gplx.xowa.langs.*; class Xoctg_fmtr_all { public Xoctg_fmtr_all(byte tid) {this.Ctor(tid);} public byte Tid() {return tid;} private byte tid; diff --git a/400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_grp.java b/400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_grp.java index f9f84efa7..93be04d5c 100644 --- a/400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_grp.java +++ b/400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_grp.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.ctgs; import gplx.*; import gplx.xowa.*; +import gplx.xowa.langs.*; class Xoctg_fmtr_grp implements Bry_fmtr_arg { public void Init_from_all(Xowe_wiki wiki, Xol_lang lang, Xoctg_view_ctg ctg, Xoctg_fmtr_all mgr, Xoctg_view_grp itms_list) { this.wiki = wiki; this.mgr = mgr; this.itms_fmtr = mgr.Fmtr_itm(); this.itms_list = itms_list; len = itms_list.Len(); @@ -29,7 +30,7 @@ class Xoctg_fmtr_grp implements Bry_fmtr_arg { while (cur_idx < len) { Xoctg_view_itm itm = itms_list.Itms()[cur_idx]; byte[] itm_sortkey = itm.Sortkey(); - byte[] ttl_char_0_new = gplx.intl.Utf8_.Get_char_at_pos_as_bry(itm_sortkey, 0); + byte[] ttl_char_0_new = gplx.core.intls.Utf8_.Get_char_at_pos_as_bry(itm_sortkey, 0); byte[] grp_name = ttl_char_0_new; if (Bry_.Eq(ttl_char_0, ttl_char_0_new)) { grp_name = Bry_.Add(ttl_char_0, Byte_ascii.Space_bry, wiki.Msg_mgr().Val_by_id(Xol_msg_itm_.Id_list_continues)); diff --git a/400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_itm.java b/400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_itm.java index 1305207bd..095480881 100644 --- a/400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_itm.java +++ b/400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_itm.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hrefs.*; import gplx.xowa.html.lnkis.*; +import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; import gplx.xowa.users.history.*; abstract class Xoctg_fmtr_itm_base implements Xoctg_fmtr_itm { public void Init_from_all(Xowe_wiki wiki, Xol_lang lang, Xoctg_view_ctg ctg, Xoctg_fmtr_all mgr, Xoctg_view_grp itms_list, int itms_list_len) { diff --git a/400_xowa/src/gplx/xowa/ctgs/Xoctg_html_mgr.java b/400_xowa/src/gplx/xowa/ctgs/Xoctg_html_mgr.java index 8e1b20160..6396fb4be 100644 --- a/400_xowa/src/gplx/xowa/ctgs/Xoctg_html_mgr.java +++ b/400_xowa/src/gplx/xowa/ctgs/Xoctg_html_mgr.java @@ -17,6 +17,8 @@ along with this program. If not, see . */ package gplx.xowa.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.dbs.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; +import gplx.xowa.nss.*; public class Xoctg_html_mgr implements GfoInvkAble { @gplx.Internal protected Xoctg_fmtr_grp Fmtr_grp() {return fmtr_grp;} private Xoctg_fmtr_grp fmtr_grp = new Xoctg_fmtr_grp(); private final Xoctg_fmtr_all mgr_subcs = new Xoctg_fmtr_all(Xoa_ctg_mgr.Tid_subc); diff --git a/400_xowa/src/gplx/xowa/ctgs/Xoctg_idx_mgr.java b/400_xowa/src/gplx/xowa/ctgs/Xoctg_idx_mgr.java index 7e39f10d6..16e5a87b1 100644 --- a/400_xowa/src/gplx/xowa/ctgs/Xoctg_idx_mgr.java +++ b/400_xowa/src/gplx/xowa/ctgs/Xoctg_idx_mgr.java @@ -33,17 +33,17 @@ public class Xoctg_idx_mgr implements GfoInvkAble { int pipe_pos_cur = -1, pipe_pos_prv = -1; for (int i = block_len; i < len; i += block_len) { usr_dlg.Prog_many("", "", "indexing ~{0} ~{1}", i, len); - pipe_pos_cur = Bry_finder.Find_fwd(src, Byte_ascii.Pipe, i, len); if (pipe_pos_cur == Bry_.NotFound) throw Err_.new_wo_type("ctg_idx_mgr could not find pipe.next", "ctg", String_.new_a7(ctg), "pos", i); + pipe_pos_cur = Bry_find_.Find_fwd(src, Byte_ascii.Pipe, i, len); if (pipe_pos_cur == Bry_.NotFound) throw Err_.new_wo_type("ctg_idx_mgr could not find pipe.next", "ctg", String_.new_a7(ctg), "pos", i); if (pipe_pos_cur == len - 1) break; Index_itm(ctg, src, pipe_pos_cur + 1, len); // +1 to skip pipe pipe_pos_prv = pipe_pos_cur; } - pipe_pos_cur = Bry_finder.Find_bwd(src, Byte_ascii.Pipe, len - 1, 0); if (pipe_pos_cur == Bry_.NotFound) pipe_pos_cur = 0; // 1 entry only; will not have preceding pipe + pipe_pos_cur = Bry_find_.Find_bwd(src, Byte_ascii.Pipe, len - 1, 0); if (pipe_pos_cur == Bry_.NotFound) pipe_pos_cur = 0; // 1 entry only; will not have preceding pipe if (pipe_pos_cur != pipe_pos_prv) // if last itm was not indexed, index it Index_itm(ctg, src, pipe_pos_cur + 1, len); } private void Index_itm(byte[] ctg, byte[] src, int bgn, int len) { - int end = Bry_finder.Find_fwd(src, Byte_ascii.Pipe, bgn, len); if (end == Bry_.NotFound) throw Err_.new_wo_type("Ctg_idx_mgr could not find pipe.end", "ctg", String_.new_a7(ctg), "pos", bgn); + int end = Bry_find_.Find_fwd(src, Byte_ascii.Pipe, bgn, len); if (end == Bry_.NotFound) throw Err_.new_wo_type("Ctg_idx_mgr could not find pipe.end", "ctg", String_.new_a7(ctg), "pos", bgn); fld_rdr.Pos_(bgn); Xoctg_idx_itm itm = new Xoctg_idx_itm().Parse(fld_rdr, bgn); itms.Add(itm); @@ -83,7 +83,7 @@ public class Xoctg_idx_mgr implements GfoInvkAble { int comp_prv = bmk_comp, comp_cur = Int_.Min_value; int pos_cur = bmk_bgn; tmp_prv_itm.Parse(fld_rdr.Pos_(pos_cur), pos_cur); // fill prv_itm to whatever binary search found while (true) { - int itm_bgn = dir_fwd ? Bry_finder.Find_fwd(src, Byte_ascii.Pipe, pos_cur, src_len) : Bry_finder.Find_bwd(src, Byte_ascii.Pipe, pos_cur); + int itm_bgn = dir_fwd ? Bry_find_.Find_fwd(src, Byte_ascii.Pipe, pos_cur, src_len) : Bry_find_.Find_bwd(src, Byte_ascii.Pipe, pos_cur); if (itm_bgn == Bry_.NotFound) { // stop: at first && searched bwd; note that at last && searched fwd will never return Bry_.NotFound b/c all srcs are terminated with | if (!arg_is_from) return null; // arg is until and nothing found; return null: EX: range of B-Y and find of until=A; no results else break; // arg is from; stop loop; (will use first item) @@ -114,7 +114,7 @@ public class Xoctg_idx_mgr implements GfoInvkAble { } tmp_pos = itm_0.Pos(); if (!arg_is_from && Bry_.Compare(find, itm_0.Sortkey()) != CompareAble_.More) { // "until" means do *not* include last; go back one more; note: only do this logic if find is either < or == to slot; EX: find=AM && slot=AL; do not go back one more - tmp_pos = Bry_finder.Find_bwd(src, Byte_ascii.Pipe, tmp_pos - 1); // -1 to position before pipe + tmp_pos = Bry_find_.Find_bwd(src, Byte_ascii.Pipe, tmp_pos - 1); // -1 to position before pipe if (tmp_pos == Bry_.NotFound) return; // already 1st and nothing found else tmp_pos++; } @@ -125,7 +125,7 @@ public class Xoctg_idx_mgr implements GfoInvkAble { Xoctg_view_itm itm = new Xoctg_view_itm().Parse(fld_rdr.Pos_(tmp_pos), tmp_pos); rv.Add(itm); if (!arg_is_from && tmp_pos == 0) break; // 1st item and moving bwd; stop; note that 1st item does not have preceding | - tmp_pos = arg_is_from ? Bry_finder.Find_fwd(src, Byte_ascii.Pipe, tmp_pos, src_len) : Bry_finder.Find_bwd(src, Byte_ascii.Pipe, tmp_pos - 1); // -1 to position before pipe + tmp_pos = arg_is_from ? Bry_find_.Find_fwd(src, Byte_ascii.Pipe, tmp_pos, src_len) : Bry_find_.Find_bwd(src, Byte_ascii.Pipe, tmp_pos - 1); // -1 to position before pipe if (tmp_pos == Bry_.NotFound) { if (arg_is_from) // moving fwd and no pipe found; exit; break; @@ -141,7 +141,7 @@ public class Xoctg_idx_mgr implements GfoInvkAble { if (rv_count > 0) { Xoctg_view_itm last_itm = (Xoctg_view_itm)rv.Get_at(rv_count - 1); int last_itm_pos = last_itm.Pos(); - tmp_pos = Bry_finder.Find_fwd(src, Byte_ascii.Pipe, last_itm_pos); + tmp_pos = Bry_find_.Find_fwd(src, Byte_ascii.Pipe, last_itm_pos); if (tmp_pos != Bry_.NotFound && tmp_pos < src_len - 1) { ++tmp_pos; // position after pipe last_plus_one.Parse(fld_rdr.Pos_(tmp_pos), tmp_pos); diff --git a/400_xowa/src/gplx/xowa/ctgs/Xoctg_pagelist_grp.java b/400_xowa/src/gplx/xowa/ctgs/Xoctg_pagelist_grp.java index d37e9f624..c0eeecccd 100644 --- a/400_xowa/src/gplx/xowa/ctgs/Xoctg_pagelist_grp.java +++ b/400_xowa/src/gplx/xowa/ctgs/Xoctg_pagelist_grp.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.ctgs; import gplx.*; import gplx.xowa.*; -import gplx.xowa.langs.msgs.*; +import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; public class Xoctg_pagelist_grp implements Bry_fmtr_arg { public void Init_app(Xoae_app app, boolean type_is_normal, Bry_fmtr fmtr_grp, Bry_fmtr fmtr_itm) { this.type_is_normal = type_is_normal; diff --git a/400_xowa/src/gplx/xowa/ctgs/Xoctg_pagelist_itms.java b/400_xowa/src/gplx/xowa/ctgs/Xoctg_pagelist_itms.java index 6140b92ff..1a7702482 100644 --- a/400_xowa/src/gplx/xowa/ctgs/Xoctg_pagelist_itms.java +++ b/400_xowa/src/gplx/xowa/ctgs/Xoctg_pagelist_itms.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hrefs.*; import gplx.xowa.html.lnkis.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.xowa.nss.*; import gplx.xowa.users.history.*; public class Xoctg_pagelist_itms implements Bry_fmtr_arg { private Xoh_href_wtr href_wtr; private Xou_history_mgr history_mgr; private Bry_fmtr fmtr_itm; diff --git a/400_xowa/src/gplx/xowa/ctgs/Xoctg_view_itm.java b/400_xowa/src/gplx/xowa/ctgs/Xoctg_view_itm.java index 803b3cb49..8f2313eda 100644 --- a/400_xowa/src/gplx/xowa/ctgs/Xoctg_view_itm.java +++ b/400_xowa/src/gplx/xowa/ctgs/Xoctg_view_itm.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.ctgs; import gplx.*; import gplx.xowa.*; import gplx.core.flds.*; +import gplx.xowa.nss.*; public class Xoctg_view_itm implements gplx.CompareAble { public byte Tid() {return tid;} private byte tid; public int Id() {return id;} private int id; diff --git a/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr.java b/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr.java index 4f7344317..9b65e1c3c 100644 --- a/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr.java +++ b/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr.java @@ -16,7 +16,9 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.dbs; import gplx.*; import gplx.xowa.*; -import gplx.core.primitives.*; import gplx.xowa.bldrs.cmds.ctgs.*; import gplx.xowa.ctgs.*; import gplx.xowa.specials.search.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.core.primitives.*; +import gplx.xowa.nss.*; +import gplx.xowa.bldrs.cmds.ctgs.*; import gplx.xowa.ctgs.*; import gplx.xowa.specials.search.*; import gplx.xowa.wikis.data.tbls.*; public interface Xodb_load_mgr { void Load_init (Xowe_wiki wiki); void Load_page (Xowd_page_itm rv, Xow_ns ns, boolean timestamp_enabled); diff --git a/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr_sql.java b/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr_sql.java index b60c50bbf..e81160c4a 100644 --- a/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr_sql.java +++ b/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr_sql.java @@ -17,8 +17,9 @@ along with this program. If not, see . */ package gplx.xowa.dbs; import gplx.*; import gplx.xowa.*; import gplx.core.primitives.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; -import gplx.xowa.apps.*; import gplx.xowa.bldrs.cmds.ctgs.*; import gplx.xowa.ctgs.*; import gplx.xowa.specials.search.*; import gplx.xowa.wikis.data.tbls.*; -import gplx.xowa.wikis.*; import gplx.xowa.wikis.data.*; +import gplx.xowa.apps.gfss.*; import gplx.xowa.bldrs.cmds.ctgs.*; import gplx.xowa.ctgs.*; import gplx.xowa.specials.search.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.xowa.nss.*; +import gplx.xowa.wikis.*; import gplx.xowa.wikis.metas.*; import gplx.xowa.wikis.data.*; public class Xodb_load_mgr_sql implements Xodb_load_mgr { public Xodb_load_mgr_sql(Xodb_mgr_sql db_mgr, Xowd_db_mgr fsys_mgr) {this.db_mgr = db_mgr; this.fsys_mgr = fsys_mgr;} private Xodb_mgr_sql db_mgr; Xowd_db_mgr fsys_mgr; public byte Search_version() { diff --git a/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr_sql_tst.java b/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr_sql_tst.java index 6df2a808a..424923991 100644 --- a/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr_sql_tst.java +++ b/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr_sql_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.dbs; import gplx.*; import gplx.xowa.*; -import org.junit.*; import gplx.core.primitives.*; import gplx.xowa.bldrs.*; import gplx.xowa.ctgs.*; import gplx.dbs.*; import gplx.xowa.wikis.data.tbls.*; +import org.junit.*; import gplx.core.primitives.*; import gplx.xowa.bldrs.*; import gplx.xowa.ctgs.*; import gplx.dbs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.nss.*; public class Xodb_load_mgr_sql_tst { @Before public void init() {if (Xoa_test_.Db_skip()) return; fxt.Clear();} private Xodb_load_mgr_sql_fxt fxt = new Xodb_load_mgr_sql_fxt(); @After public void term() {if (Xoa_test_.Db_skip()) return; fxt.Rls();} diff --git a/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr_txt.java b/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr_txt.java index 4c3bc8e44..34968e849 100644 --- a/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr_txt.java +++ b/400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr_txt.java @@ -17,8 +17,10 @@ along with this program. If not, see . */ package gplx.xowa.dbs; import gplx.*; import gplx.xowa.*; import gplx.core.primitives.*; import gplx.core.brys.*; import gplx.core.flds.*; import gplx.xowa.bldrs.cmds.ctgs.*; import gplx.xowa.ctgs.*; import gplx.xowa.specials.search.*; +import gplx.xowa.nss.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; -import gplx.xowa.tdbs.*; import gplx.xowa.tdbs.hives.*; +import gplx.xowa.tdbs.*; import gplx.xowa.tdbs.hives.*; import gplx.xowa.tdbs.xdats.*; +import gplx.xowa.gui.views.*; public class Xodb_load_mgr_txt implements Xodb_load_mgr { private final Xob_xdat_file tmp_xdat_file = new Xob_xdat_file(); private final Xob_xdat_itm tmp_xdat_itm = new Xob_xdat_itm(); private final Xowd_page_itm tmp_page = new Xowd_page_itm(); @@ -112,7 +114,7 @@ public class Xodb_load_mgr_txt implements Xodb_load_mgr { private void Find_ttls__add_itms(List_adp rv, Xob_xdat_file rdr, Xob_xdat_itm xdat_itm) { byte[] raw = rdr.Src(); int itm_bgn = xdat_itm.Itm_bgn(), itm_end = xdat_itm.Itm_end(); - int pos = Bry_finder.Find_fwd(raw, Byte_ascii.Pipe, itm_bgn, raw.length); + int pos = Bry_find_.Find_fwd(raw, Byte_ascii.Pipe, itm_bgn, raw.length); if (pos == Bry_.NotFound) throw wiki.Appe().Usr_dlg().Fail_many(GRP_KEY, "invalid_search_file", "search file is invalid"); pos += Int_.Const_dlm_len; // pipe @@ -318,7 +320,7 @@ public class Xodb_load_mgr_txt implements Xodb_load_mgr { } private static void Load_ctg_v1_parse(List_adp rv, Gfo_usr_dlg usr_dlg, byte[] ary) { int aryLen = ary.length; - int pos = Bry_finder.Find_fwd(ary, Byte_ascii.Pipe, 0, aryLen); + int pos = Bry_find_.Find_fwd(ary, Byte_ascii.Pipe, 0, aryLen); int rowCount = (aryLen - pos + 1) / (Base85_utl.Len_int + gplx.xowa.apps.progs.Xoa_prog_mgr.Len_dlm_fld); rv.Clear(); boolean garbage = false; @@ -356,7 +358,7 @@ public class Xodb_load_mgr_txt implements Xodb_load_mgr { byte[] src = xdat.Src(); int itm_end = xdat.Itm_end(); int bgn = xdat.Itm_bgn(); int timestamp = Base85_utl.XtoIntByAry(src, bgn + 6 , bgn + 10); - int ttl_end = Bry_finder.Find_fwd(src, Xotdb_page_itm_.Txt_page_dlm, bgn + 12, itm_end); + int ttl_end = Bry_find_.Find_fwd(src, Xotdb_page_itm_.Txt_page_dlm, bgn + 12, itm_end); if (ttl_end == -1) return false; byte[] ttl = Bry_.Mid (src, bgn + 12 , ttl_end); byte[] text = Bry_.Mid (src, ttl_end + 1 , itm_end - 1); @@ -373,7 +375,7 @@ public class Xodb_load_mgr_txt implements Xodb_load_mgr { page.Modified_on_(Bit_.Xto_date_short(timestamp)); } int name_bgn = timestamp_end + 1; - int name_end = Bry_finder.Find_fwd(src, Xotdb_page_itm_.Txt_page_dlm, name_bgn, src_len); + int name_end = Bry_find_.Find_fwd(src, Xotdb_page_itm_.Txt_page_dlm, name_bgn, src_len); page.Text_(Bry_.Mid(src, name_end + 1, row_end - 1)); // +1 to skip dlm } Xowd_regy_mgr Get_regy_by_site(byte regy_tid) { diff --git a/400_xowa/src/gplx/xowa/dbs/Xodb_mgr_sql.java b/400_xowa/src/gplx/xowa/dbs/Xodb_mgr_sql.java index e6e767f53..77af450f4 100644 --- a/400_xowa/src/gplx/xowa/dbs/Xodb_mgr_sql.java +++ b/400_xowa/src/gplx/xowa/dbs/Xodb_mgr_sql.java @@ -17,14 +17,14 @@ along with this program. If not, see . */ package gplx.xowa.dbs; import gplx.*; import gplx.xowa.*; import gplx.ios.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.dbs.engines.sqlite.*; -import gplx.xowa.apps.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.ctgs.*; import gplx.xowa.html.hdumps.*; +import gplx.xowa.apps.gfss.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.ctgs.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.data.*; public class Xodb_mgr_sql implements Xodb_mgr, GfoInvkAble { public Xodb_mgr_sql(Xowe_wiki wiki) { this.wiki = wiki; this.core_data_mgr = new Xowd_db_mgr(wiki, wiki.Fsys_mgr().Root_dir(), wiki.Domain_itm()); this.load_mgr = new Xodb_load_mgr_sql(this, core_data_mgr); - this.save_mgr = new Xodb_save_mgr_sql(this, wiki.Page_mgr()); + this.save_mgr = new Xodb_save_mgr_sql(this); } public byte Tid() {return Tid_sql;} public String Tid_name() {return "sqlite3";} public static final byte Tid_sql = 1; public Xowd_db_mgr Core_data_mgr() {return core_data_mgr;} private final Xowd_db_mgr core_data_mgr; diff --git a/400_xowa/src/gplx/xowa/dbs/Xodb_mgr_txt.java b/400_xowa/src/gplx/xowa/dbs/Xodb_mgr_txt.java index 4928757af..b75e11361 100644 --- a/400_xowa/src/gplx/xowa/dbs/Xodb_mgr_txt.java +++ b/400_xowa/src/gplx/xowa/dbs/Xodb_mgr_txt.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.dbs; import gplx.*; import gplx.xowa.*; -import gplx.ios.*; import gplx.dbs.*; import gplx.xowa.wikis.data.*; import gplx.xowa.ctgs.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.tdbs.*; +import gplx.ios.*; import gplx.dbs.*; import gplx.xowa.wikis.data.*; import gplx.xowa.ctgs.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.tdbs.*; import gplx.xowa.nss.*; public class Xodb_mgr_txt implements Xodb_mgr { public Xodb_mgr_txt(Xowe_wiki wiki, Xow_data_mgr data_mgr) { this.wiki = wiki; diff --git a/400_xowa/src/gplx/xowa/dbs/Xodb_page_rdr__tdb.java b/400_xowa/src/gplx/xowa/dbs/Xodb_page_rdr__tdb.java index 60a0eb065..c29784daa 100644 --- a/400_xowa/src/gplx/xowa/dbs/Xodb_page_rdr__tdb.java +++ b/400_xowa/src/gplx/xowa/dbs/Xodb_page_rdr__tdb.java @@ -18,7 +18,8 @@ along with this program. If not, see . package gplx.xowa.dbs; import gplx.*; import gplx.xowa.*; import gplx.ios.*; import gplx.xowa.wikis.data.tbls.*; -import gplx.xowa.tdbs.*; import gplx.xowa.tdbs.hives.*; +import gplx.xowa.nss.*; +import gplx.xowa.tdbs.*; import gplx.xowa.tdbs.hives.*; import gplx.xowa.tdbs.xdats.*; public class Xodb_page_rdr__tdb implements Xodb_page_rdr { private final Xow_ns_mgr ns_mgr; private final Xotdb_fsys_mgr fsys_mgr; private int cur_ns_ord = -1; private Xow_ns cur_ns; private Io_url[] cur_file_ary; private Io_url cur_file; private int cur_file_idx = -1; diff --git a/400_xowa/src/gplx/xowa/dbs/Xodb_save_mgr_sql.java b/400_xowa/src/gplx/xowa/dbs/Xodb_save_mgr_sql.java index 1e5d28e02..11d2e0e76 100644 --- a/400_xowa/src/gplx/xowa/dbs/Xodb_save_mgr_sql.java +++ b/400_xowa/src/gplx/xowa/dbs/Xodb_save_mgr_sql.java @@ -19,9 +19,8 @@ package gplx.xowa.dbs; import gplx.*; import gplx.xowa.*; import gplx.ios.*; import gplx.dbs.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.dbs.qrys.*; import gplx.xowa.wikis.*; public class Xodb_save_mgr_sql implements Xodb_save_mgr { - private final Xow_page_mgr page_mgr; private final Xodb_mgr_sql db_mgr; - public Xodb_save_mgr_sql(Xodb_mgr_sql db_mgr, Xow_page_mgr page_mgr) {this.db_mgr = db_mgr; this.page_mgr = page_mgr;} + public Xodb_save_mgr_sql(Xodb_mgr_sql db_mgr) {this.db_mgr = db_mgr;} public boolean Create_enabled() {return create_enabled;} public void Create_enabled_(boolean v) {create_enabled = v;} private boolean create_enabled; public boolean Update_modified_on_enabled() {return update_modified_on_enabled;} public void Update_modified_on_enabled_(boolean v) {update_modified_on_enabled = v;} private boolean update_modified_on_enabled; public int Page_id_next() {return page_id_next;} public void Page_id_next_(int v) {page_id_next = v;} private int page_id_next; @@ -53,7 +52,7 @@ public class Xodb_save_mgr_sql implements Xodb_save_mgr { page_core_tbl.Insert_bgn(); page_text_tbl.Insert_bgn(); try { - page_mgr.Create(page_core_tbl, page_text_tbl, page_id, ns_id, ttl.Page_db(), redirect, DateAdp_.Now(), text_zip, text_raw.length, ns_count, page_text_db.Id(), -1); + db_mgr.Core_data_mgr().Create_page(page_core_tbl, page_text_tbl, page_id, ns_id, ttl.Page_db(), redirect, DateAdp_.Now(), text_zip, text_raw.length, ns_count, page_text_db.Id(), -1); db_file.Tbl__ns().Update_ns_count(ns_id, ns_count); db_file.Tbl__cfg().Update_int("db", "page.id_next", page_id + 1); } finally { diff --git a/400_xowa/src/gplx/xowa/dbs/Xodb_save_mgr_txt.java b/400_xowa/src/gplx/xowa/dbs/Xodb_save_mgr_txt.java index 0e8e97944..24d5e2d9d 100644 --- a/400_xowa/src/gplx/xowa/dbs/Xodb_save_mgr_txt.java +++ b/400_xowa/src/gplx/xowa/dbs/Xodb_save_mgr_txt.java @@ -17,8 +17,9 @@ along with this program. If not, see . */ package gplx.xowa.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.xowa.nss.*; import gplx.xowa.parsers.utils.*; -import gplx.xowa.tdbs.*; import gplx.xowa.tdbs.hives.*; +import gplx.xowa.tdbs.*; import gplx.xowa.tdbs.hives.*; import gplx.xowa.tdbs.xdats.*; public class Xodb_save_mgr_txt implements Xodb_save_mgr { public Xodb_save_mgr_txt(Xowe_wiki wiki, Xodb_load_mgr_txt load_mgr) { this.wiki = wiki; @@ -113,8 +114,8 @@ public class Xodb_save_mgr_txt implements Xodb_save_mgr { class Bry_comparer_fld_last implements gplx.lists.ComparerAble { public int compare(Object lhsObj, Object rhsObj) { byte[] lhs = (byte[])lhsObj, rhs = (byte[])rhsObj; - int lhs_bgn = Bry_finder.Find_bwd(lhs, Byte_ascii.Pipe); if (lhs_bgn == Bry_.NotFound) lhs_bgn = -1; - int rhs_bgn = Bry_finder.Find_bwd(rhs, Byte_ascii.Pipe); if (rhs_bgn == Bry_.NotFound) rhs_bgn = -1; + int lhs_bgn = Bry_find_.Find_bwd(lhs, Byte_ascii.Pipe); if (lhs_bgn == Bry_.NotFound) lhs_bgn = -1; + int rhs_bgn = Bry_find_.Find_bwd(rhs, Byte_ascii.Pipe); if (rhs_bgn == Bry_.NotFound) rhs_bgn = -1; return Bry_.Compare(lhs, lhs_bgn + 1, lhs.length, rhs, rhs_bgn + 1, rhs.length); } public static final Bry_comparer_fld_last _ = new Bry_comparer_fld_last(); diff --git a/400_xowa/src/gplx/xowa/files/Xof_ext_.java b/400_xowa/src/gplx/xowa/files/Xof_ext_.java index f4e4a45ac..320db82c3 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_ext_.java +++ b/400_xowa/src/gplx/xowa/files/Xof_ext_.java @@ -81,7 +81,7 @@ public class Xof_ext_ { } public static Xof_ext new_by_ttl_(byte[] ttl) { int ttl_len = ttl.length; - int dot_pos = Bry_finder.Find_bwd(ttl, Byte_ascii.Dot); + int dot_pos = Bry_find_.Find_bwd(ttl, Byte_ascii.Dot); byte[] ext = (dot_pos == Bry_.NotFound || dot_pos == ttl_len) ? Bry_.Empty : Bry_.Lcase__all(ttl, dot_pos + 1, ttl_len); // +1 to bgn after . return new_(Get_id_by_ext_(ext), ext); } @@ -96,7 +96,7 @@ public class Xof_ext_ { return rv; } public static byte[] Lower_ext(byte[] ttl) { - int dot_pos = Bry_finder.Find_bwd(ttl, Byte_ascii.Dot); + int dot_pos = Bry_find_.Find_bwd(ttl, Byte_ascii.Dot); int ttl_len = ttl.length; if (dot_pos == Bry_.NotFound || dot_pos == ttl_len - 1) return ttl; Object o = ext_hash.Get_by_mid(ttl, dot_pos + 1, ttl_len); diff --git a/400_xowa/src/gplx/xowa/files/Xof_file_mgr.java b/400_xowa/src/gplx/xowa/files/Xof_file_mgr.java index 9dfcb99bf..2f48f9a58 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_file_mgr.java +++ b/400_xowa/src/gplx/xowa/files/Xof_file_mgr.java @@ -16,8 +16,10 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; -import gplx.dbs.*; import gplx.xowa2.files.commons.*; import gplx.xowa.xtns.math.*; -import gplx.xowa.wmfs.*; import gplx.xowa.files.exts.*; import gplx.xowa.files.caches.*; import gplx.xowa.files.imgs.*; +import gplx.dbs.*; +import gplx.xowa.files.commons.*; import gplx.xowa.files.exts.*; import gplx.xowa.files.caches.*; import gplx.xowa.files.imgs.*; +import gplx.xowa.wms.*; +import gplx.xowa.xtns.math.*; public class Xof_file_mgr implements GfoInvkAble { public Xoa_repo_mgr Repo_mgr() {return repo_mgr;} private Xoa_repo_mgr repo_mgr; public Xof_img_mgr Img_mgr() {return img_mgr;} private final Xof_img_mgr img_mgr = new Xof_img_mgr(); diff --git a/400_xowa/src/gplx/xowa/files/Xof_file_wkr_.java b/400_xowa/src/gplx/xowa/files/Xof_file_wkr_.java index 143da3c50..6223f5e02 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_file_wkr_.java +++ b/400_xowa/src/gplx/xowa/files/Xof_file_wkr_.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; -import gplx.core.consoles.*; +import gplx.core.consoles.*; import gplx.langs.htmls.encoders.*; public class Xof_file_wkr_ { public static final Url_encoder Md5_decoder = Url_encoder.new_http_url_().Itms_raw_same_many(Byte_ascii.Plus); public static byte[] Md5_fast(byte[] v) {return Bry_.new_a7(gplx.security.HashAlgo_.Md5.CalcHash(Console_adp_.Noop, gplx.ios.IoStream_.ary_(v)));} diff --git a/400_xowa/src/gplx/xowa/files/Xof_url_bldr.java b/400_xowa/src/gplx/xowa/files/Xof_url_bldr.java index 4a24e9165..c4a8760de 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_url_bldr.java +++ b/400_xowa/src/gplx/xowa/files/Xof_url_bldr.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; +import gplx.langs.htmls.encoders.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.fsdb.*; public class Xof_url_bldr { private final Bry_bfr bfr = Bry_bfr.reset_(400); diff --git a/400_xowa/src/gplx/xowa2/files/Xofv_file_mgr_tst.java b/400_xowa/src/gplx/xowa/files/Xofv_file_mgr_tst.java similarity index 95% rename from 400_xowa/src/gplx/xowa2/files/Xofv_file_mgr_tst.java rename to 400_xowa/src/gplx/xowa/files/Xofv_file_mgr_tst.java index a9adbcc14..38f52ffd3 100644 --- a/400_xowa/src/gplx/xowa2/files/Xofv_file_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/files/Xofv_file_mgr_tst.java @@ -15,10 +15,10 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa2.files; import gplx.*; import gplx.xowa2.*; +package gplx.xowa.files; import gplx.*; import gplx.xowa.*; import org.junit.*; import gplx.core.primitives.*; import gplx.dbs.*; -import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.caches.*; import gplx.xowa.parsers.lnkis.*; -import gplx.xowa2.apps.*; import gplx.xowa2.wikis.*; import gplx.xowa.files.origs.*; +import gplx.xowa.files.fsdb.*; import gplx.xowa.files.caches.*; import gplx.xowa.parsers.lnkis.*; +import gplx.xowa.apps.*; import gplx.xowa.wikis.*; import gplx.xowa.files.origs.*; public class Xofv_file_mgr_tst { // @Before public void init() {fxt.Clear();} private final Xofv_file_mgr_fxt fxt = new Xofv_file_mgr_fxt(); @After public void term() {Gfo_usr_dlg_.I = Gfo_usr_dlg_.Noop;} diff --git a/400_xowa/src/gplx/xowa2/files/Xofv_repo_itm.java b/400_xowa/src/gplx/xowa/files/Xofv_repo_itm.java similarity index 95% rename from 400_xowa/src/gplx/xowa2/files/Xofv_repo_itm.java rename to 400_xowa/src/gplx/xowa/files/Xofv_repo_itm.java index cac78ab22..fc8045233 100644 --- a/400_xowa/src/gplx/xowa2/files/Xofv_repo_itm.java +++ b/400_xowa/src/gplx/xowa/files/Xofv_repo_itm.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa2.files; import gplx.*; import gplx.xowa2.*; +package gplx.xowa.files; import gplx.*; import gplx.xowa.*; public class Xofv_repo_itm { Xofv_repo_itm(byte tid, byte[] key, byte dir_spr, byte[] dir_root, byte[] dir_sub_orig, byte[] dir_sub_thumb) { this.tid = tid; this.key = key; this.dir_spr = dir_spr; this.dir_root = dir_root; this.dir_sub_orig = dir_sub_orig; this.dir_sub_thumb = dir_sub_thumb; diff --git a/400_xowa/src/gplx/xowa2/files/Xofv_repo_mgr.java b/400_xowa/src/gplx/xowa/files/Xofv_repo_mgr.java similarity index 94% rename from 400_xowa/src/gplx/xowa2/files/Xofv_repo_mgr.java rename to 400_xowa/src/gplx/xowa/files/Xofv_repo_mgr.java index f46debee5..48b35a260 100644 --- a/400_xowa/src/gplx/xowa2/files/Xofv_repo_mgr.java +++ b/400_xowa/src/gplx/xowa/files/Xofv_repo_mgr.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa2.files; import gplx.*; import gplx.xowa2.*; +package gplx.xowa.files; import gplx.*; import gplx.xowa.*; import gplx.core.primitives.*; public class Xofv_repo_mgr { private final Hash_adp_bry key_regy = Hash_adp_bry.cs(); diff --git a/400_xowa/src/gplx/xowa/files/bins/Xof_bin_mgr.java b/400_xowa/src/gplx/xowa/files/bins/Xof_bin_mgr.java index 156d3d4a0..e69bc3d2d 100644 --- a/400_xowa/src/gplx/xowa/files/bins/Xof_bin_mgr.java +++ b/400_xowa/src/gplx/xowa/files/bins/Xof_bin_mgr.java @@ -19,7 +19,7 @@ package gplx.xowa.files.bins; import gplx.*; import gplx.xowa.*; import gplx.xow import gplx.core.primitives.*; import gplx.ios.*; import gplx.fsdb.meta.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.cnvs.*; import gplx.xowa.files.caches.*; -import gplx.xowa.wmfs.*; +import gplx.xowa.wms.*; public class Xof_bin_mgr { private final Fsm_mnt_mgr mnt_mgr; private final Gfo_usr_dlg usr_dlg; private final Xow_repo_mgr repo_mgr; private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); diff --git a/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__fsdb_sql.java b/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__fsdb_sql.java index 7f7612f91..d6e5d1918 100644 --- a/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__fsdb_sql.java +++ b/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__fsdb_sql.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.files.bins; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; -import gplx.dbs.*; import gplx.ios.*; import gplx.cache.*; import gplx.xowa.files.fsdb.*; +import gplx.dbs.*; import gplx.ios.*; import gplx.core.caches.*; import gplx.xowa.files.fsdb.*; import gplx.fsdb.*; import gplx.fsdb.data.*; import gplx.fsdb.meta.*; public class Xof_bin_wkr__fsdb_sql implements Xof_bin_wkr { private final Xof_bin_wkr_ids tmp_ids = new Xof_bin_wkr_ids(); diff --git a/400_xowa/src/gplx/xowa/files/caches/Xof_cache_mgr.java b/400_xowa/src/gplx/xowa/files/caches/Xof_cache_mgr.java index d56f8e885..f71f4e852 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xof_cache_mgr.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xof_cache_mgr.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; import gplx.dbs.*; -import gplx.xowa.files.fsdb.*; import gplx.xowa2.files.*; import gplx.xowa.wikis.*; +import gplx.xowa.files.fsdb.*; import gplx.xowa.wikis.*; public class Xof_cache_mgr implements GfoInvkAble { private final Gfo_usr_dlg usr_dlg; private final Xoae_wiki_mgr wiki_mgr; private final Xoa_repo_mgr repo_mgr; private final Xofc_cfg_mgr cfg_mgr = new Xofc_cfg_mgr(); private final Xofc_dir_mgr dir_mgr; private final Xofc_fil_mgr fil_mgr; diff --git a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_mgr.java b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_mgr.java index 8fa90c17b..fcabf138d 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_mgr.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_mgr.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; -import gplx.xowa.files.fsdb.*; import gplx.xowa2.files.*; import gplx.xowa.files.repos.*; +import gplx.xowa.files.fsdb.*; import gplx.xowa.files.repos.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.users.data.*; public class Xou_cache_mgr { private final Xoa_wiki_mgr wiki_mgr; private final Xou_cache_tbl cache_tbl; private final Db_cfg_tbl cfg_tbl; private final Bry_bfr key_bfr = Bry_bfr.reset_(512); diff --git a/400_xowa/src/gplx/xowa/files/cnvs/Xof_img_wkr_resize_img_imageMagick.java b/400_xowa/src/gplx/xowa/files/cnvs/Xof_img_wkr_resize_img_imageMagick.java index 532460ef8..2d7eece1c 100644 --- a/400_xowa/src/gplx/xowa/files/cnvs/Xof_img_wkr_resize_img_imageMagick.java +++ b/400_xowa/src/gplx/xowa/files/cnvs/Xof_img_wkr_resize_img_imageMagick.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.files.cnvs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; -import gplx.core.primitives.*; import gplx.xowa.wmfs.*; +import gplx.core.primitives.*; import gplx.xowa.wms.*; public class Xof_img_wkr_resize_img_imageMagick implements Xof_img_wkr_resize_img { private final Xowmf_mgr wmf_mgr; private final ProcessAdp cmd_convert, cmd_convert_svg_to_png; private boolean init_needed = true; diff --git a/400_xowa/src/gplx/xowa2/files/commons/Xof_commons_image_itm.java b/400_xowa/src/gplx/xowa/files/commons/Xof_commons_image_itm.java similarity index 93% rename from 400_xowa/src/gplx/xowa2/files/commons/Xof_commons_image_itm.java rename to 400_xowa/src/gplx/xowa/files/commons/Xof_commons_image_itm.java index 98e866f74..13f3eb2eb 100644 --- a/400_xowa/src/gplx/xowa2/files/commons/Xof_commons_image_itm.java +++ b/400_xowa/src/gplx/xowa/files/commons/Xof_commons_image_itm.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa2.files.commons; import gplx.*; import gplx.xowa2.*; import gplx.xowa2.files.*; +package gplx.xowa.files.commons; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; public class Xof_commons_image_itm { public Xof_commons_image_itm(String name, String media_type, String minor_mime, int size, int width, int height, int bits, int ext_id, String timestamp) { this.name = name; this.media_type = media_type; this.minor_mime = minor_mime; this.size = size; this.width = width; this.height = height; this.bits = bits; this.ext_id = ext_id; this.timestamp = timestamp; diff --git a/400_xowa/src/gplx/xowa2/files/commons/Xof_commons_image_tbl.java b/400_xowa/src/gplx/xowa/files/commons/Xof_commons_image_tbl.java similarity index 95% rename from 400_xowa/src/gplx/xowa2/files/commons/Xof_commons_image_tbl.java rename to 400_xowa/src/gplx/xowa/files/commons/Xof_commons_image_tbl.java index 8dba1e401..7b210cd5e 100644 --- a/400_xowa/src/gplx/xowa2/files/commons/Xof_commons_image_tbl.java +++ b/400_xowa/src/gplx/xowa/files/commons/Xof_commons_image_tbl.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa2.files.commons; import gplx.*; import gplx.xowa2.*; import gplx.xowa2.files.*; +package gplx.xowa.files.commons; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.dbs.*; public class Xof_commons_image_tbl implements RlsAble { private Db_stmt stmt_insert; diff --git a/400_xowa/src/gplx/xowa/files/fsdb/tsts/Xof_file_fxt.java b/400_xowa/src/gplx/xowa/files/fsdb/tsts/Xof_file_fxt.java index 16b12e6d4..d07f08869 100644 --- a/400_xowa/src/gplx/xowa/files/fsdb/tsts/Xof_file_fxt.java +++ b/400_xowa/src/gplx/xowa/files/fsdb/tsts/Xof_file_fxt.java @@ -17,8 +17,9 @@ along with this program. If not, see . */ package gplx.xowa.files.fsdb.tsts; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*; import gplx.fsdb.*; import gplx.fsdb.meta.*; import gplx.dbs.*; import gplx.xowa.files.origs.*; import gplx.xowa.files.bins.*; import gplx.xowa.files.cnvs.*; import gplx.xowa.files.exts.*; import gplx.xowa.files.gui.*; -import gplx.xowa.wikis.domains.*; import gplx.xowa.files.repos.*; import gplx.xowa.wikis.data.*; import gplx.fsdb.data.*; +import gplx.xowa.wikis.domains.*; import gplx.xowa.files.repos.*; import gplx.xowa.wikis.data.*; +import gplx.xowa.nss.*; import gplx.xowa.parsers.lnkis.*; class Xof_file_fxt { private Xoae_app app; private Xof_fsdb_mgr__sql fsdb_mgr; private Xowe_wiki wiki; private Xof_orig_mgr orig_mgr; @@ -34,7 +35,7 @@ class Xof_file_fxt { this.fsdb_mgr = (Xof_fsdb_mgr__sql)wiki.File_mgr().Fsdb_mgr(); this.orig_mgr = wiki.File__orig_mgr(); Xof_repo_fxt.Repos_init(app.File_mgr(), true, wiki); - Xowe_wiki_bldr.Create(wiki, 1, "dump.xml"); + Xowe_wiki_.Create(wiki, 1, "dump.xml"); Xowd_db_file text_db = wiki.Data__core_mgr().Dbs__make_by_tid(Xowd_db_file_.Tid_text); text_db.Tbl__text().Create_tbl(); Fsdb_db_mgr__v2 fsdb_core = Fsdb_db_mgr__v2_bldr.I.Get_or_make(wiki, Bool_.Y); fsdb_mgr.Mnt_mgr().Ctor_by_load(fsdb_core); diff --git a/400_xowa/src/gplx/xowa/files/imgs/Xof_img_mgr.java b/400_xowa/src/gplx/xowa/files/imgs/Xof_img_mgr.java index 4072e9a7b..2ae82b8fd 100644 --- a/400_xowa/src/gplx/xowa/files/imgs/Xof_img_mgr.java +++ b/400_xowa/src/gplx/xowa/files/imgs/Xof_img_mgr.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.files.imgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; -import gplx.xowa.apps.progs.*; import gplx.xowa.wmfs.*; import gplx.xowa.files.cnvs.*; +import gplx.xowa.apps.progs.*; import gplx.xowa.wms.*; import gplx.xowa.files.cnvs.*; public class Xof_img_mgr { public Xof_img_wkr_resize_img Wkr_resize_img() {return wkr_resize_img;} public void Wkr_resize_img_(Xof_img_wkr_resize_img v) {wkr_resize_img = v;} private Xof_img_wkr_resize_img wkr_resize_img; public Xof_img_wkr_query_img_size Wkr_query_img_size() {return wkr_query_img_size;} public void Wkr_query_img_size_(Xof_img_wkr_query_img_size v) {wkr_query_img_size = v;} private Xof_img_wkr_query_img_size wkr_query_img_size; diff --git a/400_xowa/src/gplx/xowa/files/imgs/Xof_img_wkr_query_img_size.java b/400_xowa/src/gplx/xowa/files/imgs/Xof_img_wkr_query_img_size.java index 5ff0bca0f..f27b09025 100644 --- a/400_xowa/src/gplx/xowa/files/imgs/Xof_img_wkr_query_img_size.java +++ b/400_xowa/src/gplx/xowa/files/imgs/Xof_img_wkr_query_img_size.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.files.imgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.gfui.*; -import gplx.xowa.wmfs.*; +import gplx.xowa.wms.*; public interface Xof_img_wkr_query_img_size { SizeAdp Exec(Io_url url); } diff --git a/400_xowa/src/gplx/xowa/files/origs/Xob_orig_tbl_bldr.java b/400_xowa/src/gplx/xowa/files/origs/Xob_orig_tbl_bldr.java index ad889bce2..8723b4bfd 100644 --- a/400_xowa/src/gplx/xowa/files/origs/Xob_orig_tbl_bldr.java +++ b/400_xowa/src/gplx/xowa/files/origs/Xob_orig_tbl_bldr.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.files.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; -import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.bldrs.*; import gplx.fsdb.*; +import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.fsdb.*; +import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; public class Xob_orig_tbl_bldr extends Xob_itm_basic_base implements Xob_cmd { private Db_conn conn; private boolean schema_1; public Xob_orig_tbl_bldr(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} diff --git a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_mgr.java b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_mgr.java index 7c6983bca..19541dbc9 100644 --- a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_mgr.java +++ b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_mgr.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.files.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; import gplx.dbs.*; -import gplx.xowa.files.repos.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.wmfs.apis.*; import gplx.xowa.files.downloads.*; +import gplx.xowa.files.repos.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.wms.apis.*; import gplx.xowa.files.downloads.*; public class Xof_orig_mgr { private Xof_orig_wkr[] wkrs; private int wkrs_len; private Xof_url_bldr url_bldr; private Xow_repo_mgr repo_mgr; private final Xof_img_size img_size = new Xof_img_size(); diff --git a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr_.java b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr_.java index 782f37933..ea0cf0997 100644 --- a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr_.java +++ b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr_.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.files.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; -import gplx.xowa.wmfs.apis.*; import gplx.xowa.files.fsdb.*; +import gplx.xowa.wms.apis.*; import gplx.xowa.files.fsdb.*; public class Xof_orig_wkr_ { public static final Xof_orig_wkr[] Ary_empty = new Xof_orig_wkr[0]; public static void Find_by_list(Xof_orig_wkr wkr, Ordered_hash rv, List_adp itms) { diff --git a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__wmf_api.java b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__wmf_api.java index cdae33813..55601f45b 100644 --- a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__wmf_api.java +++ b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__wmf_api.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.files.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; -import gplx.xowa.files.repos.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.wmfs.apis.*; import gplx.xowa.files.downloads.*; +import gplx.xowa.files.repos.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.wms.apis.*; import gplx.xowa.files.downloads.*; public class Xof_orig_wkr__wmf_api implements Xof_orig_wkr { private final Xoapi_orig_base orig_api; private final Xof_download_wkr download_wkr; private final Xow_repo_mgr repo_mgr; private final byte[] wiki_domain; private final Xoapi_orig_rslts api_rv = new Xoapi_orig_rslts(); diff --git a/400_xowa/src/gplx/xowa/files/origs/Xof_wiki_finder.java b/400_xowa/src/gplx/xowa/files/origs/Xof_wiki_finder.java index 6ceb23b4d..12245763a 100644 --- a/400_xowa/src/gplx/xowa/files/origs/Xof_wiki_finder.java +++ b/400_xowa/src/gplx/xowa/files/origs/Xof_wiki_finder.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.files.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.xowa.nss.*; class Xof_wiki_finder { // UNUSED private Xowe_wiki wiki_0, wiki_1; private Xowd_page_itm db_page = new Xowd_page_itm(); @@ -32,7 +33,7 @@ class Xof_wiki_finder { // UNUSED private Xoae_page Get_page__by_wiki(Xowe_wiki wiki, int ns_id, byte[] ttl_bry) { Xoa_ttl ttl = Xoa_ttl.parse(wiki, ns_id, ttl_bry) ; Xoa_url url = Xoa_url.new_(wiki.Domain_bry(), ttl_bry); - return wiki.Load_page_by_ttl(url, ttl); + return wiki.Data_mgr().Load_page_by_ttl(url, ttl); } private int qry_count, qry_count_max = 1000; public boolean Find_page(Xof_wiki_finder_itm itm, int ns_id, byte[] ttl_bry) { diff --git a/400_xowa/src/gplx/xowa/files/repos/Xof_repo_itm.java b/400_xowa/src/gplx/xowa/files/repos/Xof_repo_itm.java index 65861968d..74f720670 100644 --- a/400_xowa/src/gplx/xowa/files/repos/Xof_repo_itm.java +++ b/400_xowa/src/gplx/xowa/files/repos/Xof_repo_itm.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.files.repos; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; -import gplx.core.btries.*; import gplx.xowa.apps.fsys.*; import gplx.xowa.files.exts.*; +import gplx.core.btries.*; import gplx.core.consoles.*; +import gplx.xowa.apps.fsys.*; import gplx.xowa.files.exts.*; import gplx.xowa.wikis.domains.*; public class Xof_repo_itm implements GfoInvkAble { private final Xoa_fsys_mgr app_fsys; private final Xof_rule_mgr ext_rule_mgr; private final Bry_bfr tmp_bfr = Bry_bfr.reset_(300); diff --git a/400_xowa/src/gplx/xowa/files/repos/Xofw_wiki_wkr_base.java b/400_xowa/src/gplx/xowa/files/repos/Xofw_wiki_wkr_base.java index 37a44461c..4e0775437 100644 --- a/400_xowa/src/gplx/xowa/files/repos/Xofw_wiki_wkr_base.java +++ b/400_xowa/src/gplx/xowa/files/repos/Xofw_wiki_wkr_base.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.files.repos; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; +import gplx.xowa.nss.*; import gplx.xowa.wikis.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.parsers.utils.*; public class Xofw_wiki_wkr_base implements Xofw_wiki_finder { diff --git a/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_mgr.java b/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_mgr.java index 31f4b8b7c..dcfc6e88e 100644 --- a/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_mgr.java +++ b/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_mgr.java @@ -18,7 +18,7 @@ along with this program. If not, see . package gplx.xowa.files.xfers; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; import gplx.gfui.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.exts.*; import gplx.xowa.files.downloads.*; -import gplx.xowa.wmfs.*; import gplx.xowa.wmfs.apis.*; +import gplx.xowa.wms.*; import gplx.xowa.wms.apis.*; import gplx.xowa.tdbs.metas.*; public class Xof_xfer_mgr { public Xof_xfer_mgr(Xof_file_mgr file_mgr, Xowmf_mgr wmf_mgr) {this.file_mgr = file_mgr; this.wmf_mgr = wmf_mgr;} private final Xof_file_mgr file_mgr; private final Xowmf_mgr wmf_mgr; diff --git a/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_base_fxt.java b/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_base_fxt.java index 89ae4bad9..5fcfc5f35 100644 --- a/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_base_fxt.java +++ b/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_base_fxt.java @@ -18,7 +18,7 @@ along with this program. If not, see . package gplx.xowa.files.xfers; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.ios.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.files.cnvs.*; import gplx.xowa.files.repos.*; -import gplx.xowa.wmfs.apis.*; import gplx.xowa.files.exts.*; import gplx.xowa.files.imgs.*; +import gplx.xowa.wms.apis.*; import gplx.xowa.files.exts.*; import gplx.xowa.files.imgs.*; public class Xof_xfer_queue_base_fxt { public Xoapi_orig_mok Api_size() {return api_size;} private Xoapi_orig_mok api_size = Xoapi_orig_mok._; public Xof_repo_itm Src_commons_repo() {return src_commons_repo;} private Xof_repo_itm src_commons_repo; diff --git a/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_html_fxt.java b/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_html_fxt.java index b0b55a895..dc12e78b9 100644 --- a/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_html_fxt.java +++ b/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_html_fxt.java @@ -18,7 +18,7 @@ along with this program. If not, see . package gplx.xowa.files.xfers; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; import gplx.dbs.*; import gplx.ios.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.files.*; -import gplx.xowa.parsers.lnkis.*; +import gplx.xowa.parsers.*; import gplx.xowa.parsers.lnkis.*; public class Xof_xfer_queue_html_fxt extends Xof_xfer_queue_base_fxt { private final Xof_xfer_queue queue = new Xof_xfer_queue(); @Override public void Clear(boolean src_repo_is_wmf) { @@ -31,7 +31,8 @@ public class Xof_xfer_queue_html_fxt extends Xof_xfer_queue_base_fxt { public Xof_xfer_queue_html_fxt Lnki_thumb_(String lnki_ttl, int lnki_w, int lnki_h) {return Lnki_(lnki_ttl, Bool_.Y, lnki_w, lnki_h, Xop_lnki_tkn.Upright_null, Xof_lnki_time.Null_as_int);} public Xof_xfer_queue_html_fxt Lnki_(String lnki_ttl, boolean thumb, int lnki_w, int lnki_h, double upright, int seek_time) { // NOTE: only one xfer_itm; supports one Lnki_ per test only Xowe_wiki wiki = this.En_wiki(); - xfer_itm = wiki.Html_mgr().Html_wtr().Lnki_wtr().File_wtr().Lnki_eval(Xof_exec_tid.Tid_wiki_page, wiki.Ctx(), wiki.Ctx().Cur_page(), queue, Bry_.new_u8(lnki_ttl), thumb ? Xop_lnki_type.Id_thumb : Xop_lnki_type.Id_null, upright, lnki_w, lnki_h, Xof_lnki_time.X_int(seek_time), Xof_lnki_page.Null, false); + Xop_ctx ctx = wiki.Parser_mgr().Ctx(); + xfer_itm = wiki.Html_mgr().Html_wtr().Lnki_wtr().File_wtr().Lnki_eval(Xof_exec_tid.Tid_wiki_page, ctx, ctx.Cur_page(), queue, Bry_.new_u8(lnki_ttl), thumb ? Xop_lnki_type.Id_thumb : Xop_lnki_type.Id_null, upright, lnki_w, lnki_h, Xof_lnki_time.X_int(seek_time), Xof_lnki_page.Null, false); return this; } public Xof_file_itm Xfer_itm() {return xfer_itm;} private Xof_file_itm xfer_itm; diff --git a/400_xowa/src/gplx/xowa/gui/Xoa_gui_mgr.java b/400_xowa/src/gplx/xowa/gui/Xoa_gui_mgr.java index 6d85f65ce..446f9eb0e 100644 --- a/400_xowa/src/gplx/xowa/gui/Xoa_gui_mgr.java +++ b/400_xowa/src/gplx/xowa/gui/Xoa_gui_mgr.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.gui; import gplx.*; import gplx.xowa.*; import gplx.gfui.*; import gplx.xowa.specials.search.*; import gplx.xowa.gui.menus.*; import gplx.xowa.gui.cmds.*; import gplx.xowa.cfgs.gui.*; import gplx.xowa.users.*; +import gplx.xowa.langs.*; import gplx.xowa.gui.bnds.*; import gplx.xowa.gui.views.*; import gplx.xowa.gui.urls.url_macros.*; import gplx.xowa.gui.views.boots.*; public class Xoa_gui_mgr implements GfoEvObj, GfoInvkAble { diff --git a/400_xowa/src/gplx/xowa2/gui/Xog_page.java b/400_xowa/src/gplx/xowa/gui/Xog_page.java similarity index 95% rename from 400_xowa/src/gplx/xowa2/gui/Xog_page.java rename to 400_xowa/src/gplx/xowa/gui/Xog_page.java index bdb7cf315..3ebcd4ce1 100644 --- a/400_xowa/src/gplx/xowa2/gui/Xog_page.java +++ b/400_xowa/src/gplx/xowa/gui/Xog_page.java @@ -15,8 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa2.gui; import gplx.*; import gplx.xowa2.*; -import gplx.xowa.*; import gplx.xowa.html.hdumps.core.*; import gplx.xowa.html.hdumps.pages.*; +package gplx.xowa.gui; import gplx.*; import gplx.xowa.*; +import gplx.xowa.html.hdumps.core.*; import gplx.xowa.html.hdumps.pages.*; import gplx.xowa.files.*; import gplx.xowa.pages.*; import gplx.xowa.pages.skins.*; import gplx.xowa.html.heads.*; public class Xog_page implements Xoa_page { diff --git a/400_xowa/src/gplx/xowa2/gui/Xogv_page_load_wkr.java b/400_xowa/src/gplx/xowa/gui/Xogv_page_load_wkr.java similarity index 93% rename from 400_xowa/src/gplx/xowa2/gui/Xogv_page_load_wkr.java rename to 400_xowa/src/gplx/xowa/gui/Xogv_page_load_wkr.java index 9d5b67f28..9d3c68417 100644 --- a/400_xowa/src/gplx/xowa2/gui/Xogv_page_load_wkr.java +++ b/400_xowa/src/gplx/xowa/gui/Xogv_page_load_wkr.java @@ -15,11 +15,10 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa2.gui; import gplx.*; import gplx.xowa2.*; +package gplx.xowa.gui; import gplx.*; import gplx.xowa.*; import gplx.core.threads.*; import gplx.core.net.*; -import gplx.xowa.*; import gplx.xowa.gui.history.*; -import gplx.xowa2.apps.*; import gplx.xowa2.wikis.*; +import gplx.xowa.apps.*; import gplx.xowa.wikis.*; class Xogv_page_load_wkr implements Gfo_thread_wkr, GfoInvkAble { private final Xoav_wiki_mgr wiki_mgr; private final Gfo_url_parser url_parser; private final Xogv_tab_base tab; private final Xog_history_itm old_itm, new_itm; diff --git a/400_xowa/src/gplx/xowa2/gui/Xogv_tab_base.java b/400_xowa/src/gplx/xowa/gui/Xogv_tab_base.java similarity index 93% rename from 400_xowa/src/gplx/xowa2/gui/Xogv_tab_base.java rename to 400_xowa/src/gplx/xowa/gui/Xogv_tab_base.java index 0d0fb5524..8821e64e9 100644 --- a/400_xowa/src/gplx/xowa2/gui/Xogv_tab_base.java +++ b/400_xowa/src/gplx/xowa/gui/Xogv_tab_base.java @@ -15,11 +15,10 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa2.gui; import gplx.*; import gplx.xowa2.*; +package gplx.xowa.gui; import gplx.*; import gplx.xowa.*; import gplx.core.net.*; -import gplx.xowa.*; import gplx.xowa.html.hdumps.core.*; import gplx.xowa.gui.history.*; -import gplx.xowa2.apps.*; import gplx.xowa2.wikis.*; import gplx.xowa2.gui.*; import gplx.xowa2.apps.urls.*; +import gplx.xowa.apps.*; import gplx.xowa.wikis.*; import gplx.xowa.apps.urls.*; import gplx.core.threads.*; public abstract class Xogv_tab_base { private Gfo_url_parser url_parser; diff --git a/400_xowa/src/gplx/xowa/gui/bnds/Xog_bnd_mgr_srl.java b/400_xowa/src/gplx/xowa/gui/bnds/Xog_bnd_mgr_srl.java index 319992633..0114faabb 100644 --- a/400_xowa/src/gplx/xowa/gui/bnds/Xog_bnd_mgr_srl.java +++ b/400_xowa/src/gplx/xowa/gui/bnds/Xog_bnd_mgr_srl.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.gui.bnds; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; -import gplx.core.primitives.*; import gplx.srls.dsvs.*; import gplx.gfui.*; import gplx.xowa.cfgs2.*; +import gplx.core.primitives.*; import gplx.langs.dsvs.*; import gplx.gfui.*; import gplx.xowa.cfgs2.*; public class Xog_bnd_mgr_srl extends Dsv_wkr_base { private Xoae_app app; private Xog_bnd_mgr bnd_mgr; diff --git a/400_xowa/src/gplx/xowa/gui/cmds/Xog_cmd_mgr.java b/400_xowa/src/gplx/xowa/gui/cmds/Xog_cmd_mgr.java index 60480b3ba..42f2ce1d7 100644 --- a/400_xowa/src/gplx/xowa/gui/cmds/Xog_cmd_mgr.java +++ b/400_xowa/src/gplx/xowa/gui/cmds/Xog_cmd_mgr.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.gui.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; -import gplx.xowa.apis.xowa.*; import gplx.xowa.langs.msgs.*; +import gplx.xowa.apis.xowa.*; +import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; public class Xog_cmd_mgr { public void Init_by_kit(Xoae_app app) { invk_mgr.Ctor(app, this); diff --git a/400_xowa/src/gplx/xowa/gui/history/Xog_history_itm.java b/400_xowa/src/gplx/xowa/gui/history/Xog_history_itm.java index dd1caea00..d9115796d 100644 --- a/400_xowa/src/gplx/xowa/gui/history/Xog_history_itm.java +++ b/400_xowa/src/gplx/xowa/gui/history/Xog_history_itm.java @@ -42,7 +42,7 @@ public class Xog_history_itm { bfr.Add(key).Add_byte_pipe().Add(bmk_bry).Add_byte_nl(); } public static Xog_history_itm Srl_load(byte[] raw) { - byte[][] atrs = Bry_.Split(raw, Byte_ascii.Pipe); + byte[][] atrs = Bry_split_.Split(raw, Byte_ascii.Pipe); byte[] bmk_bry = atrs.length == 6 ? atrs[5] : Bry_.Empty; bmk_bry = Bry_.Replace(bmk_bry, Byte_ascii.Tilde, Byte_ascii.Pipe); return new Xog_history_itm(atrs[0], atrs[1], atrs[2], atrs[3], atrs[4] == Bool_.Y_bry, String_.new_a7(bmk_bry)); diff --git a/400_xowa/src/gplx/xowa/gui/history/Xog_history_stack.java b/400_xowa/src/gplx/xowa/gui/history/Xog_history_stack.java index 0c49fac74..71b01a416 100644 --- a/400_xowa/src/gplx/xowa/gui/history/Xog_history_stack.java +++ b/400_xowa/src/gplx/xowa/gui/history/Xog_history_stack.java @@ -57,7 +57,7 @@ public class Xog_history_stack { } public void Srl_load(byte[] bry) { list.Clear(); - byte[][] lines = Bry_.Split_lines(bry); + byte[][] lines = Bry_split_.Split_lines(bry); int len = lines.length; for (int i = 0; i < len; ++i) { byte[] line = lines[i]; diff --git a/400_xowa/src/gplx/xowa/gui/menus/Xog_menu_mgr.java b/400_xowa/src/gplx/xowa/gui/menus/Xog_menu_mgr.java index 9c3164f4c..17fa9e213 100644 --- a/400_xowa/src/gplx/xowa/gui/menus/Xog_menu_mgr.java +++ b/400_xowa/src/gplx/xowa/gui/menus/Xog_menu_mgr.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.gui.menus; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; import gplx.xowa.gui.menus.dom.*; +import gplx.xowa.langs.*; public class Xog_menu_mgr implements GfoInvkAble { private Xoae_app app; public Xog_menu_mgr(Xoa_gui_mgr gui_mgr) { diff --git a/400_xowa/src/gplx/xowa/gui/menus/Xog_popup_mnu_mgr.java b/400_xowa/src/gplx/xowa/gui/menus/Xog_popup_mnu_mgr.java index ea8012627..e76f01a04 100644 --- a/400_xowa/src/gplx/xowa/gui/menus/Xog_popup_mnu_mgr.java +++ b/400_xowa/src/gplx/xowa/gui/menus/Xog_popup_mnu_mgr.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.gui.menus; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; import gplx.xowa.gui.menus.dom.*; +import gplx.xowa.langs.*; public class Xog_popup_mnu_mgr implements GfoInvkAble { private Ordered_hash hash = Ordered_hash_.new_(); private Xoa_gui_mgr gui_mgr; diff --git a/400_xowa/src/gplx/xowa/gui/menus/Xog_window_mnu_mgr.java b/400_xowa/src/gplx/xowa/gui/menus/Xog_window_mnu_mgr.java index a8dd4ca6d..68c73389f 100644 --- a/400_xowa/src/gplx/xowa/gui/menus/Xog_window_mnu_mgr.java +++ b/400_xowa/src/gplx/xowa/gui/menus/Xog_window_mnu_mgr.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.gui.menus; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; import gplx.xowa.gui.menus.dom.*; +import gplx.xowa.langs.*; public class Xog_window_mnu_mgr implements GfoInvkAble { private Ordered_hash hash = Ordered_hash_.new_(); public Xog_mnu_grp Browser() {return browser;} private Xog_mnu_grp browser; diff --git a/400_xowa/src/gplx/xowa/gui/menus/dom/Xog_mnu_grp.java b/400_xowa/src/gplx/xowa/gui/menus/dom/Xog_mnu_grp.java index 4fca6745e..55e28e809 100644 --- a/400_xowa/src/gplx/xowa/gui/menus/dom/Xog_mnu_grp.java +++ b/400_xowa/src/gplx/xowa/gui/menus/dom/Xog_mnu_grp.java @@ -17,7 +17,8 @@ along with this program. If not, see . */ package gplx.xowa.gui.menus.dom; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; import gplx.xowa.gui.menus.*; import gplx.gfui.*; -import gplx.xowa.apps.*; import gplx.xowa.gui.views.*; +import gplx.xowa.apps.*; import gplx.xowa.apps.gfss.*; +import gplx.xowa.gui.views.*; public class Xog_mnu_grp extends Xog_mnu_base { public Xog_mnu_grp(Xoa_gui_mgr gui_mgr, boolean mnu_is_popup, String key) { this.app = gui_mgr.App(); this.mnu_is_popup = mnu_is_popup; this.key = key; diff --git a/400_xowa/src/gplx/xowa/gui/urls/Xog_url_wkr.java b/400_xowa/src/gplx/xowa/gui/urls/Xog_url_wkr.java index d944ea555..c78b5834e 100644 --- a/400_xowa/src/gplx/xowa/gui/urls/Xog_url_wkr.java +++ b/400_xowa/src/gplx/xowa/gui/urls/Xog_url_wkr.java @@ -53,7 +53,7 @@ public class Xog_url_wkr { // private Xoa_url Exec_url_xcmd(Xog_win_itm win) { // EX: /xcmd/ // byte[] xowa_href_bry = tmp_url.Page(); // int xowa_href_bry_len = xowa_href_bry.length; -// int slash_pos = Bry_finder.Find_fwd(xowa_href_bry, Byte_ascii.Slash); if (slash_pos == Bry_.NotFound) slash_pos = xowa_href_bry_len; +// int slash_pos = Bry_find_.Find_fwd(xowa_href_bry, Byte_ascii.Slash); if (slash_pos == Bry_.NotFound) slash_pos = xowa_href_bry_len; // byte[] xowa_cmd_bry = Bry_.Mid(xowa_href_bry, 0, slash_pos); // String xowa_cmd_str = String_.new_u8(xowa_cmd_bry); // GfoMsg m = GfoMsg_.new_cast_(xowa_cmd_str); @@ -102,7 +102,7 @@ public class Xog_url_wkr { if (qargs_len > 0) { // remove anchors from qargs; EX: "to=B#mw_pages" for (int i = 0; i < qargs_len; i++) { Gfo_qarg_itm arg = qargs[i]; - int anch_pos = Bry_finder.Find_bwd(arg.Val_bry(), Byte_ascii.Hash); // NOTE: must .FindBwd to handle Category args like de.wikipedia.org/wiki/Kategorie:Begriffskl%C3%A4rung?pagefrom=#::12%20PANZERDIVISION#mw-pages; DATE:2013-06-18 + int anch_pos = Bry_find_.Find_bwd(arg.Val_bry(), Byte_ascii.Hash); // NOTE: must .FindBwd to handle Category args like de.wikipedia.org/wiki/Kategorie:Begriffskl%C3%A4rung?pagefrom=#::12%20PANZERDIVISION#mw-pages; DATE:2013-06-18 if (anch_pos != Bry_.NotFound) arg.Val_bry_(Bry_.Mid(arg.Val_bry(), 0, anch_pos)); } @@ -145,7 +145,7 @@ public class Xog_url_wkr { // if (qargs_len > 0) { // remove anchors from qargs; EX: "to=B#mw_pages" // for (int i = 0; i < qargs_len; i++) { // Gfo_qarg_itm arg = qargs[i]; -// int anch_pos = Bry_finder.Find_bwd(arg.Val_bry(), Byte_ascii.Hash); // NOTE: must .FindBwd to handle Category args like de.wikipedia.org/wiki/Kategorie:Begriffskl%C3%A4rung?pagefrom=#::12%20PANZERDIVISION#mw-pages; DATE:2013-06-18 +// int anch_pos = Bry_find_.Find_bwd(arg.Val_bry(), Byte_ascii.Hash); // NOTE: must .FindBwd to handle Category args like de.wikipedia.org/wiki/Kategorie:Begriffskl%C3%A4rung?pagefrom=#::12%20PANZERDIVISION#mw-pages; DATE:2013-06-18 // if (anch_pos != Bry_.NotFound) // arg.Val_bry_(Bry_.Mid(arg.Val_bry(), 0, anch_pos)); // } diff --git a/400_xowa/src_060_utl/gplx/Gfo_usr_dlg__gui__opt.java b/400_xowa/src/gplx/xowa/gui/views/Gfo_usr_dlg__gui__opt.java similarity index 89% rename from 400_xowa/src_060_utl/gplx/Gfo_usr_dlg__gui__opt.java rename to 400_xowa/src/gplx/xowa/gui/views/Gfo_usr_dlg__gui__opt.java index 7db307f3a..e11da4acc 100644 --- a/400_xowa/src_060_utl/gplx/Gfo_usr_dlg__gui__opt.java +++ b/400_xowa/src/gplx/xowa/gui/views/Gfo_usr_dlg__gui__opt.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.xowa.gui.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; public interface Gfo_usr_dlg__gui__opt { boolean Warn_enabled(); boolean Note_enabled(); diff --git a/400_xowa/src_060_utl/gplx/Gfo_usr_dlg__gui__swt.java b/400_xowa/src/gplx/xowa/gui/views/Gfo_usr_dlg__gui__swt.java similarity index 90% rename from 400_xowa/src_060_utl/gplx/Gfo_usr_dlg__gui__swt.java rename to 400_xowa/src/gplx/xowa/gui/views/Gfo_usr_dlg__gui__swt.java index d34467ddf..6cc343243 100644 --- a/400_xowa/src_060_utl/gplx/Gfo_usr_dlg__gui__swt.java +++ b/400_xowa/src/gplx/xowa/gui/views/Gfo_usr_dlg__gui__swt.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.xowa.gui.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; import gplx.core.strings.*; import gplx.gfui.*; public class Gfo_usr_dlg__gui__swt implements Gfo_usr_dlg__gui, GfoInvkAble { private final GfuiInvkCmd cmd_sync; private final GfuiTextBox prog_box, info_box; private final Gfo_usr_dlg__gui__opt opt; @@ -46,5 +46,5 @@ public class Gfo_usr_dlg__gui__swt implements Gfo_usr_dlg__gui, GfoInvkAble { info_box.Text_(v); info_box_is_warn = warn; } boolean info_box_is_warn; - static final String Invk_write_prog = "write_prog", Invk_write_note = "write_note", Invk_write_warn = "write_warn", Invk_write_stop = "write_stop"; + private static final String Invk_write_prog = "write_prog", Invk_write_note = "write_note", Invk_write_warn = "write_warn", Invk_write_stop = "write_stop"; } diff --git a/400_xowa/src_060_utl/gplx/Gfo_usr_dlg_fmt.java b/400_xowa/src/gplx/xowa/gui/views/Gfo_usr_dlg_fmt.java similarity index 93% rename from 400_xowa/src_060_utl/gplx/Gfo_usr_dlg_fmt.java rename to 400_xowa/src/gplx/xowa/gui/views/Gfo_usr_dlg_fmt.java index 509d9bfa5..e19cc5bfe 100644 --- a/400_xowa/src_060_utl/gplx/Gfo_usr_dlg_fmt.java +++ b/400_xowa/src/gplx/xowa/gui/views/Gfo_usr_dlg_fmt.java @@ -15,7 +15,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx; +package gplx.xowa.gui.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; public class Gfo_usr_dlg_fmt { public boolean Write_prog_cur(int cur, Gfo_usr_dlg usr_dlg) { if (cur < prog_prv + prog_interval) return usr_dlg.Canceled(); diff --git a/400_xowa/src/gplx/xowa/gui/views/Load_page_wkr.java b/400_xowa/src/gplx/xowa/gui/views/Load_page_wkr.java index ef4a9cd8e..0842d7498 100644 --- a/400_xowa/src/gplx/xowa/gui/views/Load_page_wkr.java +++ b/400_xowa/src/gplx/xowa/gui/views/Load_page_wkr.java @@ -41,17 +41,17 @@ public class Load_page_wkr implements Gfo_thread_wkr { Xow_wiki_.Rls_mem(wiki, false); // clear caches (which will clear bry_bfr_mkr) else // not low in memory app.Utl__bfr_mkr().Clear(); // clear bry_bfr_mkr only; NOTE: call before page parse, not when page is first added, else threading errors; DATE:2014-05-30 - this.page = wiki.Load_page_by_ttl(url, ttl, wiki.Lang(), tab, false); + this.page = wiki.Data_mgr().Load_page_by_ttl(url, ttl, wiki.Lang(), tab, false); this.hdump_enabled = wiki.Html__hdump_enabled(); wait_count = 0; while (gplx.xowa.html.modules.popups.Xow_popup_mgr.Running() && ++wait_count < 100) Thread_adp_.Sleep(10); if (hdump_enabled && page.Revision_data().Html_db_id() != -1) { - // wiki.ParsePage(page, false); + // wiki.Parser_mgr().Parse(page, false); wiki.Html__hdump_rdr().Get_by_ttl(page); } else - wiki.ParsePage(page, false); + wiki.Parser_mgr().Parse(page, false); GfoInvkAble_.InvkCmd_val(tab.Cmd_sync(), Xog_tab_itm.Invk_show_url_loaded_swt, this); } catch (Exception e) { diff --git a/400_xowa/src/gplx/xowa/gui/views/Xog_html_itm.java b/400_xowa/src/gplx/xowa/gui/views/Xog_html_itm.java index 5d8dc5255..b943f4ed6 100644 --- a/400_xowa/src/gplx/xowa/gui/views/Xog_html_itm.java +++ b/400_xowa/src/gplx/xowa/gui/views/Xog_html_itm.java @@ -18,7 +18,7 @@ along with this program. If not, see . package gplx.xowa.gui.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; import gplx.core.primitives.*; import gplx.core.btries.*; import gplx.gfui.*; import gplx.xowa.gui.menus.*; import gplx.xowa.gui.menus.dom.*; import gplx.xowa.files.gui.*; -import gplx.html.*; import gplx.xowa.html.hrefs.*; import gplx.xowa.html.js.*; import gplx.xowa.html.heads.*; import gplx.xowa.pages.*; +import gplx.langs.htmls.*; import gplx.xowa.html.hrefs.*; import gplx.xowa.html.js.*; import gplx.xowa.html.heads.*; import gplx.xowa.pages.*; public class Xog_html_itm implements Xog_js_wkr, GfoInvkAble, GfoEvObj { private Xoae_app app; private final Object thread_lock = new Object(); private final String_obj_ref scroll_top = String_obj_ref.null_(), node_path = String_obj_ref.null_(); diff --git a/400_xowa/src/gplx/xowa/gui/views/Xog_tab_itm.java b/400_xowa/src/gplx/xowa/gui/views/Xog_tab_itm.java index bc7cedfb0..627f4edb4 100644 --- a/400_xowa/src/gplx/xowa/gui/views/Xog_tab_itm.java +++ b/400_xowa/src/gplx/xowa/gui/views/Xog_tab_itm.java @@ -138,7 +138,7 @@ public class Xog_tab_itm implements GfoInvkAble { Xoae_app app = wiki.Appe(); Gfo_usr_dlg usr_dlg = app.Usr_dlg(); try { if (page.Tab_data().Cancel_show()) return; // Special:Search canceled show; NOTE: must be inside try b/c finally handles thread - wiki.Ctx().Cur_page_(page); + wiki.Parser_mgr().Ctx().Cur_page_(page); if (page.Missing()) { if (wiki.Db_mgr().Save_mgr().Create_enabled()) { page = Xoae_page.create_(wiki, ttl); @@ -147,6 +147,7 @@ public class Xog_tab_itm implements GfoInvkAble { Xog_tab_itm_read_mgr.Show_page(this, page, false); } else { + wkr.Page().Tab_data().Tab().Page_(page); // NOTE: must set tab's page to current page, so that switching to it will update url bar; EX:pt.b:A"MANUAL_DE_PROCEDURI_.Sectiunea:""CONTABILITATE_SI_MANAGEMENT_FINANCIAR""" DATE:2015-09-17 if (page.Redirected_ttls().Count() > 0) usr_dlg.Prog_many("", "", "could not find: ~{0} (redirected from ~{1})", String_.new_u8(page.Url().Page_bry()), String_.new_u8((byte[])page.Redirected_ttls().Get_at(0))); else { diff --git a/400_xowa/src/gplx/xowa/gui/views/Xog_tab_itm_edit_mgr.java b/400_xowa/src/gplx/xowa/gui/views/Xog_tab_itm_edit_mgr.java index 94e55cb75..16a02d568 100644 --- a/400_xowa/src/gplx/xowa/gui/views/Xog_tab_itm_edit_mgr.java +++ b/400_xowa/src/gplx/xowa/gui/views/Xog_tab_itm_edit_mgr.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.gui.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; import gplx.gfui.*; import gplx.xowa.html.*; import gplx.xowa.pages.*; +import gplx.xowa.nss.*; import gplx.xowa.parsers.*; import gplx.xowa.parsers.tmpls.*; public class Xog_tab_itm_edit_mgr { public static void Save(Xog_tab_itm tab, boolean quick_save) { @@ -32,14 +33,14 @@ public class Xog_tab_itm_edit_mgr { } Invalidate(wiki); page.Data_raw_(new_text); - wiki.ParsePage_root(page, true); // refresh html - if (wiki.Html__hdump_enabled()) wiki.Html__hdump_wtr().Save(page); // must go after wiki.ParsePage_root - win_itm.Usr_dlg().Prog_one("", "", "saved page ~{0}", String_.new_u8(page.Ttl().Full_txt_raw())); // NOTE: show message after ParsePage_root, b/c ParsePage_root will flash "Loading page"; DATE:2014-05-17 + wiki.Parser_mgr().Parse(page, true); // refresh html + if (wiki.Html__hdump_enabled()) wiki.Html__hdump_wtr().Save(page); // must go after wiki.Parse + win_itm.Usr_dlg().Prog_one("", "", "saved page ~{0}", String_.new_u8(page.Ttl().Full_txt_raw())); // NOTE: show message after Parse, b/c Parse will flash "Loading page"; DATE:2014-05-17 if (!quick_save) { // full_save; save page and go to read mode page.Html_data().Edit_preview_(Bry_.Empty); - Xoae_page stack_page = tab.History_mgr().Cur_page(wiki); // NOTE: must be to CurPage() else changes will be lost when going Bwd,Fwd + Xoae_page stack_page = tab.History_mgr().Cur_page(wiki); // NOTE: must be to CurPage() else changes will be lost when going Bwd,Fwd stack_page.Data_raw_(page.Data_raw()); // NOTE: overwrite with "saved" changes - stack_page.Wikie().ParsePage_root(page, true); // NOTE: must reparse page if (a) Edit -> Read; or (b) "Options" save + stack_page.Wikie().Parser_mgr().Parse(page, true); // NOTE: must reparse page if (a) Edit -> Read; or (b) "Options" save win_itm.Page__mode_(Xopg_view_mode.Tid_read); win_itm.Page__async__bgn(tab); } @@ -54,7 +55,7 @@ public class Xog_tab_itm_edit_mgr { Xoae_page new_page = Xoae_page.new_(wiki, page.Ttl()); new_page.Revision_data().Id_(page.Revision_data().Id()); // NOTE: page_id needed for sqlite (was not needed for xdat) new_page.Data_raw_(new_text); - wiki.ParsePage_root(new_page, true); // refresh html + wiki.Parser_mgr().Parse(new_page, true); // refresh html tab.Page_(new_page); new_page.Tab_data().Tab_(tab); // replace old page with new_page; DATE:2014-10-09 Bry_bfr tmp_bfr = wiki.Utl__bfr_mkr().Get_m001(); @@ -98,17 +99,17 @@ public class Xog_tab_itm_edit_mgr { } public static void Debug(Xog_win_itm win, byte view_tid) { Xog_tab_itm tab = win.Tab_mgr().Active_tab(); Xoae_page page = tab.Page(); - Xowe_wiki wiki = tab.Wiki(); Xop_ctx ctx = wiki.Ctx(); + Xowe_wiki wiki = tab.Wiki(); Xop_ctx ctx = wiki.Parser_mgr().Ctx(); ctx.Defn_trace().Clear(); // TODO: move_me ctx.Defn_trace_(Xot_defn_trace_dbg._); Xoa_ttl ttl = page.Ttl(); Xoae_page new_page = Xoae_page.new_(wiki, ttl); byte[] data = tab.Html_itm().Get_elem_value_for_edit_box_as_bry(); new_page.Data_raw_(data); - wiki.ParsePage_root(new_page, true); + wiki.Parser_mgr().Parse(new_page, true); Bry_bfr bfr = win.App().Utl__bfr_mkr().Get_m001(); bfr.Add(new_page.Root().Root_src()); - wiki.Ctx().Defn_trace().Print(data, bfr); + wiki.Parser_mgr().Ctx().Defn_trace().Print(data, bfr); new_page.Data_raw_(bfr.To_bry_and_rls()); byte old = tab.View_mode(); tab.View_mode_(view_tid); diff --git a/400_xowa/src/gplx/xowa/gui/views/Xog_tab_itm_read_mgr.java b/400_xowa/src/gplx/xowa/gui/views/Xog_tab_itm_read_mgr.java index ece0df7de..3b5b72b49 100644 --- a/400_xowa/src/gplx/xowa/gui/views/Xog_tab_itm_read_mgr.java +++ b/400_xowa/src/gplx/xowa/gui/views/Xog_tab_itm_read_mgr.java @@ -18,6 +18,7 @@ along with this program. If not, see . package gplx.xowa.gui.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; import gplx.gfui.*; import gplx.core.threads.*; import gplx.xowa.parsers.lnkis.redlinks.*; import gplx.xowa.gui.history.*; import gplx.xowa.pages.*; +import gplx.xowa.langs.*; public class Xog_tab_itm_read_mgr { public static void Async(Xog_tab_itm tab) {tab.Async();} public static void Show_page(Xog_tab_itm tab, Xoae_page new_page, boolean reset_to_read) {Show_page(tab, new_page, reset_to_read, false, false, Xog_history_stack.Nav_fwd);} diff --git a/400_xowa/src/gplx/xowa/gui/views/Xog_win_itm.java b/400_xowa/src/gplx/xowa/gui/views/Xog_win_itm.java index b51318760..fba40be81 100644 --- a/400_xowa/src/gplx/xowa/gui/views/Xog_win_itm.java +++ b/400_xowa/src/gplx/xowa/gui/views/Xog_win_itm.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.gui.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; import gplx.core.threads.*; import gplx.gfui.*; import gplx.xowa.gui.*; import gplx.xowa.gui.history.*; import gplx.xowa.xtns.math.*; import gplx.xowa.files.*; +import gplx.xowa.langs.*; import gplx.xowa.gui.urls.*; import gplx.xowa.gui.views.*; import gplx.xowa.pages.*; import gplx.xowa.html.hrefs.*; import gplx.xowa.parsers.lnkis.redlinks.*; import gplx.xowa.specials.*; @@ -122,7 +123,7 @@ public class Xog_win_itm implements GfoInvkAble, GfoEvObj { } private void Win__link_clicked(String anchor_raw) { String url = url_box.Text(); - int pos = String_.FindFwd(url, gplx.html.Html_tag_.Anchor_str); + int pos = String_.FindFwd(url, gplx.langs.htmls.Html_tag_.Anchor_str); if (pos != Bry_.NotFound) url = String_.Mid(url, 0, pos); String anchor_str = Parse_evt_location_changing(anchor_raw); byte[] anchor_bry = Bry_.new_u8(anchor_str); @@ -144,7 +145,7 @@ public class Xog_win_itm implements GfoInvkAble, GfoEvObj { app.Gfs_mgr().Run_str(snippet); } private static String Parse_evt_location_changing(String v) { // EX: about:blank#anchor -> anchor - int pos = String_.FindFwd(v, gplx.html.Html_tag_.Anchor_str); + int pos = String_.FindFwd(v, gplx.langs.htmls.Html_tag_.Anchor_str); return pos == Bry_.NotFound ? null : String_.Mid(v, pos + 1); @@ -157,7 +158,7 @@ public class Xog_win_itm implements GfoInvkAble, GfoEvObj { // NOTE: if moving from "Edit" to "Read", reload page (else Preview changes will still show); NOTE: do not call Exec_page_reload / Exec_page_refresh, which will fire redlinks code page = tab_mgr.Active_tab().History_mgr().Cur_page(wiki); // NOTE: must set to CurPage() else changes will be lost when going Bwd,Fwd tab.Page_(page); - wiki.ParsePage_root(page, true); // NOTE: must reparse page if (a) Edit -> Read; or (b) "Options" save + wiki.Parser_mgr().Parse(page, true); // NOTE: must reparse page if (a) Edit -> Read; or (b) "Options" save Xoa_url url = page.Url(); if (url.Qargs_mgr().Match(Xoa_url_.Qarg__action, Xoa_url_.Qarg__action__edit)) // url has ?action=edit url = tab.Wiki().Utl__url_parser().Parse(url.To_bry_full_wo_qargs()); // remove all query args; handle (1) s.w:Earth?action=edit; (2) click on Read; DATE:2014-03-06 @@ -185,7 +186,7 @@ public class Xog_win_itm implements GfoInvkAble, GfoEvObj { Xoae_page new_page = tab.History_mgr().Go_by_dir(cur_wiki, fwd); if (new_page.Missing()) return; if (Xows_special_meta_.Itm__search.Match_ttl(new_page.Ttl())) // if Special:Search, reload page; needed for async loading; DATE:2015-04-19 - new_page = new_page.Wikie().Load_page_by_ttl(new_page.Url(), new_page.Ttl()); // NOTE: must reparse page if (a) Edit -> Read; or (b) "Options" save + new_page = new_page.Wikie().Data_mgr().Load_page_by_ttl(new_page.Url(), new_page.Ttl()); // NOTE: must reparse page if (a) Edit -> Read; or (b) "Options" save byte history_nav_type = fwd ? Xog_history_stack.Nav_fwd : Xog_history_stack.Nav_bwd; boolean new_page_is_same = Bry_.Eq(cur_page.Ttl().Full_txt(), new_page.Ttl().Full_txt()); Xog_tab_itm_read_mgr.Show_page(tab, new_page, true, new_page_is_same, false, history_nav_type); @@ -195,7 +196,7 @@ public class Xog_win_itm implements GfoInvkAble, GfoEvObj { Xog_tab_itm tab = tab_mgr.Active_tab(); Xoae_page page = tab.History_mgr().Cur_page(tab.Wiki()); // NOTE: must set to CurPage() else changes will be lost when going Bwd,Fwd tab.Page_(page); - page.Wikie().ParsePage_root(page, true); // NOTE: must reparse page if (a) Edit -> Read; or (b) "Options" save + page.Wikie().Parser_mgr().Parse(page, true); // NOTE: must reparse page if (a) Edit -> Read; or (b) "Options" save Page__refresh(); } public void Page__refresh() { @@ -254,7 +255,7 @@ public class Xog_win_itm implements GfoInvkAble, GfoEvObj { Xoa_url url = home_wiki.Utl__url_parser().Parse_by_urlbar_or_null(url_str); if (url == null) return Bry_.Empty; Xowe_wiki wiki = (Xowe_wiki)app.Wiki_mgr().Get_by_key_or_make_init_y(url.Wiki_bry()); Xoa_ttl ttl = Xoa_ttl.parse(wiki, url.Page_bry()); - Xoae_page new_page = wiki.Load_page_by_ttl(url, ttl); + Xoae_page new_page = wiki.Data_mgr().Load_page_by_ttl(url, ttl); if (new_page.Missing()) {return Bry_.Empty;} gplx.xowa.servers.Gxw_html_server.Assert_tab(app, new_page); // HACK: assert at least 1 tab for Firefox addon; DATE:2015-01-23 Xog_tab_itm tab = tab_mgr.Active_tab(); diff --git a/400_xowa/src/gplx/xowa/gui/views/Xog_win_itm_.java b/400_xowa/src/gplx/xowa/gui/views/Xog_win_itm_.java index db627f9f2..aa79fb220 100644 --- a/400_xowa/src/gplx/xowa/gui/views/Xog_win_itm_.java +++ b/400_xowa/src/gplx/xowa/gui/views/Xog_win_itm_.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.gui.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; import gplx.gfui.*; import gplx.xowa.gui.bnds.*; import gplx.xowa.gui.cmds.*; +import gplx.xowa.langs.*; public class Xog_win_itm_ { public static void Show_win(Xog_win_itm win) { Xoae_app app = win.App(); GfuiWin win_box = win.Win_box(); diff --git a/400_xowa/src/gplx/xowa/gui/views/boots/Xog_error_win.java b/400_xowa/src/gplx/xowa/gui/views/boots/Xog_error_win.java index 74097a188..6266af19d 100644 --- a/400_xowa/src/gplx/xowa/gui/views/boots/Xog_error_win.java +++ b/400_xowa/src/gplx/xowa/gui/views/boots/Xog_error_win.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.gui.views.boots; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; import gplx.xowa.gui.views.*; +import gplx.langs.htmls.encoders.*; import java.awt.*; import java.awt.event.*; import java.io.IOException; diff --git a/400_xowa/src/gplx/xowa/html/Xoh_cfg_file.java b/400_xowa/src/gplx/xowa/html/Xoh_cfg_file.java index d6c2c8ad3..6b8105181 100644 --- a/400_xowa/src/gplx/xowa/html/Xoh_cfg_file.java +++ b/400_xowa/src/gplx/xowa/html/Xoh_cfg_file.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html; import gplx.*; import gplx.xowa.*; +import gplx.langs.htmls.encoders.*; public class Xoh_cfg_file { public Xoh_cfg_file(Url_encoder url_encoder, Io_url xowa_dir) { Io_url mw_file_dir = xowa_dir.GenSubDir_nest("file", "mediawiki.file"); diff --git a/400_xowa/src/gplx/xowa/html/Xoh_html_wtr.java b/400_xowa/src/gplx/xowa/html/Xoh_html_wtr.java index f24d9fac8..ca2b59e08 100644 --- a/400_xowa/src/gplx/xowa/html/Xoh_html_wtr.java +++ b/400_xowa/src/gplx/xowa/html/Xoh_html_wtr.java @@ -16,11 +16,11 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html; import gplx.*; import gplx.xowa.*; -import gplx.core.primitives.*; import gplx.core.net.*; -import gplx.core.btries.*; import gplx.html.*; +import gplx.core.primitives.*; import gplx.core.net.*; import gplx.core.btries.*; +import gplx.langs.htmls.*; import gplx.xowa.langs.*; import gplx.xowa.wikis.domains.*; -import gplx.xowa.parsers.*; import gplx.xowa.parsers.apos.*; import gplx.xowa.parsers.amps.*; import gplx.xowa.parsers.lnkes.*; import gplx.xowa.parsers.hdrs.*; import gplx.xowa.parsers.lists.*; import gplx.xowa.html.lnkis.*; import gplx.xowa.parsers.tblws.*; import gplx.xowa.parsers.paras.*; import gplx.xowa.parsers.xndes.*; import gplx.xowa.parsers.lnkis.*; import gplx.xowa.parsers.miscs.*; -import gplx.xowa.xtns.*; import gplx.xowa.xtns.dynamicPageList.*; import gplx.xowa.xtns.math.*; import gplx.xowa.langs.vnts.*; import gplx.xowa.xtns.cite.*; import gplx.xowa.html.hzips.*; +import gplx.xowa.parsers.*; import gplx.xowa.parsers.apos.*; import gplx.xowa.parsers.amps.*; import gplx.xowa.parsers.lnkes.*; import gplx.xowa.parsers.hdrs.*; import gplx.xowa.parsers.lists.*; import gplx.xowa.html.lnkis.*; import gplx.xowa.parsers.tblws.*; import gplx.xowa.parsers.paras.*; import gplx.xowa.parsers.xndes.*; import gplx.xowa.parsers.lnkis.*; import gplx.xowa.parsers.miscs.*; import gplx.xowa.parsers.vnts.*; +import gplx.xowa.xtns.*; import gplx.xowa.xtns.dynamicPageList.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.cite.*; import gplx.xowa.html.hzips.*; public class Xoh_html_wtr { private Xowe_wiki wiki; private Xoae_app app; private Xoae_page page; private Xop_xatr_whitelist_mgr whitelist_mgr; public Xoh_html_wtr(Xowe_wiki wiki, Xow_html_mgr html_mgr) { @@ -385,7 +385,7 @@ public class Xoh_html_wtr { bfr.Add_byte(Tag__bgn).Add(name); if (xnde.Atrs_bgn() > Xop_tblw_wkr.Atrs_ignore_check) Xnde_atrs(tag_id, hctx, src, xnde.Atrs_bgn(), xnde.Atrs_end(), xnde.Atrs_ary(), bfr); bfr.Add_byte(Tag__end); - int tag_close_bgn = Bry_finder.Find_bwd_while(src, xnde.Tag_close_bgn(), -1, Byte_ascii.Space) + 1; // trim space from end; PAGE:en.w:Comment_(computer_programming) DATE:2014-06-23 + int tag_close_bgn = Bry_find_.Find_bwd_while(src, xnde.Tag_close_bgn(), -1, Byte_ascii.Space) + 1; // trim space from end; PAGE:en.w:Comment_(computer_programming) DATE:2014-06-23 Xoh_html_wtr_escaper.Escape(app.Parser_amp_mgr(), bfr, src, xnde.Tag_open_end(), tag_close_bgn, false, false); // is a .Xtn(); render literally everything between > and <; DATE:2014-03-11 bfr.Add(Tag__end_bgn).Add(name).Add_byte(Tag__end); break; diff --git a/400_xowa/src/gplx/xowa/html/Xoh_html_wtr_escaper.java b/400_xowa/src/gplx/xowa/html/Xoh_html_wtr_escaper.java index 94b2ef9ba..493cf3c1e 100644 --- a/400_xowa/src/gplx/xowa/html/Xoh_html_wtr_escaper.java +++ b/400_xowa/src/gplx/xowa/html/Xoh_html_wtr_escaper.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html; import gplx.*; import gplx.xowa.*; -import gplx.core.btries.*; import gplx.html.*; +import gplx.core.btries.*; import gplx.langs.htmls.*; import gplx.xowa.parsers.amps.*; import gplx.xowa.parsers.xndes.*; public class Xoh_html_wtr_escaper { public static byte[] Escape(Xop_amp_mgr amp_mgr, Bry_bfr tmp_bfr, byte[] src) { @@ -32,7 +32,7 @@ public class Xoh_html_wtr_escaper { if (nowiki_skip) { byte[] nowiki_name = Xop_xnde_tag_.Tag_nowiki.Name_bry(); int nowiki_name_len = nowiki_name.length; - if (Bry_.Eq(nowiki_name, src, i + 1, i + 1 + nowiki_name_len)) { // end) // not enough chars for "/nowiki>" || src[i + 1] != Byte_ascii.Slash // / - || !Bry_.Eq(nowiki_name, src, i + 2, i + 2 + nowiki_name_len) // nowiki + || !Bry_.Eq(src, i + 2, i + 2 + nowiki_name_len, nowiki_name) // nowiki || src[i + 2 + nowiki_name_len] != Byte_ascii.Gt // > ) return Bry_.NotFound; end_lt = i; diff --git a/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_mgr_tst.java b/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_mgr_tst.java index cdbc511d4..e26ccd6a7 100644 --- a/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_mgr_tst.java @@ -27,7 +27,7 @@ public class Xoh_page_wtr_mgr_tst { GfoInvkAble_.InvkCmd_val(portal_mgr, Xow_portal_mgr.Invk_div_logo_, Bry_.new_a7("~{portal_nav_main_href}")); portal_mgr.Init_assert(); Xohe_page_wtr_mgr page_wtr_mgr = new Xohe_page_wtr_mgr(true); - page_wtr_mgr.Gen(wiki.Ctx().Cur_page(), Xopg_view_mode.Tid_read); + page_wtr_mgr.Gen(wiki.Parser_mgr().Ctx().Cur_page(), Xopg_view_mode.Tid_read); Tfds.Eq(String_.new_a7(portal_mgr.Div_logo_bry()), "/site/en.wikipedia.org/wiki/"); } } diff --git a/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_wkr.java b/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_wkr.java index 75eacb69f..ad4bf2218 100644 --- a/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_wkr.java +++ b/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_wkr.java @@ -16,7 +16,11 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html; import gplx.*; import gplx.xowa.*; -import gplx.html.*; import gplx.xowa.html.portal.*; import gplx.xowa.pages.skins.*; import gplx.xowa.pages.*; +import gplx.langs.htmls.*; +import gplx.xowa.apps.gfss.*; +import gplx.xowa.langs.*; +import gplx.xowa.nss.*; +import gplx.xowa.html.portal.*; import gplx.xowa.pages.skins.*; import gplx.xowa.pages.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.gui.*; import gplx.xowa.xtns.wdatas.*; import gplx.xowa.langs.vnts.*; import gplx.xowa.parsers.*; public class Xoh_page_wtr_wkr implements Bry_fmtr_arg { @@ -72,8 +76,8 @@ public class Xoh_page_wtr_wkr implements Bry_fmtr_arg { byte[] page_display = Xoh_page_wtr_wkr_.Bld_page_name(tmp_bfr, page_ttl, page.Html_data().Display_ttl()); Xol_vnt_mgr vnt_mgr = wiki.Lang().Vnt_mgr(); if (vnt_mgr.Enabled()) { // VNT - page_name = vnt_mgr.Convert_text(wiki, page_name); - page_display = vnt_mgr.Convert_text(wiki, page_display); + page_name = vnt_mgr.Convert_mgr().Convert_text(wiki, page_name); + page_display = vnt_mgr.Convert_mgr().Convert_text(wiki, page_display); } fmtr.Bld_bfr_many(html_bfr , root_dir_bry, Xoa_app_.Version, Xoa_app_.Build_date, app.Tcp_server().Running_str() @@ -121,7 +125,7 @@ public class Xoh_page_wtr_wkr implements Bry_fmtr_arg { return; } if (ns_id == Xow_ns_.Id_mediawiki) { // if MediaWiki and wikitext, must be a message; convert args back to php; DATE:2014-06-13 - bfr.Add(gplx.xowa.apps.Xoa_gfs_php_mgr.Xto_php(tmp_bfr, Bool_.N, data_raw)); + bfr.Add(Xoa_gfs_php_mgr.Xto_php(tmp_bfr, Bool_.N, data_raw)); return; } if (ns_id == Xow_ns_.Id_file) // if [[File]], add boilerplate header @@ -129,7 +133,7 @@ public class Xoh_page_wtr_wkr implements Bry_fmtr_arg { gplx.xowa.html.tidy.Xoh_tidy_mgr tidy_mgr = app.Html_mgr().Tidy_mgr(); boolean tidy_enabled = tidy_mgr.Enabled(); Bry_bfr hdom_bfr = tidy_enabled ? app.Utl__bfr_mkr().Get_m001() : bfr; // if tidy, then write to tidy_bfr; note that bfr already has and written to it, so this can't be passed to tidy; DATE:2014-06-11 - wiki.Html_mgr().Html_wtr().Write_all(hdom_bfr, page.Wikie().Ctx(), hctx, page.Root().Data_mid(), page.Root()); + wiki.Html_mgr().Html_wtr().Write_all(hdom_bfr, page.Wikie().Parser_mgr().Ctx(), hctx, page.Root().Data_mid(), page.Root()); if (tidy_enabled) { tidy_mgr.Run_tidy_html(page, hdom_bfr); bfr.Add_bfr_and_clear(hdom_bfr); @@ -151,7 +155,7 @@ public class Xoh_page_wtr_wkr implements Bry_fmtr_arg { } Xol_vnt_mgr vnt_mgr = wiki.Lang().Vnt_mgr(); if (vnt_mgr.Enabled()) // VNT - bfr.Add(vnt_mgr.Convert_text(wiki, bfr.Xto_bry_and_clear())); + bfr.Add(vnt_mgr.Convert_mgr().Convert_text(wiki, bfr.Xto_bry_and_clear())); } private void Write_body_pre(Bry_bfr bfr, Xoae_app app, Xowe_wiki wiki, byte[] data_raw, Bry_bfr tmp_bfr) { Xoh_html_wtr_escaper.Escape(app.Parser_amp_mgr(), tmp_bfr, data_raw, 0, data_raw.length, false, false); @@ -162,7 +166,7 @@ public class Xoh_page_wtr_wkr implements Bry_fmtr_arg { if ( ns_id == Xow_ns_.Id_mediawiki // if MediaWiki and wikitext, must be a message; convert args back to php; DATE:2014-06-13 && page_tid == Xow_page_tid.Tid_wikitext ) - data_raw = gplx.xowa.apps.Xoa_gfs_php_mgr.Xto_php(tmp_bfr, Bool_.N, data_raw); + data_raw = Xoa_gfs_php_mgr.Xto_php(tmp_bfr, Bool_.N, data_raw); int data_raw_len = data_raw.length; if (mgr.Html_capable()) Xoh_html_wtr_escaper.Escape(page.Wikie().Appe().Parser_amp_mgr(), bfr, data_raw, 0, data_raw_len, false, false); // NOTE: must escape; assume that browser will automatically escape (<) (which Mozilla does) diff --git a/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_wkr_.java b/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_wkr_.java index f0044c6ec..81d5e7dfe 100644 --- a/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_wkr_.java +++ b/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_wkr_.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html; import gplx.*; import gplx.xowa.*; -import gplx.html.*; import gplx.xowa.xtns.relatedSites.*; +import gplx.langs.htmls.*; import gplx.xowa.xtns.relatedSites.*; +import gplx.xowa.nss.*; import gplx.xowa.parsers.utils.*; public class Xoh_page_wtr_wkr_ { public static byte[] Bld_page_content_sub(Xoae_app app, Xowe_wiki wiki, Xoae_page page, Bry_bfr tmp_bfr) { @@ -37,8 +38,8 @@ public class Xoh_page_wtr_wkr_ { public static void Bld_head_end(Bry_bfr html_bfr, Xoae_page page) { byte[] head_end = page.Html_data().Custom_head_end(); if (head_end == null) return; - int insert_pos = Bry_finder.Find_fwd(html_bfr.Bfr(), Html_tag_.Head_rhs); - if (insert_pos == Bry_finder.Not_found) { + int insert_pos = Bry_find_.Find_fwd(html_bfr.Bfr(), Html_tag_.Head_rhs); + if (insert_pos == Bry_find_.Not_found) { Gfo_usr_dlg_.I.Warn_many("", "", "could not find "); return; } @@ -47,8 +48,8 @@ public class Xoh_page_wtr_wkr_ { public static void Bld_html_end(Bry_bfr html_bfr, Xoae_page page) { byte[] html_end = page.Html_data().Custom_html_end(); if (html_end == null) return; - int insert_pos = Bry_finder.Find_bwd(html_bfr.Bfr(), Html_tag_.Html_rhs, html_bfr.Len()); - if (insert_pos == Bry_finder.Not_found) { + int insert_pos = Bry_find_.Find_bwd(html_bfr.Bfr(), Html_tag_.Html_rhs, html_bfr.Len()); + if (insert_pos == Bry_find_.Not_found) { Gfo_usr_dlg_.I.Warn_many("", "", "could not find "); return; } diff --git a/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_wkr_tst.java b/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_wkr_tst.java index 897abcb43..8ddd25412 100644 --- a/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_wkr_tst.java +++ b/400_xowa/src/gplx/xowa/html/Xoh_page_wtr_wkr_tst.java @@ -55,7 +55,7 @@ class Xoh_page_wtr_wkr_fxt { } public void Test_edit(String raw, String expd) { wiki.Html_mgr().Page_wtr_mgr().Html_capable_(true); - Xoae_page page = wiki.Ctx().Cur_page(); + Xoae_page page = wiki.Parser_mgr().Ctx().Cur_page(); page.Data_raw_(Bry_.new_u8(raw)); Xohe_page_wtr_mgr mgr = wiki.Html_mgr().Page_wtr_mgr(); Xoh_page_wtr_wkr wkr = mgr.Wkr(Xopg_view_mode.Tid_edit).Page_(page).Mgr_(mgr); @@ -64,7 +64,7 @@ class Xoh_page_wtr_wkr_fxt { } public void Test_read(String page_name, String page_text, String expd) { wiki.Html_mgr().Page_wtr_mgr().Html_capable_(true); - Xoae_page page = wiki.Ctx().Cur_page(); + Xoae_page page = wiki.Parser_mgr().Ctx().Cur_page(); page.Ttl_(Xoa_ttl.parse(wiki, Bry_.new_a7(page_name))); page.Data_raw_(Bry_.new_u8(page_text)); Xohe_page_wtr_mgr mgr = wiki.Html_mgr().Page_wtr_mgr(); diff --git a/400_xowa/src/gplx/xowa/html/Xohe_page_wtr_mgr.java b/400_xowa/src/gplx/xowa/html/Xohe_page_wtr_mgr.java index e78710164..ba493ee8e 100644 --- a/400_xowa/src/gplx/xowa/html/Xohe_page_wtr_mgr.java +++ b/400_xowa/src/gplx/xowa/html/Xohe_page_wtr_mgr.java @@ -61,7 +61,7 @@ public class Xohe_page_wtr_mgr extends Xoh_page_wtr_mgr_base implements GfoInvkA page_html_fmtr.Eval_mgr_(wiki.Eval_mgr()); } Bry_bfr tmp_bfr = Xoa_app_.Utl__bfr_mkr().Get_m001(); - byte[] bry = wtr.Write(this, page, wiki.Ctx(), tmp_bfr); + byte[] bry = wtr.Write(this, page, wiki.Parser_mgr().Ctx(), tmp_bfr); tmp_bfr.Mkr_rls(); return bry; } diff --git a/400_xowa/src/gplx/xowa/html/Xohp_ctg_grp_mgr.java b/400_xowa/src/gplx/xowa/html/Xohp_ctg_grp_mgr.java index d97a3ee71..e541d0747 100644 --- a/400_xowa/src/gplx/xowa/html/Xohp_ctg_grp_mgr.java +++ b/400_xowa/src/gplx/xowa/html/Xohp_ctg_grp_mgr.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html; import gplx.*; import gplx.xowa.*; +import gplx.xowa.langs.*; public class Xohp_ctg_grp_mgr { final Bry_fmtr grp_fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last ( "
" diff --git a/400_xowa/src/gplx/xowa/html/Xohp_ctg_grp_mgr_tst.java b/400_xowa/src/gplx/xowa/html/Xohp_ctg_grp_mgr_tst.java index 1b7ae0da9..c8ec47fc4 100644 --- a/400_xowa/src/gplx/xowa/html/Xohp_ctg_grp_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/html/Xohp_ctg_grp_mgr_tst.java @@ -48,7 +48,7 @@ class Xoh_ctg_mgr_fxt { public Xoh_ctg_mgr_fxt Init_ctgs(String... v) {init_ctgs = v; return this;} private String[] init_ctgs; public void Test_html(String expd) { byte[][] ctgs_bry_ary = Bry_.Ary(init_ctgs); - Xoae_page page = wiki.Ctx().Cur_page(); + Xoae_page page = wiki.Parser_mgr().Ctx().Cur_page(); page.Category_list_(ctgs_bry_ary); ctg_grp_mgr.Bld(tmp_bfr, page, ctgs_bry_ary.length); Tfds.Eq_str_lines(expd, tmp_bfr.Xto_str_and_clear()); diff --git a/400_xowa/src/gplx/xowa/html/Xow_html_mgr.java b/400_xowa/src/gplx/xowa/html/Xow_html_mgr.java index 6cec81b0e..d79b68f4c 100644 --- a/400_xowa/src/gplx/xowa/html/Xow_html_mgr.java +++ b/400_xowa/src/gplx/xowa/html/Xow_html_mgr.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html; import gplx.*; import gplx.xowa.*; +import gplx.xowa.langs.*; import gplx.xowa.ctgs.*; import gplx.xowa.xtns.gallery.*; import gplx.xowa.html.portal.*; import gplx.xowa.html.tocs.*; import gplx.xowa.wikis.modules.*; import gplx.xowa.html.hzips.*; public class Xow_html_mgr implements GfoInvkAble { diff --git a/400_xowa/src/gplx/xowa/html/bridges/Bridge_cmd_itm.java b/400_xowa/src/gplx/xowa/html/bridges/Bridge_cmd_itm.java index a64f50e76..76a6bbb3b 100644 --- a/400_xowa/src/gplx/xowa/html/bridges/Bridge_cmd_itm.java +++ b/400_xowa/src/gplx/xowa/html/bridges/Bridge_cmd_itm.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.bridges; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.core.json.*; +import gplx.langs.jsons.*; public interface Bridge_cmd_itm { byte[] Key(); String Exec(Json_nde data); diff --git a/400_xowa/src/gplx/xowa/html/bridges/Bridge_cmd_mgr.java b/400_xowa/src/gplx/xowa/html/bridges/Bridge_cmd_mgr.java index ba96824c6..faffb4d41 100644 --- a/400_xowa/src/gplx/xowa/html/bridges/Bridge_cmd_mgr.java +++ b/400_xowa/src/gplx/xowa/html/bridges/Bridge_cmd_mgr.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.bridges; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.core.json.*; +import gplx.langs.jsons.*; public class Bridge_cmd_mgr { private final Json_parser parser; private final Hash_adp_bry cmd_hash = Hash_adp_bry.cs(); diff --git a/400_xowa/src/gplx/xowa/html/bridges/Bridge_msg_bldr.java b/400_xowa/src/gplx/xowa/html/bridges/Bridge_msg_bldr.java index 0e261f9e3..4d9f24a28 100644 --- a/400_xowa/src/gplx/xowa/html/bridges/Bridge_msg_bldr.java +++ b/400_xowa/src/gplx/xowa/html/bridges/Bridge_msg_bldr.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.bridges; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.core.json.*; +import gplx.langs.jsons.*; public class Bridge_msg_bldr { private final Json_wtr wtr = new Json_wtr(); private boolean rslt_pass; private String rslt_msg; diff --git a/400_xowa/src/gplx/xowa/html/bridges/Xoh_bridge_mgr.java b/400_xowa/src/gplx/xowa/html/bridges/Xoh_bridge_mgr.java index 2ffa4b1f1..3a0f850c2 100644 --- a/400_xowa/src/gplx/xowa/html/bridges/Xoh_bridge_mgr.java +++ b/400_xowa/src/gplx/xowa/html/bridges/Xoh_bridge_mgr.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.bridges; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.core.json.*; +import gplx.langs.jsons.*; import gplx.xowa.html.bridges.dbuis.tbls.*; public class Xoh_bridge_mgr { public Xoh_bridge_mgr(Json_parser parser) {this.cmd_mgr = new Bridge_cmd_mgr(parser);} diff --git a/400_xowa/src/gplx/xowa/html/bridges/dbuis/Dbui_cmd_mgr.java b/400_xowa/src/gplx/xowa/html/bridges/dbuis/Dbui_cmd_mgr.java index daf2cc24b..62548f157 100644 --- a/400_xowa/src/gplx/xowa/html/bridges/dbuis/Dbui_cmd_mgr.java +++ b/400_xowa/src/gplx/xowa/html/bridges/dbuis/Dbui_cmd_mgr.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.bridges.dbuis; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.bridges.*; -import gplx.core.json.*; import gplx.xowa.html.bridges.dbuis.tbls.*; +import gplx.langs.jsons.*; import gplx.xowa.html.bridges.dbuis.tbls.*; public class Dbui_cmd_mgr { private final Hash_adp_bry hash = Hash_adp_bry.cs(); private boolean init; @@ -34,7 +34,7 @@ public class Dbui_cmd_mgr { public String Save(Json_nde data) {return Get_tbl(data).Save(data.Get_bry(Arg_row_id), data.Get_bry(Arg_row_pkey), To_hash(data.Get(Arg_vals)));} public String Reorder(Json_nde data){ byte[] pkeys_concat = data.Get_bry(Arg_pkeys); - return Get_tbl(data).Reorder(Bry_.Split(pkeys_concat, Byte_ascii.Pipe), -1); + return Get_tbl(data).Reorder(Bry_split_.Split(pkeys_concat, Byte_ascii.Pipe), -1); } private Dbui_tbl_itm Get_tbl(Json_nde data) { byte[] tbl_key = data.Get_bry(Arg_tbl_key); diff --git a/400_xowa/src/gplx/xowa/html/doms/Xoh_dom_.java b/400_xowa/src/gplx/xowa/html/doms/Xoh_dom_.java index feb0bf6bb..20ff5cd75 100644 --- a/400_xowa/src/gplx/xowa/html/doms/Xoh_dom_.java +++ b/400_xowa/src/gplx/xowa/html/doms/Xoh_dom_.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.doms; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.html.*; +import gplx.langs.htmls.*; public class Xoh_dom_ { private static final byte[] Lt_bry = Bry_.new_a7("<"), Space_bry = Bry_.new_a7(" "); public static byte[] Query_val_by_where(Xoh_find rv, byte[] src, byte[] where_nde, byte[] where_key, byte[] where_val, byte[] query_key, int bgn) { @@ -45,22 +45,22 @@ public class Xoh_dom_ { return null; } public static boolean Select_tag(Xoh_find rv, byte[] src, byte[] nde, byte[] key, int rng_bgn, int rng_end) { - int tag_bgn = Bry_finder.Find_fwd(src, nde, rng_bgn, rng_end); if (tag_bgn == Bry_.NotFound) return false; - int tag_end = Bry_finder.Find_fwd(src, Byte_ascii.Gt, tag_bgn, rng_end); if (tag_end == Bry_.NotFound) return false; - int key_bgn = Bry_finder.Find_fwd(src, key, tag_bgn, tag_end); if (key_bgn == Bry_.NotFound) return false; + int tag_bgn = Bry_find_.Find_fwd(src, nde, rng_bgn, rng_end); if (tag_bgn == Bry_.NotFound) return false; + int tag_end = Bry_find_.Find_fwd(src, Byte_ascii.Gt, tag_bgn, rng_end); if (tag_end == Bry_.NotFound) return false; + int key_bgn = Bry_find_.Find_fwd(src, key, tag_bgn, tag_end); if (key_bgn == Bry_.NotFound) return false; int key_end = key_bgn + key.length; - int val_bgn = Bry_finder.Find_fwd(src, Byte_ascii.Quote, key_end, tag_end); if (val_bgn == Bry_.NotFound) return false; + int val_bgn = Bry_find_.Find_fwd(src, Byte_ascii.Quote, key_end, tag_end); if (val_bgn == Bry_.NotFound) return false; ++val_bgn; - int val_end = Bry_finder.Find_fwd(src, Byte_ascii.Quote, val_bgn, tag_end); if (val_end == Bry_.NotFound) return false; + int val_end = Bry_find_.Find_fwd(src, Byte_ascii.Quote, val_bgn, tag_end); if (val_end == Bry_.NotFound) return false; rv.Set_all(tag_bgn, tag_end, key_bgn, key_end, val_bgn, val_end); return true; } public static boolean Find_atr_val_in_tag(Xoh_find rv, byte[] src, byte[] key, int tag_bgn, int tag_end) { - int key_bgn = Bry_finder.Find_fwd(src, key, tag_bgn, tag_end); if (key_bgn == Bry_.NotFound) return false; + int key_bgn = Bry_find_.Find_fwd(src, key, tag_bgn, tag_end); if (key_bgn == Bry_.NotFound) return false; int key_end = key_bgn + key.length; - int val_bgn = Bry_finder.Find_fwd(src, Byte_ascii.Quote, key_end, tag_end); if (val_bgn == Bry_.NotFound) return false; + int val_bgn = Bry_find_.Find_fwd(src, Byte_ascii.Quote, key_end, tag_end); if (val_bgn == Bry_.NotFound) return false; ++val_bgn; - int val_end = Bry_finder.Find_fwd(src, Byte_ascii.Quote, val_bgn, tag_end); if (val_end == Bry_.NotFound) return false; + int val_end = Bry_find_.Find_fwd(src, Byte_ascii.Quote, val_bgn, tag_end); if (val_end == Bry_.NotFound) return false; rv.Set_all(tag_bgn, tag_end, key_bgn, key_end, val_bgn, val_end); return true; } diff --git a/400_xowa/src/gplx/xowa/html/hdumps/Xohd_hdump_rdr.java b/400_xowa/src/gplx/xowa/html/hdumps/Xohd_hdump_rdr.java index 138540095..a8f907824 100644 --- a/400_xowa/src/gplx/xowa/html/hdumps/Xohd_hdump_rdr.java +++ b/400_xowa/src/gplx/xowa/html/hdumps/Xohd_hdump_rdr.java @@ -18,7 +18,7 @@ along with this program. If not, see . package gplx.xowa.html.hdumps; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.heads.*; import gplx.xowa.html.hdumps.data.*; import gplx.xowa.html.hzips.*; import gplx.xowa.html.hdumps.abrvs.*; import gplx.xowa.html.hdumps.pages.*; import gplx.xowa.pages.*; import gplx.xowa.pages.skins.*; -import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa2.gui.*; +import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.gui.*; import gplx.xowa.parsers.*; public class Xohd_hdump_rdr { private final Bry_bfr_mkr bfr_mkr; private final Xow_hzip_mgr hzip_mgr; diff --git a/400_xowa/src/gplx/xowa/html/hdumps/Xohd_hdump_wtr.java b/400_xowa/src/gplx/xowa/html/hdumps/Xohd_hdump_wtr.java index 824b3b092..a46aad366 100644 --- a/400_xowa/src/gplx/xowa/html/hdumps/Xohd_hdump_wtr.java +++ b/400_xowa/src/gplx/xowa/html/hdumps/Xohd_hdump_wtr.java @@ -18,7 +18,7 @@ along with this program. If not, see . package gplx.xowa.html.hdumps; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hdumps.data.*; import gplx.xowa.html.hzips.*; import gplx.xowa.html.hdumps.abrvs.*; import gplx.xowa.html.hdumps.pages.*; import gplx.xowa.pages.*; import gplx.xowa.pages.skins.*; import gplx.xowa.dbs.*; -import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa2.gui.*; +import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.gui.*; public class Xohd_hdump_wtr { private final Bry_bfr_mkr bfr_mkr; private final Xohe_page_wtr_mgr page_wtr_mgr; private final Xohd_page_html_mgr__save save_mgr; private Xowd_db_mgr core_data_mgr; diff --git a/400_xowa/src/gplx/xowa/html/hdumps/Xohd_hdump_wtr_tst.java b/400_xowa/src/gplx/xowa/html/hdumps/Xohd_hdump_wtr_tst.java index 31a0e31b8..d54099c18 100644 --- a/400_xowa/src/gplx/xowa/html/hdumps/Xohd_hdump_wtr_tst.java +++ b/400_xowa/src/gplx/xowa/html/hdumps/Xohd_hdump_wtr_tst.java @@ -114,7 +114,7 @@ class Xodb_hdump_mgr__base_fxt { if (fxt == null) { fxt = new Xop_fxt(); wiki = fxt.Wiki(); - page = wiki.Ctx().Cur_page(); + page = wiki.Parser_mgr().Ctx().Cur_page(); hdump_wtr = new Xohd_hdump_wtr(fxt.App(), fxt.Wiki()); } fxt.Reset(); diff --git a/400_xowa/src/gplx/xowa/html/hdumps/abrvs/Xohd_abrv_mgr.java b/400_xowa/src/gplx/xowa/html/hdumps/abrvs/Xohd_abrv_mgr.java index 90ee9f0fa..06106e9bb 100644 --- a/400_xowa/src/gplx/xowa/html/hdumps/abrvs/Xohd_abrv_mgr.java +++ b/400_xowa/src/gplx/xowa/html/hdumps/abrvs/Xohd_abrv_mgr.java @@ -16,11 +16,11 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.hdumps.abrvs; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hdumps.*; -import gplx.core.primitives.*; import gplx.core.brys.*; import gplx.core.btries.*; -import gplx.html.*; import gplx.xowa.html.*; import gplx.xowa.html.hdumps.core.*; import gplx.xowa.html.lnkis.*; +import gplx.core.primitives.*; import gplx.core.brys.*; import gplx.core.btries.*; import gplx.langs.htmls.encoders.*; +import gplx.langs.htmls.*; import gplx.xowa.html.*; import gplx.xowa.html.hdumps.core.*; import gplx.xowa.html.lnkis.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.xtns.gallery.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.apps.fsys.*; -import gplx.xowa2.gui.*; +import gplx.xowa.gui.*; public class Xohd_abrv_mgr { private Bry_bfr tmp_bfr = Bry_bfr.reset_(255); private Bry_rdr bry_rdr = new Bry_rdr(); private Gfo_usr_dlg usr_dlg = Gfo_usr_dlg_.I; private Xoh_cfg_file cfg_file; private Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); private Xoh_file_html_fmtr__base html_fmtr; diff --git a/400_xowa/src/gplx/xowa/html/hdumps/abrvs/Xohd_abrv_mgr_tst.java b/400_xowa/src/gplx/xowa/html/hdumps/abrvs/Xohd_abrv_mgr_tst.java index c1546d67a..715fc6eff 100644 --- a/400_xowa/src/gplx/xowa/html/hdumps/abrvs/Xohd_abrv_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/html/hdumps/abrvs/Xohd_abrv_mgr_tst.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.html.hdumps.abrvs; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hdumps.*; import org.junit.*; import gplx.core.primitives.*; import gplx.xowa.html.hdumps.core.*; import gplx.xowa.html.hdumps.data.*; import gplx.xowa.files.*; import gplx.xowa.parsers.lnkis.*; -import gplx.xowa2.gui.*; +import gplx.xowa.gui.*; public class Xohd_abrv_mgr_tst { @Before public void init() { fxt.Clear(); diff --git a/400_xowa/src/gplx/xowa/html/hdumps/bldrs/Xob_hdump_bldr.java b/400_xowa/src/gplx/xowa/html/hdumps/bldrs/Xob_hdump_bldr.java index 10e022fce..dd129208c 100644 --- a/400_xowa/src/gplx/xowa/html/hdumps/bldrs/Xob_hdump_bldr.java +++ b/400_xowa/src/gplx/xowa/html/hdumps/bldrs/Xob_hdump_bldr.java @@ -18,7 +18,8 @@ along with this program. If not, see . package gplx.xowa.html.hdumps.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hdumps.*; import gplx.dbs.*; import gplx.xowa.wikis.data.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.dbs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.html.hdumps.data.*; import gplx.xowa.html.hzips.*; -import gplx.xowa.pages.*; import gplx.xowa2.gui.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; +import gplx.xowa.nss.*; +import gplx.xowa.pages.*; import gplx.xowa.gui.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; public class Xob_hdump_bldr { private final Xowd_db_mgr wiki_db_mgr; private final Xob_ns_to_db_mgr ns_to_db_mgr; int prv_row_len = 0; private final Xodump_stats_itm stats_itm = new Xodump_stats_itm(); private final Xodump_stats_tbl stats_tbl; diff --git a/400_xowa/src/gplx/xowa/html/hdumps/bldrs/Xob_hdump_img_cmd.java b/400_xowa/src/gplx/xowa/html/hdumps/bldrs/Xob_hdump_img_cmd.java index 7a1069a23..140a64cae 100644 --- a/400_xowa/src/gplx/xowa/html/hdumps/bldrs/Xob_hdump_img_cmd.java +++ b/400_xowa/src/gplx/xowa/html/hdumps/bldrs/Xob_hdump_img_cmd.java @@ -16,9 +16,10 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.hdumps.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hdumps.*; -import gplx.dbs.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.bldrs.*; import gplx.xowa.html.hdumps.core.*; +import gplx.dbs.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; +import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.html.hdumps.core.*; import gplx.xowa.files.*; -import gplx.xowa2.gui.*; +import gplx.xowa.gui.*; class Xob_hdump_img_cmd extends Xob_itm_basic_base implements Xob_cmd { private Xowd_html_tbl html_tbl; public Xob_hdump_img_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} diff --git a/400_xowa/src/gplx/xowa/html/hdumps/bldrs/Xob_redlink_mkr_cmd.java b/400_xowa/src/gplx/xowa/html/hdumps/bldrs/Xob_redlink_mkr_cmd.java index 58a8391b9..67328791d 100644 --- a/400_xowa/src/gplx/xowa/html/hdumps/bldrs/Xob_redlink_mkr_cmd.java +++ b/400_xowa/src/gplx/xowa/html/hdumps/bldrs/Xob_redlink_mkr_cmd.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.hdumps.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hdumps.*; -import gplx.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.html.hdumps.data.*; +import gplx.dbs.*; +import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.html.hdumps.data.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; public class Xob_redlink_mkr_cmd extends Xob_itm_basic_base implements Xob_cmd { private int commit_interval = 10000, commit_count = 0; diff --git a/400_xowa/src/gplx/xowa/html/hdumps/data/Xohd_page_html_mgr__load.java b/400_xowa/src/gplx/xowa/html/hdumps/data/Xohd_page_html_mgr__load.java index 24a5e1682..570f3cf52 100644 --- a/400_xowa/src/gplx/xowa/html/hdumps/data/Xohd_page_html_mgr__load.java +++ b/400_xowa/src/gplx/xowa/html/hdumps/data/Xohd_page_html_mgr__load.java @@ -18,7 +18,7 @@ along with this program. If not, see . package gplx.xowa.html.hdumps.data; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hdumps.*; import gplx.core.primitives.*; import gplx.core.brys.*; import gplx.core.btries.*; import gplx.dbs.*; import gplx.ios.*; import gplx.xowa.dbs.*; import gplx.xowa.pages.*; import gplx.xowa.html.hdumps.core.*; import gplx.xowa.html.hdumps.data.*; import gplx.xowa.html.hdumps.pages.*; import gplx.xowa.pages.skins.*; import gplx.xowa.html.hdumps.data.srl.*; -import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa2.gui.*; +import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.gui.*; public class Xohd_page_html_mgr__load { private final Xohd_page_srl_mgr srl_mgr = Xohd_page_srl_mgr.I; private final Bry_rdr rdr = new Bry_rdr(); private final List_adp rows = List_adp_.new_(), imgs = List_adp_.new_(); diff --git a/400_xowa/src/gplx/xowa/html/hdumps/data/Xohd_page_html_mgr__save.java b/400_xowa/src/gplx/xowa/html/hdumps/data/Xohd_page_html_mgr__save.java index 80c8fc73b..3f7f0e868 100644 --- a/400_xowa/src/gplx/xowa/html/hdumps/data/Xohd_page_html_mgr__save.java +++ b/400_xowa/src/gplx/xowa/html/hdumps/data/Xohd_page_html_mgr__save.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.html.hdumps.data; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.html.hdumps.core.*; import gplx.xowa.html.hdumps.data.srl.*; -import gplx.xowa2.gui.*; import gplx.xowa.html.hdumps.pages.*; import gplx.xowa.parsers.lnkis.redlinks.*; +import gplx.xowa.gui.*; import gplx.xowa.html.hdumps.pages.*; import gplx.xowa.parsers.lnkis.redlinks.*; public class Xohd_page_html_mgr__save { private Xohd_page_srl_mgr srl_mgr = Xohd_page_srl_mgr.I; public void Update(Bry_bfr tmp_bfr, Xowd_html_tbl tbl, Xoae_page page) { diff --git a/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_itm.java b/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_itm.java index 1db265a54..b53418bbd 100644 --- a/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_itm.java +++ b/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_itm.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.hdumps.data.srl; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.html.hdumps.data.*; -import gplx.core.primitives.*; import gplx.xowa.html.hzips.*; import gplx.xowa2.gui.*; +import gplx.core.primitives.*; import gplx.xowa.html.hzips.*; import gplx.xowa.gui.*; public interface Xohd_page_srl_itm { // INFO: serializes Xog_page to a byte[] before storing in the wiki_page_html table byte Tid(); void Save(Xog_page hpg, Bry_bfr bfr); diff --git a/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_itm_tst.java b/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_itm_tst.java index 4a1c18a88..9bfdf274c 100644 --- a/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_itm_tst.java +++ b/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_itm_tst.java @@ -16,8 +16,9 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.hdumps.data.srl; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.html.hdumps.data.*; -import org.junit.*; import gplx.xowa.html.hdumps.core.*; import gplx.xowa.html.hzips.*; import gplx.xowa.html.hdumps.pages.*; -import gplx.xowa2.gui.*; +import org.junit.*; +import gplx.xowa.html.hdumps.core.*; import gplx.xowa.html.hzips.*; import gplx.xowa.html.hdumps.pages.*; +import gplx.xowa.gui.*; public class Xohd_page_srl_itm_tst { @Before public void init() {fxt.Clear();} private Xohd_page_srl_itm_fxt fxt = new Xohd_page_srl_itm_fxt(); @Test public void Body() { diff --git a/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_itms.java b/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_itms.java index f18ea4259..ff84b5864 100644 --- a/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_itms.java +++ b/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_itms.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.html.hdumps.data.srl; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.html.hdumps.data.*; import gplx.core.primitives.*; import gplx.xowa.html.hdumps.core.*; import gplx.xowa.html.hzips.*; import gplx.xowa.html.hdumps.pages.*; -import gplx.xowa2.gui.*; +import gplx.xowa.gui.*; class Xohd_page_srl_itm__body extends Xohd_page_srl_itm__base { public Xohd_page_srl_itm__body() {this.Save_tid_n_();} @Override public byte Tid() {return Xohd_page_srl_itm_.Tid_body;} diff --git a/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_mgr.java b/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_mgr.java index af05a302b..d38237eb5 100644 --- a/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_mgr.java +++ b/400_xowa/src/gplx/xowa/html/hdumps/data/srl/Xohd_page_srl_mgr.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.html.hdumps.data.srl; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.html.hdumps.data.*; import gplx.core.primitives.*; import gplx.xowa.html.hdumps.core.*; -import gplx.xowa2.gui.*; +import gplx.xowa.gui.*; public class Xohd_page_srl_mgr { private final Xohd_page_srl_itm[] itm_ary; private final Xohd_page_srl_itm itm_body; private final Int_obj_ref count_ref = Int_obj_ref.zero_(); diff --git a/400_xowa/src/gplx/xowa/html/heads/Xoh_head_itm__globals.java b/400_xowa/src/gplx/xowa/html/heads/Xoh_head_itm__globals.java index ab14cb001..2b387c704 100644 --- a/400_xowa/src/gplx/xowa/html/heads/Xoh_head_itm__globals.java +++ b/400_xowa/src/gplx/xowa/html/heads/Xoh_head_itm__globals.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.heads; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.xowa.langs.numbers.*; +import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; import gplx.xowa.langs.numbers.*; public class Xoh_head_itm__globals extends Xoh_head_itm__base { private final Xoh_head_wtr tmp_wtr = new Xoh_head_wtr(); @Override public byte[] Key() {return Xoh_head_itm_.Key__globals;} diff --git a/400_xowa/src/gplx/xowa/html/heads/Xoh_head_itm__server.java b/400_xowa/src/gplx/xowa/html/heads/Xoh_head_itm__server.java index 381f0e146..177ffd681 100644 --- a/400_xowa/src/gplx/xowa/html/heads/Xoh_head_itm__server.java +++ b/400_xowa/src/gplx/xowa/html/heads/Xoh_head_itm__server.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.heads; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.core.json.*; +import gplx.langs.jsons.*; import gplx.xowa.servers.http.*; public class Xoh_head_itm__server extends Xoh_head_itm__base { @Override public byte[] Key() {return Xoh_head_itm_.Key__server;} diff --git a/400_xowa/src/gplx/xowa/html/heads/Xoh_head_mgr_tst.java b/400_xowa/src/gplx/xowa/html/heads/Xoh_head_mgr_tst.java index 1a8be9806..bd8ad86b7 100644 --- a/400_xowa/src/gplx/xowa/html/heads/Xoh_head_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/html/heads/Xoh_head_mgr_tst.java @@ -18,6 +18,7 @@ along with this program. If not, see . package gplx.xowa.html.heads; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import org.junit.*; import gplx.xowa.gui.*; +import gplx.xowa.langs.*; public class Xoh_head_mgr_tst { @Before public void init() {fxt.Clear();} private Xoh_head_mgr_fxt fxt = new Xoh_head_mgr_fxt(); @Test public void Css() { diff --git a/400_xowa/src/gplx/xowa/html/heads/Xoh_head_wtr.java b/400_xowa/src/gplx/xowa/html/heads/Xoh_head_wtr.java index 00984f5ef..672fdea9f 100644 --- a/400_xowa/src/gplx/xowa/html/heads/Xoh_head_wtr.java +++ b/400_xowa/src/gplx/xowa/html/heads/Xoh_head_wtr.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.heads; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.html.*; +import gplx.langs.htmls.*; public class Xoh_head_wtr { private int indent; private int reset_bgn, reset_end; private boolean js_tail_inited = false; diff --git a/400_xowa/src_120_wiki/gplx/xowa/Xow_fragment_mgr.java b/400_xowa/src/gplx/xowa/html/heads/Xow_fragment_mgr.java similarity index 93% rename from 400_xowa/src_120_wiki/gplx/xowa/Xow_fragment_mgr.java rename to 400_xowa/src/gplx/xowa/html/heads/Xow_fragment_mgr.java index 06180dc3a..04ae20764 100644 --- a/400_xowa/src_120_wiki/gplx/xowa/Xow_fragment_mgr.java +++ b/400_xowa/src/gplx/xowa/html/heads/Xow_fragment_mgr.java @@ -15,8 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; -import gplx.xowa.langs.numbers.*; +package gplx.xowa.html.heads; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; +import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; import gplx.xowa.langs.numbers.*; public class Xow_fragment_mgr implements GfoInvkAble { public Xow_fragment_mgr(Xowe_wiki wiki) {this.wiki = wiki;} private Xowe_wiki wiki; public byte[] Html_js_edit_toolbar() {return html_js_edit_toolbar;} private byte[] html_js_edit_toolbar; diff --git a/400_xowa/src_120_wiki/gplx/xowa/Xow_fragment_mgr_tst.java b/400_xowa/src/gplx/xowa/html/heads/Xow_fragment_mgr_tst.java similarity index 92% rename from 400_xowa/src_120_wiki/gplx/xowa/Xow_fragment_mgr_tst.java rename to 400_xowa/src/gplx/xowa/html/heads/Xow_fragment_mgr_tst.java index 8a425d37b..eaa68febc 100644 --- a/400_xowa/src_120_wiki/gplx/xowa/Xow_fragment_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/html/heads/Xow_fragment_mgr_tst.java @@ -15,9 +15,9 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa; import gplx.*; +package gplx.xowa.html.heads; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import org.junit.*; -import gplx.xowa.langs.numbers.*; +import gplx.xowa.langs.*; import gplx.xowa.langs.numbers.*; public class Xow_fragment_mgr_tst { Xow_fragment_mgr_fxt fxt = new Xow_fragment_mgr_fxt(); @Before public void init() {fxt.Clear();} diff --git a/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_parser.java b/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_parser.java index 7b9c67afa..8731792d0 100644 --- a/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_parser.java +++ b/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_parser.java @@ -25,8 +25,8 @@ public class Xoh_href_parser { if (seg_obj == null) { Xol_vnt_mgr vnt_mgr = wiki.Lang().Vnt_mgr(); if (vnt_mgr.Enabled() && raw[0] == Byte_ascii.Slash) { - int slash_end = Bry_finder.Find_fwd(raw, Byte_ascii.Slash, 1); - if (vnt_mgr.Vnt_grp().Has(Bry_.Mid(raw, 1, slash_end))) { + int slash_end = Bry_find_.Find_fwd(raw, Byte_ascii.Slash, 1); + if (vnt_mgr.Regy().Has(Bry_.Mid(raw, 1, slash_end))) { raw = Bry_.Add(wiki.Domain_bry(), raw); } } diff --git a/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_parser_tst.java b/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_parser_tst.java index 58e3a2f52..dd0638537 100644 --- a/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_parser_tst.java +++ b/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_parser_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.hrefs; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import org.junit.*; import gplx.xowa.urls.*; +import org.junit.*; import gplx.xowa.urls.*; import gplx.xowa.nss.*; public class Xoh_href_parser_tst { private final Xoh_href_parser_fxt fxt = new Xoh_href_parser_fxt(); @Test public void Wiki__basic() { diff --git a/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_wtr.java b/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_wtr.java index 7047ef6a8..dbaeb6588 100644 --- a/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_wtr.java +++ b/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_wtr.java @@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.hrefs; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; +import gplx.langs.htmls.encoders.*; import gplx.xowa.wikis.xwikis.*; public class Xoh_href_wtr { private final Bry_bfr encoder_bfr = Bry_bfr.reset_(255), tmp_bfr = Bry_bfr.reset_(255); @@ -70,11 +71,11 @@ public class Xoh_href_wtr { bfr.Add_bfr_and_clear(encoder_bfr); } private void Build_to_bfr_page(Xoa_ttl ttl, byte[] ttl_full, int page_bgn) { - int anch_bgn = Bry_finder.Find_fwd(ttl_full, Byte_ascii.Hash); // NOTE: cannot use Anch_bgn b/c Anch_bgn has bug with whitespace + int anch_bgn = Bry_find_.Find_fwd(ttl_full, Byte_ascii.Hash); // NOTE: cannot use Anch_bgn b/c Anch_bgn has bug with whitespace if (anch_bgn == Bry_.NotFound) // no anchor; just add page encoder.Encode(encoder_bfr, ttl_full, page_bgn, ttl_full.length); else { // anchor exists; check if anchor is preceded by ws; EX: [[A #b]] -> "/wiki/A#b" - int page_end = Bry_finder.Find_bwd_last_ws(ttl_full, anch_bgn); // first 1st ws before #; handles multiple ws + int page_end = Bry_find_.Find_bwd_last_ws(ttl_full, anch_bgn); // first 1st ws before #; handles multiple ws page_end = page_end == Bry_.NotFound ? anch_bgn : page_end; // if ws not found, use # pos; else use 1st ws pos encoder.Encode(encoder_bfr, ttl_full, page_bgn, page_end); // add page encoder.Encode(encoder_bfr, ttl_full, anch_bgn, ttl_full.length); // add anchor diff --git a/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_wtr_tst.java b/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_wtr_tst.java index f4f6cc24c..b56df3e4b 100644 --- a/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_wtr_tst.java +++ b/400_xowa/src/gplx/xowa/html/hrefs/Xoh_href_wtr_tst.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.html.hrefs; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import org.junit.*; -import gplx.core.net.*; +import gplx.core.net.*; import gplx.xowa.nss.*; public class Xoh_href_wtr_tst { private final Xoh_href_wtr_fxt fxt = new Xoh_href_wtr_fxt(); @Test public void Xwiki_enc() {fxt.Test_build("wikt:abc?d" , "/site/en.wiktionary.org/wiki/abc%3Fd");} diff --git a/400_xowa/src/gplx/xowa/html/hzips/Xodump_stats_tbl.java b/400_xowa/src/gplx/xowa/html/hzips/Xodump_stats_tbl.java index f1de9d003..06e0f1029 100644 --- a/400_xowa/src/gplx/xowa/html/hzips/Xodump_stats_tbl.java +++ b/400_xowa/src/gplx/xowa/html/hzips/Xodump_stats_tbl.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.html.hzips; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.html.hdumps.core.*; import gplx.xowa.html.hzips.*; import gplx.xowa.html.hdumps.pages.*; -import gplx.xowa2.gui.*; +import gplx.xowa.gui.*; public class Xodump_stats_tbl implements RlsAble { private static final String tbl_name = "hdump_stats"; private static final Db_meta_fld_list flds = Db_meta_fld_list.new_(); private static final String diff --git a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_dict.java b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_dict.java index 947147d1e..3d6dd477e 100644 --- a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_dict.java +++ b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_dict.java @@ -18,7 +18,7 @@ along with this program. If not, see . package gplx.xowa.html.hzips; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; class Xow_hzip_dict {// SERIALIZED public static final byte Escape = Byte_.By_int(255); - public static final byte[] Escape_bry = Bry_.ints_(255); + public static final byte[] Escape_bry = Bry_.new_ints(255); public static final byte Tid_a_rhs = 0 , Tid_lnki_text_n = 1 @@ -31,14 +31,14 @@ class Xow_hzip_dict {// SERIALIZED , Tid_hdr_rhs = 8 ; public static final byte[] - Bry_a_rhs = Bry_.ints_(Escape, Tid_a_rhs) - , Bry_lnki_text_n = Bry_.ints_(Escape, Tid_lnki_text_n) - , Bry_lnki_text_y = Bry_.ints_(Escape, Tid_lnki_text_y) - , Bry_lnke_txt = Bry_.ints_(Escape, Tid_lnke_txt) - , Bry_lnke_brk_text_n = Bry_.ints_(Escape, Tid_lnke_brk_text_n) - , Bry_lnke_brk_text_y = Bry_.ints_(Escape, Tid_lnke_brk_text_y) - , Bry_img_full = Bry_.ints_(Escape, Tid_img_full) - , Bry_hdr_lhs = Bry_.ints_(Escape, Tid_hdr_lhs) - , Bry_hdr_rhs = Bry_.ints_(Escape, Tid_hdr_rhs) + Bry_a_rhs = Bry_.new_ints(Escape, Tid_a_rhs) + , Bry_lnki_text_n = Bry_.new_ints(Escape, Tid_lnki_text_n) + , Bry_lnki_text_y = Bry_.new_ints(Escape, Tid_lnki_text_y) + , Bry_lnke_txt = Bry_.new_ints(Escape, Tid_lnke_txt) + , Bry_lnke_brk_text_n = Bry_.new_ints(Escape, Tid_lnke_brk_text_n) + , Bry_lnke_brk_text_y = Bry_.new_ints(Escape, Tid_lnke_brk_text_y) + , Bry_img_full = Bry_.new_ints(Escape, Tid_img_full) + , Bry_hdr_lhs = Bry_.new_ints(Escape, Tid_hdr_lhs) + , Bry_hdr_rhs = Bry_.new_ints(Escape, Tid_hdr_rhs) ; } diff --git a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_int__tst.java b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_int__tst.java index 35c560dff..31d1bf14e 100644 --- a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_int__tst.java +++ b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_int__tst.java @@ -44,7 +44,7 @@ class Xow_hzip_int__fxt { public void Test_srl(int val, int... bytes) { Xow_hzip_int_.Save_bin_int_abrv(bfr, val); byte[] save = bfr.Xto_bry_and_clear(); - Tfds.Eq_ary(Bry_.ints_(bytes), save, "save"); + Tfds.Eq_ary(Bry_.new_ints(bytes), save, "save"); int load = Xow_hzip_int_.Load_bin_int_abrv(save, save.length, 0, read); Tfds.Eq(val, load, "load"); Tfds.Eq(bytes.length, read.Val(), "load_read"); diff --git a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__anchor.java b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__anchor.java index 43ea8336c..17afcf7e9 100644 --- a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__anchor.java +++ b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__anchor.java @@ -17,7 +17,8 @@ along with this program. If not, see . */ package gplx.xowa.html.hzips; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.core.primitives.*; import gplx.core.brys.*; import gplx.core.btries.*; -import gplx.html.*; import gplx.xowa.wikis.ttls.*; +import gplx.langs.htmls.*; import gplx.xowa.wikis.ttls.*; +import gplx.xowa.nss.*; import gplx.xowa.parsers.lnkis.*; public class Xow_hzip_itm__anchor { private Xow_hzip_mgr hzip_mgr; private Xow_ttl_parser ttl_parser; private Byte_obj_ref xtid_ref = Byte_obj_ref.zero_(); @@ -44,7 +45,7 @@ public class Xow_hzip_itm__anchor { private static int[] Save_img_full_pow = new int[] {0, 1, 2}; private int Save_img_full(Bry_bfr bfr, Xodump_stats_itm stats, byte[] src, int src_len, int bgn, int pos) { bfr.Add(Xow_hzip_dict.Bry_img_full); - int xatrs_bgn = Bry_finder.Move_fwd(src, Find_img_xatrs, pos, src_len); if (xatrs_bgn == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.img_xatrs_missing", bgn, pos); + int xatrs_bgn = Bry_find_.Move_fwd(src, Find_img_xatrs, pos, src_len); if (xatrs_bgn == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.img_xatrs_missing", bgn, pos); bry_rdr.Init(src, xatrs_bgn); int a_cls = bry_rdr.Read_int_to_pipe(); int a_rel = bry_rdr.Read_int_to_pipe(); @@ -59,30 +60,30 @@ public class Xow_hzip_itm__anchor { } public int Save_lnki(Bry_bfr bfr, Xodump_stats_itm stats, byte[] src, int src_len, int bgn, int pos, boolean caption) { // href - int ttl_bgn = Bry_finder.Find_fwd(src, Find_href_bry, pos, src_len); if (ttl_bgn == Bry_finder.Not_found) return Xow_hzip_mgr.Unhandled;//hzip_mgr.Warn_by_pos_add_dflt("a.ttl_bgn_missing", bgn, pos); + int ttl_bgn = Bry_find_.Find_fwd(src, Find_href_bry, pos, src_len); if (ttl_bgn == Bry_find_.Not_found) return Xow_hzip_mgr.Unhandled;//hzip_mgr.Warn_by_pos_add_dflt("a.ttl_bgn_missing", bgn, pos); ttl_bgn += Find_href_bry.length; // site or wiki; EX: "/site/" or "/wiki/" byte[] site = null; Object href_tid_obj = btrie_href.Match_bgn(src, ttl_bgn, src_len); if (href_tid_obj == null) return Xow_hzip_mgr.Unhandled; // not "/wiki/" or "/site/" if (((Byte_obj_val)href_tid_obj).Val() == Href_tid_site) { // site; EX:"/site/en.wiktionary.org/" - int site_bgn = ttl_bgn + Href_bry_len; int site_end = Bry_finder.Find_fwd(src, Byte_ascii.Slash, site_bgn); + int site_bgn = ttl_bgn + Href_bry_len; int site_end = Bry_find_.Find_fwd(src, Byte_ascii.Slash, site_bgn); byte[] site_domain = Bry_.Mid(src, site_bgn, site_end); site = site_domain; } else // page; EX: "/wiki/Page" ttl_bgn += Href_bry_len; - int ttl_end = Bry_finder.Find_fwd(src, Byte_ascii.Quote, ttl_bgn , src_len); if (ttl_end == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.ttl_end_missing", bgn, ttl_bgn); + int ttl_end = Bry_find_.Find_fwd(src, Byte_ascii.Quote, ttl_bgn , src_len); if (ttl_end == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.ttl_end_missing", bgn, ttl_bgn); Xoa_ttl ttl = ttl_parser.Ttl_parse(Bry_.Mid(src, ttl_bgn, ttl_end)); if (ttl == null) return hzip_mgr.Warn_by_pos("a.ttl_invalid", ttl_bgn, ttl_end); - int a_lhs_end = Bry_finder.Find_fwd(src, Byte_ascii.Gt, ttl_end, src_len); if (a_lhs_end == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.a_lhs_end_missing", bgn, ttl_end); + int a_lhs_end = Bry_find_.Find_fwd(src, Byte_ascii.Gt, ttl_end, src_len); if (a_lhs_end == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.a_lhs_end_missing", bgn, ttl_end); ++a_lhs_end; // skip > // id - int id_bgn = Bry_finder.Find_fwd(src, Find_id_bry, ttl_end, src_len); if (id_bgn == Bry_finder.Not_found) return Xow_hzip_mgr.Unhandled; + int id_bgn = Bry_find_.Find_fwd(src, Find_id_bry, ttl_end, src_len); if (id_bgn == Bry_find_.Not_found) return Xow_hzip_mgr.Unhandled; if (id_bgn > a_lhs_end) return Xow_hzip_mgr.Unhandled; id_bgn += Find_id_bry.length + gplx.xowa.parsers.lnkis.redlinks.Xopg_redlink_lnki_list.Lnki_id_prefix_len; - int id_end = Bry_finder.Find_fwd(src, Byte_ascii.Quote, id_bgn, src_len); if (id_end == Bry_finder.Not_found) return Xow_hzip_mgr.Unhandled; - int id = Bry_.To_int_or(src, id_bgn, id_end, -1); if (id == Bry_finder.Not_found) return Xow_hzip_mgr.Unhandled; - int a_rhs_bgn = Bry_finder.Find_fwd(src, Find_a_rhs_bgn_bry, a_lhs_end, src_len); if (a_rhs_bgn == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.a_rhs_bgn_missing", bgn, ttl_end); + int id_end = Bry_find_.Find_fwd(src, Byte_ascii.Quote, id_bgn, src_len); if (id_end == Bry_find_.Not_found) return Xow_hzip_mgr.Unhandled; + int id = Bry_.To_int_or(src, id_bgn, id_end, -1); if (id == Bry_find_.Not_found) return Xow_hzip_mgr.Unhandled; + int a_rhs_bgn = Bry_find_.Find_fwd(src, Find_a_rhs_bgn_bry, a_lhs_end, src_len); if (a_rhs_bgn == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.a_rhs_bgn_missing", bgn, ttl_end); int ttl_len = ttl_end - ttl_bgn; int html_text_len = a_rhs_bgn - a_lhs_end; if ( !caption // lnki_text_n; EX: [[A]] not [[A|A1]] @@ -117,27 +118,27 @@ public class Xow_hzip_itm__anchor { } } public int Save_lnke(Bry_bfr bfr, Xodump_stats_itm stats, byte[] src, int src_len, int bgn, int pos, byte xtid) {// http://a.org - int href_bgn = Bry_finder.Find_fwd(src, Find_href_bry, pos, src_len); if (href_bgn == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.href_missing", bgn, pos); + int href_bgn = Bry_find_.Find_fwd(src, Find_href_bry, pos, src_len); if (href_bgn == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.href_missing", bgn, pos); href_bgn += Find_href_len; - int href_end = Bry_finder.Find_fwd(src, Byte_ascii.Quote, href_bgn, src_len); if (href_end == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.href_missing", bgn, href_bgn); + int href_end = Bry_find_.Find_fwd(src, Byte_ascii.Quote, href_bgn, src_len); if (href_end == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.href_missing", bgn, href_bgn); int bfr_bgn = bfr.Len(); bfr.Add_byte(Xow_hzip_dict.Escape).Add_byte(xtid); bfr.Add_mid(src, href_bgn, href_end); bfr.Add_byte(Xow_hzip_dict.Escape); switch (xtid) { case Xow_hzip_dict.Tid_lnke_txt: { - int a_rhs_bgn = Bry_finder.Find_fwd(src, Find_a_rhs_bgn_bry, href_end, src_len); if (a_rhs_bgn == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.a_rhs_bgn_missing", bgn, href_end); + int a_rhs_bgn = Bry_find_.Find_fwd(src, Find_a_rhs_bgn_bry, href_end, src_len); if (a_rhs_bgn == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.a_rhs_bgn_missing", bgn, href_end); stats.Lnke_txt_add(); return a_rhs_bgn + Find_a_rhs_bgn_len; } case Xow_hzip_dict.Tid_lnke_brk_text_n: { - int a_lhs_end = Bry_finder.Find_fwd(src, Byte_ascii.Gt, href_end, src_len); if (a_lhs_end == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.a_lhs_end_missing", bgn, href_end); + int a_lhs_end = Bry_find_.Find_fwd(src, Byte_ascii.Gt, href_end, src_len); if (a_lhs_end == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.a_lhs_end_missing", bgn, href_end); if (src[a_lhs_end + 1] != Byte_ascii.Brack_bgn) { // check if next char is [; DATE:2015-08-25 bfr.Delete_rng_to_end(bfr_bgn); // delete from start and exit; return Xow_hzip_mgr.Unhandled; } int num_bgn = a_lhs_end + 2; // skip >[ - int num_end = Bry_finder.Find_fwd(src, Byte_ascii.Brack_end, num_bgn, src_len); if (num_end == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.num_end_missing", bgn, href_end); + int num_end = Bry_find_.Find_fwd(src, Byte_ascii.Brack_end, num_bgn, src_len); if (num_end == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.num_end_missing", bgn, href_end); int num = Bry_.To_int_or(src, num_bgn, num_end, -1); if (num == -1) return hzip_mgr.Warn_by_pos_add_dflt("a.num_invalid", num_bgn, num_end); Xow_hzip_int_.Save_bin_int_abrv(bfr, num); int a_rhs_bgn = num_end + 1; @@ -147,7 +148,7 @@ public class Xow_hzip_itm__anchor { return a_rhs_end; } case Xow_hzip_dict.Tid_lnke_brk_text_y: { - int a_lhs_end = Bry_finder.Find_fwd(src, Byte_ascii.Gt, href_end, src_len); if (a_lhs_end == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.a_lhs_end_missing", bgn, href_end); + int a_lhs_end = Bry_find_.Find_fwd(src, Byte_ascii.Gt, href_end, src_len); if (a_lhs_end == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.a_lhs_end_missing", bgn, href_end); stats.Lnke_brk_text_y_add(); return a_lhs_end + 1; } @@ -157,7 +158,7 @@ public class Xow_hzip_itm__anchor { } private Int_obj_ref count_ref = Int_obj_ref.zero_(); public int Load_lnke(Bry_bfr bfr, byte[] src, int src_len, int href_bgn, byte xtid) { - int href_end = Bry_finder.Find_fwd(src, Xow_hzip_dict.Escape, href_bgn, src_len); if (href_end == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.href_missing", href_bgn, href_bgn); + int href_end = Bry_find_.Find_fwd(src, Xow_hzip_dict.Escape, href_bgn, src_len); if (href_end == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.href_missing", href_bgn, href_bgn); switch (xtid) { case Xow_hzip_dict.Tid_lnke_txt: bfr.Add_str_a7("").Add_mid(src, href_bgn, href_end).Add_str_a7(""); @@ -185,12 +186,12 @@ public class Xow_hzip_itm__anchor { int ttl_bgn = bgn + 1 + id_count_ref.Val(); if (src[ttl_bgn] == Byte_ascii.Pipe) { // if "|" after ns, then site is present; EX: "0|enwiki" vs. "0page" int site_bgn = ttl_bgn + 1; - int site_end = Bry_finder.Find_fwd(src, Byte_ascii.Pipe, site_bgn, src_len); + int site_end = Bry_find_.Find_fwd(src, Byte_ascii.Pipe, site_bgn, src_len); site_bry = Bry_.Mid(src, site_bgn, site_end); ttl_bgn = site_end + 1; } // page - int ttl_end = Bry_finder.Find_fwd(src, Xow_hzip_dict.Escape, ttl_bgn, src_len); if (ttl_end == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.ttl_end_missing", bgn, ttl_bgn); + int ttl_end = Bry_find_.Find_fwd(src, Xow_hzip_dict.Escape, ttl_bgn, src_len); if (ttl_end == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("a.ttl_end_missing", bgn, ttl_bgn); byte[] ttl_bry = Bry_.Mid(src, ttl_bgn, ttl_end); Xoa_ttl ttl = ttl_parser.Ttl_parse(ns.Id(), ttl_bry); if (ttl == null) return hzip_mgr.Warn_by_pos_add_dflt("a.ttl_is_invalid", bgn, ttl_bgn); byte[] ttl_full = ttl.Full_db(); diff --git a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__anchor_tst.java b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__anchor_tst.java index df11d3334..b9fcaa9b6 100644 --- a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__anchor_tst.java +++ b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__anchor_tst.java @@ -20,44 +20,44 @@ import org.junit.*; import gplx.xowa.html.*; public class Xow_hzip_itm__anchor_tst { @Before public void init() {fxt.Clear();} private Xow_hzip_mgr_fxt fxt = new Xow_hzip_mgr_fxt(); @Test public void Srl_lnki_text_n() { - byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_lnki_text_n, Bry_.ints_(2), fxt.Make_int(3), Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry); // 2=ns_ord for Main + byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_lnki_text_n, Bry_.new_ints(2), fxt.Make_int(3), Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry); // 2=ns_ord for Main fxt.Test_save(brys, "A"); fxt.Test_load(brys, "A"); } @Test public void Srl_lnki_text_n_alt_case() { - byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_lnki_text_n, Bry_.ints_(2), fxt.Make_int(3), Bry_.new_a7("a"), Xow_hzip_dict.Escape_bry); + byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_lnki_text_n, Bry_.new_ints(2), fxt.Make_int(3), Bry_.new_a7("a"), Xow_hzip_dict.Escape_bry); fxt.Test_save(brys, "a"); fxt.Test_load(brys, "a"); } @Test public void Srl_lnki_text_n_ns() { - byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_lnki_text_n, Bry_.ints_(12), fxt.Make_int(3), Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry); + byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_lnki_text_n, Bry_.new_ints(12), fxt.Make_int(3), Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry); fxt.Test_save(brys, "Template:A"); fxt.Test_load(brys, "Template:A"); } @Test public void Srl_lnki_text_n_apos() { - byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_lnki_text_n, Bry_.ints_(12), fxt.Make_int(3), Bry_.new_a7("A'b"), Xow_hzip_dict.Escape_bry); + byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_lnki_text_n, Bry_.new_ints(12), fxt.Make_int(3), Bry_.new_a7("A'b"), Xow_hzip_dict.Escape_bry); fxt.Test_save(brys, "Template:A'b"); fxt.Test_load(brys, "Template:A'b"); } @Test public void Srl_lnki_text_n_xwiki() { - byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_lnki_text_n, Bry_.ints_(2), fxt.Make_int(3), Byte_ascii.Pipe_bry, Bry_.new_a7("en.wiktionary.org"), Byte_ascii.Pipe_bry, Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry); + byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_lnki_text_n, Bry_.new_ints(2), fxt.Make_int(3), Byte_ascii.Pipe_bry, Bry_.new_a7("en.wiktionary.org"), Byte_ascii.Pipe_bry, Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry); fxt.Test_save(brys, "A"); fxt.Test_load(brys, "A"); } @Test public void Srl_lnki_text_n_smoke() { - byte[][] brys = Bry_.Ary(Bry_.new_a7("a_1"), Xow_hzip_dict.Bry_lnki_text_n, Bry_.ints_(2), fxt.Make_int(3), Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry, Bry_.new_a7("a_2")); + byte[][] brys = Bry_.Ary(Bry_.new_a7("a_1"), Xow_hzip_dict.Bry_lnki_text_n, Bry_.new_ints(2), fxt.Make_int(3), Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry, Bry_.new_a7("a_2")); fxt.Test_save(brys, "a_1Aa_2"); fxt.Test_load(brys, "a_1Aa_2"); } @Test public void Srl_lnki_text_y() { - byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_lnki_text_y, Bry_.ints_(2), fxt.Make_int(3), Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry, Bry_.new_a7("A1"), Xow_hzip_dict.Bry_a_rhs); + byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_lnki_text_y, Bry_.new_ints(2), fxt.Make_int(3), Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry, Bry_.new_a7("A1"), Xow_hzip_dict.Bry_a_rhs); fxt.Test_save(brys, "A1"); fxt.Test_load(brys, "A1"); } @Test public void Srl_lnki_text_y_nest() { byte[][] brys = Bry_.Ary - ( Xow_hzip_dict.Bry_lnki_text_y, Bry_.ints_(2), fxt.Make_int(3), Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry - , Bry_.new_a7("B"), Xow_hzip_dict.Bry_lnki_text_y, Bry_.ints_(2), fxt.Make_int(3), Bry_.new_a7("C"), Xow_hzip_dict.Escape_bry, Bry_.new_a7("C1"), Xow_hzip_dict.Bry_a_rhs, Bry_.new_a7("D") + ( Xow_hzip_dict.Bry_lnki_text_y, Bry_.new_ints(2), fxt.Make_int(3), Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry + , Bry_.new_a7("B"), Xow_hzip_dict.Bry_lnki_text_y, Bry_.new_ints(2), fxt.Make_int(3), Bry_.new_a7("C"), Xow_hzip_dict.Escape_bry, Bry_.new_a7("C1"), Xow_hzip_dict.Bry_a_rhs, Bry_.new_a7("D") , Xow_hzip_dict.Bry_a_rhs ); fxt.Test_save(brys, "BC1D"); @@ -71,13 +71,13 @@ public class Xow_hzip_itm__anchor_tst { @Test public void Srl_lnki_text_y__multiple() { // PURPOSE: if id is missing from 1st anchor, do not get from second byte[][] brys = Bry_.Ary(Bry_.new_a7("A") , Xow_hzip_dict.Bry_a_rhs - , Xow_hzip_dict.Bry_lnki_text_n, Bry_.ints_(2), fxt.Make_int(3), Bry_.new_a7("B"), Xow_hzip_dict.Escape_bry + , Xow_hzip_dict.Bry_lnki_text_n, Bry_.new_ints(2), fxt.Make_int(3), Bry_.new_a7("B"), Xow_hzip_dict.Escape_bry ); fxt.Test_save(brys, "AB"); fxt.Test_load(brys, "AB"); } @Test public void Srl_lnki_text_y__html() { // PURPOSE: PAGE:en.w:Abyssal_plain; DATE:2015-06-02 - byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_lnki_text_y, Bry_.ints_(2), fxt.Make_int(3), Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry, Bry_.new_a7("A1"), Xow_hzip_dict.Bry_a_rhs); + byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_lnki_text_y, Bry_.new_ints(2), fxt.Make_int(3), Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry, Bry_.new_a7("A1"), Xow_hzip_dict.Bry_a_rhs); fxt.Test_save(brys, "A1"); } @Test public void Srl_lnke_txt() { diff --git a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__file_tst.java b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__file_tst.java index 6c0d67756..e0137118f 100644 --- a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__file_tst.java +++ b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__file_tst.java @@ -20,7 +20,7 @@ import org.junit.*; import gplx.xowa.html.*; public class Xow_hzip_itm__file_tst { @Before public void init() {fxt.Clear();} private Xow_hzip_mgr_fxt fxt = new Xow_hzip_mgr_fxt(); @Test public void Srl_lnki_img_full() { - byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_img_full, Bry_.ints_(7), Bry_.ints_(12, 0), Bry_.new_a7("cls_other"), Bry_.new_a7("|caption_other"), Xow_hzip_dict.Escape_bry); + byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_img_full, Bry_.new_ints(7), Bry_.new_ints(12, 0), Bry_.new_a7("cls_other"), Bry_.new_a7("|caption_other"), Xow_hzip_dict.Escape_bry); fxt.Test_save(brys, ""); // fxt.Test_load(brys, "a_1Aa_2"); } diff --git a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__header.java b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__header.java index e063ac8ef..ae3612b33 100644 --- a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__header.java +++ b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__header.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.hzips; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.html.*; import gplx.xowa.wikis.ttls.*; +import gplx.langs.htmls.*; import gplx.xowa.wikis.ttls.*; public class Xow_hzip_itm__header { private Xow_hzip_mgr hzip_mgr; public Xow_hzip_itm__header(Xow_hzip_mgr hzip_mgr) {this.hzip_mgr = hzip_mgr;} @@ -31,12 +31,12 @@ public class Xow_hzip_itm__header { return Xow_hzip_mgr.Unhandled; } int span_lhs_bgn = pos + 2; // +2 to skip # and >; EX: "

" - int span_lhs_end = Bry_finder.Find_fwd(src, Byte_ascii.Gt, span_lhs_bgn, src_len); if (span_lhs_end == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("h.span_end_missing", bgn, pos); + int span_lhs_end = Bry_find_.Find_fwd(src, Byte_ascii.Gt, span_lhs_bgn, src_len); if (span_lhs_end == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("h.span_end_missing", bgn, pos); ++span_lhs_end; // +1 to skip > bfr.Add(Xow_hzip_dict.Bry_hdr_lhs); byte hdr_num = (byte)(hdr_num_byte - Byte_ascii.Num_0); bfr.Add_byte(hdr_num); - int hdr_end = Bry_finder.Find_fwd(src, Hdr_end, span_lhs_end, src_len); if (hdr_end == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("h.capt_end_missing", bgn, span_lhs_end); + int hdr_end = Bry_find_.Find_fwd(src, Hdr_end, span_lhs_end, src_len); if (hdr_end == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("h.capt_end_missing", bgn, span_lhs_end); bfr.Add_mid(src, span_lhs_end, hdr_end); hdr_end += Hdr_end.length; bfr.Add(Xow_hzip_dict.Escape_bry); @@ -46,7 +46,7 @@ public class Xow_hzip_itm__header { public int Load(Bry_bfr bfr, byte[] src, int src_len, int bgn) { byte hdr_num = (byte)(src[bgn] + Byte_ascii.Num_0); int capt_bgn = bgn + 1; - int capt_end = Bry_finder.Find_fwd(src, Xow_hzip_dict.Escape, capt_bgn, src_len); if (capt_end == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("hdr.capt_end_missing", bgn, capt_bgn); + int capt_end = Bry_find_.Find_fwd(src, Xow_hzip_dict.Escape, capt_bgn, src_len); if (capt_end == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("hdr.capt_end_missing", bgn, capt_bgn); bfr.Add_str_a7("").Add_mid(src, capt_bgn, capt_end).Add_str(""); return capt_end + 1; } diff --git a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__header_tst.java b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__header_tst.java index 4233fa02c..6205a3968 100644 --- a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__header_tst.java +++ b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__header_tst.java @@ -20,7 +20,7 @@ import org.junit.*; import gplx.xowa.html.*; public class Xow_hzip_itm__header_tst { @Before public void init() {fxt.Clear();} private Xow_hzip_mgr_fxt fxt = new Xow_hzip_mgr_fxt(); @Test public void Srl_basic() { -// byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_hdr_lhs, Bry_.ints_(2), Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry); +// byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_hdr_lhs, Bry_.new_ints(2), Bry_.new_a7("A"), Xow_hzip_dict.Escape_bry); // fxt.Test_save(brys, "

A

"); // fxt.Test_load(brys, "

A

"); } @@ -28,7 +28,7 @@ public class Xow_hzip_itm__header_tst { // fxt.Test_html("==A==", "

A

\n"); // } // @Test public void Srl_anchor() { -// byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_hdr_lhs, Bry_.ints_(2), Bry_.new_a7("A b c"), Xow_hzip_dict.Escape_bry); +// byte[][] brys = Bry_.Ary(Xow_hzip_dict.Bry_hdr_lhs, Bry_.new_ints(2), Bry_.new_a7("A b c"), Xow_hzip_dict.Escape_bry); // fxt.Test_save(brys, "

A b c

"); //// fxt.Test_load(brys, "

A b c

"); // } diff --git a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__href.java b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__href.java index 35533ee9b..0e55b936f 100644 --- a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__href.java +++ b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_itm__href.java @@ -21,28 +21,28 @@ class Xow_hzip_itm__href { public void Save(Bry_bfr bfr, Xodump_stats_itm stats, byte[] src, int src_len, int bgn, int pos, byte bgn_quote) { // // ignore anchors; EX: "#a" // int proto_bgn = pos; -// int proto_end = Bry_finder.Find_fwd(src, Byte_ascii.Colon, proto_bgn, src_len); +// int proto_end = Bry_find_.Find_fwd(src, Byte_ascii.Colon, proto_bgn, src_len); // byte proto_tid = Tid_proto_other; -// if (proto_end != Bry_finder.Not_found) { +// if (proto_end != Bry_find_.Not_found) { // Object proto_obj = proto_trie.Match_exact(src, pos, proto_bgn); // if (proto_obj != null) // proto_tid = ((Byte_obj_val)proto_obj).Val(); -// pos = Bry_finder.Find_fwd_while(src, proto_bgn + 1, src_len, Byte_ascii.Slash); // eat /; EX: http:// should position after / +// pos = Bry_find_.Find_fwd_while(src, proto_bgn + 1, src_len, Byte_ascii.Slash); // eat /; EX: http:// should position after / // } // // stats.Lnke_proto_reg(proto_tid, src, proto_bgn, proto_end); // // int domain_bgn = pos; -// int domain_end = Bry_finder.Find_fwd(src, Byte_ascii.Slash, domain_bgn, src_len); -// if (domain_end == Bry_finder.Not_found) // href has no slash; assume entire String is domain EX: "www.a.org" -// domain_end = Bry_finder.Find_fwd(src, bgn_quote, pos, src_len); +// int domain_end = Bry_find_.Find_fwd(src, Byte_ascii.Slash, domain_bgn, src_len); +// if (domain_end == Bry_find_.Not_found) // href has no slash; assume entire String is domain EX: "www.a.org" +// domain_end = Bry_find_.Find_fwd(src, bgn_quote, pos, src_len); // -// int tld_pos = Bry_finder.Find_bwd(src, Byte_ascii.Dot, domain_bgn, src_len); +// int tld_pos = Bry_find_.Find_bwd(src, Byte_ascii.Dot, domain_bgn, src_len); // byte tld_tid = Tid_tld_other; // if (tld_pos != Bry_.NotFound) { // Object tld_obj = tld_trie.Match_exact(src, domain_bgn, domain_end); // if (tld_obj != null) // tld_tid = ((Byte_obj_val)tld_obj).Val(); -// pos = Bry_finder.Find_fwd_while(src, domain_bgn + 1, src_len, Byte_ascii.Slash); // eat /; EX: http:// should position after / +// pos = Bry_find_.Find_fwd_while(src, domain_bgn + 1, src_len, Byte_ascii.Slash); // eat /; EX: http:// should position after / // } // // stats.Lnke_tld_reg(tld_tid, src, domain_bgn, domain_end); } diff --git a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_mgr_fxt.java b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_mgr_fxt.java index 9087b57e2..f120dcc96 100644 --- a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_mgr_fxt.java +++ b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_mgr_fxt.java @@ -45,7 +45,7 @@ class Xow_hzip_mgr_fxt { Tfds.Eq(expd, String_.new_u8(src)); } public void Test_html(String html, String expd) { - Xop_ctx ctx = wiki.Ctx(); Xop_parser parser = wiki.Parser(); Xop_tkn_mkr tkn_mkr = ctx.Tkn_mkr(); + Xop_ctx ctx = wiki.Parser_mgr().Ctx(); Xop_parser parser = wiki.Parser_mgr().Main(); Xop_tkn_mkr tkn_mkr = ctx.Tkn_mkr(); ctx.Para().Enabled_n_(); ctx.Cur_page().Redlink_lnki_list().Clear(); byte[] html_bry = Bry_.new_u8(html); diff --git a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_xtid.java b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_xtid.java index b5a48fc4a..e8095d581 100644 --- a/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_xtid.java +++ b/400_xowa/src/gplx/xowa/html/hzips/Xow_hzip_xtid.java @@ -20,7 +20,7 @@ import gplx.core.primitives.*; class Xow_hzip_xtid { public static int Find_xtid(Xow_hzip_mgr hzip_mgr, byte[] src, int src_len, int bgn, int pos, Byte_obj_ref xtid_ref) { int xtid_bgn = pos + Len_xtid; if (!Bry_.Match(src, pos, xtid_bgn, Bry_xtid)) return Xow_hzip_mgr.Unhandled; // next atr should be "xtid='" - int xtid_end = Bry_finder.Find_fwd(src, Byte_ascii.Apos, xtid_bgn); if (xtid_end == Bry_finder.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("xtid_end_missing", bgn, xtid_bgn); + int xtid_end = Bry_find_.Find_fwd(src, Byte_ascii.Apos, xtid_bgn); if (xtid_end == Bry_find_.Not_found) return hzip_mgr.Warn_by_pos_add_dflt("xtid_end_missing", bgn, xtid_bgn); Object xtid_obj = Xtids.Get_by_mid(src, xtid_bgn, xtid_end); if (xtid_obj == null) return hzip_mgr.Warn_by_pos("a.xtid_invalid", xtid_bgn, xtid_end); xtid_ref.Val_(xtid_obj == null ? Byte_.Min_value : ((Byte_obj_val)xtid_obj).Val()); return xtid_end; diff --git a/400_xowa/src/gplx/xowa/html/js/Xoh_js_cbk.java b/400_xowa/src/gplx/xowa/html/js/Xoh_js_cbk.java index 1de09f31a..b8b7fb0d7 100644 --- a/400_xowa/src/gplx/xowa/html/js/Xoh_js_cbk.java +++ b/400_xowa/src/gplx/xowa/html/js/Xoh_js_cbk.java @@ -17,7 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.html.js; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.core.threads.*; import gplx.xowa.xtns.pfuncs.ifs.*; import gplx.xowa.wikis.data.tbls.*; -import gplx.core.json.*; +import gplx.langs.jsons.*; import gplx.xowa.html.js.*; import gplx.xowa.gui.views.*; import gplx.xowa.parsers.*; @@ -46,19 +46,19 @@ public class Xoh_js_cbk implements GfoInvkAble { } private String Parse_to_html(GfoMsg m) { Xowe_wiki wiki = html_itm.Owner_tab().Wiki(); - Xop_ctx ctx = wiki.Ctx(); + Xop_ctx ctx = wiki.Parser_mgr().Ctx(); boolean old_para_enabled = ctx.Para().Enabled(); byte[] raw = Bry_.new_u8(m.Args_getAt(0).Val_to_str_or_empty()); boolean para_enabled = m.Args_count() < 2 ? false : Bool_.parse(m.Args_getAt(1).Val_to_str_or_empty()); try { - wiki.Ctx().Para().Enabled_(para_enabled); - wiki.Parser().Parse_text_to_wdom(root, wiki.Ctx(), wiki.Ctx().Tkn_mkr(), raw, 0); + ctx.Para().Enabled_(para_enabled); + wiki.Parser_mgr().Main().Parse_text_to_wdom(root, ctx, ctx.Tkn_mkr(), raw, 0); byte[] data = root.Data_mid(); - wiki.Html_mgr().Html_wtr().Write_all(bfr, wiki.Ctx(), data, root); + wiki.Html_mgr().Html_wtr().Write_all(bfr, ctx, data, root); return bfr.Xto_str_and_clear(); } finally { - wiki.Ctx().Para().Enabled_(old_para_enabled); + ctx.Para().Enabled_(old_para_enabled); } } private String Get_page(GfoMsg m) { @@ -95,7 +95,7 @@ public class Xoh_js_cbk implements GfoInvkAble { private String[][] Get_titles_meta(GfoMsg m) { Xowe_wiki wiki = html_itm.Owner_tab().Wiki(); try { - byte[][] ttls = Bry_.Split(Bry_.new_u8((String)m.ReadValAt(0)), Byte_ascii.Nl); + byte[][] ttls = Bry_split_.Split(Bry_.new_u8((String)m.ReadValAt(0)), Byte_ascii.Nl); int ttls_len = ttls.length; String[][] rv = new String[ttls_len][]; for (int i = 0; i < ttls_len; i++) { @@ -135,7 +135,7 @@ public class Xoh_js_cbk implements GfoInvkAble { wdata_mgr.Wdata_wiki().Init_assert(); // NOTE: must assert else ns_mgr won't load Property int len = m.Args_count(); if (len < 1) return null; - byte[][] langs = Bry_.Split(m.Args_getAt(0).Val_to_bry(), Byte_ascii.Semic); + byte[][] langs = Bry_split_.Split(m.Args_getAt(0).Val_to_bry(), Byte_ascii.Semic); int langs_len = langs.length; String[] rv = new String[len - 1]; for (int i = 1; i < len; i++) { diff --git a/400_xowa/src/gplx/xowa/html/js/Xoh_js_cbk_wdata_labels_tst.java b/400_xowa/src/gplx/xowa/html/js/Xoh_js_cbk_wdata_labels_tst.java index 8973f9291..11c551812 100644 --- a/400_xowa/src/gplx/xowa/html/js/Xoh_js_cbk_wdata_labels_tst.java +++ b/400_xowa/src/gplx/xowa/html/js/Xoh_js_cbk_wdata_labels_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.js; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import org.junit.*; import gplx.core.json.*; import gplx.xowa.xtns.wdatas.*; +import org.junit.*; import gplx.langs.jsons.*; import gplx.xowa.xtns.wdatas.*; public class Xoh_js_cbk_wdata_labels_tst { @Before public void init() {fxt.Init();} private final Wdata_wiki_mgr_fxt fxt = new Wdata_wiki_mgr_fxt(); @Test public void Basic() { diff --git a/400_xowa/src/gplx/xowa/html/lnkis/Xoh_file_html_fmtr__hdump.java b/400_xowa/src/gplx/xowa/html/lnkis/Xoh_file_html_fmtr__hdump.java index b82ffdce8..0854b129d 100644 --- a/400_xowa/src/gplx/xowa/html/lnkis/Xoh_file_html_fmtr__hdump.java +++ b/400_xowa/src/gplx/xowa/html/lnkis/Xoh_file_html_fmtr__hdump.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.lnkis; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.html.*; +import gplx.langs.htmls.*; import gplx.xowa.files.*; import gplx.xowa.html.hdumps.abrvs.*; public class Xoh_file_html_fmtr__hdump extends Xoh_file_html_fmtr__base { private Bry_bfr tmp_bfr = Bry_bfr.reset_(128); diff --git a/400_xowa/src/gplx/xowa/html/lnkis/Xoh_file_mgr.java b/400_xowa/src/gplx/xowa/html/lnkis/Xoh_file_mgr.java index 5d02097d4..41f472e8d 100644 --- a/400_xowa/src/gplx/xowa/html/lnkis/Xoh_file_mgr.java +++ b/400_xowa/src/gplx/xowa/html/lnkis/Xoh_file_mgr.java @@ -18,6 +18,7 @@ along with this program. If not, see . package gplx.xowa.html.lnkis; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.core.primitives.*; import gplx.xowa.files.*; import gplx.xowa.files.xfers.*; import gplx.xowa.parsers.lnkis.*; +import gplx.xowa.nss.*; import gplx.xowa.parsers.*; import gplx.xowa.tdbs.metas.*; public class Xoh_file_mgr { diff --git a/400_xowa/src/gplx/xowa/html/lnkis/Xoh_file_wtr__basic.java b/400_xowa/src/gplx/xowa/html/lnkis/Xoh_file_wtr__basic.java index 8d2b86cca..663bdc4c6 100644 --- a/400_xowa/src/gplx/xowa/html/lnkis/Xoh_file_wtr__basic.java +++ b/400_xowa/src/gplx/xowa/html/lnkis/Xoh_file_wtr__basic.java @@ -16,7 +16,10 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.lnkis; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.html.*; import gplx.xowa.files.*; import gplx.xowa.html.hdumps.core.*; +import gplx.langs.htmls.*; +import gplx.xowa.langs.*; +import gplx.xowa.nss.*; +import gplx.xowa.files.*; import gplx.xowa.html.hdumps.core.*; import gplx.xowa.parsers.*; import gplx.xowa.parsers.lnkis.*; import gplx.xowa.parsers.tmpls.*; public class Xoh_file_wtr__basic { private final Xowe_wiki wiki; private final Xow_html_mgr html_mgr; private final Xoh_html_wtr html_wtr; private final Bry_bfr_mkr bfr_mkr; private final Bry_bfr scratch_bfr = Bry_bfr.reset_(Io_mgr.Len_kb); diff --git a/400_xowa/src/gplx/xowa/html/lnkis/Xoh_lnki_wtr.java b/400_xowa/src/gplx/xowa/html/lnkis/Xoh_lnki_wtr.java index 6f0f1c031..740ed8ead 100644 --- a/400_xowa/src/gplx/xowa/html/lnkis/Xoh_lnki_wtr.java +++ b/400_xowa/src/gplx/xowa/html/lnkis/Xoh_lnki_wtr.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.lnkis; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.html.*; import gplx.xowa.files.*; import gplx.xowa.users.history.*; import gplx.xowa.xtns.pfuncs.ttls.*; import gplx.xowa.xtns.relatedSites.*; +import gplx.langs.htmls.*; import gplx.xowa.files.*; import gplx.xowa.users.history.*; import gplx.xowa.xtns.pfuncs.ttls.*; import gplx.xowa.xtns.relatedSites.*; +import gplx.xowa.nss.*; import gplx.xowa.wikis.xwikis.*; import gplx.xowa.xtns.wdatas.core.*; import gplx.xowa.html.hzips.*; import gplx.xowa.parsers.*; import gplx.xowa.parsers.lnkis.*; import gplx.xowa.parsers.lnkis.redlinks.*; public class Xoh_lnki_wtr { @@ -49,7 +50,7 @@ public class Xoh_lnki_wtr { } Xow_xwiki_itm xwiki_lang = lnki_ttl.Wik_itm(); if ( xwiki_lang != null // lnki is xwiki; EX: [[commons:]] [[en:]] [[wikt:]] - && xwiki_lang.Domain_tid() == wiki.Xwiki_domain_tid() // xwiki is same type as cur wiki; EX: cur=w xwiki=w -> add to xwiki_langs; cur=w xwikid=d -> don't add to xwiki_langs; DATE:2014-09-14 + && xwiki_lang.Domain_tid() == wiki.Xwiki_mgr().Xwiki_domain_tid() // xwiki is same type as cur wiki; EX: cur=w xwiki=w -> add to xwiki_langs; cur=w xwikid=d -> don't add to xwiki_langs; DATE:2014-09-14 && xwiki_lang.Type_is_xwiki_lang(wiki.Domain_itm().Lang_orig_key())// NOTE: use Lang_orig_id to handle xwikis between s.w and en.w; PAGE:s.q:Anonymous DATE:2014-09-10 && !lnki_ttl.ForceLiteralLink() // not literal; [[:en:A]] ) { diff --git a/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_anchor_finder.java b/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_anchor_finder.java index 8f5b812d1..932f6933f 100644 --- a/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_anchor_finder.java +++ b/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_anchor_finder.java @@ -25,46 +25,46 @@ class Xow_popup_anchor_finder { if (bgn == Xop_parser_.Doc_bgn_bos && Find_hdr(bgn)) return Xop_parser_.Doc_bgn_bos;// handle BOS separately which won't fit "\n=" search below; EX: "BOS==A==\n" int lhs_bgn = bgn; while (true) { - lhs_bgn = Bry_finder.Find_fwd(src, Hdr_bgn, nl_lhs, src_len); + lhs_bgn = Bry_find_.Find_fwd(src, Hdr_bgn, nl_lhs, src_len); if (lhs_bgn == Bry_.NotFound) break; // "\n=" not found; exit; if (Find_hdr(lhs_bgn)) return lhs_bgn; } return Find_id(bgn); } private boolean Find_hdr(int lhs_bgn) { - int nl_rhs = Bry_finder.Find_fwd(src, Byte_ascii.Nl, nl_lhs + 1, src_len); // look for \n - if (nl_rhs == Bry_finder.Not_found) nl_rhs = src_len - 1; // no more \n; set to last idx + int nl_rhs = Bry_find_.Find_fwd(src, Byte_ascii.Nl, nl_lhs + 1, src_len); // look for \n + if (nl_rhs == Bry_find_.Not_found) nl_rhs = src_len - 1; // no more \n; set to last idx nl_lhs = nl_rhs; // update nl_lhs for loop - int lhs_end = Bry_finder.Find_fwd_while(src, lhs_bgn + 1, nl_rhs, Byte_ascii.Eq); // skip eq; EX: "\n==="; +1 to skip eq - int rhs_end = Bry_finder.Trim_bwd_space_tab(src, nl_rhs, lhs_end); // skip ws bwd; EX: "== \n" - int rhs_bgn = Bry_finder.Find_bwd_while(src, rhs_end, lhs_end, Byte_ascii.Eq); // skip eq; EX: "==\n" -> pos before = + int lhs_end = Bry_find_.Find_fwd_while(src, lhs_bgn + 1, nl_rhs, Byte_ascii.Eq); // skip eq; EX: "\n==="; +1 to skip eq + int rhs_end = Bry_find_.Trim_bwd_space_tab(src, nl_rhs, lhs_end); // skip ws bwd; EX: "== \n" + int rhs_bgn = Bry_find_.Find_bwd_while(src, rhs_end, lhs_end, Byte_ascii.Eq); // skip eq; EX: "==\n" -> pos before = if (rhs_bgn < lhs_end) return false; // eq found, but is actually lhs_eq; no rhs_eq, so exit; EX: "\n== \n" ++rhs_bgn; // rhs_bgn is 1st char before eq; position at eq; neede for txt_end below - int txt_bgn = Bry_finder.Trim_fwd_space_tab(src, lhs_end, nl_rhs); // trim ws - int txt_end = Bry_finder.Trim_bwd_space_tab(src, rhs_bgn, lhs_end); // trim ws - return Bry_.Eq(find, src, txt_bgn, txt_end); // check for strict match + int txt_bgn = Bry_find_.Trim_fwd_space_tab(src, lhs_end, nl_rhs); // trim ws + int txt_end = Bry_find_.Trim_bwd_space_tab(src, rhs_bgn, lhs_end); // trim ws + return Bry_.Eq(src, txt_bgn, txt_end, find); // check for strict match } private int Find_id(int bgn) { byte[] quoted = Bry_.Add(Byte_ascii.Quote_bry, find, Byte_ascii.Quote_bry); int rv = Find_id_by_quoted(bgn, quoted); - if (rv == Bry_finder.Not_found) { + if (rv == Bry_find_.Not_found) { quoted[0] = Byte_ascii.Apos; quoted[quoted.length - 1] = Byte_ascii.Apos; rv = Find_id_by_quoted(bgn, quoted); } return rv; } private int Find_id_by_quoted(int bgn, byte[] quoted) { - int rv = Bry_finder.Not_found; - int pos = Bry_finder.Find_fwd(src, quoted, bgn); - if (pos == Bry_finder.Not_found) return rv; - pos = Bry_finder.Trim_bwd_space_tab(src, pos, bgn); + int rv = Bry_find_.Not_found; + int pos = Bry_find_.Find_fwd(src, quoted, bgn); + if (pos == Bry_find_.Not_found) return rv; + pos = Bry_find_.Trim_bwd_space_tab(src, pos, bgn); if (src[pos - 1] != Byte_ascii.Eq) return rv; - int id_end = Bry_finder.Trim_bwd_space_tab(src, pos - 1, bgn); - int id_bgn = Bry_finder.Find_bwd_ws(src, id_end - 1, bgn); - boolean id_match = Int_.Bounds_chk(id_bgn, id_end, src_len) && Bry_.Eq(Id_bry, src, id_bgn + 1, id_end); + int id_end = Bry_find_.Trim_bwd_space_tab(src, pos - 1, bgn); + int id_bgn = Bry_find_.Find_bwd_ws(src, id_end - 1, bgn); + boolean id_match = Int_.Bounds_chk(id_bgn, id_end, src_len) && Bry_.Eq(src, id_bgn + 1, id_end, Id_bry); if (!id_match) return rv; - rv = Bry_finder.Find_bwd(src, Byte_ascii.Nl, id_bgn); - return rv == Bry_finder.Not_found ? 0 : rv; + rv = Bry_find_.Find_bwd(src, Byte_ascii.Nl, id_bgn); + return rv == Bry_find_.Not_found ? 0 : rv; } private static final byte[] Hdr_bgn = Bry_.new_a7("\n="), Id_bry = Bry_.new_a7("id"); } diff --git a/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_anchor_finder__hdr_tst.java b/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_anchor_finder__hdr_tst.java index 3b1513928..cc3547e4f 100644 --- a/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_anchor_finder__hdr_tst.java +++ b/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_anchor_finder__hdr_tst.java @@ -76,7 +76,7 @@ class Xop_popup_hdr_finder_fxt { private Xow_popup_anchor_finder finder = new Xow_popup_anchor_finder(); public void Clear() { } - public void Test_find_not(String src_str, String hdr_str) {Test_find(src_str, hdr_str, Bry_finder.Not_found);} + public void Test_find_not(String src_str, String hdr_str) {Test_find(src_str, hdr_str, Bry_find_.Not_found);} public void Test_find(String src_str, String hdr_str, int expd) { byte[] src = Bry_.new_u8(src_str); byte[] hdr = Bry_.new_u8(hdr_str); diff --git a/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_mgr.java b/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_mgr.java index f05764372..de95a1f17 100644 --- a/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_mgr.java +++ b/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_mgr.java @@ -18,6 +18,7 @@ along with this program. If not, see . package gplx.xowa.html.modules.popups; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.modules.*; import gplx.core.primitives.*; import gplx.core.threads.*; import gplx.core.js.*; +import gplx.xowa.nss.*; import gplx.xowa.gui.views.*; import gplx.xowa.html.hrefs.*; import gplx.xowa.specials.*; import gplx.xowa.specials.search.*; @@ -190,7 +191,7 @@ public class Xow_popup_mgr implements GfoInvkAble, GfoEvObj { } public static Int_obj_ref[] Ns_allowed_parse(Xowe_wiki wiki, byte[] raw) { List_adp rv = List_adp_.new_(); - byte[][] ary = Bry_.Split(raw, Byte_ascii.Pipe); + byte[][] ary = Bry_split_.Split(raw, Byte_ascii.Pipe); int ary_len = ary.length; Xow_ns_mgr ns_mgr = wiki.Ns_mgr(); for (int i = 0; i < ary_len; i++) { diff --git a/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_parser.java b/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_parser.java index e1c529349..2fd78bb9f 100644 --- a/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_parser.java +++ b/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_parser.java @@ -39,7 +39,7 @@ public class Xow_popup_parser { wtxt_ctx.Tmpl_tkn_max_(v); } public void Init_by_wiki(Xowe_wiki wiki) { - this.wiki = wiki; this.app = wiki.Appe(); this.parser = wiki.Parser(); this.tkn_mkr = app.Tkn_mkr(); + this.wiki = wiki; this.app = wiki.Appe(); this.parser = wiki.Parser_mgr().Main(); this.tkn_mkr = app.Parser_mgr().Tkn_mkr(); this.tmpl_ctx = Xop_ctx.new_(wiki); this.wtxt_ctx = Xop_ctx.new_(wiki); Xop_lxr_mgr tmpl_lxr_mgr = Xop_lxr_mgr.Popup_lxr_mgr; tmpl_lxr_mgr.Init_by_wiki(wiki); @@ -213,7 +213,7 @@ class Xow_popup_parser_ { byte[] anch = itm.Page_href()[0] == Byte_ascii.Hash ? Bry_.Mid(Xoa_app_.Utl__encoder_mgr().Href().Decode(itm.Page_href()), 1) : page_ttl.Anch_txt(); if (anch == null) return rv; int hdr_bgn = hdr_finder.Find(src, src_len, anch, rv); // NOTE: starting search from Xop_parser_.Doc_bgn_bos - return hdr_bgn == Bry_finder.Not_found ? rv : hdr_bgn; + return hdr_bgn == Bry_find_.Not_found ? rv : hdr_bgn; } public static int Calc_read_len(Xop_ctx ctx, int tmpl_read_cur, int tmpl_read_len, byte[] src, int bgn, int end) {// DATE:2014-07-19 int rv_default = tmpl_read_cur + tmpl_read_len; @@ -243,7 +243,7 @@ class Xow_popup_parser_ { break; } if (end_bry == null) return Bry_.NotFound; // no end defined for tkn; return null which should revert to dflt - int end_pos = Bry_finder.Find_fwd(src, end_bry, pos); - return end_pos == Bry_finder.Not_found ? Bry_finder.Not_found : end_pos + end_bry.length; + int end_pos = Bry_find_.Find_fwd(src, end_bry, pos); + return end_pos == Bry_find_.Not_found ? Bry_find_.Not_found : end_pos + end_bry.length; } } diff --git a/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_parser_tst.java b/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_parser_tst.java index 81f987312..e657f5900 100644 --- a/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_parser_tst.java +++ b/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_parser_tst.java @@ -18,6 +18,7 @@ along with this program. If not, see . package gplx.xowa.html.modules.popups; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.modules.*; import org.junit.*; import gplx.core.primitives.*; import gplx.xowa.apis.xowa.html.modules.*; +import gplx.xowa.nss.*; import gplx.xowa.gui.views.*; public class Xow_popup_parser_tst { @Before public void init() {fxt.Clear();} private Xop_popup_parser_fxt fxt = new Xop_popup_parser_fxt(); diff --git a/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_wrdx_mkr.java b/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_wrdx_mkr.java index f34303814..b6a1c413c 100644 --- a/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_wrdx_mkr.java +++ b/400_xowa/src/gplx/xowa/html/modules/popups/Xow_popup_wrdx_mkr.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.modules.popups; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.modules.*; -import gplx.html.*; +import gplx.langs.htmls.*; +import gplx.xowa.nss.*; import gplx.xowa.parsers.*; import gplx.xowa.parsers.lnkes.*; import gplx.xowa.parsers.xndes.*; import gplx.xowa.parsers.lnkis.*; public class Xow_popup_wrdx_mkr { private boolean skip_space; @@ -183,7 +184,7 @@ public class Xow_popup_wrdx_mkr { return false; } public void Xnde_ignore_ids_(byte[] xnde_id_ignore_bry) { - byte[][] ary = Bry_.Split(xnde_id_ignore_bry, Byte_ascii.Pipe); + byte[][] ary = Bry_split_.Split(xnde_id_ignore_bry, Byte_ascii.Pipe); int ary_len = ary.length; xnde_id_ignore_list.Clear(); for (int i = 0; i < ary_len; i++) { diff --git a/400_xowa/src/gplx/xowa/html/modules/popups/keeplists/Xop_keeplist_rule.java b/400_xowa/src/gplx/xowa/html/modules/popups/keeplists/Xop_keeplist_rule.java index 00f613ceb..61d399d8a 100644 --- a/400_xowa/src/gplx/xowa/html/modules/popups/keeplists/Xop_keeplist_rule.java +++ b/400_xowa/src/gplx/xowa/html/modules/popups/keeplists/Xop_keeplist_rule.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.modules.popups.keeplists; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.modules.*; import gplx.xowa.html.modules.popups.*; -import gplx.core.regxs.*; +import gplx.langs.regxs.*; public class Xop_keeplist_rule { private Gfo_pattern[] excludes; private int excludes_len; public Xop_keeplist_rule(Gfo_pattern[] includes, Gfo_pattern[] excludes) { diff --git a/400_xowa/src/gplx/xowa/html/modules/popups/keeplists/Xop_keeplist_wiki.java b/400_xowa/src/gplx/xowa/html/modules/popups/keeplists/Xop_keeplist_wiki.java index 5118d6788..1c94afe1a 100644 --- a/400_xowa/src/gplx/xowa/html/modules/popups/keeplists/Xop_keeplist_wiki.java +++ b/400_xowa/src/gplx/xowa/html/modules/popups/keeplists/Xop_keeplist_wiki.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.modules.popups.keeplists; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.modules.*; import gplx.xowa.html.modules.popups.*; -import gplx.core.regxs.*; +import gplx.langs.regxs.*; public class Xop_keeplist_wiki { public Xop_keeplist_wiki(Xowe_wiki wiki) { srl = new Xop_keeplist_wiki_srl(wiki); diff --git a/400_xowa/src/gplx/xowa/html/modules/popups/keeplists/Xop_keeplist_wiki_srl.java b/400_xowa/src/gplx/xowa/html/modules/popups/keeplists/Xop_keeplist_wiki_srl.java index 03f6eccbc..f8d9c73cd 100644 --- a/400_xowa/src/gplx/xowa/html/modules/popups/keeplists/Xop_keeplist_wiki_srl.java +++ b/400_xowa/src/gplx/xowa/html/modules/popups/keeplists/Xop_keeplist_wiki_srl.java @@ -16,8 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.modules.popups.keeplists; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.modules.*; import gplx.xowa.html.modules.popups.*; -import gplx.srls.dsvs.*; -import gplx.core.regxs.*; +import gplx.langs.dsvs.*; +import gplx.langs.regxs.*; import gplx.xowa.langs.cases.*; public class Xop_keeplist_wiki_srl extends Dsv_wkr_base { private Xol_case_mgr case_mgr; private Xowe_wiki wiki; diff --git a/400_xowa/src/gplx/xowa/html/ns_files/Xoh_ns_file_page_mgr.java b/400_xowa/src/gplx/xowa/html/ns_files/Xoh_ns_file_page_mgr.java index a77573eed..38f57a5a8 100644 --- a/400_xowa/src/gplx/xowa/html/ns_files/Xoh_ns_file_page_mgr.java +++ b/400_xowa/src/gplx/xowa/html/ns_files/Xoh_ns_file_page_mgr.java @@ -45,7 +45,7 @@ public class Xoh_ns_file_page_mgr implements Bry_fmtr_arg { this.file_size_bry = Bry_.new_a7(gplx.ios.Io_size_.To_str(file_size)); } String commons_notice = page.Commons_mgr().Xowa_mockup() - ? String_.Format(Str_commons_notice, gplx.html.Html_utl.Escape_for_atr_val_as_bry(tmp_bfr, Byte_ascii.Apos, page.Ttl().Full_db_as_str())) + ? String_.Format(Str_commons_notice, gplx.langs.htmls.Html_utl.Escape_for_atr_val_as_bry(tmp_bfr, Byte_ascii.Apos, page.Ttl().Full_db_as_str())) : ""; html_wtr.Html_main().Bld_bfr_many(bfr, this, commons_notice); } diff --git a/400_xowa/src/gplx/xowa/html/portal/Xoh_page_body_cls.java b/400_xowa/src/gplx/xowa/html/portal/Xoh_page_body_cls.java index a6474619d..e51a2bbf3 100644 --- a/400_xowa/src/gplx/xowa/html/portal/Xoh_page_body_cls.java +++ b/400_xowa/src/gplx/xowa/html/portal/Xoh_page_body_cls.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.html.portal; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.wikis.*; import gplx.xowa.xtns.wdatas.*; +import gplx.xowa.nss.*; public class Xoh_page_body_cls { // REF.MW:Skin.php|getPageClasses public static byte[] Calc(Bry_bfr tmp_bfr, Xoa_ttl ttl, int page_tid) { tmp_bfr.Add(Bry_id_prefix).Add_int_variable(ttl.Ns().Id()); // ns-0; note that special is ns--1 DATE:2014-09-24 diff --git a/400_xowa/src/gplx/xowa/html/portal/Xoh_rtl_utl.java b/400_xowa/src/gplx/xowa/html/portal/Xoh_rtl_utl.java index 4ee570ec2..d67902324 100644 --- a/400_xowa/src/gplx/xowa/html/portal/Xoh_rtl_utl.java +++ b/400_xowa/src/gplx/xowa/html/portal/Xoh_rtl_utl.java @@ -23,10 +23,10 @@ public class Xoh_rtl_utl { int src_len = src.length; int pos = 0; while (true) { - int ul_bgn = Bry_finder.Find_fwd(src, Ul_bgn, pos, src_len); - if (ul_bgn == Bry_finder.Not_found) break; // no more
    + int ul_bgn = Bry_find_.Find_fwd(src, Ul_bgn, pos, src_len); + if (ul_bgn == Bry_find_.Not_found) break; // no more
      bfr.Add_mid(src, pos, ul_bgn); // add pos ->
        + int li_bgn = Bry_find_.Find_fwd(src, Li_bgn, pos, ul_end); + if (li_bgn == Bry_find_.Not_found) break; // no more
      • tmp_ary[tmp_idx++] = li_bgn; tmp_ary[tmp_idx++] = li_end + Li_end.length; pos = li_end + Li_end.length; } - int ul_bgn_rhs = Bry_finder.Find_fwd(src, Byte_ascii.Gt, ul_bgn); + int ul_bgn_rhs = Bry_find_.Find_fwd(src, Byte_ascii.Gt, ul_bgn); if (tmp_idx < 3 // 0 or 1 li; add everything between ul - || ul_bgn_rhs == Bry_finder.Not_found + || ul_bgn_rhs == Bry_find_.Not_found ) { bfr.Add_mid(src, ul_bgn, ul_end); return; diff --git a/400_xowa/src/gplx/xowa/html/portal/Xoh_subpages_bldr.java b/400_xowa/src/gplx/xowa/html/portal/Xoh_subpages_bldr.java index 1f1253236..984c1bc84 100644 --- a/400_xowa/src/gplx/xowa/html/portal/Xoh_subpages_bldr.java +++ b/400_xowa/src/gplx/xowa/html/portal/Xoh_subpages_bldr.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.html.portal; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.hrefs.*; +import gplx.xowa.nss.*; public class Xoh_subpages_bldr implements Bry_fmtr_arg { private Bry_bfr tmp_bfr = Bry_bfr.reset_(255), ttl_bfr = Bry_bfr.reset_(255); private byte[][] segs; @@ -28,7 +29,7 @@ public class Xoh_subpages_bldr implements Bry_fmtr_arg { ) ) return Bry_.Empty; // doesn't match above; return empty; byte[] raw = ttl.Raw(); - this.segs = Bry_.Split(raw, Byte_ascii.Slash); + this.segs = Bry_split_.Split(raw, Byte_ascii.Slash); fmtr_grp.Bld_bfr(tmp_bfr, this); return tmp_bfr.Xto_bry_and_clear(); } diff --git a/400_xowa/src/gplx/xowa/html/portal/Xoh_subpages_bldr_tst.java b/400_xowa/src/gplx/xowa/html/portal/Xoh_subpages_bldr_tst.java index 888568b01..ab4286007 100644 --- a/400_xowa/src/gplx/xowa/html/portal/Xoh_subpages_bldr_tst.java +++ b/400_xowa/src/gplx/xowa/html/portal/Xoh_subpages_bldr_tst.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.portal; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import org.junit.*; +import org.junit.*; import gplx.xowa.nss.*; public class Xoh_subpages_bldr_tst { @Before public void init() {fxt.Init();} private Xoh_subpages_bldr_fxt fxt = new Xoh_subpages_bldr_fxt(); @Test public void Basic() { diff --git a/400_xowa/src/gplx/xowa/html/portal/Xow_portal_mgr.java b/400_xowa/src/gplx/xowa/html/portal/Xow_portal_mgr.java index 5ddce37c0..a2dcc5495 100644 --- a/400_xowa/src/gplx/xowa/html/portal/Xow_portal_mgr.java +++ b/400_xowa/src/gplx/xowa/html/portal/Xow_portal_mgr.java @@ -16,12 +16,16 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.portal; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.xowa.gui.*; import gplx.xowa.html.sidebar.*; import gplx.xowa.pages.*; import gplx.xowa.langs.vnts.*; +import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; +import gplx.xowa.gui.*; import gplx.xowa.html.sidebar.*; import gplx.xowa.pages.*; +import gplx.xowa.nss.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.html.hrefs.*; import gplx.xowa.apis.xowa.html.*; import gplx.xowa.apis.xowa.html.skins.*; +import gplx.xowa.langs.vnts.*; import gplx.xowa.html.portal.vnts.*; public class Xow_portal_mgr implements GfoInvkAble { private Xowe_wiki wiki; private boolean lang_is_rtl; private Xoapi_toggle_itm toggle_itm; + private final Vnt_mnu_grp_fmtr vnt_menu_fmtr = new Vnt_mnu_grp_fmtr(); public Xow_portal_mgr(Xowe_wiki wiki) { this.wiki = wiki; this.sidebar_mgr = new Xowh_sidebar_mgr(wiki); @@ -72,8 +76,7 @@ public class Xow_portal_mgr implements GfoInvkAble { Bry_fmtr_arg vnt_menu = null; Xol_vnt_mgr vnt_mgr = wiki.Lang().Vnt_mgr(); // VNT; DATE:2015-03-03 if (vnt_mgr.Enabled()) { - Vnt_mnu_grp_fmtr vnt_menu_fmtr = vnt_mgr.Vnt_mnu_fmtr(); - vnt_menu_fmtr.Init(vnt_mgr.Vnt_grp(), wiki.Domain_bry(), ttl.Full_db(), vnt_mgr.Cur_vnt()); + vnt_menu_fmtr.Init(vnt_mgr.Regy(), wiki.Domain_bry(), ttl.Full_db(), vnt_mgr.Cur_key()); vnt_menu = wiki.Lang().Vnt_mgr().Enabled() ? vnt_menu_fmtr : null; } Bry_bfr tmp_bfr = bfr_mkr.Get_k004(); diff --git a/400_xowa/src/gplx/xowa/langs/vnts/Vnt_mnu_grp_fmtr.java b/400_xowa/src/gplx/xowa/html/portal/vnts/Vnt_mnu_grp_fmtr.java similarity index 72% rename from 400_xowa/src/gplx/xowa/langs/vnts/Vnt_mnu_grp_fmtr.java rename to 400_xowa/src/gplx/xowa/html/portal/vnts/Vnt_mnu_grp_fmtr.java index fb89225cc..71e5eb032 100644 --- a/400_xowa/src/gplx/xowa/langs/vnts/Vnt_mnu_grp_fmtr.java +++ b/400_xowa/src/gplx/xowa/html/portal/vnts/Vnt_mnu_grp_fmtr.java @@ -15,17 +15,18 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa.langs.vnts; import gplx.*; import gplx.xowa.*; import gplx.xowa.langs.*; +package gplx.xowa.html.portal.vnts; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.portal.*; +import gplx.xowa.langs.vnts.*; public class Vnt_mnu_grp_fmtr implements Bry_fmtr_arg { private final Xolg_vnt_itm_fmtr itm_fmtr = new Xolg_vnt_itm_fmtr(); - private Vnt_mnu_grp grp; private byte[] page_vnt; - public void Init(Vnt_mnu_grp grp, byte[] wiki_domain, byte[] page_href, byte[] page_vnt) { - this.grp = grp; this.page_vnt = page_vnt; - itm_fmtr.Init(grp, wiki_domain, page_href, page_vnt); + private Xol_vnt_regy mgr; private byte[] page_vnt; + public void Init(Xol_vnt_regy mgr, byte[] wiki_domain, byte[] page_href, byte[] page_vnt) { + this.mgr = mgr; this.page_vnt = page_vnt; + itm_fmtr.Init(mgr, wiki_domain, page_href, page_vnt); } public void XferAry(Bry_bfr bfr, int idx) { - Vnt_mnu_itm mnu_itm = grp.Get_by(page_vnt); - fmtr.Bld_bfr_many(bfr, mnu_itm == null ? Bry_.Empty : mnu_itm.Text(), itm_fmtr); + Xol_vnt_itm mnu_itm = mgr.Get_by(page_vnt); + fmtr.Bld_bfr_many(bfr, mnu_itm == null ? Bry_.Empty : mnu_itm.Name(), itm_fmtr); } private static final Bry_fmtr fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last ( "" @@ -40,15 +41,15 @@ public class Vnt_mnu_grp_fmtr implements Bry_fmtr_arg { ); } class Xolg_vnt_itm_fmtr implements Bry_fmtr_arg { - private Vnt_mnu_grp grp; private byte[] wiki_domain, page_href, page_vnt; - public void Init(Vnt_mnu_grp grp, byte[] wiki_domain, byte[] page_href, byte[] page_vnt) {this.grp = grp; this.wiki_domain = wiki_domain; this.page_href = page_href; this.page_vnt = page_vnt;} + private Xol_vnt_regy mgr; private byte[] wiki_domain, page_href, page_vnt; + public void Init(Xol_vnt_regy mgr, byte[] wiki_domain, byte[] page_href, byte[] page_vnt) {this.mgr = mgr; this.wiki_domain = wiki_domain; this.page_href = page_href; this.page_vnt = page_vnt;} public void XferAry(Bry_bfr bfr, int idx) { - int len = grp.Len(); + int len = mgr.Len(); for (int i = 0; i < len; ++i) { - Vnt_mnu_itm itm = grp.Get_at(i); + Xol_vnt_itm itm = mgr.Get_at(i); if (!itm.Visible()) continue; boolean itm_is_selected = Bry_.Eq(itm.Key(), page_vnt); byte[] itm_cls_selected = itm_is_selected ? Itm_cls_selected_y : Bry_.Empty; - fmtr.Bld_bfr_many(bfr, i, itm_cls_selected, wiki_domain, itm.Key(), itm.Text(), page_href); + fmtr.Bld_bfr_many(bfr, i, itm_cls_selected, wiki_domain, itm.Key(), itm.Name(), page_href); } } private static final byte[] Itm_cls_selected_y = Bry_.new_a7(" class='selected'"); diff --git a/400_xowa/src/gplx/xowa/langs/vnts/Vnt_mnu_grp_fmtr_tst.java b/400_xowa/src/gplx/xowa/html/portal/vnts/Vnt_mnu_grp_fmtr_tst.java similarity index 86% rename from 400_xowa/src/gplx/xowa/langs/vnts/Vnt_mnu_grp_fmtr_tst.java rename to 400_xowa/src/gplx/xowa/html/portal/vnts/Vnt_mnu_grp_fmtr_tst.java index 5dfc109a5..8e1a45cb9 100644 --- a/400_xowa/src/gplx/xowa/langs/vnts/Vnt_mnu_grp_fmtr_tst.java +++ b/400_xowa/src/gplx/xowa/html/portal/vnts/Vnt_mnu_grp_fmtr_tst.java @@ -15,8 +15,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -package gplx.xowa.langs.vnts; import gplx.*; import gplx.xowa.*; import gplx.xowa.langs.*; -import org.junit.*; +package gplx.xowa.html.portal.vnts; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import gplx.xowa.html.portal.*; +import org.junit.*; import gplx.xowa.langs.vnts.*; public class Vnt_mnu_grp_fmtr_tst { @Before public void init() {fxt.Clear();} private final Vnt_mnu_grp_fmtr_fxt fxt = new Vnt_mnu_grp_fmtr_fxt(); @Test public void Basic() { @@ -40,12 +40,12 @@ public class Vnt_mnu_grp_fmtr_tst { } } class Vnt_mnu_grp_fmtr_fxt { - private Vnt_mnu_grp vnt_grp; + private final Xol_vnt_regy mgr = new Xol_vnt_regy(); public void Clear() { this.Init_grp("Choose lang", "zh-hans", "Simplified", "zh-hant", "Traditional", "zh-cn", "China", "zh-hk", "Hong Kong", "zh-mo", "Macau", "zh-sg", "Singapore", "zh-tw", "Taiwan"); } public void Init_grp(String text, String... langs) { - vnt_grp = new Vnt_mnu_grp(); + mgr.Clear(); int len = langs.length; String lang_code = ""; for (int i = 0; i < len; ++i) { @@ -53,15 +53,14 @@ class Vnt_mnu_grp_fmtr_fxt { if (i % 2 == 0) lang_code = lang; else { - Vnt_mnu_itm itm = new Vnt_mnu_itm(Bry_.new_u8(lang_code), Bry_.new_u8(lang)); - vnt_grp.Add(itm); + mgr.Add(Bry_.new_u8(lang_code), Bry_.new_u8(lang)); } } } public void Test_to_str(String page_href, String selected_vnt, String expd) { Vnt_mnu_grp_fmtr vnt_grp_fmtr = new Vnt_mnu_grp_fmtr(); Bry_bfr bfr = Bry_bfr.new_(); - vnt_grp_fmtr.Init(vnt_grp, Bry_.new_u8(page_href), Bry_.new_a7("zh.wikipedia.org"), Bry_.new_u8(selected_vnt)); + vnt_grp_fmtr.Init(mgr, Bry_.new_u8(page_href), Bry_.new_a7("zh.wikipedia.org"), Bry_.new_u8(selected_vnt)); vnt_grp_fmtr.XferAry(bfr, 0); Tfds.Eq_str_lines(expd, bfr.Xto_str_and_clear()); } diff --git a/400_xowa/src/gplx/xowa/html/sidebar/Xowh_sidebar_mgr.java b/400_xowa/src/gplx/xowa/html/sidebar/Xowh_sidebar_mgr.java index 8327f3f31..3369f7d5e 100644 --- a/400_xowa/src/gplx/xowa/html/sidebar/Xowh_sidebar_mgr.java +++ b/400_xowa/src/gplx/xowa/html/sidebar/Xowh_sidebar_mgr.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.sidebar; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.core.btries.*; import gplx.xowa.langs.msgs.*; +import gplx.core.btries.*; import gplx.langs.htmls.encoders.*; +import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; import gplx.xowa.parsers.lnkis.*; public class Xowh_sidebar_mgr implements GfoInvkAble { public Xowh_sidebar_mgr(Xowe_wiki wiki) {this.wiki = wiki;} private Xowe_wiki wiki; @@ -52,7 +53,7 @@ public class Xowh_sidebar_mgr implements GfoInvkAble { ); } private static byte[] Ignore_wiki_ess = Bry_.new_a7("es.wikisource.org"), Ignore_item_ess_random = Bry_.new_u8("special:Random/Página djvu"); public void Parse(Bry_bfr bfr, Bry_bfr comment_bfr, byte[] src) { - byte[][] lines = Bry_.Split(src, Byte_ascii.Nl); + byte[][] lines = Bry_split_.Split(src, Byte_ascii.Nl); int lines_len = lines.length; Url_encoder id_encoder = Xoa_app_.Utl__encoder_mgr().Id(); Xowh_sidebar_itm cur_grp = null; @@ -63,9 +64,9 @@ public class Xowh_sidebar_mgr implements GfoInvkAble { if (line[0] != Byte_ascii.Star) continue; // skip non-list items; must begin with "*" byte tid = line[1] == Byte_ascii.Star ? Xowh_sidebar_itm.Tid_itm : Xowh_sidebar_itm.Tid_grp; byte[] bry = Bry_.Trim(line, tid, line_len); // trim *, **; note that tid indicates # of asterisks - bry = gplx.html.Html_utl.Del_comments(comment_bfr, bry); // strip comments; DATE:2014-03-08 + bry = gplx.langs.htmls.Html_utl.Del_comments(comment_bfr, bry); // strip comments; DATE:2014-03-08 if (ignore_trie.Match_bgn(bry, 0, bry.length) != null) continue; // ignore SEARCH, TOOLBOX, LANGUAGES - int pipe_pos = Bry_finder.Find_fwd(bry, Byte_ascii.Pipe); + int pipe_pos = Bry_find_.Find_fwd(bry, Byte_ascii.Pipe); byte[] text_key = tid == Xowh_sidebar_itm.Tid_grp ? bry : Bry_.Mid(bry, pipe_pos + 1, bry.length); // get text_key; note that grp is entire bry, while itm is after | byte[] text_val = Resolve_key(text_key); byte[] id = id_encoder.Encode(bfr.Add(CONST_id_prefix), text_key).Xto_bry_and_clear(); // build id; "n-encoded_id" @@ -116,7 +117,7 @@ public class Xowh_sidebar_mgr implements GfoInvkAble { private byte[] Resolve_key(byte[] key) { byte[] val = wiki.Msg_mgr().Val_by_key_obj(key); if (Bry_.Len_eq_0(val)) val = key; // if key is not found, default to val - return wiki.Parser().Parse_text_to_wtxt(val); + return wiki.Parser_mgr().Main().Parse_text_to_wtxt(val); } public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, Invk_html_grp_fmt_)) html_grp_fmtr.Fmt_(m.ReadBry("v")); diff --git a/400_xowa/src/gplx/xowa/html/sidebar/Xowh_sidebar_mgr_tst.java b/400_xowa/src/gplx/xowa/html/sidebar/Xowh_sidebar_mgr_tst.java index 2cd431c37..3fc0bba36 100644 --- a/400_xowa/src/gplx/xowa/html/sidebar/Xowh_sidebar_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/html/sidebar/Xowh_sidebar_mgr_tst.java @@ -17,6 +17,7 @@ along with this program. If not, see . */ package gplx.xowa.html.sidebar; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; import org.junit.*; import gplx.core.strings.*; +import gplx.xowa.langs.*; public class Xowh_sidebar_mgr_tst { @Before public void init() {fxt.Clear();} private Xowh_sidebar_mgr_fxt fxt = new Xowh_sidebar_mgr_fxt(); @Test public void Grp() { diff --git a/400_xowa/src/gplx/xowa/html/tidy/Xoh_tidy_mgr.java b/400_xowa/src/gplx/xowa/html/tidy/Xoh_tidy_mgr.java index 6083f5c82..0590e342b 100644 --- a/400_xowa/src/gplx/xowa/html/tidy/Xoh_tidy_mgr.java +++ b/400_xowa/src/gplx/xowa/html/tidy/Xoh_tidy_mgr.java @@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.tidy; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.html.*; +import gplx.langs.htmls.*; import gplx.xowa.apps.fsys.*; public class Xoh_tidy_mgr implements GfoInvkAble { private Xoh_tidy_wkr wkr = Xoh_tidy_wkr_.Wkr_null; // TEST: set default wkr to null @@ -63,9 +63,9 @@ public class Xoh_tidy_mgr implements GfoInvkAble { } public static boolean Tidy_unwrap(Bry_bfr bfr) { byte[] bfr_bry = bfr.Bfr(); - int find = Bry_finder.Find_fwd(bfr_bry, Html_tag_.Body_lhs); if (find == Bry_finder.Not_found) return false; + int find = Bry_find_.Find_fwd(bfr_bry, Html_tag_.Body_lhs); if (find == Bry_find_.Not_found) return false; bfr.Delete_rng_to_bgn(find + Html_tag_.Body_lhs.length); - find = Bry_finder.Find_bwd(bfr_bry, Html_tag_.Body_rhs, bfr.Len()); if (find == Bry_finder.Not_found) return false; + find = Bry_find_.Find_bwd(bfr_bry, Html_tag_.Body_rhs, bfr.Len()); if (find == Bry_find_.Not_found) return false; bfr.Delete_rng_to_end(find); return true; } diff --git a/400_xowa/src/gplx/xowa/html/tocs/Xow_hdr_mgr.java b/400_xowa/src/gplx/xowa/html/tocs/Xow_hdr_mgr.java index 6439a0b5c..858b18508 100644 --- a/400_xowa/src/gplx/xowa/html/tocs/Xow_hdr_mgr.java +++ b/400_xowa/src/gplx/xowa/html/tocs/Xow_hdr_mgr.java @@ -16,7 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.tocs; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; -import gplx.core.primitives.*; import gplx.xowa.urls.encoders.*; +import gplx.core.primitives.*; import gplx.langs.htmls.encoders.*; +import gplx.xowa.nss.*; import gplx.xowa.parsers.*; import gplx.xowa.parsers.amps.*; import gplx.xowa.parsers.hdrs.*; import gplx.xowa.parsers.xndes.*; import gplx.xowa.parsers.lnkis.*; public class Xow_hdr_mgr { private final Url_encoder_mgr encoder_mgr; private final Xoae_page page; diff --git a/400_xowa/src/gplx/xowa/html/tocs/Xow_toc_mgr.java b/400_xowa/src/gplx/xowa/html/tocs/Xow_toc_mgr.java index bed043084..e3be844c0 100644 --- a/400_xowa/src/gplx/xowa/html/tocs/Xow_toc_mgr.java +++ b/400_xowa/src/gplx/xowa/html/tocs/Xow_toc_mgr.java @@ -16,6 +16,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package gplx.xowa.html.tocs; import gplx.*; import gplx.xowa.*; import gplx.xowa.html.*; +import gplx.xowa.langs.*; +import gplx.xowa.nss.*; import gplx.xowa.parsers.*; import gplx.xowa.parsers.apos.*; import gplx.xowa.parsers.amps.*; import gplx.xowa.parsers.hdrs.*; import gplx.xowa.parsers.xndes.*; import gplx.xowa.parsers.lnkis.*; public class Xow_toc_mgr implements Bry_fmtr_arg { private static final int Toc_levels = 32; // assume 6 max levels * 5 max heading (9999.); add 2 for good measure diff --git a/400_xowa/src/gplx/xowa/html/utils/Xoh_js_cleaner.java b/400_xowa/src/gplx/xowa/html/utils/Xoh_js_cleaner.java index d6035b8fd..abb656122 100644 --- a/400_xowa/src/gplx/xowa/html/utils/Xoh_js_cleaner.java +++ b/400_xowa/src/gplx/xowa/html/utils/Xoh_js_cleaner.java @@ -49,7 +49,7 @@ public class Xoh_js_cleaner { int frag_len = frag.length; if (frag[0] == Byte_ascii.Lt) { // jscript node; EX: