patch 8.1.2389: using old C style comments

Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
diff --git a/src/xdiff/xdiff.h b/src/xdiff/xdiff.h
index 783dc9d..3dc9520 100644
--- a/src/xdiff/xdiff.h
+++ b/src/xdiff/xdiff.h
@@ -25,9 +25,9 @@
 
 #ifdef __cplusplus
 extern "C" {
-#endif /* #ifdef __cplusplus */
+#endif // #ifdef __cplusplus
 
-/* xpparm_t.flags */
+// xpparm_t.flags
 #define XDF_NEED_MINIMAL (1 << 0)
 
 #define XDF_IGNORE_WHITESPACE (1 << 1)
@@ -48,22 +48,22 @@
 
 #define XDF_INDENT_HEURISTIC (1 << 23)
 
-/* xdemitconf_t.flags */
+// xdemitconf_t.flags
 #define XDL_EMIT_FUNCNAMES (1 << 0)
 #define XDL_EMIT_FUNCCONTEXT (1 << 2)
 
-/* merge simplification levels */
+// merge simplification levels
 #define XDL_MERGE_MINIMAL 0
 #define XDL_MERGE_EAGER 1
 #define XDL_MERGE_ZEALOUS 2
 #define XDL_MERGE_ZEALOUS_ALNUM 3
 
-/* merge favor modes */
+// merge favor modes
 #define XDL_MERGE_FAVOR_OURS 1
 #define XDL_MERGE_FAVOR_THEIRS 2
 #define XDL_MERGE_FAVOR_UNION 3
 
-/* merge output styles */
+// merge output styles
 #define XDL_MERGE_DIFF3 1
 
 typedef struct s_mmfile {
@@ -79,7 +79,7 @@
 typedef struct s_xpparam {
 	unsigned long flags;
 
-	/* See Documentation/diff-options.txt. */
+	// See Documentation/diff-options.txt.
 	char **anchors;
 	size_t anchors_nr;
 } xpparam_t;
@@ -130,9 +130,9 @@
 	int level;
 	int favor;
 	int style;
-	const char *ancestor;	/* label for orig */
-	const char *file1;	/* label for mf1 */
-	const char *file2;	/* label for mf2 */
+	const char *ancestor;	// label for orig
+	const char *file1;	// label for mf1
+	const char *file2;	// label for mf2
 } xmparam_t;
 
 #define DEFAULT_CONFLICT_MARKER_SIZE 7
@@ -142,6 +142,6 @@
 
 #ifdef __cplusplus
 }
-#endif /* #ifdef __cplusplus */
+#endif // #ifdef __cplusplus
 
-#endif /* #if !defined(XDIFF_H) */
+#endif // #if !defined(XDIFF_H)
diff --git a/src/xdiff/xdiffi.c b/src/xdiff/xdiffi.c
index 96d5277..3806903 100644
--- a/src/xdiff/xdiffi.c
+++ b/src/xdiff/xdiffi.c
@@ -418,24 +418,24 @@
 			ret += 1;
 		else if (c == '\t')
 			ret += 8 - ret % 8;
-		/* ignore other whitespace characters */
+		// ignore other whitespace characters
 
 		if (ret >= MAX_INDENT)
 			return MAX_INDENT;
 	}
 
-	/* The line contains only whitespace. */
+	// The line contains only whitespace.
 	return -1;
 }
 
 /*
- * If more than this number of consecutive blank rows are found, just return this
- * value. This avoids requiring O(N^2) work for pathological cases, and also
- * ensures that the output of score_split fits in an int.
+ * If more than this number of consecutive blank rows are found, just return
+ * this value. This avoids requiring O(N^2) work for pathological cases, and
+ * also ensures that the output of score_split fits in an int.
  */
 #define MAX_BLANKS 20
 
-/* Characteristics measured about a hypothetical split position. */
+// Characteristics measured about a hypothetical split position.
 struct split_measurement {
 	/*
 	 * Is the split at the end of the file (aside from any blank lines)?
@@ -472,10 +472,10 @@
 };
 
 struct split_score {
-	/* The effective indent of this split (smaller is preferred). */
+	// The effective indent of this split (smaller is preferred).
 	int effective_indent;
 
-	/* Penalty for this split (smaller is preferred). */
+	// Penalty for this split (smaller is preferred).
 	int penalty;
 };
 
@@ -534,16 +534,16 @@
  * integer math.
  */
 
-/* Penalty if there are no non-blank lines before the split */
+// Penalty if there are no non-blank lines before the split
 #define START_OF_FILE_PENALTY 1
 
-/* Penalty if there are no non-blank lines after the split */
+// Penalty if there are no non-blank lines after the split
 #define END_OF_FILE_PENALTY 21
 
-/* Multiplier for the number of blank lines around the split */
+// Multiplier for the number of blank lines around the split
 #define TOTAL_BLANK_WEIGHT (-30)
 
-/* Multiplier for the number of blank lines after the split */
+// Multiplier for the number of blank lines after the split
 #define POST_BLANK_WEIGHT 6
 
 /*
@@ -610,7 +610,7 @@
 	post_blank = (m->indent == -1) ? 1 + m->post_blank : 0;
 	total_blank = m->pre_blank + post_blank;
 
-	/* Penalties based on nearby blank lines: */
+	// Penalties based on nearby blank lines:
 	s->penalty += TOTAL_BLANK_WEIGHT * total_blank;
 	s->penalty += POST_BLANK_WEIGHT * post_blank;
 
@@ -621,13 +621,13 @@
 
 	any_blanks = (total_blank != 0);
 
-	/* Note that the effective indent is -1 at the end of the file: */
+	// Note that the effective indent is -1 at the end of the file:
 	s->effective_indent += indent;
 
 	if (indent == -1) {
-		/* No additional adjustments needed. */
+		// No additional adjustments needed.
 	} else if (m->pre_indent == -1) {
-		/* No additional adjustments needed. */
+		// No additional adjustments needed.
 	} else if (indent > m->pre_indent) {
 		/*
 		 * The line is indented more than its predecessor.
@@ -669,7 +669,7 @@
 
 static int score_cmp(struct split_score *s1, struct split_score *s2)
 {
-	/* -1 if s1.effective_indent < s2->effective_indent, etc. */
+	// -1 if s1.effective_indent < s2->effective_indent, etc.
 	int cmp_indents = ((s1->effective_indent > s2->effective_indent) -
 			   (s1->effective_indent < s2->effective_indent));
 
@@ -809,7 +809,7 @@
 	group_init(xdfo, &go);
 
 	while (1) {
-		/* If the group is empty in the to-be-compacted file, skip it: */
+		// If the group is empty in the to-be-compacted file, skip it:
 		if (g.end == g.start)
 			goto next;
 
@@ -828,7 +828,7 @@
 			 */
 			end_matching_other = -1;
 
-			/* Shift the group backward as much as possible: */
+			// Shift the group backward as much as possible:
 			while (!group_slide_up(xdf, &g, flags))
 				if (group_previous(xdfo, &go))
 					xdl_bug("group sync broken sliding up");
@@ -842,7 +842,7 @@
 			if (go.end > go.start)
 				end_matching_other = g.end;
 
-			/* Now shift the group forward as far as possible: */
+			// Now shift the group forward as far as possible:
 			while (1) {
 				if (group_slide_down(xdf, &g, flags))
 					break;
@@ -863,7 +863,7 @@
 		 */
 
 		if (g.end == earliest_end) {
-			/* no shifting was possible */
+			// no shifting was possible
 		} else if (end_matching_other != -1) {
 			/*
 			 * Move the possibly merged group of changes back to line
@@ -921,7 +921,7 @@
 		}
 
 	next:
-		/* Move past the just-processed group: */
+		// Move past the just-processed group:
 		if (group_next(xdf, &g))
 			break;
 		if (group_next(xdfo, &go))
diff --git a/src/xdiff/xdiffi.h b/src/xdiff/xdiffi.h
index 8f1c7c8..467a1e8 100644
--- a/src/xdiff/xdiffi.h
+++ b/src/xdiff/xdiffi.h
@@ -61,4 +61,4 @@
 int xdl_do_histogram_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
 		xdfenv_t *env);
 
-#endif /* #if !defined(XDIFFI_H) */
+#endif // #if !defined(XDIFFI_H)
diff --git a/src/xdiff/xemit.c b/src/xdiff/xemit.c
index d8a6f1e..f1a4513 100644
--- a/src/xdiff/xemit.c
+++ b/src/xdiff/xemit.c
@@ -54,9 +54,9 @@
 	xdchange_t *xch, *xchp, *lxch;
 	long max_common = 2 * xecfg->ctxlen + xecfg->interhunkctxlen;
 	long max_ignorable = xecfg->ctxlen;
-	unsigned long ignored = 0; /* number of ignored blank lines */
+	unsigned long ignored = 0; // number of ignored blank lines
 
-	/* remove ignorable changes that are too far before other changes */
+	// remove ignorable changes that are too far before other changes
 	for (xchp = *xscr; xchp && xchp->ignore; xchp = xchp->next) {
 		xch = xchp->next;
 
@@ -99,9 +99,9 @@
 static long def_ff(const char *rec, long len, char *buf, long sz, void *priv UNUSED)
 {
 	if (len > 0 &&
-			(isalpha((unsigned char)*rec) || /* identifier? */
-			 *rec == '_' || /* also identifier? */
-			 *rec == '$')) { /* identifiers from VMS and other esoterico */
+			(isalpha((unsigned char)*rec) || // identifier?
+			 *rec == '_' || // also identifier?
+			 *rec == '$')) { // identifiers from VMS and other esoterico
 		if (len > sz)
 			len = sz;
 		while (0 < len && isspace((unsigned char)rec[len - 1]))
@@ -197,7 +197,7 @@
 		if (xecfg->flags & XDL_EMIT_FUNCCONTEXT) {
 			long fs1, i1 = xch->i1;
 
-			/* Appended chunk? */
+			// Appended chunk?
 			if (i1 >= xe->xdf1.nrec) {
 				long i2 = xch->i2;
 
diff --git a/src/xdiff/xemit.h b/src/xdiff/xemit.h
index 1b9887e..3ce7e3d 100644
--- a/src/xdiff/xemit.h
+++ b/src/xdiff/xemit.h
@@ -33,4 +33,4 @@
 
 
 
-#endif /* #if !defined(XEMIT_H) */
+#endif // #if !defined(XEMIT_H)
diff --git a/src/xdiff/xhistogram.c b/src/xdiff/xhistogram.c
index 3fb8974..28cf825 100644
--- a/src/xdiff/xhistogram.c
+++ b/src/xdiff/xhistogram.c
@@ -55,8 +55,8 @@
 	struct record {
 		unsigned int ptr, cnt;
 		struct record *next;
-	} **records, /* an occurrence */
-	  **line_map; /* map of line to record chain */
+	} **records, // an occurrence
+	  **line_map; // map of line to record chain
 	chastore_t rcha;
 	unsigned int *next_ptrs;
 	unsigned int table_bits,
@@ -128,7 +128,7 @@
 				 */
 				NEXT_PTR(index, ptr) = rec->ptr;
 				rec->ptr = ptr;
-				/* cap rec->cnt at MAX_CNT */
+				// cap rec->cnt at MAX_CNT
 				rec->cnt = XDL_MIN(MAX_CNT, rec->cnt + 1);
 				LINE_MAP(index, ptr) = rec;
 				goto continue_scan;
@@ -154,7 +154,7 @@
 		LINE_MAP(index, ptr) = rec;
 
 continue_scan:
-		; /* no op */
+		; // no op
 	}
 
 	return 0;
@@ -266,7 +266,7 @@
 
 	index.records = NULL;
 	index.line_map = NULL;
-	/* in case of early xdl_cha_free() */
+	// in case of early xdl_cha_free()
 	index.rcha.head = NULL;
 
 	index.table_bits = xdl_hashbits(count1);
@@ -288,7 +288,7 @@
 		goto cleanup;
 	memset(index.next_ptrs, 0, sz);
 
-	/* lines / 4 + 1 comes from xprepare.c:xdl_prepare_ctx() */
+	// lines / 4 + 1 comes from xprepare.c:xdl_prepare_ctx()
 	if (xdl_cha_init(&index.rcha, sizeof(struct record), count1 / 4 + 1) < 0)
 		goto cleanup;
 
diff --git a/src/xdiff/xinclude.h b/src/xdiff/xinclude.h
index 752c9f3..ad27d35 100644
--- a/src/xdiff/xinclude.h
+++ b/src/xdiff/xinclude.h
@@ -20,7 +20,7 @@
  *
  */
 
-/* defines HAVE_ATTRIBUTE_UNUSED */
+// defines HAVE_ATTRIBUTE_UNUSED
 #ifdef HAVE_CONFIG_H
 # ifdef VMS
 #  include "[.auto]config.h"
@@ -29,8 +29,8 @@
 # endif
 #endif
 
-/* Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter
- * can be used to check for mistakes. */
+// Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter
+// can be used to check for mistakes.
 #ifdef HAVE_ATTRIBUTE_UNUSED
 # define UNUSED __attribute__((unused))
 #else
@@ -62,4 +62,4 @@
 #include "xemit.h"
 
 
-#endif /* #if !defined(XINCLUDE_H) */
+#endif // #if !defined(XINCLUDE_H)
diff --git a/src/xdiff/xmacros.h b/src/xdiff/xmacros.h
index 2809a28..1167ebb 100644
--- a/src/xdiff/xmacros.h
+++ b/src/xdiff/xmacros.h
@@ -51,4 +51,4 @@
 } while (0)
 
 
-#endif /* #if !defined(XMACROS_H) */
+#endif // #if !defined(XMACROS_H)
diff --git a/src/xdiff/xpatience.c b/src/xdiff/xpatience.c
index 2c65aac..f6c84c6 100644
--- a/src/xdiff/xpatience.c
+++ b/src/xdiff/xpatience.c
@@ -69,7 +69,7 @@
 		 */
 		unsigned anchor : 1;
 	} *entries, *first, *last;
-	/* were common records found? */
+	// were common records found?
 	unsigned long has_matches;
 	mmfile_t *file1, *file2;
 	xdfenv_t *env;
@@ -86,7 +86,7 @@
 	return 0;
 }
 
-/* The argument "pass" is 1 for the first file, 2 for the second. */
+// The argument "pass" is 1 for the first file, 2 for the second.
 static void insert_record(xpparam_t const *xpp, int line, struct hashmap *map,
 			  int pass)
 {
@@ -155,7 +155,7 @@
 	result->xpp = xpp;
 	result->env = env;
 
-	/* We know exactly how large we want the hash map */
+	// We know exactly how large we want the hash map
 	result->alloc = count1 * 2;
 	result->entries = (struct entry *)
 		xdl_malloc(result->alloc * sizeof(struct entry));
@@ -163,11 +163,11 @@
 		return -1;
 	memset(result->entries, 0, result->alloc * sizeof(struct entry));
 
-	/* First, fill with entries from the first file */
+	// First, fill with entries from the first file
 	while (count1--)
 		insert_record(xpp, line1++, result, 1);
 
-	/* Then search for matches in the second file */
+	// Then search for matches in the second file
 	while (count2--)
 		insert_record(xpp, line2++, result, 2);
 
@@ -185,13 +185,13 @@
 
 	while (left + 1 < right) {
 		int middle = left + (right - left) / 2;
-		/* by construction, no two entries can be equal */
+		// by construction, no two entries can be equal
 		if (sequence[middle]->line2 > entry->line2)
 			right = middle;
 		else
 			left = middle;
 	}
-	/* return the index in "sequence", _not_ the sequence length */
+	// return the index in "sequence", _not_ the sequence length
 	return left;
 }
 
@@ -216,7 +216,7 @@
 	 */
 	int anchor_i = -1;
 
-	/* Added to silence Coverity. */
+	// Added to silence Coverity.
 	if (sequence == NULL)
 		return map->first;
 
@@ -237,13 +237,13 @@
 		}
 	}
 
-	/* No common unique lines were found */
+	// No common unique lines were found
 	if (!longest) {
 		xdl_free(sequence);
 		return NULL;
 	}
 
-	/* Iterate starting at the last element, adjusting the "next" members */
+	// Iterate starting at the last element, adjusting the "next" members
 	entry = sequence[longest - 1];
 	entry->next = NULL;
 	while (entry->previous) {
@@ -273,7 +273,7 @@
 	int next1, next2;
 
 	for (;;) {
-		/* Try to grow the line ranges of common lines */
+		// Try to grow the line ranges of common lines
 		if (first) {
 			next1 = first->line1;
 			next2 = first->line2;
@@ -292,7 +292,7 @@
 			line2++;
 		}
 
-		/* Recurse */
+		// Recurse
 		if (next1 > line1 || next2 > line2) {
 			struct hashmap submap;
 
@@ -343,7 +343,7 @@
 	struct entry *first;
 	int result = 0;
 
-	/* trivial case: one side is empty */
+	// trivial case: one side is empty
 	if (!count1) {
 		while(count2--)
 			env->xdf2.rchg[line2++ - 1] = 1;
@@ -359,7 +359,7 @@
 			line1, count1, line2, count2))
 		return -1;
 
-	/* are there any matching lines at all? */
+	// are there any matching lines at all?
 	if (!map.has_matches) {
 		while(count1--)
 			env->xdf1.rchg[line1++ - 1] = 1;
@@ -387,7 +387,7 @@
 	if (xdl_prepare_env(file1, file2, xpp, env) < 0)
 		return -1;
 
-	/* environment is cleaned up in xdl_diff() */
+	// environment is cleaned up in xdl_diff()
 	return patience_diff(file1, file2, xpp, env,
 			1, env->xdf1.nrec, 1, env->xdf2.nrec);
 }
diff --git a/src/xdiff/xprepare.h b/src/xdiff/xprepare.h
index 947d9fc..b67b3b2 100644
--- a/src/xdiff/xprepare.h
+++ b/src/xdiff/xprepare.h
@@ -31,4 +31,4 @@
 
 
 
-#endif /* #if !defined(XPREPARE_H) */
+#endif // #if !defined(XPREPARE_H)
diff --git a/src/xdiff/xtypes.h b/src/xdiff/xtypes.h
index 8442bd4..026999c 100644
--- a/src/xdiff/xtypes.h
+++ b/src/xdiff/xtypes.h
@@ -64,4 +64,4 @@
 
 
 
-#endif /* #if !defined(XTYPES_H) */
+#endif // #if !defined(XTYPES_H)
diff --git a/src/xdiff/xutils.c b/src/xdiff/xutils.c
index 25a090f..e8c7d2f 100644
--- a/src/xdiff/xutils.c
+++ b/src/xdiff/xutils.c
@@ -168,7 +168,7 @@
 		s--;
 	if (s == i)
 		return 1;
-	/* do not ignore CR at the end of an incomplete line */
+	// do not ignore CR at the end of an incomplete line
 	if (complete && s == i + 1 && l[i] == '\r')
 		return 1;
 	return 0;
@@ -208,7 +208,7 @@
 	} else if (flags & XDF_IGNORE_WHITESPACE_CHANGE) {
 		while (i1 < s1 && i2 < s2) {
 			if (XDL_ISSPACE(l1[i1]) && XDL_ISSPACE(l2[i2])) {
-				/* Skip matching spaces and try again */
+				// Skip matching spaces and try again
 				while (i1 < s1 && XDL_ISSPACE(l1[i1]))
 					i1++;
 				while (i2 < s2 && XDL_ISSPACE(l2[i2]))
@@ -224,7 +224,7 @@
 			i2++;
 		}
 	} else if (flags & XDF_IGNORE_CR_AT_EOL) {
-		/* Find the first difference and see how the line ends */
+		// Find the first difference and see how the line ends
 		while (i1 < s1 && i2 < s2 && l1[i1] == l2[i2]) {
 			i1++;
 			i2++;
@@ -261,7 +261,7 @@
 
 	for (; ptr < top && *ptr != '\n'; ptr++) {
 		if (cr_at_eol_only) {
-			/* do not ignore CR at the end of an incomplete line */
+			// do not ignore CR at the end of an incomplete line
 			if (*ptr == '\r' &&
 			    (ptr + 1 < top && ptr[1] == '\n'))
 				continue;
@@ -274,7 +274,7 @@
 				ptr++;
 			at_eol = (top <= ptr + 1 || ptr[1] == '\n');
 			if (flags & XDF_IGNORE_WHITESPACE)
-				; /* already handled */
+				; // already handled
 			else if (flags & XDF_IGNORE_WHITESPACE_CHANGE
 				 && !at_eol) {
 				ha += (ha << 5);
diff --git a/src/xdiff/xutils.h b/src/xdiff/xutils.h
index fba7bae..0bebd93 100644
--- a/src/xdiff/xutils.h
+++ b/src/xdiff/xutils.h
@@ -44,4 +44,4 @@
 
 
 
-#endif /* #if !defined(XUTILS_H) */
+#endif // #if !defined(XUTILS_H)