/*
* Diagnostic function: verify that a termline has a correct
* combining character structure.
*
/*
* Diagnostic function: verify that a termline has a correct
* combining character structure.
*
- * XXX-REMOVE-BEFORE-RELEASE: This is a performance-intensive
- * check. Although it's currently really useful for getting all the
- * bugs out of the new cc stuff, it will want to be absent when we
- * make a proper release.
+ * This is a performance-intensive check, so it's no longer enabled
+ * by default.
*/
static void cc_check(termline *line)
{
*/
static void cc_check(termline *line)
{
/*
* Add a combining character to a character cell.
/*
* Add a combining character to a character cell.
line->chars[newcc].chr = chr;
line->chars[col].cc_next = newcc - col;
line->chars[newcc].chr = chr;
line->chars[col].cc_next = newcc - col;
- cc_check(line); /* XXX-REMOVE-BEFORE-RELEASE */
+#ifdef TERM_CC_DIAGS
+ cc_check(line);
+#endif
line->chars[origcol].cc_next = 0;
line->chars[origcol].cc_next = 0;
- cc_check(line); /* XXX-REMOVE-BEFORE-RELEASE */
+#ifdef TERM_CC_DIAGS
+ cc_check(line);
+#endif
add_cc(destline, x, src->chr);
}
add_cc(destline, x, src->chr);
}
- cc_check(destline); /* XXX-REMOVE-BEFORE-RELEASE */
+#ifdef TERM_CC_DIAGS
+ cc_check(destline);
+#endif
/* Ensure the original cell doesn't have a cc list. */
src->cc_next = 0;
/* Ensure the original cell doesn't have a cc list. */
src->cc_next = 0;
- cc_check(line); /* XXX-REMOVE-BEFORE-RELEASE */
+#ifdef TERM_CC_DIAGS
+ cc_check(line);
+#endif
* Diagnostics: ensure that the compressed data really does
* decompress to the right thing.
*
* Diagnostics: ensure that the compressed data really does
* decompress to the right thing.
*
- * XXX-REMOVE-BEFORE-RELEASE: This is a bit performance-heavy
- * to be leaving in production code.
+ * This is a bit performance-heavy for production code.
#ifndef CHECK_SB_COMPRESSION
{
int dused;
#ifndef CHECK_SB_COMPRESSION
{
int dused;
+#endif /* TERM_CC_DIAGS */
/*
* Trim the allocated memory so we don't waste any, and return.
/*
* Trim the allocated memory so we don't waste any, and return.
for (i = oldcols; i < cols; i++)
line->chars[i] = term->basic_erase_char;
for (i = oldcols; i < cols; i++)
line->chars[i] = term->basic_erase_char;
- cc_check(line); /* XXX-REMOVE-BEFORE-RELEASE */
+#ifdef TERM_CC_DIAGS
+ cc_check(line);
+#endif
} else {
while (lines > 0) {
line = delpos234(term->screen, topline);
} else {
while (lines > 0) {
line = delpos234(term->screen, topline);
- cc_check(line); /* XXX-REMOVE-BEFORE-RELEASE */
+#ifdef TERM_CC_DIAGS
+ cc_check(line);
+#endif
if (sb && term->savelines > 0) {
int sblen = count234(term->scrollback);
/*
if (sb && term->savelines > 0) {
int sblen = count234(term->scrollback);
/*