added command line parsing, restartability, and daemonizing to

client.  broke win32 stuff though.  also moved version and
copyright constants into a new file and renamed protocol
version constants.
This commit is contained in:
crs
2002-06-04 11:06:26 +00:00
parent e409c83ef9
commit c3649df304
7 changed files with 371 additions and 41 deletions

View File

@@ -6,14 +6,10 @@
#include "CThread.h"
#include "XThread.h"
#include "ProtocolTypes.h"
#include "Version.h"
#include "stdfstream.h"
#include <assert.h>
static const char* s_copyright = "Copyright (C) 2002 Chris Schoeneman";
static const SInt32 s_majorVersion = 0;
static const SInt32 s_minorVersion = 5;
static const char s_releaseVersion = ' ';
// configuration file name
#if defined(CONFIG_PLATFORM_WIN32)
#define CONFIG_NAME "synergy.sgc"
@@ -115,15 +111,15 @@ static void bye()
static void version()
{
log((CLOG_PRINT
"%s %d.%d%c protocol version %d.%d\n"
"%s %d.%d.%d, protocol version %d.%d\n"
"%s",
pname,
s_majorVersion,
s_minorVersion,
s_releaseVersion,
kMajorVersion,
kMinorVersion,
s_copyright));
kReleaseVersion,
kProtocolMajorVersion,
kProtocolMinorVersion,
kCopyright));
}
static void help()
@@ -335,6 +331,7 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int)
// load the configuration file if we haven't already
if (s_configFile == NULL) {
// FIXME
}
// FIXME
@@ -531,7 +528,6 @@ int main(int argc, char** argv)
}
catch (XBase& e) {
log((CLOG_CRIT "failed: %s", e.what()));
fprintf(stderr, "failed: %s\n", e.what());
return 16;
}
catch (XThread&) {