mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-27 07:46:33 +00:00
Make new Diff Flag DF_KEEP_FLAGS, use in Diff.
Diff will now check the passed df_flags for the DF_KEEP_FLAGS bit, and if found it will NOT and-equals the flags with DF_ABORT_ALL_FILES, which means that automated Diff utilities can be more easily written, without breaking the manual pop-up window Diff Merge workflow functionality.
This commit is contained in:
parent
4a4e7a20fb
commit
d95f3b285b
1 changed files with 3 additions and 7 deletions
|
@ -36,6 +36,7 @@ I64 DiffEntriesCompare(CDocEntry *doc_e1, CDocEntry *doc_e2)
|
||||||
#define DF_ABORT_FILE 0x10
|
#define DF_ABORT_FILE 0x10
|
||||||
#define DF_ABORT_ALL_FILES 0x20
|
#define DF_ABORT_ALL_FILES 0x20
|
||||||
#define DF_NO_MORE_PROMPTS_THIS_FILE 0x40
|
#define DF_NO_MORE_PROMPTS_THIS_FILE 0x40
|
||||||
|
#define DF_KEEP_FLAGS 0x80 // tells Diff NOT to &= with abort-all flag at call start
|
||||||
|
|
||||||
U0 DiffSel(CDoc *doc, I64 *_df_flags, I64 j1_lo, I64 j1_hi, I64 j2_lo, I64 j2_hi, I64 count1, I64 count2,
|
U0 DiffSel(CDoc *doc, I64 *_df_flags, I64 j1_lo, I64 j1_hi, I64 j2_lo, I64 j2_hi, I64 count1, I64 count2,
|
||||||
CDocEntry **doc_unsorted1, CDocEntry **doc_unsorted2)
|
CDocEntry **doc_unsorted1, CDocEntry **doc_unsorted2)
|
||||||
|
@ -277,13 +278,8 @@ public Bool Diff(U8 *dst_file, U8 *src_file, I64 *_df_flags=NULL)
|
||||||
else
|
else
|
||||||
df_flags = 0;
|
df_flags = 0;
|
||||||
|
|
||||||
// df_flags &= DF_ABORT_ALL_FILES; // This line removes ALL df_flags values passed to this function,
|
if (!(df_flags & DF_KEEP_FLAGS))
|
||||||
// while also setting df_flags to DF_ABORT_ALL_FILES
|
df_flags &= DF_ABORT_ALL_FILES;
|
||||||
// if it somehow got passed with a value of DF_ABORT_ALL_FILES.
|
|
||||||
// ... this seems counterproductive, and makes utilizing Diff with df_flags
|
|
||||||
// very difficult... Changing this to instead !! UN-SET !! DF_ABORT_ALL_FILES,
|
|
||||||
// which is what I can only guess was the intended behaviour here? ........
|
|
||||||
df_flags &= ~(DF_ABORT_ALL_FILES);
|
|
||||||
|
|
||||||
doc_e = doc1->head.next;
|
doc_e = doc1->head.next;
|
||||||
while (doc_e != doc1)
|
while (doc_e != doc1)
|
||||||
|
|
Loading…
Reference in a new issue