From 7d5e77911871386f45700109e31bfa504da4a9ac Mon Sep 17 00:00:00 2001
From: DarkmatterVale <valetolpegin@gmail.com>
Date: Wed, 30 Dec 2015 09:47:12 +0000
Subject: [PATCH 1/2] Add help option to RemoteDesktop
---
src/apps/remotedesktop/RemoteDesktop.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/apps/remotedesktop/RemoteDesktop.cpp b/src/apps/remotedesktop/RemoteDesktop.cpp
index 2e48f26..da08c40 100644
a
|
b
|
print_usage(const char *app)
|
28 | 28 | printf("usage:\t%s --listenOnly [-p <listenPort>]\n", app); |
29 | 29 | printf("\t%s <user@host> [-p <listenPort>] [-s <sshPort>] [-c <command>]\n", |
30 | 30 | app); |
| 31 | printf("\t%s --help\n\n", app); |
| 32 | |
| 33 | printf("Connect to & run applications from a different computer\n\n"); |
| 34 | printf("Arguments available for use:\n\n"); |
| 35 | printf("\t-p\t\tspecify the port to communicate on\n"); |
| 36 | printf("\t-c\t\tsend a command to the other computer\n"); |
| 37 | printf("\t-s\t\tuse ssh & specify the ssh port to communicate on\n"); |
31 | 38 | } |
32 | 39 | |
33 | 40 | |
34 | 41 | int |
35 | 42 | main(int argc, char *argv[]) |
36 | 43 | { |
37 | | if (argc < 2) { |
| 44 | if (argc < 2 || strcmp(argv[1], "--help") == 0) { |
38 | 45 | print_usage(argv[0]); |
39 | 46 | return 1; |
40 | 47 | } |