Rename global variable "table" to "ldpc_table".

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6723 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-06-03 20:14:08 +00:00
parent eb9873c906
commit a2cbb623aa
3 changed files with 14 additions and 14 deletions

View File

@ -36,7 +36,7 @@
decoding_method dec_method; /* Decoding method to use */ decoding_method dec_method; /* Decoding method to use */
int table; /* Trace option, 2 for a table of decoding details */ int ldpc_table; /* Trace option, 2 for a table of decoding details */
int block_no; /* Number of current block, from zero */ int block_no; /* Number of current block, from zero */
int max_iter; /* Maximum number of iteratons of decoding to do */ int max_iter; /* Maximum number of iteratons of decoding to do */
@ -73,7 +73,7 @@ void enum_decode_setup(void)
exit(1); exit(1);
} }
if (table==2) if (ldpc_table==2)
{ printf(" block decoding likelihood\n"); { printf(" block decoding likelihood\n");
} }
} }
@ -190,7 +190,7 @@ unsigned enum_decode
/* Output data to trace file. */ /* Output data to trace file. */
if (table==2) if (ldpc_table==2)
{ printf("%7d %10x %10.4e\n",block_no,d,lk); { printf("%7d %10x %10.4e\n",block_no,d,lk);
} }
} }
@ -242,7 +242,7 @@ unsigned enum_decode
void prprp_decode_setup (void) void prprp_decode_setup (void)
{ {
if (table==2) if (ldpc_table==2)
{ printf( { printf(
" block iter changed perrs loglik Eperrs Eloglik entropy\n"); " block iter changed perrs loglik Eperrs Eloglik entropy\n");
} }
@ -271,7 +271,7 @@ unsigned prprp_decode
{ {
c = check(H,dblk,pchk); c = check(H,dblk,pchk);
if (table==2) if (ldpc_table==2)
{ printf("%7d %5d %8.1f %6d %+9.2f %8.1f %+9.2f %7.1f\n", { printf("%7d %5d %8.1f %6d %+9.2f %8.1f %+9.2f %7.1f\n",
block_no, n, changed(lratio,dblk,N), c, loglikelihood(lratio,dblk,N), block_no, n, changed(lratio,dblk,N), c, loglikelihood(lratio,dblk,N),
expected_parity_errors(H,bprb), expected_loglikelihood(lratio,bprb,N), expected_parity_errors(H,bprb), expected_loglikelihood(lratio,bprb,N),

View File

@ -23,7 +23,7 @@ typedef enum
extern decoding_method dec_method; /* Decoding method to use */ extern decoding_method dec_method; /* Decoding method to use */
extern int table; /* Trace option, 2 for a table of decoding details */ extern int ldpc_table; /* Trace option, 2 for a table of decoding details */
extern int block_no; /* Number of current block, from zero */ extern int block_no; /* Number of current block, from zero */
extern int max_iter; /* Maximum number of iteratons of decoding to do */ extern int max_iter; /* Maximum number of iteratons of decoding to do */

View File

@ -64,18 +64,18 @@ int main
/* Look at initial flag arguments. */ /* Look at initial flag arguments. */
table = 0; ldpc_table = 0;
blockio_flush = 0; blockio_flush = 0;
while (argc>1) while (argc>1)
{ {
if (strcmp(argv[1],"-t")==0) if (strcmp(argv[1],"-t")==0)
{ if (table!=0) usage(); { if (ldpc_table!=0) usage();
table = 1; ldpc_table = 1;
} }
else if (strcmp(argv[1],"-T")==0) else if (strcmp(argv[1],"-T")==0)
{ if (table!=0) usage(); { if (ldpc_table!=0) usage();
table = 2; ldpc_table = 2;
} }
else if (strcmp(argv[1],"-f")==0) else if (strcmp(argv[1],"-f")==0)
{ if (blockio_flush!=0) usage(); { if (blockio_flush!=0) usage();
@ -141,7 +141,7 @@ int main
{ fprintf(stderr,"Can't read more than one stream from standard input\n"); { fprintf(stderr,"Can't read more than one stream from standard input\n");
exit(1); exit(1);
} }
if ((table>0) if ((ldpc_table>0)
+ (strcmp(dfile,"-")==0) + (strcmp(dfile,"-")==0)
+ (pfile!=0 && strcmp(pfile,"-")==0) > 1) + (pfile!=0 && strcmp(pfile,"-")==0) > 1)
{ fprintf(stderr,"Can't send more than one stream to standard output\n"); { fprintf(stderr,"Can't send more than one stream to standard output\n");
@ -209,7 +209,7 @@ int main
/* Print header for summary table. */ /* Print header for summary table. */
if (table==1) if (ldpc_table==1)
{ printf(" block iterations valid changed\n"); { printf(" block iterations valid changed\n");
} }
@ -319,7 +319,7 @@ int main
/* Print summary table entry. */ /* Print summary table entry. */
if (table==1) if (ldpc_table==1)
{ printf ("%7d %10f %d %8.1f\n", { printf ("%7d %10f %d %8.1f\n",
block_no, (double)iters, valid, (double)chngd); block_no, (double)iters, valid, (double)chngd);
/* iters is printed as a double to avoid problems if it's >= 2^31 */ /* iters is printed as a double to avoid problems if it's >= 2^31 */