openbsd-ports/archivers/unace/patches/patch-uac_dcpr_c
2001-03-24 22:31:18 +00:00

59 lines
1.8 KiB
Plaintext

$OpenBSD: patch-uac_dcpr_c,v 1.1 2001/03/24 22:31:20 brad Exp $
--- uac_dcpr.c.orig Wed Jul 1 04:29:10 1998
+++ uac_dcpr.c Sat Mar 24 17:30:41 2001
@@ -64,7 +64,7 @@ void sortrange(INT left, INT right)
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 @@ void sortrange(INT left, INT right)
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 @@ void sortrange(INT left, INT right)
xchg_def(sort_freq[zl], sort_freq[right]);
xchg_def(sort_org[zl], sort_org[right]);
}
+ }
}
void quicksort(INT n)
@@ -102,7 +104,7 @@ void readdat(void)
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 @@ void dcpr_comm_init(void)
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 @@ void dcpr_init_file(void)
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