Commit c271ed4641e6654ebfb30901c4fedd9a761ef159
1 parent
649c54ea
Exists in
master
and in
1 other branch
Adding "print" commands in the trace windows.
Showing
1 changed file
with
38 additions
and
0 deletions
Show diff stats
src/trace/exec.c
| ... | ... | @@ -200,6 +200,44 @@ |
| 200 | 200 | { |
| 201 | 201 | v3270_copy_selection(widget, V3270_SELECT_TABLE, FALSE); |
| 202 | 202 | } |
| 203 | + else if(!g_ascii_strcasecmp(arg,"append")) | |
| 204 | + { | |
| 205 | + v3270_append_selection(widget,FALSE); | |
| 206 | + } | |
| 207 | + else | |
| 208 | + { | |
| 209 | + return errno = EINVAL; | |
| 210 | + } | |
| 211 | + | |
| 212 | + return 0; | |
| 213 | + | |
| 214 | + } | |
| 215 | + | |
| 216 | + if(g_str_has_prefix(cmdline,"print")) | |
| 217 | + { | |
| 218 | + | |
| 219 | + gchar * arg = cmdline+5; | |
| 220 | + g_strstrip(arg); | |
| 221 | + | |
| 222 | + if(!(*arg && g_ascii_strcasecmp(arg,"all"))) | |
| 223 | + { | |
| 224 | + // No argument or "text" copy text. | |
| 225 | + v3270_print_all(widget,NULL); | |
| 226 | + } | |
| 227 | + else if(!g_ascii_strcasecmp(arg,"selected")) | |
| 228 | + { | |
| 229 | + v3270_print_selected(widget,NULL); | |
| 230 | + } | |
| 231 | + else if(!g_ascii_strcasecmp(arg,"copy")) | |
| 232 | + { | |
| 233 | + v3270_print_copy(widget,NULL); | |
| 234 | + } | |
| 235 | + else | |
| 236 | + { | |
| 237 | + return errno = EINVAL; | |
| 238 | + } | |
| 239 | + | |
| 240 | + return 0; | |
| 203 | 241 | |
| 204 | 242 | } |
| 205 | 243 | ... | ... |