Commit graph

9 commits

Author SHA1 Message Date
Giovanni
c89b12a046
Removed plenty of eprintfs in rz_core (#2950) 2022-08-29 00:32:17 +08:00
Rot127
c009f8d7a3
Tokenize and colorize asm strings (#2417)
This introduces the ability to split asm strings into tokens and assign a type to them.

This means:
* Each asm strings is assigned a list of tokens. Each token points to a sub-string.
* A token has a type attached which describes it (e.g. register token, operator token, mnemonic token etc.)
* A generic parsing method is introduced which splits an asm string into tokens. The pattern it parses is `<mnem> <op> <op> ...`.
* Instead of the generic method, plugins can create the token strings on their own.
* An API method was introduced to help plugins implement their own parsing methods via regex patterns.
* Custom token strings are stored in `RzAsmOp.asm_toks`

Additionally the coloring of asm strings is now exclusively done via the token strings.
* For this a function was added to colorize tokenized asm strings according to their token types.
2022-07-27 08:52:01 -04:00
Anton Kochkov
30a62fb4e3
Fix the build 2022-04-03 01:50:22 +08:00
Aswin C
4ec188d219
Refactor APIs related to themes and remove global variables from cmd_eval (#1879)
* Refactor `rz_core_theme_nextpal()`

* Add tests for `ecp`, `ecn` and `ecoj`

* Add braces to avoid declaration after the label

* Use `RzCmdStateOutput` in `eco`

* Fix the output of the test for `ecoj`

* Introduce `RzConsPalSeekMode` and refactor `nextpal_item`

* Rename the APIs related to themes

* Rename `rz_core_get_theme` to `rz_core_theme_get`
* Rename `rz_core_load_theme` to `rz_core_theme_load`
* Rename `rz_core_list_themes` to `rz_core_theme_list`

* Add `curtheme` to `RzCore`

* Eliminate all global variables in cmd_eval.c

* Put the loop outside the `switch` in
  `rz_cmd_eval_color_load_theme_handler`
* Remove `getNext` variable and use the `RzListIter`'s `p` variable

* Sort the list of loadable themes

* Use a normal `strcmp` as the comparator function while sorting themes
2021-10-29 20:25:00 +08:00
Aswin C
54b6e53feb
Convert ec to the rzshell (#1809)
* Convert `ec` to the rzshell
* Port the `echo` command
* Make the `color` argument optional for `ecHw`
* Remove `rz_core_echo`
* Make `echo` a part of `e` commands
* Add tests for `eco` and `ecHw`
* Move the definition of `bool2status` to `cmd_eval.c`
* Fix `ecHj` and add a test for it
2021-10-22 13:33:35 +08:00
Giovanni
f3e5b38794
Add hexview on rz-diff (#1148) 2021-05-22 02:13:20 +08:00
Giovanni
1348c247df
Add graph diffing and better function diffing (#1131)
* Added function diffing and graph diffing (json and dot only)
* Added tests for new functions and graph diffing
* diff graph more clear
* enforce same colors everywhere.
* using realsize for calculating function size
* renaming unconditional jump color name
* fixed memory issues and weird behaviour
2021-05-18 14:49:53 +02:00
seanachao
a2f8631b6c
Change -, --, = argument and = command meaning (#930)
* Swap = & - R (#615)&(#616)
* Fix R replace =
2021-04-21 16:20:24 +08:00
pancake
346eb5bd38
Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
Renamed from test/new/db/cmd/cmd_ec (Browse further)