2 #ifdef VERBOSE_REV_INFO
3 static char rcs_id[] = "$TOG: TermBuffer.c /main/2 1997/04/17 18:04:41 samborn $";
4 #endif /* VERBOSE_REV_INFO */
8 * (c) Copyright 1993, 1994, 1996 Hewlett-Packard Company *
9 * (c) Copyright 1993, 1994, 1996 International Business Machines Corp. *
10 * (c) Copyright 1993, 1994, 1996 Sun Microsystems, Inc. *
11 * (c) Copyright 1993, 1994, 1996 Novell, Inc. *
12 * (c) Copyright 1996 Digital Equipment Corporation. *
13 * (c) Copyright 1996 FUJITSU LIMITED. *
14 * (c) Copyright 1996 Hitachi. *
17 #define USE_MEMCPY /* use memcpy for line movement... */
20 #include "TermHeader.h" /* for MIN/MAX */
21 #include "TermBufferP.h"
22 #include "TermEnhance.h"
25 ** clear "count" enhancements starting at startCol
54 _DtTermClearEnhancements
78 enhValue **enhancements,
80 const countSpec countWhich
84 _DtTermGetCharacterPointer
92 _DtTermInsertEnhancements
98 const Boolean insertFlag
102 _DtTermBufferCreateEnhancement
118 _DtTermDeleteEnhancement
134 Boolean insertFlag, /* if TRUE, insert, else overwrite */
135 termChar **returnChars, /* pointer to overflow buffer */
136 short *returnCount /* count of characters in overflow buffer */
162 #if (defined(TEST) || defined(__CODECENTER__) || defined(VALIDATE_ENH))
169 # define VALIDATE_ENHANCEMENTS(tb, row) validateEnhancements((tb), (row))
171 # define VALIDATE_ENHANCEMENTS(tb, row)
172 #endif /* TEST || __CODECENTER__ || VALIDATE_ENH */
175 ** A blank enhancement structure, it will come in handy.
177 static DtTermEnhPart blankEnh = {0, 0, 0, 0, 0};
180 ** Create and initialize the Dt-specific parts of the term buffer.
183 _DtTermBufferCreateBuffer
188 const short sizeOfBuffer,
189 const short sizeOfLine,
190 const short sizeOfEnh
197 newTB = _DtTermPrimBufferCreateBuffer(w, rows, cols,
198 sizeOfBuffer, sizeOfLine, sizeOfEnh);
203 VALUE_LIST(newTB) = (enhValues) malloc(NUM_ENHANCEMENT_FIELDS *
206 if (!VALUE_LIST(newTB))
208 _DtTermPrimBufferFreeBuffer(newTB);
209 return((TermBuffer) NULL);
212 NUM_ENH_FIELDS(newTB) = NUM_ENHANCEMENT_FIELDS;
213 for (lines = DT_LINES(newTB);
214 lines < DT_LINES(newTB) + ROWS(newTB);
217 DT_ENH(*lines) = (DtEnh) NULL;
219 DT_ENH_STATE(newTB) = blankEnh;
220 DT_ENH_DIRTY(newTB) = 0;
221 ENH_PROC(newTB) = _DtTermEnhProc;
222 BUFFER_CREATE(newTB) = _DtTermBufferCreateBuffer;
223 BUFFER_FREE(newTB) = _DtTermBufferFreeBuffer;
224 BUFFER_RESIZE(newTB) = _DtTermBufferResize;
225 CLEAR_ENH(newTB) = _DtTermClearEnhancements;
226 INSERT_ENH(newTB) = _DtTermInsertEnhancements;
227 DELETE_ENH(newTB) = _DtTermDeleteEnhancement;
228 SET_ENH(newTB) = _DtTermSetEnhancement;
229 GET_ENH(newTB) = _DtTermGetEnhancement;
230 SET_LINE_LENGTH(newTB) = _DtTermSetLineLength;
231 CLEAR_LINE(newTB) = _DtTermClearLine;
237 ** Resize buffer, this is a helper function, if malloc fails, then the
238 ** appropriate dimensions are forced to the current maximums
253 ** make any necessary width adjustments first...
256 ** We do not take any action if the new column width is less
257 ** than the current column width. It is the responsibility of
258 ** the rendering code to make sure that two column characters
259 ** are handled properly if the second column falls past the last
260 ** column in the window.
262 if (*newCols > MAX_COLS(tb))
264 termChar *newLineBuffer;
267 ** now extend the line buffers and enhancements for all lines,
268 ** (even lines that are not being used at the moment
269 ** (ROWS < MAX_ROWS))...
271 lines = DT_LINES(tb);
272 for (i = 0; i < MAX_ROWS(tb); i++)
275 ** only copy the enhancement information when it exists
277 if (DT_ENH(lines[i]))
279 enh = (DtEnh) malloc(*newCols * sizeof(DtTermEnhPart));
284 ** copy the enhancment info for all characters on
285 ** the line, zero out the rest
287 (void) memcpy(enh, DT_ENH(lines[i]),
288 WIDTH(lines[i]) * sizeof(DtTermEnhPart));
289 (void) memset(&enh[WIDTH(lines[i])], 0,
290 (*newCols - WIDTH(lines[i])) *
291 sizeof(DtTermEnhPart));
292 free(DT_ENH(lines[i]));
293 DT_ENH(lines[i]) = enh;
298 ** the malloc failed, revert back to MAX_COLS
300 *newCols = MAX_COLS(tb);
301 *newRows = MIN(*newRows, MAX_ROWS(tb));
305 newLineBuffer = (termChar *) malloc((unsigned)
306 *newCols * BYTES_PER_CHAR(tb));
308 if (newLineBuffer == NULL)
311 ** line buffer malloc failed, we can only increase the
312 ** width to the current maximum...
314 *newCols = MAX_COLS(tb);
315 *newRows = MIN(*newRows, MAX_ROWS(tb));
318 memcpy(newLineBuffer, BUFFER(lines[i]), LENGTH(lines[i]) *
320 free(BUFFER(lines[i]));
321 BUFFER(lines[i]) = newLineBuffer;
322 WRAPPED(lines[i]) = False;
324 MAX_COLS(tb) = *newCols;
329 ** now adjust the length of the buffer as necessary...
331 if (*newRows > MAX_ROWS(tb))
334 ** the number of rows is increasing
336 lines = (DtLine *) malloc((unsigned) *newRows * sizeof(DtLine));
340 ** the malloc succeeded, copy the old information, and then
343 memcpy(lines, DT_LINES(tb), sizeof(DtLine) * MAX_ROWS(tb));
345 LINES(tb) = (TermLine *)lines;
348 ** now initialize the new lines...
351 ** If we are unable to malloc any part of a line, adjust
352 ** "newRows" and break.
354 for (i = MAX_ROWS(tb); i < *newRows; i++)
356 lines[i] = (DtLine) malloc(SIZE_OF_LINE(tb));
359 DT_ENH(lines[i]) = NULL;
360 BUFFER(lines[i]) = (termChar *) malloc((unsigned) COLS(tb) *
362 if (BUFFER(lines[i]))
364 LENGTH(lines[i]) = 0;
366 WRAPPED(lines[i]) = False;
371 ** the line buffer malloc failed...
380 ** we couldn't malloc this line...
386 MAX_ROWS(tb) = *newRows;
391 ** the malloc for the row buffer failed, revert back to MAX_ROWS
393 *newRows = MAX_ROWS(tb);
402 ** NOTE: This is a helper function, and should only be called by
403 ** TermPrimBufferFreeBuffer.
406 _DtTermBufferFreeBuffer
414 ** Free the Dt-specific buffer info...
416 for (lines = DT_LINES(tb); lines < DT_LINES(tb) + ROWS(tb); lines++)
420 (void) free(DT_ENH(*lines));
425 (void) free(VALUE_LIST(tb));
430 ** clear all the enhancements from startCol through stopCol
445 enh = DT_ENH(DT_LINE_OF_TBUF(tb, row));
450 for(i = 0; i < count; i++)
453 ** Clear all of the enhancement information.
462 ** Clear "count" enhancement blocks, starting at the specified row and column.
465 _DtTermClearEnhancements
473 clearEnhancements(tb, row, col, count);
477 ** Insert the desired number of enhancements at the specified
481 ** We depend on the calling function to insure that insertCount
482 ** has been properly clipped to insure that we don't go out of
484 ** Results are undefined if this function is called when the specified
485 ** column is at the end of the line.
488 _DtTermInsertEnhancements
494 const Boolean insertFlag
498 DtTermEnhPart fillEnh;
504 line = DT_LINE_OF_TBUF(tb, row);
508 ** There's nothing to do if we're past the end of the line or
509 ** the dirty bit is clear and there are no ehancements on
512 if ((col < WIDTH(line)) && ((DT_ENH_DIRTY(tb)) || (enh != NULL)))
517 ** there are currently no enhancements on this line,
518 ** allocate an enhancement buffer, and reset 'enh'...
520 _DtTermBufferCreateEnhancement(tb, row, col);
525 ** get a copy of the current enhancement (we'll insert 'copyCount'
526 ** copies of it into the enhancement buffer)
528 fillEnh = DT_ENH_STATE(tb);
533 ** we're in insert mode, move any existing enhancements...
535 copyCount = MIN((WIDTH(line) - col),
536 (COLS(tb) - col - insertCount));
537 copyCount = MAX(0, copyCount);
538 memmove(enh + col + insertCount, enh + col,
539 copyCount * sizeof(DtTermEnhPart));
544 ** insert insertCount copies of fillEnh into the enhancement buffer
545 ** starting at line->enh[col + 1]...
548 for (i = 0; i < insertCount; i++)
555 ** insert insertCount copies of fillEnh into the enhancement buffer
556 ** starting at line->enh[col + 1]...
559 for (i = 0; i < insertCount; i++)
575 short *count /* number of columns to delete */
578 _DtTermPrimBufferDelete(tb, row, col, count, NULL, NULL);
582 ** delete the desired enhancements starting the specified position...
585 _DtTermDeleteEnhancement
594 DtTermEnhPart fillEnh;
598 line = DT_LINE_OF_TBUF(tb, row);
601 if ((enh == NULL) || (WIDTH(line) <= col))
604 ** no enhancements, or at (or past) the end of the line, return
610 ** get a copy of the current enhancement
615 ** move all of the enhancement blocks between col + width and and the
616 ** end of the line to col
618 copyCount = WIDTH(line) - (col + width);
619 memcpy(enh + col , enh + col + width,
620 copyCount * sizeof(DtTermEnhPart));
626 ** Create an enhancement block at the specified row and column.
628 ** NOTE: For the time being, we simply allocate an entire row's worth
629 ** of enhancement blocks if it doesn't exist already. We may
630 ** get smarter later on.
634 _DtTermBufferCreateEnhancement
644 if (!VALID_ROW(tb, row) || !VALID_COL(tb, col))
649 line = DT_LINE_OF_TBUF(tb, row);
650 enh = &(DT_ENH(line));
653 ** If this row already has enhancement blocks allocated, return.
658 ** Otherwise, allocate and initialize a row of enhancement blocks.
660 *enh = (DtEnh) malloc(MAX_COLS(tb) * sizeof(DtTermEnhPart));
667 ** Clear all the enhancements...
669 (void) memset(*enh, 0, MAX_COLS(tb) * sizeof(DtTermEnhPart));
675 ** Free the enhancement block at the specified row and column.
677 ** NOTE: We may get smarter later on.
680 _DtTermBufferFreeEnhancement
691 ** Set the desired enhancement.
693 ** This function does the right thing (as far as I can tell regarding
694 ** propagating enhancements).
697 ** -1 : the enhancement was not set
698 ** >= 0 : the number of characters (as opposed to character positions)
699 ** that the enhancement affects
702 _DtTermSetEnhancement
714 enhState = (DtEnh) &(DT_ENH_STATE(tb));
722 enhState->video = (value &= VIDEO_MASK);
725 enhState->field = (value &= FIELD_MASK);
728 enhState->fgColor = (value &= COLOR_MASK);
731 enhState->bgColor = (value &= COLOR_MASK);
734 enhState->font = (value &= FONT_MASK);
741 ** We've set the value, now decide if this anything but the blank
744 DT_ENH_DIRTY(tb) = ((enhState->video != blankEnh.video ) ||
745 (enhState->field != blankEnh.field ) ||
746 (enhState->fgColor != blankEnh.fgColor) ||
747 (enhState->bgColor != blankEnh.bgColor) ||
748 (enhState->font != blankEnh.font ));
750 ** return the correct count (which in this case will always be 0)
756 ** Get the enhancements for the desired row and column.
759 ** a pointer to an array of the current enhancement values
762 ** the number of columns for which the enhancements are
763 ** valid, or the number of columns until the enhancements
764 ** were modified by an escape sequence (see 'countWhich' below)
767 ** if 'countWhich' is countAll then count until any enhancement value
769 ** if 'countAll' is countNew then count until a new enhancement value
770 ** starts (regardless of whether it is the same or not).
773 ** True if row and col are valid
776 _DtTermGetEnhancement
783 const countSpec countWhich
787 ** store the current enhancement values here
794 ** First we do some simple bounds checking
796 VALIDATE_ENHANCEMENTS(tb, row);
797 if (!VALID_ROW(tb, row) || !VALID_COL(tb, col))
801 line = DT_LINE_OF_TBUF(tb, row);
804 ** point to the correct enhancement chunk.
806 if (DT_ENH(line) == NULL || (WIDTH(line) <= col))
809 ** There are either no enhancements allocated for this line,
810 ** or we're past the end of the line, in either case return
811 ** a blank enhancement.
818 ** We're in the line get the current enhancement values
820 enh = &(DT_ENH(line)[col]);
824 ** Shove the enhancement values into their correct locations...
826 *values = (VALUE_LIST(tb));
827 (*values)[(int)enhVideo ] = (enh->video & VIDEO_MASK);
828 (*values)[(int)enhField ] = (enh->field & FIELD_MASK);
829 (*values)[(int)enhFgColor] = (enh->fgColor & COLOR_MASK);
830 (*values)[(int)enhBgColor] = (enh->bgColor & COLOR_MASK);
831 (*values)[(int)enhFont ] = (enh->font & FONT_MASK );
834 ** Now count how many characters are affected by the enhancements.
836 if (DT_ENH(line) == NULL)
839 ** There no enhancements allocated for this line, the default
840 ** enhancement is active for the remainder of the line.
841 ** NOTE: Make sure count >= 0.
843 *count = MAX(0, WIDTH(line) - col);
845 else if (WIDTH(line) <= col)
848 ** We're past the end of the line, count will always == 0;
855 ** We're in the line, determine the number of characters that
856 ** these enhancements apply to.
862 ** For Vt220 emulation, countNew is the same as countAll...
867 ** count until an enhancement value changes
869 for (i = 0; i < (WIDTH(line) - col); i++)
871 if (((*values)[(int)enhVideo ] != (enh->video & VIDEO_MASK))||
872 ((*values)[(int)enhField ] != (enh->field & FIELD_MASK))||
873 ((*values)[(int)enhFgColor] != (enh->fgColor & COLOR_MASK))||
874 ((*values)[(int)enhBgColor] != (enh->bgColor & COLOR_MASK))||
875 ((*values)[(int)enhFont ] != (enh->font & FONT_MASK )) )
878 ** the enhancements differ; break out
886 VALIDATE_ENHANCEMENTS(tb, row);
891 VALIDATE_ENHANCEMENTS(tb, row);
896 ** This is a vt-specific helper function for setting the line length.
897 ** By the time the function is called, termBufferSetLineLength()
898 ** as already validated the newLength, the row, and insured that the
899 ** new length is > the current length
901 ** This function propagates the correct enhancement to the new end of line.
915 ** _DtTermPrimBufferClearLine will reset the line width, this is
916 ** our chance to clear any enhancements that may exist on this line...
929 line = DT_LINE_OF_TBUF(tb, row);
935 ** We have enhancements, clear all those between the current
936 ** and the new length...
939 (void) memset(&enh[newWidth], 0,
940 (WIDTH(line) - newWidth) * sizeof(DtTermEnhPart));
946 ** Erase characters on the specified row (and clear the enhancements) with
947 ** the appropriate semantics. For VT class emulators, there are several
948 ** ways to erase characters:
949 ** - from the active position to the end of line
950 ** - erase the specified number of characters starting at the current
952 ** - from the start of the line to the active position
953 ** - erase the entire line
954 ** - from the active position to the end of the buffer
955 ** - erase the specified number of lines starting at the current
957 ** - from the start of the buffer to the active position
958 ** - erase the entire buffer
967 DtEraseMode eraseSwitch
977 ** erase from col 0 to the current cursor position
980 lastCol = MIN(col, WIDTH(DT_LINE_OF_TBUF(tb, row)) - 1);
985 ** erase "count" characters from the current cursor position
988 lastCol = MIN(col + count - 1, WIDTH(DT_LINE_OF_TBUF(tb, row)) - 1);
995 case eraseFromRow0Col0:
998 ** These cases should have been handled by _DtTermFuncErase()
1003 _DtTermPrimBufferErase(tb, row, startCol, lastCol);
1005 ** now clear the corresponding enhancements...
1007 clearEnhancements(tb, row, startCol, lastCol - startCol + 1);
1010 #if (defined(TEST) || defined(__CODECENTER__) || defined(VALIDATE_ENH))
1012 _DtTermValidateEnhancements
1018 DtTermEnhPart refEnh;
1022 Boolean validatePassed;
1024 validatePassed = True;
1026 thisLine = DT_LINE_OF_TBUF(tb, row);
1027 if (DT_ENH(thisLine))
1030 ** Initialize the reference enhancement
1033 refEnh.videoStart = 0;
1034 refEnh.fieldStart = 0;
1035 refEnh.colorStart = 0;
1036 refEnh.fontStart = 0;
1038 for(col = 0, thisEnh = DT_ENH(thisLine);
1039 col < WIDTH(thisLine) +
1040 (DANGLE(thisLine) >= 0 ? 1 : 0);
1043 if (thisEnh->videoStart)
1045 refEnh.video = thisEnh->video;
1047 else if (refEnh.video != thisEnh->video)
1049 fprintf(stderr, "Video enhancements don't match:");
1050 fprintf(stderr, " row : %3.3d, col : %3.3d\n", row, col);
1051 fprintf(stderr, " refEnh.video : %d\n", (int)(refEnh.video & VIDEO_MASK));
1052 fprintf(stderr, " thisEnh->video: %d\n", (int)(thisEnh->video & VIDEO_MASK));
1053 validatePassed = False;
1056 if (thisEnh->fieldStart)
1058 refEnh.field = thisEnh->field;
1060 else if (refEnh.field != thisEnh->field)
1062 fprintf(stderr, "Field enhancements don't match:");
1063 fprintf(stderr, " row : %3.3d, col : %3.3d\n", row, col);
1064 fprintf(stderr, " refEnh.field : %d\n", (int)(refEnh.field & FIELD_MASK));
1065 fprintf(stderr, " thisEnh->field: %d\n", (int)(thisEnh->field & FIELD_MASK));
1066 validatePassed = False;
1068 if (thisEnh->colorStart)
1070 refEnh.color = thisEnh->color;
1072 else if (refEnh.color != thisEnh->color)
1074 fprintf(stderr, "Color enhancements don't match:");
1075 fprintf(stderr, " row : %3.3d, col : %3.3d\n", row, col);
1076 fprintf(stderr, " refEnh.color : %d\n", (int)(refEnh.color & COLOR_MASK));
1077 fprintf(stderr, " thisEnh->color: %d\n", (int)(thisEnh->color & COLOR_MASK));
1078 validatePassed = False;
1080 if (thisEnh->font <= 2)
1082 if (thisEnh->fontStart)
1084 refEnh.font = thisEnh->font;
1086 else if (refEnh.font != thisEnh->font)
1088 fprintf(stderr, "Font enhancements don't match:");
1089 fprintf(stderr, " row : %3.3d, col : %3.3d\n", row, col);
1090 fprintf(stderr, " refEnh.font : %d\n", (int)(refEnh.font & FONT_MASK));
1091 fprintf(stderr, " thisEnh->font: %d\n", (int)(thisEnh->font & FONT_MASK));
1092 validatePassed = False;
1097 fprintf(stderr, "Font enhancement out of range:");
1098 fprintf(stderr, " row : %3.3d, col : %3.3d\n", row, col);
1099 fprintf(stderr, " thisEnh->font: %d\n", (int)(thisEnh->font & FONT_MASK));
1100 validatePassed = False;
1104 if (validatePassed == False)
1106 fprintf(stderr, "validateEnhancement failed\n");
1109 #endif /* TEST || __CODECENTER__ || DEBUG || VALIDATE_ENH */
1111 #if (defined(TEST) || defined(__CODECENTER__) || defined(DEBUG))
1124 printf("Line: %d\n", row);
1126 line = tb->lines[row];
1127 printf(" length: %3d\n", line->length);
1128 if (line->length > 0)
1130 printf(" buffer: <");
1131 pChar = line->buffer;
1132 for (j = 0; j < line->length; j++)
1134 printf("%X", *pChar++);
1141 _DtTermPrintEnhancement
1148 enhValue enhancements[NUM_ENHANCEMENT_FIELDS];
1152 _DtTermPrimBufferGetEnhancement(tb, row, col, enhancements, &enhCount, countNew);
1153 printf(" col : %d\n", col);
1154 printf(" Count: %d\n", enhCount);
1155 printf(" Video: '_");
1156 printf("%s", IS_BOLD(enhancements[enhVideo]) != 0 ? "B":"b");
1158 printf("%s", IS_SECURE(enhancements[enhVideo]) != 0 ? "S":"s");
1160 printf("%s", IS_HALF_BRIGHT(enhancements[enhVideo]) != 0 ? "H":"h");
1162 printf("%s", IS_UNDERLINE(enhancements[enhVideo]) != 0 ? "U":"u");
1164 printf("%s", IS_INVERSE(enhancements[enhVideo]) != 0 ? "I":"i");
1166 printf("%s", IS_BLINK(enhancements[enhVideo]) != 0 ? "B":"b");
1173 switch (enhancements[enhField])
1178 case FIELD_UNPROTECT:
1179 printf("UNPROTECT");
1181 case FIELD_TRANSMIT:
1193 printf(" Color: %1d\n", enhancements[enhFont]);
1199 switch (enhancements[enhFont])
1219 printf(" video : %d\n", enh->video);
1220 printf(" field : %d\n", enh->field);
1221 printf(" fgColor: %d\n", enh->fgColor);
1222 printf(" bgColor: %d\n", enh->bgColor);
1223 printf(" font : %d\n", enh->font);
1227 ** Print the contents of the TermBuffer.
1240 printf("TermBuffer has been freed.\n");
1244 printf("TermBuffer dimensions:\n");
1245 printf(" rows: %d\n", ROWS(tb));
1246 printf(" cols: %d\n", COLS(tb));
1247 printf(" enhDirty: %d\n", DT_ENH_DIRTY(tb));
1248 printf(" enhState:\n");
1249 printEnh(&(DT_ENH_STATE(tb)));
1251 for (i = 0; i < ROWS(tb); i++)
1257 k = _termBufferPrintEnhancement(tb, i, j);
1263 } while (j < COLS(tb));
1267 #endif /* (defined(TEST) || defined(__CODECENTER__)) */
1271 ** Some simple tests of the termBuffer.
1273 /* the following is to allow for a single main function in the code... */
1274 #define termBufMain main
1279 printf("Sizeof DtTermEnhPart : %d\n", sizeof(struct _DtTermEnhPart));
1280 printf("Sizeof termBufferRec : %d\n", sizeof(struct _TermBufferRec));
1282 myTB = _DtTermPrimBufferCreateBuffer(12, 80);
1283 _termBufferPrintBuffer(myTB);
1285 printf("[0,0] %d\n", _DtTermPrimBufferSetEnhancement(myTB, 0, 0, enhVideo, BLINK));
1286 _termBufferPrintEnhancement(myTB, 0, 0);
1287 printf("[0,1] %d\n", _DtTermPrimBufferSetEnhancement(myTB, 0, 1, enhVideo, INVERSE));
1288 _termBufferPrintEnhancement(myTB, 0, 0);
1289 _termBufferPrintEnhancement(myTB, 0, 1);
1290 printf("[0,9] %d\n", _DtTermPrimBufferSetEnhancement(myTB, 0, 9, enhVideo, UNDERLINE));
1291 _termBufferPrintEnhancement(myTB, 0, 0);
1292 _termBufferPrintEnhancement(myTB, 0, 1);
1293 _termBufferPrintEnhancement(myTB, 0, 9);
1294 printf("[0,6] %d\n", _DtTermPrimBufferSetEnhancement(myTB, 0, 6, enhVideo, HALF_BRIGHT));
1295 _termBufferPrintEnhancement(myTB, 0, 0);
1296 _termBufferPrintEnhancement(myTB, 0, 1);
1297 _termBufferPrintEnhancement(myTB, 0, 6);
1298 _termBufferPrintEnhancement(myTB, 0, 9);
1299 _termBufferPrintBuffer(myTB);
1301 _DtTermPrimBufferSetEnhancement(myTB, 10, 10, enhVideo, BLINK);
1302 _DtTermPrimBufferSetEnhancement(myTB, 10, 20, enhColor, 3);
1303 _termBufferPrintBuffer(myTB);
1305 _DtTermPrimBufferResizeBuffer(&myTB, 6, 40);
1306 _termBufferPrintBuffer(myTB);
1308 _DtTermPrimBufferSetEnhancement(myTB, 10, 10, enhVideo, BLINK);
1309 _DtTermPrimBufferResizeBuffer(&myTB, 12, 80);
1310 _termBufferPrintBuffer(myTB);
1312 _DtTermPrimBufferFreeBuffer(myTB);