Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–209 unchanged (209 lines)
210static Htop_Reaction actionSortByTime(State* st) {
211 return Action_setSortKey(st->settings, TIME);
212}
213
214static Htop_Reaction actionToggleKernelThreads(State* st) {
215 st->settings->hideKernelThreads = !st->settings->hideKernelThreads;
216 return HTOP_RECALCULATE | HTOP_SAVE_SETTINGS | HTOP_KEEP_FOLLOWING;
217}
218
219static Htop_Reaction actionToggleUserlandThreads(State* st) {
220 st->settings->hideUserlandThreads = !st->settings->hideUserlandThreads;
221 return HTOP_RECALCULATE | HTOP_SAVE_SETTINGS | HTOP_KEEP_FOLLOWING;
222}
223
224static Htop_Reaction actionToggleRunningInContainer(State* st) {
225 st->settings->hideRunningInContainer = !st->settings->hideRunningInContainer;
226 return HTOP_RECALCULATE | HTOP_SAVE_SETTINGS | HTOP_KEEP_FOLLOWING;
227}
228
229static Htop_Reaction actionToggleProgramPath(State* st) {
230 st->settings->showProgramPath = !st->settings->showProgramPath;
231 return HTOP_REFRESH | HTOP_SAVE_SETTINGS | HTOP_KEEP_FOLLOWING;
232}
233
234static Htop_Reaction actionToggleMergedCommand(State* st) {
235 st->settings->showMergedCommand = !st->settings->showMergedCommand;
236 return HTOP_REFRESH | HTOP_SAVE_SETTINGS | HTOP_KEEP_FOLLOWING | HTOP_UPDATE_PANELHDR;
237}
238
239static Htop_Reaction actionToggleTreeView(State* st) {
240 ScreenSettings* ss = st->settings->ss;
241 ss->treeView = !ss->treeView;
242
…lines 243–807 unchanged (565 lines)

After

…lines 1–209 unchanged (209 lines)
210static Htop_Reaction actionSortByTime(State* st) {
211 return Action_setSortKey(st->settings, TIME);
212}
213
214static Htop_Reaction actionToggleKernelThreads(State* st) {
215 st->settings->hideKernelThreads = !st->settings->hideKernelThreads;
216 st->settings->lastUpdate++;
217
218 return HTOP_RECALCULATE | HTOP_SAVE_SETTINGS | HTOP_KEEP_FOLLOWING;
219}
220
221static Htop_Reaction actionToggleUserlandThreads(State* st) {
222 st->settings->hideUserlandThreads = !st->settings->hideUserlandThreads;
223 st->settings->lastUpdate++;
224
225 return HTOP_RECALCULATE | HTOP_SAVE_SETTINGS | HTOP_KEEP_FOLLOWING;
226}
227
228static Htop_Reaction actionToggleRunningInContainer(State* st) {
229 st->settings->hideRunningInContainer = !st->settings->hideRunningInContainer;
230 st->settings->lastUpdate++;
231
232 return HTOP_RECALCULATE | HTOP_SAVE_SETTINGS | HTOP_KEEP_FOLLOWING;
233}
234
235static Htop_Reaction actionToggleProgramPath(State* st) {
236 st->settings->showProgramPath = !st->settings->showProgramPath;
237 st->settings->lastUpdate++;
238
239 return HTOP_REFRESH | HTOP_SAVE_SETTINGS | HTOP_KEEP_FOLLOWING;
240}
241
242static Htop_Reaction actionToggleMergedCommand(State* st) {
243 st->settings->showMergedCommand = !st->settings->showMergedCommand;
244 st->settings->lastUpdate++;
245
246 return HTOP_REFRESH | HTOP_SAVE_SETTINGS | HTOP_KEEP_FOLLOWING | HTOP_UPDATE_PANELHDR;
247}
248
249static Htop_Reaction actionToggleTreeView(State* st) {
250 ScreenSettings* ss = st->settings->ss;
…lines 251–817 unchanged (567 lines)

Before

translation_unit
comment "/*\nhtop - Action.c\n(C) 2015 Hisham H. Muhammad\nReleased unde"...
preproc_include
#include "#include"
string_literal
" "\""
string_content "config.h"
" "\""
comment "// IWYU pragma: keep"
preproc_include
#include "#include"
string_literal
" "\""
string_content "Action.h"
" "\""
preproc_include
#include "#include"
system_lib_string "<pwd.h>"
preproc_include
#include "#include"
system_lib_string "<stdbool.h>"
preproc_include
#include "#include"
system_lib_string "<stdlib.h>"
preproc_include
#include "#include"
string_literal
" "\""
string_content "CRT.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "CategoriesPanel.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "CommandScreen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "DynamicColumn.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "EnvScreen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "FunctionBar.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "Hashtable.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "IncSet.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "InfoScreen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ListItem.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "Macros.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "MainPanel.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "OpenFilesScreen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "Process.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ProcessLocksScreen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ProvideCurses.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ScreenManager.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "SignalsPanel.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "TraceScreen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "Vector.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "XUtils.h"
" "\""
preproc_if (+31 nodes collapsed)
function_definition (+412 nodes collapsed)
comment "// ----------------------------------------"
function_definition (+133 nodes collapsed)
function_definition (+77 nodes collapsed)
function_definition (+71 nodes collapsed)
function_definition (+83 nodes collapsed)
function_definition (+126 nodes collapsed)
function_definition (+68 nodes collapsed)
function_definition (+156 nodes collapsed)
function_definition (+45 nodes collapsed)
comment "// ----------------------------------------"
function_definition (+415 nodes collapsed)
function_definition (+31 nodes collapsed)
function_definition (+31 nodes collapsed)
function_definition (+31 nodes collapsed)
function_definition (+31 nodes collapsed)
function_definition
storage_class_specifier
static "static"
type_identifier "Htop_Reaction"
function_declarator
identifier "actionToggleKernelThreads"
parameter_list
( "("
parameter_declaration
type_identifier "State"
pointer_declarator
* "*"
identifier "st"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "hideKernelThreads"
= "="
unary_expression
! "!"
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "hideKernelThreads"
; ";"
return_statement
return "return"
binary_expression
binary_expression
identifier "HTOP_RECALCULATE"
| "|"
identifier "HTOP_SAVE_SETTINGS"
| "|"
identifier "HTOP_KEEP_FOLLOWING"
; ";"
} "}"
function_definition
storage_class_specifier
static "static"
type_identifier "Htop_Reaction"
function_declarator
identifier "actionToggleUserlandThreads"
parameter_list
( "("
parameter_declaration
type_identifier "State"
pointer_declarator
* "*"
identifier "st"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "hideUserlandThreads"
= "="
unary_expression
! "!"
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "hideUserlandThreads"
; ";"
return_statement
return "return"
binary_expression
binary_expression
identifier "HTOP_RECALCULATE"
| "|"
identifier "HTOP_SAVE_SETTINGS"
| "|"
identifier "HTOP_KEEP_FOLLOWING"
; ";"
} "}"
function_definition
storage_class_specifier
static "static"
type_identifier "Htop_Reaction"
function_declarator
identifier "actionToggleRunningInContainer"
parameter_list
( "("
parameter_declaration
type_identifier "State"
pointer_declarator
* "*"
identifier "st"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "hideRunningInContainer"
= "="
unary_expression
! "!"
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "hideRunningInContainer"
; ";"
return_statement
return "return"
binary_expression
binary_expression
identifier "HTOP_RECALCULATE"
| "|"
identifier "HTOP_SAVE_SETTINGS"
| "|"
identifier "HTOP_KEEP_FOLLOWING"
; ";"
} "}"
function_definition
storage_class_specifier
static "static"
type_identifier "Htop_Reaction"
function_declarator
identifier "actionToggleProgramPath"
parameter_list
( "("
parameter_declaration
type_identifier "State"
pointer_declarator
* "*"
identifier "st"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "showProgramPath"
= "="
unary_expression
! "!"
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "showProgramPath"
; ";"
return_statement
return "return"
binary_expression
binary_expression
identifier "HTOP_REFRESH"
| "|"
identifier "HTOP_SAVE_SETTINGS"
| "|"
identifier "HTOP_KEEP_FOLLOWING"
; ";"
} "}"
function_definition
storage_class_specifier
static "static"
type_identifier "Htop_Reaction"
function_declarator
identifier "actionToggleMergedCommand"
parameter_list
( "("
parameter_declaration
type_identifier "State"
pointer_declarator
* "*"
identifier "st"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "showMergedCommand"
= "="
unary_expression
! "!"
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "showMergedCommand"
; ";"
return_statement
return "return"
binary_expression
binary_expression
binary_expression
identifier "HTOP_REFRESH"
| "|"
identifier "HTOP_SAVE_SETTINGS"
| "|"
identifier "HTOP_KEEP_FOLLOWING"
| "|"
identifier "HTOP_UPDATE_PANELHDR"
; ";"
} "}"
function_definition (+84 nodes collapsed)
function_definition (+38 nodes collapsed)
function_definition (+104 nodes collapsed)
function_definition (+81 nodes collapsed)
function_definition (+68 nodes collapsed)
function_definition (+57 nodes collapsed)
function_definition (+57 nodes collapsed)
function_definition (+53 nodes collapsed)
function_definition (+69 nodes collapsed)
function_definition (+72 nodes collapsed)
function_definition (+45 nodes collapsed)
function_definition (+90 nodes collapsed)
function_definition (+98 nodes collapsed)
function_definition (+165 nodes collapsed)
function_definition (+23 nodes collapsed)
function_definition (+314 nodes collapsed)
function_definition (+238 nodes collapsed)
function_definition (+262 nodes collapsed)
function_definition (+59 nodes collapsed)
function_definition (+38 nodes collapsed)
function_definition (+141 nodes collapsed)
function_definition (+127 nodes collapsed)
function_definition (+162 nodes collapsed)
function_definition (+92 nodes collapsed)
function_definition (+33 nodes collapsed)
function_definition (+38 nodes collapsed)
declaration (+600 nodes collapsed)
declaration (+589 nodes collapsed)
function_definition (+41 nodes collapsed)
function_definition (+1606 nodes collapsed)
function_definition (+100 nodes collapsed)
function_definition (+84 nodes collapsed)
function_definition (+125 nodes collapsed)
function_definition (+125 nodes collapsed)
function_definition (+786 nodes collapsed)

After

translation_unit
comment "/*\nhtop - Action.c\n(C) 2015 Hisham H. Muhammad\nReleased unde"...
preproc_include
#include "#include"
string_literal
" "\""
string_content "config.h"
" "\""
comment "// IWYU pragma: keep"
preproc_include
#include "#include"
string_literal
" "\""
string_content "Action.h"
" "\""
preproc_include
#include "#include"
system_lib_string "<pwd.h>"
preproc_include
#include "#include"
system_lib_string "<stdbool.h>"
preproc_include
#include "#include"
system_lib_string "<stdlib.h>"
preproc_include
#include "#include"
string_literal
" "\""
string_content "CRT.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "CategoriesPanel.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "CommandScreen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "DynamicColumn.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "EnvScreen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "FunctionBar.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "Hashtable.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "IncSet.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "InfoScreen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ListItem.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "Macros.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "MainPanel.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "OpenFilesScreen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "Process.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ProcessLocksScreen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ProvideCurses.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ScreenManager.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "SignalsPanel.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "TraceScreen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "Vector.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "XUtils.h"
" "\""
preproc_if (+31 nodes collapsed)
function_definition (+412 nodes collapsed)
comment "// ----------------------------------------"
function_definition (+133 nodes collapsed)
function_definition (+77 nodes collapsed)
function_definition (+71 nodes collapsed)
function_definition (+83 nodes collapsed)
function_definition (+126 nodes collapsed)
function_definition (+68 nodes collapsed)
function_definition (+156 nodes collapsed)
function_definition (+45 nodes collapsed)
comment "// ----------------------------------------"
function_definition (+415 nodes collapsed)
function_definition (+31 nodes collapsed)
function_definition (+31 nodes collapsed)
function_definition (+31 nodes collapsed)
function_definition (+31 nodes collapsed)
function_definition
storage_class_specifier
static "static"
type_identifier "Htop_Reaction"
function_declarator
identifier "actionToggleKernelThreads"
parameter_list
( "("
parameter_declaration
type_identifier "State"
pointer_declarator
* "*"
identifier "st"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "hideKernelThreads"
= "="
unary_expression
! "!"
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "hideKernelThreads"
; ";"
expression_statement
update_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "lastUpdate"
++ "++"
; ";"
return_statement
return "return"
binary_expression
binary_expression
identifier "HTOP_RECALCULATE"
| "|"
identifier "HTOP_SAVE_SETTINGS"
| "|"
identifier "HTOP_KEEP_FOLLOWING"
; ";"
} "}"
function_definition
storage_class_specifier
static "static"
type_identifier "Htop_Reaction"
function_declarator
identifier "actionToggleUserlandThreads"
parameter_list
( "("
parameter_declaration
type_identifier "State"
pointer_declarator
* "*"
identifier "st"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "hideUserlandThreads"
= "="
unary_expression
! "!"
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "hideUserlandThreads"
; ";"
expression_statement
update_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "lastUpdate"
++ "++"
; ";"
return_statement
return "return"
binary_expression
binary_expression
identifier "HTOP_RECALCULATE"
| "|"
identifier "HTOP_SAVE_SETTINGS"
| "|"
identifier "HTOP_KEEP_FOLLOWING"
; ";"
} "}"
function_definition
storage_class_specifier
static "static"
type_identifier "Htop_Reaction"
function_declarator
identifier "actionToggleRunningInContainer"
parameter_list
( "("
parameter_declaration
type_identifier "State"
pointer_declarator
* "*"
identifier "st"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "hideRunningInContainer"
= "="
unary_expression
! "!"
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "hideRunningInContainer"
; ";"
expression_statement
update_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "lastUpdate"
++ "++"
; ";"
return_statement
return "return"
binary_expression
binary_expression
identifier "HTOP_RECALCULATE"
| "|"
identifier "HTOP_SAVE_SETTINGS"
| "|"
identifier "HTOP_KEEP_FOLLOWING"
; ";"
} "}"
function_definition
storage_class_specifier
static "static"
type_identifier "Htop_Reaction"
function_declarator
identifier "actionToggleProgramPath"
parameter_list
( "("
parameter_declaration
type_identifier "State"
pointer_declarator
* "*"
identifier "st"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "showProgramPath"
= "="
unary_expression
! "!"
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "showProgramPath"
; ";"
expression_statement
update_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "lastUpdate"
++ "++"
; ";"
return_statement
return "return"
binary_expression
binary_expression
identifier "HTOP_REFRESH"
| "|"
identifier "HTOP_SAVE_SETTINGS"
| "|"
identifier "HTOP_KEEP_FOLLOWING"
; ";"
} "}"
function_definition
storage_class_specifier
static "static"
type_identifier "Htop_Reaction"
function_declarator
identifier "actionToggleMergedCommand"
parameter_list
( "("
parameter_declaration
type_identifier "State"
pointer_declarator
* "*"
identifier "st"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "showMergedCommand"
= "="
unary_expression
! "!"
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "showMergedCommand"
; ";"
expression_statement
update_expression
field_expression
field_expression
identifier "st"
-> "->"
field_identifier "settings"
-> "->"
field_identifier "lastUpdate"
++ "++"
; ";"
return_statement
return "return"
binary_expression
binary_expression
binary_expression
identifier "HTOP_REFRESH"
| "|"
identifier "HTOP_SAVE_SETTINGS"
| "|"
identifier "HTOP_KEEP_FOLLOWING"
| "|"
identifier "HTOP_UPDATE_PANELHDR"
; ";"
} "}"
function_definition (+84 nodes collapsed)
function_definition (+38 nodes collapsed)
function_definition (+104 nodes collapsed)
function_definition (+81 nodes collapsed)
function_definition (+68 nodes collapsed)
function_definition (+57 nodes collapsed)
function_definition (+57 nodes collapsed)
function_definition (+53 nodes collapsed)
function_definition (+69 nodes collapsed)
function_definition (+72 nodes collapsed)
function_definition (+45 nodes collapsed)
function_definition (+90 nodes collapsed)
function_definition (+98 nodes collapsed)
function_definition (+165 nodes collapsed)
function_definition (+23 nodes collapsed)
function_definition (+314 nodes collapsed)
function_definition (+238 nodes collapsed)
function_definition (+262 nodes collapsed)
function_definition (+59 nodes collapsed)
function_definition (+38 nodes collapsed)
function_definition (+141 nodes collapsed)
function_definition (+127 nodes collapsed)
function_definition (+162 nodes collapsed)
function_definition (+92 nodes collapsed)
function_definition (+33 nodes collapsed)
function_definition (+38 nodes collapsed)
declaration (+600 nodes collapsed)
declaration (+589 nodes collapsed)
function_definition (+41 nodes collapsed)
function_definition (+1606 nodes collapsed)
function_definition (+100 nodes collapsed)
function_definition (+84 nodes collapsed)
function_definition (+125 nodes collapsed)
function_definition (+125 nodes collapsed)
function_definition (+786 nodes collapsed)