aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-03-18 03:29:25 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-03-18 03:29:25 +0000
commit91450723b277fc8fa2d4bcfecb762c30ab7bfb21 (patch)
tree86a99e6b11b10bcb0f6407593f2a72ccbf46492d /src
parent02346f2f1a82fd76dad6e4f01a51a655f9677541 (diff)
bunch of autotool cleanups
git-svn-id: https://svn.musicpd.org/mpd/trunk@271 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/audio.h2
-rw-r--r--src/audiofile_decode.c4
-rw-r--r--src/audiofile_decode.h2
-rw-r--r--src/buffer2array.h2
-rw-r--r--src/charConv.h2
-rw-r--r--src/command.h2
-rw-r--r--src/conf.h2
-rw-r--r--src/decode.h5
-rw-r--r--src/directory.h2
-rw-r--r--src/flac_decode.c3
-rw-r--r--src/flac_decode.h2
-rw-r--r--src/interface.h2
-rw-r--r--src/list.h2
-rw-r--r--src/listen.h2
-rw-r--r--src/log.h2
-rw-r--r--src/ls.c30
-rw-r--r--src/ls.h4
-rw-r--r--src/mp3_decode.c3
-rw-r--r--src/mp3_decode.h2
-rw-r--r--src/mpd_types.h2
-rw-r--r--src/myfprintf.h2
-rw-r--r--src/ogg_decode.c3
-rw-r--r--src/ogg_decode.h2
-rw-r--r--src/path.c12
-rw-r--r--src/path.h2
-rw-r--r--src/pcm_utils.h2
-rw-r--r--src/permission.h2
-rw-r--r--src/player.c1
-rw-r--r--src/player.h2
-rw-r--r--src/playerData.h2
-rw-r--r--src/playlist.h2
-rw-r--r--src/sig_handlers.h2
-rw-r--r--src/song.c6
-rw-r--r--src/song.h2
-rw-r--r--src/stats.h2
-rw-r--r--src/tables.h2
-rw-r--r--src/tag.c16
-rw-r--r--src/tag.h3
-rw-r--r--src/utils.h2
-rw-r--r--src/volume.h2
41 files changed, 79 insertions, 69 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 808d14cf..a663cca7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,3 +13,5 @@ mpd_SOURCES = main.c buffer2array.c interface.c command.c playlist.c ls.c \
mpd_CFLAGS = $(MPD_CFLAGS)
mpd_LDADD = $(MPD_LIBS) $(ID3_LIB) $(MAD_LIB) $(MP4FF_LIB)
+
+DIST_SUBDIRS = mp4ff
diff --git a/src/audio.h b/src/audio.h
index 07c842dc..da9784d1 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -19,6 +19,8 @@
#ifndef AUDIO_H
#define AUDIO_H
+#include "../config.h"
+
#include "mpd_types.h"
#include <stdio.h>
diff --git a/src/audiofile_decode.c b/src/audiofile_decode.c
index 7c44cdce..9683ce17 100644
--- a/src/audiofile_decode.c
+++ b/src/audiofile_decode.c
@@ -18,10 +18,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifdef HAVE_AUDIOFILE
-
#include "audiofile_decode.h"
+#ifdef HAVE_AUDIOFILE
+
#include "command.h"
#include "utils.h"
#include "audio.h"
diff --git a/src/audiofile_decode.h b/src/audiofile_decode.h
index d0bc8d9b..536c3ce0 100644
--- a/src/audiofile_decode.h
+++ b/src/audiofile_decode.h
@@ -21,6 +21,8 @@
#ifndef AUDIOFILE_DECODE_H
#define AUDIOFILE_DECODE_H
+#include "../config.h"
+
#ifdef HAVE_AUDIOFILE
#include "playerData.h"
diff --git a/src/buffer2array.h b/src/buffer2array.h
index 1aad24fc..74ebffbb 100644
--- a/src/buffer2array.h
+++ b/src/buffer2array.h
@@ -19,6 +19,8 @@
#ifndef BUFFER_2_ARRAY_H
#define BUFFER_2_ARRAY_H
+#include "../config.h"
+
int buffer2array(char * buffer, char *** array);
void freeArgArray(char ** array, int argArrayLength);
diff --git a/src/charConv.h b/src/charConv.h
index 61909b7f..8c5dbdc4 100644
--- a/src/charConv.h
+++ b/src/charConv.h
@@ -19,6 +19,8 @@
#ifndef CHAR_CONV_H
#define CHAR_CONV_H
+#include "../config.h"
+
int setCharSetConversion(char * to, char * from);
char * convStrDup(char * string);
diff --git a/src/command.h b/src/command.h
index 36a4600a..2692c6b5 100644
--- a/src/command.h
+++ b/src/command.h
@@ -19,6 +19,8 @@
#ifndef COMMAND_H
#define COMMAND_H
+#include "../config.h"
+
#include <stdio.h>
#define COMMAND_RETURN_KILL 10
diff --git a/src/conf.h b/src/conf.h
index 8afca42e..ca9defaf 100644
--- a/src/conf.h
+++ b/src/conf.h
@@ -19,6 +19,8 @@
#ifndef CONF_H
#define CONF_H
+#include "../config.h"
+
#define CONF_PORT 0
#define CONF_MUSIC_DIRECTORY 1
#define CONF_PLAYLIST_DIRECTORY 2
diff --git a/src/decode.h b/src/decode.h
index bb32de58..ea52dd85 100644
--- a/src/decode.h
+++ b/src/decode.h
@@ -19,6 +19,8 @@
#ifndef DECODE_H
#define DECODE_H
+#include "../config.h"
+
#include <stdio.h>
#include <sys/param.h>
@@ -26,8 +28,7 @@
#define DECODE_TYPE_OGG 1
#define DECODE_TYPE_FLAC 2
#define DECODE_TYPE_AUDIOFILE 3
-#define DECODE_TYPE_AAC 4
-#define DECODE_TYPE_MP4 5
+#define DECODE_TYPE_MP4 4
#define DECODE_STATE_STOP 0
#define DECODE_STATE_DECODE 1
diff --git a/src/directory.h b/src/directory.h
index d6813d36..f701fe81 100644
--- a/src/directory.h
+++ b/src/directory.h
@@ -19,6 +19,8 @@
#ifndef DIRECTORY_H
#define DIRECTORY_H
+#include "../config.h"
+
#include "song.h"
#include <stdio.h>
diff --git a/src/flac_decode.c b/src/flac_decode.c
index de59001f..5e51b4ea 100644
--- a/src/flac_decode.c
+++ b/src/flac_decode.c
@@ -16,9 +16,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifdef HAVE_FLAC
#include "flac_decode.h"
+#ifdef HAVE_FLAC
+
#include "utils.h"
#include "log.h"
#include "pcm_utils.h"
diff --git a/src/flac_decode.h b/src/flac_decode.h
index 66c90ff4..773d5d0f 100644
--- a/src/flac_decode.h
+++ b/src/flac_decode.h
@@ -19,6 +19,8 @@
#ifndef FLAC_DECODE_H
#define FLAC_DECODE_H
+#include "../config.h"
+
#include "playerData.h"
#include <stdio.h>
diff --git a/src/interface.h b/src/interface.h
index 84ab2869..b2a8b1a2 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -19,6 +19,8 @@
#ifndef INTERFACE_H
#define INTERFACE_H
+#include "../config.h"
+
#include <stdio.h>
#include <time.h>
#include <sys/types.h>
diff --git a/src/list.h b/src/list.h
index 8a38ba4f..4ae32160 100644
--- a/src/list.h
+++ b/src/list.h
@@ -20,6 +20,8 @@
#ifndef LIST_H
#define LIST_H
+#include "../config.h"
+
#include <stdlib.h>
/* used to make a list where free() will be used to free data in list */
diff --git a/src/listen.h b/src/listen.h
index 7c9bed9b..dd5e32d8 100644
--- a/src/listen.h
+++ b/src/listen.h
@@ -19,6 +19,8 @@
#ifndef LISTEN_H
#define LISTEN_H
+#include "../config.h"
+
extern int listenSocket;
int establish(unsigned short port);
diff --git a/src/log.h b/src/log.h
index 9b4ceaee..59871f17 100644
--- a/src/log.h
+++ b/src/log.h
@@ -19,6 +19,8 @@
#ifndef LOG_H
#define LOG_H
+#include "../config.h"
+
#include "myfprintf.h"
#define LOG_LEVEL_LOW 0
diff --git a/src/ls.c b/src/ls.c
index f80c7209..de4f2562 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -126,7 +126,6 @@ int isMusic(char * utf8file, time_t * mtime) {
if((ret = isWave(utf8file,mtime))) return ret;
#endif
#ifdef HAVE_FAAD
- if((ret = isAac(utf8file,mtime))) return ret;
if((ret = isMp4(utf8file,mtime))) return ret;
#endif
@@ -281,35 +280,6 @@ int isMp4(char * utf8file, time_t * mtime) {
return 0;
}
-int isAac(char * utf8file, time_t * mtime) {
- struct stat st;
- char * file = utf8ToFsCharset(utf8file);
- char * actualFile = file;
-
- if(actualFile[0]!='/') actualFile = rmp2amp(file);
-
- if(stat(actualFile,&st)==0) {
- if(S_ISREG(st.st_mode)) {
- char * dup;
- char * cLast;
- char * cNext;
- int ret = 0;
- dup = strdup(file);
- cNext = cLast = strtok(dup,".");
- while((cNext = strtok(NULL,"."))) cLast = cNext;
- if(cLast && 0==strcasecmp(cLast,"aac")) {
- if(mtime) *mtime = st.st_mtime;
- ret = 1;
- }
- free(dup);
- return ret;
- }
- else return 0;
- }
-
- return 0;
-}
-
int isMp3(char * utf8file, time_t * mtime) {
struct stat st;
char * file = utf8ToFsCharset(utf8file);
diff --git a/src/ls.h b/src/ls.h
index 063dc7db..ab5c218a 100644
--- a/src/ls.h
+++ b/src/ls.h
@@ -19,6 +19,8 @@
#ifndef LS_H
#define LS_H
+#include "../config.h"
+
#include <stdio.h>
#include <time.h>
@@ -26,8 +28,6 @@ int lsPlaylists(FILE * fp, char * utf8path);
int isMp3(char * utf8file, time_t * mtime);
-int isAac(char * utf8file, time_t * mtime);
-
int isMp4(char * utf8file, time_t * mtime);
int isOgg(char * utf8file, time_t * mtime);
diff --git a/src/mp3_decode.c b/src/mp3_decode.c
index d588165b..ede0af6e 100644
--- a/src/mp3_decode.c
+++ b/src/mp3_decode.c
@@ -16,9 +16,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "mp3_decode.h"
+
#ifdef HAVE_MAD
-#include "mp3_decode.h"
#include "pcm_utils.h"
#ifdef USE_MPD_MAD
#include "libmad/mad.h"
diff --git a/src/mp3_decode.h b/src/mp3_decode.h
index 918b5a46..82e8f103 100644
--- a/src/mp3_decode.h
+++ b/src/mp3_decode.h
@@ -19,6 +19,8 @@
#ifndef MP3_DECODE_H
#define MP3_DECODE_H
+#include "../config.h"
+
#ifdef HAVE_MAD
#include "playerData.h"
diff --git a/src/mpd_types.h b/src/mpd_types.h
index 7e64daba..7a81fef6 100644
--- a/src/mpd_types.h
+++ b/src/mpd_types.h
@@ -19,6 +19,8 @@
#ifndef MPD_TYPES_H
#define MPD_TYPES_H
+#include "../config.h"
+
typedef unsigned char mpd_uint8;
typedef signed char mpd_sint8;
diff --git a/src/myfprintf.h b/src/myfprintf.h
index 6014eb6f..b169b895 100644
--- a/src/myfprintf.h
+++ b/src/myfprintf.h
@@ -19,6 +19,8 @@
#ifndef MYFPRINTF_H
#define MYFPRINTF_H
+#include "../config.h"
+
#include <stdio.h>
void myfprintfStdLogMode(FILE * out, FILE * err);
diff --git a/src/ogg_decode.c b/src/ogg_decode.c
index bcc0f6ee..1aaa4d6b 100644
--- a/src/ogg_decode.c
+++ b/src/ogg_decode.c
@@ -16,9 +16,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifdef HAVE_OGG
#include "ogg_decode.h"
+#ifdef HAVE_OGG
+
#include "command.h"
#include "utils.h"
#include "audio.h"
diff --git a/src/ogg_decode.h b/src/ogg_decode.h
index 8e4bd0fe..a2e3076a 100644
--- a/src/ogg_decode.h
+++ b/src/ogg_decode.h
@@ -19,6 +19,8 @@
#ifndef OGG_DECODE_H
#define OGG_DECODE_H
+#include "../config.h"
+
#include "playerData.h"
#include <stdio.h>
diff --git a/src/path.c b/src/path.c
index a7f143dc..d475d356 100644
--- a/src/path.c
+++ b/src/path.c
@@ -24,8 +24,8 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_LOCALE
-#ifdef HAVE_LANGINFO
+#ifdef HAVE_LC_MESSAGES
+#ifdef HAVE_LANGINFO_CODESET
#include <locale.h>
#include <langinfo.h>
#endif
@@ -87,8 +87,8 @@ char * getFsCharset() {
}
void initPaths() {
-#ifdef HAVE_LOCALE
-#ifdef HAVE_LANGINFO
+#ifdef HAVE_LC_MESSAGES
+#ifdef HAVE_LANGINFO_CODESET
char * originalLocale;
#endif
#endif
@@ -97,8 +97,8 @@ void initPaths() {
if(getConf()[CONF_FS_CHARSET]) {
charset = strdup(getConf()[CONF_FS_CHARSET]);
}
-#ifdef HAVE_LOCALE
-#ifdef HAVE_LANGINFO
+#ifdef HAVE_LC_MESSAGES
+#ifdef HAVE_LANGINFO_CODESET
else if((originalLocale = setlocale(LC_ALL,""))) {
char * temp;
diff --git a/src/path.h b/src/path.h
index 73cae270..dc66a073 100644
--- a/src/path.h
+++ b/src/path.h
@@ -19,6 +19,8 @@
#ifndef PATH_H
#define PATH_H
+#include "../config.h"
+
#include <sys/param.h>
extern char musicDir[MAXPATHLEN+1];
diff --git a/src/pcm_utils.h b/src/pcm_utils.h
index 649c5177..dcd5a31a 100644
--- a/src/pcm_utils.h
+++ b/src/pcm_utils.h
@@ -19,6 +19,8 @@
#ifndef PCM_UTILS_H
#define PMC_UTILS_H
+#include "../config.h"
+
#include "audio.h"
#include <stdlib.h>
diff --git a/src/permission.h b/src/permission.h
index 6117ee46..d45f735e 100644
--- a/src/permission.h
+++ b/src/permission.h
@@ -19,6 +19,8 @@
#ifndef PERMISSION_H
#define PERMISSION_H
+#include "../config.h"
+
#define PERMISSION_READ 1
#define PERMISSION_ADD 2
#define PERMISSION_CONTROL 4
diff --git a/src/player.c b/src/player.c
index 63c8fed7..084edd1b 100644
--- a/src/player.c
+++ b/src/player.c
@@ -178,7 +178,6 @@ int playerPlay(FILE * fp, char * utf8file) {
else if(isWave(utf8file,NULL)) pc->decodeType = DECODE_TYPE_AUDIOFILE;
#endif
#ifdef HAVE_FAAD
- else if(isAac(utf8file,NULL)) pc->decodeType = DECODE_TYPE_AAC;
else if(isMp4(utf8file,NULL)) pc->decodeType = DECODE_TYPE_MP4;
#endif
else {
diff --git a/src/player.h b/src/player.h
index 51f9e04e..ca1cfa6a 100644
--- a/src/player.h
+++ b/src/player.h
@@ -19,6 +19,8 @@
#ifndef PLAYER_H
#define PLAYER_H
+#include "../config.h"
+
#include "mpd_types.h"
#include <stdio.h>
diff --git a/src/playerData.h b/src/playerData.h
index 830829fe..7da51e7b 100644
--- a/src/playerData.h
+++ b/src/playerData.h
@@ -19,6 +19,8 @@
#ifndef PLAYER_DATA_H
#define PLAYER_DATA_H
+#include "../config.h"
+
#include "audio.h"
#include "player.h"
#include "decode.h"
diff --git a/src/playlist.h b/src/playlist.h
index 00d0f9e3..d5042c9b 100644
--- a/src/playlist.h
+++ b/src/playlist.h
@@ -19,6 +19,8 @@
#ifndef PLAYLIST_H
#define PLAYLIST_H
+#include "../config.h"
+
#include "song.h"
#include <stdio.h>
diff --git a/src/sig_handlers.h b/src/sig_handlers.h
index 7128574b..994f1eb3 100644
--- a/src/sig_handlers.h
+++ b/src/sig_handlers.h
@@ -19,6 +19,8 @@
#ifndef SIG_HANDLERS_H
#define SIG_HANDLERS_H
+#include "../config.h"
+
void initSigHandlers();
void finishSigHandlers();
diff --git a/src/song.c b/src/song.c
index 377487cb..ac60692a 100644
--- a/src/song.c
+++ b/src/song.c
@@ -79,9 +79,6 @@ Song * newSong(char * utf8file) {
}
#endif
#ifdef HAVE_FAAD
- else if(isAac(utf8file,&(song->mtime))) {
- song->tag = aacTagDup(utf8file);
- }
else if(isMp4(utf8file,&(song->mtime))) {
song->tag = mp4TagDup(utf8file);
}
@@ -249,9 +246,6 @@ int updateSongInfo(Song * song) {
}
#endif
#ifdef HAVE_FAAD
- else if(isAac(utf8file,&(song->mtime))) {
- song->tag = aacTagDup(utf8file);
- }
else if(isMp4(utf8file,&(song->mtime))) {
song->tag = mp4TagDup(utf8file);
}
diff --git a/src/song.h b/src/song.h
index 768a6aa0..895e6cf4 100644
--- a/src/song.h
+++ b/src/song.h
@@ -19,6 +19,8 @@
#ifndef SONG_H
#define SONG_H
+#include "../config.h"
+
#define SONG_BEGIN "songList begin"
#define SONG_END "songList end"
diff --git a/src/stats.h b/src/stats.h
index 383a8db6..dd009909 100644
--- a/src/stats.h
+++ b/src/stats.h
@@ -19,6 +19,8 @@
#ifndef STATS_H
#define STATS_H
+#include "../config.h"
+
#include <stdio.h>
typedef struct _Stats {
diff --git a/src/tables.h b/src/tables.h
index aaf05a3e..e797f638 100644
--- a/src/tables.h
+++ b/src/tables.h
@@ -19,6 +19,8 @@
#ifndef TABLES_H
#define TABLES_H
+#include "../config.h"
+
#include "song.h"
#include <stdio.h>
diff --git a/src/tag.c b/src/tag.c
index c854e9b2..1a0acb3e 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -299,22 +299,6 @@ MpdTag * mp4TagDup(char * utf8file) {
return ret;
}
-
-MpdTag * aacTagDup(char * utf8file) {
- MpdTag * ret = NULL;
- int time;
-
-#warning getMp4TotalTime needs implementing
- //time = getAacTotalTime(rmp2amp(utf8ToFsCharset(utf8file)));
- time = 0;
-
- if(time>=0) {
- if(!ret) ret = newMpdTag();
- ret->time = time;
- }
-
- return ret;
-}
#endif
#ifdef HAVE_OGG
diff --git a/src/tag.h b/src/tag.h
index 36fa76ae..d6ca809d 100644
--- a/src/tag.h
+++ b/src/tag.h
@@ -19,6 +19,8 @@
#ifndef TAG_H
#define TAG_H
+#include "../config.h"
+
#include <stdio.h>
typedef struct _MpdTag {
@@ -39,7 +41,6 @@ MpdTag * mp3TagDup(char * utf8file);
#ifdef HAVE_FAAD
MpdTag * mp4TagDup(char * utf8file);
-MpdTag * aacTagDup(char * utf8file);
#endif
#ifdef HAVE_OGG
diff --git a/src/utils.h b/src/utils.h
index 6abef6d8..025f469e 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -19,6 +19,8 @@
#ifndef UTILS_H
#define UTILS_H
+#include "../config.h"
+
#include <stdio.h>
char * myFgets(char * buffer, int bufferSize, FILE * fp);
diff --git a/src/volume.h b/src/volume.h
index 6af44bf9..efd4e158 100644
--- a/src/volume.h
+++ b/src/volume.h
@@ -19,6 +19,8 @@
#ifndef VOLUME_H
#define VOLUME_H
+#include "../config.h"
+
#include <stdio.h>
#define VOLUME_MIXER_OSS "oss"