pkgsrc/audio/splay/patches/patch-ad
dmcmahill 63b8d73d86 - mark as broken on big endian machines.
- add some patches that move in the direction of support for big endian
  machines.
2000-02-20 18:30:39 +00:00

39 lines
903 B
Text

$NetBSD: patch-ad,v 1.4 2000/02/20 18:30:39 dmcmahill Exp $
--- mpegsound/mpegsound_locals.h.orig Fri Mar 6 12:43:55 1998
+++ mpegsound/mpegsound_locals.h Sun Feb 20 10:43:00 2000
@@ -21,13 +21,13 @@
{
register unsigned short a;
-#ifndef WORDS_BIGENDIAN
+
{
int offset=bitindex>>3;
-
+#ifndef WORDS_BIGENDIAN
a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]);
- }
#else
- a=((unsigned short *)(buffer+((bixindex>>3))));
+ a=(unsigned short)(buffer[offset]);
#endif
+ }
a<<=(bitindex&7);
@@ -40,13 +40,12 @@
register unsigned short a;
-#ifndef WORDS_BIGENDIAN
{
int offset=bitindex>>3;
-
+#ifndef WORDS_BIGENDIAN
a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]);
- }
#else
- a=((unsigned short *)(buffer+((bixindex>>3))));
+ a=(unsigned short)(buffer[offset]);
#endif
+ }
a<<=(bitindex&7);