astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60 --brackets=linux --pad-oper --unpad-paren --pad-header --align-pointer=name
This commit is contained in:
parent
01303fab0d
commit
568317929d
21 changed files with 94 additions and 94 deletions
|
|
@ -59,7 +59,7 @@
|
|||
static nfc_device *pnd;
|
||||
|
||||
static void
|
||||
print_usage(const char* progname)
|
||||
print_usage(const char *progname)
|
||||
{
|
||||
printf("usage: %s [-v]\n", progname);
|
||||
printf(" -v\t verbose display\n");
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ static const nfc_modulation nmMifare = {
|
|||
};
|
||||
|
||||
static void
|
||||
print_success_or_failure(bool bFailure, uint32_t * uiCounter)
|
||||
print_success_or_failure(bool bFailure, uint32_t *uiCounter)
|
||||
{
|
||||
printf("%c", (bFailure) ? 'x' : '.');
|
||||
if (uiCounter)
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
static nfc_device *pnd;
|
||||
|
||||
static void
|
||||
print_usage(const char* progname)
|
||||
print_usage(const char *progname)
|
||||
{
|
||||
printf("usage: %s [-v]\n", progname);
|
||||
printf(" -v\t verbose display\n");
|
||||
|
|
|
|||
|
|
@ -177,8 +177,8 @@ main(int argc, char *argv[])
|
|||
print_usage(argv[0]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
FILE* message_stream = NULL;
|
||||
FILE* ndef_stream = NULL;
|
||||
FILE *message_stream = NULL;
|
||||
FILE *ndef_stream = NULL;
|
||||
|
||||
if ((strlen(ndef_output) == 1) && (ndef_output[0] == '-')) {
|
||||
message_stream = stderr;
|
||||
|
|
@ -220,7 +220,7 @@ main(int argc, char *argv[])
|
|||
|
||||
int error = EXIT_SUCCESS;
|
||||
// Polling payload (SENSF_REQ) must be present (see NFC Digital Protol)
|
||||
const uint8_t *pbtSensfReq = (uint8_t*)"\x00\xff\xff\x01\x00";
|
||||
const uint8_t *pbtSensfReq = (uint8_t *)"\x00\xff\xff\x01\x00";
|
||||
if (nfc_initiator_select_passive_target(pnd, nm, pbtSensfReq, 5, &nt) < 0) {
|
||||
nfc_perror(pnd, "nfc_initiator_select_passive_target");
|
||||
error = EXIT_FAILURE;
|
||||
|
|
@ -231,7 +231,7 @@ main(int argc, char *argv[])
|
|||
const uint8_t abtNfcForumSysCode[] = { 0x12, 0xfc };
|
||||
if (0 != memcmp(nt.nti.nfi.abtSysCode, abtNfcForumSysCode, 2)) {
|
||||
// Retry with special polling
|
||||
const uint8_t *pbtSensfReqNfcForum = (uint8_t*)"\x00\x12\xfc\x01\x00";
|
||||
const uint8_t *pbtSensfReqNfcForum = (uint8_t *)"\x00\x12\xfc\x01\x00";
|
||||
if (nfc_initiator_select_passive_target(pnd, nm, pbtSensfReqNfcForum, 5, &nt) < 0) {
|
||||
nfc_perror(pnd, "nfc_initiator_select_passive_target");
|
||||
error = EXIT_FAILURE;
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ static bool quiet_output = false;
|
|||
static bool initiator_only_mode = false;
|
||||
static bool target_only_mode = false;
|
||||
static int waiting_time = 0;
|
||||
FILE * fd3;
|
||||
FILE * fd4;
|
||||
FILE *fd3;
|
||||
FILE *fd4;
|
||||
|
||||
static void
|
||||
intr_hdlr(int sig)
|
||||
|
|
@ -336,7 +336,7 @@ main(int argc, char *argv[])
|
|||
// PC/SC pseudo-ATR = 3B 80 80 01 01 if there is no historical bytes
|
||||
|
||||
// Creates ATS and copy max 48 bytes of Tk:
|
||||
uint8_t * pbtTk;
|
||||
uint8_t *pbtTk;
|
||||
size_t szTk;
|
||||
pbtTk = iso14443a_locate_historical_bytes(ntEmulatedTarget.nti.nai.abtAts, ntEmulatedTarget.nti.nai.szAtsLen, &szTk);
|
||||
szTk = (szTk > 48) ? 48 : szTk;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue