[xmp] Address compiler warnings

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
master
Claudio Matsuoka 14 years ago
parent e19d557f11
commit 4d11dc1df5
  1. 2
      configure.ac
  2. 13
      src/common.h
  3. 9
      src/main.c
  4. 5
      src/options.c
  5. 1
      src/sound_null.c

@ -12,7 +12,7 @@ if test "$libxmp_path" != ""; then
LIBS="${LIBS} -L${libxmp_path}/lib"
fi
AC_CHECK_HEADERS(xmp.h getopt.h termios.h alsa/asoundlib.h)
AC_CHECK_HEADERS(xmp.h getopt.h signal.h termios.h alsa/asoundlib.h)
if test "${ac_cv_header_xmp_h}" = "yes"; then
AC_CHECK_LIB(xmp,xmp_player_start,,

@ -22,6 +22,19 @@ struct control {
int pause;
};
/* option */
void get_options(int, char **, struct options *);
/* terminal */
int set_tty(void);
int reset_tty(void);
/* info */
void info_mod(struct xmp_module_info *);
void info_frame(struct xmp_module_info *, int, int);
void info_pause(struct xmp_module_info *, int);
void info_instruments_compact(struct xmp_module_info *);
/* commands */
void read_command(xmp_context, struct control *);

@ -1,8 +1,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <xmp.h>
#include "sound.h"
#include "common.h"
@ -13,6 +17,7 @@ extern struct sound_driver sound_null;
struct sound_driver *sound = &sound_alsa;
#ifdef HAVE_SIGNAL_H
static void cleanup(int sig)
{
signal(SIGTERM, SIG_DFL);
@ -27,7 +32,7 @@ static void cleanup(int sig)
signal(sig, SIG_DFL);
kill(getpid (), sig);
}
#endif
static void shuffle(int argc, char **argv)
{
@ -80,11 +85,13 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
#ifdef HAVE_SIGNAL_H
signal(SIGTERM, cleanup);
signal(SIGINT, cleanup);
signal(SIGFPE, cleanup);
signal(SIGSEGV, cleanup);
signal(SIGQUIT, cleanup);
#endif
set_tty();

@ -44,11 +44,6 @@ extern int rt;
static void usage(char *s)
{
struct xmp_fmt_info *f, *fmt;
struct xmp_drv_info *d, *drv;
char **hlp, buf[80];
int i;
printf("Usage: %s [options] [modules]\n", s);
#if 0

@ -4,6 +4,7 @@
static int init(int sampling_rate, int channels)
{
return 0;
}
static void play(void *b, int i)

Loading…
Cancel
Save