@@ -278,10 +278,10 @@ int xdl_recs_cmp(xdfile_t *xdf1, long off1, long lim1,
278
278
*/
279
279
if (off1 == lim1 ) {
280
280
for (; off2 < lim2 ; off2 ++ )
281
- xdf2 -> rchg [xdf2 -> rindex [off2 ]] = 1 ;
281
+ xdf2 -> changed [xdf2 -> rindex [off2 ]] = 1 ;
282
282
} else if (off2 == lim2 ) {
283
283
for (; off1 < lim1 ; off1 ++ )
284
- xdf1 -> rchg [xdf1 -> rindex [off1 ]] = 1 ;
284
+ xdf1 -> changed [xdf1 -> rindex [off1 ]] = 1 ;
285
285
} else {
286
286
xdpsplit_t spl ;
287
287
spl .i1 = spl .i2 = 0 ;
@@ -708,7 +708,7 @@ struct xdlgroup {
708
708
static void group_init (xdfile_t * xdf , struct xdlgroup * g )
709
709
{
710
710
g -> start = g -> end = 0 ;
711
- while (xdf -> rchg [g -> end ])
711
+ while (xdf -> changed [g -> end ])
712
712
g -> end ++ ;
713
713
}
714
714
@@ -722,7 +722,7 @@ static inline int group_next(xdfile_t *xdf, struct xdlgroup *g)
722
722
return -1 ;
723
723
724
724
g -> start = g -> end + 1 ;
725
- for (g -> end = g -> start ; xdf -> rchg [g -> end ]; g -> end ++ )
725
+ for (g -> end = g -> start ; xdf -> changed [g -> end ]; g -> end ++ )
726
726
;
727
727
728
728
return 0 ;
@@ -738,7 +738,7 @@ static inline int group_previous(xdfile_t *xdf, struct xdlgroup *g)
738
738
return -1 ;
739
739
740
740
g -> end = g -> start - 1 ;
741
- for (g -> start = g -> end ; xdf -> rchg [g -> start - 1 ]; g -> start -- )
741
+ for (g -> start = g -> end ; xdf -> changed [g -> start - 1 ]; g -> start -- )
742
742
;
743
743
744
744
return 0 ;
@@ -753,10 +753,10 @@ static int group_slide_down(xdfile_t *xdf, struct xdlgroup *g)
753
753
{
754
754
if (g -> end < xdf -> nrec &&
755
755
recs_match (& xdf -> recs [g -> start ], & xdf -> recs [g -> end ])) {
756
- xdf -> rchg [g -> start ++ ] = 0 ;
757
- xdf -> rchg [g -> end ++ ] = 1 ;
756
+ xdf -> changed [g -> start ++ ] = 0 ;
757
+ xdf -> changed [g -> end ++ ] = 1 ;
758
758
759
- while (xdf -> rchg [g -> end ])
759
+ while (xdf -> changed [g -> end ])
760
760
g -> end ++ ;
761
761
762
762
return 0 ;
@@ -774,10 +774,10 @@ static int group_slide_up(xdfile_t *xdf, struct xdlgroup *g)
774
774
{
775
775
if (g -> start > 0 &&
776
776
recs_match (& xdf -> recs [g -> start - 1 ], & xdf -> recs [g -> end - 1 ])) {
777
- xdf -> rchg [-- g -> start ] = 1 ;
778
- xdf -> rchg [-- g -> end ] = 0 ;
777
+ xdf -> changed [-- g -> start ] = 1 ;
778
+ xdf -> changed [-- g -> end ] = 0 ;
779
779
780
- while (xdf -> rchg [g -> start - 1 ])
780
+ while (xdf -> changed [g -> start - 1 ])
781
781
g -> start -- ;
782
782
783
783
return 0 ;
@@ -932,16 +932,16 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
932
932
933
933
int xdl_build_script (xdfenv_t * xe , xdchange_t * * xscr ) {
934
934
xdchange_t * cscr = NULL , * xch ;
935
- char * rchg1 = xe -> xdf1 .rchg , * rchg2 = xe -> xdf2 .rchg ;
935
+ char * changed1 = xe -> xdf1 .changed , * changed2 = xe -> xdf2 .changed ;
936
936
long i1 , i2 , l1 , l2 ;
937
937
938
938
/*
939
939
* Trivial. Collects "groups" of changes and creates an edit script.
940
940
*/
941
941
for (i1 = xe -> xdf1 .nrec , i2 = xe -> xdf2 .nrec ; i1 >= 0 || i2 >= 0 ; i1 -- , i2 -- )
942
- if (rchg1 [i1 - 1 ] || rchg2 [i2 - 1 ]) {
943
- for (l1 = i1 ; rchg1 [i1 - 1 ]; i1 -- );
944
- for (l2 = i2 ; rchg2 [i2 - 1 ]; i2 -- );
942
+ if (changed1 [i1 - 1 ] || changed2 [i2 - 1 ]) {
943
+ for (l1 = i1 ; changed1 [i1 - 1 ]; i1 -- );
944
+ for (l2 = i2 ; changed2 [i2 - 1 ]; i2 -- );
945
945
946
946
if (!(xch = xdl_add_change (cscr , i1 , i2 , l1 - i1 , l2 - i2 ))) {
947
947
xdl_free_script (cscr );
0 commit comments