daff 1.1.16 → 1.1.19
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/daff.rb +24 -4
- data/lib/lib/coopy/alignment.rb +2 -1
- data/lib/lib/coopy/bag.rb +1 -0
- data/lib/lib/coopy/cell_builder.rb +17 -0
- data/lib/lib/coopy/cell_info.rb +1 -0
- data/lib/lib/coopy/change.rb +1 -0
- data/lib/lib/coopy/compare.rb +1 -0
- data/lib/lib/coopy/compare_flags.rb +28 -0
- data/lib/lib/coopy/compare_table.rb +29 -10
- data/lib/lib/coopy/coopy.rb +29 -15
- data/lib/lib/coopy/cross_match.rb +1 -0
- data/lib/lib/coopy/csv.rb +1 -0
- data/lib/lib/coopy/diff_render.rb +1 -0
- data/lib/lib/coopy/flat_cell_builder.rb +72 -0
- data/lib/lib/coopy/highlight_patch.rb +1 -0
- data/lib/lib/coopy/highlight_patch_unit.rb +1 -0
- data/lib/lib/coopy/index.rb +1 -0
- data/lib/lib/coopy/index_item.rb +1 -0
- data/lib/lib/coopy/index_pair.rb +1 -0
- data/lib/lib/coopy/merger.rb +1 -0
- data/lib/lib/coopy/mover.rb +1 -0
- data/lib/lib/coopy/ordering.rb +1 -0
- data/lib/lib/coopy/report.rb +1 -0
- data/lib/lib/coopy/row.rb +1 -0
- data/lib/lib/coopy/simple_cell.rb +1 -0
- data/lib/lib/coopy/simple_table.rb +5 -0
- data/lib/lib/coopy/simple_view.rb +3 -3
- data/lib/lib/coopy/sparse_sheet.rb +1 -0
- data/lib/lib/coopy/table.rb +2 -0
- data/lib/lib/coopy/table_comparison_state.rb +1 -0
- data/lib/lib/coopy/table_diff.rb +235 -172
- data/lib/lib/coopy/table_io.rb +1 -0
- data/lib/lib/coopy/table_modifier.rb +1 -0
- data/lib/lib/coopy/table_text.rb +1 -0
- data/lib/lib/coopy/terminal_diff_render.rb +1 -0
- data/lib/lib/coopy/unit.rb +1 -0
- data/lib/lib/coopy/view.rb +1 -0
- data/lib/lib/coopy/viewed_datum.rb +1 -0
- data/lib/lib/coopy/viterbi.rb +2 -1
- data/lib/lib/coopy/workspace.rb +1 -0
- data/lib/lib/haxe/ds/int_map.rb +1 -0
- data/lib/lib/haxe/ds/string_map.rb +1 -0
- data/lib/lib/haxe/format/json_parser.rb +1 -0
- data/lib/lib/haxe/format/json_printer.rb +1 -0
- data/lib/lib/haxe/imap.rb +1 -0
- data/lib/lib/haxe/io/bytes.rb +1 -0
- data/lib/lib/haxe/io/bytes_buffer.rb +1 -0
- data/lib/lib/haxe/io/bytes_input.rb +1 -0
- data/lib/lib/haxe/io/bytes_output.rb +1 -0
- data/lib/lib/haxe/io/eof.rb +1 -0
- data/lib/lib/haxe/io/input.rb +1 -0
- data/lib/lib/haxe/io/output.rb +1 -0
- data/lib/lib/hx_overrides.rb +1 -0
- data/lib/lib/hx_sys.rb +66 -0
- data/lib/lib/lambda.rb +1 -0
- data/lib/lib/list.rb +1 -0
- data/lib/lib/rb/boot.rb +2 -5
- data/lib/lib/rb/ruby_iterator.rb +1 -0
- data/lib/lib/reflect.rb +1 -0
- data/lib/lib/string_buf.rb +1 -0
- data/lib/lib/sys/io/file_output.rb +1 -0
- data/lib/lib/sys/io/hx_file.rb +20 -0
- data/lib/lib/type.rb +1 -0
- data/lib/lib/x_list/list_iterator.rb +32 -0
- metadata +7 -2
data/lib/lib/coopy/index.rb
CHANGED
data/lib/lib/coopy/index_item.rb
CHANGED
data/lib/lib/coopy/index_pair.rb
CHANGED
data/lib/lib/coopy/merger.rb
CHANGED
data/lib/lib/coopy/mover.rb
CHANGED
data/lib/lib/coopy/ordering.rb
CHANGED
data/lib/lib/coopy/report.rb
CHANGED
data/lib/lib/coopy/row.rb
CHANGED
@@ -210,6 +210,10 @@ module Coopy
|
|
210
210
|
return true
|
211
211
|
end
|
212
212
|
|
213
|
+
def get_data
|
214
|
+
return nil
|
215
|
+
end
|
216
|
+
|
213
217
|
def SimpleTable.table_to_string(tab)
|
214
218
|
x = ""
|
215
219
|
begin
|
@@ -237,6 +241,7 @@ module Coopy
|
|
237
241
|
return x
|
238
242
|
end
|
239
243
|
|
244
|
+
haxe_me
|
240
245
|
end
|
241
246
|
|
242
247
|
end
|
data/lib/lib/coopy/table.rb
CHANGED
@@ -14,6 +14,8 @@ module Coopy
|
|
14
14
|
def trimBlank() puts "Abstract Table.trimBlank called" end
|
15
15
|
def get_width() puts "Abstract Table.get_width called" end
|
16
16
|
def get_height() puts "Abstract Table.get_height called" end
|
17
|
+
def getData() puts "Abstract Table.getData called" end
|
18
|
+
haxe_me
|
17
19
|
end
|
18
20
|
|
19
21
|
end
|
data/lib/lib/coopy/table_diff.rb
CHANGED
@@ -7,17 +7,21 @@ module Coopy
|
|
7
7
|
def initialize(align,flags)
|
8
8
|
@align = align
|
9
9
|
@flags = flags
|
10
|
+
@builder = nil
|
10
11
|
end
|
11
12
|
|
12
13
|
protected
|
13
14
|
|
14
15
|
attr_accessor :align
|
15
16
|
attr_accessor :flags
|
16
|
-
attr_accessor :
|
17
|
-
attr_accessor :r_prev
|
17
|
+
attr_accessor :builder
|
18
18
|
|
19
19
|
public
|
20
20
|
|
21
|
+
def set_cell_builder(builder)
|
22
|
+
@builder = builder
|
23
|
+
end
|
24
|
+
|
21
25
|
def get_separator(t,t2,root)
|
22
26
|
sep = root
|
23
27
|
w = t.get_width
|
@@ -173,25 +177,46 @@ module Coopy
|
|
173
177
|
end
|
174
178
|
end
|
175
179
|
|
176
|
-
def
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
180
|
+
def set_ignore(ignore,idx_ignore,tab,r_header)
|
181
|
+
v = tab.get_cell_view
|
182
|
+
if tab.get_height >= r_header
|
183
|
+
_g1 = 0
|
184
|
+
_g = tab.get_width
|
185
|
+
while(_g1 < _g)
|
186
|
+
i = _g1
|
187
|
+
_g1+=1
|
188
|
+
name = v.to_s(tab.get_cell(i,r_header))
|
189
|
+
next if !ignore.include?(name)
|
190
|
+
idx_ignore[i] = true
|
191
|
+
end
|
182
192
|
end
|
183
|
-
|
184
|
-
|
185
|
-
|
193
|
+
end
|
194
|
+
|
195
|
+
def count_active(active)
|
196
|
+
ct = 0
|
197
|
+
showed_dummy = false
|
198
|
+
begin
|
199
|
+
_g1 = 0
|
200
|
+
_g = active.length
|
201
|
+
while(_g1 < _g)
|
202
|
+
i = _g1
|
203
|
+
_g1+=1
|
204
|
+
publish = active[i] > 0
|
205
|
+
dummy = active[i] == 3
|
206
|
+
next if dummy && showed_dummy
|
207
|
+
next if !publish
|
208
|
+
showed_dummy = dummy
|
209
|
+
ct+=1
|
210
|
+
end
|
186
211
|
end
|
187
|
-
|
188
|
-
return txt
|
212
|
+
return ct
|
189
213
|
end
|
190
214
|
|
191
215
|
public
|
192
216
|
|
193
217
|
def hilite(output)
|
194
218
|
return false if !output.is_resizable
|
219
|
+
@builder = ::Coopy::FlatCellBuilder.new if @builder == nil
|
195
220
|
output.resize(0,0)
|
196
221
|
output.clear
|
197
222
|
row_map = {}
|
@@ -202,6 +227,7 @@ module Coopy
|
|
202
227
|
a = nil
|
203
228
|
b = nil
|
204
229
|
p = nil
|
230
|
+
rp_header = 0
|
205
231
|
ra_header = 0
|
206
232
|
rb_header = 0
|
207
233
|
is_index_p = {}
|
@@ -211,6 +237,7 @@ module Coopy
|
|
211
237
|
p = @align.get_source
|
212
238
|
a = @align.reference.get_target
|
213
239
|
b = @align.get_target
|
240
|
+
rp_header = @align.reference.meta.get_source_header
|
214
241
|
ra_header = @align.reference.meta.get_target_header
|
215
242
|
rb_header = @align.meta.get_target_header
|
216
243
|
if @align.get_index_columns != nil
|
@@ -237,7 +264,7 @@ module Coopy
|
|
237
264
|
a = @align.get_source
|
238
265
|
b = @align.get_target
|
239
266
|
p = a
|
240
|
-
ra_header = @align.meta.get_source_header
|
267
|
+
rp_header = ra_header = @align.meta.get_source_header
|
241
268
|
rb_header = @align.meta.get_target_header
|
242
269
|
if @align.get_index_columns != nil
|
243
270
|
_g3 = 0
|
@@ -252,6 +279,28 @@ module Coopy
|
|
252
279
|
end
|
253
280
|
column_order = @align.meta.to_order
|
254
281
|
column_units = column_order.get_list
|
282
|
+
p_ignore = {}
|
283
|
+
a_ignore = {}
|
284
|
+
b_ignore = {}
|
285
|
+
ignore = @flags.get_ignored_columns
|
286
|
+
if ignore != nil
|
287
|
+
self.set_ignore(ignore,p_ignore,p,rp_header)
|
288
|
+
self.set_ignore(ignore,a_ignore,a,ra_header)
|
289
|
+
self.set_ignore(ignore,b_ignore,b,rb_header)
|
290
|
+
ncolumn_units = Array.new
|
291
|
+
begin
|
292
|
+
_g13 = 0
|
293
|
+
_g4 = column_units.length
|
294
|
+
while(_g13 < _g4)
|
295
|
+
j = _g13
|
296
|
+
_g13+=1
|
297
|
+
cunit = column_units[j]
|
298
|
+
next if p_ignore.include?(cunit.p) || a_ignore.include?(cunit.l) || b_ignore.include?(cunit.r)
|
299
|
+
ncolumn_units.push(cunit)
|
300
|
+
end
|
301
|
+
end
|
302
|
+
column_units = ncolumn_units
|
303
|
+
end
|
255
304
|
show_rc_numbers = false
|
256
305
|
row_moves = nil
|
257
306
|
col_moves = nil
|
@@ -259,11 +308,11 @@ module Coopy
|
|
259
308
|
row_moves = {}
|
260
309
|
moves = ::Coopy::Mover.move_units(units)
|
261
310
|
begin
|
262
|
-
|
263
|
-
|
264
|
-
while(
|
265
|
-
i =
|
266
|
-
|
311
|
+
_g14 = 0
|
312
|
+
_g5 = moves.length
|
313
|
+
while(_g14 < _g5)
|
314
|
+
i = _g14
|
315
|
+
_g14+=1
|
267
316
|
begin
|
268
317
|
row_moves[moves[i]] = i
|
269
318
|
i
|
@@ -273,11 +322,11 @@ module Coopy
|
|
273
322
|
col_moves = {}
|
274
323
|
moves = ::Coopy::Mover.move_units(column_units)
|
275
324
|
begin
|
276
|
-
|
277
|
-
|
278
|
-
while(
|
279
|
-
i1 =
|
280
|
-
|
325
|
+
_g15 = 0
|
326
|
+
_g6 = moves.length
|
327
|
+
while(_g15 < _g6)
|
328
|
+
i1 = _g15
|
329
|
+
_g15+=1
|
281
330
|
begin
|
282
331
|
col_moves[moves[i1]] = i1
|
283
332
|
i1
|
@@ -288,11 +337,11 @@ module Coopy
|
|
288
337
|
active = Array.new
|
289
338
|
active_column = nil
|
290
339
|
if !@flags.show_unchanged
|
291
|
-
|
292
|
-
|
293
|
-
while(
|
294
|
-
i2 =
|
295
|
-
|
340
|
+
_g16 = 0
|
341
|
+
_g7 = units.length
|
342
|
+
while(_g16 < _g7)
|
343
|
+
i2 = _g16
|
344
|
+
_g16+=1
|
296
345
|
active[units.length - 1 - i2] = 0
|
297
346
|
end
|
298
347
|
end
|
@@ -302,11 +351,11 @@ module Coopy
|
|
302
351
|
if !@flags.show_unchanged_columns
|
303
352
|
active_column = Array.new
|
304
353
|
begin
|
305
|
-
|
306
|
-
|
307
|
-
while(
|
308
|
-
i3 =
|
309
|
-
|
354
|
+
_g17 = 0
|
355
|
+
_g8 = column_units.length
|
356
|
+
while(_g17 < _g8)
|
357
|
+
i3 = _g17
|
358
|
+
_g17+=1
|
310
359
|
v = 0
|
311
360
|
unit = column_units[i3]
|
312
361
|
v = 1 if unit.l >= 0 && is_index_a[unit.l]
|
@@ -316,54 +365,55 @@ module Coopy
|
|
316
365
|
end
|
317
366
|
end
|
318
367
|
end
|
368
|
+
v1 = a.get_cell_view
|
369
|
+
@builder.set_view(v1)
|
319
370
|
outer_reps_needed = nil
|
320
371
|
if @flags.show_unchanged && @flags.show_unchanged_columns
|
321
372
|
outer_reps_needed = 1
|
322
373
|
else
|
323
374
|
outer_reps_needed = 2
|
324
375
|
end
|
325
|
-
v1 = a.get_cell_view
|
326
376
|
sep = ""
|
327
377
|
conflict_sep = ""
|
328
378
|
schema = Array.new
|
329
379
|
have_schema = false
|
330
380
|
begin
|
331
|
-
|
332
|
-
|
333
|
-
while(
|
334
|
-
|
335
|
-
|
336
|
-
|
381
|
+
_g18 = 0
|
382
|
+
_g9 = column_units.length
|
383
|
+
while(_g18 < _g9)
|
384
|
+
j1 = _g18
|
385
|
+
_g18+=1
|
386
|
+
cunit1 = column_units[j1]
|
337
387
|
reordered = false
|
338
388
|
if @flags.ordered
|
339
|
-
reordered = true if col_moves.include?(
|
389
|
+
reordered = true if col_moves.include?(j1)
|
340
390
|
show_rc_numbers = true if reordered
|
341
391
|
end
|
342
392
|
act = ""
|
343
|
-
if
|
393
|
+
if cunit1.r >= 0 && cunit1.lp == -1
|
344
394
|
have_schema = true
|
345
395
|
act = "+++"
|
346
396
|
if active_column != nil
|
347
|
-
active_column[
|
397
|
+
active_column[j1] = 1 if allow_update
|
348
398
|
end
|
349
399
|
end
|
350
|
-
if
|
400
|
+
if cunit1.r < 0 && cunit1.lp >= 0
|
351
401
|
have_schema = true
|
352
402
|
act = "---"
|
353
403
|
if active_column != nil
|
354
|
-
active_column[
|
404
|
+
active_column[j1] = 1 if allow_update
|
355
405
|
end
|
356
406
|
end
|
357
|
-
if
|
358
|
-
if
|
359
|
-
|
360
|
-
bb = b.get_cell(
|
361
|
-
if !v1.equals(
|
407
|
+
if cunit1.r >= 0 && cunit1.lp >= 0
|
408
|
+
if p.get_height >= rp_header && b.get_height >= rb_header
|
409
|
+
pp = p.get_cell(cunit1.lp,rp_header)
|
410
|
+
bb = b.get_cell(cunit1.r,rb_header)
|
411
|
+
if !v1.equals(pp,bb)
|
362
412
|
have_schema = true
|
363
413
|
act = "("
|
364
|
-
act += v1.to_s(
|
414
|
+
act += v1.to_s(pp)
|
365
415
|
act += ")"
|
366
|
-
active_column[
|
416
|
+
active_column[j1] = 1 if active_column != nil
|
367
417
|
end
|
368
418
|
end
|
369
419
|
end
|
@@ -378,14 +428,14 @@ module Coopy
|
|
378
428
|
if have_schema
|
379
429
|
at = output.get_height
|
380
430
|
output.resize(column_units.length + 1,at + 1)
|
381
|
-
output.set_cell(0,at
|
431
|
+
output.set_cell(0,at,@builder.marker("!"))
|
382
432
|
begin
|
383
|
-
|
384
|
-
|
385
|
-
while(
|
386
|
-
|
387
|
-
|
388
|
-
output.set_cell(
|
433
|
+
_g19 = 0
|
434
|
+
_g10 = column_units.length
|
435
|
+
while(_g19 < _g10)
|
436
|
+
j2 = _g19
|
437
|
+
_g19+=1
|
438
|
+
output.set_cell(j2 + 1,at,v1.to_datum(schema[j2]))
|
389
439
|
end
|
390
440
|
end
|
391
441
|
end
|
@@ -393,51 +443,57 @@ module Coopy
|
|
393
443
|
if @flags.always_show_header
|
394
444
|
at1 = output.get_height
|
395
445
|
output.resize(column_units.length + 1,at1 + 1)
|
396
|
-
output.set_cell(0,at1
|
446
|
+
output.set_cell(0,at1,@builder.marker("@@"))
|
397
447
|
begin
|
398
|
-
|
399
|
-
|
400
|
-
while(
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
if
|
405
|
-
output.set_cell(
|
406
|
-
elsif
|
407
|
-
output.set_cell(
|
448
|
+
_g110 = 0
|
449
|
+
_g20 = column_units.length
|
450
|
+
while(_g110 < _g20)
|
451
|
+
j3 = _g110
|
452
|
+
_g110+=1
|
453
|
+
cunit2 = column_units[j3]
|
454
|
+
if cunit2.r >= 0
|
455
|
+
output.set_cell(j3 + 1,at1,b.get_cell(cunit2.r,rb_header)) if b.get_height > 0
|
456
|
+
elsif cunit2.lp >= 0
|
457
|
+
output.set_cell(j3 + 1,at1,p.get_cell(cunit2.lp,rp_header)) if p.get_height > 0
|
408
458
|
end
|
409
|
-
col_map[
|
459
|
+
col_map[j3 + 1] = cunit2
|
410
460
|
end
|
411
461
|
end
|
412
462
|
top_line_done = true
|
413
463
|
end
|
464
|
+
output_height = output.get_height
|
465
|
+
output_height_init = output.get_height
|
414
466
|
begin
|
415
|
-
|
416
|
-
while(
|
417
|
-
out =
|
418
|
-
|
467
|
+
_g21 = 0
|
468
|
+
while(_g21 < outer_reps_needed)
|
469
|
+
out = _g21
|
470
|
+
_g21+=1
|
419
471
|
if out == 1
|
420
472
|
self.spread_context(units,@flags.unchanged_context,active)
|
421
473
|
self.spread_context(column_units,@flags.unchanged_column_context,active_column)
|
422
474
|
if active_column != nil
|
423
|
-
|
424
|
-
|
425
|
-
while(
|
426
|
-
i4 =
|
427
|
-
|
475
|
+
_g22 = 0
|
476
|
+
_g111 = column_units.length
|
477
|
+
while(_g22 < _g111)
|
478
|
+
i4 = _g22
|
479
|
+
_g22+=1
|
428
480
|
active_column[i4] = 0 if active_column[i4] == 3
|
429
481
|
end
|
430
482
|
end
|
483
|
+
rows = self.count_active(active) + output_height_init
|
484
|
+
rows-=1 if top_line_done
|
485
|
+
output_height = output_height_init
|
486
|
+
output.resize(column_units.length + 1,rows) if rows > output.get_height
|
431
487
|
end
|
432
488
|
showed_dummy = false
|
433
489
|
l = -1
|
434
490
|
r = -1
|
435
491
|
begin
|
436
|
-
|
437
|
-
|
438
|
-
while(
|
439
|
-
i5 =
|
440
|
-
|
492
|
+
_g23 = 0
|
493
|
+
_g112 = units.length
|
494
|
+
while(_g23 < _g112)
|
495
|
+
i5 = _g23
|
496
|
+
_g23+=1
|
441
497
|
unit1 = units[i5]
|
442
498
|
reordered1 = false
|
443
499
|
if @flags.ordered
|
@@ -457,19 +513,22 @@ module Coopy
|
|
457
513
|
next if !publish
|
458
514
|
end
|
459
515
|
showed_dummy = false if !dummy
|
460
|
-
at2 =
|
461
|
-
|
516
|
+
at2 = output_height
|
517
|
+
if publish
|
518
|
+
output_height+=1
|
519
|
+
output.resize(column_units.length + 1,output_height) if output.get_height < output_height
|
520
|
+
end
|
462
521
|
if dummy
|
463
522
|
begin
|
464
523
|
_g41 = 0
|
465
524
|
_g31 = column_units.length + 1
|
466
525
|
while(_g41 < _g31)
|
467
|
-
|
526
|
+
j4 = _g41
|
468
527
|
_g41+=1
|
469
|
-
output.set_cell(
|
470
|
-
showed_dummy = true
|
528
|
+
output.set_cell(j4,at2,v1.to_datum("..."))
|
471
529
|
end
|
472
530
|
end
|
531
|
+
showed_dummy = true
|
473
532
|
next
|
474
533
|
end
|
475
534
|
have_addition = false
|
@@ -492,10 +551,10 @@ module Coopy
|
|
492
551
|
_g42 = 0
|
493
552
|
_g32 = column_units.length
|
494
553
|
while(_g42 < _g32)
|
495
|
-
|
554
|
+
j5 = _g42
|
496
555
|
_g42+=1
|
497
|
-
|
498
|
-
|
556
|
+
cunit3 = column_units[j5]
|
557
|
+
pp1 = nil
|
499
558
|
ll = nil
|
500
559
|
rr = nil
|
501
560
|
dd = nil
|
@@ -506,18 +565,18 @@ module Coopy
|
|
506
565
|
have_pp = false
|
507
566
|
have_ll = false
|
508
567
|
have_rr = false
|
509
|
-
if
|
510
|
-
|
568
|
+
if cunit3.p >= 0 && unit1.p >= 0
|
569
|
+
pp1 = p.get_cell(cunit3.p,unit1.p)
|
511
570
|
have_pp = true
|
512
571
|
end
|
513
|
-
if
|
514
|
-
ll = a.get_cell(
|
572
|
+
if cunit3.l >= 0 && unit1.l >= 0
|
573
|
+
ll = a.get_cell(cunit3.l,unit1.l)
|
515
574
|
have_ll = true
|
516
575
|
end
|
517
|
-
if
|
518
|
-
rr = b.get_cell(
|
576
|
+
if cunit3.r >= 0 && unit1.r >= 0
|
577
|
+
rr = b.get_cell(cunit3.r,unit1.r)
|
519
578
|
have_rr = true
|
520
|
-
if (((have_pp) ?
|
579
|
+
if (((have_pp) ? cunit3.p : cunit3.l)) < 0
|
521
580
|
if rr != nil
|
522
581
|
if v1.to_s(rr) != ""
|
523
582
|
have_addition = true if @flags.allow_update
|
@@ -527,15 +586,15 @@ module Coopy
|
|
527
586
|
end
|
528
587
|
if have_pp
|
529
588
|
if !have_rr
|
530
|
-
dd =
|
531
|
-
elsif v1.equals(
|
532
|
-
dd =
|
589
|
+
dd = pp1
|
590
|
+
elsif v1.equals(pp1,rr)
|
591
|
+
dd = pp1
|
533
592
|
else
|
534
|
-
dd =
|
593
|
+
dd = pp1
|
535
594
|
dd_to = rr
|
536
595
|
have_dd_to = true
|
537
|
-
if !v1.equals(
|
538
|
-
if !v1.equals(
|
596
|
+
if !v1.equals(pp1,ll)
|
597
|
+
if !v1.equals(pp1,rr)
|
539
598
|
dd_to_alt = ll
|
540
599
|
have_dd_to_alt = true
|
541
600
|
end
|
@@ -554,43 +613,50 @@ module Coopy
|
|
554
613
|
else
|
555
614
|
dd = rr
|
556
615
|
end
|
557
|
-
|
616
|
+
cell = dd
|
558
617
|
if have_dd_to && allow_update
|
559
|
-
active_column[
|
560
|
-
|
561
|
-
|
618
|
+
active_column[j5] = 1 if active_column != nil
|
619
|
+
if sep == ""
|
620
|
+
if @builder.need_separator
|
621
|
+
sep = self.get_separator(a,b,"->")
|
622
|
+
@builder.set_separator(sep)
|
623
|
+
else
|
624
|
+
sep = "->"
|
625
|
+
end
|
626
|
+
end
|
562
627
|
is_conflict = false
|
563
628
|
if have_dd_to_alt
|
564
629
|
is_conflict = true if !v1.equals(dd_to,dd_to_alt)
|
565
630
|
end
|
566
631
|
if !is_conflict
|
567
|
-
|
632
|
+
cell = @builder.update(dd,dd_to)
|
568
633
|
act1 = sep if sep.length > act1.length
|
569
634
|
else
|
570
|
-
|
571
|
-
|
635
|
+
if conflict_sep == ""
|
636
|
+
if @builder.need_separator
|
637
|
+
conflict_sep = _hx_str(self.get_separator(p,a,"!")) + _hx_str(sep)
|
638
|
+
@builder.set_conflict_separator(conflict_sep)
|
639
|
+
else
|
640
|
+
conflict_sep = "!->"
|
641
|
+
end
|
642
|
+
end
|
643
|
+
cell = @builder.conflict(dd,dd_to_alt,dd_to)
|
572
644
|
act1 = conflict_sep
|
573
645
|
end
|
574
646
|
end
|
575
647
|
act1 = "+" if act1 == "" && have_addition
|
576
648
|
if act1 == "+++"
|
577
649
|
if have_rr
|
578
|
-
active_column[
|
650
|
+
active_column[j5] = 1 if active_column != nil
|
579
651
|
end
|
580
652
|
end
|
581
653
|
if publish
|
582
|
-
if active_column == nil || active_column[
|
583
|
-
if txt != nil
|
584
|
-
output.set_cell(j4 + 1,at2,v1.to_datum(txt))
|
585
|
-
else
|
586
|
-
output.set_cell(j4 + 1,at2,dd)
|
587
|
-
end
|
588
|
-
end
|
654
|
+
output.set_cell(j5 + 1,at2,cell) if active_column == nil || active_column[j5] > 0
|
589
655
|
end
|
590
656
|
end
|
591
657
|
end
|
592
658
|
if publish
|
593
|
-
output.set_cell(0,at2
|
659
|
+
output.set_cell(0,at2,@builder.marker(act1))
|
594
660
|
row_map[at2] = unit1
|
595
661
|
end
|
596
662
|
if act1 != ""
|
@@ -615,62 +681,58 @@ module Coopy
|
|
615
681
|
admin_w+=1
|
616
682
|
target = Array.new
|
617
683
|
begin
|
618
|
-
|
619
|
-
|
620
|
-
while(
|
621
|
-
i6 =
|
622
|
-
|
684
|
+
_g113 = 0
|
685
|
+
_g24 = output.get_width
|
686
|
+
while(_g113 < _g24)
|
687
|
+
i6 = _g113
|
688
|
+
_g113+=1
|
623
689
|
target.push(i6 + 1)
|
624
690
|
end
|
625
691
|
end
|
626
692
|
output.insert_or_delete_columns(target,output.get_width + 1)
|
627
|
-
@l_prev = -1
|
628
|
-
@r_prev = -1
|
629
693
|
begin
|
630
|
-
|
631
|
-
|
632
|
-
while(
|
633
|
-
i7 =
|
634
|
-
|
694
|
+
_g114 = 0
|
695
|
+
_g25 = output.get_height
|
696
|
+
while(_g114 < _g25)
|
697
|
+
i7 = _g114
|
698
|
+
_g114+=1
|
635
699
|
unit2 = row_map[i7]
|
636
700
|
next if unit2 == nil
|
637
|
-
output.set_cell(0,i7
|
701
|
+
output.set_cell(0,i7,@builder.links(unit2))
|
638
702
|
end
|
639
703
|
end
|
640
704
|
target = Array.new
|
641
705
|
begin
|
642
|
-
|
643
|
-
|
644
|
-
while(
|
645
|
-
i8 =
|
646
|
-
|
706
|
+
_g115 = 0
|
707
|
+
_g26 = output.get_height
|
708
|
+
while(_g115 < _g26)
|
709
|
+
i8 = _g115
|
710
|
+
_g115+=1
|
647
711
|
target.push(i8 + 1)
|
648
712
|
end
|
649
713
|
end
|
650
714
|
output.insert_or_delete_rows(target,output.get_height + 1)
|
651
|
-
@l_prev = -1
|
652
|
-
@r_prev = -1
|
653
715
|
begin
|
654
|
-
|
655
|
-
|
656
|
-
while(
|
657
|
-
i9 =
|
658
|
-
|
716
|
+
_g116 = 1
|
717
|
+
_g27 = output.get_width
|
718
|
+
while(_g116 < _g27)
|
719
|
+
i9 = _g116
|
720
|
+
_g116+=1
|
659
721
|
unit3 = col_map[i9 - 1]
|
660
722
|
next if unit3 == nil
|
661
|
-
output.set_cell(i9,0
|
723
|
+
output.set_cell(i9,0,@builder.links(unit3))
|
662
724
|
end
|
663
725
|
end
|
664
|
-
output.set_cell(0,0
|
726
|
+
output.set_cell(0,0,@builder.marker("@:@"))
|
665
727
|
end
|
666
728
|
if active_column != nil
|
667
729
|
all_active = true
|
668
730
|
begin
|
669
|
-
|
670
|
-
|
671
|
-
while(
|
672
|
-
i10 =
|
673
|
-
|
731
|
+
_g117 = 0
|
732
|
+
_g28 = active_column.length
|
733
|
+
while(_g117 < _g28)
|
734
|
+
i10 = _g117
|
735
|
+
_g117+=1
|
674
736
|
if active_column[i10] == 0
|
675
737
|
all_active = false
|
676
738
|
break
|
@@ -680,10 +742,10 @@ module Coopy
|
|
680
742
|
if !all_active
|
681
743
|
fate = Array.new
|
682
744
|
begin
|
683
|
-
|
684
|
-
while(
|
685
|
-
i11 =
|
686
|
-
|
745
|
+
_g29 = 0
|
746
|
+
while(_g29 < admin_w)
|
747
|
+
i11 = _g29
|
748
|
+
_g29+=1
|
687
749
|
fate.push(i11)
|
688
750
|
end
|
689
751
|
end
|
@@ -691,11 +753,11 @@ module Coopy
|
|
691
753
|
ct = 0
|
692
754
|
dots = Array.new
|
693
755
|
begin
|
694
|
-
|
695
|
-
|
696
|
-
while(
|
697
|
-
i12 =
|
698
|
-
|
756
|
+
_g118 = 0
|
757
|
+
_g30 = active_column.length
|
758
|
+
while(_g118 < _g30)
|
759
|
+
i12 = _g118
|
760
|
+
_g118+=1
|
699
761
|
off = active_column[i12] == 0
|
700
762
|
if off
|
701
763
|
ct = ct + 1
|
@@ -713,17 +775,17 @@ module Coopy
|
|
713
775
|
end
|
714
776
|
output.insert_or_delete_columns(fate,at3)
|
715
777
|
begin
|
716
|
-
|
717
|
-
while(
|
718
|
-
d = dots[
|
719
|
-
|
778
|
+
_g33 = 0
|
779
|
+
while(_g33 < dots.length)
|
780
|
+
d = dots[_g33]
|
781
|
+
_g33+=1
|
720
782
|
begin
|
721
783
|
_g210 = 0
|
722
|
-
|
723
|
-
while(_g210 <
|
724
|
-
|
784
|
+
_g119 = output.get_height
|
785
|
+
while(_g210 < _g119)
|
786
|
+
j6 = _g210
|
725
787
|
_g210+=1
|
726
|
-
output.set_cell(d,
|
788
|
+
output.set_cell(d,j6,@builder.marker("..."))
|
727
789
|
end
|
728
790
|
end
|
729
791
|
end
|
@@ -733,6 +795,7 @@ module Coopy
|
|
733
795
|
return true
|
734
796
|
end
|
735
797
|
|
798
|
+
haxe_me
|
736
799
|
end
|
737
800
|
|
738
801
|
end
|