repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 7f4316aca7c9ac00e424c3ff65d628ec3c49aa4d:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 7f4316aca7c9ac00e424c3ff65d628ec3c49aa4d
Author: Marc Lehmann 
Date:   Sun Nov 18 00:21:34 2007 +0000

    streamline the protocol a bit

diff --git a/src/rxvtc.C b/src/rxvtc.C
index 92095707c50b97f66168be6110db9da3e139135b..
index ..4660a750d2096275d2f4b0b7bfbcc30d5eab299b 100644
--- a/src/rxvtc.C
+++ b/src/rxvtc.C
@@ -77,7 +77,17 @@ extern char **environ;
 int
 main (int argc, const char *const *argv)
 {
+  // instead of getcwd we could opendir (".") and pass the fd for fchdir *g*
+  char cwd[PATH_MAX];
+
+  if (!getcwd (cwd, sizeof (cwd)))
+    {
+      perror ("unable to determine current working directory");
+      exit (STATUS_FAILURE);
+    }
+
   client c;
+
   {
     sigset_t ss;

@@ -88,16 +98,6 @@ main (int argc, const char *const *argv)
   }

   c.send ("NEW");
-
-  // instead of getcwd we could opendir (".") and pass the fd for fchdir *g*
-  char cwd[PATH_MAX];
-
-  if (!getcwd (cwd, sizeof (cwd)))
-    {
-      perror ("unable to determine current working directory");
-      exit (STATUS_FAILURE);
-    }
-
   c.send ("CWD"), c.send (cwd);

   for (char **var = environ; *var; var++)

-----END OF PAGE-----