FreeCalypso > hg > fc-pcsc-tools
diff simtool/pbdump.c @ 5:ce189c97b7b1
check_simresp_all_blank() factored out into libcommon
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 11 Feb 2021 23:31:51 +0000 |
parents | 2071b28cd0c7 |
children | 4a9bf783491d |
line wrap: on
line diff
--- a/simtool/pbdump.c Thu Feb 11 23:13:27 2021 +0000 +++ b/simtool/pbdump.c Thu Feb 11 23:31:51 2021 +0000 @@ -14,19 +14,6 @@ {'0','1','2','3','4','5','6','7','8','9','*','#','a','b','c','?'}; static -check_all_blank() -{ - u_char *dp, *endp; - - dp = sim_resp_data; - endp = sim_resp_data + sim_resp_data_len; - while (dp < endp) - if (*dp++ != 0xFF) - return(0); - return(1); -} - -static decode_number(data, nbytes, out) u_char *data; unsigned nbytes; @@ -131,7 +118,7 @@ fclose(outf); return(rc); } - if (check_all_blank()) + if (check_simresp_all_blank()) continue; dump_record(recno, outf); } @@ -173,7 +160,7 @@ rc = readrec_op(recno, 0x04, curfile_record_len); if (rc < 0) return(rc); - if (check_all_blank()) + if (check_simresp_all_blank()) continue; dump_record(recno, stdout); }