FreeCalypso > hg > freecalypso-hwlab
annotate uicc/exit.c @ 173:df4bf4e06221
doc: several articles moved to other repositories
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 11 Sep 2023 06:51:05 +0000 |
parents | f691a19f191d |
children |
rev | line source |
---|---|
130
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 #include <sys/types.h> |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 #include <stdio.h> |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 #include <stdlib.h> |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 #include <pcsclite.h> |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 #include <winscard.h> |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include "globals.h" |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 good_exit() |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 { |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 SCardDisconnect(hCard, SCARD_UNPOWER_CARD); |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 SCardReleaseContext(hContext); |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 exit(0); |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 } |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 error_exit() |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 { |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 SCardDisconnect(hCard, SCARD_UNPOWER_CARD); |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 SCardReleaseContext(hContext); |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 exit(1); |
f691a19f191d
fc-uicc-tool skeleton started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 } |