diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2024-01-25 17:51:06 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2024-02-16 09:32:04 +0100 |
commit | 317df86ba3b392410cb3e7d6ac99e182cdd2ea3c (patch) | |
tree | 5709313e28a49aa5e99920ec37939c6842f57e4a /cpukit/libtrace | |
parent | i386: Restore SMP functionality (diff) | |
download | rtems-317df86ba3b392410cb3e7d6ac99e182cdd2ea3c.tar.bz2 |
base64: Move base64 encoding support
Diffstat (limited to 'cpukit/libtrace')
-rw-r--r-- | cpukit/libtrace/record/record-dump-base64.c | 7 | ||||
-rw-r--r-- | cpukit/libtrace/record/record-dump-zbase64.c | 9 |
2 files changed, 9 insertions, 7 deletions
diff --git a/cpukit/libtrace/record/record-dump-base64.c b/cpukit/libtrace/record/record-dump-base64.c index 8d403e9c27..9438041664 100644 --- a/cpukit/libtrace/record/record-dump-base64.c +++ b/cpukit/libtrace/record/record-dump-base64.c @@ -30,11 +30,12 @@ #endif #include <rtems/recorddump.h> -#include <rtems/dev/io.h> #include <limits.h> #include <string.h> +#include <rtems/base64.h> + typedef struct { IO_Put_char put_char; void *arg; @@ -76,7 +77,7 @@ static void chunk( void *arg, const void *data, size_t length ) if ( index == RTEMS_ARRAY_SIZE( ctx->buf ) - 1 ) { index = 0; - _IO_Base64( + _Base64_Encode( put_char, ctx, ctx->buf, @@ -94,7 +95,7 @@ static void chunk( void *arg, const void *data, size_t length ) static void flush( dump_context *ctx ) { - _IO_Base64( put_char, ctx, ctx->buf, ctx->index, NULL, INT_MAX ); + _Base64_Encode( put_char, ctx, ctx->buf, ctx->index, NULL, INT_MAX ); } void rtems_record_dump_base64( IO_Put_char put_char, void *arg ) diff --git a/cpukit/libtrace/record/record-dump-zbase64.c b/cpukit/libtrace/record/record-dump-zbase64.c index 0979e36a47..43bd0ecff8 100644 --- a/cpukit/libtrace/record/record-dump-zbase64.c +++ b/cpukit/libtrace/record/record-dump-zbase64.c @@ -30,11 +30,12 @@ #endif #include <rtems/recorddump.h> -#include <rtems/dev/io.h> #include <limits.h> #include <string.h> +#include <rtems/base64.h> + static void *dump_zalloc( void *opaque, unsigned items, unsigned size ) { rtems_record_dump_base64_zlib_context *ctx; @@ -96,7 +97,7 @@ static void chunk( void *arg, const void *data, size_t length ) ctx->stream.next_out = &ctx->buf[ 0 ]; ctx->stream.avail_out = sizeof( ctx->buf ); - _IO_Base64( put_char, ctx, ctx->buf, sizeof( ctx->buf ), NULL, INT_MAX ); + _Base64_Encode( put_char, ctx, ctx->buf, sizeof( ctx->buf ), NULL, INT_MAX ); } } } @@ -115,11 +116,11 @@ static void flush( rtems_record_dump_base64_zlib_context *ctx ) ctx->stream.next_out = &ctx->buf[ 0 ]; ctx->stream.avail_out = sizeof( ctx->buf ); - _IO_Base64( put_char, ctx, ctx->buf, sizeof( ctx->buf ), NULL, INT_MAX ); + _Base64_Encode( put_char, ctx, ctx->buf, sizeof( ctx->buf ), NULL, INT_MAX ); } } - _IO_Base64( + _Base64_Encode( put_char, ctx, ctx->buf, |