Run make style to indent macros

This commit is contained in:
Romain Tartière 2017-06-29 12:25:53 +02:00
parent c54e3d981c
commit 69bf99b33d
30 changed files with 272 additions and 272 deletions

View file

@ -1,5 +1,5 @@
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <ctype.h> #include <ctype.h>
@ -8,15 +8,15 @@
#include <unistd.h> #include <unistd.h>
#if defined(HAVE_SYS_ENDIAN_H) #if defined(HAVE_SYS_ENDIAN_H)
# include <sys/endian.h> #include <sys/endian.h>
#endif #endif
#if defined(HAVE_ENDIAN_H) #if defined(HAVE_ENDIAN_H)
# include <endian.h> #include <endian.h>
#endif #endif
#if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H) #if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
# include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#endif #endif
#include <nfc/nfc.h> #include <nfc/nfc.h>

View file

@ -1,5 +1,5 @@
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <err.h> #include <err.h>

View file

@ -14,7 +14,7 @@
*/ */
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <err.h> #include <err.h>

View file

@ -1,5 +1,5 @@
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <err.h> #include <err.h>

View file

@ -1,5 +1,5 @@
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <err.h> #include <err.h>

View file

@ -1,5 +1,5 @@
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <err.h> #include <err.h>

View file

@ -1,5 +1,5 @@
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <err.h> #include <err.h>

View file

@ -1,5 +1,5 @@
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <err.h> #include <err.h>

View file

@ -1,5 +1,5 @@
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <err.h> #include <err.h>

View file

@ -1,5 +1,5 @@
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <err.h> #include <err.h>

View file

@ -1,5 +1,5 @@
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <err.h> #include <err.h>

View file

@ -8,7 +8,7 @@
*/ */
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <assert.h> #include <assert.h>
@ -18,7 +18,7 @@
#include <sys/types.h> #include <sys/types.h>
#ifdef WITH_DEBUG #ifdef WITH_DEBUG
# include <libutil.h> #include <libutil.h>
#endif #endif
#include <freefare.h> #include <freefare.h>

View file

@ -1,5 +1,5 @@
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <stdlib.h> #include <stdlib.h>

View file

@ -283,7 +283,7 @@ bit 0: PICC master key frozen (reversible with configuration change or when form
(free_create_delete_application << 2) | \ (free_create_delete_application << 2) | \
(free_listing_apps_and_key_settings << 1) | \ (free_listing_apps_and_key_settings << 1) | \
(picc_master_key_changeable) \ (picc_master_key_changeable) \
) )
/* Mifare DESFire EV1 Application crypto operations */ /* 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_create_delete_files << 2) | \
(free_listing_contents << 1) | \ (free_listing_contents << 1) | \
(app_master_key_changeable) \ (app_master_key_changeable) \
) )
/* Access right */ /* Access right */
@ -314,7 +314,7 @@ bit 0: PICC master key frozen (reversible with configuration change or when form
(write << 8) | \ (write << 8) | \
(read_write << 4) | \ (read_write << 4) | \
(change_access_rights) \ (change_access_rights) \
) )
#define MDAR_READ(ar) (((ar) >> 12) & 0x0f) #define MDAR_READ(ar) (((ar) >> 12) & 0x0f)
#define MDAR_WRITE(ar) (((ar) >> 8) & 0x0f) #define MDAR_WRITE(ar) (((ar) >> 8) & 0x0f)

View file

@ -2,7 +2,7 @@
#define __FREEFARE_INTERNAL_H__ #define __FREEFARE_INTERNAL_H__
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <openssl/des.h> #include <openssl/des.h>
@ -25,55 +25,55 @@
*/ */
#if !defined(le32toh) && defined(letoh32) #if !defined(le32toh) && defined(letoh32)
# define le32toh(x) letoh32(x) #define le32toh(x) letoh32(x)
# define be32toh(x) betoh32(x) #define be32toh(x) betoh32(x)
#endif #endif
#if !defined(le16toh) && defined(letoh16) #if !defined(le16toh) && defined(letoh16)
# define le16toh(x) letoh16(x) #define le16toh(x) letoh16(x)
# define be16toh(x) betoh16(x) #define be16toh(x) betoh16(x)
#endif #endif
#if !defined(le32toh) && defined(HAVE_COREFOUNDATION_COREFOUNDATION_H) #if !defined(le32toh) && defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
# define be32toh(x) CFSwapInt32BigToHost(x) #define be32toh(x) CFSwapInt32BigToHost(x)
# define htobe32(x) CFSwapInt32HostToBig(x) #define htobe32(x) CFSwapInt32HostToBig(x)
# define le32toh(x) CFSwapInt32LittleToHost(x) #define le32toh(x) CFSwapInt32LittleToHost(x)
# define htole32(x) CFSwapInt32HostToLittle(x) #define htole32(x) CFSwapInt32HostToLittle(x)
#endif #endif
#if !defined(le16toh) && defined(HAVE_COREFOUNDATION_COREFOUNDATION_H) #if !defined(le16toh) && defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
# define be16toh(x) CFSwapInt16BigToHost(x) #define be16toh(x) CFSwapInt16BigToHost(x)
# define htobe16(x) CFSwapInt16HostToBig(x) #define htobe16(x) CFSwapInt16HostToBig(x)
# define le16toh(x) CFSwapInt16LittleToHost(x) #define le16toh(x) CFSwapInt16LittleToHost(x)
# define htole16(x) CFSwapInt16HostToLittle(x) #define htole16(x) CFSwapInt16HostToLittle(x)
#endif #endif
#if !defined(le32toh) && defined(bswap_32) #if !defined(le32toh) && defined(bswap_32)
# if BYTE_ORDER == LITTLE_ENDIAN #if BYTE_ORDER == LITTLE_ENDIAN
# define be32toh(x) bswap_32(x) #define be32toh(x) bswap_32(x)
# define htobe32(x) bswap_32(x) #define htobe32(x) bswap_32(x)
# define le32toh(x) (x) #define le32toh(x) (x)
# define htole32(x) (x) #define htole32(x) (x)
# else #else
# define be32toh(x) (x) #define be32toh(x) (x)
# define htobe32(x) (x) #define htobe32(x) (x)
# define le32toh(x) bswap_32(x) #define le32toh(x) bswap_32(x)
# define htole32(x) bswap_32(x) #define htole32(x) bswap_32(x)
# endif #endif
#endif #endif
#if !defined(htole16) && defined(bswap_16) #if !defined(htole16) && defined(bswap_16)
# if BYTE_ORDER == LITTLE_ENDIAN #if BYTE_ORDER == LITTLE_ENDIAN
# define be16toh(x) (bswap_16(x)) #define be16toh(x) (bswap_16(x))
# define htobe16(x) (bswap_16(x)) #define htobe16(x) (bswap_16(x))
# define htole16(x) (x) #define htole16(x) (x)
# define le16toh(x) (x) #define le16toh(x) (x)
# else #else
# define be16toh(x) (x) #define be16toh(x) (x)
# define htobe16(x) (x) #define htobe16(x) (x)
# define htole16(x) (bswap_16(x)) #define htole16(x) (bswap_16(x))
# define le16toh(x) (bswap_16(x)) #define le16toh(x) (bswap_16(x))
# endif #endif
#endif #endif
#define MIN(a, b) (((a) < (b)) ? (a) : (b)) #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) #define TB_AB(ab) ((ab == C_DEFAULT) ? C_100 : ab)
#ifdef WITH_DEBUG #ifdef WITH_DEBUG
#define DEBUG_FUNCTION() do { printf("*** \033[033;1m%s\033[0m ***\n", __FUNCTION__); } 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) #define DEBUG_XFER(data, nbytes, hint) do { hexdump (data, nbytes, hint, 0); } while (0)
#else #else
#define DEBUG_FUNCTION() do {} while (0) #define DEBUG_FUNCTION() do {} while (0)
#define DEBUG_XFER(data, nbytes, hint) do {} while (0) #define DEBUG_XFER(data, nbytes, hint) do {} while (0)
#endif #endif

View file

@ -12,7 +12,7 @@
*/ */
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <sys/types.h> #include <sys/types.h>

View file

@ -6,7 +6,7 @@
*/ */
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#include <errno.h> #include <errno.h>

View file

@ -20,27 +20,27 @@
*/ */
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#if defined(HAVE_SYS_TYPES_H) #if defined(HAVE_SYS_TYPES_H)
# include <sys/types.h> #include <sys/types.h>
#endif #endif
#if defined(HAVE_SYS_ENDIAN_H) #if defined(HAVE_SYS_ENDIAN_H)
# include <sys/endian.h> #include <sys/endian.h>
#endif #endif
#if defined(HAVE_ENDIAN_H) #if defined(HAVE_ENDIAN_H)
# include <endian.h> #include <endian.h>
#endif #endif
#if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H) #if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
# include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#endif #endif
#if defined(HAVE_BYTESWAP_H) #if defined(HAVE_BYTESWAP_H)
# include <byteswap.h> #include <byteswap.h>
#endif #endif
#include <errno.h> #include <errno.h>
@ -49,7 +49,7 @@
#include <strings.h> #include <strings.h>
#ifdef WITH_DEBUG #ifdef WITH_DEBUG
# include <libutil.h> #include <libutil.h>
#endif #endif
#include <freefare.h> #include <freefare.h>

View file

@ -13,27 +13,27 @@
*/ */
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#if defined(HAVE_SYS_TYPES_H) #if defined(HAVE_SYS_TYPES_H)
# include <sys/types.h> #include <sys/types.h>
#endif #endif
#if defined(HAVE_SYS_ENDIAN_H) #if defined(HAVE_SYS_ENDIAN_H)
# include <sys/endian.h> #include <sys/endian.h>
#endif #endif
#if defined(HAVE_ENDIAN_H) #if defined(HAVE_ENDIAN_H)
# include <endian.h> #include <endian.h>
#endif #endif
#if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H) #if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
# include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#endif #endif
#if defined(HAVE_BYTESWAP_H) #if defined(HAVE_BYTESWAP_H)
# include <byteswap.h> #include <byteswap.h>
#endif #endif
#include <errno.h> #include <errno.h>
@ -42,7 +42,7 @@
#include <strings.h> #include <strings.h>
#ifdef WITH_DEBUG #ifdef WITH_DEBUG
# include <libutil.h> #include <libutil.h>
#endif #endif
#include <openssl/rand.h> #include <openssl/rand.h>

View file

@ -8,27 +8,27 @@
*/ */
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#if defined(HAVE_SYS_TYPES_H) #if defined(HAVE_SYS_TYPES_H)
# include <sys/types.h> #include <sys/types.h>
#endif #endif
#if defined(HAVE_SYS_ENDIAN_H) #if defined(HAVE_SYS_ENDIAN_H)
# include <sys/endian.h> #include <sys/endian.h>
#endif #endif
#if defined(HAVE_ENDIAN_H) #if defined(HAVE_ENDIAN_H)
# include <endian.h> #include <endian.h>
#endif #endif
#if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H) #if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
# include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#endif #endif
#if defined(HAVE_BYTESWAP_H) #if defined(HAVE_BYTESWAP_H)
# include <byteswap.h> #include <byteswap.h>
#endif #endif
#include <errno.h> #include <errno.h>

View file

@ -8,32 +8,32 @@
*/ */
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#if defined(HAVE_SYS_TYPES_H) #if defined(HAVE_SYS_TYPES_H)
# include <sys/types.h> #include <sys/types.h>
#endif #endif
#if defined(HAVE_SYS_ENDIAN_H) #if defined(HAVE_SYS_ENDIAN_H)
# include <sys/endian.h> #include <sys/endian.h>
#endif #endif
#if defined(HAVE_ENDIAN_H) #if defined(HAVE_ENDIAN_H)
# include <endian.h> #include <endian.h>
#endif #endif
#if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H) #if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
# include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#endif #endif
#if defined(HAVE_BYTESWAP_H) #if defined(HAVE_BYTESWAP_H)
# include <byteswap.h> #include <byteswap.h>
#endif #endif
#if defined(HAVE_SYS_TYPES_H) #if defined(HAVE_SYS_TYPES_H)
# include <sys/types.h> #include <sys/types.h>
#endif #endif
#include <openssl/aes.h> #include <openssl/aes.h>
@ -45,7 +45,7 @@
#include <strings.h> #include <strings.h>
#ifdef WITH_DEBUG #ifdef WITH_DEBUG
# include <libutil.h> #include <libutil.h>
#endif #endif
#include <freefare.h> #include <freefare.h>

View file

@ -10,11 +10,11 @@
*/ */
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#if defined(HAVE_SYS_TYPES_H) #if defined(HAVE_SYS_TYPES_H)
# include <sys/types.h> #include <sys/types.h>
#endif #endif
#include <errno.h> #include <errno.h>
@ -22,7 +22,7 @@
#include <string.h> #include <string.h>
#ifdef WITH_DEBUG #ifdef WITH_DEBUG
# include <libutil.h> #include <libutil.h>
#endif #endif
#include <freefare.h> #include <freefare.h>

View file

@ -15,11 +15,11 @@
*/ */
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#if defined(HAVE_SYS_TYPES_H) #if defined(HAVE_SYS_TYPES_H)
# include <sys/types.h> #include <sys/types.h>
#endif #endif
#include <errno.h> #include <errno.h>
@ -27,7 +27,7 @@
#include <string.h> #include <string.h>
#ifdef WITH_DEBUG #ifdef WITH_DEBUG
# include <libutil.h> #include <libutil.h>
#endif #endif
#include <freefare.h> #include <freefare.h>

View file

@ -8,27 +8,27 @@
*/ */
#if defined(HAVE_CONFIG_H) #if defined(HAVE_CONFIG_H)
# include "config.h" #include "config.h"
#endif #endif
#if defined(HAVE_SYS_TYPES_H) #if defined(HAVE_SYS_TYPES_H)
# include <sys/types.h> #include <sys/types.h>
#endif #endif
#if defined(HAVE_SYS_ENDIAN_H) #if defined(HAVE_SYS_ENDIAN_H)
# include <sys/endian.h> #include <sys/endian.h>
#endif #endif
#if defined(HAVE_ENDIAN_H) #if defined(HAVE_ENDIAN_H)
# include <endian.h> #include <endian.h>
#endif #endif
#if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H) #if defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
# include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#endif #endif
#if defined(HAVE_BYTESWAP_H) #if defined(HAVE_BYTESWAP_H)
# include <byteswap.h> #include <byteswap.h>
#endif #endif
#include <stdlib.h> #include <stdlib.h>