about summary refs log tree commit diff homepage
path: root/client.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-24 22:31:14 -0400
committerJune McEnroe <june@causal.agency>2018-08-24 22:31:14 -0400
commit9b9201f5f2e9e57672112ad868233a9bc72c3cef (patch)
treedb251a219f0714e883bd7ae6688be95dad5034c9 /client.c
parentAlways interpret space as space (diff)
downloadtorus-9b9201f5f2e9e57672112ad868233a9bc72c3cef.tar.gz
torus-9b9201f5f2e9e57672112ad868233a9bc72c3cef.zip
Fill in the help page
Also display it before connecting to the socket.
Diffstat (limited to 'client.c')
-rw-r--r--client.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/client.c b/client.c
index 6ba1cf6..bdc77b0 100644
--- a/client.c
+++ b/client.c
@@ -487,6 +487,10 @@ static void readInput(void) {
 }
 
 int main() {
+	curse();
+	modeHelp();
+	readInput();
+
 	client = socket(PF_LOCAL, SOCK_STREAM, 0);
 	if (client < 0) err(EX_OSERR, "socket");
 
@@ -497,11 +501,6 @@ int main() {
 	int error = connect(client, (struct sockaddr *)&addr, sizeof(addr));
 	if (error) err(EX_NOINPUT, "torus.sock");
 
-	curse();
-
-	modeHelp();
-	readInput();
-
 	struct pollfd fds[2] = {
 		{ .fd = STDIN_FILENO, .events = POLLIN },
 		{ .fd = client, .events = POLLIN },