The Great Renaming
A simple execution of tmp/invoke-rename.pl
This commit is contained in:
parent
b5904d25ef
commit
2cf5a7c98e
291 changed files with 36012 additions and 36012 deletions
|
@ -20,30 +20,30 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#if !defined(POLARSSL_CONFIG_FILE)
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "mbedtls/config.h"
|
||||
#else
|
||||
#include POLARSSL_CONFIG_FILE
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "mbedtls/platform.h"
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#define polarssl_fprintf fprintf
|
||||
#define polarssl_printf printf
|
||||
#define mbedtls_fprintf fprintf
|
||||
#define mbedtls_printf printf
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_FS_IO)
|
||||
#if defined(MBEDTLS_ENTROPY_C) && defined(MBEDTLS_FS_IO)
|
||||
#include "mbedtls/entropy.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#if !defined(POLARSSL_ENTROPY_C) || !defined(POLARSSL_FS_IO)
|
||||
#if !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_FS_IO)
|
||||
int main( void )
|
||||
{
|
||||
polarssl_printf("POLARSSL_ENTROPY_C and/or POLARSSL_FS_IO not defined.\n");
|
||||
mbedtls_printf("MBEDTLS_ENTROPY_C and/or MBEDTLS_FS_IO not defined.\n");
|
||||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
@ -51,35 +51,35 @@ int main( int argc, char *argv[] )
|
|||
{
|
||||
FILE *f;
|
||||
int i, k, ret;
|
||||
entropy_context entropy;
|
||||
unsigned char buf[ENTROPY_BLOCK_SIZE];
|
||||
mbedtls_entropy_context entropy;
|
||||
unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE];
|
||||
|
||||
if( argc < 2 )
|
||||
{
|
||||
polarssl_fprintf( stderr, "usage: %s <output filename>\n", argv[0] );
|
||||
mbedtls_fprintf( stderr, "usage: %s <output filename>\n", argv[0] );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
if( ( f = fopen( argv[1], "wb+" ) ) == NULL )
|
||||
{
|
||||
polarssl_printf( "failed to open '%s' for writing.\n", argv[1] );
|
||||
mbedtls_printf( "failed to open '%s' for writing.\n", argv[1] );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
entropy_init( &entropy );
|
||||
mbedtls_entropy_init( &entropy );
|
||||
|
||||
for( i = 0, k = 768; i < k; i++ )
|
||||
{
|
||||
ret = entropy_func( &entropy, buf, sizeof( buf ) );
|
||||
ret = mbedtls_entropy_func( &entropy, buf, sizeof( buf ) );
|
||||
if( ret != 0 )
|
||||
{
|
||||
polarssl_printf("failed!\n");
|
||||
mbedtls_printf("failed!\n");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
fwrite( buf, 1, sizeof( buf ), f );
|
||||
|
||||
polarssl_printf( "Generating %ldkb of data in file '%s'... %04.1f" \
|
||||
mbedtls_printf( "Generating %ldkb of data in file '%s'... %04.1f" \
|
||||
"%% done\r", (long)(sizeof(buf) * k / 1024), argv[1], (100 * (float) (i + 1)) / k );
|
||||
fflush( stdout );
|
||||
}
|
||||
|
@ -87,11 +87,11 @@ int main( int argc, char *argv[] )
|
|||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
polarssl_printf( "\n" );
|
||||
mbedtls_printf( "\n" );
|
||||
|
||||
fclose( f );
|
||||
entropy_free( &entropy );
|
||||
mbedtls_entropy_free( &entropy );
|
||||
|
||||
return( ret );
|
||||
}
|
||||
#endif /* POLARSSL_ENTROPY_C */
|
||||
#endif /* MBEDTLS_ENTROPY_C */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue