Remove trailing whitespace from debian/*.
[debian/iodine.git] / src / login.c
index a5cde37e242683e8b1ffceb8a4110d615c827ee3..a809998e6fec794cb7596f9ec8974125c0717781 100644 (file)
@@ -1,5 +1,6 @@
 /*
 /*
- * Copyright (c) 2006-2007 Bjorn Andersson <flex@kryo.se>, Erik Ekman <yarrick@kryo.se>
+ * Copyright (c) 2006-2014 Erik Ekman <yarrick@kryo.se>,
+ * 2006-2009 Bjorn Andersson <flex@kryo.se>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  */
 
 #include <string.h>
  */
 
 #include <string.h>
-#include <arpa/inet.h>
 #include <sys/types.h>
 
 #include <sys/types.h>
 
+#ifdef WINDOWS32
+#include "windows.h"
+#else
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#endif
+
 #include "md5.h"
 
 #include "md5.h"
 
-/* 
- * Needs a 16byte array for output, and 32 bytes password 
+/*
+ * Needs a 16byte array for output, and 32 bytes password
  */
  */
-void 
-login_calculate(char *buf, int buflen, char *pass, int seed) 
+void
+login_calculate(char *buf, int buflen, const char *pass, int seed)
 {
        unsigned char temp[32];
        md5_state_t ctx;
 {
        unsigned char temp[32];
        md5_state_t ctx;
@@ -32,7 +39,7 @@ login_calculate(char *buf, int buflen, char *pass, int seed)
        int i;
        int k;
 
        int i;
        int k;
 
-       if (buflen < 16) 
+       if (buflen < 16)
                return;
 
        memcpy(temp, pass, 32);
                return;
 
        memcpy(temp, pass, 32);