aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/util.cpp b/src/util.cpp
index dc95441..e6f0902 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1,11 +1,6 @@
-#include <cstddef>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include <string>
-#include <sys/timeb.h>
-#include <time.h>
-
+// Author Name: Matt Strapp
+// Date: 25 April 2022
+// x500: strap012
#include "util.hpp"
#define VALID_CHARACTERS \
@@ -234,7 +229,7 @@ void Log(const char *format, ...) {
}
// convert buf[0:3] to int
-void buf2i(BYTE *buf, int &i) {
+void BigEndianToLittle(BYTE *buf, int &i) {
// No way to avoid Segmentation fault. Some bytes may be 0
i = 0;
i += buf[3];
@@ -244,7 +239,7 @@ void buf2i(BYTE *buf, int &i) {
}
// convert int to buf[4] where buf[0] contains MSB's and buf[3] contains LSB's
-void i2buf(int &i, BYTE *buf) {
+void LittleEndianToBig(int &i, BYTE *buf) {
// No way to avoid Segmentation fault. Some bytes may be 0
buf[0] = (BYTE)((i & 0xFF000000) >> 24);
buf[1] = (BYTE)((i & 0x00FF0000) >> 16);