Description: make it compile with gcc15 Index: rplay/librplay/async.c =================================================================== --- rplay.orig/librplay/async.c 2025-09-13 10:31:31.070439344 +0200 +++ rplay/librplay/async.c 2025-09-13 10:31:31.066439342 +0200 @@ -40,7 +40,7 @@ # include #endif -typedef void (*cb)(); +typedef void (*cb)(int, int, char *); typedef struct obuf_s { @@ -48,7 +48,8 @@ char *data; char *current; int length; - cb callback; + //cb callback; + cb (callback); } obuf; typedef struct ibuf_s @@ -67,9 +68,11 @@ ibuf *itail; int writing; int notify_mask; - cb rcallback; + cb (rcallback); + //cb rcallback; int rraw; - cb wcallback; + //cb wcallback; + cb (wcallback); int wraw; } grp; @@ -306,10 +309,10 @@ rptp_async_register(int rptp_fd, int what, cb callback) #else void -rptp_async_register(rptp_fd, what, callback) - int rptp_fd; - int what; - cb callback; +rptp_async_register(int rptp_fd, int what, cb callback) +// int rptp_fd; +// int what; +// cb callback; #endif { if (rptp_fd < 0 || rptp_fd >= FD_SETSIZE) @@ -351,9 +354,9 @@ rptp_async_process(int rptp_fd, int what) #else void -rptp_async_process(rptp_fd, what) - int rptp_fd; - int what; +rptp_async_process(int rptp_fd, int what) +// int rptp_fd; +// int what; #endif { if (rptp_fd < 0 || rptp_fd >= FD_SETSIZE) @@ -366,14 +369,14 @@ { case RPTP_ASYNC_READ: if (group[rptp_fd].rraw && group[rptp_fd].rcallback) - (*group[rptp_fd].rcallback)(rptp_fd); + (*group[rptp_fd].rcallback)(rptp_fd, 0, ""); else read_proc(rptp_fd); break; case RPTP_ASYNC_WRITE: if (group[rptp_fd].wraw && group[rptp_fd].wcallback) - (*group[rptp_fd].wcallback)(rptp_fd); + (*group[rptp_fd].wcallback)(rptp_fd, 0, ""); else write_proc(rptp_fd); break; @@ -392,13 +395,13 @@ */ #ifdef __STDC__ void -rptp_async_notify(int rptp_fd, int mask, void (*callback)()) +rptp_async_notify(int rptp_fd, int mask, void (*callback)(int, int, char *)) #else void -rptp_async_notify(rptp_fd, mask, callback) - int rptp_fd; - int mask; - void (*callback)(); +rptp_async_notify(int rptp_fd, int mask, void (*callback)(int, int, char *)) +// int rptp_fd; +// int mask; +// void (*callback)(); #endif { char command[RPTP_MAX_LINE]; @@ -458,7 +461,7 @@ write_proc(int rptp_fd) #else static void -write_proc(rptp_fd) +write_proc(int rptp_fd) #endif { obuf *current; @@ -488,7 +491,7 @@ { if (current->callback) { - (*current->callback)(rptp_fd); + (*current->callback)(rptp_fd, 0, ""); } if (current->data) { @@ -517,7 +520,7 @@ read_proc(int rptp_fd) #else static void -read_proc(rptp_fd) +read_proc(int rptp_fd) #endif { char buffer[RPTP_MAX_LINE]; @@ -565,8 +568,7 @@ process_input(int rptp_fd) #else static void -process_input(rptp_fd) - int rptp_fd; +process_input(int rptp_fd) #endif { char *p; @@ -663,9 +665,7 @@ notify_line(int rptp_fd, char *line) #else static void -notify_line(rptp_fd, line) - int rptp_fd; - char *line; +notify_line(int rptp_fd, char *line) #endif { int what; @@ -731,13 +731,12 @@ do_register(int rptp_fd) #else static void -do_register(rptp_fd) - int rptp_fd; +do_register(int rptp_fd) #endif { if (group[rptp_fd].wcallback) { - (*group[rptp_fd].wcallback)(rptp_fd, RPTP_ASYNC_ENABLE); + (*group[rptp_fd].wcallback)(rptp_fd, RPTP_ASYNC_ENABLE, ""); } group[rptp_fd].writing = 1; } @@ -751,13 +750,12 @@ do_unregister(int rptp_fd) #else static void -do_unregister(rptp_fd) - int rptp_fd; +do_unregister(int rptp_fd) #endif { if (group[rptp_fd].wcallback) { - (*group[rptp_fd].wcallback)(rptp_fd, RPTP_ASYNC_DISABLE); + (*group[rptp_fd].wcallback)(rptp_fd, RPTP_ASYNC_DISABLE, ""); } group[rptp_fd].writing = 0; } Index: rplay/lib/hash.c =================================================================== --- rplay.orig/lib/hash.c 2025-09-13 10:31:31.070439344 +0200 +++ rplay/lib/hash.c 2025-09-13 10:31:31.066439342 +0200 @@ -289,8 +289,7 @@ * No errors are recoverable. */ void -hash_die (handle) - struct hash_control *handle; +hash_die (struct hash_control *handle) { free ((char *) handle->hash_where); free ((char *) handle); @@ -310,10 +309,7 @@ * until your buffer or hash_stat[] is exausted. */ void -hash_say (handle, buffer, bufsiz) - struct hash_control *handle; - int buffer[ /*bufsiz*/ ]; - int bufsiz; +hash_say (struct hash_control *handle, int buffer[ /*bufsiz*/ ], int bufsiz) { int *nd; /* limit of statistics block */ int *ip; /* scan statistics */ @@ -341,9 +337,7 @@ */ PTR /* NULL if string not in table, else */ /* returns value of deleted symbol */ -hash_delete (handle, string) - struct hash_control *handle; - const char *string; +hash_delete (struct hash_control *handle, const char *string) { PTR retval; struct hash_entry *entry; @@ -377,10 +371,7 @@ * in the table. */ PTR -hash_replace (handle, string, value) - struct hash_control *handle; - const char *string; - PTR value; +hash_replace (struct hash_control *handle, const char *string, PTR value) { struct hash_entry *entry; char *retval; @@ -408,10 +399,7 @@ */ const char * /* return error string */ -hash_insert (handle, string, value) - struct hash_control *handle; - const char *string; - PTR value; +hash_insert (struct hash_control *handle, const char *string, PTR value) { struct hash_entry *entry; const char *retval; @@ -453,10 +441,7 @@ * false if we inserted. */ const char * -hash_jam (handle, string, value) - struct hash_control *handle; - const char *string; - PTR value; +hash_jam (struct hash_control *handle, const char *string, PTR value) { const char *retval; struct hash_entry *entry; @@ -491,8 +476,7 @@ * Internal. */ static const char * -hash_grow (handle) /* make a hash table grow */ - struct hash_control *handle; +hash_grow (struct hash_control *handle) /* make a hash table grow */ { struct hash_entry *newwall; struct hash_entry *newwhere; @@ -630,9 +614,7 @@ * yet. (The function has no graceful failures.) */ char * -hash_apply (handle, function) - struct hash_control *handle; - char *(*function) (); +hash_apply (struct hash_control *handle, char *(*function)(const char *, PTR )) { struct hash_entry *entry; struct hash_entry *wall; @@ -655,9 +637,7 @@ * Return found value or NULL. */ PTR -hash_find (handle, string) - struct hash_control *handle; - const char *string; +hash_find (struct hash_control *handle, const char *string) { struct hash_entry *entry; @@ -678,10 +658,10 @@ * Internal. */ static struct hash_entry * /* string slot, may be empty or deleted */ -hash_ask (handle, string, access) - struct hash_control *handle; - const char *string; - int access; /* access type */ +hash_ask (struct hash_control *handle, const char *string, int access) +// struct hash_control *handle; +// const char *string; +// int access; /* access type */ { const char *string1; /* JF avoid strcmp calls */ const char *s; @@ -758,9 +738,7 @@ * Internal. */ static int -hash_code (handle, string) - struct hash_control *handle; - const char *string; +hash_code (struct hash_control *handle, const char *string) { long h; /* hash code built here */ long c; /* each character lands here */ @@ -899,8 +877,7 @@ } char * -what (description) - char *description; +what (char *description) { char *retval; char *malloc (); @@ -918,9 +895,7 @@ } char * -destroy (string, value) - char *string; - char *value; +destroy (char *string, char *value) { free (string); free (value); @@ -929,9 +904,7 @@ char * -applicatee (string, value) - char *string; - char *value; +applicatee (char *string, char *value) { printf ("%.20s-%.20s\n", string, value); return (NULL); Index: rplay/adpcm/g711.c =================================================================== --- rplay.orig/adpcm/g711.c 2025-09-13 10:31:31.070439344 +0200 +++ rplay/adpcm/g711.c 2025-09-13 10:31:31.066439342 +0200 @@ -76,10 +76,7 @@ 120, 121, 122, 123, 124, 125, 126, 127}; static int -search(val, table, size) - int val; - short *table; - int size; +search(int val, short *table, int size) { int i; @@ -110,8 +107,8 @@ * John Wiley & Sons, pps 98-111 and 472-476. */ unsigned char -linear2alaw(pcm_val) - int pcm_val; /* 2's complement (16-bit range) */ +linear2alaw(int pcm_val) +// int pcm_val; /* 2's complement (16-bit range) */ { int mask; int seg; @@ -146,8 +143,7 @@ * */ int -alaw2linear(a_val) - unsigned char a_val; +alaw2linear(unsigned char a_val) { int t; int seg; @@ -202,8 +198,8 @@ * John Wiley & Sons, pps 98-111 and 472-476. */ unsigned char -linear2ulaw(pcm_val) - int pcm_val; /* 2's complement (16-bit range) */ +linear2ulaw(int pcm_val) +// int pcm_val; /* 2's complement (16-bit range) */ { int mask; int seg; @@ -244,8 +240,7 @@ * original code word. This is in keeping with ISDN conventions. */ int -ulaw2linear(u_val) - unsigned char u_val; +ulaw2linear(unsigned char u_val) { int t; @@ -264,8 +259,7 @@ /* A-law to u-law conversion */ unsigned char -alaw2ulaw(aval) - unsigned char aval; +alaw2ulaw(unsigned char aval) { aval &= 0xff; return ((aval & 0x80) ? (0xFF ^ _a2u[aval ^ 0xD5]) : @@ -274,8 +268,7 @@ /* u-law to A-law conversion */ unsigned char -ulaw2alaw(uval) - unsigned char uval; +ulaw2alaw(unsigned char uval) { uval &= 0xff; return ((uval & 0x80) ? (0xD5 ^ (_u2a[0xFF ^ uval] - 1)) : Index: rplay/adpcm/g721.c =================================================================== --- rplay.orig/adpcm/g721.c 2025-09-13 10:31:31.070439344 +0200 +++ rplay/adpcm/g721.c 2025-09-13 10:31:31.066439342 +0200 @@ -77,10 +77,7 @@ * the resulting code. -1 is returned for unknown input coding value. */ int -g721_encoder(sl, in_coding, state_ptr) - int sl; - int in_coding; - struct g72x_state *state_ptr; +g721_encoder(int sl, int in_coding, struct g72x_state *state_ptr) { short sezi, se, sez; /* ACCUM */ short d; /* SUBTA */ @@ -134,10 +131,7 @@ * return -1 for unknown out_coding value. */ int -g721_decoder(i, out_coding, state_ptr) - int i; - int out_coding; - struct g72x_state *state_ptr; +g721_decoder(int i, int out_coding, struct g72x_state *state_ptr) { short sezi, sei, sez, se; /* ACCUM */ short y; /* MIX */ Index: rplay/adpcm/g72x.c =================================================================== --- rplay.orig/adpcm/g72x.c 2025-09-13 10:31:31.070439344 +0200 +++ rplay/adpcm/g72x.c 2025-09-13 10:31:31.066439342 +0200 @@ -46,10 +46,7 @@ * Using linear search for simple coding. */ static int -quan(val, table, size) - int val; - short *table; - int size; +quan(int val, short *table, int size) { int i; @@ -66,9 +63,7 @@ * "floating point" representation (4-bit exponent, 6-bit mantessa) "srn". */ static int -fmult(an, srn) - int an; - int srn; +fmult(int an, int srn) { short anmag, anexp, anmant; short wanexp, wanmag, wanmant; @@ -95,8 +90,7 @@ * All the initial state values are specified in the CCITT G.721 document. */ void -g72x_init_state(state_ptr) - struct g72x_state *state_ptr; +g72x_init_state(struct g72x_state *state_ptr) { int cnta; @@ -124,8 +118,7 @@ * */ int -predictor_zero(state_ptr) - struct g72x_state *state_ptr; +predictor_zero(struct g72x_state *state_ptr) { int i; int sezi; @@ -142,8 +135,7 @@ * */ int -predictor_pole(state_ptr) - struct g72x_state *state_ptr; +predictor_pole(struct g72x_state *state_ptr) { return (fmult(state_ptr->a[1] >> 2, state_ptr->sr[1]) + fmult(state_ptr->a[0] >> 2, state_ptr->sr[0])); @@ -155,8 +147,7 @@ * */ int -step_size(state_ptr) - struct g72x_state *state_ptr; +step_size(struct g72x_state *state_ptr) { int y; int dif; @@ -186,11 +177,11 @@ * as a subtraction. */ int -quantize(d, y, table, size) - int d; /* Raw difference signal sample */ - int y; /* Step size multiplier */ - short *table; /* quantization table */ - int size; /* table size of short integers */ +quantize(int d, int y, short *table, int size) +// int d; /* Raw difference signal sample */ +// int y; /* Step size multiplier */ +// short *table; /* quantization table */ +// int size; /* table size of short integers */ { short dqm; /* Magnitude of 'd' */ short exp; /* Integer part of base 2 log of 'd' */ @@ -237,10 +228,10 @@ * Multiplication is performed in log base 2 domain as addition. */ int -reconstruct(sign, dqln, y) - int sign; /* 0 for non-negative value */ - int dqln; /* G.72x codeword */ - int y; /* Step size multiplier */ +reconstruct(int sign, int dqln, int y) +// int sign; /* 0 for non-negative value */ +// int dqln; /* G.72x codeword */ +// int y; /* Step size multiplier */ { short dql; /* Log of 'dq' magnitude */ short dex; /* Integer part of log */ @@ -266,15 +257,15 @@ * updates the state variables for each output code */ void -update(code_size, y, wi, fi, dq, sr, dqsez, state_ptr) - int code_size; /* distinguish 723_40 with others */ - int y; /* quantizer step size */ - int wi; /* scale factor multiplier */ - int fi; /* for long/short term energies */ - int dq; /* quantized prediction difference */ - int sr; /* reconstructed signal */ - int dqsez; /* difference from 2-pole predictor */ - struct g72x_state *state_ptr; /* coder state pointer */ +update(int code_size, int y, int wi, int fi, int dq, int sr, int dqsez, struct g72x_state *state_ptr) +// int code_size; /* distinguish 723_40 with others */ +// int y; /* quantizer step size */ +// int wi; /* scale factor multiplier */ +// int fi; /* for long/short term energies */ +// int dq; /* quantized prediction difference */ +// int sr; /* reconstructed signal */ +// int dqsez; /* difference from 2-pole predictor */ +// struct g72x_state *state_ptr; /* coder state pointer */ { int cnt; short mag, exp, mant; /* Adaptive predictor, FLOAT A */ @@ -474,13 +465,13 @@ * adjusted A-law or u-law compressed sample. */ int -tandem_adjust_alaw(sr, se, y, i, sign, qtab) - int sr; /* decoder output linear PCM sample */ - int se; /* predictor estimate sample */ - int y; /* quantizer step size */ - int i; /* decoder input code */ - int sign; - short *qtab; +tandem_adjust_alaw(int sr, int se, int y, int i, int sign, short *qtab) +// int sr; /* decoder output linear PCM sample */ +// int se; /* predictor estimate sample */ +// int y; /* quantizer step size */ +// int i; /* decoder input code */ +// int sign; +// short *qtab; { unsigned char sp; /* A-law compressed 8-bit code */ short dx; /* prediction error */ @@ -523,13 +514,13 @@ } int -tandem_adjust_ulaw(sr, se, y, i, sign, qtab) - int sr; /* decoder output linear PCM sample */ - int se; /* predictor estimate sample */ - int y; /* quantizer step size */ - int i; /* decoder input code */ - int sign; - short *qtab; +tandem_adjust_ulaw(int sr, int se, int y, int i, int sign, short *qtab) +// int sr; /* decoder output linear PCM sample */ +// int se; /* predictor estimate sample */ +// int y; /* quantizer step size */ +// int i; /* decoder input code */ +// int sign; +// short *qtab; { unsigned char sp; /* u-law compressed 8-bit code */ short dx; /* prediction error */ Index: rplay/adpcm/decode.c =================================================================== --- rplay.orig/adpcm/decode.c 2025-09-13 10:31:31.070439344 +0200 +++ rplay/adpcm/decode.c 2025-09-13 10:31:31.066439342 +0200 @@ -15,9 +15,7 @@ * Returns 1 if there is residual input, returns -1 if eof, else returns 0. */ int -unpack_input(code, bits) - unsigned char *code; - int bits; +unpack_input(unsigned char *code, int bits) { static unsigned int in_buffer = 0; static int in_bits = 0; @@ -38,9 +36,7 @@ } -int main(argc, argv) - int argc; - char **argv; +int main(int argc, char **argv) { short sample; unsigned char code; @@ -48,7 +44,7 @@ struct g72x_state state; int out_coding; int out_size; - int (*dec_routine)(); + int (*dec_routine)(int, int, struct g72x_state *); int dec_bits; g72x_init_state(&state); Index: rplay/adpcm/g723_24.c =================================================================== --- rplay.orig/adpcm/g723_24.c 2025-09-13 10:31:31.070439344 +0200 +++ rplay/adpcm/g723_24.c 2025-09-13 10:31:31.066439342 +0200 @@ -67,10 +67,7 @@ * Returns -1 if invalid input coding value. */ int -g723_24_encoder(sl, in_coding, state_ptr) - int sl; - int in_coding; - struct g72x_state *state_ptr; +g723_24_encoder(int sl, int in_coding, struct g72x_state *state_ptr) { short sei, sezi, se, sez; /* ACCUM */ short d; /* SUBTA */ @@ -122,10 +119,7 @@ * -1 is returned if the output coding is unknown. */ int -g723_24_decoder(i, out_coding, state_ptr) - int i; - int out_coding; - struct g72x_state *state_ptr; +g723_24_decoder(int i, int out_coding, struct g72x_state *state_ptr) { short sezi, sei, sez, se; /* ACCUM */ short y; /* MIX */ Index: rplay/adpcm/g723_40.c =================================================================== --- rplay.orig/adpcm/g723_40.c 2025-09-13 10:31:31.070439344 +0200 +++ rplay/adpcm/g723_40.c 2025-09-13 10:31:31.066439342 +0200 @@ -84,10 +84,7 @@ * Returns -1 if the input coding value is invalid. */ int -g723_40_encoder(sl, in_coding, state_ptr) - int sl; - int in_coding; - struct g72x_state *state_ptr; +g723_40_encoder(int sl, int in_coding, struct g72x_state *state_ptr) { short sei, sezi, se, sez; /* ACCUM */ short d; /* SUBTA */ @@ -140,10 +137,7 @@ * -1 is returned if the output coding is unknown. */ int -g723_40_decoder(i, out_coding, state_ptr) - int i; - int out_coding; - struct g72x_state *state_ptr; +g723_40_decoder(int i, int out_coding, struct g72x_state *state_ptr) { short sezi, sei, sez, se; /* ACCUM */ short y, dif; /* MIX */ Index: rplay/rplay/rplay.c =================================================================== --- rplay.orig/rplay/rplay.c 2025-09-13 10:31:31.070439344 +0200 +++ rplay/rplay/rplay.c 2025-09-15 00:15:19.161734675 +0200 @@ -93,10 +93,10 @@ typedef int (*PLAY_FUNC) (); #endif -void doit(), play(), usage(), interrupt(); -int server_has_sound(); -char *info2str(); -int play_with_flow(), play_with_play(); +void doit(char *), play(int, char *, int, RPLAY *, PLAY_FUNC *), usage(), interrupt(int); +int server_has_sound(int, char *, int); +char *info2str(char *); +int play_with_flow(int, char *, int, RPLAY *, int), play_with_play(int, char *, int, RPLAY *, int); RPLAY *rp; char cwd[MAXPATHLEN]; @@ -108,9 +108,7 @@ #ifdef __STDC__ int main(int argc, char **argv) #else -int main(argc, argv) - int argc; - char **argv; +int main(int argc, char **argv) #endif { int i, n, c, command, volume, val; @@ -406,8 +404,7 @@ doit(char *hostp) #else void -doit(hostp) - char *hostp; +doit(char *hostp) #endif { PLAY_FUNC *play_table; @@ -923,7 +920,7 @@ } void -interrupt() +interrupt(int not_used) { interrupted++; fprintf(stderr, "rplay: *interrupt*\n"); Index: rplay/lib/tilde.c =================================================================== --- rplay.orig/lib/tilde.c 2025-09-13 10:31:31.070439344 +0200 +++ rplay/lib/tilde.c 2025-09-13 10:31:31.066439342 +0200 @@ -48,9 +48,9 @@ #endif /* USG && !defined (HAVE_GETPW_DECLS) */ #if !defined (savestring) -extern char *xmalloc (); +extern char *xmalloc (int); # ifndef strcpy -extern char *strcpy (); +extern char *strcpy (char *, const char *); # endif #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) #endif /* !savestring */ @@ -64,9 +64,9 @@ #endif /* !NULL */ #if defined (TEST) || defined (STATIC_MALLOC) -static char *xmalloc (), *xrealloc (); +static char *xmalloc (int), *xrealloc (char *, int); #else -extern char *xmalloc (), *xrealloc (); +extern char *xmalloc (int), *xrealloc (char *, int); #endif /* TEST || STATIC_MALLOC */ /* The default value of tilde_additional_prefixes. This is set to @@ -101,9 +101,7 @@ the tilde which starts the expansion. Place the length of the text which identified this tilde starter in LEN, excluding the tilde itself. */ static int -tilde_find_prefix (string, len) - char *string; - int *len; +tilde_find_prefix (char *string, int *len) { register int i, j, string_len; register char **prefixes = tilde_additional_prefixes; @@ -134,8 +132,7 @@ /* Find the end of a tilde expansion in STRING, and return the index of the character which ends the tilde definition. */ static int -tilde_find_suffix (string) - char *string; +tilde_find_suffix (char *string) { register int i, j, string_len; register char **suffixes = tilde_additional_suffixes; @@ -158,10 +155,9 @@ /* Return a new string which is the result of tilde expanding STRING. */ char * -tilde_expand (string) - char *string; +tilde_expand (char *string) { - char *result, *tilde_expand_word (); + char *result, *tilde_expand_word (char *); int result_size, result_index; result_size = result_index = 0; @@ -221,8 +217,7 @@ /* Do the work of tilde expansion on FILENAME. FILENAME starts with a tilde. If there is no expansion, call tilde_expansion_failure_hook. */ char * -tilde_expand_word (filename) - char *filename; +tilde_expand_word (char *filename) { char *dirname; @@ -312,9 +307,7 @@ #undef NULL #include -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { char *result, line[512]; int done = 0; @@ -345,8 +338,7 @@ static void memory_error_and_abort (); static char * -xmalloc (bytes) - int bytes; +xmalloc (int bytes) { char *temp = (char *)malloc (bytes); @@ -356,9 +348,7 @@ } static char * -xrealloc (pointer, bytes) - char *pointer; - int bytes; +xrealloc (char *pointer, int bytes) { char *temp; Index: rplay/include/rplay.h =================================================================== --- rplay.orig/include/rplay.h 2025-09-13 10:31:31.070439344 +0200 +++ rplay/include/rplay.h 2025-09-13 10:31:31.066439342 +0200 @@ -274,10 +274,10 @@ extern int rptp_getline (int rptp_fd, char *buf, int nbytes); extern int rptp_command (int rptp_fd, char *command, char *response, int response_size); extern char *rptp_parse (char *response, char *name); -extern int rptp_async_putline (int rptp_fd, void (*callback)(), char *fmt, ...); -extern int rptp_async_write (int rptp_fd, void (*callback)(), char *ptr, int nbytes); -extern void rptp_async_register(int rptp_fd, int what, void (*callback)()); -extern void rptp_async_notify (int rptp_fd, int mask, void (*callback)()); +extern int rptp_async_putline (int rptp_fd, void (*callback)(int, int, char *), char *fmt, ...); +extern int rptp_async_write (int rptp_fd, void (*callback)(int, int, char *), char *ptr, int nbytes); +extern void rptp_async_register(int rptp_fd, int what, void (*callback)(int, int, char *)); +extern void rptp_async_notify (int rptp_fd, int mask, void (*callback)(int, int, char *)); extern void rptp_async_process (int rptp_fd, int what); extern int rptp_main_loop (void); extern void rptp_stop_main_loop (int); Index: rplay/lib/tilde.h =================================================================== --- rplay.orig/lib/tilde.h 2025-09-13 10:31:31.070439344 +0200 +++ rplay/lib/tilde.h 2025-09-15 08:51:31.347019197 +0200 @@ -8,7 +8,7 @@ # define __FUNCTION_DEF typedef int Function (); typedef void VFunction (); -typedef char *CPFunction (); +typedef char *CPFunction (char *); typedef char **CPPFunction (); #endif /* _FUNCTION_DEF */ @@ -29,10 +29,10 @@ extern char **tilde_additional_suffixes; /* Return a new string which is the result of tilde expanding STRING. */ -extern char *tilde_expand (); +extern char *tilde_expand (char *); /* Do the work of tilde expansion on FILENAME. FILENAME starts with a tilde. If there is no expansion, call tilde_expansion_failure_hook. */ -extern char *tilde_expand_word (); +extern char *tilde_expand_word (char *); #endif /* __TILDE_H__ */ Index: rplay/adpcm/encode.c =================================================================== --- rplay.orig/adpcm/encode.c 2025-09-13 10:31:31.070439344 +0200 +++ rplay/adpcm/encode.c 2025-09-13 10:31:31.066439342 +0200 @@ -15,9 +15,7 @@ * Returns 1 if there is residual output, else returns 0. */ int -pack_output(code, bits) - unsigned code; - int bits; +pack_output(unsigned code, int bits) { static unsigned int out_buffer = 0; static int out_bits = 0; @@ -35,9 +33,7 @@ } -int main(argc, argv) - int argc; - char **argv; +int main(int argc, char **argv) { struct g72x_state state; unsigned char sample_char; @@ -47,7 +43,7 @@ int in_coding; int in_size; unsigned *in_buf; - int (*enc_routine)(); + int (*enc_routine)(int, int, struct g72x_state *); int enc_bits; g72x_init_state(&state); Index: rplay/rplayd/cdrom.h =================================================================== --- rplay.orig/rplayd/cdrom.h 2025-09-13 10:31:31.070439344 +0200 +++ rplay/rplayd/cdrom.h 2025-09-13 10:31:31.066439342 +0200 @@ -50,7 +50,8 @@ #ifdef __STDC_ extern void cdrom_reader (int index, int starting_track, int ending_track, int output_fd); #else -extern void cdrom_reader (/* int index, int starting_track, int ending_track, int output_fd */); +extern void cdrom_reader (int index, int starting_track, int ending_track, int output_fd); +//extern void cdrom_reader (/* int index, int starting_track, int ending_track, int output_fd */); #endif #endif /* HAVE_CDROM */ Index: rplay/rplayd/helper.h =================================================================== --- rplay.orig/rplayd/helper.h 2025-09-13 10:31:31.070439344 +0200 +++ rplay/rplayd/helper.h 2025-09-13 10:31:31.066439342 +0200 @@ -55,9 +55,9 @@ extern HELPER *helpers; -extern void helper_read (/* char *filename */); -extern void helper_stat (/* char *filename */); -extern HELPER *helper_lookup (/* char *sound */); +extern void helper_read (char *filename); +extern void helper_stat (char *filename); +extern HELPER *helper_lookup (char *sound); #endif /* HAVE_HELPERS */ #endif /* _helper_h */ Index: rplay/rplayd/misc.c =================================================================== --- rplay.orig/rplayd/misc.c 2025-09-13 10:31:31.070439344 +0200 +++ rplay/rplayd/misc.c 2025-09-13 10:31:31.066439342 +0200 @@ -549,24 +549,21 @@ } unsigned short -little_short(p) - char *p; +little_short(char *p) { return (((unsigned long) (((unsigned char *) p)[1])) << 8) | ((unsigned long) (((unsigned char *) p)[0])); } unsigned short -big_short(p) - char *p; +big_short(char *p) { return (((unsigned long) (((unsigned char *) p)[0])) << 8) | ((unsigned long) (((unsigned char *) p)[1])); } unsigned long -little_long(p) - char *p; +little_long(char *p) { return (((unsigned long) (((unsigned char *) p)[3])) << 24) | (((unsigned long) (((unsigned char *) p)[2])) << 16) | @@ -575,8 +572,7 @@ } unsigned long -big_long(p) - char *p; +big_long(char *p) { return (((unsigned long) (((unsigned char *) p)[0])) << 24) | (((unsigned long) (((unsigned char *) p)[1])) << 16) | @@ -631,8 +627,8 @@ ****************************************************************/ double -ConvertFromIeeeExtended(bytes) - unsigned char *bytes; /* LCN */ +ConvertFromIeeeExtended(unsigned char *bytes) +// unsigned char *bytes; /* LCN */ { double f; int expon; Index: rplay/rplayd/misc.h =================================================================== --- rplay.orig/rplayd/misc.h 2025-09-13 10:31:31.070439344 +0200 +++ rplay/rplayd/misc.h 2025-09-13 10:31:31.066439342 +0200 @@ -67,10 +67,10 @@ extern char *audio_port_to_string ( /* int port */ ); #endif -unsigned short little_short ( /* char *p */ ); -unsigned short big_short ( /* char *p */ ); -unsigned long little_long ( /* char *p */ ); -unsigned long big_long ( /* char *p */ ); -double ConvertFromIeeeExtended ( /* unsigned char *bytes */ ); +unsigned short little_short (char *p); +unsigned short big_short (char *p); +unsigned long little_long (char *p); +unsigned long big_long (char *p); +double ConvertFromIeeeExtended (unsigned char *bytes); #endif /* _misc_h */ Index: rplay/rplayd/native.c =================================================================== --- rplay.orig/rplayd/native.c 2025-09-13 10:31:30.994439300 +0200 +++ rplay/rplayd/native.c 2025-09-14 23:51:22.689477479 +0200 @@ -35,23 +35,23 @@ /* Native means 16-bit signed. */ -static int ulaw_to_native( /* SPOOL *sp, char *native_buf, int nsamples, int nchannels */ ); -static int s8_to_native( /* SPOOL *sp, char *native_buf, int nsamples, int nchannels */ ); -static int u8_to_native( /* SPOOL *sp, char *native_buf, int nsamples, int nchannels */ ); -static int big_s16_to_native( /* SPOOL *sp, char *native_buf, int nsamples, int nchannels */ ); -static int big_u16_to_native( /* SPOOL *sp, char *native_buf, int nsamples, int nchannels */ ); -static int little_s16_to_native( /* SPOOL *sp, char *native_buf, int nsamples, int nchannels */ ); -static int little_u16_to_native( /* SPOOL *sp, char *native_buf, int nsamples, int nchannels */ ); -static int native_to_native( /* SPOOL *sp, char *native_buf, int nsamples, int nchannels */ ); -static int native_to_ulaw( /* char *native_buf, int nsamples, int nchannels */ ); -static int native_to_s8( /* char *native_buf, int nsamples, int nchannels */ ); -static int native_to_u8( /* char *native_buf, int nsamples, int nchannels */ ); -static int native_to_s16( /* char *native_buf, int nsamples, int nchannels */ ); -static int native_to_u16( /* char *native_buf, int nsamples, int nchannels */ ); -static int native_to_g721( /* char *native_buf, int nsamples, int nchannels */ ); -static int native_to_g723_3( /* char *native_buf, int nsamples, int nchannels */ ); -static int native_to_g723_5( /* char *native_buf, int nsamples, int nchannels */ ); -static int native_to_gsm( /* char *native_buf, int nsamples, int nchannels */ ); +static int ulaw_to_native(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int s8_to_native(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int u8_to_native(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int big_s16_to_native(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int big_u16_to_native(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int little_s16_to_native(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int little_u16_to_native(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int native_to_native(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int native_to_ulaw(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int native_to_s8(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int native_to_u8(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int native_to_s16(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int native_to_u16(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int native_to_g721(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int native_to_g723_3(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int native_to_g723_5(SPOOL *sp, char *native_buf, int nsamples, int nchannels); +static int native_to_gsm(SPOOL *sp, char *native_buf, int nsamples, int nchannels); /* Setup the to and from native table. */ NATIVE_TABLE native_table[] = @@ -94,20 +94,14 @@ /* Initialize the native audio buffer. */ void -zero_native(native_buf, nsamples, nchannels) - char *native_buf; - int nsamples; - int nchannels; +zero_native(char *native_buf, int nsamples, int nchannels) { memset(native_buf, 0, nsamples * nchannels * 2); /* 2 == 16-bit */ } void -level(native_buf, nsamples, nchannels) - char *native_buf; - int nsamples; - int nchannels; +level(char *native_buf, int nsamples, int nchannels) { short *p = (short *) native_buf, sample; int n = nsamples * nchannels; @@ -166,10 +160,7 @@ #ifdef FAKE_VOLUME /* Simulate hardware volume control. */ void -fake_volume(native_buf, nsamples, nchannels) - char *native_buf; - int nsamples; - int nchannels; +fake_volume(char *native_buf, int nsamples, int nchannels) { short *p = (short *) native_buf; int n = nsamples * nchannels; @@ -246,14 +237,13 @@ } \ } + +//XXX org: FUNC (SPOOL *sp, short *native_buf, int nsamples, int nchannels) + /* Return 0 when the sound is over, otherwise return 1. */ #define x_to_native(FUNC, SAMPLE_TO_NATIVE) \ static int \ -FUNC (sp, native_buf, nsamples, nchannels) \ - SPOOL *sp; \ - short *native_buf; \ - int nsamples; \ - int nchannels; \ +FUNC (SPOOL *sp, char *native_buf, int nsamples, int nchannels) \ { \ SOUND *curr_sound; \ short new_volume; \ @@ -394,11 +384,8 @@ linear = (*((short *) sp->ptr + curr_channel)) ) - static int - native_to_ulaw(native_buf, nsamples, nchannels) - char *native_buf; - int nsamples; - int nchannels; +static int +native_to_ulaw(SPOOL *sp, char *native_buf, int nsamples, int nchannels) { short *from = (short *) native_buf; char *to = (char *) native_buf; @@ -413,10 +400,7 @@ } static int -native_to_s8(native_buf, nsamples, nchannels) - char *native_buf; - int nsamples; - int nchannels; +native_to_s8(SPOOL *sp, char *native_buf, int nsamples, int nchannels) { short *from = (short *) native_buf; char *to = (char *) native_buf; @@ -431,10 +415,7 @@ } static int -native_to_u8(native_buf, nsamples, nchannels) - char *native_buf; - int nsamples; - int nchannels; +native_to_u8(SPOOL *sp, char *native_buf, int nsamples, int nchannels) { short *from = (short *) native_buf; char *to = (char *) native_buf; @@ -449,20 +430,14 @@ } static int -native_to_s16(native_buf, nsamples, nchannels) - char *native_buf; - int nsamples; - int nchannels; +native_to_s16(SPOOL *sp, char *native_buf, int nsamples, int nchannels) { /* The native audio buffer is already signed 16-bit. */ return 0; } static int -native_to_u16(native_buf, nsamples, nchannels) - char *native_buf; - int nsamples; - int nchannels; +native_to_u16(SPOOL *sp, char *native_buf, int nsamples, int nchannels) { short *from = (short *) native_buf; short *to = (short *) native_buf; @@ -478,30 +453,21 @@ #ifdef HAVE_ADPCM static int -native_to_g721(native_buf, nsamples, nchannels) - char *native_buf; - int nsamples; - int nchannels; +native_to_g721(SPOOL *sp, char *native_buf, int nsamples, int nchannels) { /* NOT SUPPORTED */ return 0; } static int -native_to_g723_3(native_buf, nsamples, nchannels) - char *native_buf; - int nsamples; - int nchannels; +native_to_g723_3(SPOOL *sp, char *native_buf, int nsamples, int nchannels) { /* NOT SUPPORTED */ return 0; } static int -native_to_g723_5(native_buf, nsamples, nchannels) - char *native_buf; - int nsamples; - int nchannels; +native_to_g723_5(SPOOL *sp, char *native_buf, int nsamples, int nchannels) { /* NOT SUPPORTED */ return 0; @@ -510,10 +476,7 @@ #ifdef HAVE_GSM static int -native_to_gsm(native_buf, nsamples, nchannels) - char *native_buf; - int nsamples; - int nchannels; +native_to_gsm(SPOOL *sp, char *native_buf, int nsamples, int nchannels) { /* NOT SUPPORTED */ return 0; Index: rplay/rplayd/native.h =================================================================== --- rplay.orig/rplayd/native.h 2025-09-07 11:22:11.455470614 +0200 +++ rplay/rplayd/native.h 2025-09-14 23:34:19.585313905 +0200 @@ -32,7 +32,8 @@ #include "spool.h" #ifdef __STDC__ -typedef int (*NATIVE_FUNC) (char *, int, int); +//XXX original: typedef int (*NATIVE_FUNC) (char *, int, int); +typedef int (*NATIVE_FUNC) (SPOOL *, char *, int, int); #else typedef int (*NATIVE_FUNC) (); #endif @@ -45,11 +46,11 @@ NATIVE_TABLE; extern NATIVE_TABLE native_table[]; -extern void zero_native ( /* char *native_buf, int nsamples, int nchannels */ ); -extern void level ( /* char *native_buf, int nsamples, int nchannels */ ); +extern void zero_native (char *native_buf, int nsamples, int nchannels); +extern void level (char *native_buf, int nsamples, int nchannels); #ifdef FAKE_VOLUME -extern void fake_volume ( /* char *native_buf, int nsamples, int nchannels */ ); +extern void fake_volume (char *native_buf, int nsamples, int nchannels); #endif /* FAKE_VOLUME */ #endif /* _native_h */ Index: rplay/rplayd/rplayd.c =================================================================== --- rplay.orig/rplayd/rplayd.c 2025-09-13 10:31:31.054439335 +0200 +++ rplay/rplayd/rplayd.c 2025-09-14 23:58:03.509544480 +0200 @@ -288,7 +288,7 @@ #endif #endif -extern char *ctime(); +//extern char *ctime(); #ifdef __STDC__ static void do_option_file(char *option_file); static void do_option(int option_value); @@ -298,9 +298,9 @@ #endif static void doit(); static void handle_signals(); -static void handle_sighup(); -static void handle_sigint(); -static void handle_sigchld(); +static void handle_sighup(int); +static void handle_sigint(int); +static void handle_sigchld(int); static void reset(); static void audio_test(); @@ -309,7 +309,7 @@ #if defined(HAVE_CDROM) || defined(HAVE_HELPERS) #ifdef __STDC__ -void rplayd_pipe_read( /* fd_set *rfds */ ); +void rplayd_pipe_read(fd_set *rfds); #else void rplayd_pipe_read( /* fd_set *rfds */ ); #endif @@ -2066,21 +2066,21 @@ static void -handle_sighup() +handle_sighup(int notused) { report(REPORT_DEBUG, "received SIGHUP signal\n"); need_reset(); } static void -handle_sigint() +handle_sigint(int notused) { report(REPORT_DEBUG, "received SIGINT signal\n"); done(0); } static void -handle_sigchld() +handle_sigchld(int notused) { pid_t pid; SPOOL *sp; Index: rplay/rplayd/sound.c =================================================================== --- rplay.orig/rplayd/sound.c 2025-09-13 10:31:31.054439335 +0200 +++ rplay/rplayd/sound.c 2025-09-15 00:20:46.005797078 +0200 @@ -2319,11 +2319,7 @@ /* This routine is based on the unpack_input routine from Sun's CCITT ADPCM decoder. */ static int -adpcm_unpack(si, b, code, bits) - SINDEX *si; - BUFFER *b; - unsigned char *code; - int bits; +adpcm_unpack(SINDEX *si, BUFFER *b, unsigned char *code, int bits) { unsigned char in_byte; @@ -2348,11 +2344,11 @@ /* Uncompress the `data' buffers into 16-bit linear data. */ static void -adpcm_decode(si, data, decode_routine, decode_bits) - SINDEX *si; - BUFFER *data; - int (*decode_routine) (); - int decode_bits; +adpcm_decode(SINDEX *si, BUFFER *data, int (*decode_routine)(int, int, struct g72x_state *), int decode_bits) +// SINDEX *si; +// BUFFER *data; +// int (*decode_routine) (); +// int decode_bits; { BUFFER *b = buffer_create(); short *ptr; @@ -2390,9 +2386,7 @@ #ifdef HAVE_GSM /* Uncompress the `data' buffers into 16-bit linear data. */ static void -gsm_uncompress(si, data) - SINDEX *si; - BUFFER *data; +gsm_uncompress(SINDEX *si, BUFFER *data) { BUFFER *b = buffer_create(); gsm_signal sample[160]; Index: rplay/rplayd/spool.h =================================================================== --- rplay.orig/rplayd/spool.h 2025-09-07 11:22:11.455470614 +0200 +++ rplay/rplayd/spool.h 2025-09-15 12:52:31.953127350 +0200 @@ -44,6 +44,9 @@ #define SPOOL_MIN_ID 1 #define SPOOL_MAX_ID 999 +struct _spool; +typedef struct _spool SPOOL; + typedef struct _spool { struct _spool *next; @@ -69,7 +72,7 @@ double sample_factor; /* Factor to increase the sample index by. */ double oversample[2]; /* The current sample value when oversampling */ double oversample_inc[2]; /* The delta to increase the oversample with */ - int (*to_native) (); /* Convert curr_sound samples to native. */ + int (*to_native) (SPOOL *, char *, int, int); /* Convert curr_sound samples to native. */ int skip_count; /* skip curr_sound */ int auto_pause; /* pause before play */ int notify_position; /* notify clients needing position information */ Index: rplay/rplayd/spool.c =================================================================== --- rplay.orig/rplayd/spool.c 2025-09-13 10:31:31.054439335 +0200 +++ rplay/rplayd/spool.c 2025-09-15 14:35:37.230804354 +0200 @@ -1249,7 +1249,7 @@ /* Convert rplay_audio_buf to the audio device format. */ (*native_table[rplay_audio_format].from_native[RPLAY_AUDIO_BYTE_ORDER - 1]) - (rplay_audio_buf, nsamples, rplay_audio_channels); + (sp, rplay_audio_buf, nsamples, rplay_audio_channels); rplay_audio_size = nbytes; } Index: rplay/rplayd/timer.c =================================================================== --- rplay.orig/rplayd/timer.c 2025-09-13 10:31:31.054439335 +0200 +++ rplay/rplayd/timer.c 2025-09-15 14:39:31.962911226 +0200 @@ -40,7 +40,7 @@ int timer_enabled = 0; void -timer_update() +timer_update(int dummy) { #ifdef HAVE_OSS int bytes = rplay_audio_getospace_bytes(); Index: rplay/rplayd/timer.h =================================================================== --- rplay.orig/rplayd/timer.h 2025-09-07 11:22:11.455470614 +0200 +++ rplay/rplayd/timer.h 2025-09-15 14:43:21.295018682 +0200 @@ -37,7 +37,7 @@ extern int timer_enabled; #ifdef __STDC__ -extern void timer_update (); +extern void timer_update (int dummy); extern void timer_init (); extern void timer_block (); extern void timer_unblock (); @@ -45,7 +45,7 @@ extern void timer_restart (int interval); extern void timer_stop (); #else -extern void timer_update (); +extern void timer_update (int dummy); extern void timer_init (); extern void timer_block (); extern void timer_unblock (); Index: rplay/rplayd/xhash.h =================================================================== --- rplay.orig/rplayd/xhash.h 2025-09-07 11:22:11.455470614 +0200 +++ rplay/rplayd/xhash.h 2025-09-15 14:52:47.511276959 +0200 @@ -37,7 +37,7 @@ extern void xhash_replace (char *hash_key, char *data); extern void xhash_delete (char *hash_key); extern char *xhash_name (char *pathname); -extern void xhash_apply (char *(*func) ()); +extern void xhash_apply (char *(*func) (const char *, void *)); extern void xhash_die (); #else extern void xhash_init ( /* int hash_table_size */ ); Index: rplay/rplayd/xhash.c =================================================================== --- rplay.orig/rplayd/xhash.c 2025-09-13 10:31:30.994439300 +0200 +++ rplay/rplayd/xhash.c 2025-09-15 14:57:26.515365825 +0200 @@ -148,7 +148,7 @@ #ifdef __STDC__ void -xhash_apply(char *(*func) ()) +xhash_apply(char *(*func) (const char *str, PTR val)) #else void xhash_apply(func)