From: Matthew Fernandez Date: Wed, 23 Sep 2020 03:05:00 +0000 (-0700) Subject: remove unused sfllen() and variants X-Git-Tag: 2.46.0~20^2^2~61^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6589920e0647d1950f9893c9fd24f35e3613a5d;p=graphviz remove unused sfllen() and variants --- diff --git a/lib/sfio/Makefile.am b/lib/sfio/Makefile.am index 22ddbd1c9..64a093d4e 100644 --- a/lib/sfio/Makefile.am +++ b/lib/sfio/Makefile.am @@ -11,7 +11,7 @@ noinst_LTLIBRARIES = libsfio_C.la libsfio_C_la_SOURCES = sfclose.c sfclrlock.c sfcvt.c sfdisc.c \ sfexcept.c sfexit.c sfextern.c sffilbuf.c \ sfflsbuf.c sfgetd.c sfgetl.c sfgetm.c sfgetr.c sfgetu.c \ - sfllen.c sfmode.c sfnew.c sfnotify.c \ + sfmode.c sfnew.c sfnotify.c \ sfnputc.c sfopen.c sfpkrd.c sfpoll.c sfpool.c \ sfprintf.c sfprints.c sfpurge.c sfputd.c sfputl.c sfputm.c \ sfputr.c sfputu.c sfraise.c sfrd.c sfread.c sfreserve.c \ diff --git a/lib/sfio/Sfio_f/Makefile.am b/lib/sfio/Sfio_f/Makefile.am index e6f274d3b..c3bbb81b7 100644 --- a/lib/sfio/Sfio_f/Makefile.am +++ b/lib/sfio/Sfio_f/Makefile.am @@ -6,6 +6,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/lib noinst_LTLIBRARIES = libsfiof_C.la libsfiof_C_la_SOURCES = \ - _sffileno.c _sfgetc.c _sfllen.c _sfputc.c _sfputd.c \ + _sffileno.c _sfgetc.c _sfputc.c _sfputd.c \ _sfputl.c _sfputm.c _sfputu.c _sfslen.c _sfstacked.c \ _sfulen.c _sfvalue.c diff --git a/lib/sfio/Sfio_f/_sfllen.c b/lib/sfio/Sfio_f/_sfllen.c deleted file mode 100644 index 886d8b8af..000000000 --- a/lib/sfio/Sfio_f/_sfllen.c +++ /dev/null @@ -1,21 +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 - -#undef sfllen - -int sfllen(Sflong_t v) -{ - return __sf_llen(v); -} diff --git a/lib/sfio/sfio.h b/lib/sfio/sfio.h index ea5e7993b..cb16e5c14 100644 --- a/lib/sfio/sfio.h +++ b/lib/sfio/sfio.h @@ -337,7 +337,6 @@ extern "C" { extern ssize_t sfpkrd(int, void *, size_t, int, long, int); /* portable handling of primitive types */ - extern int sfllen(Sflong_t); extern int sfulen(Sfulong_t); extern int sfputd(Sfio_t *, Sfdouble_t); @@ -360,7 +359,6 @@ extern "C" { extern int _sffilbuf(Sfio_t *, int); - extern int _sfllen(Sflong_t); extern int _sfulen(Sfulong_t); /* miscellaneous function analogues of fast in-line functions */ @@ -397,7 +395,6 @@ extern "C" { (int)(*_SF_(f)->next++ = (unsigned char)(c)) ) #define __sf_getc(f) (_SF_(f)->next >= _SF_(f)->endr ? _sffilbuf(_SF_(f),0) : \ (int)(*_SF_(f)->next++) ) -#define __sf_llen(v) (_sfllen((Sflong_t)(v)) ) #define __sf_ulen(v) ((Sfulong_t)(v) < SF_U1 ? 1 : (Sfulong_t)(v) < SF_U2 ? 2 : \ (Sfulong_t)(v) < SF_U3 ? 3 : (Sfulong_t)(v) < SF_U4 ? 4 : 5) #define __sf_fileno(f) ((f) ? _SF_(f)->file : -1) @@ -411,7 +408,6 @@ extern "C" { #define sfputm(f,v,m) ( __sf_putm((f),(v),(m)) ) #define sfputc(f,c) ( __sf_putc((f),(c)) ) #define sfgetc(f) ( __sf_getc(f) ) -#define sfllen(v) ( __sf_llen(v) ) #define sfulen(v) ( __sf_ulen(v) ) #define sffileno(f) ( __sf_fileno(f) ) #define sfstacked(f) ( __sf_stacked(f) ) diff --git a/lib/sfio/sfio.vcxproj b/lib/sfio/sfio.vcxproj index 240d74012..96e20031a 100644 --- a/lib/sfio/sfio.vcxproj +++ b/lib/sfio/sfio.vcxproj @@ -98,7 +98,6 @@ - @@ -108,7 +107,6 @@ - diff --git a/lib/sfio/sfio.vcxproj.filters b/lib/sfio/sfio.vcxproj.filters index c42162f6a..1cd6088b5 100644 --- a/lib/sfio/sfio.vcxproj.filters +++ b/lib/sfio/sfio.vcxproj.filters @@ -35,9 +35,6 @@ Source Files - - Source Files - Source Files @@ -107,9 +104,6 @@ Source Files - - Source Files - Source Files diff --git a/lib/sfio/sfllen.c b/lib/sfio/sfllen.c deleted file mode 100644 index 4ed85268b..000000000 --- a/lib/sfio/sfllen.c +++ /dev/null @@ -1,26 +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 - -/* Get size of a long value coded in a portable format -** -** Written by Kiem-Phong Vo -*/ -int _sfllen(Sflong_t v) -{ - if (v < 0) - v = -(v + 1); - v = (Sfulong_t) v >> SF_SBITS; - return 1 + (v > 0 ? sfulen(v) : 0); -}