/****************************************************************************** * * Title : commandStatusMessage.c * Version 0.0, * * Description: Routine for handling commandListStatus messages. * Related files: hostControl.c + all command functions. * * Author: Lukas Tomasek, tomasekl@fzu.cz * ******************************************************************************/ /****************************************************************************** * Header files * ******************************************************************************/ #include "commandStatusMessage.h" #include "fileUtility.h" #include "errorHandler.h" #include "uirUtility.h" #include "mainUir.h" /****************************************************************************** * Global functions * ******************************************************************************/ /*============================================================================= * commandStatusMessage() *============================================================================= * * Prints command list status to file and to status box(in commandStatusUir.uir). * */ ERROR_ID commandStatusMessage(struct HOST *host, char commandStatusFileName[], char inputText[]){ int status; ERROR_ID errorId; int updateDisplay; /* write message to commandStatusFile */ errorId=writeToTextFile(commandStatusFileName, 1, inputText, strlen(inputText)); ERROR_CHECK(errorId, writeToTextFile()); if(errorId!=SUCCESS) return(errorId); /* print in the status box */ SetCtrlVal(host->panel.commandListStatus, CLISTP_STATUS_BOX, inputText); return(SUCCESS); } /******************************************************************************/