-
Notifications
You must be signed in to change notification settings - Fork 130
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
add new feature command history #171
Conversation
sync xdag develop
Develop sync
Develop sync
move to develop and optimization translate
update format
update dagger era 2018.1.5
Develop sync
Develop sync
Develop sync
2.convert configure.ac from dos to unix format 3.fix log.c utils.c automake bug 4.add json-rpc automake
Develop sync
fix automake bug (#158)
2. modify some code style 3.move some code from commands.h to commands.c
No need to create new PR. Just submit your code, the old one will be updated automatically. Please take care of your PR next time. Thank you. And now without the review history we have to review it again.... 😿 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please find comments.
|
||
#if !defined(_WIN32) && !defined(_WIN64) | ||
rl_readline_name = "xdag"; | ||
rl_attempted_completion_function = xdag_com_completion; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New memory malloced in xdag_com_completion, how is it handled? Freed by readline lib or manually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xdag_com_completion malloc memory will free in readline lib auto:
in readline lib version 6.3 , complete.c:
1160 if (rl_attempted_completion_function)
1161 {
1162 matches = (*rl_attempted_completion_function) (text, start, end);
1163 if (RL_SIG_RECEIVED())
1164 {
1165 _rl_free_match_list (matches);
1166 matches = 0;
1167 RL_CHECK_SIGNALS ();
1168 }
1169
1170 if (matches || rl_attempted_completion_over)
1171 {
1172 rl_attempted_completion_over = 0;
1173 return (matches);
1174 }
1175 }
_rl_free_match_list will free memory:
1897 void
1898 _rl_free_match_list (matches)
1899 char **matches;
1900 {
1901 register int i;
1902
1903 if (matches == 0)
1904 return;
1905
1906 for (i = 0; matches[i]; i++)
1907 xfree (matches[i]);
1908 xfree (matches);
1909 }
client/terminal.c
Outdated
if (!ptr) continue; | ||
if (!strcmp(ptr, "exit")) break; | ||
if (!strcmp(ptr, "xfer")) { | ||
uint32_t pwd[4]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still has spaces and tabs issue. Could you just use tabs instead of spaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
i will take care of my PR next time |
Thank you for your great efforts! |
1.add last command for #82
2.modify some code style
3.add define for windows