aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-12-05 03:58:17 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-12-05 03:58:17 +0000
commitf2041b96dcb395154854ca2d5aa230d60274d844 (patch)
tree8c8daae7fea777f11cbf6d54d9ef50c367ae831f
parente775ffccfbedc4bb525cb2b5c9280a1dd0cfbe21 (diff)
parentf254abaaa448375c911528a0a3234761acadc84f (diff)
downloadlibgsm-f2041b96dcb395154854ca2d5aa230d60274d844.tar.gz
Merge "Upgrade libgsm to 1.0.18"android-wear-8.0.0_r2
-rw-r--r--Android.bp1
-rw-r--r--ChangeLog7
-rw-r--r--METADATA18
-rw-r--r--README.version2
-rw-r--r--add-test/add_test.c20
-rw-r--r--inc/config.h10
-rw-r--r--inc/gsm.h2
-rw-r--r--inc/private.h4
-rw-r--r--src/add.c8
-rw-r--r--src/code.c6
-rw-r--r--src/debug.c2
-rw-r--r--src/gsm_explode.c2
-rw-r--r--src/gsm_implode.c2
-rw-r--r--src/gsm_option.c2
-rw-r--r--src/long_term.c16
-rw-r--r--src/lpc.c10
-rw-r--r--src/preprocess.c6
-rw-r--r--src/rpe.c36
-rw-r--r--src/short_term.c2
-rw-r--r--src/table.c2
-rw-r--r--src/toast.c28
-rw-r--r--src/toast_alaw.c4
-rw-r--r--src/toast_audio.c8
-rw-r--r--src/toast_lin.c2
-rw-r--r--src/toast_ulaw.c12
-rw-r--r--tls/bitter.c4
-rw-r--r--tls/ginger.c2
-rw-r--r--tls/sour.c8
-rw-r--r--tls/sweet.c4
-rw-r--r--tls/taste.h2
30 files changed, 128 insertions, 104 deletions
diff --git a/Android.bp b/Android.bp
index 5ef4777..e170ca0 100644
--- a/Android.bp
+++ b/Android.bp
@@ -39,6 +39,7 @@ cc_library_static {
"-DSASR",
"-DWAV49",
"-Werror",
+ "-Wno-comment",
"-Wno-unused-parameter",
],
diff --git a/ChangeLog b/ChangeLog
index f15352b..d21eae9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat May 5 21:48:20 2018
+
+ * Release 1.0 Patchlevel 18
+ Remove the MacOS "quarantine" files that I didn't know I'd shipped.
+ Remove some trailing spaces.
+ Bump up the patchlevel in inc/gsm.h (I'd forgotten that in release 17.)
+
Tue Jun 27 17:59:30 2017
* Release 1.0 Patchlevel 17
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..c85cc99
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,18 @@
+name: "libgsm"
+description: "Lossy speech compression."
+third_party {
+ url {
+ type: HOMEPAGE
+ value: "http://www.quut.com/gsm/"
+ }
+ url {
+ type: ARCHIVE
+ value: "http://www.quut.com/gsm/gsm-1.0.18.tar.gz"
+ }
+ version: "1.0.18"
+ last_upgrade_date {
+ year: 2018
+ month: 12
+ day: 4
+ }
+}
diff --git a/README.version b/README.version
deleted file mode 100644
index 5dc90fc..0000000
--- a/README.version
+++ /dev/null
@@ -1,2 +0,0 @@
-URL: http://www.quut.com/gsm/gsm-1.0.17.tar.gz
-Version: 1.0.17
diff --git a/add-test/add_test.c b/add-test/add_test.c
index 5d128f6..6b23e9d 100644
--- a/add-test/add_test.c
+++ b/add-test/add_test.c
@@ -99,7 +99,7 @@ char * parse P1((buf), char * buf)
if ((a = strchr(buf, '=')) != 0) *a++ = 0;
- opname = s = strtek(buf, " \t(");
+ opname = s = strtek(buf, " \t(");
if (!s) return (char *)0;
op1 = op2 = L_op1 = L_op2 = 0;
@@ -139,7 +139,7 @@ void fprint_longword P2((f, w), FILE * f, longword w)
else fprintf(f, "0x%8.8lx (%ld%s)",
(unsigned long)w, (long)w, w == MIN_WORD ? "/-"
: (w == MAX_WORD ? "/+"
- : (w == MIN_LONGWORD ? "/--"
+ : (w == MIN_LONGWORD ? "/--"
: (w == MAX_LONGWORD ? "/++" : ""))));
}
@@ -255,11 +255,11 @@ fail:
if (!strcmp(c, "abs" )) {
do_word( gsm_abs(op1) );
continue;
- }
+ }
if (!strcmp(c, "M_abs" )) {
do_word( M_gsm_abs(op1) );
continue;
- }
+ }
if (!strcmp(c, "div" )) {
do_word( gsm_div( op1, op2 ));
continue;
@@ -267,11 +267,11 @@ fail:
if (!strcmp(c, "norm" )) {
do_word( gsm_norm(L_op1));
continue;
- }
+ }
if (!strcmp(c, "<<" )) {
do_word( gsm_asl( op1, op2));
continue;
- }
+ }
if (!strcmp(c, ">>" )) {
do_word( gsm_asr( op1, op2 ));
continue;
@@ -287,19 +287,19 @@ fail:
if (!strcmp(c, "L_add" )) {
do_longword( gsm_L_add( L_op1, L_op2 ));
continue;
- }
+ }
if (!strcmp(c, "M_L_add" )) {
do_longword( M_gsm_L_add( L_op1, L_op2 ));
continue;
- }
+ }
if (!strcmp(c, "L_sub" )) {
do_longword( gsm_L_sub( L_op1, L_op2 ));
continue;
- }
+ }
if (!strcmp(c, "L_<<" )) {
do_longword( gsm_L_asl( L_op1, L_op2 ));
continue;
- }
+ }
if (!strcmp(c, "L_>>")) {
do_longword( gsm_L_asr( L_op1, L_op2 ));
continue;
diff --git a/inc/config.h b/inc/config.h
index 6f7f667..223c9d4 100644
--- a/inc/config.h
+++ b/inc/config.h
@@ -9,8 +9,8 @@
#ifndef CONFIG_H
#define CONFIG_H
-//efine SIGHANDLER_T int /* signal handlers are void */
-//efine HAS_SYSV_SIGNAL 1 /* sigs not blocked/reset? */
+/*efine SIGHANDLER_T int /* signal handlers are void */
+/*efine HAS_SYSV_SIGNAL 1 /* sigs not blocked/reset? */
#define HAS_STDLIB_H 1 /* /usr/include/stdlib.h */
#define HAS_LIMITS_H 1 /* /usr/include/limits.h */
@@ -22,16 +22,16 @@
#define HAS_CHMOD 1 /* chmod syscall */
#define HAS_FCHOWN 1 /* fchown syscall */
#define HAS_CHOWN 1 /* chown syscall */
-//efine HAS__FSETMODE 1 /* _fsetmode -- set file mode */
+/*efine HAS__FSETMODE 1 /* _fsetmode -- set file mode */
#define HAS_STRING_H 1 /* /usr/include/string.h */
#define HAS_STRINGS_H 1 /* /usr/include/strings.h */
#define HAS_UNISTD_H 1 /* /usr/include/unistd.h */
#define HAS_UTIME 1 /* POSIX utime(path, times) */
-//efine HAS_UTIMES 1 /* use utimes() syscall instead */
+/*efine HAS_UTIMES 1 /* use utimes() syscall instead */
#define HAS_UTIME_H 1 /* UTIME header file */
#define HAS_UTIMBUF 1 /* struct utimbuf */
-//efine HAS_UTIMEUSEC 1 /* microseconds in utimbuf? */
+/*efine HAS_UTIMEUSEC 1 /* microseconds in utimbuf? */
#endif /* CONFIG_H */
diff --git a/inc/gsm.h b/inc/gsm.h
index dca1660..5b3c3eb 100644
--- a/inc/gsm.h
+++ b/inc/gsm.h
@@ -43,7 +43,7 @@ typedef gsm_byte gsm_frame[33]; /* 33 * 8 bits */
#define GSM_MAGIC 0xD /* 13 kbit/s RPE-LTP */
-#define GSM_PATCHLEVEL 16
+#define GSM_PATCHLEVEL 18
#define GSM_MINOR 0
#define GSM_MAJOR 1
diff --git a/inc/private.h b/inc/private.h
index 0c94255..d1b1510 100644
--- a/inc/private.h
+++ b/inc/private.h
@@ -83,10 +83,10 @@ extern longword gsm_L_asr P((longword a, int n));
extern word gsm_asr P((word a, int n));
/*
- * Inlined functions from add.h
+ * Inlined functions from add.h
*/
-/*
+/*
* #define GSM_MULT_R(a, b) (* word a, word b, !(a == b == MIN_WORD) *) \
* (0x0FFFF & SASR(((longword)(a) * (longword)(b) + 16384), 15))
*/
diff --git a/src/add.c b/src/add.c
index 258a6fc..fe1582f 100644
--- a/src/add.c
+++ b/src/add.c
@@ -88,7 +88,7 @@ longword gsm_L_sub P2((a,b), longword a, longword b)
}
else if (b <= 0) return a - b;
else {
- /* a<0, b>0 */
+ /* a<0, b>0 */
ulongword A = (ulongword)-(a + 1) + b;
return A >= MAX_LONGWORD ? MIN_LONGWORD : -(longword)A - 1;
@@ -120,7 +120,7 @@ word gsm_norm P1((a), longword a )
* variable L_var1 for positive values on the interval
*
* with minimum of
- * minimum of 1073741824 (01000000000000000000000000000000) and
+ * minimum of 1073741824 (01000000000000000000000000000000) and
* maximum of 2147483647 (01111111111111111111111111111111)
*
*
@@ -141,7 +141,7 @@ word gsm_norm P1((a), longword a )
a = ~a;
}
- return a & 0xffff0000
+ return a & 0xffff0000
? ( a & 0xff000000
? -1 + bitoff[ 0xFF & (a >> 24) ]
: 7 + bitoff[ 0xFF & (a >> 16) ] )
@@ -194,7 +194,7 @@ word gsm_asr P2((a,n), word a, int n)
# endif
}
-/*
+/*
* (From p. 46, end of section 4.2.5)
*
* NOTE: The following lines gives [sic] one correct implementation
diff --git a/src/code.c b/src/code.c
index 402f614..2b01366 100644
--- a/src/code.c
+++ b/src/code.c
@@ -20,8 +20,8 @@
#include "gsm.h"
#include "proto.h"
-/*
- * 4.2 FIXED POINT IMPLEMENTATION OF THE RPE-LTP CODER
+/*
+ * 4.2 FIXED POINT IMPLEMENTATION OF THE RPE-LTP CODER
*/
void Gsm_Coder P8((S,s,LARc,Nc,bc,Mc,xmaxc,xMc),
@@ -34,7 +34,7 @@ void Gsm_Coder P8((S,s,LARc,Nc,bc,Mc,xmaxc,xMc),
* The RPE-LTD coder works on a frame by frame basis. The length of
* the frame is equal to 160 samples. Some computations are done
* once per frame to produce at the output of the coder the
- * LARc[1..8] parameters which are the coded LAR coefficients and
+ * LARc[1..8] parameters which are the coded LAR coefficients and
* also to realize the inverse filtering operation for the entire
* frame (160 samples of signal d[0..159]). These parts produce at
* the output of the coder:
diff --git a/src/debug.c b/src/debug.c
index 6e42842..828397f 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -18,7 +18,7 @@
#include <stdio.h>
#include "proto.h"
-void gsm_debug_words P4( (name, from, to, ptr),
+void gsm_debug_words P4( (name, from, to, ptr),
char * name,
int from,
int to,
diff --git a/src/gsm_explode.c b/src/gsm_explode.c
index ca48f9b..08402b7 100644
--- a/src/gsm_explode.c
+++ b/src/gsm_explode.c
@@ -273,7 +273,7 @@ int gsm_explode P3((s, c, target), gsm s, gsm_byte * c, gsm_signal * target)
xmc[51] = sr & 0x7; sr >>= 3;
}
}
- else
+ else
#endif
{
/* GSM_MAGIC = (*c >> 4) & 0xF; */
diff --git a/src/gsm_implode.c b/src/gsm_implode.c
index 6c5672b..fbe7b0d 100644
--- a/src/gsm_implode.c
+++ b/src/gsm_implode.c
@@ -367,7 +367,7 @@ void gsm_implode P3((s, source, c), gsm s, gsm_signal * source, gsm_byte * c)
}
}
else
-#endif
+#endif
{
*c++ = ((GSM_MAGIC & 0xF) << 4) /* 1 */
diff --git a/src/gsm_option.c b/src/gsm_option.c
index 274b7b1..5b342e4 100644
--- a/src/gsm_option.c
+++ b/src/gsm_option.c
@@ -56,7 +56,7 @@ int gsm_option P3((r, opt, val), gsm r, int opt, int * val)
case GSM_OPT_WAV49:
-#ifdef WAV49
+#ifdef WAV49
result = r->wav_fmt;
if (val) r->wav_fmt = !!*val;
#endif
diff --git a/src/long_term.c b/src/long_term.c
index b2d2d3f..76b2d41 100644
--- a/src/long_term.c
+++ b/src/long_term.c
@@ -330,7 +330,7 @@ static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),
else scal = 6 - temp;
assert(scal >= 0);
- ltp_cut = (longword)SASR(dmax, scal) * st->ltp_cut / 100;
+ ltp_cut = (longword)SASR(dmax, scal) * st->ltp_cut / 100;
/* Initialization of a working array wt
@@ -362,7 +362,7 @@ static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),
register float a = lp[-8], b = lp[-7], c = lp[-6],
d = lp[-5], e = lp[-4], f = lp[-3],
g = lp[-2], h = lp[-1];
- register float E;
+ register float E;
register float S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0,
S5 = 0, S6 = 0, S7 = 0, S8 = 0;
@@ -528,7 +528,7 @@ static void Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),
register float a = lp[-8], b = lp[-7], c = lp[-6],
d = lp[-5], e = lp[-4], f = lp[-3],
g = lp[-2], h = lp[-1];
- register float E;
+ register float E;
register float S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0,
S5 = 0, S6 = 0, S7 = 0, S8 = 0;
@@ -742,7 +742,7 @@ static void Fast_Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),
register float a = lp[-8], b = lp[-7], c = lp[-6],
d = lp[-5], e = lp[-4], f = lp[-3],
g = lp[-2], h = lp[-1];
- register float E;
+ register float E;
register float S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0,
S5 = 0, S6 = 0, S7 = 0, S8 = 0;
@@ -860,7 +860,7 @@ static void Long_term_analysis_filtering P6((bc,Nc,dp,d,dpp,e),
case 0: STEP( 3277 ); break;
case 1: STEP( 11469 ); break;
case 2: STEP( 21299 ); break;
- case 3: STEP( 32767 ); break;
+ case 3: STEP( 32767 ); break;
}
}
@@ -881,7 +881,7 @@ void Gsm_Long_Term_Predictor P7((S,d,dp,e,dpp,Nc,bc), /* 4x for 160 samples */
assert( dpp); assert( Nc ); assert( bc );
#if defined(FAST) && defined(USE_FLOAT_MUL)
- if (S->fast)
+ if (S->fast)
#if defined (LTP_CUT)
if (S->ltp_cut)
Cut_Fast_Calculation_of_the_LTP_parameters(S,
@@ -889,7 +889,7 @@ void Gsm_Long_Term_Predictor P7((S,d,dp,e,dpp,Nc,bc), /* 4x for 160 samples */
else
#endif /* LTP_CUT */
Fast_Calculation_of_the_LTP_parameters(d, dp, bc, Nc );
- else
+ else
#endif /* FAST & USE_FLOAT_MUL */
#ifdef LTP_CUT
if (S->ltp_cut)
@@ -930,7 +930,7 @@ void Gsm_Long_Term_Synthesis_Filtering P5((S,Ncr,bcr,erp,drp),
*/
brp = gsm_QLB[ bcr ];
- /* Computation of the reconstructed short term residual
+ /* Computation of the reconstructed short term residual
* signal drp[0..39]
*/
assert(brp != MIN_WORD);
diff --git a/src/lpc.c b/src/lpc.c
index 21b9faf..5c70789 100644
--- a/src/lpc.c
+++ b/src/lpc.c
@@ -69,7 +69,7 @@ static void Autocorrelation P2((s, L_ACF),
float_s[k] = (float) \
(s[k] = GSM_MULT_R(s[k], 16384 >> (n-1)));\
break;
-# else
+# else
# define SCALE(n) \
case n: for (k = 0; k <= 159; k++) \
s[k] = GSM_MULT_R( s[k], 16384 >> (n-1) );\
@@ -133,13 +133,13 @@ static void Autocorrelation P2((s, L_ACF),
STEP(5); STEP(6); STEP(7); STEP(8);
}
- for (k = 9; k--; L_ACF[k] <<= 1) ;
+ for (k = 9; k--; L_ACF[k] <<= 1) ;
}
/* Rescaling of the array s[0..159]
*/
if (scalauto > 0) {
- assert(scalauto <= 4);
+ assert(scalauto <= 4);
for (k = 160; k--; *s++ <<= scalauto) ;
}
}
@@ -224,7 +224,7 @@ static void Reflection_coefficients P2( (L_ACF, r),
assert(*r >= 0);
if (P[1] > 0) *r = -*r; /* r[n] = sub(0, r[n]) */
assert (*r != MIN_WORD);
- if (n == 8) return;
+ if (n == 8) return;
/* Schur recursion
*/
@@ -294,7 +294,7 @@ static void Quantization_and_coding P1((LAR),
/* This procedure needs four tables; the following equations
* give the optimum scaling for the constants:
- *
+ *
* A[0..7] = integer( real_A[0..7] * 1024 )
* B[0..7] = integer( real_B[0..7] * 512 )
* MAC[0..7] = maximum of the LARc[0..7]
diff --git a/src/preprocess.c b/src/preprocess.c
index fa16efe..6539b73 100644
--- a/src/preprocess.c
+++ b/src/preprocess.c
@@ -15,7 +15,7 @@
#include "proto.h"
/* 4.2.0 .. 4.2.3 PREPROCESSING SECTION
- *
+ *
* After A-law to linear conversion (or directly from the
* Ato D converter) the following scaling is assumed for
* input to the RPE-LTP algorithm:
@@ -26,7 +26,7 @@
* Where S is the sign bit, v a valid bit, and * a "don't care" bit.
* The original signal is called sop[..]
*
- * out: 0.1................... 12
+ * out: 0.1................... 12
* S.S.v.v.v.v.v.v.v.v.v.v.v.v.0.0
*/
@@ -66,7 +66,7 @@ void Gsm_Preprocess P3((S, s, so),
/* 4.2.2 Offset compensation
- *
+ *
* This part implements a high-pass filter and requires extended
* arithmetic precision for the recursive part of this filter.
* The input of this procedure is the array so[0...159] and the
diff --git a/src/rpe.c b/src/rpe.c
index eda4f18..8f9f425 100644
--- a/src/rpe.c
+++ b/src/rpe.c
@@ -27,7 +27,7 @@ static void Weighting_filter P2((e, x),
* The coefficients of the weighting filter are stored in a table
* (see table 4.4). The following scaling is used:
*
- * H[0..10] = integer( real_H[ 0..10] * 8192 );
+ * H[0..10] = integer( real_H[ 0..10] * 8192 );
*/
{
/* word wt[ 50 ]; */
@@ -48,7 +48,7 @@ static void Weighting_filter P2((e, x),
e -= 5;
/* Compute the signal x[0..39]
- */
+ */
for (k = 0; k <= 39; k++) {
L_result = 8192 >> 1;
@@ -63,7 +63,7 @@ static void Weighting_filter P2((e, x),
#define STEP( i, H ) (e[ k + i ] * (longword)H)
/* Every one of these multiplications is done twice --
- * but I don't see an elegant way to optimize this.
+ * but I don't see an elegant way to optimize this.
* Do you?
*/
@@ -81,16 +81,16 @@ static void Weighting_filter P2((e, x),
L_result += STEP( 10, -134 ) ;
#else
L_result +=
- STEP( 0, -134 )
- + STEP( 1, -374 )
+ STEP( 0, -134 )
+ + STEP( 1, -374 )
/* + STEP( 2, 0 ) */
- + STEP( 3, 2054 )
- + STEP( 4, 5741 )
- + STEP( 5, 8192 )
- + STEP( 6, 5741 )
- + STEP( 7, 2054 )
+ + STEP( 3, 2054 )
+ + STEP( 4, 5741 )
+ + STEP( 5, 8192 )
+ + STEP( 6, 5741 )
+ + STEP( 7, 2054 )
/* + STEP( 8, 0 ) */
- + STEP( 9, -374 )
+ + STEP( 9, -374 )
+ STEP(10, -134 )
;
#endif
@@ -114,7 +114,7 @@ static void Weighting_filter P2((e, x),
/* 4.2.14 */
static void RPE_grid_selection P3((x,xM,Mc_out),
- word * x, /* [0..39] IN */
+ word * x, /* [0..39] IN */
word * xM, /* [0..12] OUT */
word * Mc_out /* OUT */
)
@@ -147,7 +147,7 @@ static void RPE_grid_selection P3((x,xM,Mc_out),
* L_temp = GSM_L_MULT( temp1, temp1 );
* L_result = GSM_L_ADD( L_temp, L_result );
* }
- *
+ *
* if (L_result > EM) {
* Mc = m;
* EM = L_result;
@@ -310,7 +310,7 @@ static void APCM_quantization P5((xM,xMc,mant_out,exp_out,xmaxc_out),
* can be calculated by using the exponent and the mantissa part of
* xmaxc (logarithmic table).
* So, this method avoids any division and uses only a scaling
- * of the RPE samples by a function of the exponent. A direct
+ * of the RPE samples by a function of the exponent. A direct
* multiplication by the inverse of the mantissa (NRFAC[0..7]
* found in table 4.5) gives the 3 bit coded version xMc[0..12]
* of the RPE samples.
@@ -321,7 +321,7 @@ static void APCM_quantization P5((xM,xMc,mant_out,exp_out,xmaxc_out),
*/
assert( exp <= 4096 && exp >= -4096);
- assert( mant >= 0 && mant <= 7 );
+ assert( mant >= 0 && mant <= 7 );
temp1 = 6 - exp; /* normalization by the exponent */
temp2 = gsm_NRFAC[ mant ]; /* inverse mantissa */
@@ -351,7 +351,7 @@ static void APCM_inverse_quantization P4((xMc,mant,exp,xMp),
word mant,
word exp,
register word * xMp) /* [0..12] OUT */
-/*
+/*
* This part is for decoding the RPE sequence of coded xMc[0..12]
* samples to obtain the xMp[0..12] array. Table 4.6 is used to get
* the mantissa of xmaxc (FAC[0..7]).
@@ -361,7 +361,7 @@ static void APCM_inverse_quantization P4((xMc,mant,exp,xMp),
word temp, temp1, temp2, temp3;
longword ltmp;
- assert( mant >= 0 && mant <= 7 );
+ assert( mant >= 0 && mant <= 7 );
temp1 = gsm_FAC[ mant ]; /* see 4.2-15 for mant */
temp2 = gsm_sub( 6, exp ); /* see 4.2-15 for exp */
@@ -438,7 +438,7 @@ void Gsm_Update_of_reconstructed_short_time_residual_signal P3((dpp, ep, dp),
{
int k;
- for (k = 0; k <= 79; k++)
+ for (k = 0; k <= 79; k++)
dp[ -120 + k ] = dp[ -80 + k ];
for (k = 0; k <= 39; k++)
diff --git a/src/short_term.c b/src/short_term.c
index b93ed00..ae73b88 100644
--- a/src/short_term.c
+++ b/src/short_term.c
@@ -73,7 +73,7 @@ static void Decoding_of_the_coded_Log_Area_Ratios P2((LARc,LARpp),
}
/* 4.2.9 */
-/* Computation of the quantized reflection coefficients
+/* Computation of the quantized reflection coefficients
*/
/* 4.2.9.1 Interpolation of the LARpp[1..8] to get the LARp[1..8]
diff --git a/src/table.c b/src/table.c
index 0ed6f70..5b8ed75 100644
--- a/src/table.c
+++ b/src/table.c
@@ -51,7 +51,7 @@ word gsm_QLB[4] = { 3277, 11469, 21299, 32767 };
word gsm_H[11] = {-134, -374, 0, 2054, 5741, 8192, 5741, 2054, 0, -374, -134 };
-/* Table 4.5 Normalized inverse mantissa used to compute xM/xmax
+/* Table 4.5 Normalized inverse mantissa used to compute xM/xmax
*/
/* i 0 1 2 3 4 5 6 7 */
word gsm_NRFAC[8] = { 29128, 26215, 23832, 21846, 20165, 18725, 17476, 16384 };
diff --git a/src/toast.c b/src/toast.c
index c29baa7..05cd0b3 100644
--- a/src/toast.c
+++ b/src/toast.c
@@ -34,7 +34,7 @@ char *inname, *outname;
* The function (*init_input)() begins input (e.g. skips a header).
*
* There are different versions of input, output, init_input and init_output
- * for different formats understood by toast; which ones are used
+ * for different formats understood by toast; which ones are used
* depends on the command line arguments and, in their absence, the
* filename; the fallback is #defined in toast.h
*
@@ -71,7 +71,7 @@ struct fmtdesc {
generic_init,
generic_init,
ulaw_input,
- ulaw_output
+ ulaw_output
}, f_alaw = {
"A-law", "8 kHz, 8 bit A-law encoding", ".A",
@@ -146,7 +146,7 @@ static int length_okay P1((name), char * name)
/* If our _pathname_ is too long, we'll usually not be
* able to open the file at all -- don't worry about that.
- *
+ *
* But if the _filename_ is too long, there is danger of
* silent truncation on some systems, which results
* in the target replacing the source!
@@ -160,7 +160,7 @@ static int length_okay P1((name), char * name)
#else
#ifdef _PC_NAME_MAX
#ifdef USE_PATHCONF
- { char * s, tmp;
+ { char * s, tmp;
/* s = dirname(name)
*/
@@ -200,7 +200,7 @@ static int length_okay P1((name), char * name)
* Return a pointer the suffix of a string, if any.
* A suffix alone has no suffix, an empty suffix can not be had.
*/
-static char * suffix P2((name, suf), char *name, char * suf)
+static char * suffix P2((name, suf), char *name, char * suf)
{
size_t nlen = strlen(name);
size_t slen = strlen(suf);
@@ -211,7 +211,7 @@ static char * suffix P2((name, suf), char *name, char * suf)
}
-static void catch_signals P1((fun), SIGHANDLER_T (*fun) ())
+static void catch_signals P1((fun), SIGHANDLER_T (*fun) ())
{
#ifdef SIGHUP
signal( SIGHUP, fun );
@@ -325,7 +325,7 @@ static void update_mode P0()
fprintf(stderr, "%s: could not change file mode of \"%s\"\n",
progname, outname);
}
-#else
+#else
#ifdef HAS_CHMOD
if (outname && chmod(outname, instat.st_mode & 07777)) {
perror(outname);
@@ -341,7 +341,7 @@ static void update_own P0()
if (!instat.st_nlink) return; /* couldn't stat in */
#ifdef HAS_FCHOWN
(void)fchown(fileno(out), instat.st_uid, instat.st_gid);
-#else
+#else
#ifdef HAS_CHOWN
(void)chown(outname, instat.st_uid, instat.st_gid);
#endif /* HAS_CHOWN */
@@ -415,7 +415,7 @@ static int okay_as_input P3((name,f,st), char* name, FILE* f, struct stat * st)
return 0;
}
if (st->st_nlink > 1 && !f_cat && !f_precious) {
- fprintf(stderr,
+ fprintf(stderr,
"%s: \"%s\" has %d other link%s -- unchanged.\n",
progname, name, (int)(st->st_nlink - 1),
"s" + (st->st_nlink <= 2));
@@ -498,7 +498,7 @@ static int open_output P1((name), char *name)
out = stdout;
outname = (char *)NULL;
#ifdef HAS__FSETMODE
- _fsetmode(out, "b");
+ _fsetmode(out, "b");
#endif
}
else {
@@ -532,7 +532,7 @@ static int process_encode P0()
gsm r;
gsm_signal s[ 160 ];
gsm_frame d;
-
+
int cc;
if (!(r = gsm_create())) {
@@ -572,7 +572,7 @@ static int process_decode P0()
gsm r;
gsm_frame s;
gsm_signal d[ 160 ];
-
+
int cc;
if (!(r = gsm_create())) { /* malloc failed */
@@ -595,7 +595,7 @@ static int process_decode P0()
return -1;
}
if (gsm_decode(r, s, d)) {
- fprintf(stderr, "%s: bad frame in %s\n",
+ fprintf(stderr, "%s: bad frame in %s\n",
progname, inname ? inname : "stdin");
gsm_destroy(r);
errno = 0;
@@ -776,7 +776,7 @@ int main P2((ac, av), int ac, char **av)
case 'v': version(); exit(0);
case 'h': help(); exit(0);
- default:
+ default:
fprintf(stderr,
"Usage: %s [-fcpdhvuaslFC] [files...] (-h for help)\n",
progname);
diff --git a/src/toast_alaw.c b/src/toast_alaw.c
index 7799342..1c94a91 100644
--- a/src/toast_alaw.c
+++ b/src/toast_alaw.c
@@ -314,7 +314,7 @@ static unsigned char s2a[] = {
90, 91, 88, 89, 94, 95, 92, 93, 82, 83, 80, 81, 86, 87, 84, 85
};
-int alaw_input P1((buf), gsm_signal * buf)
+int alaw_input P1((buf), gsm_signal * buf)
{
int i, c;
@@ -323,7 +323,7 @@ int alaw_input P1((buf), gsm_signal * buf)
return i;
}
-int alaw_output P1((buf), gsm_signal * buf)
+int alaw_output P1((buf), gsm_signal * buf)
{
int i;
diff --git a/src/toast_audio.c b/src/toast_audio.c
index f090f23..0665d56 100644
--- a/src/toast_audio.c
+++ b/src/toast_audio.c
@@ -29,7 +29,7 @@ extern int ulaw_output P((gsm_signal *));
static int put_u32 P2((f, u), FILE * f, unsigned long u)
{
- /* Write a 32-bit unsigned value msb first.
+ /* Write a 32-bit unsigned value msb first.
*/
if ( putc( (char)((u>>24) & 0x0FF), f) == EOF
|| putc( (char)((u>>16) & 0x0FF), f) == EOF
@@ -58,14 +58,14 @@ int audio_init_input P0()
{
unsigned long len, enc; /* unsigned 32 bits */
- if ( fgetc(in) != '.'
+ if ( fgetc(in) != '.'
|| fgetc(in) != 's'
|| fgetc(in) != 'n'
|| fgetc(in) != 'd'
|| get_u32( in, &len )
|| get_u32( in, &enc ) /* skip this */
|| get_u32( in, &enc )) {
- fprintf(stderr,
+ fprintf(stderr,
"%s: bad (missing?) header in Sun audio file \"%s\";\n\
Try one of -u, -a, -l instead (%s -h for help).\n",
progname, inname ? inname : "stdin", progname);
@@ -86,7 +86,7 @@ int audio_init_input P0()
while (len > 4*4)
if (getc(in) == EOF) {
- fprintf(stderr,
+ fprintf(stderr,
"%s: EOF in header of Sun audio file \"%s\";\n\
Try one of -u, -a, -l instead (%s -h for help).\n",
progname, inname ? inname : "stdin", progname);
diff --git a/src/toast_lin.c b/src/toast_lin.c
index 7b5f845..ca112a5 100644
--- a/src/toast_lin.c
+++ b/src/toast_lin.c
@@ -18,7 +18,7 @@ int linear_input (buf) gsm_signal * buf;
return fread( (char *)buf, sizeof(*buf), 160, in );
}
-int linear_output P1((buf), gsm_signal * buf)
+int linear_output P1((buf), gsm_signal * buf)
{
return -( fwrite( (char *)buf, sizeof(*buf), 160, out ) != 160 );
}
diff --git a/src/toast_ulaw.c b/src/toast_ulaw.c
index 14ef2d0..bc19af7 100644
--- a/src/toast_ulaw.c
+++ b/src/toast_ulaw.c
@@ -37,12 +37,12 @@ static unsigned short u2s[] = {
24031, 23002, 21974, 20946, 19918, 18889, 17861, 16833,
16062, 15548, 15033, 14519, 14005, 13491, 12977, 12463,
11949, 11435, 10920, 10406, 9892, 9378, 8864, 8350,
- 7964, 7707, 7450, 7193, 6936, 6679, 6422, 6165,
- 5908, 5651, 5394, 5137, 4880, 4623, 4365, 4108,
- 3916, 3787, 3659, 3530, 3402, 3273, 3144, 3016,
- 2887, 2759, 2630, 2502, 2373, 2245, 2116, 1988,
- 1891, 1827, 1763, 1698, 1634, 1570, 1506, 1441,
- 1377, 1313, 1249, 1184, 1120, 1056, 992, 927,
+ 7964, 7707, 7450, 7193, 6936, 6679, 6422, 6165,
+ 5908, 5651, 5394, 5137, 4880, 4623, 4365, 4108,
+ 3916, 3787, 3659, 3530, 3402, 3273, 3144, 3016,
+ 2887, 2759, 2630, 2502, 2373, 2245, 2116, 1988,
+ 1891, 1827, 1763, 1698, 1634, 1570, 1506, 1441,
+ 1377, 1313, 1249, 1184, 1120, 1056, 992, 927,
879, 847, 815, 783, 751, 718, 686, 654,
622, 590, 558, 526, 494, 461, 429, 397,
373, 357, 341, 325, 309, 293, 277, 261,
diff --git a/tls/bitter.c b/tls/bitter.c
index 602d8d6..bf3b8c5 100644
--- a/tls/bitter.c
+++ b/tls/bitter.c
@@ -30,7 +30,7 @@ void write_code P2((s_spex, n_spex), struct spex * s_spex, int n_spex)
if (vars == bits) {
printf( (bits==8? "%s & 0x%lX;\n" : "(%s & 0x%lX);\n"),
- sp->var,
+ sp->var,
~(0xfffffffe << (bits - 1)));
if (!-- n_spex) break;
sp++;
@@ -55,7 +55,7 @@ void write_code P2((s_spex, n_spex), struct spex * s_spex, int n_spex)
} else {
printf("((%s >> %d) & 0x%X);\n",
- sp->var,
+ sp->var,
vars - bits,
~(0xfffffffe << (bits - 1)));
diff --git a/tls/ginger.c b/tls/ginger.c
index d830e20..756b21e 100644
--- a/tls/ginger.c
+++ b/tls/ginger.c
@@ -18,7 +18,7 @@
* you of Gary Larson.)
*/
-#define WORD_BITS 16 /* sizeof(uword) * CHAR_BIT on the
+#define WORD_BITS 16 /* sizeof(uword) * CHAR_BIT on the
* target architecture---if this isn't 16,
* you're in trouble with this library anyway.
*/
diff --git a/tls/sour.c b/tls/sour.c
index b6932e6..0631f04 100644
--- a/tls/sour.c
+++ b/tls/sour.c
@@ -40,7 +40,7 @@
* right-hand remainder of a C array.)
*/
-#define WORD_BITS 16 /* sizeof(uword) * CHAR_BIT on the
+#define WORD_BITS 16 /* sizeof(uword) * CHAR_BIT on the
* target architecture---if this isn't 16,
* you're in trouble with this library anyway.
*/
@@ -58,9 +58,9 @@ void write_code P2((s_spex, n_spex), struct spex * s_spex, int n_spex)
for (; n_spex > 0; n_spex--, sp++) {
- /* insert old
+ /* insert old
* new var value unused
- * here
+ * here
*
* [____________xxxxxx**********]
*
@@ -68,7 +68,7 @@ void write_code P2((s_spex, n_spex), struct spex * s_spex, int n_spex)
*/
printf("sr = sr >> %d | %s << %d;\n",
sp->varsize,
- sp->var,
+ sp->var,
WORD_BITS - sp->varsize);
n_in += sp->varsize;
diff --git a/tls/sweet.c b/tls/sweet.c
index 6a6fb29..e818351 100644
--- a/tls/sweet.c
+++ b/tls/sweet.c
@@ -5,7 +5,7 @@
*/
/*$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/sweet.c,v 1.2 1996/07/02 10:15:53 jutta Exp $*/
-
+
/* Generate code to unpack a bit array from name:#bits description */
#include <stdio.h>
@@ -41,7 +41,7 @@ void write_code P2((s_spex, n_spex), struct spex * s_spex, int n_spex)
} else if (vars < bits) {
- printf( "(*c >> %d) & 0x%lX;\n",
+ printf( "(*c >> %d) & 0x%lX;\n",
bits - vars,
~(0xfffffffe << (vars - 1)));
diff --git a/tls/taste.h b/tls/taste.h
index 2fc85ef..dfb9f2a 100644
--- a/tls/taste.h
+++ b/tls/taste.h
@@ -3,7 +3,7 @@
* Universitaet Berlin. See the accompanying file "COPYRIGHT" for
* details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
-
+
/*
* common code to sweet.c and bitter.c
*/