FreeCalypso > hg > freecalypso-hwlab
comparison simtool/exit.c @ 124:6c4567dd8946
fc-simtool: add non-interactive one-shot command (or script) mode
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 28 Jan 2021 18:56:34 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
123:b391204d3cd5 | 124:6c4567dd8946 |
---|---|
1 #include <sys/types.h> | |
2 #include <stdio.h> | |
3 #include <stdlib.h> | |
4 #include <pcsclite.h> | |
5 #include <winscard.h> | |
6 #include "globals.h" | |
7 | |
8 good_exit() | |
9 { | |
10 SCardDisconnect(hCard, SCARD_UNPOWER_CARD); | |
11 SCardReleaseContext(hContext); | |
12 exit(0); | |
13 } | |
14 | |
15 error_exit() | |
16 { | |
17 SCardDisconnect(hCard, SCARD_UNPOWER_CARD); | |
18 SCardReleaseContext(hContext); | |
19 exit(1); | |
20 } |