cbfstool: Replace C++ code with C code

cbfstool was using a C++ wrapper around the C written LZMA functions.
And a C wrapper around those C++ functions. Drop the mess and rewrite
the functions to be all C.

Change-Id: Ieb6645a42f19efcc857be323ed8bdfcd9f48ee7c
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/3010
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Stefan Reinauer
2013-03-28 16:51:45 -07:00
committed by Ronald G. Minnich
parent 60a4a73fcd
commit aa3f7ba36e
8 changed files with 208 additions and 1151 deletions

View File

@@ -26,14 +26,14 @@
#include <stdio.h>
#include "common.h"
extern void do_lzma_compress(char *in, int in_len, char *out, int *out_len);
void do_lzma_compress(char *in, int in_len, char *out, int *out_len);
void lzma_compress(char *in, int in_len, char *out, int *out_len)
static void lzma_compress(char *in, int in_len, char *out, int *out_len)
{
do_lzma_compress(in, in_len, out, out_len);
}
void none_compress(char *in, int in_len, char *out, int *out_len)
static void none_compress(char *in, int in_len, char *out, int *out_len)
{
memcpy(out, in, in_len);
*out_len = in_len;