[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Clean windows whitespace



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv12115/src/or

Modified Files:
	config.c 
Log Message:
Clean windows whitespace

Index: config.c
===================================================================
RCS file: /home/or/cvsroot/src/or/config.c,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- config.c	18 Aug 2004 03:42:55 -0000	1.144
+++ config.c	18 Aug 2004 03:47:55 -0000	1.145
@@ -9,9 +9,9 @@
  *
  **/
 
-#include "or.h"
-#ifdef MS_WINDOWS
-#include <shlobj.h>
+#include "or.h"
+#ifdef MS_WINDOWS
+#include <shlobj.h>
 #endif
 
 /** Enumeration of types which option values can take */
@@ -581,21 +581,21 @@
   options->RendConfigLines = NULL;
   options->FirewallPorts = NULL;
 }
-
-static char *get_default_conf_file(void)
-{
-#ifdef MS_WINDOWS
-  char *path = tor_malloc(MAX_PATH);
-  if (!SUCCEEDED(SHGetSpecialFolderPath(NULL, path, CSIDL_APPDATA, 1))) {
-    tor_free(path);
-	return NULL;
-  }
-  strlcat(path,"\\tor\\torrc",MAX_PATH);
-  return path;
-#else
-  return tor_strdup(CONF_DIR "/torrc");
-#endif
-}
+
+static char *get_default_conf_file(void)
+{
+#ifdef MS_WINDOWS
+  char *path = tor_malloc(MAX_PATH);
+  if (!SUCCEEDED(SHGetSpecialFolderPath(NULL, path, CSIDL_APPDATA, 1))) {
+    tor_free(path);
+    return NULL;
+  }
+  strlcat(path,"\\tor\\torrc",MAX_PATH);
+  return path;
+#else
+  return tor_strdup(CONF_DIR "/torrc");
+#endif
+}
 
 /** Read a configuration file into <b>options</b>, finding the configuration
  * file location based on the command line.  After loading the options,
@@ -649,23 +649,23 @@
   if(i < argc-1) { /* we found one */
     fname = tor_strdup(argv[i+1]);
     using_default_torrc = 0;
-  } else {
-    /* didn't find one, try CONFDIR */
-	char *fn;
-	using_default_torrc = 1;
-	fn = get_default_conf_file();
-    if (fn && file_status(fn)==FN_FILE) {
-       fname = fn;
-	} else {
-	   tor_free(fn);
-       fn = expand_filename("~/.torrc");
-       if (fn && file_status(fn)==FN_FILE) {
-         fname = fn;
-	   } else {
-         tor_free(fn);
-		 fname = get_default_conf_file();
-	   }
-	}
+  } else {
+    /* didn't find one, try CONFDIR */
+    char *fn;
+    using_default_torrc = 1;
+    fn = get_default_conf_file();
+    if (fn && file_status(fn)==FN_FILE) {
+      fname = fn;
+    } else {
+      tor_free(fn);
+      fn = expand_filename("~/.torrc");
+      if (fn && file_status(fn)==FN_FILE) {
+        fname = fn;
+      } else {
+        tor_free(fn);
+        fname = get_default_conf_file();
+      }
+    }
   }
   log(LOG_DEBUG,"Opening config file '%s'",fname);
 
@@ -1037,18 +1037,18 @@
   const char *d;
   if (options->DataDirectory)
     d = options->DataDirectory;
-  else if (server_mode()) {
-#ifdef MS_WINDOWS
-    char *p;
-	p = tor_malloc(MAX_PATH);
-    if (!SUCCEEDED(SHGetSpecialFolderPath(NULL, p, CSIDL_APPDATA, 1))) {
-      strlcpy(p,CONFDIR, MAX_PATH);
-	}
-    strlcat(p,"\\tor",MAX_PATH);
-    options->DataDirectory = p;
-	return p;
+  else if (server_mode()) {
+#ifdef MS_WINDOWS
+    char *p;
+    p = tor_malloc(MAX_PATH);
+    if (!SUCCEEDED(SHGetSpecialFolderPath(NULL, p, CSIDL_APPDATA, 1))) {
+      strlcpy(p,CONFDIR, MAX_PATH);
+    }
+    strlcat(p,"\\tor",MAX_PATH);
+    options->DataDirectory = p;
+    return p;
 #else
-    d = "~/.tor";
+    d = "~/.tor";
 #endif
   } else
     d = NULL; /* XXX008 don't create datadir until we have something