diff options
-rwxr-xr-x | ast_expr.y | 7 | ||||
-rwxr-xr-x | astman/astman.c | 6 | ||||
-rwxr-xr-x | codecs/gsm/Makefile | 2 | ||||
-rwxr-xr-x | codecs/ilbc/iCBSearch.c | 8 | ||||
-rwxr-xr-x | codecs/lpc10/analys.c | 44 | ||||
-rwxr-xr-x | codecs/lpc10/decode.c | 32 | ||||
-rwxr-xr-x | codecs/lpc10/ivfilt.c | 16 | ||||
-rwxr-xr-x | codecs/lpc10/placea.c | 16 | ||||
-rwxr-xr-x | codecs/mp3/include/mhead.h | 5 | ||||
-rwxr-xr-x | codecs/mp3/src/cupL1.c | 2 | ||||
-rwxr-xr-x | codecs/mp3/src/cupini.c | 4 | ||||
-rwxr-xr-x | codecs/mp3/src/cupl3.c | 6 | ||||
-rwxr-xr-x | codecs/mp3/src/icdct.c | 2 | ||||
-rwxr-xr-x | codecs/mp3/src/isbt.c | 13 | ||||
-rwxr-xr-x | codecs/mp3/src/iup.c | 4 | ||||
-rwxr-xr-x | codecs/mp3/src/iupini.c | 2 | ||||
-rwxr-xr-x | codecs/mp3/src/iwinm.c | 2 | ||||
-rwxr-xr-x | codecs/mp3/src/l3init.c | 6 | ||||
-rwxr-xr-x | codecs/mp3/src/mdct.c | 4 | ||||
-rwxr-xr-x | db1-ast/hash/hash_func.c | 31 | ||||
-rwxr-xr-x | editline/histedit.h | 6 | ||||
-rwxr-xr-x | utils/astman.c | 6 |
22 files changed, 139 insertions, 85 deletions
diff --git a/ast_expr.y b/ast_expr.y index 2b9209797..8652dac1b 100755 --- a/ast_expr.y +++ b/ast_expr.y @@ -79,18 +79,21 @@ static struct val *op_times __P((struct val *, struct val *)); static quad_t to_integer __P((struct val *)); static void to_string __P((struct val *)); static int ast_yyerror __P((const char *)); -static int ast_yylex __P(()); %} %pure-parser /* %name-prefix="ast_yy" */ - %union { struct val *val; } +%{ +static int ast_yylex __P((YYSTYPE *, struct parser_control *)); +%} + + %left <val> '|' %left <val> '&' %left <val> '=' '>' '<' GE LE NE diff --git a/astman/astman.c b/astman/astman.c index 2eb35f68e..a9dba8d61 100755 --- a/astman/astman.c +++ b/astman/astman.c @@ -427,7 +427,7 @@ static int get_user_input(char *msg, char *buf, int buflen) newtComponent ok; newtComponent cancel; newtComponent inpfield; - char *input; + const char *input; int res = -1; struct newtExitStruct es; @@ -550,8 +550,8 @@ static int login(char *hostname) newtComponent label; newtComponent ulabel; newtComponent plabel; - char *user; - char *pass; + const char *user; + const char *pass; struct message *m; struct newtExitStruct es; char tmp[55]; diff --git a/codecs/gsm/Makefile b/codecs/gsm/Makefile index 2304169ca..e41c397b5 100755 --- a/codecs/gsm/Makefile +++ b/codecs/gsm/Makefile @@ -54,7 +54,7 @@ PG = # CC = /usr/lang/acc # CCFLAGS = -c -O -CC = gcc -ansi -pedantic $(OPTIMIZE) -march=$(PROC) -fschedule-insns2 -fomit-frame-pointer +CC = gcc -pipe -Wall $(OPTIMIZE) -march=$(PROC) -fschedule-insns2 -fomit-frame-pointer CCFLAGS += -c -DNeedFunctionPrototypes=1 -finline-functions -funroll-loops -fPIC LD = $(CC) diff --git a/codecs/ilbc/iCBSearch.c b/codecs/ilbc/iCBSearch.c index 2279deb73..f6ddaea89 100755 --- a/codecs/ilbc/iCBSearch.c +++ b/codecs/ilbc/iCBSearch.c @@ -117,7 +117,9 @@ void iCBSearch( *ppe=0.0; pp=buf+LPC_FILTERORDER+lMem-lTarget; for (j=0; j<lTarget; j++) { - *ppe+=(*pp)*(*pp++); + // XXXXXX is this the coder's intent? + //*ppe+=(*pp)*(*pp++); + *ppe+=(pp[0])*(pp[1]); } if(*ppe>0.0) { @@ -295,7 +297,9 @@ void iCBSearch( pp=cbvectors+lMem-lTarget; for (j=0; j<lTarget; j++) { - *ppe+=(*pp)*(*pp++); + // XXXXXX is this the coder's intent? + //*ppe+=(*pp)*(*pp++); + *ppe+=(pp[0])*(pp[1]); } ppi = cbvectors + lMem - 1 - lTarget; diff --git a/codecs/lpc10/analys.c b/codecs/lpc10/analys.c index c9d078a85..3ebaed7bb 100755 --- a/codecs/lpc10/analys.c +++ b/codecs/lpc10/analys.c @@ -1,8 +1,11 @@ /* $Log$ -Revision 1.14 2003/02/12 13:59:14 matteo -mer feb 12 14:56:57 CET 2003 +Revision 1.15 2003/09/19 01:20:22 markster +Code cleanups (bug #66) + +Revision 1.2 2003/09/19 01:20:22 markster +Code cleanups (bug #66) Revision 1.1.1.1 2003/02/12 13:59:14 matteo mer feb 12 14:56:57 CET 2003 @@ -82,9 +85,12 @@ static integer c__1 = 1; /* ANALYS Version 55 */ /* $Log$ - * Revision 1.14 2003/02/12 13:59:14 matteo - * mer feb 12 14:56:57 CET 2003 + * Revision 1.15 2003/09/19 01:20:22 markster + * Code cleanups (bug #66) * +/* Revision 1.2 2003/09/19 01:20:22 markster +/* Code cleanups (bug #66) +/* /* Revision 1.1.1.1 2003/02/12 13:59:14 matteo /* mer feb 12 14:56:57 CET 2003 /* @@ -228,9 +234,11 @@ static integer c__1 = 1; extern /* Subroutine */ int onset_(real *, integer *, integer *, integer * , integer *, integer *, integer *, struct lpc10_encoder_state *); integer *osptr; - extern /* Subroutine */ placea_(integer *, integer * + extern /* Subroutine */ void placea_(integer *, integer * , integer *, integer *, integer *, integer *, integer *, integer * - , integer *), dcbias_(integer *, real *, real *), placev_(integer + , integer *); + extern void dcbias_(integer *, real *, real *); + extern void placev_(integer *, integer *, integer *, integer *, integer *, integer *, integer *, integer *, integer *, integer *, integer *); integer ipitch; @@ -252,9 +260,12 @@ static integer c__1 = 1; real phi[100] /* was [10][10] */, psi[10]; /* $Log$ - * Revision 1.14 2003/02/12 13:59:14 matteo - * mer feb 12 14:56:57 CET 2003 + * Revision 1.15 2003/09/19 01:20:22 markster + * Code cleanups (bug #66) * +/* Revision 1.2 2003/09/19 01:20:22 markster +/* Code cleanups (bug #66) +/* /* Revision 1.1.1.1 2003/02/12 13:59:14 matteo /* mer feb 12 14:56:57 CET 2003 /* @@ -286,9 +297,12 @@ static integer c__1 = 1; /* Frame size, Prediction order, Pitch period */ /* Arguments to ANALYS */ /* $Log$ - * Revision 1.14 2003/02/12 13:59:14 matteo - * mer feb 12 14:56:57 CET 2003 + * Revision 1.15 2003/09/19 01:20:22 markster + * Code cleanups (bug #66) * +/* Revision 1.2 2003/09/19 01:20:22 markster +/* Code cleanups (bug #66) +/* /* Revision 1.1.1.1 2003/02/12 13:59:14 matteo /* mer feb 12 14:56:57 CET 2003 /* @@ -488,10 +502,10 @@ static integer c__1 = 1; voibuf[0] = voibuf[2]; voibuf[1] = voibuf[3]; for (i__ = 1; i__ <= 2; ++i__) { - vwin[(i__ << 1) - 2] = vwin[(i__ + 1 << 1) - 2] - contrl_1.lframe; - vwin[(i__ << 1) - 1] = vwin[(i__ + 1 << 1) - 1] - contrl_1.lframe; - awin[(i__ << 1) - 2] = awin[(i__ + 1 << 1) - 2] - contrl_1.lframe; - awin[(i__ << 1) - 1] = awin[(i__ + 1 << 1) - 1] - contrl_1.lframe; + vwin[(i__ << 1) - 2] = vwin[((i__ + 1) << 1) - 2] - contrl_1.lframe; + vwin[(i__ << 1) - 1] = vwin[((i__ + 1) << 1) - 1] - contrl_1.lframe; + awin[(i__ << 1) - 2] = awin[((i__ + 1) << 1) - 2] - contrl_1.lframe; + awin[(i__ << 1) - 1] = awin[((i__ + 1) << 1) - 1] - contrl_1.lframe; /* EWIN(*,J) is unused for J .NE. AF, so the following shift is */ /* unnecessary. It also causes error messages when the C versio @@ -504,7 +518,7 @@ n */ /* EWIN(2,I) = EWIN(2,I+1) - LFRAME */ obound[i__ - 1] = obound[i__]; voibuf[i__ * 2] = voibuf[(i__ + 1) * 2]; - voibuf[(i__ << 1) + 1] = voibuf[(i__ + 1 << 1) + 1]; + voibuf[(i__ << 1) + 1] = voibuf[((i__ + 1) << 1) + 1]; rmsbuf[i__ - 1] = rmsbuf[i__]; i__1 = contrl_1.order; for (j = 1; j <= i__1; ++j) { diff --git a/codecs/lpc10/decode.c b/codecs/lpc10/decode.c index 3e7b5747a..6d129b360 100755 --- a/codecs/lpc10/decode.c +++ b/codecs/lpc10/decode.c @@ -1,8 +1,11 @@ /* $Log$ -Revision 1.14 2003/02/12 13:59:14 matteo -mer feb 12 14:56:57 CET 2003 +Revision 1.15 2003/09/19 01:20:22 markster +Code cleanups (bug #66) + +Revision 1.2 2003/09/19 01:20:22 markster +Code cleanups (bug #66) Revision 1.1.1.1 2003/02/12 13:59:14 matteo mer feb 12 14:56:57 CET 2003 @@ -56,9 +59,12 @@ static integer c__2 = 2; /* DECODE Version 54 */ /* $Log$ - * Revision 1.14 2003/02/12 13:59:14 matteo - * mer feb 12 14:56:57 CET 2003 + * Revision 1.15 2003/09/19 01:20:22 markster + * Code cleanups (bug #66) * +/* Revision 1.2 2003/09/19 01:20:22 markster +/* Code cleanups (bug #66) +/* /* Revision 1.1.1.1 2003/02/12 13:59:14 matteo /* mer feb 12 14:56:57 CET 2003 /* @@ -194,9 +200,12 @@ static integer c__2 = 2; integer ishift, errcnt, lsb; /* $Log$ - * Revision 1.14 2003/02/12 13:59:14 matteo - * mer feb 12 14:56:57 CET 2003 + * Revision 1.15 2003/09/19 01:20:22 markster + * Code cleanups (bug #66) * +/* Revision 1.2 2003/09/19 01:20:22 markster +/* Code cleanups (bug #66) +/* /* Revision 1.1.1.1 2003/02/12 13:59:14 matteo /* mer feb 12 14:56:57 CET 2003 /* @@ -228,9 +237,12 @@ static integer c__2 = 2; /* Frame size, Prediction order, Pitch period */ /* Arguments */ /* $Log$ - * Revision 1.14 2003/02/12 13:59:14 matteo - * mer feb 12 14:56:57 CET 2003 + * Revision 1.15 2003/09/19 01:20:22 markster + * Code cleanups (bug #66) * +/* Revision 1.2 2003/09/19 01:20:22 markster +/* Code cleanups (bug #66) +/* /* Revision 1.1.1.1 2003/02/12 13:59:14 matteo /* mer feb 12 14:56:57 CET 2003 /* @@ -518,9 +530,9 @@ static integer c__2 = 2; } for (i__ = 1; i__ <= 6; ++i__) { if ((i__1 = drc[i__ * 3 - 2] - drc[i__ * 3 - 3], (real) abs(i__1)) - >= corth[ixcor + (i__ + 2 << 2) - 5] && (i__2 = drc[i__ * + >= corth[ixcor + ((i__ + 2) << 2) - 5] && (i__2 = drc[i__ * 3 - 2] - drc[i__ * 3 - 1], (real) abs(i__2)) >= corth[ - ixcor + (i__ + 2 << 2) - 5]) { + ixcor + ((i__ + 2) << 2) - 5]) { irc[i__] = median_(&drc[i__ * 3 - 1], &drc[i__ * 3 - 2], &drc[ i__ * 3 - 3]); } diff --git a/codecs/lpc10/ivfilt.c b/codecs/lpc10/ivfilt.c index 98184e4f0..fc8adcc29 100755 --- a/codecs/lpc10/ivfilt.c +++ b/codecs/lpc10/ivfilt.c @@ -1,8 +1,11 @@ /* $Log$ -Revision 1.14 2003/02/12 13:59:15 matteo -mer feb 12 14:56:57 CET 2003 +Revision 1.15 2003/09/19 01:20:22 markster +Code cleanups (bug #66) + +Revision 1.2 2003/09/19 01:20:22 markster +Code cleanups (bug #66) Revision 1.1.1.1 2003/02/12 13:59:15 matteo mer feb 12 14:56:57 CET 2003 @@ -32,9 +35,12 @@ extern int ivfilt_(real *lpbuf, real *ivbuf, integer *len, integer *nsamp, real /* IVFILT Version 48 */ /* $Log$ - * Revision 1.14 2003/02/12 13:59:15 matteo - * mer feb 12 14:56:57 CET 2003 + * Revision 1.15 2003/09/19 01:20:22 markster + * Code cleanups (bug #66) * +/* Revision 1.2 2003/09/19 01:20:22 markster +/* Code cleanups (bug #66) +/* /* Revision 1.1.1.1 2003/02/12 13:59:15 matteo /* mer feb 12 14:56:57 CET 2003 /* @@ -97,7 +103,7 @@ extern int ivfilt_(real *lpbuf, real *ivbuf, integer *len, integer *nsamp, real /* Function Body */ for (i__ = 1; i__ <= 3; ++i__) { r__[i__ - 1] = 0.f; - k = i__ - 1 << 2; + k = (i__ - 1) << 2; i__1 = *len; for (j = (i__ << 2) + *len - *nsamp; j <= i__1; j += 2) { r__[i__ - 1] += lpbuf[j] * lpbuf[j - k]; diff --git a/codecs/lpc10/placea.c b/codecs/lpc10/placea.c index 7e705e7f1..3408f29a6 100755 --- a/codecs/lpc10/placea.c +++ b/codecs/lpc10/placea.c @@ -1,8 +1,11 @@ /* $Log$ -Revision 1.14 2003/02/12 13:59:15 matteo -mer feb 12 14:56:57 CET 2003 +Revision 1.15 2003/09/19 01:20:22 markster +Code cleanups (bug #66) + +Revision 1.2 2003/09/19 01:20:22 markster +Code cleanups (bug #66) Revision 1.1.1.1 2003/02/12 13:59:15 matteo mer feb 12 14:56:57 CET 2003 @@ -35,9 +38,12 @@ extern int placea_(integer *ipitch, integer *voibuf, integer *obound, integer *a /* PLACEA Version 48 */ /* $Log$ - * Revision 1.14 2003/02/12 13:59:15 matteo - * mer feb 12 14:56:57 CET 2003 + * Revision 1.15 2003/09/19 01:20:22 markster + * Code cleanups (bug #66) * +/* Revision 1.2 2003/09/19 01:20:22 markster +/* Code cleanups (bug #66) +/* /* Revision 1.1.1.1 2003/02/12 13:59:15 matteo /* mer feb 12 14:56:57 CET 2003 /* @@ -158,7 +164,7 @@ extern int placea_(integer *ipitch, integer *voibuf, integer *obound, integer *a allv = allv && voibuf[(*af << 1) + 1] == 1; allv = allv && voibuf[(*af << 1) + 2] == 1; winv = voibuf[(*af << 1) + 1] == 1 || voibuf[(*af << 1) + 2] == 1; - if (allv || winv && *obound == 0) { + if (allv || (winv && *obound == 0)) { /* APHASE: Phase synchronous window placement. */ /* Get minimum lower index of the window. */ i__ = (lrange + *ipitch - 1 - awin[((*af - 1) << 1) + 1]) / *ipitch; diff --git a/codecs/mp3/include/mhead.h b/codecs/mp3/include/mhead.h index 06b43efb1..37791d909 100755 --- a/codecs/mp3/include/mhead.h +++ b/codecs/mp3/include/mhead.h @@ -210,9 +210,8 @@ MPEG8; #include "itype.h" typedef void (*SBT_FUNCTION) (SAMPLEINT * sample, short *pcm, int n); -typedef void (*UNPACK_FUNCTION) (); -typedef struct +typedef struct MPEGI { struct { DEC_INFO decinfo; @@ -241,7 +240,7 @@ typedef struct signed short group9_table[1024][3]; int nsbt; SBT_FUNCTION sbt; - UNPACK_FUNCTION unpack_routine; + void (*unpack_routine) (struct MPEGI *); unsigned char *bs_ptr; UINT32 bitbuf; int bits; diff --git a/codecs/mp3/src/cupL1.c b/codecs/mp3/src/cupL1.c index 84b46d24d..3ffe16801 100755 --- a/codecs/mp3/src/cupL1.c +++ b/codecs/mp3/src/cupL1.c @@ -312,7 +312,7 @@ int L1audio_decode_init(MPEG *m, MPEG_HEAD * h, int framebytes_arg, /* init sub-band transform */ - sbt_init(); + sbt_init(m); return 1; } diff --git a/codecs/mp3/src/cupini.c b/codecs/mp3/src/cupini.c index afa19d575..f92d06284 100755 --- a/codecs/mp3/src/cupini.c +++ b/codecs/mp3/src/cupini.c @@ -189,7 +189,7 @@ static int out_chans[5] = int audio_decode_initL1(MPEG_HEAD * h, int framebytes_arg, int reduction_code, int transform_code, int convert_code, int freq_limit); -void sbt_init(); +void sbt_init(MPEG *m); IN_OUT L1audio_decode(void *mv, unsigned char *bs, signed short *pcm); @@ -404,7 +404,7 @@ int audio_decode_init(MPEG *m, MPEG_HEAD * h, int framebytes_arg, /* init sub-band transform */ - sbt_init(); + sbt_init(m); return 1; } diff --git a/codecs/mp3/src/cupl3.c b/codecs/mp3/src/cupl3.c index 7d387b65d..59ec37c7d 100755 --- a/codecs/mp3/src/cupl3.c +++ b/codecs/mp3/src/cupl3.c @@ -104,7 +104,7 @@ static void bitget_init_end(unsigned char *buf_end) bitdat.bs_ptr_end = buf_end; } /*------------- get n bits from bitstream -------------*/ -int bitget_bits_used() +int bitget_bits_used(void) { int n; /* compute bits used from last init call */ @@ -142,7 +142,7 @@ unsigned int bitget(int n) return x; } /*------------- get 1 bit from bitstream -------------*/ -unsigned int bitget_1bit() +unsigned int bitget_1bit(void) { unsigned int x; @@ -994,8 +994,6 @@ void sbt_init(MPEG *m); #if 0 typedef int iARRAY22[22]; #endif -iARRAY22 *quant_init_band_addr(); -iARRAY22 *msis_init_band_addr(); /*---------------------------------------------------------*/ /* mpeg_head defined in mhead.h frame bytes is without pad */ diff --git a/codecs/mp3/src/icdct.c b/codecs/mp3/src/icdct.c index a38c401dd..c2e30971f 100755 --- a/codecs/mp3/src/icdct.c +++ b/codecs/mp3/src/icdct.c @@ -49,7 +49,7 @@ static DCTCOEF coef32[32]; /* 32 pt dct coefs */ #define forward_bf idx_forward_bf /*--- #define forward_bf ptr_forward_bf ---*/ /*------------------------------------------------------------*/ -DCTCOEF *i_dct_coef_addr() +DCTCOEF *i_dct_coef_addr(void) { return coef32; } diff --git a/codecs/mp3/src/isbt.c b/codecs/mp3/src/isbt.c index bc240bdb9..7bd456653 100755 --- a/codecs/mp3/src/isbt.c +++ b/codecs/mp3/src/isbt.c @@ -100,10 +100,10 @@ static signed int vb_ptr; extern WININT vbuf[512]; extern WININT vbuf2[512]; -DCTCOEF *i_dct_coef_addr(); +DCTCOEF *i_dct_coef_addr(void); /*======================================================================*/ -static void gencoef() /* gen coef for N=32 */ +static void gencoef(void) /* gen coef for N=32 */ { int p, n, i, k; double t, pi; @@ -125,8 +125,8 @@ static void gencoef() /* gen coef for N=32 */ } } /*------------------------------------------------------------*/ -WINCOEF *i_wincoef_addr(); -static void genwincoef_q() /* gen int window coefs from floating table */ +WINCOEF *i_wincoef_addr(void); +static void genwincoef_q(void) /* gen int window coefs from floating table */ { int i, j, k, m; float x; @@ -166,12 +166,11 @@ static void genwincoef_q() /* gen int window coefs from floating table */ } } /*------------------------------------------------------------*/ -static void genwincoef() /* gen int window coefs from floating table */ +static void genwincoef(void) /* gen int window coefs from floating table */ { int i; float x; WINCOEF *iwincoef; - WINCOEF *i_wincoef_addr(); iwincoef = i_wincoef_addr(); @@ -186,7 +185,7 @@ static void genwincoef() /* gen int window coefs from floating table */ } } /*------------------------------------------------------------*/ -void i_sbt_init() +void i_sbt_init(void) { int i; static int first_pass = 1; diff --git a/codecs/mp3/src/iup.c b/codecs/mp3/src/iup.c index 8dd2fcc79..1fdd41b65 100755 --- a/codecs/mp3/src/iup.c +++ b/codecs/mp3/src/iup.c @@ -138,7 +138,7 @@ static int bat_bit_master[] = void i_sbt_mono(SAMPLEINT * sample, short *pcm, int n); void i_sbt_dual(SAMPLEINT * sample, short *pcm, int n); -static void unpack(); +static void unpack(MPEGI *m); /*------------- initialize bit getter -------------*/ static void load_init(MPEGI *m, unsigned char *buf) @@ -514,7 +514,7 @@ IN_OUT i_audio_decode(MPEGI *m, unsigned char *bs, signed short *pcm) if (sync != 0xFFF) return in_out; /* sync fail */ /*-----------*/ - m->iup.unpack_routine(); + m->iup.unpack_routine(m); m->iup.sbt(m->iup.sample, pcm, m->iup.nsbt); diff --git a/codecs/mp3/src/iupini.c b/codecs/mp3/src/iupini.c index 800103b56..616fd63d2 100755 --- a/codecs/mp3/src/iupini.c +++ b/codecs/mp3/src/iupini.c @@ -268,7 +268,7 @@ static void table_init(MPEGI *m) int i_audio_decode_initL1(MPEGI *m, MPEG_HEAD * h, int framebytes_arg, int reduction_code, int transform_code, int convert_code, int freq_limit); -void i_sbt_init(); +void i_sbt_init(void); /*---------------------------------------------------------*/ /* mpeg_head defined in mhead.h frame bytes is without pad */ diff --git a/codecs/mp3/src/iwinm.c b/codecs/mp3/src/iwinm.c index 6bd12b627..11cfef33a 100755 --- a/codecs/mp3/src/iwinm.c +++ b/codecs/mp3/src/iwinm.c @@ -49,7 +49,7 @@ WININT vbuf2[512]; static WINCOEF iwincoef[264]; /*==================================================================*/ -WINCOEF *i_wincoef_addr() +WINCOEF *i_wincoef_addr(void) { return iwincoef; } diff --git a/codecs/mp3/src/l3init.c b/codecs/mp3/src/l3init.c index c3e724b3d..290d4e317 100755 --- a/codecs/mp3/src/l3init.c +++ b/codecs/mp3/src/l3init.c @@ -140,7 +140,7 @@ int L3table_init(MPEG *m) } /*====================================================================*/ typedef float ARRAY36[36]; -ARRAY36 *hwin_init_addr(); +ARRAY36 *hwin_init_addr(MPEG *m); /*--------------------------------------------------------------------*/ void hwin_init(MPEG *m) @@ -200,8 +200,8 @@ void hwin_init(MPEG *m) } /*=============================================================*/ typedef float ARRAY4[4]; -IMDCT_INIT_BLOCK *imdct_init_addr_18(); -IMDCT_INIT_BLOCK *imdct_init_addr_6(); +IMDCT_INIT_BLOCK *imdct_init_addr_18(void); +IMDCT_INIT_BLOCK *imdct_init_addr_6(void); /*-------------------------------------------------------------*/ void imdct_init(MPEG *m) diff --git a/codecs/mp3/src/mdct.c b/codecs/mp3/src/mdct.c index 7e95317ef..fa1b92416 100755 --- a/codecs/mp3/src/mdct.c +++ b/codecs/mp3/src/mdct.c @@ -71,11 +71,11 @@ static IMDCT_INIT_BLOCK imdct_info_6 = {mdct6_3v, mdct6_3v2, &coef87}; /*====================================================================*/ -IMDCT_INIT_BLOCK *imdct_init_addr_18() +IMDCT_INIT_BLOCK *imdct_init_addr_18(void) { return &imdct_info_18; } -IMDCT_INIT_BLOCK *imdct_init_addr_6() +IMDCT_INIT_BLOCK *imdct_init_addr_6(void) { return &imdct_info_6; } diff --git a/db1-ast/hash/hash_func.c b/db1-ast/hash/hash_func.c index a5ec434ee..c18efad7e 100755 --- a/db1-ast/hash/hash_func.c +++ b/db1-ast/hash/hash_func.c @@ -45,13 +45,16 @@ static char sccsid[] = "@(#)hash_func.c 8.2 (Berkeley) 2/21/94"; #include "page.h" #include "extern.h" -static u_int32_t hash1 __P((const void *, size_t)); -static u_int32_t hash2 __P((const void *, size_t)); -static u_int32_t hash3 __P((const void *, size_t)); -static u_int32_t hash4 __P((const void *, size_t)); +/* only one of these can be defined */ +//#define HASH1_EJB 1 +//#define HASH2_PHONG 1 +//#define HASH3_SDBM 1 +#define HASH4_TOREK 1 + +static u_int32_t hashfunc __P((const void *, size_t)); /* Global default hash function */ -u_int32_t (*__default_hash) __P((const void *, size_t)) = hash4; +u_int32_t (*__default_hash) __P((const void *, size_t)) = hashfunc; /* * HASH FUNCTIONS @@ -62,11 +65,13 @@ u_int32_t (*__default_hash) __P((const void *, size_t)) = hash4; * This came from ejb's hsearch. */ +#ifdef HASH1_EJB + #define PRIME1 37 #define PRIME2 1048583 static u_int32_t -hash1(keyarg, len) +hashfunc(keyarg, len) const void *keyarg; register size_t len; { @@ -80,13 +85,16 @@ hash1(keyarg, len) return (h); } +#endif + +#ifdef HASH2_PHONG /* * Phong's linear congruential hash */ #define dcharhash(h, c) ((h) = 0x63c63cd9*(h) + 0x9c39c33d + (c)) static u_int32_t -hash2(keyarg, len) +hashfunc(keyarg, len) const void *keyarg; size_t len; { @@ -104,7 +112,9 @@ hash2(keyarg, len) } return (h); } +#endif +#ifdef HASH3_SDBM /* * This is INCREDIBLY ugly, but fast. We break the string up into 8 byte * units. On the first time through the loop we get the "leftover bytes" @@ -115,7 +125,7 @@ hash2(keyarg, len) * OZ's original sdbm hash */ static u_int32_t -hash3(keyarg, len) +hashfunc(keyarg, len) const void *keyarg; register size_t len; { @@ -160,10 +170,12 @@ hash3(keyarg, len) } return (h); } +#endif +#ifdef HASH4_TOREK /* Hash function from Chris Torek. */ static u_int32_t -hash4(keyarg, len) +hashfunc(keyarg, len) const void *keyarg; register size_t len; { @@ -210,3 +222,4 @@ hash4(keyarg, len) } return (h); } +#endif diff --git a/editline/histedit.h b/editline/histedit.h index 28b01944b..e387e3b81 100755 --- a/editline/histedit.h +++ b/editline/histedit.h @@ -59,9 +59,9 @@ typedef struct editline EditLine; * For user-defined function interface */ typedef struct lineinfo { - const char *buffer; - const char *cursor; - const char *lastchar; + char *buffer; + char *cursor; + char *lastchar; } LineInfo; diff --git a/utils/astman.c b/utils/astman.c index 2eb35f68e..a9dba8d61 100755 --- a/utils/astman.c +++ b/utils/astman.c @@ -427,7 +427,7 @@ static int get_user_input(char *msg, char *buf, int buflen) newtComponent ok; newtComponent cancel; newtComponent inpfield; - char *input; + const char *input; int res = -1; struct newtExitStruct es; @@ -550,8 +550,8 @@ static int login(char *hostname) newtComponent label; newtComponent ulabel; newtComponent plabel; - char *user; - char *pass; + const char *user; + const char *pass; struct message *m; struct newtExitStruct es; char tmp[55]; |