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

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 1117 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 1117.


Report 1117 Actions


    Problem Report Number 1117
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0319
    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.00154 This request appeals the requests refused as PG4U.00147 and PG4U.00151.
    Problem Text
    [This is a new presentation repeating the requests refused as PG4U.00147
    and PG4U.00151.]

    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.]
    ----
    This request was rejected, and the consultant's response is shown below.
    The submitter disagrees with the rection, and asks for a 14-day review.


    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.

    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
    Our comment remains the same as for req.4.U.00492 refused as
    PG4U.00151.

    That is:-
    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 is a duplicate of a previous request which has been refused.
    We recommend that this request also be refused.

    The X/Open Curses Issue 4, Version 2 section 3.3.5 "non-spacing
    characters" defines a spacing complex character as follows:

    "Every non-spacing character in a window is associated with a
    spacing character and modifies the spacing character." ....

    "A spacing complex character is a spacing character followed by any
    non-spacing characters associated with it. That is, a spacing complex
    character is a complex character that includes one spacing character. An
    example of a code set that has complex characters is ISO/IEC 10646-1:1993."

    The spec is clear in that non-spacing characters are combined
    with the spacing character at the location they are written to.
    Thus the spacing character must be written first. Otherwise the
    non-spacing characters would be combined with whatever is already
    there, assuming the combination is valid, and then the whole
    group would be overwritten by the spacing character.

    This is also consistent with Unicode which is an example character
    set with non-spacing characters.

    The Unicode Standard, Worldwide Character Encoding,
    Version 1.0, Volume 1, ISBN 0-201-56788-1,

    section 2.5 page 19 para 3 - Sequence of Base Letters and Non-Spacing Marks :
    The convention used by the Unicode standard is consistent with
    the logical order of other non-spacing marks in Semitic and Indic
    scripts, the great majority of which follows the base characters
    with respect to which they are positioned. To avoid the
    complication of defining and implementing non-spacing marks on both
    sides of base characters, the Unicode standard specifies that all
    non-spacing marks must follow their base characters. This
    convention conforms to the way modern font technology handles the
    rendering of non-spacing graphical fonts, so that mapping from
    character store to font rendering is simplified.

    This request should go for a 14 day review by the Base Working Group.

    Review Type Expert Group Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion
    The test suite made the only assumption it could given the
    specification. The system under test should provide a supported
    environment in which the tests operate.

    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