FreeCalypso > hg > fc-sim-tools
diff pcsc/atrfunc.c @ 2:11f4f8a8fa33
pcsc: ATR code refactoring
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 14 Mar 2021 01:22:37 +0000 |
parents | f7a03e53bb2c |
children |
line wrap: on
line diff
--- a/pcsc/atrfunc.c Sun Mar 14 01:09:23 2021 +0000 +++ b/pcsc/atrfunc.c Sun Mar 14 01:22:37 2021 +0000 @@ -10,7 +10,8 @@ #define MAX_ATR_BYTES 33 -retrieve_atr(decor) +retrieve_atr(head) + char *head; { u_char atrbuf[MAX_ATR_BYTES]; LONG rv; @@ -25,12 +26,9 @@ SCardReleaseContext(hContext); exit(1); } - if (decor) - printf("ATR:"); + fputs(head, stdout); for (n = 0; n < dwAttrLen; n++) { - if (decor) - putchar(' '); - printf("%02X", atrbuf[n]); + printf(" %02X", atrbuf[n]); } putchar('\n'); return(0);