FreeCalypso > hg > fc-pcsc-tools
comparison misc/fc-pcsc-list.c @ 31:be9984600bf8
fc-pcsc-list utility written
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 12 Feb 2021 17:14:59 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
30:84d1c31d0fad | 31:be9984600bf8 |
---|---|
1 #include <string.h> | |
2 #include <strings.h> | |
3 #include <stdio.h> | |
4 #include <stdlib.h> | |
5 #include <pcsclite.h> | |
6 #include <winscard.h> | |
7 #include "cardif.h" | |
8 | |
9 main(argc, argv) | |
10 char **argv; | |
11 { | |
12 char *cp; | |
13 unsigned num; | |
14 | |
15 setup_pcsc_context(); | |
16 get_reader_list(); | |
17 for (cp = reader_list, num = 0; *cp; num++) { | |
18 printf("#%u: %s\n", num, cp); | |
19 cp += strlen(cp) + 1; | |
20 } | |
21 SCardReleaseContext(hContext); | |
22 exit(0); | |
23 } |