commit - d4f21010cae40e9c39ecc193e7b5bc83684516b5
commit + 407b79bac871f9596b083440332b187ed4bb5c17
blob - 2619b79462368c2de6e0de11b4c76f22286389f0
blob + fdb2bf77fc36ffa54711589957829bb35b308330
--- rover.c
+++ rover.c
oldsel = ESEL;
oldscroll = SCROLL;
start_line_edit("");
- update_input(prompt, DEFAULT);
+ update_input(prompt, RED);
while ((edit_stat = get_line_edit()) == CONTINUE) {
int sel;
Color color = RED;
int ok = 0;
char *prompt = "new file: ";
start_line_edit("");
- update_input(prompt, DEFAULT);
+ update_input(prompt, RED);
while ((edit_stat = get_line_edit()) == CONTINUE) {
int length = strlen(INPUT);
- ok = 1;
+ ok = length;
for (i = 0; i < rover.nfiles; i++) {
if (
!strncmp(ENAME(i), INPUT, length) &&
update_input(prompt, ok ? GREEN : RED);
}
clear_message();
- if (edit_stat == CONFIRM && strlen(INPUT)) {
+ if (edit_stat == CONFIRM) {
if (ok) {
addfile(INPUT);
cd(1);
int ok = 0;
char *prompt = "new directory: ";
start_line_edit("");
- update_input(prompt, DEFAULT);
+ update_input(prompt, RED);
while ((edit_stat = get_line_edit()) == CONTINUE) {
int length = strlen(INPUT);
- ok = 1;
+ ok = length;
for (i = 0; i < rover.nfiles; i++) {
if (
!strncmp(ENAME(i), INPUT, length) &&
update_input(prompt, ok ? GREEN : RED);
}
clear_message();
- if (edit_stat == CONFIRM && strlen(INPUT)) {
+ if (edit_stat == CONFIRM) {
if (ok) {
adddir(INPUT);
cd(1);
update_input(prompt, RED);
while ((edit_stat = get_line_edit()) == CONTINUE) {
int length = strlen(INPUT);
- ok = 1;
+ ok = length;
for (i = 0; i < rover.nfiles; i++)
if (
!strncmp(ENAME(i), INPUT, length) &&
update_input(prompt, ok ? GREEN : RED);
}
clear_message();
- if (edit_stat == CONFIRM && strlen(INPUT)) {
+ if (edit_stat == CONFIRM) {
if (isdir)
strcat(INPUT, "/");
if (ok) {