HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 1120 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 1120.


Report 1120 Actions


    Problem Report Number 1120
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0322
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published null
    Product Standard Internationalised Terminal Interfaces
    Certification Program The Open Brand certification program
    Test Suite VSU version 5.0.2
    Test Identification xcurses/add_wch 1, 15
    Problem Summary PG4U.00151 This request contends the curses specification requires terminals to directly implement complex characters.
    Problem Text

    [This is a new presentation repeating the request refused as PG4U.00147.]

    The following test cases and numbers are failing because of a problem in
    SRC/LIB/capi_xcurses/out.c:

    /tset/CAPIxcurses/fadd_wch/fadd_wch1 1 15
    /tset/CAPIxcurses/fadd_wchns/fadd_wchns1 1 2 4 6 11
    /tset/CAPIxcurses/fadd_wchst/fadd_wchst1 1 2 5 10
    /tset/CAPIxcurses/faddnwstr/faddnwstr1 1 3 14
    /tset/CAPIxcurses/faddwstr/faddwstr1 13
    /tset/CAPIxcurses/fchgat/fchgat1 1 2 3
    /tset/CAPIxcurses/fecho_wcha/fecho_wcha1 1 15
    /tset/CAPIxcurses/fhline_set/fhline_set1 1
    /tset/CAPIxcurses/fins_nwstr/fins_nwstr1 1 2 4 5
    /tset/CAPIxcurses/fins_wstr/fins_wstr1 1 2 4
    /tset/CAPIxcurses/fmove/fmove1 2
    /tset/CAPIxcurses/fmvadd_wch/fmvadd_wch1 1 15
    /tset/CAPIxcurses/fmvadd_wcn/fmvadd_wcn1 1 2 4 6 11
    /tset/CAPIxcurses/fmvadd_wcs/fmvadd_wcs1 1 2 5 10
    /tset/CAPIxcurses/fmvaddnwst/fmvaddnwst1 1 3 14
    /tset/CAPIxcurses/fmvaddwstr/fmvaddwstr1 13
    /tset/CAPIxcurses/fmvchgat/fmvchgat1 1 2 3
    /tset/CAPIxcurses/fmvhline_s/fmvhline_s1 1 3 4
    /tset/CAPIxcurses/fmvins_nws/fmvins_nws1 2 4 5
    /tset/CAPIxcurses/fmvins_wch/fmvins_wch1 1 2 3
    /tset/CAPIxcurses/fmvins_wst/fmvins_wst1 1 2 4
    /tset/CAPIxcurses/fmvvline_s/fmvvline_s1 1 2 3 4
    /tset/CAPIxcurses/fmvwadd_wc/fmvwadd_wc1 1 15
    /tset/CAPIxcurses/fmvwadd_wn/fmvwadd_wn1 1 2 4 6 11
    /tset/CAPIxcurses/fmvwadd_ws/fmvwadd_ws1 1 2 5 10
    /tset/CAPIxcurses/fmvwaddnws/fmvwaddnws1 1 3 14
    /tset/CAPIxcurses/fmvwaddwst/fmvwaddwst1 13
    /tset/CAPIxcurses/fmvwchgat/fmvwchgat1 1 2 3
    /tset/CAPIxcurses/fmvwget_wc/fmvwget_wc1 24
    /tset/CAPIxcurses/fmvwgetch/fmvwgetch1 24
    /tset/CAPIxcurses/fmvwins_nw/fmvwins_nw1 2 4 5
    /tset/CAPIxcurses/fmvwins_wc/fmvwins_wc1 1 2 3
    /tset/CAPIxcurses/fmvwins_ws/fmvwins_ws1 1 2 4
    /tset/CAPIxcurses/fmvwvline_/fmvwvline_1 1 2 3 4
    /tset/CAPIxcurses/fpecho_wch/fpecho_wch1 1 15
    /tset/CAPIxcurses/fvline_set/fvline_set1 1 2 3 4
    /tset/CAPIxcurses/fwadd_wch/fwadd_wch1 1 15
    /tset/CAPIxcurses/fwadd_wchn/fwadd_wchn1 1 2 4 6 11
    /tset/CAPIxcurses/fwadd_wchs/fwadd_wchs1 1 2 5 10
    /tset/CAPIxcurses/fwaddnwstr/fwaddnwstr1 1 3 14
    /tset/CAPIxcurses/fwaddwstr/fwaddwstr1 13
    /tset/CAPIxcurses/fwchgat/fwchgat1 1 2 3
    /tset/CAPIxcurses/fwecho_wch/fwecho_wch1 1 15
    /tset/CAPIxcurses/fwhline_se/fwhline_se1 1 2 3 4
    /tset/CAPIxcurses/fwins_nwst/fwins_nwst1 1 2 4 5
    /tset/CAPIxcurses/fwins_wch/fwins_wch1 1 2 3
    /tset/CAPIxcurses/fwins_wstr/fwins_wstr1 1 2 4
    /tset/CAPIxcurses/fwvline_se/fwvline_se1 1 2 3 4

    According to Curses Interfaces, 4.2, p. 17, "A spacing complex
    character is a spacing character followed by any non-spacing characters
    associated with it." Given a starting cursor position (row, column)
    The correct behavior of a terminal or terminal emulator is to render
    both the spacing and the following non-spacing character exactly at
    (row, column).

    The function avsvirtual_output in ../CAPI/SRC/LIB/capi_xcurses does not
    render such characters correctly. This is the failing code:

    1098 /*multi-byte characters*/
    1099 if (fextended) {
    1100 width = 1;
    1101 if (ch == '9') /*multi-column*/
    1102 width = 2;
    1103 else if (ch > '3') /*non-spacing*/
    1104 width = 0;
    1105 switch (width) {
    1106 case 0:
    1107 send_mb_char(col-1, arow-1, (char)ch, 0);
    1108 break;
    1109 case 1:
    1110 if (col == COLUMNS+1) {
    1111 if (wrap) {
    1112 col = 1;
    1113 do_linefeed();
    1114 }
    1115 else
    1116 col = COLUMNS;
    1117 }
    1118 if (col == COLUMNS) {
    1119 send_mb_char(col-1, arow-1, (char)ch, 1);
    1120 if (wrap)
    1121 col++;
    1122 }
    1123 else {
    1124 send_mb_char(col-1, arow -1, (char)ch, 1);
    1125 col++;
    1126 }

    The current column is (col - 1). The switch statement at line 1105 will
    be executed once in turn for each character in a spacing complex
    character.

    The spacing character is case 1, and the subsequent non-spacing characters
    are case 0.

    When a spacing complex character is processed, the case 1 path renders the
    spacing character (send_mb_char) and moves the cursor (col++).

    The subsequent nonspacing characters follow the path through case 0, and
    are rendered one character position too late.


    [Note to reviewer: The complete journal is too large to submit here (over
    400k), especially since the request may well be circulated for review.
    If we could make a decision here that applied only to the case shown, we'd
    be glad to make a second huge request concerneing the others.]
    Test Output

    10|394 /tset/CAPIxcurses/fadd_wch/fadd_wch1 21:15:24|TC Start, scenario ref 176-54
    15|394 1.10 18|TCM Start
    400|394 1 1 21:15:25|IC Start
    200|394 1 21:15:25|TP Start
    520|394 1 6785 1 1|SPEC1170TESTSUITE CASE 1
    520|394 1 6785 1 2|A successful call to int add_wch(const cchar_t *wch)
    520|394 1 6785 1 3|shall put the character component of wch into the
    520|394 1 6785 1 4|window stdscr at the cursor position for stdscr,
    520|394 1 6785 1 5|advance the cursor position for stdscr, and return OK.
    520|394 1 6786 1 1|PREP: Set test locale: xcurses
    520|394 1 6786 1 2|PREP: Set environment variables and open terminal connection
    520|394 1 6786 2 1|PREP: Call newterm
    520|394 1 6786 2 2|PREP: Initialize color pairs
    520|394 1 6786 2 3|PREP: Write extended characters with various attributes
    520|394 1 6786 2 4|TEST: Write with add_wch
    520|394 1 6786 2 5|ERROR: Asked to add non-spacing char #1 to non-extended char ' ' at (r=5, c=6)
    520|394 1 6786 2 6|ERROR: Asked to add non-spacing char #2 to non-extended char ' ' at (r=5, c=6)
    520|394 1 6786 2 7|TEST: Data on terminal screen matches expected data
    520|394 1 6786 2 8|ERROR: Line 5 is not as expected. Expected line is:
    520|394 1 6786 2 9| B290x
    520|394 1 6786 2 10|ERROR: Actual line is:
    520|394 1 6786 2 11| 1290x
    520|394 1 6786 2 12| Expected data: $TET_ROOT/CAPI/tset/CAPIxcurses/data/ADD_WCH/data1.scrn.
    520|394 1 6786 2 13| Actual data: $TET_ROOT/CAPI/tset/CAPIxcurses/tmp/ADD_WCH/data1.scrn
    520|394 1 6786 2 14|TEST: Cursor movement
    520|394 1 6786 2 15|CLEANUP: Call endwin
    520|394 1 6786 2 16|CLEANUP: Call delscreen
    520|394 1 6786 2 17|CLEANUP: Restore environment variables and close terminal connection
    520|394 1 6785 2 1|INFO: Testing the macro version of add_wch
    520|394 1 6789 1 1|PREP: Set test locale: xcurses
    520|394 1 6789 1 2|PREP: Set environment variables and open terminal connection
    520|394 1 6789 2 1|PREP: Call newterm
    520|394 1 6789 2 2|PREP: Initialize color pairs
    520|394 1 6789 2 3|PREP: Write extended characters with various attributes
    520|394 1 6789 2 4|TEST: Write with add_wch
    520|394 1 6789 2 5|ERROR: Asked to add non-spacing char #1 to non-extended char ' ' at (r=5, c=6)
    520|394 1 6789 2 6|ERROR: Asked to add non-spacing char #2 to non-extended char ' ' at (r=5, c=6)
    520|394 1 6789 2 7|TEST: Data on terminal screen matches expected data
    520|394 1 6789 2 8|ERROR: Line 5 is not as expected. Expected line is:
    520|394 1 6789 2 9| B290x
    520|394 1 6789 2 10|ERROR: Actual line is:
    520|394 1 6789 2 11| 1290x
    520|394 1 6789 2 12| Expected data: $TET_ROOT/CAPI/tset/CAPIxcurses/data/ADD_WCH/data1.scrn.
    520|394 1 6789 2 13| Actual data: $TET_ROOT/CAPI/tset/CAPIxcurses/tmp/ADD_WCH/data1.scrn
    520|394 1 6789 2 14|TEST: Cursor movement
    520|394 1 6789 2 15|CLEANUP: Call endwin
    520|394 1 6789 2 16|CLEANUP: Call delscreen
    520|394 1 6789 2 17|CLEANUP: Restore environment variables and close terminal connection
    220|394 1 1 21:15:30|FAIL
    410|394 1 1 21:15:30|IC End

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    This request should be refused, it is a duplicate of PG4U.00147.

    Further the submitter's argument here is mixing apples and oranges.
    The requirements of the curses specification are for the API between
    an application and a curses implementation, only. There is no "correct"
    behavior for a terminal expressed or implied in the specification, rather
    it is the function of a curses implementation to send "appropriate
    commands to the terminal to achieve the desired effect" for an application's
    curses calls. For a curses implemention to impose requirements on
    terminals is non-conforming. In particular, complex characters are an
    abstraction specific to curses. Terminals are not required to know
    about them at all much less implement them in a specific fashion.

    VSU's terminal emulator renders spacing characters and then moves the cursor
    as per standard VT100 behavior. To add a non-spacing character to
    a spacing character a curses implementation needs to first reposition
    the cursor. This is neither "correct" nor "incorrect" it is simply how this
    terminal is implemented and curses needs to send the appropriate
    commands to get what the application has asked for through the curses
    interface to show up on the screen.

    While the issue of terminal design is out of scope, it is also interesting
    to consider that implementing a terminal in the manner suggested is
    prohibitively complex. A terminal cannot wait to see if a non-spacing
    character is coming next before deciding what to do with a spacing character
    as the terminal would then never process the last character sent if it
    were a spacing one. Nor can a terminal just render a spacing character,
    move the cursor and expect to backtrack if a non-spacing character appears
    as scrolling, multicolumn character replacement, and other boundry conditions
    make this impractical.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion
    This request is refused based on the consultant's recommendation.
    We note however that is not an exact duplicate of PG4U.00147. If
    the customer wishes to take the matter further they could appeal.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Rejected (REJ)
    Review Conclusion
    This request is refused.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority