Skip to content

Commit

Permalink
Merge SVN 5057, 5058, 5059, 5062, 5063
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeclerck committed Nov 20, 2024
1 parent 4c79976 commit 095b747
Show file tree
Hide file tree
Showing 6 changed files with 339 additions and 32 deletions.
5 changes: 5 additions & 0 deletions cobc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
* typeck.c (cb_emit_sort_init): generate call to cob_file_sort_options
* help.c (cobc_print_usage_dialect): extended -fregister help

2023-05-28 Simon Sobisch <[email protected]>

* parser.y: allow expressions for screen related clauses
COL, LINE, LINES, SIZE, COLOR

2023-05-26 Simon Sobisch <[email protected]>

* parser.y, reserved.c: added RIGHTLINE - GC extension matching LEFLINE
Expand Down
15 changes: 6 additions & 9 deletions cobc/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -11928,7 +11928,7 @@ at_line_column:
&check_line_col_duplicate);

if ((CB_LITERAL_P ($2) && cb_get_int ($2) == 0) || $2 == cb_zero) {
cb_verify (cb_accept_display_extensions, "COLUMN 0");
cb_verify_x ($2, cb_accept_display_extensions, "COLUMN 0");
}

if (!line_column) {
Expand All @@ -11950,17 +11950,15 @@ at_line_column:
;

line_number:
LINE _number num_id_or_lit
LINE _number exp
{
/* FIXME: arithmetic expression should be possible, too, only numeric literals! */
$$ = $3;
}
;

column_number:
column_or_col_or_position_or_pos _number num_id_or_lit
column_or_col_or_position_or_pos _number exp
{
/* FIXME: arithmetic expression should be possible, too, only numeric literals! */
$$ = $3;
}
;
Expand Down Expand Up @@ -12001,9 +11999,8 @@ accp_attr:
check_repeated ("BLINK", SYN_CLAUSE_8, &check_duplicate);
set_dispattr (COB_SCREEN_BLINK);
}
| COLOR _is num_id_or_lit
| COLOR _is exp
{
/* FIXME: arithmetic expression should be possible, too! */
check_repeated ("COLOR", SYN_CLAUSE_30, &check_duplicate);
set_attribs (0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $3, NULL);
}
Expand Down Expand Up @@ -13549,7 +13546,7 @@ display_window_clauses:
SCREEN is optional(=implied) for ERASE here */
display_window_clause:
pop_up_or_handle /* DISPLAY WINDOW actually only takes POP-UP */
| LINES num_id_or_lit
| LINES exp
{
/* TODO: store */
}
Expand Down Expand Up @@ -13715,7 +13712,7 @@ disp_attr:
check_repeated ("REVERSE-VIDEO", SYN_CLAUSE_14, &check_duplicate);
set_dispattr (COB_SCREEN_REVERSE);
}
| SIZE _is num_id_or_lit
| SIZE _is exp
{
check_repeated ("SIZE", SYN_CLAUSE_15, &check_duplicate);
set_attribs (0, NULL, NULL, NULL, NULL, NULL, $3, NULL, NULL, NULL);
Expand Down
5 changes: 5 additions & 0 deletions libcob/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@

* common.h: added COB_SCREEN_RIGHTLINE, GC extension matching LEFTLINE
* screenio.c (cob_screen_attr): place curses extensions within #ifdef
* screenio.c (cob_screen_attr): return attr which may be adjusted by
parsing COLOR / CONTROL attributes
* screenio.c (cob_addnstr_graph): variant of cob_addnstr for CONTROL
GRAPHICS that outputs each character / WACS symbols separately
* screenio.c (cob_screen_puts, field_display): handle COB_SCREEN_GRAPHICS

2023-05-25 Chuck Haatvedt <[email protected]>

Expand Down
Loading

0 comments on commit 095b747

Please sign in to comment.