1: #include "hd.h" 2: #include "mydir.h" 3: 4: dircmd (cmd) register cmd; { 5: 6: register ret; /* return value */ 7: 8: ret = REPLOT; 9: 10: if (cmd == EOT) leave (); 11: else if (cmd == LF) 12: ret = enterdir (DOTDOT); 13: else if ((cmd == '+') || (cmd == ';') || (cmd == 'u')) 14: cpage = ((cpage >= tpages) ? 1 : cpage + 1); 15: else if (cmd >= 'a' && cmd <= 'z') { 16: cmd -= 'a'; 17: if (cmd >= pageend) ret = NOREPLOT; 18: else if (enterfile (filename (cmd)) == FAILURE) { 19: longfile (cmd); ret = NOREPLOT; 20: } 21: 22: } else if (cmd > '0' && cmd <= '9') 23: cpage = cmd - '0'; 24: else if (cmd == '0') cpage = 10; 25: else if (cmd == '-') { 26: cpage--; 27: if (cpage < 1) cpage = tpages; 28: } 29: else ret = NOOP; 30: return ret; 31: }