FreeCalypso > hg > fc-sim-tools
annotate libcommon/chkblank.c @ 45:9eb5460f51a6
main tools: support both pcsc and serial back ends
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 21 Mar 2021 01:56:49 +0000 |
parents | c9ef9e91dd8e |
children |
rev | line source |
---|---|
9
c9ef9e91dd8e
new libcommon, initial version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 #include <sys/types.h> |
c9ef9e91dd8e
new libcommon, initial version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 #include "simresp.h" |
c9ef9e91dd8e
new libcommon, initial version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 |
c9ef9e91dd8e
new libcommon, initial version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 check_simresp_all_blank() |
c9ef9e91dd8e
new libcommon, initial version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 { |
c9ef9e91dd8e
new libcommon, initial version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 u_char *dp, *endp; |
c9ef9e91dd8e
new libcommon, initial version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 |
c9ef9e91dd8e
new libcommon, initial version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 dp = sim_resp_data; |
c9ef9e91dd8e
new libcommon, initial version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 endp = sim_resp_data + sim_resp_data_len; |
c9ef9e91dd8e
new libcommon, initial version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 while (dp < endp) |
c9ef9e91dd8e
new libcommon, initial version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 if (*dp++ != 0xFF) |
c9ef9e91dd8e
new libcommon, initial version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 return(0); |
c9ef9e91dd8e
new libcommon, initial version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 return(1); |
c9ef9e91dd8e
new libcommon, initial version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 } |