Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
71351160
Commit
71351160
authored
Oct 08, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't include os_compat.h
When there are standardized headers, use these instead of the bloated os_compat.h.
parent
ca68b1c8
Hide whitespace changes
Inline
Side-by-side
Showing
62 changed files
with
143 additions
and
38 deletions
+143
-38
audio.h
src/audio.h
+1
-1
audioOutput.h
src/audioOutput.h
+1
-1
audioOutput_fifo.c
src/audioOutputs/audioOutput_fifo.c
+4
-0
audioOutput_jack.c
src/audioOutputs/audioOutput_jack.c
+2
-0
audioOutput_oss.c
src/audioOutputs/audioOutput_oss.c
+4
-0
audioOutput_shout.c
src/audioOutputs/audioOutput_shout.c
+2
-0
client.c
src/client.c
+7
-1
client.h
src/client.h
+4
-1
command.h
src/command.h
+0
-1
condition.c
src/condition.c
+3
-0
condition.h
src/condition.h
+1
-1
crossfade.c
src/crossfade.c
+3
-0
decoder_api.c
src/decoder_api.c
+2
-0
decoder_control.c
src/decoder_control.c
+2
-0
decoder_list.h
src/decoder_list.h
+1
-1
directory.h
src/directory.h
+1
-0
dirvec.c
src/dirvec.c
+2
-1
aac_plugin.c
src/inputPlugins/aac_plugin.c
+1
-0
audiofile_plugin.c
src/inputPlugins/audiofile_plugin.c
+1
-0
flac_plugin.c
src/inputPlugins/flac_plugin.c
+2
-0
mp4_plugin.c
src/inputPlugins/mp4_plugin.c
+1
-0
inputStream.c
src/inputStream.c
+1
-1
inputStream.h
src/inputStream.h
+1
-1
inputStream_http_auth.h
src/inputStream_http_auth.h
+2
-1
ioops.c
src/ioops.c
+3
-0
ioops.h
src/ioops.h
+1
-2
list.c
src/list.c
+3
-0
list.h
src/list.h
+0
-2
listen.h
src/listen.h
+1
-1
log.c
src/log.c
+7
-1
ls.h
src/ls.h
+3
-0
main_notify.c
src/main_notify.c
+3
-0
notify.h
src/notify.h
+1
-1
outputBuffer.c
src/outputBuffer.c
+3
-0
output_api.c
src/output_api.c
+2
-0
output_api.h
src/output_api.h
+0
-1
output_control.c
src/output_control.c
+2
-0
output_control.h
src/output_control.h
+2
-1
output_thread.c
src/output_thread.c
+2
-0
pcm_utils.c
src/pcm_utils.c
+4
-1
player_control.h
src/player_control.h
+2
-1
ringbuf.c
src/ringbuf.c
+2
-0
ringbuf.h
src/ringbuf.h
+2
-1
sig_handlers.c
src/sig_handlers.c
+4
-0
sllist.c
src/sllist.c
+2
-0
sllist.h
src/sllist.h
+1
-1
song.c
src/song.c
+0
-2
song.h
src/song.h
+2
-2
songvec.c
src/songvec.c
+3
-0
songvec.h
src/songvec.h
+1
-1
state_file.c
src/state_file.c
+3
-1
tag.c
src/tag.c
+2
-0
tag.h
src/tag.h
+4
-1
tag_pool.c
src/tag_pool.c
+2
-0
tag_pool.h
src/tag_pool.h
+2
-1
tag_save.h
src/tag_save.h
+1
-1
timer.c
src/timer.c
+4
-1
timer.h
src/timer.h
+1
-1
utf8.h
src/utf8.h
+1
-1
utils.c
src/utils.c
+11
-0
utils.h
src/utils.h
+6
-1
volume.h
src/volume.h
+1
-1
No files found.
src/audio.h
View file @
71351160
...
...
@@ -19,7 +19,7 @@
#ifndef AUDIO_H
#define AUDIO_H
#include
"os_compat.h"
#include
<stdio.h>
#define AUDIO_AO_DRIVER_DEFAULT "default"
...
...
src/audioOutput.h
View file @
71351160
...
...
@@ -19,7 +19,7 @@
#ifndef AUDIO_OUTPUT_H
#define AUDIO_OUTPUT_H
#include
"os_compat.h"
#include
<stdio.h>
void
printAllOutputPluginTypes
(
FILE
*
fp
);
...
...
src/audioOutputs/audioOutput_fifo.c
View file @
71351160
...
...
@@ -24,6 +24,10 @@
#include "../utils.h"
#include "../timer.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#define FIFO_BUFFER_SIZE 65536
/* pipe capacity on Linux >= 2.6.11 */
typedef
struct
_FifoData
{
...
...
src/audioOutputs/audioOutput_jack.c
View file @
71351160
...
...
@@ -22,6 +22,8 @@
#include "../utils.h"
#include "../log.h"
#include <assert.h>
#include <jack/jack.h>
#include <jack/types.h>
#include <jack/ringbuffer.h>
...
...
src/audioOutputs/audioOutput_oss.c
View file @
71351160
...
...
@@ -26,6 +26,10 @@
#include "../utils.h"
#include "../log.h"
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#if defined(__OpenBSD__) || defined(__NetBSD__)
# include <soundcard.h>
#else
/* !(defined(__OpenBSD__) || defined(__NetBSD__) */
...
...
src/audioOutputs/audioOutput_shout.c
View file @
71351160
...
...
@@ -22,6 +22,8 @@
#include "../utils.h"
#include <assert.h>
#define CONN_ATTEMPT_INTERVAL 60
#define DEFAULT_CONN_TIMEOUT 2
...
...
src/client.c
View file @
71351160
...
...
@@ -25,12 +25,18 @@
#include "sllist.h"
#include "utils.h"
#include "ioops.h"
#include "os_compat.h"
#include "main_notify.h"
#include "dlist.h"
#include "../config.h"
#include <assert.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <string.h>
#define GREETING "OK MPD " PROTOCOL_VERSION "\n"
#define CLIENT_MAX_BUFFER_LENGTH (40960)
...
...
src/client.h
View file @
71351160
...
...
@@ -19,9 +19,12 @@
#ifndef INTERFACE_H
#define INTERFACE_H
#include "os_compat.h"
#include "gcc.h"
#include <stddef.h>
#include <stdarg.h>
#include <sys/socket.h>
struct
client
;
void
client_manager_init
(
void
);
...
...
src/command.h
View file @
71351160
...
...
@@ -20,7 +20,6 @@
#define COMMAND_H
#include "gcc.h"
#include "os_compat.h"
#include "sllist.h"
#define COMMAND_RETURN_KILL 10
...
...
src/condition.c
View file @
71351160
...
...
@@ -21,6 +21,9 @@
#include "utils.h"
#include "log.h"
#include <sys/time.h>
#include <string.h>
void
cond_init
(
struct
condition
*
cond
)
{
xpthread_mutex_init
(
&
cond
->
mutex
,
NULL
);
...
...
src/condition.h
View file @
71351160
...
...
@@ -20,7 +20,7 @@
#ifndef CONDITION_H
#define CONDITION_H
#include
"os_compat.h"
#include
<pthread.h>
struct
condition
{
pthread_mutex_t
mutex
;
...
...
src/crossfade.c
View file @
71351160
...
...
@@ -21,6 +21,9 @@
#include "audio.h"
#include "pcm_utils.h"
#include <assert.h>
#include <string.h>
unsigned
cross_fade_calc
(
float
duration
,
float
total_time
,
const
struct
audio_format
*
af
,
unsigned
max_chunks
)
...
...
src/decoder_api.c
View file @
71351160
...
...
@@ -29,6 +29,8 @@
#include "outputBuffer.h"
#include "gcc.h"
#include <assert.h>
void
decoder_plugin_register
(
struct
decoder_plugin
*
plugin
)
{
decoder_plugin_load
(
plugin
);
...
...
src/decoder_control.c
View file @
71351160
...
...
@@ -18,6 +18,8 @@
#include "decoder_control.h"
#include <assert.h>
struct
decoder_control
dc
;
void
dc_init
(
void
)
...
...
src/decoder_list.h
View file @
71351160
...
...
@@ -19,7 +19,7 @@
#ifndef INPUT_PLUGIN_H
#define INPUT_PLUGIN_H
#include
"os_compat.h"
#include
<stdio.h>
struct
decoder_plugin
;
...
...
src/directory.h
View file @
71351160
...
...
@@ -23,6 +23,7 @@
#include "list.h"
#include <stdbool.h>
#include <sys/stat.h>
struct
client
;
...
...
src/dirvec.c
View file @
71351160
#include "dirvec.h"
#include "directory.h"
#include "os_compat.h"
#include "utils.h"
#include <string.h>
static
size_t
dv_size
(
struct
dirvec
*
dv
)
{
return
dv
->
nr
*
sizeof
(
struct
directory
*
);
...
...
src/inputPlugins/aac_plugin.c
View file @
71351160
...
...
@@ -25,6 +25,7 @@
#include "../utils.h"
#include "../log.h"
#include <assert.h>
#include <faad.h>
/* all code here is either based on or copied from FAAD2's frontend code */
...
...
src/inputPlugins/audiofile_plugin.c
View file @
71351160
...
...
@@ -24,6 +24,7 @@
#include "../log.h"
#include <sys/stat.h>
#include <audiofile.h>
/* pick 1020 since its devisible for 8,16,24, and 32-bit audio */
...
...
src/inputPlugins/flac_plugin.c
View file @
71351160
...
...
@@ -23,6 +23,8 @@
#include "../utils.h"
#include "../log.h"
#include <assert.h>
/* this code was based on flac123, from flac-tools */
static
flac_read_status
flacRead
(
mpd_unused
const
flac_decoder
*
flacDec
,
...
...
src/inputPlugins/mp4_plugin.c
View file @
71351160
...
...
@@ -25,6 +25,7 @@
#include "../mp4ff/mp4ff.h"
#include <limits.h>
#include <faad.h>
/* all code here is either based on or copied from FAAD2's frontend code */
...
...
src/inputStream.c
View file @
71351160
...
...
@@ -21,7 +21,7 @@
#include "inputStream_file.h"
#include "inputStream_http.h"
#include
"os_compat.h"
#include
<stdlib.h>
void
initInputStream
(
void
)
{
...
...
src/inputStream.h
View file @
71351160
...
...
@@ -19,7 +19,7 @@
#ifndef INPUT_STREAM_H
#define INPUT_STREAM_H
#include
"os_compat.h"
#include
<stddef.h>
typedef
struct
_InputStream
InputStream
;
...
...
src/inputStream_http_auth.h
View file @
71351160
...
...
@@ -20,9 +20,10 @@
#ifndef INPUT_STREAM_HTTP_AUTH_H
#define INPUT_STREAM_HTTP_AUTH_H
#include "os_compat.h"
#include "utils.h"
#include <string.h>
/* base64 code taken from xmms */
#define BASE64_LENGTH(len) (4 * (((len) + 2) / 3))
...
...
src/ioops.c
View file @
71351160
...
...
@@ -18,6 +18,9 @@
#include "ioops.h"
#include <assert.h>
#include <stddef.h>
/* Eventually the listener protocol will use this, too */
/*
...
...
src/ioops.h
View file @
71351160
...
...
@@ -19,8 +19,7 @@
#ifndef IOOPS_H
#define IOOPS_H
#include "../config.h"
#include "os_compat.h"
#include <sys/select.h>
struct
ioOps
{
struct
ioOps
*
prev
,
*
next
;
...
...
src/list.c
View file @
71351160
...
...
@@ -19,6 +19,9 @@
#include "list.h"
#include "utils.h"
#include <assert.h>
#include <string.h>
static
void
makeListNodesArray
(
List
*
list
)
{
ListNode
*
node
=
list
->
firstNode
;
...
...
src/list.h
View file @
71351160
...
...
@@ -19,8 +19,6 @@
#ifndef LIST_H
#define LIST_H
#include "os_compat.h"
/* used to make a list where free() will be used to free data in list */
#define DEFAULT_FREE_DATA_FUNC free
...
...
src/listen.h
View file @
71351160
...
...
@@ -19,7 +19,7 @@
#ifndef LISTEN_H
#define LISTEN_H
#include
"os_compat.h"
#include
<sys/select.h>
extern
int
boundPort
;
...
...
src/log.c
View file @
71351160
...
...
@@ -20,7 +20,13 @@
#include "conf.h"
#include "utils.h"
#include "os_compat.h"
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <stdarg.h>
#include <fcntl.h>
#define LOG_DATE_BUF_SIZE 16
#define LOG_DATE_LEN (LOG_DATE_BUF_SIZE - 1)
...
...
src/ls.h
View file @
71351160
...
...
@@ -21,6 +21,9 @@
#include "decoder_list.h"
#include <sys/time.h>
struct
stat
;
struct
client
;
int
lsPlaylists
(
struct
client
*
client
,
const
char
*
utf8path
);
...
...
src/main_notify.c
View file @
71351160
...
...
@@ -25,6 +25,9 @@
#include "gcc.h"
#include "log.h"
#include <assert.h>
#include <string.h>
static
struct
ioOps
main_notify_IO
;
static
int
main_pipe
[
2
];
pthread_t
main_task
;
...
...
src/notify.h
View file @
71351160
...
...
@@ -19,7 +19,7 @@
#ifndef NOTIFY_H
#define NOTIFY_H
#include
"os_compat.h"
#include
<pthread.h>
struct
notify
{
pthread_mutex_t
mutex
;
...
...
src/outputBuffer.c
View file @
71351160
...
...
@@ -20,6 +20,9 @@
#include "notify.h"
#include "utils.h"
#include <assert.h>
#include <string.h>
struct
output_buffer
ob
;
void
...
...
src/output_api.c
View file @
71351160
...
...
@@ -19,6 +19,8 @@
#include "output_api.h"
#include "output_internal.h"
#include <assert.h>
const
char
*
audio_output_get_name
(
const
struct
audio_output
*
ao
)
{
return
ao
->
name
;
...
...
src/output_api.h
View file @
71351160
...
...
@@ -25,7 +25,6 @@
#include "tag.h"
#include "conf.h"
#include "log.h"
#include "os_compat.h"
#include <stdbool.h>
...
...
src/output_control.c
View file @
71351160
...
...
@@ -23,6 +23,8 @@
#include "pcm_utils.h"
#include <pthread.h>
#include <assert.h>
#include <stdlib.h>
struct
notify
audio_output_client_notify
=
NOTIFY_INITIALIZER
;
...
...
src/output_control.h
View file @
71351160
...
...
@@ -20,7 +20,8 @@
#define OUTPUT_CONTROL_H
#include "conf.h"
#include "os_compat.h"
#include <stddef.h>
struct
audio_output
;
struct
audio_output_plugin
;
...
...
src/output_thread.c
View file @
71351160
...
...
@@ -21,6 +21,8 @@
#include "output_internal.h"
#include "utils.h"
#include <assert.h>
static
void
ao_command_finished
(
struct
audio_output
*
ao
)
{
assert
(
ao
->
command
!=
AO_COMMAND_NONE
);
...
...
src/pcm_utils.c
View file @
71351160
...
...
@@ -21,7 +21,10 @@
#include "utils.h"
#include "conf.h"
#include "audio_format.h"
#include "os_compat.h"
#include <assert.h>
#include <string.h>
#include <math.h>
static
inline
int
pcm_dither
(
void
)
...
...
src/player_control.h
View file @
71351160
...
...
@@ -20,7 +20,8 @@
#define PLAYER_H
#include "notify.h"
#include "os_compat.h"
#include <stdint.h>
enum
player_state
{
PLAYER_STATE_STOP
=
0
,
...
...
src/ringbuf.c
View file @
71351160
...
...
@@ -25,6 +25,8 @@
#include "ringbuf.h"
#include "utils.h"
#include <string.h>
#define advance_ptr(ptr,cnt,mask) ptr = (ptr + cnt) & mask
/*
...
...
src/ringbuf.h
View file @
71351160
...
...
@@ -22,7 +22,8 @@
#ifndef RINGBUF_H
#define RINGBUF_H
#include "os_compat.h"
#include <stddef.h>
#include <sys/uio.h>
/** @file ringbuf.h
*
...
...
src/sig_handlers.c
View file @
71351160
...
...
@@ -25,6 +25,10 @@
#include "signal_check.h"
#include "log.h"
#include <sys/signal.h>
#include <sys/wait.h>
#include <errno.h>
int
handlePendingSignals
(
void
)
{
if
(
signal_is_pending
(
SIGINT
)
||
signal_is_pending
(
SIGTERM
))
{
...
...
src/sllist.c
View file @
71351160
...
...
@@ -21,6 +21,8 @@
#include "sllist.h"
#include "utils.h"
#include <string.h>
static
void
init_strnode
(
struct
strnode
*
x
,
char
*
s
)
{
x
->
data
=
s
;
...
...
src/sllist.h
View file @
71351160
...
...
@@ -21,7 +21,7 @@
#ifndef SLLIST_H
#define SLLIST_H
#include
"os_compat.h"
#include
<stddef.h>
/* just free the entire structure if it's free-able, the 'data' member
* should _NEVER_ be explicitly freed
...
...
src/song.c
View file @
71351160
...
...
@@ -26,8 +26,6 @@
#include "decoder_list.h"
#include "decoder_api.h"
#include "os_compat.h"
struct
song
*
song_alloc
(
const
char
*
url
,
struct
directory
*
parent
)
{
...
...
src/song.h
View file @
71351160
...
...
@@ -19,7 +19,7 @@
#ifndef SONG_H
#define SONG_H
#include
"os_compat.h"
#include
<sys/time.h>
#define SONG_BEGIN "songList begin"
#define SONG_END "songList end"
...
...
@@ -31,7 +31,7 @@ struct song {
struct
tag
*
tag
;
struct
directory
*
parentDir
;
time_t
mtime
;
char
url
[
sizeof
(
size_
t
)];
char
url
[
sizeof
(
in
t
)];
};
struct
song
*
...
...
src/songvec.c
View file @
71351160
...
...
@@ -2,6 +2,9 @@
#include "song.h"
#include "utils.h"
#include <assert.h>
#include <string.h>
static
pthread_mutex_t
nr_lock
=
PTHREAD_MUTEX_INITIALIZER
;
/* Only used for sorting/searchin a songvec, not general purpose compares */
...
...
src/songvec.h
View file @
71351160
#ifndef SONGVEC_H
#define SONGVEC_H
#include
"os_compat.h"
#include
<stddef.h>
struct
songvec
{
struct
song
**
base
;
...
...
src/state_file.c
View file @
71351160
...
...
@@ -25,7 +25,9 @@
#include "playlist.h"
#include "utils.h"
#include "volume.h"
#include "os_compat.h"
#include <string.h>
#include <sys/stat.h>
static
struct
_sf_cb
{
void
(
*
reader
)(
FILE
*
);
...
...
src/tag.c
View file @
71351160
...
...
@@ -25,6 +25,8 @@
#include "conf.h"
#include "song.h"
#include <assert.h>
/**
* Maximum number of items managed in the bulk list; if it is
* exceeded, we switch back to "normal" reallocation.
...
...
src/tag.h
View file @
71351160
...
...
@@ -19,9 +19,12 @@
#ifndef TAG_H
#define TAG_H
#include "os_compat.h"
#include "gcc.h"
#include <stdint.h>
#include <stddef.h>
#include <string.h>
enum
tag_type
{
TAG_ITEM_ARTIST
,
TAG_ITEM_ALBUM
,
...
...
src/tag_pool.c
View file @
71351160
...
...
@@ -19,6 +19,8 @@
#include "tag_pool.h"
#include "utils.h"
#include <assert.h>
pthread_mutex_t
tag_pool_lock
=
PTHREAD_MUTEX_INITIALIZER
;
#define NUM_SLOTS 4096
...
...
src/tag_pool.h
View file @
71351160
...
...
@@ -20,7 +20,8 @@
#define TAG_POOL_H
#include "tag.h"
#include "os_compat.h"
#include <pthread.h>
extern
pthread_mutex_t
tag_pool_lock
;
...
...
src/tag_save.h
View file @
71351160
...
...
@@ -19,7 +19,7 @@
#ifndef TAG_SAVE_H
#define TAG_SAVE_H
#include
"os_compat.h"
#include
<stdio.h>
struct
tag
;
...
...
src/timer.c
View file @
71351160
...
...
@@ -19,7 +19,10 @@
#include "timer.h"
#include "utils.h"
#include "audio_format.h"
#include "os_compat.h"
#include <assert.h>
#include <limits.h>
#include <sys/time.h>
static
uint64_t
now
(
void
)
{
...
...
src/timer.h
View file @
71351160
...
...
@@ -19,7 +19,7 @@
#ifndef MPD_TIMER_H
#define MPD_TIMER_H
#include
"os_compat.h"
#include
<stdint.h>
struct
audio_format
;
...
...
src/utf8.h
View file @
71351160
...
...
@@ -19,7 +19,7 @@
#ifndef UTF_8_H
#define UTF_8_H
#include <
os_compat
.h>
#include <
stddef
.h>
char
*
latin1StrToUtf8Dup
(
const
char
*
latin1
);
...
...
src/utils.c
View file @
71351160
...
...
@@ -22,6 +22,17 @@
#include "../config.h"
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <pwd.h>
#include <fcntl.h>
#ifdef HAVE_IPV6
#include <sys/socket.h>
#endif
char
*
myFgets
(
char
*
buffer
,
int
bufferSize
,
FILE
*
fp
)
{
char
*
ret
=
fgets
(
buffer
,
bufferSize
,
fp
);
...
...
src/utils.h
View file @
71351160
...
...
@@ -20,7 +20,12 @@
#define UTILS_H
#include "gcc.h"
#include "os_compat.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <pthread.h>
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
...
...
src/volume.h
View file @
71351160
...
...
@@ -19,7 +19,7 @@
#ifndef VOLUME_H
#define VOLUME_H
#include
"os_compat.h"
#include
<stdio.h>
#define VOLUME_MIXER_OSS "oss"
#define VOLUME_MIXER_ALSA "alsa"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment