aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdoc/mpd-indent.sh1
-rw-r--r--src/audioOutput.c2
-rw-r--r--src/audioOutputs/audioOutput_alsa.c6
-rw-r--r--src/audioOutputs/audioOutput_ao.c2
-rw-r--r--src/audioOutputs/audioOutput_mvp.c8
-rw-r--r--src/audioOutputs/audioOutput_oss.c12
-rw-r--r--src/audioOutputs/audioOutput_osx.c2
-rw-r--r--src/audioOutputs/audioOutput_pulse.c6
-rw-r--r--src/inputPlugins/_flac_common.c2
-rw-r--r--src/inputPlugins/_flac_common.h4
-rw-r--r--src/inputPlugins/_ogg_common.c2
-rw-r--r--src/inputPlugins/_ogg_common.h4
-rw-r--r--src/inputPlugins/aac_plugin.c2
-rw-r--r--src/inputPlugins/audiofile_plugin.c2
-rw-r--r--src/inputPlugins/flac_plugin.c4
-rw-r--r--src/inputPlugins/mod_plugin.c2
-rw-r--r--src/inputPlugins/mp3_plugin.c10
-rw-r--r--src/inputPlugins/mp4_plugin.c2
-rw-r--r--src/inputPlugins/oggflac_plugin.c8
-rw-r--r--src/inputPlugins/oggvorbis_plugin.c6
-rw-r--r--src/inputStream_http.c6
-rw-r--r--src/interface.c12
-rw-r--r--src/main.c2
-rw-r--r--src/playlist.c6
-rw-r--r--src/signal_check.h2
25 files changed, 59 insertions, 56 deletions
diff --git a/doc/mpd-indent.sh b/doc/mpd-indent.sh
new file mode 100755
index 000000000..a6c4167aa
--- /dev/null
+++ b/doc/mpd-indent.sh
@@ -0,0 +1 @@
+find ../src/ -name "*.[ch]" -exec indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cdw -cd0 -c0 -cp0 {} \;
diff --git a/src/audioOutput.c b/src/audioOutput.c
index 3de860a40..f6a6fea9e 100644
--- a/src/audioOutput.c
+++ b/src/audioOutput.c
@@ -197,7 +197,7 @@ static void convertAudioFormat(AudioOutput * audioOutput, char **chunkArgPtr,
pcm_sizeOfOutputBufferForAudioFormatConversion(&
(audioOutput->
inAudioFormat),
- *sizeArgPtr,
+*sizeArgPtr,
&(audioOutput->outAudioFormat));
if (size > audioOutput->convBufferLen) {
diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c
index c98d8b537..786198b0b 100644
--- a/src/audioOutputs/audioOutput_alsa.c
+++ b/src/audioOutputs/audioOutput_alsa.c
@@ -408,10 +408,10 @@ AudioOutputPlugin alsaPlugin = {
alsa_playAudio,
alsa_dropBufferedAudio,
alsa_closeDevice,
- NULL, /* sendMetadataFunc */
+ NULL, /* sendMetadataFunc */
};
-#else /* HAVE ALSA */
+#else /* HAVE ALSA */
DISABLED_AUDIO_OUTPUT_PLUGIN(alsaPlugin)
-#endif /* HAVE_ALSA */
+#endif /* HAVE_ALSA */
diff --git a/src/audioOutputs/audioOutput_ao.c b/src/audioOutputs/audioOutput_ao.c
index eb7f1349a..c5f6c209c 100644
--- a/src/audioOutputs/audioOutput_ao.c
+++ b/src/audioOutputs/audioOutput_ao.c
@@ -248,7 +248,7 @@ AudioOutputPlugin aoPlugin = {
audioOutputAo_play,
audioOutputAo_dropBufferedAudio,
audioOutputAo_closeDevice,
- NULL, /* sendMetadataFunc */
+ NULL, /* sendMetadataFunc */
};
#else
diff --git a/src/audioOutputs/audioOutput_mvp.c b/src/audioOutputs/audioOutput_mvp.c
index 9bea36bd5..b4d5a5d5b 100644
--- a/src/audioOutputs/audioOutput_mvp.c
+++ b/src/audioOutputs/audioOutput_mvp.c
@@ -143,7 +143,7 @@ static int mvp_setPcmParams(MvpData * md, unsigned long rate, int channels,
else
return -1;
- mix[3] = 0; /* stream type? */
+ mix[3] = 0; /* stream type? */
if (big_endian == 1)
mix[4] = 1;
@@ -278,10 +278,10 @@ AudioOutputPlugin mvpPlugin = {
mvp_playAudio,
mvp_dropBufferedAudio,
mvp_closeDevice,
- NULL, /* sendMetadataFunc */
+ NULL, /* sendMetadataFunc */
};
-#else /* HAVE_MVP */
+#else /* HAVE_MVP */
DISABLED_AUDIO_OUTPUT_PLUGIN(mvpPlugin)
-#endif /* HAVE_MVP */
+#endif /* HAVE_MVP */
diff --git a/src/audioOutputs/audioOutput_oss.c b/src/audioOutputs/audioOutput_oss.c
index e4b6291a9..f1f379c3b 100644
--- a/src/audioOutputs/audioOutput_oss.c
+++ b/src/audioOutputs/audioOutput_oss.c
@@ -42,15 +42,15 @@
#if defined(__OpenBSD__) || defined(__NetBSD__)
# include <soundcard.h>
-#else /* !(defined(__OpenBSD__) || defined(__NetBSD__) */
+#else /* !(defined(__OpenBSD__) || defined(__NetBSD__) */
# include <sys/soundcard.h>
-#endif /* !(defined(__OpenBSD__) || defined(__NetBSD__) */
+#endif /* !(defined(__OpenBSD__) || defined(__NetBSD__) */
#ifdef WORDS_BIGENDIAN
# define AFMT_S16_MPD AFMT_S16_BE
#else
# define AFMT_S16_MPD AFMT_S16_LE
-#endif /* WORDS_BIGENDIAN */
+#endif /* WORDS_BIGENDIAN */
typedef struct _OssData {
int fd;
@@ -585,10 +585,10 @@ AudioOutputPlugin ossPlugin = {
oss_playAudio,
oss_dropBufferedAudio,
oss_closeDevice,
- NULL, /* sendMetadataFunc */
+ NULL, /* sendMetadataFunc */
};
-#else /* HAVE OSS */
+#else /* HAVE OSS */
DISABLED_AUDIO_OUTPUT_PLUGIN(ossPlugin)
-#endif /* HAVE_OSS */
+#endif /* HAVE_OSS */
diff --git a/src/audioOutputs/audioOutput_osx.c b/src/audioOutputs/audioOutput_osx.c
index dd3e8b86f..6f03c7cf7 100644
--- a/src/audioOutputs/audioOutput_osx.c
+++ b/src/audioOutputs/audioOutput_osx.c
@@ -361,7 +361,7 @@ AudioOutputPlugin osxPlugin = {
osx_play,
osx_dropBufferedAudio,
osx_closeDevice,
- NULL, /* sendMetadataFunc */
+ NULL, /* sendMetadataFunc */
};
#else
diff --git a/src/audioOutputs/audioOutput_pulse.c b/src/audioOutputs/audioOutput_pulse.c
index 5fc3e9b17..c748fd1bf 100644
--- a/src/audioOutputs/audioOutput_pulse.c
+++ b/src/audioOutputs/audioOutput_pulse.c
@@ -211,10 +211,10 @@ AudioOutputPlugin pulsePlugin = {
pulse_playAudio,
pulse_dropBufferedAudio,
pulse_closeDevice,
- NULL, /* sendMetadataFunc */
+ NULL, /* sendMetadataFunc */
};
-#else /* HAVE_PULSE */
+#else /* HAVE_PULSE */
DISABLED_AUDIO_OUTPUT_PLUGIN(pulsePlugin)
-#endif /* HAVE_PULSE */
+#endif /* HAVE_PULSE */
diff --git a/src/inputPlugins/_flac_common.c b/src/inputPlugins/_flac_common.c
index ddfc0b525..acf582709 100644
--- a/src/inputPlugins/_flac_common.c
+++ b/src/inputPlugins/_flac_common.c
@@ -208,4 +208,4 @@ void flac_error_common_cb(const char *plugin,
}
}
-#endif /* HAVE_FLAC || HAVE_OGGFLAC */
+#endif /* HAVE_FLAC || HAVE_OGGFLAC */
diff --git a/src/inputPlugins/_flac_common.h b/src/inputPlugins/_flac_common.h
index b20b32e02..6143cbfe7 100644
--- a/src/inputPlugins/_flac_common.h
+++ b/src/inputPlugins/_flac_common.h
@@ -73,6 +73,6 @@ static inline int flacSendChunk(FlacData * data)
return 0;
}
-#endif /* HAVE_FLAC || HAVE_OGGFLAC */
+#endif /* HAVE_FLAC || HAVE_OGGFLAC */
-#endif /* _FLAC_COMMON_H */
+#endif /* _FLAC_COMMON_H */
diff --git a/src/inputPlugins/_ogg_common.c b/src/inputPlugins/_ogg_common.c
index 62a147972..8abdc33bc 100644
--- a/src/inputPlugins/_ogg_common.c
+++ b/src/inputPlugins/_ogg_common.c
@@ -70,4 +70,4 @@ ogg_stream_type ogg_stream_type_detect(InputStream * inStream)
return VORBIS;
}
-#endif /* defined(HAVE_OGGFLAC || defined(HAVE_OGGVORBIS) */
+#endif /* defined(HAVE_OGGFLAC || defined(HAVE_OGGVORBIS) */
diff --git a/src/inputPlugins/_ogg_common.h b/src/inputPlugins/_ogg_common.h
index 147ba9fa6..aebb75128 100644
--- a/src/inputPlugins/_ogg_common.h
+++ b/src/inputPlugins/_ogg_common.h
@@ -30,6 +30,6 @@ typedef enum _ogg_stream_type { VORBIS, FLAC } ogg_stream_type;
ogg_stream_type ogg_stream_type_detect(InputStream * inStream);
-#endif /* defined(HAVE_OGGFLAC || defined(HAVE_OGGVORBIS) */
+#endif /* defined(HAVE_OGGFLAC || defined(HAVE_OGGVORBIS) */
-#endif /* _OGG_COMMON_H */
+#endif /* _OGG_COMMON_H */
diff --git a/src/inputPlugins/aac_plugin.c b/src/inputPlugins/aac_plugin.c
index b7d2e2521..c24254b54 100644
--- a/src/inputPlugins/aac_plugin.c
+++ b/src/inputPlugins/aac_plugin.c
@@ -482,4 +482,4 @@ InputPlugin aacPlugin = {
NULL,
};
-#endif /* HAVE_FAAD */
+#endif /* HAVE_FAAD */
diff --git a/src/inputPlugins/audiofile_plugin.c b/src/inputPlugins/audiofile_plugin.c
index 19038bbab..adec604ae 100644
--- a/src/inputPlugins/audiofile_plugin.c
+++ b/src/inputPlugins/audiofile_plugin.c
@@ -194,4 +194,4 @@ InputPlugin audiofilePlugin = {
NULL
};
-#endif /* HAVE_AUDIOFILE */
+#endif /* HAVE_AUDIOFILE */
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c
index 737cdbcd4..342cc38c3 100644
--- a/src/inputPlugins/flac_plugin.c
+++ b/src/inputPlugins/flac_plugin.c
@@ -454,7 +454,7 @@ InputPlugin flacPlugin = {
flac_mime_types
};
-#else /* !HAVE_FLAC */
+#else /* !HAVE_FLAC */
InputPlugin flacPlugin = {
NULL,
@@ -469,4 +469,4 @@ InputPlugin flacPlugin = {
NULL,
};
-#endif /* HAVE_FLAC */
+#endif /* HAVE_FLAC */
diff --git a/src/inputPlugins/mod_plugin.c b/src/inputPlugins/mod_plugin.c
index 7a5012554..31d7b20de 100644
--- a/src/inputPlugins/mod_plugin.c
+++ b/src/inputPlugins/mod_plugin.c
@@ -298,4 +298,4 @@ InputPlugin modPlugin = {
NULL
};
-#endif /* HAVE_AUDIOFILE */
+#endif /* HAVE_AUDIOFILE */
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c
index 442ea3acf..afe5f3280 100644
--- a/src/inputPlugins/mp3_plugin.c
+++ b/src/inputPlugins/mp3_plugin.c
@@ -225,12 +225,10 @@ static ReplayGainInfo *parseId3ReplayGainInfo(struct id3_tag *tag)
if (frame->nfields < 3)
continue;
- key =
- (char *)
+ key = (char *)
id3_ucs4_latin1duplicate(id3_field_getstring
(&frame->fields[1]));
- value =
- (char *)
+ value = (char *)
id3_ucs4_latin1duplicate(id3_field_getstring
(&frame->fields[2]));
@@ -440,11 +438,11 @@ enum xing_magic {
};
struct xing {
- long flags; /* valid fields (see below) */
+ long flags; /* valid fields (see below) */
unsigned long frames; /* total number of frames */
unsigned long bytes; /* total number of bytes */
unsigned char toc[100]; /* 100-point seek table */
- long scale; /* VBR quality */
+ long scale; /* VBR quality */
enum xing_magic magic; /* header magic */
};
diff --git a/src/inputPlugins/mp4_plugin.c b/src/inputPlugins/mp4_plugin.c
index e55a68e95..0a68dcc98 100644
--- a/src/inputPlugins/mp4_plugin.c
+++ b/src/inputPlugins/mp4_plugin.c
@@ -468,4 +468,4 @@ InputPlugin mp4Plugin = {
NULL
};
-#endif /* HAVE_FAAD */
+#endif /* HAVE_FAAD */
diff --git a/src/inputPlugins/oggflac_plugin.c b/src/inputPlugins/oggflac_plugin.c
index d1f48bf31..5ee2de7f0 100644
--- a/src/inputPlugins/oggflac_plugin.c
+++ b/src/inputPlugins/oggflac_plugin.c
@@ -251,8 +251,8 @@ static void of_metadata_decode_cb(const OggFLAC__SeekableStreamDecoder * dec,
}
static OggFLAC__SeekableStreamDecoder
- *full_decoder_init_and_read_metadata(FlacData * data,
- unsigned int metadata_only)
+ * full_decoder_init_and_read_metadata(FlacData * data,
+ unsigned int metadata_only)
{
OggFLAC__SeekableStreamDecoder *decoder = NULL;
unsigned int s = 1;
@@ -416,7 +416,7 @@ InputPlugin oggflacPlugin = {
oggflac_mime_types
};
-#else /* !HAVE_FLAC */
+#else /* !HAVE_FLAC */
InputPlugin oggflacPlugin = {
NULL,
@@ -431,4 +431,4 @@ InputPlugin oggflacPlugin = {
NULL,
};
-#endif /* HAVE_OGGFLAC */
+#endif /* HAVE_OGGFLAC */
diff --git a/src/inputPlugins/oggvorbis_plugin.c b/src/inputPlugins/oggvorbis_plugin.c
index 2e186edd5..1bc7de2b3 100644
--- a/src/inputPlugins/oggvorbis_plugin.c
+++ b/src/inputPlugins/oggvorbis_plugin.c
@@ -50,7 +50,7 @@
#define ov_time_total(VF, I) ((double)ov_time_total(VF, I)/1000)
#define ov_time_tell(VF) ((double)ov_time_tell(VF)/1000)
#define ov_time_seek_page(VF, S) (ov_time_seek_page(VF, (S)*1000))
-#endif /* HAVE_TREMOR */
+#endif /* HAVE_TREMOR */
#include <errno.h>
@@ -424,7 +424,7 @@ InputPlugin oggvorbisPlugin = {
oggvorbis_MimeTypes
};
-#else /* !HAVE_OGGVORBIS */
+#else /* !HAVE_OGGVORBIS */
InputPlugin oggvorbisPlugin = {
NULL,
@@ -439,4 +439,4 @@ InputPlugin oggvorbisPlugin = {
NULL,
};
-#endif /* HAVE_OGGVORBIS */
+#endif /* HAVE_OGGVORBIS */
diff --git a/src/inputStream_http.c b/src/inputStream_http.c
index f3f284d5e..b4b6d04f2 100644
--- a/src/inputStream_http.c
+++ b/src/inputStream_http.c
@@ -434,7 +434,7 @@ static int initHTTPConnection(InputStream * inStream)
}
freeaddrinfo(ans);
- return -1; /* failed */
+ return -1; /* failed */
}
static int finishHTTPInit(InputStream * inStream)
@@ -481,7 +481,7 @@ static int finishHTTPInit(InputStream * inStream)
/*"Connection: close\r\n" */
"User-Agent: %s/%s\r\n"
/*"Range: bytes=%ld-\r\n" */
- "%s" /* authorization */
+ "%s" /* authorization */
"Icy-Metadata:1\r\n"
"\r\n", data->path, data->host, PACKAGE_NAME, PACKAGE_VERSION,
/*inStream->offset, */
@@ -672,7 +672,7 @@ static int getHTTPHello(InputStream * inStream)
if (inStream->size <= 0)
inStream->seekable = 0;
- needle += 4; /* 4 == strlen("\r\n\r\n") */
+ needle += 4; /* 4 == strlen("\r\n\r\n") */
data->buflen -= (needle - data->buffer);
/*fwrite(data->buffer, 1, data->buflen, stdout); */
memmove(data->buffer, needle, data->buflen);
diff --git a/src/interface.c b/src/interface.c
index af669f89e..dbec9b8a9 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -65,9 +65,9 @@ typedef struct _Interface {
char buffer[INTERFACE_MAX_BUFFER_LENGTH];
int bufferLength;
int bufferPos;
- int fd; /* file descriptor */
- FILE *fp; /* file pointer */
- int open; /* open/used */
+ int fd; /* file descriptor */
+ FILE *fp; /* file pointer */
+ int open; /* open/used */
int permission;
time_t lastTime;
List *commandList; /* for when in list mode */
@@ -75,9 +75,9 @@ typedef struct _Interface {
size_t commandListSize; /* mem commandList consumes */
List *bufferList; /* for output if client is slow */
size_t outputBufferSize; /* mem bufferList consumes */
- int expired; /* set whether this interface should be closed on next
- check of old interfaces */
- int num; /* interface number */
+ int expired; /* set whether this interface should be closed on next
+ check of old interfaces */
+ int num; /* interface number */
char *outBuffer;
int outBuflen;
int outBufSize;
diff --git a/src/main.c b/src/main.c
index 49b785fa8..1250f6757 100644
--- a/src/main.c
+++ b/src/main.c
@@ -107,7 +107,7 @@ static int setenv(const char *name, const char *value, int replace)
return out;
}
-#endif /* HAVE_SETENV */
+#endif /* HAVE_SETENV */
static void usage(char *argv[])
{
diff --git a/src/playlist.c b/src/playlist.c
index e1ab04344..a37ee76f3 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1071,7 +1071,11 @@ void playPlaylistIfPlayerStopped(void)
else
playlist_errorCount++;
- if (playlist_state == PLAYLIST_STATE_PLAY && ((playlist_stopOnError && error != PLAYER_ERROR_NOERROR) || error == PLAYER_ERROR_AUDIO || error == PLAYER_ERROR_SYSTEM || playlist_errorCount >= playlist.length)) {
+ if (playlist_state == PLAYLIST_STATE_PLAY
+ && ((playlist_stopOnError && error != PLAYER_ERROR_NOERROR)
+ || error == PLAYER_ERROR_AUDIO
+ || error == PLAYER_ERROR_SYSTEM
+ || playlist_errorCount >= playlist.length)) {
stopPlaylist(stderr);
} else if (playlist_noGoToNext)
currentSongInPlaylist(stderr);
diff --git a/src/signal_check.h b/src/signal_check.h
index 0f5d55ea8..4ba72fbbf 100644
--- a/src/signal_check.h
+++ b/src/signal_check.h
@@ -27,4 +27,4 @@ void signal_unhandle(int sig);
int signal_is_pending(int sig);
void signal_clear(int sig);
-#endif /* SIGNAL_CHECK_H */
+#endif /* SIGNAL_CHECK_H */