|
|
1.1 ! root 1: /* "@(#)curshdr.h 1.1" (1.16 3/16/83) */ ! 2: ! 3: /*LINTLIBRARY*/ ! 4: ! 5: /* ! 6: * IC and IL overheads and costs should be set to this ! 7: * value if the corresponding feature is missing ! 8: */ ! 9: #define INFINITY 500 ! 10: ! 11: struct line ! 12: { ! 13: int hash; /* hash value for this line, 0 if not known */ ! 14: struct line *next; /* pointer to the next line in list of lines */ ! 15: short bodylen; /* the cost of redrawing this line */ ! 16: short length; /* the number of valid characters in line */ ! 17: chtype *body; /* the actual text of the line */ ! 18: }; ! 19: ! 20: struct costs { ! 21: short Cursor_address; ! 22: short Cursor_home; ! 23: short Carriage_return; ! 24: short Tab; ! 25: short Back_tab; ! 26: short Cursor_left; ! 27: short Cursor_right; /* current cost, which is 1 unless in insert ! 28: * mode, since you can just output the ! 29: * character you want to move over */ ! 30: short Right_base; /* actual cost to do cursor_right */ ! 31: short Cursor_down; ! 32: short Cursor_up; ! 33: short Parm_left_cursor; ! 34: short Parm_right_cursor; ! 35: short Parm_up_cursor; ! 36: short Parm_down_cursor; ! 37: short Column_address; ! 38: short Row_address; ! 39: unsigned ilvar; /* Insert line varying part * 32 */ ! 40: int ilfixed; /* Insert line fixed overhead */ ! 41: unsigned dlvar; /* Delete line varying part * 32 */ ! 42: int dlfixed; /* Delete line fixed overhead */ ! 43: unsigned icvar; /* Insert char varying part * 32 */ ! 44: int icfixed; /* Insert char fixed overhead */ ! 45: unsigned dcvar; /* Delete char varying part * 32 */ ! 46: int dcfixed; /* Delete char fixed overhead */ ! 47: /* Should have costs for delete char/delete line here too. */ ! 48: }; ! 49: #define _cost(field) (SP->term_costs.field) ! 50: ! 51: struct map { ! 52: char label[16]; /* Text the key is labelled with */ ! 53: char sends[16]; /* Characters sent when key is pressed */ ! 54: short keynum; /* "char" we pass back to program */ ! 55: }; ! 56: ! 57: struct screen { ! 58: unsigned fl_nonl : 1; /* we shouldn't output \n */ ! 59: unsigned fl_uppercase : 1; /* upper case terminal */ ! 60: unsigned fl_normtty : 1; /* currently in normal tty mode */ ! 61: unsigned fl_my_term : 1; /* user names his terminal type */ ! 62: unsigned fl_echoit : 1; /* in software echo mode */ ! 63: unsigned fl_rawmode : 1; /* in raw or cbreak mode */ ! 64: unsigned fl_endwin : 1; /* has called endwin */ ! 65: unsigned phys_irm : 1; /* physically in insert char mode */ ! 66: unsigned virt_irm : 1; /* want to be in insert char mode */ ! 67: unsigned fl_nodelay : 1; /* tty is in nodelay mode */ ! 68: struct line **cur_body; /* physical screen image */ ! 69: struct line **std_body; /* desired screen image */ ! 70: struct line *freelist; /* free space list */ ! 71: short phys_x; /* physical cursor X position */ ! 72: short phys_y; /* physical cursor Y position */ ! 73: short virt_x; /* virtual cursor X position */ ! 74: short virt_y; /* virtual cursor Y position */ ! 75: short phys_top_mgn; /* physical top margin of scrolling region */ ! 76: short phys_bot_mgn; /* physical bottom margin of scrolling region */ ! 77: short des_top_mgn; /* desired top margin of scrolling region */ ! 78: short des_bot_mgn; /* desired bottom margin of scrolling region */ ! 79: chtype *curptr; /* pointer to cursor */ ! 80: chtype virt_gr; /* desired highlight state */ ! 81: chtype phys_gr; /* current highlight state */ ! 82: short winsize; /* no. of lines on which ID operations done */ ! 83: short doclear; /* flag to say whether screen garbaged */ ! 84: short baud; /* baud rate of this tty */ ! 85: short check_input; /* flag for input check */ ! 86: short check_fd; /* file descriptor for input check */ ! 87: struct _win_st *std_scr;/* primary output screen */ ! 88: struct _win_st *cur_scr;/* what's physically on the screen */ ! 89: struct term *tcap; /* TERMCAP strings and storage space */ ! 90: struct costs term_costs;/* costs of various capabilities */ ! 91: short kp_state; /* 1 iff keypad is on, else 0 */ ! 92: short ml_above; /* # memory lines above top of screen */ ! 93: #ifndef NONSTANDARD ! 94: SGTTY save_tty_buf; /* current state of this tty */ ! 95: FILE *term_file; /* File to write on for output. */ ! 96: #endif NONSTANDARD ! 97: #ifdef KEYPAD ! 98: struct map *kp; /* keypad map */ ! 99: #endif KEYPAD ! 100: short *input_queue; /* a place to put stuff ungetc'ed */ ! 101: FILE *input_file; /* Where to get keyboard input */ ! 102: }; ! 103: ! 104: #ifndef NONSTANDARD ! 105: extern struct screen *SP; ! 106: #endif ! 107: ! 108: #ifdef DEBUG ! 109: extern FILE *outf; ! 110: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.