From fcbcdd9869e3147fe4a30ba808af294f680c9373 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 29 Sep 2008 02:35:09 -0700 Subject: Switch to C99 types (retaining compat with old compilers) Seeing the "mpd_" prefix _everywhere_ is mind-numbing as the mind needs to retrain itself to skip over the first 4 tokens of a type to get to its meaning. So avoid having extra characters on my terminal to make it easier to follow code at 2:30 am in the morning. Please report any new issues you may come across on Free toolchains. I realize how difficult it can be to build/maintain cross-compiling toolchains and I have no intention of forcing people to upgrade their toolchains to build mpd. Tested with gcc 2.95.4 and and gcc 4.3.1 on x86-32. --- src/outputBuffer.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/outputBuffer.c') diff --git a/src/outputBuffer.c b/src/outputBuffer.c index 606877dd0..9a659db41 100644 --- a/src/outputBuffer.c +++ b/src/outputBuffer.c @@ -33,10 +33,10 @@ /* typically have 2048-4096 of these structs, so pack tightly */ struct ob_chunk { - mpd_uint16 len; /* 0: skip this chunk */ - mpd_uint16 bit_rate; + uint16_t len; /* 0: skip this chunk */ + uint16_t bit_rate; float time; - mpd_uint8 seq; /* see seq_ok() for explanation */ + uint8_t seq; /* see seq_ok() for explanation */ char data[CHUNK_SIZE]; }; @@ -73,12 +73,12 @@ struct output_buffer { size_t conv_buf_len; pthread_t thread; ConvState conv_state; - mpd_uint8 seq_drop; - mpd_uint8 seq_player; /* only gets changed by ob.thread */ - mpd_uint8 seq_decoder; /* only gets changed by dc.thread */ + uint8_t seq_drop; + uint8_t seq_player; /* only gets changed by ob.thread */ + uint8_t seq_decoder; /* only gets changed by dc.thread */ struct ringbuf preseek_index; enum ob_state preseek_state; - mpd_uint16 *preseek_len; + uint16_t *preseek_len; }; static struct output_buffer ob; @@ -158,7 +158,7 @@ static enum action_status ob_do_drop(void) { struct rbvec vec[2]; long i; - mpd_uint8 seq_drop; + uint8_t seq_drop; cond_enter(&ob_seq_cond); seq_drop = ob.seq_drop; @@ -209,7 +209,7 @@ static void reader_reset_buffer(void) metadata_pipe_clear(); } -static void ob_seq_player_set(mpd_uint8 seq_num) +static void ob_seq_player_set(uint8_t seq_num) { cond_enter(&ob_seq_cond); ob.seq_player = seq_num; -- cgit v1.2.3