-/* Cursor movement funcs. */
-buf up(int i);
-buf down(int i);
+/* Buffer funcs. */
+buf set(buf b, int i);
+void show(buf b);
+buf up(buf b);
+buf down(buf b);
buf left(buf b);
buf right(buf b);
buf delch(buf b);
buf insch(buf b);
void enter(void);
+int range(int rstart, int rend, int i);
+int type(int i);
+
+
+/* Special key handling. */
+void spec(void);
-/* Escape-key handling. */
-int spec(int i);
/* Other funcs. */
-void readhistory(char *fname);
+buf readhistory(char *fname);
void keyhandler(buf b);