summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-27 13:01:28 -0400
committerJune McEnroe <june@causal.agency>2018-08-27 13:01:28 -0400
commit9d60fb33e9163f052ce942d3991bdbb9475de61b (patch)
treedca2ea4320a8ad2bb33cf8c47139fb07f0bd3ef7 /client.c
parentMap modifyCount on log scale (diff)
downloadtorus-9d60fb33e9163f052ce942d3991bdbb9475de61b.tar.gz
torus-9d60fb33e9163f052ce942d3991bdbb9475de61b.zip
Dump HELP_DATA with client -h
Diffstat (limited to 'client.c')
-rw-r--r--client.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/client.c b/client.c
index 1478ebe..66e6d08 100644
--- a/client.c
+++ b/client.c
@@ -667,7 +667,17 @@ static void readInput(void) {
 	}
 }
 
-int main() {
+int main(int argc, char *argv[]) {
+	int opt;
+	while (0 < (opt = getopt(argc, argv, "h"))) {
+		if (opt == 'h') {
+			fwrite(HELP_DATA, sizeof(HELP_DATA), 1, stdout);
+			return EX_OK;
+		} else {
+			return EX_USAGE;
+		}
+	}
+
 	curse();
 	modeHelp();
 	readInput();
after movementJune McEnroe 2017-09-03Relicense AGPLJune McEnroe I know it's already published under a permissive license in what is probably its final form, but I want to license it AGPL anyway on principle following some conversations I had about open source, corporations and copyleft. 2017-09-01Revert "Add client readOnly mode"June McEnroe This reverts commit 9a6c9c91c8092603b914cc0b3085d059e162ca29. 2017-09-01Remove clientRemove call from clientCastJune McEnroe If an error occurs on a client socket during a broadcast, that client will show up in the kqueue loop with EV_EOF and get removed that way. Tested by sending SIGKILL to a client and watching its cursor disappear. 2017-09-01Add client readOnly modeJune McEnroe 2017-08-31Clean up merge toolJune McEnroe Choose the version with the most recent access if the modify times are the same. 2017-08-31Choose B for tiles with equal modify timesJune McEnroe This way newer access counts and times will be preserved. 2017-08-31Add quick data file merge toolJune McEnroe Hopefully I won't have to use it ever again. 2017-08-30Use only foreground color for selecting spawnJune McEnroe 2017-08-29Add four additional spawnsJune McEnroe 2017-08-28Add respawningJune McEnroe 2017-08-26Move license above includesJune McEnroe Why was it down there? 2017-08-26Snapshot metadataJune McEnroe 2017-08-26Add meta.c to READMEJune McEnroe 2017-08-26Use MakefileJune McEnroe