Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove agft tiny graph edges on by default #10167

Merged
merged 2 commits into from May 24, 2018

Conversation

cyanpencil
Copy link
Contributor

This should close #9962

Now agft, and other commands which print tiny graphs to stdout (not interactive) won't print tiny graph edges.

Also refactored some code to use r_core_cmdf which is a lot more cleaner than constructing strings and then passing them to r_core_cmd0

@XVilka
Copy link
Contributor

XVilka commented May 23, 2018

Failed test:

Diff: --- /tmp/r2-regressions//cmd_project-R1BFVr/exp	2018-05-23 09:05:30.610455644 +0000
+++ /tmp/r2-regressions//cmd_project-R1BFVr/out	2018-05-23 09:05:30.642456235 +0000
@@ -1,3 +1,3 @@
-37
-3
-5
+0
+2
+1
[  ]  19  cmd_types: tp                            
[XX]

@cyanpencil
Copy link
Contributor Author

Ok green now, it was a problem with rebasing

@cyanpencil cyanpencil changed the title Remove agft tiny graph edges Remove agft tiny graph edges on by default May 23, 2018
}
free (cmd);
ut64 addr = input[2] ? r_num_math (core->num, input + 2) : core->offset;
r_core_cmdf (core, "ag-; .agx* %lld; agg%c;", addr, input[1]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use PFMT64d

r_core_cmd0 (core, cmd);
}
ut64 addr = input[2] ? r_num_math (core->num, input + 2) : core->offset;
r_core_cmdf (core, "ag-; .agc* %lld; agg%c;", addr, input[1]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use PFMT64d

}
free (cmd);
ut64 addr = input[2] ? r_num_math (core->num, input + 2): core->offset;
r_core_cmdf (core, "ag-; .aga* %lld; agg%c;", addr, input[1]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use PFMT64d

@@ -5722,7 +5722,10 @@ static void cmd_agraph_print(RCore *core, const char *input) {
break;
case 't':// "aggt" - tiny graph
core->graph->is_tiny = true;
int e = r_config_get_i (core->config, "graph.edges");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add {} braces

@XVilka
Copy link
Contributor

XVilka commented May 24, 2018

@cyanpencil can you please address those comments and rebase?

Refactor for cleaner command handling in cmd_anal.c

Fix aggt graph edges
Substitute again %lld with %PFMT64d
@cyanpencil
Copy link
Contributor Author

Done, also changed %lld with PFMT64d from other parts of ag* code

@radare radare merged commit 02d7502 into radareorg:master May 24, 2018
@cyanpencil cyanpencil deleted the agft-fix-edges branch May 24, 2018 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

agft is broken
3 participants