From: Matthew Fernandez Date: Sun, 5 Jul 2020 23:59:36 +0000 (-0700) Subject: remove unused vmwalk API X-Git-Tag: 2.46.0~20^2^2~193^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=34830836f4753e590685f5ce1f95ff9624bda4ad;p=graphviz remove unused vmwalk API --- diff --git a/lib/vmalloc/CMakeLists.txt b/lib/vmalloc/CMakeLists.txt index 3f3956013..1146aa207 100644 --- a/lib/vmalloc/CMakeLists.txt +++ b/lib/vmalloc/CMakeLists.txt @@ -13,5 +13,4 @@ add_library(vmalloc STATIC vmopen.c vmprivate.c vmstrdup.c - vmwalk.c ) diff --git a/lib/vmalloc/Makefile.am b/lib/vmalloc/Makefile.am index 662b56be7..bb7456424 100644 --- a/lib/vmalloc/Makefile.am +++ b/lib/vmalloc/Makefile.am @@ -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* diff --git a/lib/vmalloc/vmalloc.h b/lib/vmalloc/vmalloc.h index 63b89fa98..a133973fd 100644 --- a/lib/vmalloc/vmalloc.h +++ b/lib/vmalloc/vmalloc.h @@ -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 *); diff --git a/lib/vmalloc/vmalloc.vcxproj b/lib/vmalloc/vmalloc.vcxproj index 4cc0839bb..c091d0f66 100644 --- a/lib/vmalloc/vmalloc.vcxproj +++ b/lib/vmalloc/vmalloc.vcxproj @@ -103,7 +103,6 @@ - diff --git a/lib/vmalloc/vmalloc.vcxproj.filters b/lib/vmalloc/vmalloc.vcxproj.filters index abe067236..917fab930 100644 --- a/lib/vmalloc/vmalloc.vcxproj.filters +++ b/lib/vmalloc/vmalloc.vcxproj.filters @@ -44,8 +44,5 @@ Source Files - - Source Files - \ No newline at end of file diff --git a/lib/vmalloc/vmwalk.c b/lib/vmalloc/vmwalk.c deleted file mode 100644 index 54b0ace89..000000000 --- a/lib/vmalloc/vmwalk.c +++ /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; -}