mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.8.1.1
This commit is contained in:
@@ -39,11 +39,12 @@ public class Xob_bldr implements GfoInvkAble {
|
||||
public void Print_prog_msg(long cur, long end, int pct_idx, String fmt, Object... ary) {
|
||||
long now = Env_.TickCount(); if (now - prv_prog_time < 100) return;
|
||||
this.prv_prog_time = now;
|
||||
if (pct_idx > -1) ary[pct_idx] = DecimalAdp_.CalcPctStr(cur, end, "00.00");
|
||||
if (pct_idx > -1) ary[pct_idx] = Decimal_adp_.CalcPctStr(cur, end, "00.00");
|
||||
app.Usr_dlg().Prog_many("", "", fmt, ary);
|
||||
}
|
||||
public void Run() {
|
||||
try {
|
||||
app.Bldr__running_(true);
|
||||
app.Launch(); // HACK: bldr will be called by a gfs file which embeds "bldr.run" inside it; need to call Launch though before Run; DATE:2013-03-23
|
||||
long time_bgn = Env_.TickCount();
|
||||
int cmd_mgr_len = cmd_mgr.Len();
|
||||
@@ -70,7 +71,10 @@ public class Xob_bldr implements GfoInvkAble {
|
||||
cmd_mgr.Clear();
|
||||
if (pause_at_end && !Env_.Mode_testing()) {Console_adp__sys.I.Read_line("press enter to continue");}
|
||||
}
|
||||
catch (Exception e) {throw Err_.new_exc(e, "bldr", "unknown error");}
|
||||
catch (Exception e) {
|
||||
app.Bldr__running_(false);
|
||||
throw Err_.new_exc(e, "bldr", "unknown error");
|
||||
}
|
||||
}
|
||||
private void Cancel() {
|
||||
int cmd_mgr_len = cmd_mgr.Len();
|
||||
|
||||
@@ -100,7 +100,7 @@ public class Xob_xdat_file_tst {
|
||||
}
|
||||
private void tst_Find(Xob_xdat_file rdr, String find, int expd, boolean exact) {
|
||||
rdr.Find(itm, Bry_.new_u8(find), 2, Byte_ascii.Nl, exact);
|
||||
int id = Bry_.Xto_int_or(Bry_.Mid(itm.Itm_bry(), 0, 1), -1);
|
||||
int id = Bry_.To_int_or(Bry_.Mid(itm.Itm_bry(), 0, 1), -1);
|
||||
Tfds.Eq(expd, id);
|
||||
}
|
||||
private void tst_ReadAt(Xob_xdat_file rdr, int i, String expd) {rdr.GetAt(itm, i); Tfds.Eq(expd, String_.new_u8(itm.Itm_bry()));}
|
||||
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.xowa; import gplx.*;
|
||||
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_ascii_(); // NOTE:ci.ascii:MW_const.en; ctg.v1 assumes [[Category:
|
||||
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_();
|
||||
public String Wkr_key() {return KEY;} static final String KEY = "page_parser";
|
||||
public void Wkr_ini(Xob_bldr bldr) {}
|
||||
|
||||
@@ -57,7 +57,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_u8(page.Ttl_full_db()) + "|" + Err_.Message_gplx_log(e) + "|" + Xot_tmpl_wtr.Err_string; Xot_tmpl_wtr.Err_string = "";
|
||||
String msg = Decimal_adp_.CalcPctStr(dividend, fil_len, "00.00") + "|" + String_.new_u8(page.Ttl_full_db()) + "|" + Err_.Message_gplx_log(e) + "|" + Xot_tmpl_wtr.Err_string; Xot_tmpl_wtr.Err_string = "";
|
||||
bldr.Usr_dlg().Log_wkr().Log_to_session(msg);
|
||||
Console_adp__sys.I.Write_str_w_nl(msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user