From: SourceForge.net <no...@so...> - 2008-02-09 15:32:59
|
Patches item #1830056, was opened at 2007-11-11 19:05 Message generated for change (Comment added) made by fabiankeil You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=311118&aid=1830056&group_id=11118 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 5 Private: No Submitted By: Lee (ler762) Assigned to: Fabian Keil (fabiankeil) Summary: separate active and inactive actions in show-url-info Initial Comment: In the final results section of show-url-info the active and inactive actions aren't listed separately. This patch lists them separately. --- actions.c.old 2007-11-11 12:42:54.875000000 -0500 +++ actions.c 2007-11-11 13:07:14.296875000 -0500 @@ -1800,51 +1800,53 @@ { unsigned long flags = action->flags; char * result = strdup(""); + char * active = strdup(""); + char * inactive = strdup(""); struct list_entry * lst; #define DEFINE_ACTION_BOOL(__name, __bit) \ if (flags & __bit) \ { \ - string_append(&result, "\n<br>+"); \ - string_join(&result, add_help_link(__name, csp->config)); \ + string_append(&active, "\n<br>+"); \ + string_join(&active, add_help_link(__name, csp->config)); \ } \ else \ { \ - string_append(&result, "\n<br>-"); \ - string_join(&result, add_help_link(__name, csp->config)); \ + string_append(&inactive, "\n<br>-"); \ + string_join(&inactive, add_help_link(__name, csp->config)); \ } #define DEFINE_ACTION_STRING(__name, __bit, __index) \ if (flags & __bit) \ { \ - string_append(&result, "\n<br>+"); \ - string_join(&result, add_help_link(__name, csp->config)); \ - string_append(&result, "{"); \ - string_join(&result, html_encode(action->string[__index])); \ - string_append(&result, "}"); \ + string_append(&active, "\n<br>+"); \ + string_join(&active, add_help_link(__name, csp->config)); \ + string_append(&active, "{"); \ + string_join(&active, html_encode(action->string[__index])); \ + string_append(&active, "}"); \ } \ else \ { \ - string_append(&result, "\n<br>-"); \ - string_join(&result, add_help_link(__name, csp->config)); \ + string_append(&inactive, "\n<br>-"); \ + string_join(&inactive, add_help_link(__name, csp->config)); \ } #define DEFINE_ACTION_MULTI(__name, __index) \ lst = action->multi[__index]->first; \ if (lst == NULL) \ { \ - string_append(&result, "\n<br>-"); \ - string_join(&result, add_help_link(__name, csp->config)); \ + string_append(&inactive, "\n<br>-"); \ + string_join(&inactive, add_help_link(__name, csp->config)); \ } \ else \ { \ while (lst) \ { \ - string_append(&result, "\n<br>+"); \ - string_join(&result, add_help_link(__name, csp->config)); \ - string_append(&result, "{"); \ - string_join(&result, html_encode(lst->str)); \ - string_append(&result, "}"); \ + string_append(&active, "\n<br>+"); \ + string_join(&active, add_help_link(__name, csp->config)); \ + string_append(&active, "{"); \ + string_join(&active, html_encode(lst->str)); \ + string_append(&active, "}"); \ lst = lst->next; \ } \ } @@ -1858,5 +1860,16 @@ #undef DEFINE_ACTION_BOOL #undef DEFINE_ACTION_ALIAS + if ( &inactive != NULL ) + { + string_append(&result, inactive); + freez(inactive); + } + string_append(&result, "\n<br>"); + if ( &active != NULL ) + { + string_append(&result, active); + freez(active); + } return result; } ---------------------------------------------------------------------- >Comment By: Fabian Keil (fabiankeil) Date: 2008-02-09 15:33 Message: Logged In: YES user_id=875547 Originator: NO Applied with minor modifications. ---------------------------------------------------------------------- Comment By: Fabian Keil (fabiankeil) Date: 2007-12-04 18:58 Message: Logged In: YES user_id=875547 Originator: NO Thanks. I'll look into this once the next stable release is out. ---------------------------------------------------------------------- Comment By: Lee (ler762) Date: 2007-12-03 19:50 Message: Logged In: YES user_id=1924122 Originator: YES Submit the patch as an attachment so the formatting isn't lost File Added: patch.txt ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=311118&aid=1830056&group_id=11118 |