~ubuntu-branches/ubuntu/jaunty/gramofile/jaunty

« back to all changes in this revision

Viewing changes to debian/20-long-vs-int.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2005-04-29 13:20:02 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050429132002-04317sw4cfn0s9bc
Tags: 1.6-7
40-fast-swap-and-buffer.dpatch: Lower optimisation level to the
standard -O2. On arm, the assembler chokes on -O3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Patch by Tom Harvey <TomHarvey@IndustryFigure.com>
2
 
# Rediffed. [dk]
3
 
#PATCHOPTIONS: -p1
4
 
diff -ur gramofile-1.6.orig/bplaysrc/fmtheaders.h gramofile-1.6/bplaysrc/fmtheaders.h
5
 
--- gramofile-1.6.orig/bplaysrc/fmtheaders.h    Sat May  5 15:52:25 2001
6
 
+++ gramofile-1.6/bplaysrc/fmtheaders.h Fri Jun  8 09:55:20 2001
7
 
@@ -2,14 +2,15 @@
8
 
 #define _FMTHEADERS_H  1
9
 
 
10
 
 #include <sys/types.h>
11
 
+#include <inttypes.h>
12
 
 
13
 
 /* Definitions for .VOC files */
14
 
 
15
 
 #define VOC_MAGIC      "Creative Voice File\032"
16
 
 
17
 
-#define DATALEN(bp)    ((u_long)(bp.BlockLen[0]) | \
18
 
-                         ((u_long)(bp.BlockLen[1]) << 8) | \
19
 
-                         ((u_long)(bp.BlockLen[2]) << 16) )
20
 
+#define DATALEN(bp)    ((uint32_t)(bp.BlockLen[0]) | \
21
 
+                         ((uint32_t)(bp.BlockLen[1]) << 8) | \
22
 
+                         ((uint32_t)(bp.BlockLen[2]) << 16) )
23
 
 
24
 
 typedef struct vochead {
25
 
   u_char  Magic[20];   /* must be VOC_MAGIC */
26
 
@@ -51,21 +52,21 @@
27
 
    it works on all WAVE-file I have
28
 
 */
29
 
 typedef struct wavhead {
30
 
-  u_long       main_chunk;     /* 'RIFF' */
31
 
-  u_long       length;         /* Length of rest of file */
32
 
-  u_long       chunk_type;     /* 'WAVE' */
33
 
+  uint32_t     main_chunk;     /* 'RIFF' */
34
 
+  uint32_t     length;         /* Length of rest of file */
35
 
+  uint32_t     chunk_type;     /* 'WAVE' */
36
 
 
37
 
-  u_long       sub_chunk;      /* 'fmt ' */
38
 
-  u_long       sc_len;         /* length of sub_chunk, =16 (rest of chunk) */
39
 
+  uint32_t     sub_chunk;      /* 'fmt ' */
40
 
+  uint32_t     sc_len;         /* length of sub_chunk, =16 (rest of chunk) */
41
 
   u_short      format;         /* should be 1 for PCM-code */
42
 
   u_short      modus;          /* 1 Mono, 2 Stereo */
43
 
-  u_long       sample_fq;      /* frequence of sample */
44
 
-  u_long       byte_p_sec;
45
 
+  uint32_t     sample_fq;      /* frequence of sample */
46
 
+  uint32_t     byte_p_sec;
47
 
   u_short      byte_p_spl;     /* samplesize; 1 or 2 bytes */
48
 
   u_short      bit_p_spl;      /* 8, 12 or 16 bit */ 
49
 
 
50
 
-  u_long       data_chunk;     /* 'data' */
51
 
-  u_long       data_length;    /* samplecount (lenth of rest of block?)*/
52
 
+  uint32_t     data_chunk;     /* 'data' */
53
 
+  uint32_t     data_length;    /* samplecount (lenth of rest of block?)*/
54
 
 } wavhead;
55
 
 
56
 
 #endif
57
 
diff -ur gramofile-1.6.orig/endian.c gramofile-1.6/endian.c
58
 
--- gramofile-1.6.orig/endian.c Sat May  5 15:52:25 2001
59
 
+++ gramofile-1.6/endian.c      Fri Jun  8 09:51:44 2001
60
 
@@ -24,10 +24,10 @@
61
 
   return (tmp);
62
 
 }
63
 
 
64
 
-u_long
65
 
-SwapFourBytes (u_long dw)
66
 
+uint32_t
67
 
+SwapFourBytes (uint32_t dw)
68
 
 {
69
 
-  register u_long tmp;
70
 
+  register uint32_t tmp;
71
 
   tmp = (dw & 0x000000FF);
72
 
   tmp = ((dw & 0x0000FF00) >> 0x08) | (tmp << 0x08);
73
 
   tmp = ((dw & 0x00FF0000) >> 0x10) | (tmp << 0x08);
74
 
diff -ur gramofile-1.6.orig/endian.h gramofile-1.6/endian.h
75
 
--- gramofile-1.6.orig/endian.h Sat May  5 15:52:25 2001
76
 
+++ gramofile-1.6/endian.h      Fri Jun  8 09:57:11 2001
77
 
@@ -4,8 +4,10 @@
78
 
 #ifndef _GETBIG
79
 
 #define _GETBIG 1
80
 
 
81
 
+#include <inttypes.h>
82
 
+
83
 
 extern u_short SwapTwoBytes (u_short);
84
 
-extern u_long SwapFourBytes (u_long);
85
 
+extern uint32_t SwapFourBytes (uint32_t);
86
 
 extern sample_t SwapSample (sample_t);
87
 
 
88
 
 #endif
89
 
diff -ur gramofile-1.6.orig/fmtheaders.h gramofile-1.6/fmtheaders.h
90
 
--- gramofile-1.6.orig/fmtheaders.h     Sat May  5 15:52:25 2001
91
 
+++ gramofile-1.6/fmtheaders.h  Fri Jun  8 09:59:02 2001
92
 
@@ -2,14 +2,15 @@
93
 
 #define _FMTHEADERS_H  1
94
 
 
95
 
 #include <sys/types.h>
96
 
+#include <inttypes.h>
97
 
 
98
 
 /* Definitions for .VOC files */
99
 
 
100
 
 #define VOC_MAGIC      "Creative Voice File\032"
101
 
 
102
 
-#define DATALEN(bp)    ((u_long)(bp.BlockLen[0]) | \
103
 
-                         ((u_long)(bp.BlockLen[1]) << 8) | \
104
 
-                         ((u_long)(bp.BlockLen[2]) << 16) )
105
 
+#define DATALEN(bp)    ((uint32_t)(bp.BlockLen[0]) | \
106
 
+                         ((uint32_t)(bp.BlockLen[1]) << 8) | \
107
 
+                         ((uint32_t)(bp.BlockLen[2]) << 16) )
108
 
 
109
 
 typedef struct vochead
110
 
   {
111
 
@@ -62,21 +63,21 @@
112
 
  */
113
 
 typedef struct wavhead
114
 
   {
115
 
-    u_long main_chunk;         /* 'RIFF' */
116
 
-    u_long length;             /* Length of rest of file */
117
 
-    u_long chunk_type;         /* 'WAVE' */
118
 
+    uint32_t main_chunk;       /* 'RIFF' */
119
 
+    uint32_t length;           /* Length of rest of file */
120
 
+    uint32_t chunk_type;       /* 'WAVE' */
121
 
 
122
 
-    u_long sub_chunk;          /* 'fmt ' */
123
 
-    u_long sc_len;             /* length of sub_chunk, =16 (rest of chunk) */
124
 
+    uint32_t sub_chunk;                /* 'fmt ' */
125
 
+    uint32_t sc_len;           /* length of sub_chunk, =16 (rest of chunk) */
126
 
     u_short format;            /* should be 1 for PCM-code */
127
 
     u_short modus;             /* 1 Mono, 2 Stereo */
128
 
-    u_long sample_fq;          /* frequence of sample */
129
 
-    u_long byte_p_sec;
130
 
+    uint32_t sample_fq;                /* frequence of sample */
131
 
+    uint32_t byte_p_sec;
132
 
     u_short byte_p_spl;                /* samplesize; 1 or 2 bytes */
133
 
     u_short bit_p_spl;         /* 8, 12 or 16 bit */
134
 
 
135
 
-    u_long data_chunk;         /* 'data' */
136
 
-    u_long data_length;                /* samplecount (lenth of rest of block?) */
137
 
+    uint32_t data_chunk;       /* 'data' */
138
 
+    uint32_t data_length;      /* samplecount (lenth of rest of block?) */
139
 
   }
140
 
 wavhead;
141