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-08 21:27:59 -04:00
parent d279c70606
commit 80b9928b5c
259 changed files with 2841 additions and 2060 deletions

View File

@@ -36,7 +36,7 @@ public class Xobd_parser implements Xobd_wkr {
}
}
public void Wkr_run(Xodb_page page) {
byte[] src = page.Text(); int src_len = src.length;
byte[] src = page.Wtxt(); int src_len = src.length;
int pos = 0;
while (true) {
if (pos == src_len) break;

View File

@@ -45,7 +45,7 @@ public class Xobd_rdr implements Xob_cmd {
while (true) {
int cur_pos = parser.Parse_page(page, usr_dlg, fil, fil.Bfr(), prv_pos, ns_mgr); if (cur_pos == Bry_.NotFound) break;
if (cur_pos < prv_pos)
bldr.StatusMgr_prog_fmt(fil.Fil_pos(), fil_len, 1, optRdrFillFmt, Int_.Xto_str_pad_bgn((int)(fil.Fil_pos() / Io_mgr.Len_mb), Int_.DigitCount((int)(fil.Fil_len() / Io_mgr.Len_mb))), "", String_.new_utf8_(page.Ttl_w_ns())); // ;
bldr.StatusMgr_prog_fmt(fil.Fil_pos(), fil_len, 1, optRdrFillFmt, Int_.Xto_str_pad_bgn((int)(fil.Fil_pos() / Io_mgr.Len_mb), Int_.DigitCount((int)(fil.Fil_len() / Io_mgr.Len_mb))), "", String_.new_utf8_(page.Ttl_full_db()));
prv_pos = cur_pos;
try {
for (int i = 0; i < wkr_ary_len; i++)
@@ -55,7 +55,7 @@ public class Xobd_rdr implements Xob_cmd {
Err_.Noop(e);
long dividend = fil.Fil_pos();
if (dividend >= fil_len) dividend = fil_len - 1; // prevent % from going over 100
String msg = DecimalAdp_.CalcPctStr(dividend, fil_len, "00.00") + "|" + String_.new_utf8_(page.Ttl_w_ns()) + "|" + Err_.Message_lang(e) + "|" + Xot_tmpl_wtr.Err_string; Xot_tmpl_wtr.Err_string = "";
String msg = DecimalAdp_.CalcPctStr(dividend, fil_len, "00.00") + "|" + String_.new_utf8_(page.Ttl_full_db()) + "|" + Err_.Message_lang(e) + "|" + Xot_tmpl_wtr.Err_string; Xot_tmpl_wtr.Err_string = "";
bldr.Usr_dlg().Log_wtr().Log_msg_to_session(msg);
ConsoleAdp._.WriteLine(msg);
}

View File

@@ -51,7 +51,7 @@ public class Xodb_page_raw_parser {
page.Ttl_(ttl, ns_mgr);
read = rdr.Read_next(); if (!read) throw Err_.new_("could not read text");
byte[] text = Bry_.Mid(rdr.Bfr(), rdr.Key_pos_bgn(), rdr.Key_pos_end() - 1);
page.Text_(text);
page.Wtxt_(text);
rdr.Bfr_last_read_add(1);
return true;
}