mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.6.5.1
This commit is contained in:
@@ -50,7 +50,7 @@ public class Io_sort_cmd_ns implements Io_make_cmd {
|
||||
.Add_int_variable(fil_count++).Add_byte(Byte_ascii.Pipe)
|
||||
.Add_bfr_and_preserve(key_bfr_0).Add_byte(Byte_ascii.Pipe)
|
||||
.Add_bfr_and_preserve(key_bfr_n).Add_byte(Byte_ascii.Pipe)
|
||||
.Add_int_variable(itm_count).Add_byte(Byte_ascii.NewLine);
|
||||
.Add_int_variable(itm_count).Add_byte(Byte_ascii.Nl);
|
||||
itm_count = 0;
|
||||
key_bfr_0.Clear();
|
||||
if (fil_wtr.Fil_idx() % 10 == 0)
|
||||
|
||||
@@ -125,7 +125,7 @@ public class Xob_make_cmd_site implements Io_make_cmd {
|
||||
.Add_int_variable(fil_count++).Add_byte(Byte_ascii.Pipe)
|
||||
.Add_bfr_and_preserve(reg_key_0).Add_byte(Byte_ascii.Pipe)
|
||||
.Add_bfr_and_preserve(reg_key_n).Add_byte(Byte_ascii.Pipe)
|
||||
.Add_int_variable(itm_count).Add_byte(Byte_ascii.NewLine);
|
||||
.Add_int_variable(itm_count).Add_byte(Byte_ascii.Nl);
|
||||
itm_count = 0;
|
||||
reg_key_0.Clear();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class Xob_stat_type {
|
||||
Xob_stat_itm itm = (Xob_stat_itm)regy.Get_at(i);
|
||||
sb.Add(Xotdb_dir_info_.Tid_name(tid)).Add(Xob_stat_itm.Dlm);
|
||||
itm.XtoStr(sb);
|
||||
sb.Add(Byte_ascii.NewLine);
|
||||
sb.Add(Byte_ascii.Nl);
|
||||
}
|
||||
}
|
||||
Ordered_hash regy = Ordered_hash_.new_();
|
||||
|
||||
@@ -98,7 +98,7 @@ public class Xob_xdat_file {
|
||||
if (insert) bfr.Add(new_itm);
|
||||
itm_0_bgn = (ary_len * Len_idx_itm) + Len_itm_dlm;
|
||||
src = bfr.Xto_bry_and_clear();
|
||||
} static final byte Dlm_hdr_fld = Byte_ascii.Pipe, Dlm_row = Byte_ascii.NewLine;
|
||||
} static final byte Dlm_hdr_fld = Byte_ascii.Pipe, Dlm_row = Byte_ascii.Nl;
|
||||
public void Save(Io_url url) {
|
||||
Bry_bfr bfr = Bry_bfr.new_();
|
||||
Srl_save_bry(bfr);
|
||||
@@ -153,7 +153,7 @@ public class Xob_xdat_file {
|
||||
while (true) {
|
||||
slot_bgn = itm_count * Len_idx_itm;
|
||||
if (slot_bgn >= src_len) break;
|
||||
if (src[slot_bgn] == Byte_ascii.NewLine) break;
|
||||
if (src[slot_bgn] == Byte_ascii.Nl) break;
|
||||
int tmp_val = Base85_utl.XtoIntByAry(src, slot_bgn, slot_bgn + Offset_base85);
|
||||
slot_new = slot_old + tmp_val;
|
||||
int new_idx = itm_count + 1;
|
||||
@@ -186,7 +186,7 @@ public class Xob_xdat_file {
|
||||
int row_len = row.length + dlm_len;
|
||||
bfr.Add_base85_len_5(row_len).Add_byte(Byte_ascii.Pipe);
|
||||
}
|
||||
bfr.Add_byte(Byte_ascii.NewLine);
|
||||
bfr.Add_byte(Byte_ascii.Nl);
|
||||
for (int i = 1; i < rows_len; i++) { // i=1; skip 1st row (which is empty header)
|
||||
byte[] row = rows[i];
|
||||
bfr.Add(row);
|
||||
|
||||
@@ -99,7 +99,7 @@ public class Xob_xdat_file_tst {
|
||||
Tfds.Eq_str_lines(expd, actl);
|
||||
}
|
||||
private void tst_Find(Xob_xdat_file rdr, String find, int expd, boolean exact) {
|
||||
rdr.Find(itm, Bry_.new_u8(find), 2, Byte_ascii.NewLine, 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);
|
||||
Tfds.Eq(expd, id);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class Xob_xdat_file_wtr {
|
||||
idx_bry[idx_bry_pos + Len_base85] = Dlm_fld;
|
||||
prv_pos = cur_pos;
|
||||
}
|
||||
idx_bry[idx_bry_len - 1] = Byte_ascii.NewLine;
|
||||
idx_bry[idx_bry_len - 1] = Byte_ascii.Nl;
|
||||
wtr.Write(idx_bry, 0, idx_bry_len);
|
||||
}
|
||||
// public void Flush(Gfo_usr_dlg usr_dlg) {
|
||||
@@ -102,7 +102,7 @@ public class Xob_xdat_file_wtr {
|
||||
// idx_bry[idx_bry_pos + Len_base85] = Dlm_idx;
|
||||
// prv_pos = cur_pos;
|
||||
// }
|
||||
// idx_bry[idx_bry_len - 1] = Byte_ascii.NewLine;
|
||||
// idx_bry[idx_bry_len - 1] = Byte_ascii.Nl;
|
||||
// stream.Write(idx_bry, 0, idx_bry_len);
|
||||
// }
|
||||
static final int Len_idx_itm = 6, Len_base85 = 5;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Xob_xdat_file_wtr_tst {
|
||||
Tfds.Eq(expd, String_.new_u8(wtr.Bfr().Bfr(), 0, wtr.Bfr().Len()));
|
||||
}
|
||||
private void tst_Add_idx(Xob_xdat_file_wtr wtr, int expd) {
|
||||
wtr.Add_idx(Byte_ascii.NewLine);
|
||||
wtr.Add_idx(Byte_ascii.Nl);
|
||||
Tfds.Eq(expd, wtr.Idx()[wtr.Idx_pos() - 1]);
|
||||
}
|
||||
private void tst_Flush(Xob_xdat_file_wtr wtr, String expd) {
|
||||
|
||||
@@ -31,7 +31,7 @@ class Io_sort_filCmd_reg implements Io_sort_filCmd { // 123|bgn|end|1
|
||||
}
|
||||
public void Fil_end() {
|
||||
bfr.Add_mid(prv_key, 0, prv_key_len).Add_byte(Byte_ascii.Pipe)
|
||||
.Add_int_variable(itm_count).Add_byte(Byte_ascii.NewLine);
|
||||
.Add_int_variable(itm_count).Add_byte(Byte_ascii.Nl);
|
||||
itm_count = 0;
|
||||
}
|
||||
public void Flush(Io_url fil) {
|
||||
|
||||
Reference in New Issue
Block a user