Browse Source

Remove references to malloc.h closes #28

nemerle 7 years ago
parent
commit
29efcd5be1
3 changed files with 4 additions and 8 deletions
  1. 0 2
      src/control.cpp
  2. 1 2
      tools/makedsig/makedsig.cpp
  3. 3 4
      tools/parsehdr/parsehdr.cpp

+ 0 - 2
src/control.cpp

@@ -12,8 +12,6 @@
 #include <cassert>
 #include <stdio.h>
 #include <string.h>
-#include <malloc.h>
-
 
 typedef std::list<int> nodeList; /* dfsLast index to the node */
 

+ 1 - 2
tools/makedsig/makedsig.cpp

@@ -10,7 +10,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <malloc.h>
 #include <memory.h>
 #include <string.h>
 #include <algorithm>
@@ -22,7 +21,7 @@
 
 void saveFile(FILE *fl, const PerfectHash &p_hash, PatternCollector *coll);		/* Save the info */
 
-int	 numKeys;				/* Number of useful codeview symbols */
+static int	 numKeys;				/* Number of useful codeview symbols */
 
 
 static void printUsage(bool longusage) {

+ 3 - 4
tools/parsehdr/parsehdr.cpp

@@ -5,14 +5,13 @@
 /* Descended from xansi; thanks Geoff! thanks Glenn! */
 
 #include "parsehdr.h"
-#include <malloc.h> /* For debugging */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <algorithm>
 
-dword userval;
-
+static dword userval;
+namespace {
 /* the IGNORE byte */
 byte slosh;
 byte last_slosh;
@@ -51,7 +50,7 @@ PH_ARG_STRUCT *pArg; /* Pointer to the arguements array */
 int numArg;          /* How many elements saved so far */
 int allocArg;        /* How many elements allocated so far */
 int headArg;         /* Head of the arguements linked list */
-
+}
 // DO Callback
 boolT phDoCB(int id, char *data) {
   /*	return callback(hDCX, id, data, userval);*/