mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
mbedtls: make style
This commit is contained in:
parent
6324e2e746
commit
b1d6eaf2f7
177 changed files with 37224 additions and 41821 deletions
|
@ -138,8 +138,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
|
||||
|
@ -150,8 +150,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
|
||||
|
@ -164,7 +164,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
|
||||
|
@ -175,8 +175,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
|
||||
|
@ -189,7 +189,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
|
||||
|
@ -200,7 +200,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
|
||||
|
@ -220,11 +220,11 @@ int mbedtls_platform_set_printf( int (*printf_func)( const char *, ... ) );
|
|||
*/
|
||||
#if defined(MBEDTLS_PLATFORM_HAS_NON_CONFORMING_SNPRINTF)
|
||||
/* 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
|
||||
|
@ -234,8 +234,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
|
||||
|
@ -256,12 +256,12 @@ int mbedtls_platform_set_snprintf( int (*snprintf_func)( char * s, size_t n,
|
|||
#if defined(MBEDTLS_PLATFORM_HAS_NON_CONFORMING_VSNPRINTF)
|
||||
#include <stdarg.h>
|
||||
/* For Older Windows (inc. MSYS2), we provide our own fixed implementation */
|
||||
int mbedtls_platform_win32_vsnprintf( char *s, size_t n, const char *fmt, va_list arg );
|
||||
int mbedtls_platform_win32_vsnprintf(char *s, size_t n, const char *fmt, va_list arg);
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT)
|
||||
#include <stdarg.h>
|
||||
extern int (*mbedtls_vsnprintf)( char * s, size_t n, const char * format, va_list arg );
|
||||
extern int (*mbedtls_vsnprintf)(char *s, size_t n, const char *format, va_list arg);
|
||||
|
||||
/**
|
||||
* \brief Set your own snprintf function pointer
|
||||
|
@ -270,8 +270,8 @@ extern int (*mbedtls_vsnprintf)( char * s, size_t n, const char * format, va_lis
|
|||
*
|
||||
* \return \c 0
|
||||
*/
|
||||
int mbedtls_platform_set_vsnprintf( int (*vsnprintf_func)( char * s, size_t n,
|
||||
const char * format, va_list arg ) );
|
||||
int mbedtls_platform_set_vsnprintf(int (*vsnprintf_func)(char *s, size_t n,
|
||||
const char *format, va_list arg));
|
||||
#else /* MBEDTLS_PLATFORM_VSNPRINTF_ALT */
|
||||
#if defined(MBEDTLS_PLATFORM_VSNPRINTF_MACRO)
|
||||
#define mbedtls_vsnprintf MBEDTLS_PLATFORM_VSNPRINTF_MACRO
|
||||
|
@ -284,7 +284,7 @@ int mbedtls_platform_set_vsnprintf( int (*vsnprintf_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
|
||||
|
@ -295,7 +295,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
|
||||
|
@ -327,13 +327,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
|
||||
|
@ -345,9 +345,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)
|
||||
|
@ -368,8 +368,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;
|
||||
|
@ -393,7 +392,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.
|
||||
*
|
||||
|
@ -408,7 +407,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