new debug functions - work on hex dump

FossilOrigin-Name: c76afdd26f14000b912fea5a052abf0338c8515871ae526fef727a828924d2e7
This commit is contained in:
7u83@mail.ru
2018-03-04 15:59:20 +00:00
parent bc98b67450
commit 9f577d1a5c
27 changed files with 327 additions and 111 deletions

View File

@ -25,10 +25,10 @@
#ifndef __FORMAT_H
#define __FORMAT_H
#include "cw.h"
#include <stdint.h>
#include <stddef.h>
extern int format_hex_bytes(char *dst, const char *format, const char *delim,
int format_hex_bytes(char *dst, const char *format, const char *delim,
const uint8_t * src, int len);
char *format_s_hex_bytes(char *dst, const char *format, const char *delim,
@ -84,6 +84,22 @@ int format_dot11_fc(char *dst, uint16_t fc);
#ifndef CW_FORMAT_DUMP_ROW_LEN
#define CW_FORMAT_DUMP_ROW_LEN 16
#endif
struct cw_FormatDumpSettings {
int rowlen;
int ascii;
int invlen;
const char * dump_prefix;
};
char *cw_format_dump(const uint8_t * data, int len,
struct cw_FormatDumpSettings *settings);
/**@}*/
#endif