comparison libcommon/exit.c @ 0:f7145c77b7fb

starting libcommon: factored out of fc-simtool
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 11 Feb 2021 22:28:45 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f7145c77b7fb
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <pcsclite.h>
4 #include <winscard.h>
5 #include "cardif.h"
6
7 good_exit()
8 {
9 SCardDisconnect(hCard, SCARD_UNPOWER_CARD);
10 SCardReleaseContext(hContext);
11 exit(0);
12 }
13
14 error_exit()
15 {
16 SCardDisconnect(hCard, SCARD_UNPOWER_CARD);
17 SCardReleaseContext(hContext);
18 exit(1);
19 }