mirror of
https://github.com/rizinorg/jsdec.git
synced 2026-11-07 14:58:12 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f17096fea | ||
|
|
9fc60988dd | ||
|
|
0c9cf8b3f1 | ||
|
|
5131ff5e71 | ||
|
|
65821969c1 | ||
|
|
ac88882529 | ||
|
|
055f537948 | ||
|
|
0d559b8bb6 | ||
|
|
b63ab4b190 | ||
|
|
394628eaad | ||
|
|
02f34ad351 | ||
|
|
9a567c14a6 | ||
|
|
c35c9a20f9 | ||
|
|
7676831b3b | ||
|
|
f53ad7a2a1 |
No files matched your search
@@ -6,7 +6,7 @@ CI_JSDEC="$PWD"
|
||||
CI_RZ_VERSION=$2
|
||||
|
||||
if [ "$CI_BRANCH" != "dev" ]; then
|
||||
# master branch always build against latest release of rizin
|
||||
# stable branch always build against latest release of rizin
|
||||
CI_RZ_VERSION=$(curl -s GET https://api.github.com/repos/rizinorg/rizin/tags\?per_page\=1 | jq -r '.[].name')
|
||||
else
|
||||
CI_RZ_VERSION="$CI_BRANCH"
|
||||
@@ -25,7 +25,7 @@ if [ "$CI_BRANCH" == "dev" ]; then
|
||||
wget -O "rizin.tar.gz" "https://github.com/rizinorg/rizin/archive/refs/heads/dev.tar.gz"
|
||||
tar xf "rizin.tar.gz"
|
||||
else
|
||||
# master branch always build against latest release of rizin
|
||||
# stable branch always build against latest release of rizin
|
||||
wget -O "rizin.tar.xz" "https://github.com/rizinorg/rizin/releases/download/$CI_RZ_VERSION/rizin-src-$CI_RZ_VERSION.tar.xz"
|
||||
tar xf "rizin.tar.xz"
|
||||
fi
|
||||
|
||||
@@ -5,10 +5,10 @@ import os
|
||||
|
||||
out_file = "rizin.zip"
|
||||
|
||||
latest = "master" if len(sys.argv) < 1 else sys.argv[1]
|
||||
latest = "stable" if len(sys.argv) < 1 else sys.argv[1]
|
||||
|
||||
if latest != "dev":
|
||||
# master branch always build against latest release of rizin
|
||||
# stable branch always build against latest release of rizin
|
||||
tags = None
|
||||
with urllib.request.urlopen('https://api.github.com/repos/rizinorg/rizin/tags?per_page=1') as f:
|
||||
tags = json.load(f)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
version: 2
|
||||
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
@@ -3,7 +3,7 @@ name: build-plugin
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- stable
|
||||
- dev
|
||||
pull_request:
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout commit
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v7
|
||||
- name: Install dependencies
|
||||
run: sudo apt -y install meson ninja-build
|
||||
- name: Build & run jsdec as rizin plugin
|
||||
@@ -31,10 +31,10 @@ jobs:
|
||||
matrix:
|
||||
os:
|
||||
- "windows-latest"
|
||||
- "windows-2019"
|
||||
- "windows-2022"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-python@v7
|
||||
with:
|
||||
python-version: 3.9.x
|
||||
- name: Preparing msvc toolchain
|
||||
|
||||
@@ -2,9 +2,9 @@ name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
branches: ["stable", "dev"]
|
||||
pull_request:
|
||||
branches: ["master"]
|
||||
branches: ["stable", "dev"]
|
||||
schedule:
|
||||
- cron: "1 14 * * 5"
|
||||
|
||||
@@ -24,18 +24,18 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
uses: github/codeql-action/init@v4
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
queries: +security-and-quality
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
uses: github/codeql-action/autobuild@v4
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
uses: github/codeql-action/analyze@v4
|
||||
with:
|
||||
category: "/language:${{ matrix.language }}"
|
||||
@@ -2,7 +2,7 @@ name: continuous-tests
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- stable
|
||||
- dev
|
||||
pull_request:
|
||||
|
||||
@@ -11,8 +11,8 @@ jobs:
|
||||
name: eslint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "21"
|
||||
- name: eslint
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
name: tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v7
|
||||
- name: tests
|
||||
run: chmod +x .ci-scripts/ci-tests.sh && .ci-scripts/ci-tests.sh "${{ github.ref_name }}"
|
||||
|
||||
@@ -30,8 +30,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v7
|
||||
- name: Reuse Compliance Check
|
||||
uses: fsfe/reuse-action@v2
|
||||
uses: fsfe/reuse-action@v6
|
||||
with:
|
||||
args: --suppress-deprecation lint
|
||||
@@ -1,6 +1,6 @@
|
||||
[](https://opensource.org/licenses/BSD-3-Clause)
|
||||
|
||||

|
||||

|
||||
|
||||
Converts asm to pseudo-C code.
|
||||
|
||||
@@ -87,5 +87,5 @@ e scr.color | enables syntax colors.
|
||||
|
||||
# Developing on jsdec
|
||||
|
||||
[Read DEVELOPERS.md](https://github.com/rizinorg/jsdec/blob/master/DEVELOPERS.md)
|
||||
[Read DEVELOPERS.md](https://github.com/rizinorg/jsdec/blob/dev/DEVELOPERS.md)
|
||||
|
||||
+19
-18
@@ -22,8 +22,8 @@ typedef struct exec_context_t {
|
||||
JSValue shared;
|
||||
} ExecContext;
|
||||
|
||||
static JSValue js_analysis_bytes(JSContext *ctx, RzCore *core, RzAnalysisBytes *ab) {
|
||||
RzAnalysisOp *aop = ab->op;
|
||||
static JSValue js_analysis_bytes(JSContext *ctx, RzCore *core, RzCoreDecodedBytes *cdb) {
|
||||
RzAnalysisOp *aop = &cdb->an_op;
|
||||
JSValue op = JS_NewObject(ctx);
|
||||
JS_SetPropertyStr(ctx, op, "offset", JS_NewBigUint64(ctx, aop->addr));
|
||||
if (aop->ptr != UT64_MAX) {
|
||||
@@ -32,8 +32,8 @@ static JSValue js_analysis_bytes(JSContext *ctx, RzCore *core, RzAnalysisBytes *
|
||||
if (aop->val != UT64_MAX) {
|
||||
JS_SetPropertyStr(ctx, op, "val", JS_NewBigUint64(ctx, aop->val));
|
||||
}
|
||||
JS_SetPropertyStr(ctx, op, "opcode", JS_NewString(ctx, rz_str_get_null(ab->opcode)));
|
||||
JS_SetPropertyStr(ctx, op, "disasm", JS_NewString(ctx, rz_str_get_null(ab->disasm)));
|
||||
JS_SetPropertyStr(ctx, op, "opcode", JS_NewString(ctx, rz_str_get_null(cdb->opcode)));
|
||||
JS_SetPropertyStr(ctx, op, "disasm", JS_NewString(ctx, rz_str_get_null(cdb->disasm)));
|
||||
JS_SetPropertyStr(ctx, op, "type", JS_NewString(ctx, rz_analysis_optype_to_string(aop->type)));
|
||||
if (aop->jump != UT64_MAX) {
|
||||
JS_SetPropertyStr(ctx, op, "jump", JS_NewBigInt64(ctx, aop->jump));
|
||||
@@ -49,23 +49,24 @@ static JSValue js_analysis_bytes(JSContext *ctx, RzCore *core, RzAnalysisBytes *
|
||||
}
|
||||
|
||||
static JSValue js_analysis_opcodes(JSContext *ctx, RzCore *core) {
|
||||
RzAnalysisBytes *ab;
|
||||
RzCoreDecodedBytes *cdb;
|
||||
JSValue ops = JS_NewArray(ctx);
|
||||
st64 op_idx = 0;
|
||||
|
||||
RzIterator *iter = rz_core_analysis_bytes(core, core->offset, core->block, core->blocksize, 0);
|
||||
if (!iter) {
|
||||
RzIterator iter = (RzIterator){ 0 };
|
||||
if (!rz_core_analysis_bytes(core, core->offset, core->block, core->blocksize, 0, &iter)) {
|
||||
return ops;
|
||||
}
|
||||
rz_iterator_foreach(iter, ab) {
|
||||
if (!ab || !ab->op || !strcmp(ab->opcode, "nop")) {
|
||||
|
||||
rz_iterator_foreach(&iter, cdb) {
|
||||
if (!cdb || !strcmp(cdb->opcode, "nop")) {
|
||||
continue;
|
||||
}
|
||||
JSValue op = js_analysis_bytes(ctx, core, ab);
|
||||
JSValue op = js_analysis_bytes(ctx, core, cdb);
|
||||
JS_SetPropertyInt64(ctx, ops, op_idx, op);
|
||||
op_idx++;
|
||||
}
|
||||
rz_iterator_free(iter);
|
||||
rz_iterator_fini(&iter);
|
||||
return ops;
|
||||
}
|
||||
|
||||
@@ -111,14 +112,14 @@ static JSValue js_command(JSContext *ctx, JSValueConst jsThis, int argc, JSValue
|
||||
|
||||
ExecContext *ectx = (ExecContext *)JS_GetContextOpaque(ctx);
|
||||
RzCore *core = ectx->core;
|
||||
rz_cons_sleep_end(ectx->bed);
|
||||
rz_interrupt_sleep_end(core->intr, ectx->bed);
|
||||
|
||||
char *output = rz_core_cmd_str(core, command);
|
||||
JS_FreeCString(ctx, command);
|
||||
JSValue result = JS_NewString(ctx, output ? output : "");
|
||||
free(output);
|
||||
|
||||
ectx->bed = rz_cons_sleep_begin();
|
||||
ectx->bed = rz_interrupt_sleep_begin(core->intr);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -128,11 +129,11 @@ static JSValue js_graph(JSContext *ctx, JSValueConst jsThis, int argc, JSValueCo
|
||||
}
|
||||
ExecContext *ectx = (ExecContext *)JS_GetContextOpaque(ctx);
|
||||
RzCore *core = ectx->core;
|
||||
rz_cons_sleep_end(ectx->bed);
|
||||
rz_interrupt_sleep_end(core->intr, ectx->bed);
|
||||
|
||||
RzAnalysisFunction *fcn = rz_analysis_get_fcn_in(core->analysis, core->offset, -1);
|
||||
if (!fcn) {
|
||||
ectx->bed = rz_cons_sleep_begin();
|
||||
ectx->bed = rz_interrupt_sleep_begin(core->intr);
|
||||
return JS_ThrowInternalError(ctx, "Cannot find function at 0x%08" PFMT64x, core->offset);
|
||||
}
|
||||
|
||||
@@ -142,7 +143,7 @@ static JSValue js_graph(JSContext *ctx, JSValueConst jsThis, int argc, JSValueCo
|
||||
JS_SetPropertyStr(ctx, object, "name", JS_NewString(ctx, rz_str_get_null(fcn->name)));
|
||||
JSValue blocks = js_function_bbs(ctx, core, fcn);
|
||||
JS_SetPropertyStr(ctx, object, "blocks", blocks);
|
||||
ectx->bed = rz_cons_sleep_begin();
|
||||
ectx->bed = rz_interrupt_sleep_begin(core->intr);
|
||||
return graph;
|
||||
}
|
||||
|
||||
@@ -356,9 +357,9 @@ RZ_API RzAnnotatedCode *jsdec_as_annotation(RzCore *core, ut64 addr) {
|
||||
rz_core_seek(core, addr, true);
|
||||
}
|
||||
|
||||
ectx.bed = rz_cons_sleep_begin();
|
||||
ectx.bed = rz_interrupt_sleep_begin(core->intr);
|
||||
bool ret = jsdec_run(dec);
|
||||
rz_cons_sleep_end(ectx.bed);
|
||||
rz_interrupt_sleep_end(core->intr, ectx.bed);
|
||||
|
||||
if (offset != addr) {
|
||||
rz_core_seek(core, offset, true);
|
||||
|
||||
+32
-24
@@ -11,6 +11,7 @@
|
||||
#include <rz_analysis.h>
|
||||
|
||||
#include "jsdec.h"
|
||||
#include "rz_util/rz_iterator.h"
|
||||
|
||||
typedef struct rz_core_t RzCore;
|
||||
|
||||
@@ -49,8 +50,8 @@ typedef struct exec_context_t {
|
||||
#define rz_cmd_desc_argv_new_warn(rcmd, root, cmd) \
|
||||
rz_warn_if_fail(rz_cmd_desc_argv_new(rcmd, root, #cmd, name_handler(cmd), &name_help(cmd)))
|
||||
|
||||
static JSValue js_analysis_bytes(JSContext *ctx, RzCore *core, RzAnalysisBytes *ab) {
|
||||
RzAnalysisOp *aop = ab->op;
|
||||
static JSValue js_analysis_bytes(JSContext *ctx, RzCore *core, RzCoreDecodedBytes *cdb) {
|
||||
RzAnalysisOp *aop = &cdb->an_op;
|
||||
JSValue op = JS_NewObject(ctx);
|
||||
JS_SetPropertyStr(ctx, op, "offset", JS_NewBigUint64(ctx, aop->addr));
|
||||
if (aop->ptr != UT64_MAX) {
|
||||
@@ -59,8 +60,8 @@ static JSValue js_analysis_bytes(JSContext *ctx, RzCore *core, RzAnalysisBytes *
|
||||
if (aop->val != UT64_MAX) {
|
||||
JS_SetPropertyStr(ctx, op, "val", JS_NewBigUint64(ctx, aop->val));
|
||||
}
|
||||
JS_SetPropertyStr(ctx, op, "opcode", JS_NewString(ctx, rz_str_get_null(ab->opcode)));
|
||||
JS_SetPropertyStr(ctx, op, "disasm", JS_NewString(ctx, rz_str_get_null(ab->disasm)));
|
||||
JS_SetPropertyStr(ctx, op, "opcode", JS_NewString(ctx, rz_str_get_null(cdb->opcode)));
|
||||
JS_SetPropertyStr(ctx, op, "disasm", JS_NewString(ctx, rz_str_get_null(cdb->disasm)));
|
||||
JS_SetPropertyStr(ctx, op, "type", JS_NewString(ctx, rz_analysis_optype_to_string(aop->type)));
|
||||
if (aop->jump != UT64_MAX) {
|
||||
JS_SetPropertyStr(ctx, op, "jump", JS_NewBigInt64(ctx, aop->jump));
|
||||
@@ -76,23 +77,23 @@ static JSValue js_analysis_bytes(JSContext *ctx, RzCore *core, RzAnalysisBytes *
|
||||
}
|
||||
|
||||
static JSValue js_analysis_opcodes(JSContext *ctx, RzCore *core) {
|
||||
RzAnalysisBytes *ab;
|
||||
RzCoreDecodedBytes *cdb;
|
||||
JSValue ops = JS_NewArray(ctx);
|
||||
st64 op_idx = 0;
|
||||
|
||||
RzIterator *iter = rz_core_analysis_bytes(core, core->offset, core->block, core->blocksize, 0);
|
||||
if (!iter) {
|
||||
RzIterator iter = (RzIterator){ 0 };
|
||||
if (!rz_core_analysis_bytes(core, core->offset, core->block, core->blocksize, 0, &iter)) {
|
||||
return ops;
|
||||
}
|
||||
rz_iterator_foreach (iter, ab) {
|
||||
if (!ab || !ab->op || !strcmp(ab->opcode, "nop")) {
|
||||
rz_iterator_foreach(&iter, cdb) {
|
||||
if (!cdb || !strcmp(cdb->opcode, "nop")) {
|
||||
continue;
|
||||
}
|
||||
JSValue op = js_analysis_bytes(ctx, core, ab);
|
||||
JSValue op = js_analysis_bytes(ctx, core, cdb);
|
||||
JS_SetPropertyInt64(ctx, ops, op_idx, op);
|
||||
op_idx++;
|
||||
}
|
||||
rz_iterator_free(iter);
|
||||
rz_iterator_fini(&iter);
|
||||
return ops;
|
||||
}
|
||||
|
||||
@@ -138,14 +139,14 @@ static JSValue js_command(JSContext *ctx, JSValueConst jsThis, int argc, JSValue
|
||||
|
||||
ExecContext *ectx = (ExecContext *)JS_GetContextOpaque(ctx);
|
||||
RzCore *core = ectx->core;
|
||||
rz_cons_sleep_end(ectx->bed);
|
||||
rz_interrupt_sleep_end(core->intr, ectx->bed);
|
||||
|
||||
char *output = rz_core_cmd_str(core, command);
|
||||
JS_FreeCString(ctx, command);
|
||||
JSValue result = JS_NewString(ctx, output ? output : "");
|
||||
free(output);
|
||||
|
||||
ectx->bed = rz_cons_sleep_begin();
|
||||
ectx->bed = rz_interrupt_sleep_begin(core->intr);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -155,11 +156,11 @@ static JSValue js_graph(JSContext *ctx, JSValueConst jsThis, int argc, JSValueCo
|
||||
}
|
||||
ExecContext *ectx = (ExecContext *)JS_GetContextOpaque(ctx);
|
||||
RzCore *core = ectx->core;
|
||||
rz_cons_sleep_end(ectx->bed);
|
||||
rz_interrupt_sleep_end(core->intr, ectx->bed);
|
||||
|
||||
RzAnalysisFunction *fcn = rz_analysis_get_fcn_in(core->analysis, core->offset, -1);
|
||||
if (!fcn) {
|
||||
ectx->bed = rz_cons_sleep_begin();
|
||||
ectx->bed = rz_interrupt_sleep_begin(core->intr);
|
||||
return JS_ThrowInternalError(ctx, "Cannot find function at 0x%08" PFMT64x, core->offset);
|
||||
}
|
||||
|
||||
@@ -169,24 +170,29 @@ static JSValue js_graph(JSContext *ctx, JSValueConst jsThis, int argc, JSValueCo
|
||||
JS_SetPropertyStr(ctx, object, "name", JS_NewString(ctx, rz_str_get_null(fcn->name)));
|
||||
JSValue blocks = js_function_bbs(ctx, core, fcn);
|
||||
JS_SetPropertyStr(ctx, object, "blocks", blocks);
|
||||
ectx->bed = rz_cons_sleep_begin();
|
||||
ectx->bed = rz_interrupt_sleep_begin(core->intr);
|
||||
return graph;
|
||||
}
|
||||
|
||||
static JSValue js_console_log(JSContext *ctx, JSValueConst jsThis, int argc, JSValueConst *argv) {
|
||||
ExecContext *ectx = (ExecContext *)JS_GetContextOpaque(ctx);
|
||||
if (!ectx || !ectx->core) {
|
||||
return JS_EXCEPTION;
|
||||
}
|
||||
RzCons *cons = ectx->core->cons;
|
||||
for (int i = 0; i < argc; ++i) {
|
||||
if (i != 0) {
|
||||
rz_cons_print(" ");
|
||||
rz_cons_print(cons, " ");
|
||||
}
|
||||
const char *str = JS_ToCString(ctx, argv[i]);
|
||||
if (!str) {
|
||||
return JS_EXCEPTION;
|
||||
}
|
||||
rz_cons_print(str);
|
||||
rz_cons_print(cons, str);
|
||||
JS_FreeCString(ctx, str);
|
||||
}
|
||||
rz_cons_newline();
|
||||
rz_cons_flush();
|
||||
rz_cons_newline(cons);
|
||||
rz_cons_flush(cons);
|
||||
return JS_UNDEFINED;
|
||||
}
|
||||
|
||||
@@ -245,9 +251,9 @@ static bool jsdec_main(RzCore *core, const char *arg) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ectx.bed = rz_cons_sleep_begin();
|
||||
ectx.bed = rz_interrupt_sleep_begin(core->intr);
|
||||
bool ret = jsdec_run(dec);
|
||||
rz_cons_sleep_end(ectx.bed);
|
||||
rz_interrupt_sleep_end(core->intr, ectx.bed);
|
||||
|
||||
jsdec_destroy(dec, &ectx);
|
||||
return ret;
|
||||
@@ -280,7 +286,8 @@ command_handler(pddi, "--issue");
|
||||
command_handler(pddj, "--as-json");
|
||||
command_handler(pddo, "--offsets");
|
||||
|
||||
static bool rz_cmd_pdd_init(RzCore *core) {
|
||||
static bool rz_cmd_pdd_init(RzCore *core, void **user) {
|
||||
(void)user;
|
||||
RzCmd *rcmd = core->rcmd;
|
||||
RzConfig *cfg = core->config;
|
||||
RzCmdDesc *root_cd = rz_cmd_get_desc(rcmd, "pd");
|
||||
@@ -319,7 +326,8 @@ static bool rz_cmd_pdd_init(RzCore *core) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool rz_cmd_pdd_fini(RzCore *core) {
|
||||
static bool rz_cmd_pdd_fini(RzCore *core, void *user) {
|
||||
(void)user;
|
||||
RzCmd *rcmd = core->rcmd;
|
||||
RzCmdDesc *cd = rz_cmd_get_desc(rcmd, "pdd");
|
||||
return rz_cmd_desc_remove(rcmd, cd);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
project(cutter-jsdec-plugin)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
set(CUTTER_INSTALL_PLUGDIR "share/rizin/cutter/plugins/native" CACHE STRING "Directory to install Cutter plugin into")
|
||||
set(JSDEC_BUILD_DIR "../build" CACHE STRING "Directory where to find libjsdec.a")
|
||||
|
||||
|
||||
@@ -9,11 +9,15 @@ import ColorsInvalid from './colors/invalid.js';
|
||||
|
||||
function initializeColors() {
|
||||
const config = {};
|
||||
const colors = rizin ? rizin.command("ec*") : '';
|
||||
colors.split('\n').forEach(function(line) {
|
||||
const tok = line.split(' ');
|
||||
config[tok[1]] = tok[2];
|
||||
});
|
||||
if (rizin) {
|
||||
const raw = rizin.command("ecj");
|
||||
const colors = JSON.parse(raw || "{}");
|
||||
if (colors && typeof colors === 'object' && !Array.isArray(colors)) {
|
||||
Object.keys(colors).forEach(function(key) {
|
||||
config[key] = colors[key];
|
||||
});
|
||||
}
|
||||
}
|
||||
return {
|
||||
"callname": config['call'] || 'gray',
|
||||
"integers": config['num'] || 'cyan',
|
||||
|
||||
+1
-5
@@ -447,7 +447,7 @@ void help(void)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int c, i, verbose;
|
||||
int c, i;
|
||||
const char *out_filename, *cname, *script_name;
|
||||
char cfilename[1024];
|
||||
FILE *fo;
|
||||
@@ -462,7 +462,6 @@ int main(int argc, char **argv)
|
||||
output_type = OUTPUT_C;
|
||||
cname = NULL;
|
||||
module = -1;
|
||||
verbose = 0;
|
||||
strip = 0;
|
||||
stack_size = 0;
|
||||
memset(&dynamic_module_list, 0, sizeof(dynamic_module_list));
|
||||
@@ -519,9 +518,6 @@ int main(int argc, char **argv)
|
||||
case 's':
|
||||
strip++;
|
||||
break;
|
||||
case 'v':
|
||||
verbose++;
|
||||
break;
|
||||
case 'p':
|
||||
c_ident_prefix = optarg;
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user