MCPcopy Create free account
hub / github.com/NetHack/NetHack / do_add_cursor

Function do_add_cursor

outdated/sys/mac/mactty.c:777–798  ·  view source on GitHub ↗

* Low-level cursor handling routine */

Source from the content-addressed store, hash-verified

775 * Low-level cursor handling routine
776 */
777static void
778do_add_cursor(tty_record *record, short x_pos)
779{
780 record->x_curs = x_pos;
781 if (record->x_curs >= record->x_size) {
782 if (0L != (record->attribute[TTY_ATTRIB_FLAGS] & TA_WRAP_AROUND)) {
783 record->y_curs++;
784 record->x_curs = 0;
785 if (record->y_curs >= record->y_size) {
786 if (0L != (record->attribute[TTY_ATTRIB_FLAGS]
787 & TA_INHIBIT_VERT_SCROLL)) {
788 record->y_curs = record->y_size;
789 } else {
790 scroll_tty(record->its_window, 0,
791 1 + record->y_curs - record->y_size);
792 }
793 }
794 } else {
795 record->x_curs = record->x_size;
796 }
797 }
798}
799
800/*
801 * Do control character

Callers 2

add_tty_charFunction · 0.85
add_tty_stringFunction · 0.85

Calls 1

scroll_ttyFunction · 0.85

Tested by

no test coverage detected