summaryrefslogtreecommitdiff
path: root/src/share
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2013-04-05 20:21:22 +1100
committerErik de Castro Lopo <erikd@mega-nerd.com>2013-04-05 20:21:22 +1100
commitae7eda1815f8a900c98a07417f1b86f333552235 (patch)
tree80d018212c7a796579e38d787735947d85db406f /src/share
parentda57d2a48d8d0be8ef7679ae35aa9db98d52f6a0 (diff)
downloadflac-ae7eda1815f8a900c98a07417f1b86f333552235.tar.gz
Rename all parameters and locals from 'index' to 'indx'.
Diffstat (limited to 'src/share')
-rw-r--r--src/share/grabbag/cuesheet.c8
-rw-r--r--src/share/replaygain_synthesis/replaygain_synthesis.c10
-rw-r--r--src/share/utf8/utf8.c36
3 files changed, 27 insertions, 27 deletions
diff --git a/src/share/grabbag/cuesheet.c b/src/share/grabbag/cuesheet.c
index 76d49c4e..841b5907 100644
--- a/src/share/grabbag/cuesheet.c
+++ b/src/share/grabbag/cuesheet.c
@@ -642,17 +642,17 @@ void grabbag__cuesheet_emit(FILE *file, const FLAC__StreamMetadata *cuesheet, co
fprintf(file, " ISRC %s\n", track->isrc);
for(index_num = 0; index_num < track->num_indices; index_num++) {
- const FLAC__StreamMetadata_CueSheet_Index *index = track->indices + index_num;
+ const FLAC__StreamMetadata_CueSheet_Index *indx = track->indices + index_num;
- fprintf(file, " INDEX %02u ", (unsigned)index->number);
+ fprintf(file, " INDEX %02u ", (unsigned)indx->number);
if(cs->is_cd) {
- const unsigned logical_frame = (unsigned)((track->offset + index->offset) / (44100 / 75));
+ const unsigned logical_frame = (unsigned)((track->offset + indx->offset) / (44100 / 75));
unsigned m, s, f;
grabbag__cuesheet_frame_to_msf(logical_frame, &m, &s, &f);
fprintf(file, "%02u:%02u:%02u\n", m, s, f);
}
else
- fprintf(file, "%" PRIu64 "\n", (track->offset + index->offset));
+ fprintf(file, "%" PRIu64 "\n", (track->offset + indx->offset));
}
}
diff --git a/src/share/replaygain_synthesis/replaygain_synthesis.c b/src/share/replaygain_synthesis/replaygain_synthesis.c
index e73060ae..81ed251c 100644
--- a/src/share/replaygain_synthesis/replaygain_synthesis.c
+++ b/src/share/replaygain_synthesis/replaygain_synthesis.c
@@ -209,14 +209,14 @@ void FLAC__replaygain_synthesis__init_dither_context(DitherContext *d, int bits,
static unsigned char default_dither [] = { 92, 92, 88, 84, 81, 78, 74, 67, 0, 0 };
static const float* F [] = { F44_0, F44_1, F44_2, F44_3 };
- int index;
+ int indx;
if (shapingtype < 0) shapingtype = 0;
if (shapingtype > 3) shapingtype = 3;
d->ShapingType = (NoiseShaping)shapingtype;
- index = bits - 11 - shapingtype;
- if (index < 0) index = 0;
- if (index > 9) index = 9;
+ indx = bits - 11 - shapingtype;
+ if (indx < 0) indx = 0;
+ if (indx > 9) indx = 9;
memset ( d->ErrorHistory , 0, sizeof (d->ErrorHistory ) );
memset ( d->DitherHistory, 0, sizeof (d->DitherHistory) );
@@ -224,7 +224,7 @@ void FLAC__replaygain_synthesis__init_dither_context(DitherContext *d, int bits,
d->FilterCoeff = F [shapingtype];
d->Mask = ((FLAC__uint64)-1) << (32 - bits);
d->Add = 0.5 * ((1L << (32 - bits)) - 1);
- d->Dither = 0.01f*default_dither[index] / (((FLAC__int64)1) << bits);
+ d->Dither = 0.01f*default_dither[indx] / (((FLAC__int64)1) << bits);
d->LastHistoryIndex = 0;
}
diff --git a/src/share/utf8/utf8.c b/src/share/utf8/utf8.c
index 63827c77..25dd1a4b 100644
--- a/src/share/utf8/utf8.c
+++ b/src/share/utf8/utf8.c
@@ -48,12 +48,12 @@
static unsigned char *make_utf8_string(const wchar_t *unicode)
{
size_t size = 0, n;
- int index = 0, out_index = 0;
+ int indx = 0, out_index = 0;
unsigned char *out;
unsigned short c;
/* first calculate the size of the target string */
- c = unicode[index++];
+ c = unicode[indx++];
while(c) {
if(c < 0x0080) {
n = 1;
@@ -65,15 +65,15 @@ static unsigned char *make_utf8_string(const wchar_t *unicode)
if(size+n < size) /* overflow check */
return NULL;
size += n;
- c = unicode[index++];
+ c = unicode[indx++];
}
out = safe_malloc_add_2op_(size, /*+*/1);
if (out == NULL)
return NULL;
- index = 0;
+ indx = 0;
- c = unicode[index++];
+ c = unicode[indx++];
while(c)
{
if(c < 0x080) {
@@ -86,7 +86,7 @@ static unsigned char *make_utf8_string(const wchar_t *unicode)
out[out_index++] = 0x80 | ((c >> 6) & 0x3f);
out[out_index++] = 0x80 | (c & 0x3f);
}
- c = unicode[index++];
+ c = unicode[indx++];
}
out[out_index] = 0x00;
@@ -96,24 +96,24 @@ static unsigned char *make_utf8_string(const wchar_t *unicode)
static wchar_t *make_unicode_string(const unsigned char *utf8)
{
size_t size = 0;
- int index = 0, out_index = 0;
+ int indx = 0, out_index = 0;
wchar_t *out;
unsigned char c;
/* first calculate the size of the target string */
- c = utf8[index++];
+ c = utf8[indx++];
while(c) {
if((c & 0x80) == 0) {
- index += 0;
+ indx += 0;
} else if((c & 0xe0) == 0xe0) {
- index += 2;
+ indx += 2;
} else {
- index += 1;
+ indx += 1;
}
if(size + 1 == 0) /* overflow check */
return NULL;
size++;
- c = utf8[index++];
+ c = utf8[indx++];
}
if(size + 1 == 0) /* overflow check */
@@ -121,25 +121,25 @@ static wchar_t *make_unicode_string(const unsigned char *utf8)
out = safe_malloc_mul_2op_(size+1, /*times*/sizeof(wchar_t));
if (out == NULL)
return NULL;
- index = 0;
+ indx = 0;
- c = utf8[index++];
+ c = utf8[indx++];
while(c)
{
if((c & 0x80) == 0) {
out[out_index++] = c;
} else if((c & 0xe0) == 0xe0) {
out[out_index] = (c & 0x1F) << 12;
- c = utf8[index++];
+ c = utf8[indx++];
out[out_index] |= (c & 0x3F) << 6;
- c = utf8[index++];
+ c = utf8[indx++];
out[out_index++] |= (c & 0x3F);
} else {
out[out_index] = (c & 0x3F) << 6;
- c = utf8[index++];
+ c = utf8[indx++];
out[out_index++] |= (c & 0x3F);
}
- c = utf8[index++];
+ c = utf8[indx++];
}
out[out_index] = 0;