Fixed newline characters throughout the code
[com/gs-lite.git] / src / lib / gscphostaux / byteswap.c
index 82294ca..af016fc 100644 (file)
@@ -1,40 +1,40 @@
-/* ------------------------------------------------\r
- Copyright 2014 AT&T Intellectual Property\r
- Licensed under the Apache License, Version 2.0 (the "License");\r
- you may not use this file except in compliance with the License.\r
- You may obtain a copy of the License at\r
\r
- http://www.apache.org/licenses/LICENSE-2.0\r
\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
- ------------------------------------------- */\r
-#include "gsconfig.h"\r
-#include "gstypes.h"\r
-\r
-gs_uint16_t gscpbswap16(gs_uint16_t x){\r
-    return ((x << 8) & 0xff00) | ((x >> 8) & 0x00ff);\r
-}\r
-\r
-gs_uint32_t gscpbswap32(gs_uint32_t x ) {\r
-    return     ((x << 24) & 0xff000000 ) |\r
-       ((x <<  8) & 0x00ff0000 ) |\r
-       ((x >>  8) & 0x0000ff00 ) |\r
-       ((x >> 24) & 0x000000ff );\r
-}\r
-\r
-\r
-gs_uint64_t gscpbswap64(gs_uint64_t x) {\r
-    gs_uint64_t t1;\r
-    gs_uint64_t t2;\r
-    t1=x>>32;\r
-    t1 = gscpbswap32(t1);\r
-    t2=x & 0xffffffff;\r
-    t2 = gscpbswap32(t2);\r
-    x = t2<<32;\r
-    x = x|t1;\r
-    return x;\r
-}\r
+/* ------------------------------------------------
+ Copyright 2014 AT&T Intellectual Property
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ------------------------------------------- */
+#include "gsconfig.h"
+#include "gstypes.h"
+
+gs_uint16_t gscpbswap16(gs_uint16_t x){
+    return ((x << 8) & 0xff00) | ((x >> 8) & 0x00ff);
+}
+
+gs_uint32_t gscpbswap32(gs_uint32_t x ) {
+    return     ((x << 24) & 0xff000000 ) |
+       ((x <<  8) & 0x00ff0000 ) |
+       ((x >>  8) & 0x0000ff00 ) |
+       ((x >> 24) & 0x000000ff );
+}
+
+
+gs_uint64_t gscpbswap64(gs_uint64_t x) {
+    gs_uint64_t t1;
+    gs_uint64_t t2;
+    t1=x>>32;
+    t1 = gscpbswap32(t1);
+    t2=x & 0xffffffff;
+    t2 = gscpbswap32(t2);
+    x = t2<<32;
+    x = x|t1;
+    return x;
+}