summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/win2mac.cpp43
-rw-r--r--src/net/win2mac.h1
2 files changed, 18 insertions, 26 deletions
diff --git a/src/net/win2mac.cpp b/src/net/win2mac.cpp
index be4bad1d..6ddc59cc 100644
--- a/src/net/win2mac.cpp
+++ b/src/net/win2mac.cpp
@@ -1,42 +1,35 @@
#include "win2mac.h"
-
-void dummy()
-{
-
-printf("hej\n");
-}
-
UInt32 DR_SwapFourBytes(UInt32 dw)
{
-UInt32 tmp;
-tmp = (dw & 0x000000FF);
-tmp = ((dw & 0x0000FF00) >> 0x08) | (tmp << 0x08);
-tmp = ((dw & 0x00FF0000) >> 0x10) | (tmp << 0x08);
-tmp = ((dw & 0xFF000000) >> 0x18) | (tmp << 0x08);
-return (tmp);
+ UInt32 tmp;
+ tmp = (dw & 0x000000FF);
+ tmp = ((dw & 0x0000FF00) >> 0x08) | (tmp << 0x08);
+ tmp = ((dw & 0x00FF0000) >> 0x10) | (tmp << 0x08);
+ tmp = ((dw & 0xFF000000) >> 0x18) | (tmp << 0x08);
+ return (tmp);
}
UInt16 DR_SwapTwoBytes(UInt16 w)
{
-UInt16 tmp;
-tmp = (w & 0x00FF);
-tmp = ((w & 0xFF00) >> 0x08) | (tmp << 0x08);
-return(tmp);
+ UInt16 tmp;
+ tmp = (w & 0x00FF);
+ tmp = ((w & 0xFF00) >> 0x08) | (tmp << 0x08);
+ return(tmp);
}
-
+
char* SwapChar(char charlist[])
{
-for(int i =0; i< 24/2; i++)
- SWAP(charlist[i],charlist[24-i]);
-return charlist;
+ for (int i = 0; i < 24 / 2; i++)
+ SWAP(charlist[i],charlist[24 - i]);
+ return charlist;
}
/*
char* SwapChar(char charlist[])
{
-for(int i =0; i< sizeof(charlist)*4/2; i++)
- SWAP(charlist[i],charlist[sizeof(charlist)*4-i]);
-return charlist;
+ for (int i = 0; i < sizeof(charlist) * 4 / 2; i++)
+ SWAP(charlist[i],charlist[sizeof(charlist) * 4 - i]);
+ return charlist;
}
-*/ \ No newline at end of file
+*/
diff --git a/src/net/win2mac.h b/src/net/win2mac.h
index 72ae9fd9..851a328a 100644
--- a/src/net/win2mac.h
+++ b/src/net/win2mac.h
@@ -8,7 +8,6 @@
#ifndef _MAC_H
#define _MAC_H
-void dummy();
UInt32 DR_SwapFourBytes(UInt32 dw);
UInt16 DR_SwapTwoBytes(UInt16 w);
char* SwapChar(char charlist[]);