Browse Source

Rename -s parameter (host) to -h.

Now the short parameter is the first letter of the long parameter
which is much more natural.
Georgi Chorbadzhiyski 9 years ago
parent
commit
851545ad9f
3 changed files with 6 additions and 5 deletions
  1. 1
    0
      ChangeLog
  2. 1
    1
      README
  3. 4
    4
      videohubctrl.c

+ 1
- 0
ChangeLog View File

2
 xxxx-xx-xx : Version next
2
 xxxx-xx-xx : Version next
3
  * Rename -v / --verbose parameter to -d / --debug.
3
  * Rename -v / --verbose parameter to -d / --debug.
4
  * Rename -h parameter (help) to -H.
4
  * Rename -h parameter (help) to -H.
5
+ * Rename -s parameter (host) to -h.
5
 
6
 
6
 2014-11-27 : Version 0.2
7
 2014-11-27 : Version 0.2
7
  * Fix port routing. Previously it was reversed and incorrect.
8
  * Fix port routing. Previously it was reversed and incorrect.

+ 1
- 1
README View File

77
  Usage: videohubctrl --host <host> [..commands..]
77
  Usage: videohubctrl --host <host> [..commands..]
78
 
78
 
79
 Main options:
79
 Main options:
80
- -s --host <hostname>       | Set device hostname.
80
+ -h --host <hostname>       | Set device hostname.
81
  -p --port <port_number>    | Set device port (default: 9990).
81
  -p --port <port_number>    | Set device port (default: 9990).
82
 
82
 
83
 Misc options:
83
 Misc options:

+ 4
- 4
videohubctrl.c View File

31
 
31
 
32
 static const char *program_id = PROGRAM_NAME " Version: " VERSION " Git: " GIT_VER;
32
 static const char *program_id = PROGRAM_NAME " Version: " VERSION " Git: " GIT_VER;
33
 
33
 
34
-static const char short_options[] = "s:p:qdHVim";
34
+static const char short_options[] = "h:p:qdHVim";
35
 
35
 
36
 static const struct option long_options[] = {
36
 static const struct option long_options[] = {
37
-	{ "host",				required_argument, NULL, 's' },
37
+	{ "host",				required_argument, NULL, 'h' },
38
 	{ "port",				required_argument, NULL, 'p' },
38
 	{ "port",				required_argument, NULL, 'p' },
39
 	{ "quiet",				no_argument,       NULL, 'q' },
39
 	{ "quiet",				no_argument,       NULL, 'q' },
40
 	{ "debug",				no_argument,       NULL, 'd' },
40
 	{ "debug",				no_argument,       NULL, 'd' },
50
 	printf(" Usage: " PROGRAM_NAME " --host <host> [..commands..]\n");
50
 	printf(" Usage: " PROGRAM_NAME " --host <host> [..commands..]\n");
51
 	printf("\n");
51
 	printf("\n");
52
 	printf("Main options:\n");
52
 	printf("Main options:\n");
53
-	printf(" -s --host <hostname>       | Set device hostname.\n");
53
+	printf(" -h --host <hostname>       | Set device hostname.\n");
54
 	printf(" -p --port <port_number>    | Set device port (default: 9990).\n");
54
 	printf(" -p --port <port_number>    | Set device port (default: 9990).\n");
55
 	printf("\n");
55
 	printf("\n");
56
 	printf("Misc options:\n");
56
 	printf("Misc options:\n");
71
 	data->dev_port = "9990";
71
 	data->dev_port = "9990";
72
 	while ((j = getopt_long(argc, argv, short_options, long_options, NULL)) != -1) {
72
 	while ((j = getopt_long(argc, argv, short_options, long_options, NULL)) != -1) {
73
 		switch (j) {
73
 		switch (j) {
74
-			case 's': // --host
74
+			case 'h': // --host
75
 				data->dev_host = optarg;
75
 				data->dev_host = optarg;
76
 				break;
76
 				break;
77
 			case 'p': // --port
77
 			case 'p': // --port

Loading…
Cancel
Save