Added a few comments, fixed ortography and some other cosmetic changes.

This commit is contained in:
EdFuentetaja
2014-03-31 21:31:00 +08:00
parent 3f4ff87078
commit 9b35ef5c83
2 changed files with 17 additions and 10 deletions

View File

@@ -254,13 +254,13 @@ processFrame (dsd_opts * opts, dsd_state * state)
dibit = getDibit (opts, state);
v = 1 & (dibit >> 1); // bit 1
nac[j] = v + 48;
nac[j] = v + '0';
j++;
bch_code[index_bch_code] = v;
index_bch_code++;
v = 1 & dibit; // bit 0
nac[j] = v + 48;
nac[j] = v + '0';
j++;
bch_code[index_bch_code] = v;
index_bch_code++;
@@ -271,7 +271,7 @@ processFrame (dsd_opts * opts, dsd_state * state)
for (i = 0; i < 2; i++)
{
dibit = getDibit (opts, state);
duid[i] = dibit + 48;
duid[i] = dibit + '0';
bch_code[index_bch_code] = 1 & (dibit >> 1); // bit 1
index_bch_code++;
@@ -289,7 +289,9 @@ processFrame (dsd_opts * opts, dsd_state * state)
bch_code[index_bch_code] = 1 & dibit; // bit 0
index_bch_code++;
}
status_0 = getDibit (opts, state) + 48;
// Intermission: read the status dibit
status_0 = getDibit (opts, state) + '0';
// ... continue reading the BCH error correction data
for (i = 0; i < 20; i++)
{
dibit = getDibit (opts, state);
@@ -325,7 +327,7 @@ processFrame (dsd_opts * opts, dsd_state * state)
//printf("NID error\n");
duid[0] = 'E';
duid[1] = 'E';
state->debug_header_critical_errors ++;
state->debug_header_critical_errors++;
}
}
@@ -448,7 +450,7 @@ processFrame (dsd_opts * opts, dsd_state * state)
// Now processing NID
skipDibit (opts, state, 14); // 28 null bits
status_1 = getDibit (opts, state) + 48;
status_1 = getDibit (opts, state) + '0';
}
else if (strcmp (duid, "13") == 0)
{