// // FADctrl // #include #include #include #include "FAD.h" using namespace std; const string READLINE_HIST_FILE = string(getenv("HOME"))+"/.history_FADctrl"; // ================ // Main program // ================ int main(int argc, char *argv[]) { std::vector List; // Board list from command line? for (int i=1; i "); // Check for interruption by signal if (Command == NULL) continue; // Add command to history if(strlen(Command) > 0 && LastHist != Command) { add_history(Command); LastHist = Command; } // Process command (use SendCommandNB(), see mail from C. Gaspar 18/2/2011) DimClient::sendCommandNB(SERVER_NAME"/Command", Command); free(Command); } // Save history buffer int Ret = write_history(READLINE_HIST_FILE.c_str()); if (Ret != 0 ) printf("Error writing history file to '%s' (%s)\n", READLINE_HIST_FILE.c_str(), strerror(Ret)); }