ref: ab6d7c8cfcd68ecd20c8399bf3c606828fe15511
parent: 4f2ba23c15b6f2eda24ca6d25c9361bbe2bb024e
author: rrt <rrt>
date: Wed Dec 6 22:40:32 EST 2006
Remove more unused functions
--- a/src/libgsm/add.c
+++ b/src/libgsm/add.c
@@ -35,21 +35,6 @@
else return SASR( (longword)a * (longword)b, 15 );
}
-word gsm_mult_r (word a, word b)
-{
- if (b == MIN_WORD && a == MIN_WORD) return MAX_WORD;
- else {
- longword prod = (longword)a * (longword)b + 16384;
- prod >>= 15;
- return prod & 0xFFFF;
- }
-}
-
-word gsm_abs (word a)
-{
- return a < 0 ? (a == MIN_WORD ? MAX_WORD : -a) : a;
-}
-
static unsigned char const bitoff[ 256 ] = {
8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
--- a/src/libgsm/private.h
+++ b/src/libgsm/private.h
@@ -50,7 +50,6 @@
* Prototypes from add.c
*/
extern word gsm_mult (word a, word b);
-extern word gsm_mult_r (word a, word b);
extern word gsm_div (word num, word denum);
@@ -58,8 +57,6 @@
extern word gsm_sub (word a, word b);
-extern word gsm_abs (word a);
-
extern word gsm_norm ( longword a );
extern word gsm_asl (word a, int n);
@@ -91,13 +88,6 @@
: (utmp = (ulongword)(a) + (ulongword)(b)) >= MAX_LONGWORD \
? MAX_LONGWORD : utmp))
-/*
- * # define GSM_ADD(a, b) \
- * ((ltmp = (longword)(a) + (longword)(b)) >= MAX_WORD \
- * ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)
- */
-/* Nonportable, but faster: */
-
#define GSM_ADD(a, b) \
((ulongword)((ltmp = (longword)(a) + (longword)(b)) - MIN_WORD) > \
MAX_WORD - MIN_WORD ? (ltmp > 0 ? MAX_WORD : MIN_WORD) : ltmp)
@@ -107,20 +97,6 @@
? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)
# define GSM_ABS(a) ((a) < 0 ? ((a) == MIN_WORD ? MAX_WORD : -(a)) : (a))
-
-/* Use these if necessary:
-
-# define GSM_MULT_R(a, b) gsm_mult_r(a, b)
-# define GSM_MULT(a, b) gsm_mult(a, b)
-# define GSM_L_MULT(a, b) gsm_L_mult(a, b)
-
-# define GSM_L_ADD(a, b) gsm_L_add(a, b)
-# define GSM_ADD(a, b) gsm_add(a, b)
-# define GSM_SUB(a, b) gsm_sub(a, b)
-
-# define GSM_ABS(a) gsm_abs(a)
-
-*/
/*
* More prototypes from implementations..