Commit 01021486ca506286999193ed995ca4a268ea182f
1 parent
046426df
Exists in
master
and in
1 other branch
Updating trace api.
Showing
5 changed files
with
19 additions
and
13 deletions
Show diff stats
.gitignore
src/dialogs/print/convenience.c
@@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
44 | if(!(widget && GTK_IS_V3270(widget))) | 44 | if(!(widget && GTK_IS_V3270(widget))) |
45 | return errno = EINVAL; | 45 | return errno = EINVAL; |
46 | 46 | ||
47 | - lib3270_trace_event(v3270_get_session(widget),"print action activated (type=%d)\n",(int) mode); | 47 | + lib3270_write_event_trace(v3270_get_session(widget),"print action activated (type=%d)\n",(int) mode); |
48 | 48 | ||
49 | if(!v3270_is_connected(widget)) | 49 | if(!v3270_is_connected(widget)) |
50 | return errno = ENOTCONN; | 50 | return errno = ENOTCONN; |
src/dialogs/print/print.c
@@ -69,27 +69,27 @@ | @@ -69,27 +69,27 @@ | ||
69 | { | 69 | { |
70 | case GTK_PRINT_OPERATION_RESULT_ERROR: | 70 | case GTK_PRINT_OPERATION_RESULT_ERROR: |
71 | debug("%s: Error on print operation",__FUNCTION__); | 71 | debug("%s: Error on print operation",__FUNCTION__); |
72 | - lib3270_trace_event(operation->widget->host,"%s\n",_("Error on print operation")); | 72 | + lib3270_write_event_trace(operation->widget->host,"%s\n",_("Error on print operation")); |
73 | break; | 73 | break; |
74 | 74 | ||
75 | case GTK_PRINT_OPERATION_RESULT_APPLY: | 75 | case GTK_PRINT_OPERATION_RESULT_APPLY: |
76 | debug("%s: The print settings should be stored.",__FUNCTION__); | 76 | debug("%s: The print settings should be stored.",__FUNCTION__); |
77 | - lib3270_trace_event(operation->widget->host,"%s\n",_("The print settings should be stored.")); | 77 | + lib3270_write_event_trace(operation->widget->host,"%s\n",_("The print settings should be stored.")); |
78 | break; | 78 | break; |
79 | 79 | ||
80 | case GTK_PRINT_OPERATION_RESULT_CANCEL: | 80 | case GTK_PRINT_OPERATION_RESULT_CANCEL: |
81 | debug("%s: The print operation has been canceled, the print settings should not be stored.", __FUNCTION__); | 81 | debug("%s: The print operation has been canceled, the print settings should not be stored.", __FUNCTION__); |
82 | - lib3270_trace_event(operation->widget->host,"%s\n",_("The print operation has been canceled, the print settings should not be stored.")); | 82 | + lib3270_write_event_trace(operation->widget->host,"%s\n",_("The print operation has been canceled, the print settings should not be stored.")); |
83 | break; | 83 | break; |
84 | 84 | ||
85 | case GTK_PRINT_OPERATION_RESULT_IN_PROGRESS: | 85 | case GTK_PRINT_OPERATION_RESULT_IN_PROGRESS: |
86 | debug("%s: The print operation is running",__FUNCTION__); | 86 | debug("%s: The print operation is running",__FUNCTION__); |
87 | - lib3270_trace_event(operation->widget->host,"%s\n",_("The print operation is running")); | 87 | + lib3270_write_event_trace(operation->widget->host,"%s\n",_("The print operation is running")); |
88 | break; | 88 | break; |
89 | 89 | ||
90 | default: | 90 | default: |
91 | debug("Unexpected status %d in print operation",(int) result); | 91 | debug("Unexpected status %d in print operation",(int) result); |
92 | - lib3270_trace_event(operation->widget->host,_("Unexpected status %d in print operation"),(int) result); | 92 | + lib3270_write_event_trace(operation->widget->host,_("Unexpected status %d in print operation"),(int) result); |
93 | 93 | ||
94 | } | 94 | } |
95 | 95 |
src/terminal/drawing/draw.c
@@ -40,6 +40,7 @@ | @@ -40,6 +40,7 @@ | ||
40 | #include <lib3270/session.h> | 40 | #include <lib3270/session.h> |
41 | #include <lib3270/toggle.h> | 41 | #include <lib3270/toggle.h> |
42 | #include <internals.h> | 42 | #include <internals.h> |
43 | + #include <lib3270/trace.h> | ||
43 | 44 | ||
44 | #include <v3270.h> | 45 | #include <v3270.h> |
45 | #include <terminal.h> | 46 | #include <terminal.h> |
@@ -256,6 +257,7 @@ static void draw_small_text(cairo_t *cr, const GdkRectangle *rect, v3270FontInfo | @@ -256,6 +257,7 @@ static void draw_small_text(cairo_t *cr, const GdkRectangle *rect, v3270FontInfo | ||
256 | 257 | ||
257 | static gboolean draw_cg(cairo_t *cr, unsigned char chr, v3270FontInfo *font, GdkRectangle *rect) | 258 | static gboolean draw_cg(cairo_t *cr, unsigned char chr, v3270FontInfo *font, GdkRectangle *rect) |
258 | { | 259 | { |
260 | + // https://unicode.org/charts/PDF/U2300.pdf | ||
259 | static const struct CharList | 261 | static const struct CharList |
260 | { | 262 | { |
261 | unsigned char chr; | 263 | unsigned char chr; |
@@ -350,25 +352,25 @@ void v3270_draw_char(cairo_t *cr, unsigned char chr, unsigned short attr, H3270 | @@ -350,25 +352,25 @@ void v3270_draw_char(cairo_t *cr, unsigned char chr, unsigned short attr, H3270 | ||
350 | cairo_rel_line_to(cr,0,rect->height); | 352 | cairo_rel_line_to(cr,0,rect->height); |
351 | break; | 353 | break; |
352 | 354 | ||
353 | - case 0xd4: // CG 0xac, LR corner | 355 | + case 0xd4: // CG 0xac, LR corner ⌟ |
354 | cairo_move_to(cr,rect->x, rect->y+(rect->height/2)); | 356 | cairo_move_to(cr,rect->x, rect->y+(rect->height/2)); |
355 | cairo_rel_line_to(cr,rect->width/2,0); | 357 | cairo_rel_line_to(cr,rect->width/2,0); |
356 | cairo_rel_line_to(cr,0,-(rect->height/2)); | 358 | cairo_rel_line_to(cr,0,-(rect->height/2)); |
357 | break; | 359 | break; |
358 | 360 | ||
359 | - case 0xd5: // CG 0xad, UR corner | 361 | + case 0xd5: // CG 0xad, UR corner ⌝ |
360 | cairo_move_to(cr,rect->x, rect->y+(rect->height/2)); | 362 | cairo_move_to(cr,rect->x, rect->y+(rect->height/2)); |
361 | cairo_rel_line_to(cr,rect->width/2,0); | 363 | cairo_rel_line_to(cr,rect->width/2,0); |
362 | cairo_rel_line_to(cr,0,rect->height/2); | 364 | cairo_rel_line_to(cr,0,rect->height/2); |
363 | break; | 365 | break; |
364 | 366 | ||
365 | - case 0xc5: // CG 0xa4, UL corner | 367 | + case 0xc5: // CG 0xa4, UL corner ⌜ |
366 | cairo_move_to(cr,rect->x+rect->width,rect->y+(rect->height/2)); | 368 | cairo_move_to(cr,rect->x+rect->width,rect->y+(rect->height/2)); |
367 | cairo_rel_line_to(cr,-(rect->width/2),0); | 369 | cairo_rel_line_to(cr,-(rect->width/2),0); |
368 | cairo_rel_line_to(cr,0,(rect->height/2)); | 370 | cairo_rel_line_to(cr,0,(rect->height/2)); |
369 | break; | 371 | break; |
370 | 372 | ||
371 | - case 0xc4: // CG 0xa3, LL corner | 373 | + case 0xc4: // CG 0xa3, LL corner ⌞ |
372 | cairo_move_to(cr,rect->x+rect->width,rect->y+(rect->height/2)); | 374 | cairo_move_to(cr,rect->x+rect->width,rect->y+(rect->height/2)); |
373 | cairo_rel_line_to(cr,-(rect->width/2),0); | 375 | cairo_rel_line_to(cr,-(rect->width/2),0); |
374 | cairo_rel_line_to(cr,0,-(rect->height/2)); | 376 | cairo_rel_line_to(cr,0,-(rect->height/2)); |
@@ -405,7 +407,10 @@ void v3270_draw_char(cairo_t *cr, unsigned char chr, unsigned short attr, H3270 | @@ -405,7 +407,10 @@ void v3270_draw_char(cairo_t *cr, unsigned char chr, unsigned short attr, H3270 | ||
405 | default: | 407 | default: |
406 | 408 | ||
407 | if(!draw_cg(cr, chr, font, rect)) | 409 | if(!draw_cg(cr, chr, font, rect)) |
410 | + { | ||
411 | + lib3270_write_screen_trace(session,"I don't known how to draw CG character %02x\n",(int) chr); | ||
408 | cairo_rectangle(cr, rect->x+1, rect->y+1, rect->width-2, rect->height-2); | 412 | cairo_rectangle(cr, rect->x+1, rect->y+1, rect->width-2, rect->height-2); |
413 | + } | ||
409 | 414 | ||
410 | } | 415 | } |
411 | } | 416 | } |
src/terminal/scroll.c
@@ -45,15 +45,15 @@ gboolean v3270_scroll_event(GtkWidget *widget, GdkEventScroll *event) | @@ -45,15 +45,15 @@ gboolean v3270_scroll_event(GtkWidget *widget, GdkEventScroll *event) | ||
45 | { | 45 | { |
46 | v3270 * terminal = GTK_V3270(widget); | 46 | v3270 * terminal = GTK_V3270(widget); |
47 | 47 | ||
48 | - lib3270_trace_event(terminal->host,"scroll event direction=%d",(int) event->direction); | 48 | + lib3270_write_event_trace(terminal->host,"scroll event direction=%d",(int) event->direction); |
49 | 49 | ||
50 | if(lib3270_get_program_message(terminal->host) != LIB3270_MESSAGE_NONE || event->direction < 0 || event->direction > G_N_ELEMENTS(terminal->scroll)) | 50 | if(lib3270_get_program_message(terminal->host) != LIB3270_MESSAGE_NONE || event->direction < 0 || event->direction > G_N_ELEMENTS(terminal->scroll)) |
51 | { | 51 | { |
52 | - lib3270_trace_event(terminal->host," dropped (not available)\n"); | 52 | + lib3270_write_event_trace(terminal->host," dropped (not available)\n"); |
53 | return FALSE; | 53 | return FALSE; |
54 | } | 54 | } |
55 | 55 | ||
56 | - lib3270_trace_event(terminal->host,"\n"); | 56 | + lib3270_write_event_trace(terminal->host,"\n"); |
57 | 57 | ||
58 | debug("%d %p", (int) event->direction, terminal->scroll[event->direction]); | 58 | debug("%d %p", (int) event->direction, terminal->scroll[event->direction]); |
59 | 59 |