openbsd-ports/archivers/unace/patches/patch-ac
brad 6823baa8eb - remove the need for gmake
- use MAKE_FLAGS
- quiet two warnings
- bring in the header sys/types.h for the definition of BYTE_ORDER
2000-02-14 22:12:48 +00:00

58 lines
1.5 KiB
Plaintext

--- uac_dcpr.c.orig Wed Jul 1 04:29:10 1998
+++ uac_dcpr.c Mon Feb 14 16:46:29 2000
@@ -64,7 +64,7 @@
while (zl < zr);
//sort partial ranges - when very small, sort directly
- if (left < zr)
+ if (left < zr) {
if (left < zr - 1)
sortrange(left, zr);
else if (sort_freq[left] < sort_freq[zr])
@@ -72,8 +72,9 @@
xchg_def(sort_freq[left], sort_freq[zr]);
xchg_def(sort_org[left], sort_org[zr]);
}
+ }
- if (right > zl)
+ if (right > zl) {
if (zl < right - 1)
sortrange(zl, right);
else if (sort_freq[zl] < sort_freq[right])
@@ -81,6 +82,7 @@
xchg_def(sort_freq[zl], sort_freq[right]);
xchg_def(sort_org[zl], sort_org[right]);
}
+ }
}
void quicksort(INT n)
@@ -102,7 +104,7 @@
buf_rd[0] = buf_rd[size_rdb - 2];
buf_rd[1] = buf_rd[size_rdb - 1];
read_adds_blk((CHAR *) & buf_rd[2], i);
-#ifdef HI_LO_BYTE_ORDER
+#if BYTE_ORDER == BIG_ENDIAN
{
ULONG *p;
i>>=2; // count LONGs not BYTEs
@@ -137,7 +139,7 @@
i = comm_cpr_size > size_rdb * sizeof(LONG) ? size_rdb * sizeof(LONG) : comm_cpr_size;
if (!f_err)
memcpy(buf_rd, comm, i);
-#ifdef HI_LO_BYTE_ORDER
+#if BYTE_ORDER == BIG_ENDIAN
{
ULONG *p;
i>>=2; // count LONGs not BYTEs
@@ -510,7 +512,7 @@
i = size_rdb * sizeof(LONG);
read_adds_blk((CHAR *) buf_rd, i);
-#ifdef HI_LO_BYTE_ORDER
+#if BYTE_ORDER == BIG_ENDIAN
{
ULONG *p;
i>>=2; // count LONGs not BYTEs