Remove more tabs

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24550 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andree Buschmann 2010-02-07 18:38:47 +00:00
parent bd0b7363ca
commit 4d5e88245a
18 changed files with 6267 additions and 6267 deletions

View file

@ -147,45 +147,45 @@ next_track:
/* Soul Calibur 2 style (type 03) */
DEBUGF("ADX: type 03 found\n");
/* check if header is too small for loop data */
if (chanstart-6 < 0x2c) looping=0;
else {
looping = (buf[0x18]) ||
(buf[0x19]) ||
(buf[0x1a]) ||
(buf[0x1b]);
end_adr = (buf[0x28]<<24) |
(buf[0x29]<<16) |
(buf[0x2a]<<8) |
(buf[0x2b]);
if (chanstart-6 < 0x2c) looping=0;
else {
looping = (buf[0x18]) ||
(buf[0x19]) ||
(buf[0x1a]) ||
(buf[0x1b]);
end_adr = (buf[0x28]<<24) |
(buf[0x29]<<16) |
(buf[0x2a]<<8) |
(buf[0x2b]);
start_adr = (
(buf[0x1c]<<24) |
(buf[0x1d]<<16) |
(buf[0x1e]<<8) |
(buf[0x1f])
)/32*channels*18+chanstart;
}
start_adr = (
(buf[0x1c]<<24) |
(buf[0x1d]<<16) |
(buf[0x1e]<<8) |
(buf[0x1f])
)/32*channels*18+chanstart;
}
} else if (!memcmp(buf+0x10,"\x01\xF4\x04\x00",4)) {
/* Standard (type 04) */
DEBUGF("ADX: type 04 found\n");
/* check if header is too small for loop data */
if (chanstart-6 < 0x38) looping=0;
else {
looping = (buf[0x24]) ||
(buf[0x25]) ||
(buf[0x26]) ||
(buf[0x27]);
end_adr = (buf[0x34]<<24) |
(buf[0x35]<<16) |
(buf[0x36]<<8) |
buf[0x37];
start_adr = (
(buf[0x28]<<24) |
(buf[0x29]<<16) |
(buf[0x2a]<<8) |
(buf[0x2b])
)/32*channels*18+chanstart;
}
else {
looping = (buf[0x24]) ||
(buf[0x25]) ||
(buf[0x26]) ||
(buf[0x27]);
end_adr = (buf[0x34]<<24) |
(buf[0x35]<<16) |
(buf[0x36]<<8) |
buf[0x37];
start_adr = (
(buf[0x28]<<24) |
(buf[0x29]<<16) |
(buf[0x2a]<<8) |
(buf[0x2b])
)/32*channels*18+chanstart;
}
} else {
DEBUGF("ADX: error, couldn't determine ADX type\n");
return CODEC_ERROR;
@ -305,10 +305,10 @@ next_track:
d = (buf[i] >> 4) & 15;
if (d & 8) d-= 16;
ch1_0 = d*scale + ((coef1*ch1_1 + coef2*ch1_2) >> 12);
if (ch1_0 > 32767) ch1_0 = 32767;
if (ch1_0 > 32767) ch1_0 = 32767;
else if (ch1_0 < -32768) ch1_0 = -32768;
samples[sampleswritten] = ch1_0;
sampleswritten+=channels;
samples[sampleswritten] = ch1_0;
sampleswritten+=channels;
ch1_2 = ch1_1; ch1_1 = ch1_0;
d = buf[i] & 15;
@ -316,9 +316,9 @@ next_track:
ch1_0 = d*scale + ((coef1*ch1_1 + coef2*ch1_2) >> 12);
if (ch1_0 > 32767) ch1_0 = 32767;
else if (ch1_0 < -32768) ch1_0 = -32768;
samples[sampleswritten] = ch1_0;
sampleswritten+=channels;
ch1_2 = ch1_1; ch1_1 = ch1_0;
samples[sampleswritten] = ch1_0;
sampleswritten+=channels;
ch1_2 = ch1_1; ch1_1 = ch1_0;
}
bufoff+=18;
ci->advance_buffer(18);
@ -345,10 +345,10 @@ next_track:
d = (buf[i] >> 4) & 15;
if (d & 8) d-= 16;
ch2_0 = d*scale + ((coef1*ch2_1 + coef2*ch2_2) >> 12);
if (ch2_0 > 32767) ch2_0 = 32767;
if (ch2_0 > 32767) ch2_0 = 32767;
else if (ch2_0 < -32768) ch2_0 = -32768;
samples[sampleswritten] = ch2_0;
sampleswritten+=2;
samples[sampleswritten] = ch2_0;
sampleswritten+=2;
ch2_2 = ch2_1; ch2_1 = ch2_0;
d = buf[i] & 15;
@ -356,9 +356,9 @@ next_track:
ch2_0 = d*scale + ((coef1*ch2_1 + coef2*ch2_2) >> 12);
if (ch2_0 > 32767) ch2_0 = 32767;
else if (ch2_0 < -32768) ch2_0 = -32768;
samples[sampleswritten] = ch2_0;
sampleswritten+=2;
ch2_2 = ch2_1; ch2_1 = ch2_0;
samples[sampleswritten] = ch2_0;
sampleswritten+=2;
ch2_2 = ch2_1; ch2_1 = ch2_0;
}
bufoff+=18;
ci->advance_buffer(18);

View file

@ -278,12 +278,12 @@ static void mad_synth_thread_quit(void)
#else
static inline void mad_synth_thread_ready(void)
{
mad_synth_frame(&synth, &frame);
mad_synth_frame(&synth, &frame);
}
static inline bool mad_synth_thread_create(void)
{
return true;
return true;
}
static inline void mad_synth_thread_quit(void)

View file

@ -179,7 +179,7 @@ unsigned char memory[65536];
/* ----------------------------------------- Variables for sample stuff */
static int sample_active IDATA_ATTR;
static int sample_position, sample_start, sample_end, sample_repeat_start IDATA_ATTR;
static int fracPos IDATA_ATTR; /* Fractal position of sample */
static int fracPos IDATA_ATTR; /* Fractal position of sample */
static int sample_period IDATA_ATTR;
static int sample_repeats IDATA_ATTR;
static int sample_order IDATA_ATTR;
@ -278,18 +278,18 @@ static inline int GenerateDigi(int sIn)
if ((sample_position < sample_end) && (sample_position >= sample_start))
{
sIn += sample;
fracPos += 985248/sample_period;
if (fracPos > mixing_frequency)
{
fracPos%=mixing_frequency;
last_sample = sample;
// N<>hstes Samples holen
last_sample = sample;
// N<>hstes Samples holen
if (sample_order == 0) {
sample_nibble++; // Nähstes Sample-Nibble
sample_nibble++; // Nähstes Sample-Nibble
if (sample_nibble==2) {
sample_nibble = 0;
sample_position++;
@ -301,24 +301,24 @@ static inline int GenerateDigi(int sIn)
sample_nibble=1;
sample_position++;
}
}
}
if (sample_repeats)
{
if (sample_position > sample_end)
{
sample_repeats--;
sample_position = sample_repeat_start;
}
}
else sample_active = 0;
}
sample = memory[sample_position&0xffff];
if (sample_nibble==1) // Hi-Nibble holen?
if (sample_nibble==1) // Hi-Nibble holen?
sample = (sample & 0xf0)>>4;
else sample = sample & 0x0f;
sample -= 7;
sample <<= 10;
sample <<= 10;
}
}
@ -1282,7 +1282,7 @@ next_track:
/* Find out if cia timing is used and how many samples
have to be calculated for each cpujsr */
int nRefreshCIA = (int)(20000*(memory[0xdc04]|(memory[0xdc05]<<8))/0x4c00);
int nRefreshCIA = (int)(20000*(memory[0xdc04]|(memory[0xdc05]<<8))/0x4c00);
if ((nRefreshCIA==0) || (song_speed == 0))
nRefreshCIA = 20000;
nSamplesPerCall = mixing_frequency*nRefreshCIA/1000000;

View file

@ -163,9 +163,9 @@ next_track:
* get here.
*/
if (!error) {
ogg_free(vf.offsets);
ogg_free(vf.dataoffsets);
ogg_free(vf.serialnos);
ogg_free(vf.offsets);
ogg_free(vf.dataoffsets);
ogg_free(vf.serialnos);
vf.offsets = vf_offsets;
vf.dataoffsets = &vf_dataoffsets;

View file

@ -11,7 +11,7 @@
/* Size of a pixel with 8-bit components. */
const int AD_pix8_size =
#ifdef HAVE_LCD_COLOR
sizeof(struct uint8_rgb);
sizeof(struct uint8_rgb);
#else
1;
1;
#endif

View file

@ -88,8 +88,8 @@ static const unsigned short freq_table[3][3] =
unsigned long bytes2int(unsigned long b0,
unsigned long b1,
unsigned long b2,
unsigned long b3)
unsigned long b2,
unsigned long b3)
{
return (((long)(b0 & 0xFF) << (3*8)) |
((long)(b1 & 0xFF) << (2*8)) |

View file

@ -2878,7 +2878,7 @@ void audio_init(void)
create_thread(mpeg_thread, mpeg_stack,
sizeof(mpeg_stack), 0, mpeg_thread_name
IF_PRIO(, PRIORITY_SYSTEM)
IF_COP(, CPU));
IF_COP(, CPU));
memset(trackdata, 0, sizeof(trackdata));

View file

@ -253,9 +253,9 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_ERROR;
}
n = rb->write(fd, buf, 8);
n = rb->write(fd, hash, sizeof(hash));
n = rb->write(fd, buf + 2, size);
n = rb->write(fd, buf, 8);
n = rb->write(fd, hash, sizeof(hash));
n = rb->write(fd, buf + 2, size);
rb->close(fd);
} else if (memcmp(buf + 1,"nn2x",4)==0) {

View file

@ -75,42 +75,42 @@ static int write_file(void)
buf_ptr = stringbuffer;
str_begin = stringbuffer;
do {
/* Transform slashes into backslashes */
/* Transform slashes into backslashes */
if(*buf_ptr == '/')
*buf_ptr = '\\';
*buf_ptr = '\\';
if((*buf_ptr == '\r') || (*buf_ptr == '\n')) {
/* We have no complete string ? It's only a leading \n or \r ? */
if (!str_begin)
continue;
/* Terminate string */
*buf_ptr = 0;
if((*buf_ptr == '\r') || (*buf_ptr == '\n')) {
/* We have no complete string ? It's only a leading \n or \r ? */
if (!str_begin)
continue;
/* Terminate string */
*buf_ptr = 0;
/* Write our new string */
rc = rb->write(fd, str_begin, rb->strlen(str_begin));
if(rc < 0) {
rb->close(fd);
return 10 * rc - 2;
}
/* Write CR/LF */
rc = rb->write(fd, crlf, 2);
if(rc < 0) {
rb->close(fd);
return 10 * rc - 3;
}
/* Write our new string */
rc = rb->write(fd, str_begin, rb->strlen(str_begin));
if(rc < 0) {
rb->close(fd);
return 10 * rc - 2;
}
/* Write CR/LF */
rc = rb->write(fd, crlf, 2);
if(rc < 0) {
rb->close(fd);
return 10 * rc - 3;
}
/* Reset until we get a new line */
str_begin = NULL;
/* Reset until we get a new line */
str_begin = NULL;
}
else {
/* We start a new line here */
if (!str_begin)
str_begin = buf_ptr;
}
}
else {
/* We start a new line here */
if (!str_begin)
str_begin = buf_ptr;
}
/* Next char, until ... */
/* Next char, until ... */
} while(buf_ptr++ < stringbuffer + readsize);
rb->close(fd);

View file

@ -259,26 +259,26 @@ static void matrix_loop(void)
y = 0;
firstcoldone = 0;
while (i <= ROWS) {
/* Skip over spaces */
/* this is whear the characters were disappearing */
/*
/* Skip over spaces */
/* this is whear the characters were disappearing */
/*
while (i <= ROWS && (matrix[i][j].val == 129 ||
matrix[i][j].val == -1))
i++;
*/
/* A little more random now for spaces */
/* A little more random now for spaces */
if (rb->rand() % randomness == 1){
while (i <= ROWS && (matrix[i][j].val == 129 ||
while (i <= ROWS && (matrix[i][j].val == 129 ||
matrix[i][j].val == -1)){
i++;
randomness--;
if(randomness <=1)
randomness = 6;}
randomness--;
if(randomness <=1)
randomness = 6;}
}else{
randomness++;
if(randomness >6)
randomness = 6;
}
randomness++;
if(randomness >6)
randomness = 6;
}
if (i > ROWS)

View file

@ -57,19 +57,19 @@ char ppm_getc(int fd)
{
char ch;
if (!rb->read(fd, &ch, 1)) {
ppm_error("EOF. Read error reading a byte");
return PLUGIN_ERROR;
}
if (!rb->read(fd, &ch, 1)) {
ppm_error("EOF. Read error reading a byte");
return PLUGIN_ERROR;
}
if (ch == '#') {
do {
if (!rb->read(fd, &ch, 1)) {
ppm_error("EOF. Read error reading a byte");
return PLUGIN_ERROR;
}
} while (ch != '\n' && ch != '\r');
}
if (!rb->read(fd, &ch, 1)) {
ppm_error("EOF. Read error reading a byte");
return PLUGIN_ERROR;
}
} while (ch != '\n' && ch != '\r');
}
return ch;
}
@ -81,7 +81,7 @@ int ppm_getuint(int fd)
do {
ch = ppm_getc(fd);
} while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r');
} while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r');
if (ch < '0' || ch > '9') {
ppm_error("Junk (%c) in file where an integer should be.", ch);
@ -213,7 +213,7 @@ int read_ppm_row(int fd,
int col;
int r, g, b;
switch (format) {
case PPM_FORMAT:
case PPM_FORMAT:
for (col = 0; col < cols; ++col) {
r = ppm_getuint(fd);
g = ppm_getuint(fd);
@ -231,7 +231,7 @@ int read_ppm_row(int fd,
}
break;
case RPPM_FORMAT:
case RPPM_FORMAT:
for (col = 0; col < cols; ++col) {
r = ppm_getrawsample(fd, maxval);
g = ppm_getrawsample(fd, maxval);
@ -246,14 +246,14 @@ int read_ppm_row(int fd,
(255 / maxval) * r,
(255 / maxval) * g,
(255 / maxval) * b);
}
break;
}
break;
default:
default:
ppm_error("What?!");
return PLUGIN_ERROR;
}
return 1;
return PLUGIN_ERROR;
}
return 1;
}
int read_ppm(int fd,

View file

@ -138,9 +138,9 @@ static int wav2wv(const char *infile)
rb->memcpy (&native_header, &raw_header, sizeof (raw_header));
little_endian_to_native (&native_header, WAV_HEADER_FORMAT);
if (rb->strncmp (native_header.ckID, "RIFF", 4) ||
rb->strncmp (native_header.fmt_ckID, "fmt ", 4) ||
rb->strncmp (native_header.data_ckID, "data", 4) ||
if (rb->strncmp (native_header.ckID, "RIFF", 4) ||
rb->strncmp (native_header.fmt_ckID, "fmt ", 4) ||
rb->strncmp (native_header.data_ckID, "data", 4) ||
native_header.FormatTag != 1 || native_header.BitsPerSample != 16) {
rb->splash(HZ*2, "incompatible wav file!");
return true;
@ -153,7 +153,7 @@ static int wav2wv(const char *infile)
config.bytes_per_sample = 2;
config.sample_rate = native_header.SampleRate;
num_chans = config.num_channels = native_header.NumChannels;
total_samples = native_header.data_ckSize / native_header.BlockAlign;
total_samples = native_header.data_ckSize / native_header.BlockAlign;
/* config.flags |= CONFIG_HIGH_FLAG; */

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -140,9 +140,9 @@ static int readwavpeaks(const char *filename)
total_bytes_read += sizeof (header);
little_endian_to_native(&header, WAV_HEADER_FORMAT);
if (rb->strncmp(header.chunkid, "RIFF", 4) ||
rb->strncmp(header.formatchunkid, "fmt ", 4) ||
rb->strncmp(header.datachunkid, "data", 4) ||
if (rb->strncmp(header.chunkid, "RIFF", 4) ||
rb->strncmp(header.formatchunkid, "fmt ", 4) ||
rb->strncmp(header.datachunkid, "data", 4) ||
(header.bitspersample != 16) ||
header.audioformat != 1)
{

View file

@ -48,8 +48,8 @@ static long fp_atof(const char* s, int precision)
bool point = false;
while ((*s != '\0') && isspace(*s))
{
s++;
{
s++;
}
if (*s == '-')

View file

@ -3085,7 +3085,7 @@ static void command_queue_sync_callback(void *data)
int masterfd;
mutex_lock(&command_queue_mutex);
if ( (masterfd = open_master_fd(&myhdr, true)) < 0)
return;
@ -4552,7 +4552,7 @@ void tagcache_init(void)
create_thread(tagcache_thread, tagcache_stack,
sizeof(tagcache_stack), 0, tagcache_thread_name
IF_PRIO(, PRIORITY_BACKGROUND)
IF_COP(, CPU));
IF_COP(, CPU));
#else
tc_stat.initialized = true;
allocate_tempbuf();

View file

@ -306,9 +306,9 @@ void tree_gui_init(void)
/* drawer function for the GUI_EVENT_REDRAW callback */
void tree_drawlists(void)
{
/* band-aid to fix the bar/list redrawing properly after leaving a plugin */
send_event(GUI_EVENT_THEME_CHANGED, NULL);
/* end bandaid */
/* band-aid to fix the bar/list redrawing properly after leaving a plugin */
send_event(GUI_EVENT_THEME_CHANGED, NULL);
/* end bandaid */
gui_synclist_draw(&tree_lists);
}
@ -482,21 +482,21 @@ static int update_dir(void)
/* load tracks from specified directory to resume play */
void resume_directory(const char *dir)
{
int dirfilter = *tc.dirfilter;
int ret;
int dirfilter = *tc.dirfilter;
int ret;
#ifdef HAVE_TAGCACHE
bool id3db = *tc.dirfilter == SHOW_ID3DB;
#endif
/* make sure the dirfilter is sane. The only time it should be possible
* thats its not is when resume playlist is called from a plugin
*/
/* make sure the dirfilter is sane. The only time it should be possible
* thats its not is when resume playlist is called from a plugin
*/
#ifdef HAVE_TAGCACHE
if (!id3db)
if (!id3db)
#endif
*tc.dirfilter = global_settings.dirfilter;
ret = ft_load(&tc, dir);
*tc.dirfilter = dirfilter;
if (ret < 0)
*tc.dirfilter = global_settings.dirfilter;
ret = ft_load(&tc, dir);
*tc.dirfilter = dirfilter;
if (ret < 0)
return;
lastdir[0] = 0;