4 ms·
AFAIK MIN macro is not standard (not sure though), so I made this: --- hxindex.c.orig 2014-03-11 17:55:17.305697689 +0200 +++ hxindex.c 2014-03-11 17:58:30
by gkya 13y ago
AFAIK MIN macro is not standard (not sure though), so I made this:
--- hxindex.c.orig 2014-03-11 17:55:17.305697689 +0200
+++ hxindex.c 2014-03-11 17:58:30.331318646 +0200
@@ -103,6 +103,10 @@
#define SECNO "secno" /* Class of elements that define section # */
#define NO_NUM "no-num" /* Class of elements without a section # */
+#ifndef MIN
+# define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
+#endif
+
typedef struct _indexterm {
string url;
int importance; /* 1 (low) or 2 (high) */
@@ -435,7 +439,7 @@
/* Count how many subterms are equal to the previous entry */
i = 0;
- while (i < min(term->nrkeys, globalprevious->nrkeys) &&
+ while (i < MIN(term->nrkeys, globalprevious->nrkeys) &&
!folding_cmp(term->sortkeys + i, 1, globalprevious->sortkeys + i, 1))
i++;
I also created an Arch package with this patch:
> https://dl.dropboxusercontent.com/u/127354948/arch-repo/html-xml-utils-6.6-1-x86_64.pkg.tar.xz https://dl.dropboxusercontent.com/u/127354948/arch-repo/html...