+
+/* Move up in history list. */
+hist up(hist h)
+{
+
+ buf b;
+
+ if ( (h.curindex > 0) )
+ {
+ h.curindex -= 1;
+ memset(&b.array[0], 0, sizeof(b.array) );
+ memcpy(&b.array[0], h.array[h.curindex], 80);
+ show(b);
+ return h;
+ }
+
+ else error();
+
+}
+
+
+/* Move down in history list. */
+hist down(hist h)
+{
+
+ buf b;
+
+ if ( (h.curindex < 19) )
+ {
+ h.curindex += 1;
+ memset(&b.array[0], 0, sizeof(b.array) );
+ memcpy(&b.array[0], h.array[h.curindex], 80);
+ show(b);
+ return h;
+ }
+
+ else error();
+