Run make style
to indent macros
This commit is contained in:
parent
c54e3d981c
commit
69bf99b33d
30 changed files with 272 additions and 272 deletions
|
@ -1,5 +1,5 @@
|
|||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
|
@ -8,15 +8,15 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#if defined(HAVE_SYS_ENDIAN_H)
|
||||
# include <sys/endian.h>
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ENDIAN_H)
|
||||
# include <endian.h>
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
|
||||
# include <CoreFoundation/CoreFoundation.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#endif
|
||||
|
||||
#include <nfc/nfc.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <err.h>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <err.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <err.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <err.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <err.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <err.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <err.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <err.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <err.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <err.h>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -18,7 +18,7 @@
|
|||
#include <sys/types.h>
|
||||
|
||||
#ifdef WITH_DEBUG
|
||||
# include <libutil.h>
|
||||
#include <libutil.h>
|
||||
#endif
|
||||
|
||||
#include <freefare.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -283,7 +283,7 @@ bit 0: PICC master key frozen (reversible with configuration change or when form
|
|||
(free_create_delete_application << 2) | \
|
||||
(free_listing_apps_and_key_settings << 1) | \
|
||||
(picc_master_key_changeable) \
|
||||
)
|
||||
)
|
||||
|
||||
/* Mifare DESFire EV1 Application crypto operations */
|
||||
|
||||
|
@ -305,7 +305,7 @@ bit 0: PICC master key frozen (reversible with configuration change or when form
|
|||
(free_create_delete_files << 2) | \
|
||||
(free_listing_contents << 1) | \
|
||||
(app_master_key_changeable) \
|
||||
)
|
||||
)
|
||||
|
||||
/* Access right */
|
||||
|
||||
|
@ -314,7 +314,7 @@ bit 0: PICC master key frozen (reversible with configuration change or when form
|
|||
(write << 8) | \
|
||||
(read_write << 4) | \
|
||||
(change_access_rights) \
|
||||
)
|
||||
)
|
||||
|
||||
#define MDAR_READ(ar) (((ar) >> 12) & 0x0f)
|
||||
#define MDAR_WRITE(ar) (((ar) >> 8) & 0x0f)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define __FREEFARE_INTERNAL_H__
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <openssl/des.h>
|
||||
|
@ -25,55 +25,55 @@
|
|||
*/
|
||||
|
||||
#if !defined(le32toh) && defined(letoh32)
|
||||
# define le32toh(x) letoh32(x)
|
||||
# define be32toh(x) betoh32(x)
|
||||
#define le32toh(x) letoh32(x)
|
||||
#define be32toh(x) betoh32(x)
|
||||
#endif
|
||||
|
||||
#if !defined(le16toh) && defined(letoh16)
|
||||
# define le16toh(x) letoh16(x)
|
||||
# define be16toh(x) betoh16(x)
|
||||
#define le16toh(x) letoh16(x)
|
||||
#define be16toh(x) betoh16(x)
|
||||
#endif
|
||||
|
||||
#if !defined(le32toh) && defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
|
||||
# define be32toh(x) CFSwapInt32BigToHost(x)
|
||||
# define htobe32(x) CFSwapInt32HostToBig(x)
|
||||
# define le32toh(x) CFSwapInt32LittleToHost(x)
|
||||
# define htole32(x) CFSwapInt32HostToLittle(x)
|
||||
#define be32toh(x) CFSwapInt32BigToHost(x)
|
||||
#define htobe32(x) CFSwapInt32HostToBig(x)
|
||||
#define le32toh(x) CFSwapInt32LittleToHost(x)
|
||||
#define htole32(x) CFSwapInt32HostToLittle(x)
|
||||
#endif
|
||||
|
||||
#if !defined(le16toh) && defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
|
||||
# define be16toh(x) CFSwapInt16BigToHost(x)
|
||||
# define htobe16(x) CFSwapInt16HostToBig(x)
|
||||
# define le16toh(x) CFSwapInt16LittleToHost(x)
|
||||
# define htole16(x) CFSwapInt16HostToLittle(x)
|
||||
#define be16toh(x) CFSwapInt16BigToHost(x)
|
||||
#define htobe16(x) CFSwapInt16HostToBig(x)
|
||||
#define le16toh(x) CFSwapInt16LittleToHost(x)
|
||||
#define htole16(x) CFSwapInt16HostToLittle(x)
|
||||
#endif
|
||||
|
||||
#if !defined(le32toh) && defined(bswap_32)
|
||||
# if BYTE_ORDER == LITTLE_ENDIAN
|
||||
# define be32toh(x) bswap_32(x)
|
||||
# define htobe32(x) bswap_32(x)
|
||||
# define le32toh(x) (x)
|
||||
# define htole32(x) (x)
|
||||
# else
|
||||
# define be32toh(x) (x)
|
||||
# define htobe32(x) (x)
|
||||
# define le32toh(x) bswap_32(x)
|
||||
# define htole32(x) bswap_32(x)
|
||||
# endif
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
#define be32toh(x) bswap_32(x)
|
||||
#define htobe32(x) bswap_32(x)
|
||||
#define le32toh(x) (x)
|
||||
#define htole32(x) (x)
|
||||
#else
|
||||
#define be32toh(x) (x)
|
||||
#define htobe32(x) (x)
|
||||
#define le32toh(x) bswap_32(x)
|
||||
#define htole32(x) bswap_32(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(htole16) && defined(bswap_16)
|
||||
# if BYTE_ORDER == LITTLE_ENDIAN
|
||||
# define be16toh(x) (bswap_16(x))
|
||||
# define htobe16(x) (bswap_16(x))
|
||||
# define htole16(x) (x)
|
||||
# define le16toh(x) (x)
|
||||
# else
|
||||
# define be16toh(x) (x)
|
||||
# define htobe16(x) (x)
|
||||
# define htole16(x) (bswap_16(x))
|
||||
# define le16toh(x) (bswap_16(x))
|
||||
# endif
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
#define be16toh(x) (bswap_16(x))
|
||||
#define htobe16(x) (bswap_16(x))
|
||||
#define htole16(x) (x)
|
||||
#define le16toh(x) (x)
|
||||
#else
|
||||
#define be16toh(x) (x)
|
||||
#define htobe16(x) (x)
|
||||
#define htole16(x) (bswap_16(x))
|
||||
#define le16toh(x) (bswap_16(x))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
|
@ -276,11 +276,11 @@ struct ntag21x_key {
|
|||
#define TB_AB(ab) ((ab == C_DEFAULT) ? C_100 : ab)
|
||||
|
||||
#ifdef WITH_DEBUG
|
||||
#define DEBUG_FUNCTION() do { printf("*** \033[033;1m%s\033[0m ***\n", __FUNCTION__); } while (0)
|
||||
#define DEBUG_XFER(data, nbytes, hint) do { hexdump (data, nbytes, hint, 0); } while (0)
|
||||
#define DEBUG_FUNCTION() do { printf("*** \033[033;1m%s\033[0m ***\n", __FUNCTION__); } while (0)
|
||||
#define DEBUG_XFER(data, nbytes, hint) do { hexdump (data, nbytes, hint, 0); } while (0)
|
||||
#else
|
||||
#define DEBUG_FUNCTION() do {} while (0)
|
||||
#define DEBUG_XFER(data, nbytes, hint) do {} while (0)
|
||||
#define DEBUG_FUNCTION() do {} while (0)
|
||||
#define DEBUG_XFER(data, nbytes, hint) do {} while (0)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
|
|
@ -20,27 +20,27 @@
|
|||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_TYPES_H)
|
||||
# include <sys/types.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_ENDIAN_H)
|
||||
# include <sys/endian.h>
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ENDIAN_H)
|
||||
# include <endian.h>
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
|
||||
# include <CoreFoundation/CoreFoundation.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_BYTESWAP_H)
|
||||
# include <byteswap.h>
|
||||
#include <byteswap.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
@ -49,7 +49,7 @@
|
|||
#include <strings.h>
|
||||
|
||||
#ifdef WITH_DEBUG
|
||||
# include <libutil.h>
|
||||
#include <libutil.h>
|
||||
#endif
|
||||
|
||||
#include <freefare.h>
|
||||
|
|
|
@ -13,27 +13,27 @@
|
|||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_TYPES_H)
|
||||
# include <sys/types.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_ENDIAN_H)
|
||||
# include <sys/endian.h>
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ENDIAN_H)
|
||||
# include <endian.h>
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
|
||||
# include <CoreFoundation/CoreFoundation.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_BYTESWAP_H)
|
||||
# include <byteswap.h>
|
||||
#include <byteswap.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
@ -42,7 +42,7 @@
|
|||
#include <strings.h>
|
||||
|
||||
#ifdef WITH_DEBUG
|
||||
# include <libutil.h>
|
||||
#include <libutil.h>
|
||||
#endif
|
||||
|
||||
#include <openssl/rand.h>
|
||||
|
|
|
@ -8,27 +8,27 @@
|
|||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_TYPES_H)
|
||||
# include <sys/types.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_ENDIAN_H)
|
||||
# include <sys/endian.h>
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ENDIAN_H)
|
||||
# include <endian.h>
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
|
||||
# include <CoreFoundation/CoreFoundation.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_BYTESWAP_H)
|
||||
# include <byteswap.h>
|
||||
#include <byteswap.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
|
|
@ -8,32 +8,32 @@
|
|||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_TYPES_H)
|
||||
# include <sys/types.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_ENDIAN_H)
|
||||
# include <sys/endian.h>
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ENDIAN_H)
|
||||
# include <endian.h>
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
|
||||
# include <CoreFoundation/CoreFoundation.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_BYTESWAP_H)
|
||||
# include <byteswap.h>
|
||||
#include <byteswap.h>
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(HAVE_SYS_TYPES_H)
|
||||
# include <sys/types.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <openssl/aes.h>
|
||||
|
@ -45,7 +45,7 @@
|
|||
#include <strings.h>
|
||||
|
||||
#ifdef WITH_DEBUG
|
||||
# include <libutil.h>
|
||||
#include <libutil.h>
|
||||
#endif
|
||||
|
||||
#include <freefare.h>
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_TYPES_H)
|
||||
# include <sys/types.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
@ -22,7 +22,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#ifdef WITH_DEBUG
|
||||
# include <libutil.h>
|
||||
#include <libutil.h>
|
||||
#endif
|
||||
|
||||
#include <freefare.h>
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_TYPES_H)
|
||||
# include <sys/types.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
@ -27,7 +27,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#ifdef WITH_DEBUG
|
||||
# include <libutil.h>
|
||||
#include <libutil.h>
|
||||
#endif
|
||||
|
||||
#include <freefare.h>
|
||||
|
|
|
@ -8,27 +8,27 @@
|
|||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_TYPES_H)
|
||||
# include <sys/types.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_ENDIAN_H)
|
||||
# include <sys/endian.h>
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ENDIAN_H)
|
||||
# include <endian.h>
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
|
||||
# include <CoreFoundation/CoreFoundation.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_BYTESWAP_H)
|
||||
# include <byteswap.h>
|
||||
#include <byteswap.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
|
Loading…
Reference in a new issue