]> granicus.if.org Git - graphviz/commitdiff
remove unused vmwalk API
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 5 Jul 2020 23:59:36 +0000 (16:59 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 6 Jul 2020 00:15:35 +0000 (17:15 -0700)
lib/vmalloc/CMakeLists.txt
lib/vmalloc/Makefile.am
lib/vmalloc/vmalloc.h
lib/vmalloc/vmalloc.vcxproj
lib/vmalloc/vmalloc.vcxproj.filters
lib/vmalloc/vmwalk.c [deleted file]

index 3f39560134efdfe301dc8bbeb0452d419d759d2e..1146aa20736c3e872114d463c3cd101a21659b04 100644 (file)
@@ -13,5 +13,4 @@ add_library(vmalloc STATIC
     vmopen.c
     vmprivate.c
     vmstrdup.c
-    vmwalk.c
 )
index 662b56be7b9a33cf9f278450a2dd3fff6e389d69..bb7456424be4a3017353ec265bf10e7c363f2ea5 100644 (file)
@@ -6,7 +6,6 @@ noinst_LTLIBRARIES = libvmalloc_C.la
 
 libvmalloc_C_la_SOURCES = vmbest.c vmclear.c vmclose.c vmdcheap.c \
        vmopen.c vmprivate.c \
-       vmstrdup.c \
-       vmwalk.c
+       vmstrdup.c
 
 EXTRA_DIST = README vmalloc.vcxproj*
index 63b89fa98d507df8d77d7d4d9aec6824e1ab96b1..a133973fd3354bb5ed08a1519d4babe1eb5daa13 100644 (file)
@@ -117,9 +117,6 @@ extern "C" {
 
     extern long vmaddr(Vmalloc_t *, void *);
 
-    extern int vmwalk(Vmalloc_t *,
-                            int (*)(Vmalloc_t *, void *, size_t,
-                                    Vmdisc_t *));
     extern char *vmstrdup(Vmalloc_t *, const char *);
 
 
index 4cc0839bb0f658b5a2e599b9835944377ce02696..c091d0f66d0049014e8c7ddbe3ec12b1e3288d32 100644 (file)
     <ClCompile Include="vmopen.c" />
     <ClCompile Include="vmprivate.c" />
     <ClCompile Include="vmstrdup.c" />
-    <ClCompile Include="vmwalk.c" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
index abe0672360fe2531a3371d9a1620ce84357ab8fb..917fab930094193bb318952d1719afb94aefa159 100644 (file)
@@ -44,8 +44,5 @@
     <ClCompile Include="vmstrdup.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="vmwalk.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/lib/vmalloc/vmwalk.c b/lib/vmalloc/vmwalk.c
deleted file mode 100644 (file)
index 54b0ace..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/* $Id$ $Revision$ */
-/* vim:set shiftwidth=4 ts=8: */
-
-/*************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property 
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************/
-
-#include       "vmhdr.h"
-
-/*     Walks all segments created in region(s)
-**
-**     Written by Kiem-Phong Vo, kpv@research.att.com (02/08/96)
-*/
-
-int vmwalk(Vmalloc_t * vm,
-          int (*segf) (Vmalloc_t *, void *, size_t, Vmdisc_t *))
-{
-    reg Seg_t *seg;
-    reg int rv;
-
-    if (!vm) {
-       for (vm = Vmheap; vm; vm = vm->next) {
-           if (!(vm->data->mode & VM_TRUST) && ISLOCK(vm->data, 0))
-               continue;
-
-           SETLOCK(vm->data, 0);
-           for (seg = vm->data->seg; seg; seg = seg->next) {
-               rv = (*segf) (vm, seg->addr, seg->extent, vm->disc);
-               if (rv < 0)
-                   return rv;
-           }
-           CLRLOCK(vm->data, 0);
-       }
-    } else {
-       if (!(vm->data->mode & VM_TRUST) && ISLOCK(vm->data, 0))
-           return -1;
-
-       SETLOCK(vm->data, 0);
-       for (seg = vm->data->seg; seg; seg = seg->next) {
-           rv = (*segf) (vm, seg->addr, seg->extent, vm->disc);
-           if (rv < 0)
-               return rv;
-       }
-       CLRLOCK(vm->data, 0);
-    }
-
-    return 0;
-}