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

[or-cvs] unbork windows line endings



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

Modified Files:
	fakepoll.c log.c log.h test.h util.c util.h 
Log Message:
unbork windows line endings

Index: fakepoll.c
===================================================================
RCS file: /home/or/cvsroot/src/common/fakepoll.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- fakepoll.c	12 Aug 2003 03:08:40 -0000	1.3
+++ fakepoll.c	12 Aug 2003 03:16:14 -0000	1.4
@@ -5,24 +5,24 @@
  *
  * Nick Mathewson <nickm@freehaven.net>
  */
-
+
 #include "orconfig.h"
-#ifdef USE_FAKE_POLL
-#include <sys/types.h>
+#ifdef USE_FAKE_POLL
+#include <sys/types.h>
 #ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include <unistd.h>
+#endif
 #ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#if _MSC_VER > 1300
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#elif defined(_MSC_VER)
-#include <winsock.h>
-#endif
-
-#include "fakepoll.h"
+#include <string.h>
+#endif
+#if _MSC_VER > 1300
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#elif defined(_MSC_VER)
+#include <winsock.h>
+#endif
+
+#include "fakepoll.h"
 #include "util.h"
 
 int

Index: log.c
===================================================================
RCS file: /home/or/cvsroot/src/common/log.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- log.c	12 Aug 2003 03:08:40 -0000	1.9
+++ log.c	12 Aug 2003 03:16:14 -0000	1.10
@@ -2,7 +2,7 @@
 /* See LICENSE for licensing information */
 /* $Id$ */
 
-#include "../or/or.h"
+#include "../or/or.h"
 #include "util.h"
 
 static const char *sev_to_string(int severity) {
@@ -30,7 +30,7 @@
   
   assert(format);
   if (severity > loglevel)
-    return;
+    return;
   my_gettimeofday(&now);
 
   t = time(NULL);

Index: log.h
===================================================================
RCS file: /home/or/cvsroot/src/common/log.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- log.h	12 Aug 2003 03:08:40 -0000	1.12
+++ log.h	12 Aug 2003 03:16:14 -0000	1.13
@@ -6,18 +6,18 @@
  */
 
 #ifndef __LOG_H
-
+
 #ifdef HAVE_SYSLOG_H
-#include <syslog.h>
-#else
-#define LOG_DEBUG   0
-#define LOG_INFO    1
-#define LOG_NOTICE  2
-#define LOG_WARNING 3
-#define LOG_ERR     4
-#define LOG_CRIT    5
-#define LOG_ALERT   6
-#define LOG_EMERG   7
+#include <syslog.h>
+#else
+#define LOG_DEBUG   0
+#define LOG_INFO    1
+#define LOG_NOTICE  2
+#define LOG_WARNING 3
+#define LOG_ERR     4
+#define LOG_CRIT    5
+#define LOG_ALERT   6
+#define LOG_EMERG   7
 #endif
 
 /* magic to make GCC check for proper format strings. */ 

Index: test.h
===================================================================
RCS file: /home/or/cvsroot/src/common/test.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- test.h	12 Aug 2003 03:08:40 -0000	1.6
+++ test.h	12 Aug 2003 03:16:14 -0000	1.7
@@ -9,12 +9,12 @@
 
 #define STMT_BEGIN  do {
 #define STMT_END    } while (0)
-
-#ifdef __GNUC__
-#define PRETTY_FUNCTION __PRETTY_FUNCTION__
-#else
-#define PRETTY_FUNCTION ""
-#endif
+
+#ifdef __GNUC__
+#define PRETTY_FUNCTION __PRETTY_FUNCTION__
+#else
+#define PRETTY_FUNCTION ""
+#endif
 
 #define test_fail()                                             \
   STMT_BEGIN                                                    \

Index: util.c
===================================================================
RCS file: /home/or/cvsroot/src/common/util.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- util.c	12 Aug 2003 03:08:40 -0000	1.8
+++ util.c	12 Aug 2003 03:16:14 -0000	1.9
@@ -1,25 +1,25 @@
 /* Copyright 2003 Roger Dingledine */
 /* See LICENSE for licensing information */
 /* $Id$ */
-
-#include "orconfig.h"
+
+#include "orconfig.h"
 
 #include <stdlib.h>
-#include <limits.h>
-#if _MSC_VER > 1300
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#elif defined(_MSC_VER)
-#include <winsock.h>
-#endif
-#ifdef HAVE_SYS_FCNTL_H
-#include <sys/fcntl.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#include "util.h"
+#include <limits.h>
+#if _MSC_VER > 1300
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#elif defined(_MSC_VER)
+#include <winsock.h>
+#endif
+#ifdef HAVE_SYS_FCNTL_H
+#include <sys/fcntl.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
+#include "util.h"
 #include "log.h"
 
 void *tor_malloc(size_t size) {
@@ -37,18 +37,18 @@
 
 void 
 my_gettimeofday(struct timeval *timeval) 
-{
+{
 #ifdef HAVE_GETTIMEOFDAY
   if (gettimeofday(timeval, NULL)) {
     log_fn(LOG_ERR, "gettimeofday failed.");
     /* If gettimeofday dies, we have either given a bad timezone (we didn't),
        or segfaulted.*/
     exit(1);
-  }
-#elif defined(HAVE_FTIME)
-  ftime(timeval);
-#else
-#error "No way to get time."
+  }
+#elif defined(HAVE_FTIME)
+  ftime(timeval);
+#else
+#error "No way to get time."
 #endif
   return;
 }
@@ -96,14 +96,14 @@
   a->tv_sec += ((ms * 1000) / 1000000) + (a->tv_usec / 1000000);
   a->tv_usec %= 1000000;
 }
-
-void set_socket_nonblocking(int socket)
-{
-#ifdef _MSC_VER
-	/* Yes means no and no means yes.  Do you not want to be nonblocking? */
-	int nonblocking = 0;
-	ioctlsocket(socket, FIONBIO, (unsigned long*) &nonblocking);
-#else
-	fcntl(socket, F_SETFL, O_NONBLOCK);
-#endif
-}
+
+void set_socket_nonblocking(int socket)
+{
+#ifdef _MSC_VER
+	/* Yes means no and no means yes.  Do you not want to be nonblocking? */
+	int nonblocking = 0;
+	ioctlsocket(socket, FIONBIO, (unsigned long*) &nonblocking);
+#else
+	fcntl(socket, F_SETFL, O_NONBLOCK);
+#endif
+}

Index: util.h
===================================================================
RCS file: /home/or/cvsroot/src/common/util.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- util.h	12 Aug 2003 03:08:40 -0000	1.3
+++ util.h	12 Aug 2003 03:16:14 -0000	1.4
@@ -4,32 +4,32 @@
 
 #ifndef __UTIL_H
 #define __UTIL_H
-
-#include "orconfig.h"
-
+
+#include "orconfig.h"
+
 #ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#ifndef HAVE_GETTIMEOFDAY
-#ifdef HAVE_FTIME 
-#include <sys/timeb.h>
-#define timeval timeb
-#define tv_sec time
-#define tv_usec millitm
-#endif
-#endif
-
-#ifdef _MSC_VER
-/* Windows names string functions funnily. */
-#define strncasecmp strnicmp
-#define strcasecmp stricmp
-#define INLINE __inline
-#else
-#define INLINE inline
-#endif
+#include <sys/time.h>
+#endif
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+#ifndef HAVE_GETTIMEOFDAY
+#ifdef HAVE_FTIME
+#include <sys/timeb.h>
+#define timeval timeb
+#define tv_sec time
+#define tv_usec millitm
+#endif
+#endif
+
+#ifdef _MSC_VER
+/* Windows names string functions funnily. */
+#define strncasecmp strnicmp
+#define strcasecmp stricmp
+#define INLINE __inline
+#else
+#define INLINE inline
+#endif
 
 void *tor_malloc(size_t size);
 
@@ -42,7 +42,7 @@
 void tv_addms(struct timeval *a, long ms);
 void tv_add(struct timeval *a, struct timeval *b);
 int tv_cmp(struct timeval *a, struct timeval *b);
-
-void set_socket_nonblocking(int socket);
+
+void set_socket_nonblocking(int socket);
 
 #endif