diff --git a/APIG/build/drde-cd b/APIG/build/drde-cd index 41f89a1..1f8d110 100755 Binary files a/APIG/build/drde-cd and b/APIG/build/drde-cd differ diff --git a/APIG/client/commander.cpp b/APIG/client/commander.cpp index 4cae29f..17d649a 100644 --- a/APIG/client/commander.cpp +++ b/APIG/client/commander.cpp @@ -104,6 +104,7 @@ void mdCommander::driver() { cbreak(); greet(); while(acceptingInput) { + refresh(); mvprintw(row-1,1,"> "); next=0; i=0; @@ -251,7 +252,7 @@ void mdCommander::say(char *what) void mdCommander::greet() { const char *title="AusReg Cliever Commander", - *prompt="? for main menu or enter commander command now"; + *prompt="Enter ? or command"; sprintf(theBanner,banner,thisConfig->shellProcess); getmaxyx(stdscr,row,col); @@ -260,23 +261,24 @@ void mdCommander::greet() { mvprintw(row-2,1,"%s",prompt); refresh(); acceptingInput = true; - EPPmode = true; } void mdCommander::help() { - + + const char *prompt="Enter command"; + doHeader(); - mvprintw(5,10," a - AC system control menu"); - mvprintw(6,10," e - standard EPP command menu"); - mvprintw(7,10," ? - display this screen"); + mvprintw(5,10," a - AC system"); + mvprintw(6,10," e - EPP "); + mvprintw(7,10," ? - this screen"); mvprintw(8,10," ?? - display commands"); - mvprintw(9,10," ! - run the active command"); - mvprintw(10,10," !! - run active commands"); - mvprintw(11,10," C - make the active command"); - mvprintw(12,10," E - display/edit command "); - mvprintw(13,10," S - send command "); - mvprintw(14,10," X - discard the command(s)"); - mvprintw(15,10," - make the target EPP server"); + mvprintw(9,10," ! - run "); + mvprintw(10,10," !! - run all active"); + mvprintw(11,10," C - make the current command"); + mvprintw(12,10," E - display/edit "); + mvprintw(13,10," S - send "); + mvprintw(14,10," X - discard "); + mvprintw(15,10," - make the target device"); mvprintw(16,10," log - display this cliever's log"); mvprintw(17,10," mlog - display the master daemon log"); mvprintw(18,10," done - terminate commander but not process"); @@ -284,6 +286,8 @@ void mdCommander::help() { mvprintw(23,5," is an integer, above active everywhere outside data entry (>>)"); mvprintw(24,5,"no space before , X0 to delete all commands."); + mvprintw(row-2,1,"%s",prompt); + refresh(); } void mdCommander::eppMainMenu() { @@ -302,16 +306,33 @@ void mdCommander::eppMainMenu() { mvprintw(22,10," D - delete"); mvprintw(23,10," T - transfer"); + say((char *)"Action letter or ? to exit"); } void mdCommander::acMainMenu() { + char selection[10]; + doHeader(); mvprintw(5,(col-strlen("AC System Directives"))/2,"AC System Directives"); mvprintw(15,10," (H)ALT - Flush queues, stop, ignore incoming requests"); mvprintw(16,10," (L)OAD - Resume execution, accept work"); mvprintw(17,10," (B)ANG - Force reload the entire AC system"); - mvprintw(20,10,"These are only active on this screen, there's no confirmation."); + mvprintw(20,10,"Only active on this screen, there's no confirmation."); + + say((char *)"Select Action letter or anything else to exit"); + prompt(false); + mvgetstr(row-1,2,selection); + switch(selection[0]) { + case 'H': + break; + case 'L': + break; + case 'B': + break; + } + + help(); } bool sendEPPCommand() { @@ -429,7 +450,7 @@ const char *befehlJetzt = cmdNames[commandsNow[cmdNow]]; nocbreak(); while(true) { showCommand(false); - say((char *)"line no to replace, A to add, enter to return"); + say((char *)"line no. to replace, A to add, enter to return"); prompt(false); mvgetstr(row-1,2,sp); if (!strlen(sp)) goto done; @@ -462,8 +483,14 @@ const char *befehlJetzt = cmdNames[commandsNow[cmdNow]]; } // run / execute else { say((char *)"Press 'Y' to confirm"); + prompt(false); + mvgetstr(row-1,2,sp); + if (sp[0] == 'Y') return false; + } + return true; + }; void mdCommander::check(bool run) { diff --git a/APIG/include/mdCommander.h b/APIG/include/mdCommander.h index 8c1d776..8cedcf6 100644 --- a/APIG/include/mdCommander.h +++ b/APIG/include/mdCommander.h @@ -13,7 +13,6 @@ class mdCommander { bool acceptingInput,deleted[MAX_CMDS]; - bool EPPmode; // RFC 9 int activeCommands, argsNow[MAX_CMDS], cmdNow, cmdsNow, mdStdDevIdx; int row,col, thisArg; int commandsNow[MAX_CMDS]; // type index into cmdNames