Lines Matching defs:table
13 * Routines dealing with the "position" table.
14 * This is a table which tells the position (in the input file) of the
17 * {{ The position table is scrolled by moving all the entries.
18 * Would be better to have a circular table
25 static POSITION *table = NULL; /* The position table */
54 return (table[where]);
58 * Add a new file position to the bottom of the position table.
67 * Scroll the position table up.
70 table[i-1] = table[i];
71 table[sc_height - 1] = pos;
75 * Add a new file position to the top of the position table.
84 * Scroll the position table down.
87 table[i] = table[i-1];
88 table[0] = pos;
92 * Initialize the position table, done whenever we clear the screen.
100 table[i] = NULL_POSITION;
104 * Allocate or reallocate the position table.
114 * If we already have a table, remember the first line in it
115 * before we free it, so we can copy that line to the new table.
117 if (table != NULL)
120 free((char*)table);
123 table = (POSITION *) ecalloc(sc_height, sizeof(POSITION));
127 table[scrpos.ln-1] = scrpos.pos;
132 * Check the position table to see if the position falls within its range.
133 * Return the position table entry if found, -1 if not.
141 if (pos < table[0])
144 if (pos < table[i])
166 if (table[i] != NULL_POSITION)
190 if (table[i] != NULL_POSITION)
193 scrpos->pos = table[i];