From bd20450baf9e4e2497fae65e66ecb672445c143b Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 28 Aug 2020 07:12:19 -0700 Subject: [PATCH] remove unused sfdcslow() --- lib/sfio/Sfio_dc/Makefile.am | 2 +- lib/sfio/Sfio_dc/sfdcslow.c | 61 ------------------------------------ lib/sfio/Sfio_dc/sfdisc.h | 1 - 3 files changed, 1 insertion(+), 63 deletions(-) delete mode 100644 lib/sfio/Sfio_dc/sfdcslow.c diff --git a/lib/sfio/Sfio_dc/Makefile.am b/lib/sfio/Sfio_dc/Makefile.am index 5ca2869b6..809221a9c 100644 --- a/lib/sfio/Sfio_dc/Makefile.am +++ b/lib/sfio/Sfio_dc/Makefile.am @@ -7,7 +7,7 @@ noinst_HEADERS = sfdchdr.h sfdisc.h noinst_LTLIBRARIES = libsfiodc_C.la libsfiodc_C_la_SOURCES = sfdcdos.c sfdcfilter.c sfdclzw.c \ - sfdcslow.c sfdcsubstream.c sfdctee.c sfdcunion.c + sfdcsubstream.c sfdctee.c sfdcunion.c ${top_builddir}/FEATURE/sfio: ${top_srcdir}/lib/sfio/features/sfio mkdir -p ${top_builddir}/FEATURE diff --git a/lib/sfio/Sfio_dc/sfdcslow.c b/lib/sfio/Sfio_dc/sfdcslow.c deleted file mode 100644 index a8774458c..000000000 --- a/lib/sfio/Sfio_dc/sfdcslow.c +++ /dev/null @@ -1,61 +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 - -/* Make a stream op return immediately on interrupts. -** This is useful on slow streams (hence the name). -** -** Written by Glenn Fowler (03/18/1998). -*/ - -static int slowexcept(Sfio_t * f, int type, void * v, Sfdisc_t * disc) -{ - NOTUSED(f); - NOTUSED(v); - NOTUSED(disc); - - switch (type) { - case SF_FINAL: - case SF_DPOP: - free(disc); - break; - case SF_READ: - case SF_WRITE: - if (errno == EINTR) - return (-1); - break; - } - - return (0); -} - -int sfdcslow(Sfio_t * f) -{ - Sfdisc_t *disc; - - if (!(disc = (Sfdisc_t *) malloc(sizeof(Sfdisc_t)))) - return (-1); - - disc->readf = NIL(Sfread_f); - disc->writef = NIL(Sfwrite_f); - disc->seekf = NIL(Sfseek_f); - disc->exceptf = slowexcept; - - if (sfdisc(f, disc) != disc) { - free(disc); - return (-1); - } - - return (0); -} diff --git a/lib/sfio/Sfio_dc/sfdisc.h b/lib/sfio/Sfio_dc/sfdisc.h index b7de9c5ce..854f565d2 100644 --- a/lib/sfio/Sfio_dc/sfdisc.h +++ b/lib/sfio/Sfio_dc/sfdisc.h @@ -24,7 +24,6 @@ extern "C" { extern int sfdcdos(Sfio_t *); extern int sfdcfilter(Sfio_t *, const char *); extern int sfdclzw(Sfio_t *); - extern int sfdcslow(Sfio_t *); extern int sfdcsubstream(Sfio_t *, Sfio_t *, Sfoff_t, Sfoff_t); extern int sfdctee(Sfio_t *, Sfio_t *); extern int sfdcunion(Sfio_t *, Sfio_t **, int); -- 2.50.1