]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/TianoTools/CompressDll/CompressDll.c
Refine the code for PCD tools.
[mirror_edk2.git] / Tools / Source / TianoTools / CompressDll / CompressDll.c
index 783587f6540c09fdf37d13dfa39aae7d13a7303a..cc06f26c0563e4ed1a005cab3dccbaf5fd16aff5 100644 (file)
@@ -1,3 +1,19 @@
+/** @file\r
+  Compression DLL used by PCD Tools\r
+\r
+  Copyright (c) 2006, Intel Corporation   All rights reserved.\r
+  This program and the accompanying materials are licensed and made available \r
+  under the terms and conditions of the BSD License which accompanies this \r
+  distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+#if defined(__GNUC__)\r
+typedef long long __int64;/*For cygwin build*/\r
+#endif\r
 #include "CompressDll.h"\r
 #include "EfiCompress.h"\r
 \r
@@ -32,14 +48,14 @@ JNIEXPORT jbyteArray JNICALL  Java_org_tianocore_framework_tasks_Compress_CallCo
    //\r
 \r
    Result = Compress (\r
-                         (char*) InputBuffer, \r
-                         SourceSize,  \r
-                         DestBuffer,\r
-                         &DestSize\r
-                         );\r
+        (char*) InputBuffer, \r
+        SourceSize,  \r
+        DestBuffer,\r
+        &DestSize\r
+        );\r
 \r
    if (Result = EFI_BUFFER_TOO_SMALL) {\r
-          DestBuffer = malloc (DestSize);\r
+     DestBuffer = malloc (DestSize);\r
    }\r
 \r
    //\r
@@ -47,10 +63,10 @@ JNIEXPORT jbyteArray JNICALL  Java_org_tianocore_framework_tasks_Compress_CallCo
    //\r
    Result = Compress(\r
               (char*) InputBuffer, \r
-                         SourceSize,  \r
-                         DestBuffer,\r
-                         &DestSize  \r
-          );\r
+        SourceSize,  \r
+        DestBuffer,\r
+        &DestSize  \r
+     );\r
 \r
    //\r
    // new a MV array to store the return compressed buffer\r
@@ -80,7 +96,7 @@ DllMainCRTStartup(
     void*   Reserved    \r
 )\r
 {\r
-       return TRUE;\r
+  return TRUE;\r
 }\r
 #else\r
 #ifdef __GNUC__\r