mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
make style
This commit is contained in:
parent
0d9223a547
commit
0373696662
483 changed files with 56514 additions and 52451 deletions
|
@ -123,8 +123,8 @@ extern "C" {
|
|||
#else
|
||||
/* For size_t */
|
||||
#include <stddef.h>
|
||||
extern void *mbedtls_calloc( size_t n, size_t size );
|
||||
extern void mbedtls_free( void *ptr );
|
||||
extern void *mbedtls_calloc(size_t n, size_t size);
|
||||
extern void mbedtls_free(void *ptr);
|
||||
|
||||
/**
|
||||
* \brief This function dynamically sets the memory-management
|
||||
|
@ -135,8 +135,8 @@ extern void mbedtls_free( void *ptr );
|
|||
*
|
||||
* \return \c 0.
|
||||
*/
|
||||
int mbedtls_platform_set_calloc_free( void * (*calloc_func)( size_t, size_t ),
|
||||
void (*free_func)( void * ) );
|
||||
int mbedtls_platform_set_calloc_free(void *(*calloc_func)(size_t, size_t),
|
||||
void (*free_func)(void *));
|
||||
#endif /* MBEDTLS_PLATFORM_FREE_MACRO && MBEDTLS_PLATFORM_CALLOC_MACRO */
|
||||
#else /* !MBEDTLS_PLATFORM_MEMORY */
|
||||
#define mbedtls_free free
|
||||
|
@ -149,7 +149,7 @@ int mbedtls_platform_set_calloc_free( void * (*calloc_func)( size_t, size_t ),
|
|||
#if defined(MBEDTLS_PLATFORM_FPRINTF_ALT)
|
||||
/* We need FILE * */
|
||||
#include <stdio.h>
|
||||
extern int (*mbedtls_fprintf)( FILE *stream, const char *format, ... );
|
||||
extern int (*mbedtls_fprintf)(FILE *stream, const char *format, ...);
|
||||
|
||||
/**
|
||||
* \brief This function dynamically configures the fprintf
|
||||
|
@ -160,8 +160,8 @@ extern int (*mbedtls_fprintf)( FILE *stream, const char *format, ... );
|
|||
*
|
||||
* \return \c 0.
|
||||
*/
|
||||
int mbedtls_platform_set_fprintf( int (*fprintf_func)( FILE *stream, const char *,
|
||||
... ) );
|
||||
int mbedtls_platform_set_fprintf(int (*fprintf_func)(FILE *stream, const char *,
|
||||
...));
|
||||
#else
|
||||
#if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO)
|
||||
#define mbedtls_fprintf MBEDTLS_PLATFORM_FPRINTF_MACRO
|
||||
|
@ -174,7 +174,7 @@ int mbedtls_platform_set_fprintf( int (*fprintf_func)( FILE *stream, const char
|
|||
* The function pointers for printf
|
||||
*/
|
||||
#if defined(MBEDTLS_PLATFORM_PRINTF_ALT)
|
||||
extern int (*mbedtls_printf)( const char *format, ... );
|
||||
extern int (*mbedtls_printf)(const char *format, ...);
|
||||
|
||||
/**
|
||||
* \brief This function dynamically configures the snprintf
|
||||
|
@ -185,7 +185,7 @@ extern int (*mbedtls_printf)( const char *format, ... );
|
|||
*
|
||||
* \return \c 0 on success.
|
||||
*/
|
||||
int mbedtls_platform_set_printf( int (*printf_func)( const char *, ... ) );
|
||||
int mbedtls_platform_set_printf(int (*printf_func)(const char *, ...));
|
||||
#else /* !MBEDTLS_PLATFORM_PRINTF_ALT */
|
||||
#if defined(MBEDTLS_PLATFORM_PRINTF_MACRO)
|
||||
#define mbedtls_printf MBEDTLS_PLATFORM_PRINTF_MACRO
|
||||
|
@ -205,11 +205,11 @@ int mbedtls_platform_set_printf( int (*printf_func)( const char *, ... ) );
|
|||
*/
|
||||
#if defined(_WIN32)
|
||||
/* For Windows (inc. MSYS2), we provide our own fixed implementation */
|
||||
int mbedtls_platform_win32_snprintf( char *s, size_t n, const char *fmt, ... );
|
||||
int mbedtls_platform_win32_snprintf(char *s, size_t n, const char *fmt, ...);
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT)
|
||||
extern int (*mbedtls_snprintf)( char * s, size_t n, const char * format, ... );
|
||||
extern int (*mbedtls_snprintf)(char *s, size_t n, const char *format, ...);
|
||||
|
||||
/**
|
||||
* \brief This function allows configuring a custom
|
||||
|
@ -219,8 +219,8 @@ extern int (*mbedtls_snprintf)( char * s, size_t n, const char * format, ... );
|
|||
*
|
||||
* \return \c 0 on success.
|
||||
*/
|
||||
int mbedtls_platform_set_snprintf( int (*snprintf_func)( char * s, size_t n,
|
||||
const char * format, ... ) );
|
||||
int mbedtls_platform_set_snprintf(int (*snprintf_func)(char *s, size_t n,
|
||||
const char *format, ...));
|
||||
#else /* MBEDTLS_PLATFORM_SNPRINTF_ALT */
|
||||
#if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO)
|
||||
#define mbedtls_snprintf MBEDTLS_PLATFORM_SNPRINTF_MACRO
|
||||
|
@ -233,7 +233,7 @@ int mbedtls_platform_set_snprintf( int (*snprintf_func)( char * s, size_t n,
|
|||
* The function pointers for exit
|
||||
*/
|
||||
#if defined(MBEDTLS_PLATFORM_EXIT_ALT)
|
||||
extern void (*mbedtls_exit)( int status );
|
||||
extern void (*mbedtls_exit)(int status);
|
||||
|
||||
/**
|
||||
* \brief This function dynamically configures the exit
|
||||
|
@ -244,7 +244,7 @@ extern void (*mbedtls_exit)( int status );
|
|||
*
|
||||
* \return \c 0 on success.
|
||||
*/
|
||||
int mbedtls_platform_set_exit( void (*exit_func)( int status ) );
|
||||
int mbedtls_platform_set_exit(void (*exit_func)(int status));
|
||||
#else
|
||||
#if defined(MBEDTLS_PLATFORM_EXIT_MACRO)
|
||||
#define mbedtls_exit MBEDTLS_PLATFORM_EXIT_MACRO
|
||||
|
@ -276,13 +276,13 @@ int mbedtls_platform_set_exit( void (*exit_func)( int status ) );
|
|||
#if defined(MBEDTLS_ENTROPY_NV_SEED)
|
||||
#if !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) && defined(MBEDTLS_FS_IO)
|
||||
/* Internal standard platform definitions */
|
||||
int mbedtls_platform_std_nv_seed_read( unsigned char *buf, size_t buf_len );
|
||||
int mbedtls_platform_std_nv_seed_write( unsigned char *buf, size_t buf_len );
|
||||
int mbedtls_platform_std_nv_seed_read(unsigned char *buf, size_t buf_len);
|
||||
int mbedtls_platform_std_nv_seed_write(unsigned char *buf, size_t buf_len);
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_NV_SEED_ALT)
|
||||
extern int (*mbedtls_nv_seed_read)( unsigned char *buf, size_t buf_len );
|
||||
extern int (*mbedtls_nv_seed_write)( unsigned char *buf, size_t buf_len );
|
||||
extern int (*mbedtls_nv_seed_read)(unsigned char *buf, size_t buf_len);
|
||||
extern int (*mbedtls_nv_seed_write)(unsigned char *buf, size_t buf_len);
|
||||
|
||||
/**
|
||||
* \brief This function allows configuring custom seed file writing and
|
||||
|
@ -294,9 +294,9 @@ extern int (*mbedtls_nv_seed_write)( unsigned char *buf, size_t buf_len );
|
|||
* \return \c 0 on success.
|
||||
*/
|
||||
int mbedtls_platform_set_nv_seed(
|
||||
int (*nv_seed_read_func)( unsigned char *buf, size_t buf_len ),
|
||||
int (*nv_seed_write_func)( unsigned char *buf, size_t buf_len )
|
||||
);
|
||||
int (*nv_seed_read_func)(unsigned char *buf, size_t buf_len),
|
||||
int (*nv_seed_write_func)(unsigned char *buf, size_t buf_len)
|
||||
);
|
||||
#else
|
||||
#if defined(MBEDTLS_PLATFORM_NV_SEED_READ_MACRO) && \
|
||||
defined(MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO)
|
||||
|
@ -317,8 +317,7 @@ int mbedtls_platform_set_nv_seed(
|
|||
* \note This structure may be used to assist platform-specific
|
||||
* setup or teardown operations.
|
||||
*/
|
||||
typedef struct mbedtls_platform_context
|
||||
{
|
||||
typedef struct mbedtls_platform_context {
|
||||
char dummy; /**< A placeholder member, as empty structs are not portable. */
|
||||
}
|
||||
mbedtls_platform_context;
|
||||
|
@ -342,7 +341,7 @@ mbedtls_platform_context;
|
|||
*
|
||||
* \return \c 0 on success.
|
||||
*/
|
||||
int mbedtls_platform_setup( mbedtls_platform_context *ctx );
|
||||
int mbedtls_platform_setup(mbedtls_platform_context *ctx);
|
||||
/**
|
||||
* \brief This function performs any platform teardown operations.
|
||||
*
|
||||
|
@ -357,7 +356,7 @@ int mbedtls_platform_setup( mbedtls_platform_context *ctx );
|
|||
* \param ctx The platform context.
|
||||
*
|
||||
*/
|
||||
void mbedtls_platform_teardown( mbedtls_platform_context *ctx );
|
||||
void mbedtls_platform_teardown(mbedtls_platform_context *ctx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue