-static unsigned long line_common_diff(struct sline *sline, unsigned long all_mask)
-{
- /*
- * Look at the line and see from which parents we have the
- * same difference.
- */
-
- /* Lower bits of sline->flag records if the parent had this
- * line, so XOR with all_mask gives us on-bits for parents we
- * have differences with.
- */
- unsigned long common_adds = (sline->flag ^ all_mask) & all_mask;
- unsigned long common_removes = all_mask;
-
- /* If all the parents have this line, that also counts as
- * having the same difference.
- */
- if (!common_adds)
- common_adds = all_mask;
-
- if (sline->lost_head) {
- /* Lost head list records the lines removed from
- * the parents, and parent_map records from which
- * parent the line was removed.
- */
- struct lline *ll;
- for (ll = sline->lost_head; ll; ll = ll->next) {
- common_removes &= ll->parent_map;
- }
- }
- return common_adds & common_removes;
-}
-
-static unsigned long line_all_diff(struct sline *sline, unsigned long all_mask)
-{
- /*
- * Look at the line and see from which parents we have some difference.
- */
- unsigned long different = (sline->flag ^ all_mask) & all_mask;
- if (sline->lost_head) {
- /* Lost head list records the lines removed from
- * the parents, and parent_map records from which
- * parent the line was removed.
- */
- struct lline *ll;
- for (ll = sline->lost_head; ll; ll = ll->next) {
- different |= ll->parent_map;
- }
- }
- return different;
-}
-