FreeCalypso > hg > fc-pcsc-tools
diff simtool/fplmn.c @ 109:8a27f45bc1e6
fc-simtool fplmn-dump: support output redirection
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 19 Feb 2021 06:53:14 +0000 |
parents | 9b2cb2b9c910 |
children | 3ddbc3fea5f0 |
line wrap: on
line diff
--- a/simtool/fplmn.c Fri Feb 19 06:45:42 2021 +0000 +++ b/simtool/fplmn.c Fri Feb 19 06:53:14 2021 +0000 @@ -37,8 +37,9 @@ return(0); } -cmd_fplmn_dump(argc, argv) +cmd_fplmn_dump(argc, argv, outf) char **argv; + FILE *outf; { int rc; u_char *dp; @@ -54,15 +55,15 @@ dp = sim_resp_data; for (idx = 0; idx < 4; idx++, dp += 3) { if (idx) - putchar(' '); + putc(' ', outf); if (dp[0] == 0xFF && dp[1] == 0xFF && dp[2] == 0xFF) - fputs("-blank-", stdout); + fputs("-blank-", outf); else { decode_plmn_3bytes(dp, ascbuf, 1); - fputs(ascbuf, stdout); + fputs(ascbuf, outf); } } - putchar('\n'); + putc('\n', outf); return(0); }