short _DtTermPrimBufferGetTextWc ( const TermBuffer tb, const short row, const short col, const short length, char *buffer, const Boolean needWideChar ) { short len; if (!VALID_ROW(tb, row) || !VALID_COL(tb, col)) { return(0); } len = MIN(length, LENGTH(LINES(tb)[row]) - col); if (length > 0) { memcpy(buffer, BUFFER(LINES(tb)[row]) + col, len); } return(len); }
void testInvalid() { LINES(bogus); }
void testValid() { LINES(X) % SIZE(2); LINES(X, Y) % SIZE(3); LINES(X, Y, Z) % SIZE(4); }