13 }
else if (
c >=
'A' &&
c <=
'F') {
15 }
else if (
c >=
'a' &&
c <=
'f') {
24 if (!strncmp(
code,
"'''", 3)) {
25 const char *
s =
code + 2;
43 const char abc[] =
"0123456789abcdef";
44 if (*
code !=
'[' || !strchr(
code,
']')) {
57 const char *word = _word;
58 while (*word ==
' ' || *word ==
'\t' || *word ==
'\n') {
64 *
out++ = abc[(
n >> 4) & 0xf];
65 *
out++ = abc[
n & 0xf];
86 const char *tmp_code = strchr(
code,
'=');
95 }
else if (*
code ==
'"' || *
code ==
'\'') {
107 const char abc[] =
"0123456789abcdefABCDEF";
109 if (*
iter !=
'\'' && *
iter !=
'"') {
112 const char end_char = *
iter;
134 if (
c1 ==
'\0' ||
c2 ==
'\0') {
136 }
else if (strchr(abc,
c1) && strchr(abc,
c2)) {
145 if (
iter[0] == end_char) {
161 if (!strncmp(
code,
"/*", 2)) {
162 char *
end = strstr(
code,
"*/");
166 eprintf(
"Missing closing comment\n");
168 }
else if (!strncmp(
code,
"//", 2)) {
169 char *
end = strchr(
code,
'\n');
178 const char abc[] =
"0123456789abcdef";
179 if (*
code !=
'{' || !strchr(
code,
'}')) {
189 const char *word = _word;
191 while (*word ==
' ' || *word ==
'\t' || *word ==
'\n') {
197 *
out++ = abc[(
n >> 4) & 0xf];
198 *
out++ = abc[
n & 0xf];
224 const char *tmp_code = strchr(
code,
'=');
233 }
else if (*
code ==
'"') {
242 s1 = strchr(
code + 1,
'"');
243 s2 = strchr(
code + 1,
';');
255 char *
s1 = strchr(
code,
'\'');
256 char *
s2 = strchr(
code,
'"');
294 int i,
len = strlen((
const char *)b64d);
301 for (
i = 0;
i <
len;
i++) {
321 char *
const ret =
calloc(1, strlen(
code) * 3);
343 if (!strchr(
code,
'=')) {
347 if (strstr(
code,
"char") || strstr(
code,
"int")) {
351 if (strstr(
code,
"var")) {
361 ut8 *ptr,
c = 0,
d = 0;
364 for (ptr = (
ut8 *)
arg;; ptr = ptr + 1) {
365 if (!*ptr || *ptr ==
' ' || j == 2) {
370 eprintf(
"Invalid hexa string at char '%c' (%s).\n",
408 RZ_LOG_FATAL(
"Output buffer too small for negative 32bit value.\n");
419 if ((
len + 1) * 2 <
len) {
450 if (*
in ==
'0' &&
in[1] ==
'x') {
462 if (*
in ==
'#' || (*
in ==
'/' &&
in[1] ==
'/')) {
463 if ((
in = strchr(
in,
'\n'))) {
467 }
else if (*
in ==
'/' &&
in[1] ==
'*') {
468 if ((
in = strstr(
in,
"*/"))) {
484 return -(nibbles + 1) / 2;
492 int len, ilen = strlen(
in) + 1;
495 for (ptr =
out; *ptr; ptr++) {
510 for (ptr =
mask; *ptr; ptr++) {
513 }
else if (*ptr ==
'.') {
552 if (!strncmp(
str,
"0x", 2)) {
555 for (
i = 0;
str[
i] !=
'\0';
i++) {
lsl lsr asr ror lsl lsr asr ror lsl lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror c1
lsl lsr asr ror lsl lsr asr ror lsl lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror c2
const lzma_allocator const uint8_t * in
const lzma_allocator const uint8_t size_t uint8_t * out
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void start
RZ_API char * rz_hex_from_py_array(char *out, const char *code)
RZ_API char * rz_hex_from_js(const char *code)
RZ_API char * rz_hex_from_c_array(char *out, const char *code)
RZ_API char * rz_hex_no_code(const char *code)
RZ_API int rz_hex_str2bin(const char *in, ut8 *out)
Convert an input string in into the binary form in out.
RZ_API bool rz_hex_to_byte(ut8 *val, ut8 c)
RZ_API int rz_hex_str_is_valid(const char *str)
RZ_API st64 rz_hex_bin_truncate(ut64 in, int n)
RZ_API char * rz_hex_from_code(const char *code)
static const char * skip_comment_py(const char *code)
RZ_API int rz_hex_pair2bin(const char *arg)
RZ_API int rz_hex_bin2str(const ut8 *in, int len, char *out)
RZ_API char * rz_hex_from_c(const char *code)
const char * skip_comment_c(const char *code)
RZ_API int rz_hex_str2binmask(const char *in, ut8 *out, ut8 *mask)
RZ_API char * rz_hex_from_py(const char *code)
RZ_API char * rz_hex_from_c_str(char *out, const char **code)
RZ_API char * rz_hex_bin2strdup(const ut8 *in, int len)
RZ_API void rz_hex_ut2st_str(const ut32 in, RZ_INOUT char *out, const int len)
Takes an unsigned 32bit integer with MSB set to 1 and returns the signed integer in hex format as str...
RZ_API char * rz_hex_from_py_str(char *out, const char *code)
RZ_API void Ht_() free(HtName_(Ht) *ht)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
void * malloc(size_t size)
void * calloc(size_t number, size_t size)
RZ_API int rz_base64_decode(ut8 *bout, const char *bin, int len)
#define RZ_LOG_FATAL(fmtstr,...)
RZ_API ut64 rz_num_math(RzNum *num, const char *str)
RZ_API char * rz_str_ndup(RZ_NULLABLE const char *ptr, int len)
Create new copy of string ptr limited to size len.
ut64(WINAPI *w32_GetEnabledXStateFeatures)()