[HHPCOMP] Fix 2 MSVC C4101 warnings (#2392)
[reactos.git] / sdk / tools / hhpcomp / chmc / chmc.c
index a131ae1..9c0e021 100644 (file)
 #include <string.h>
 #include <assert.h>
 
-#if defined(_WIN32) || defined(__APPLE__)
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include "../../port/port.h"
+
+#ifdef _WIN32
+    #include <io.h>
 #else
-#include <unistd.h>
+    #include <unistd.h>
 #endif
 
 #include "err.h"
@@ -100,6 +103,15 @@ int chmc_pmgi_add_entry(struct chmcFile *chm, const char *name, int pmgl_id);
 void chmc_pmgi_add(struct chmcFile *chm, struct chmcPmgiChunkNode *pmgi);
 void chmc_string_init(struct chmcStringChunk *node);
 
+#ifdef __REACTOS__
+int chmc_uncompressed_done(struct chmcFile *chm);
+int chmc_pmgi_done(struct chmcFile *chm);
+int chmc_write(struct chmcFile *chm);
+int chmc_appendfile(struct chmcFile *chm, const char *filename, void *buf,
+                size_t size );
+int chmc_pmgl_add_entry(struct chmcFile *chm, struct chmcTreeNode *entry);
+#endif /* __REACTOS__ */
+
 struct chmcLzxInfo
 {
        struct chmcFile *chm;
@@ -656,7 +668,9 @@ int chmc_system_done(struct chmcFile *chm)
        sysp = malloc(16384);
        if (sysp) {
                UInt32 val;
+#ifndef __REACTOS__
                UInt16 code, len;
+#endif
                const char *entry_val;
 
                p = chmc_syscat_mem(sysp, &system->version, sizeof(system->version));