1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2015-03-01 21:59:12 -05:00
parent f495595da4
commit d279c70606
346 changed files with 3516 additions and 2970 deletions

View File

@@ -96,7 +96,7 @@ public class Xoa_ttl { // PAGE:en.w:http://en.wikipedia.org/wiki/Help:Link; REF.
private static final Object thread_lock = new Object();
public static Xoa_ttl new_(Xowe_wiki wiki, Gfo_msg_log msg_log, byte[] src, int bgn, int end) {
Xoae_app app = wiki.Appe();
Bry_bfr_mkr bry_mkr = app.Utl_bry_bfr_mkr();
Bry_bfr_mkr bry_mkr = app.Utl__bfr_mkr();
return parse(bry_mkr, app.Parser_amp_mgr(), wiki.Lang().Case_mgr(), wiki.Xwiki_mgr(), wiki.Ns_mgr(), msg_log, src, bgn, end);
} private Xoa_ttl() {}
public static Xoa_ttl parse(Bry_bfr_mkr bry_mkr, Xop_amp_mgr amp_mgr, Xol_case_mgr case_mgr, Xow_xwiki_mgr xwiki_mgr, Xow_ns_mgr ns_mgr, Gfo_msg_log msg_log, byte[] src, int bgn, int end) {

View File

@@ -377,7 +377,7 @@ public class Xop_fxt {
}
}
public void Test_html_modules_js(String expd) {
Bry_bfr bfr = app.Utl_bry_bfr_mkr().Get_k004();
Bry_bfr bfr = app.Utl__bfr_mkr().Get_k004();
this.Page().Html_data().Module_mgr().Init(app, wiki, this.Page());
this.Page().Html_data().Module_mgr().XferAry(bfr, 0);
bfr.Mkr_rls();

View File

@@ -37,7 +37,7 @@ public class Xop_parser { // NOTE: parsers are reused; do not keep any read-writ
wtxt_lxr_mgr.Init_by_lang(lang);
}
public byte[] Parse_text_to_html(Xop_ctx ctx, byte[] src) {
Bry_bfr bfr = wiki.Utl_bry_bfr_mkr().Get_b512();
Bry_bfr bfr = wiki.Utl__bfr_mkr().Get_b512();
Parse_text_to_html(bfr, ctx.Cur_page(), false, src);
return bfr.Mkr_rls().Xto_bry_and_clear();
}

View File

@@ -21,7 +21,7 @@ public class Xop_parser_ {
public static final byte Parse_tid_null = 0, Parse_tid_tmpl = 1, Parse_tid_page_tmpl = 2, Parse_tid_page_wiki = 3;
public static final int Doc_bgn_bos = -1, Doc_bgn_char_0 = 0;
public static byte[] Parse_text_to_html(Xowe_wiki wiki, Xoae_page page, Xoa_ttl ttl, byte[] src, boolean para_enabled) { // NOTE: must pass in same page instance; do not do Xoa_page_.new_(), else img_idx will get reset to 0; DATE:2015-02-08
Bry_bfr bfr = wiki.Utl_bry_bfr_mkr().Get_b512();
Bry_bfr bfr = wiki.Utl__bfr_mkr().Get_b512();
Xop_ctx ctx = Xop_ctx.new_sub_(wiki, page);
Xop_tkn_mkr tkn_mkr = ctx.Tkn_mkr();
Xop_root_tkn root = tkn_mkr.Root(src);

View File

@@ -19,7 +19,7 @@ package gplx.xowa; import gplx.*;
import gplx.xowa.html.*;
public class Xop_redirect_mgr {
private final Xowe_wiki wiki; private final Url_encoder url_decoder; private Hash_adp_bry redirect_hash;
public Xop_redirect_mgr(Xowe_wiki wiki) {this.wiki = wiki; this.url_decoder = Xoa_app_.Utl_encoder_mgr().Url_ttl();} // NOTE: must be Url_ttl, not Url; PAGE:en.w:Template:Positionskarte+ -> Template:Location_map+, not Template:Location_map DATE:2014-08-21
public Xop_redirect_mgr(Xowe_wiki wiki) {this.wiki = wiki; this.url_decoder = Xoa_app_.Utl__encoder_mgr().Url_ttl();} // NOTE: must be Url_ttl, not Url; PAGE:en.w:Template:Positionskarte+ -> Template:Location_map+, not Template:Location_map DATE:2014-08-21
public void Clear() {redirect_hash = null;} // TEST:
public boolean Is_redirect(byte[] text, int text_len) {return this.Extract_redirect(text, text_len) != null;}
public Xoa_ttl Extract_redirect_loop(byte[] src) {
@@ -66,7 +66,7 @@ public class Xop_redirect_mgr {
ListAdp list = page.Redirected_ttls();
int list_len = list.Count();
if (list_len == 0) return Bry_.Empty;
Bry_bfr redirect_bfr = app.Utl_bry_bfr_mkr().Get_b512();
Bry_bfr redirect_bfr = app.Utl__bfr_mkr().Get_b512();
for (int i = 0; i < list_len; i++) {
if (i != 0) redirect_bfr.Add(Bry_redirect_dlm);
byte[] redirect_ttl = (byte[])list.FetchAt(i);
@@ -82,7 +82,7 @@ public class Xop_redirect_mgr {
;
}
Xol_msg_itm msg_itm = wiki.Lang().Msg_mgr().Itm_by_id_or_null(Xol_msg_itm_.Id_redirectedfrom);
Bry_bfr fmt_bfr = app.Utl_bry_bfr_mkr().Get_b512();
Bry_bfr fmt_bfr = app.Utl__bfr_mkr().Get_b512();
app.Tmp_fmtr().Fmt_(msg_itm.Val()).Bld_bfr_one(fmt_bfr, redirect_bfr);
redirect_bfr.Clear().Mkr_rls(); fmt_bfr.Mkr_rls();
return fmt_bfr.Xto_bry_and_clear();