Important Update:

- Added SignalCore for handling system signals
- Implemented LogMessages (only output to stdout, later to logfile)
- Updated #defines for all header files
This commit is contained in:
Charl Wentzel
2016-05-17 12:24:51 +02:00
parent eb0ab67499
commit f987ea2224
9 changed files with 192 additions and 18 deletions

View File

@@ -13,10 +13,31 @@
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
//---------------------------------------------------------------------------
// Global vars
char ProcessName[20] = "Connect";
//---------------------------------------------------------------------------
bool LogMessage( const char * Heading, const char *Message )
{
// Validate values
if (!Message)
return false;
// Show normal output
if (!Heading) {
printf( "%s\n", Message );
}
else {
printf( "%s: %s\n", Heading, Message );
}
return true;
}
//---------------------------------------------------------------------------
bool ShowOutput( const char * Heading, const short Show, const char * Buffer, int Len )
{
// Validate values
@@ -60,4 +81,3 @@ bool ShowOutput( const char * Heading, const short Show, const char * Buffer, in
return true;
}
//---------------------------------------------------------------------------