8#include "win_hdrs/win_types.h"
10#define DEFAULT_BUFSIZE 0xFF
11#define IS_PRINTABLE(c) (c >= 0x20 && c < 0x7f)
12#define IS_ENDLINE(c) (c == 0x0A || c == 0xD)
21#define TRACE() if (DBG_LVL) printf(">%s line: %d [%s]\n", __FUNCTION__, __LINE__, __FILE__);
22#define LOG(msg) if (DBG_LVL) printf("%s: %s\n", __FUNCTION__,msg);
37 size_t getAsciiLen(
const char *ptr,
size_t maxCount,
bool acceptNotTerminated =
false);
38 size_t getAsciiLenW(
const WORD *ptr,
size_t maxCount,
bool acceptNotTerminated =
false);
45 void hexdump(BYTE *buf,
size_t bufSize,
size_t pad);
49 if (unit == 0)
return 0;
50 size_t units = value / unit;
52 if (value % unit) units++;
57 inline uint64_t
roundup(uint64_t value, uint64_t unit)
66 bool endsWith(std::string
string, std::string endStr);
bool append(dbg_level lvl, const char *format,...)
bool hasNonPrintable(const char *ptr, size_t maxInp)
size_t forwarderNameLen(const char *ptr, size_t max_len)
size_t getAsciiLen(const char *ptr, size_t maxCount, bool acceptNotTerminated=false)
size_t unitsCount(uint64_t value, uint64_t unit, bool roundup=true)
bool isStrLonger(const char *inp, size_t maxLen)
size_t noWhiteCount(char *buf, size_t bufSize)
bool validateFuncName(const char *fPtr, size_t bufSize)
void hexdump(BYTE *buf, size_t bufSize, size_t pad)
bool isSpaceClear(void *ptr, uint64_t size)
uint64_t roundup(uint64_t value, uint64_t unit)
size_t getAsciiLenW(const WORD *ptr, size_t maxCount, bool acceptNotTerminated=false)
bool endsWith(std::string string, std::string endStr)