3 Copyright (C) 1996 Maurizio Plaza
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
28 char passwdbuff[CMD_LENG];
37 void cmdedit (void (*tabfunc) (void), int password)
40 char *buff = password ? passwdbuff : cbuff;
41 for (x = 0; x < CMD_LENG - 1; x++) {
54 if (c == '\n' || c == '\r') {
57 if (c == '\t' && !x && tabfunc)
59 if (c == '\b' || c == 0x7F) {
65 } else if ((c & 0xE0) != 0) {
66 if (x < CMD_LENG - 1) {
72 prom_printf(buff + x);
75 if (x == 1 && !password && useconf) {
76 if (cfg_get_flag (cbuff, "single-key"))