char* programName;
-static void usage()
+static void printVersion(FILE *fp)
{
- fprintf(stderr, "TightVNC Server version %s, built %s\n\n",
+ fprintf(fp, "TightVNC Server version %s, built %s\n",
VERSION, buildtime);
- fprintf(stderr, "Usage: %s [<parameters>]\n", programName);
+}
+
+static void usage()
+{
+ printVersion(stderr);
+ fprintf(stderr, "\nUsage: %s [<parameters>]\n", programName);
+ fprintf(stderr, " %s --version\n", programName);
fprintf(stderr,"\n"
"Parameters can be turned on with -<param> or off with -<param>=0\n"
"Parameters which take a value can be specified as "
continue;
}
}
+ if (strcmp(argv[i], "-v") == 0 ||
+ strcmp(argv[i], "-version") == 0 ||
+ strcmp(argv[i], "--version") == 0) {
+ printVersion(stdout);
+ return 0;
+ }
usage();
}
-.TH X0VNCSERVER 1 "May 30, 2008" "TightVNC" "TightVNC Manual"
+.TH X0VNCSERVER 1 "Jun 04, 2008" "TightVNC" "TightVNC Manual"
.SH NAME
x0vncserver \- TightVNC Server for real X displays
.SH SYNOPSIS
.B x0vncserver
.RI [ options ]
+.br
+.B x0vncserver -version
.SH DESCRIPTION
.B x0vncserver
is a TightVNC Server which makes any X display remotely accessible via VNC,