Lines Matching full:table

12  * Routines dealing with the "position" table.
13 * This is a table which tells the position (in the input file) of the
16 * {{ The position table is scrolled by moving all the entries.
17 * Would be better to have a circular table
24 static POSITION *table = NULL; /* The position table */
53 return (table[sindex]);
57 * Add a new file position to the bottom of the position table.
64 * Scroll the position table up.
67 table[i-1] = table[i];
68 table[sc_height - 1] = pos;
72 * Add a new file position to the top of the position table.
79 * Scroll the position table down.
82 table[i] = table[i-1];
83 table[0] = pos;
87 * Initialize the position table, done whenever we clear the screen.
94 table[i] = NULL_POSITION;
98 * Allocate or reallocate the position table.
107 * If we already have a table, remember the first line in it
108 * before we free it, so we can copy that line to the new table.
110 if (table != NULL)
113 free((char*)table);
116 table = (POSITION *) ecalloc((size_t) sc_height, sizeof(POSITION)); /*{{type-issue}}*/
120 table[scrpos.ln-1] = scrpos.pos;
125 * Check the position table to see if the position falls within its range.
126 * Return the position table entry if found, -1 if not.
132 if (pos < table[0])
135 if (pos < table[i])
153 if (table[i] != NULL_POSITION && table[i] != 0)
182 if (table[i] == NULL_POSITION) {
196 if (table[i] != NULL_POSITION)
199 scrpos->pos = table[i];
286 * line is not the first char in its (file) line (the table is "beheaded").
293 POSITION tpos = table[TOP];
299 table[TOP] = linepos;