debug_msg (MAIN, 3, "Printing\n\n");
org_document_print (anc, &print_ctxt, out);
+ exit_status = (print_ctxt.conflict_occurred ? -1 : exit_status);
+
fclose (rem_file);
}
else
#include "print_ctxt.h"
#include "print.h"
-static const char *start_mark = ">>> ";
-static const char *middle_mark = "=== ";
-static const char *end_mark = "<<< ";
+static const char *start_mark = ">>>>>>> ";
+static const char *middle_mark = "======= ";
+static const char *end_mark = "<<<<<<< ";
void
enter_structural_conflict (print_ctxt *ctxt, conflict_state state,
else
return;
+ if (state != no_conflict)
+ ctxt->conflict_occurred = true;
+
while (ctxt->structure_conflict != state )
{
/*conflict wrap up */
if (ctxt->content_conflict == state)
return;
+ if (state != no_conflict)
+ ctxt->conflict_occurred = true;
+
while ( ctxt->content_conflict != state )
{
/*conflict wrap up */
ctxt->nested_conflicts = no_conflict;
ctxt->structure_conflict = no_conflict;
ctxt->content_conflict = no_conflict;
+ ctxt->conflict_occurred = false;
return;
}
bool nested_conflicts; /*< if there are nested conflicts */
conflict_state structure_conflict; /*< the current state of conflicts */
conflict_state content_conflict; /*< the current state of conflicts */
+ bool conflict_occurred; /* IF a conflict occured */
} print_ctxt;
/**