]> granicus.if.org Git - graphviz/commitdiff
remove unused sfgetm()
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 1 Oct 2020 01:39:49 +0000 (18:39 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 7 Oct 2020 03:08:02 +0000 (20:08 -0700)
lib/sfio/Makefile.am
lib/sfio/sfgetm.c [deleted file]
lib/sfio/sfhdr.h
lib/sfio/sfio.h
lib/sfio/sfio.vcxproj
lib/sfio/sfio.vcxproj.filters

index d654e5729729754e8161b282a7cfacf895794e28..71a9b4d888cb4d4d93197b447b078cbb79aad7d4 100644 (file)
@@ -10,7 +10,7 @@ noinst_LTLIBRARIES = libsfio_C.la
 
 libsfio_C_la_SOURCES = sfclose.c sfcvt.c sfdisc.c \
        sfexcept.c sfexit.c sfextern.c sffilbuf.c \
-       sfflsbuf.c sfgetm.c sfgetu.c \
+       sfflsbuf.c sfgetu.c \
        sfmode.c sfnew.c sfnotify.c \
        sfnputc.c sfopen.c sfpkrd.c sfpoll.c sfpool.c \
        sfprintf.c sfprints.c sfpurge.c \
diff --git a/lib/sfio/sfgetm.c b/lib/sfio/sfgetm.c
deleted file mode 100644 (file)
index d330b7a..0000000
+++ /dev/null
@@ -1,53 +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       <sfio/sfhdr.h>
-
-/*     Read an unsigned long value coded portably for a given range.
-**
-**     Written by Kiem-Phong Vo
-*/
-
-Sfulong_t sfgetm(Sfio_t * f, Sfulong_t m)
-{
-    Sfulong_t v;
-    uchar *s, *ends, c;
-    int p;
-
-    SFMTXSTART(f, (Sfulong_t) (-1));
-
-    if (f->mode != SF_READ && _sfmode(f, SF_READ, 0) < 0)
-       SFMTXRETURN(f, (Sfulong_t) (-1));
-
-    SFLOCK(f, 0);
-
-    for (v = 0;;) {
-       if (SFRPEEK(f, s, p) <= 0) {
-           f->flags |= SF_ERROR;
-           v = (Sfulong_t) (-1);
-           goto done;
-       }
-       for (ends = s + p; s < ends;) {
-           c = *s++;
-           v = (v << SF_BBITS) | SFBVALUE(c);
-           if ((m >>= SF_BBITS) <= 0) {
-               f->next = s;
-               goto done;
-           }
-       }
-       f->next = s;
-    }
-  done:
-    SFOPEN(f, 0);
-    SFMTXRETURN(f, v);
-}
index 1623f0cbbcc32badc75435c78cd59c5fb8715b3e..df64715c2861bce2d6ffcc869475eeed12c756b8 100644 (file)
@@ -435,7 +435,6 @@ extern "C" {
 
 /* get the real value of a byte in a coded long or ulong */
 #define SFUVALUE(v)    (((ulong)(v))&(SF_MORE-1))
-#define SFBVALUE(v)    (((ulong)(v))&(SF_BYTE-1))
 
 /* grain size for buffer increment */
 #define SF_GRAIN       1024
index 75dbbc3744e9870f6ad6617c411f4c2a885e0233..f3d6bf1ff36e2631060d4e574164ed2955460530 100644 (file)
@@ -332,7 +332,6 @@ extern "C" {
     extern int sfputc(Sfio_t *, int);
 
     extern Sfulong_t sfgetu(Sfio_t *);
-    extern Sfulong_t sfgetm(Sfio_t *, Sfulong_t);
     extern int sfgetc(Sfio_t *);
 
     extern int _sfflsbuf(Sfio_t *, int);
@@ -348,9 +347,7 @@ extern "C" {
 
 /* coding long integers in a portable and compact fashion */
 #define SF_UBITS       7
-#define SF_BBITS       8
 #define SF_MORE                (1 << SF_UBITS)
-#define SF_BYTE                (1 << SF_BBITS)
 #define SF_U1          SF_MORE
 #define SF_U2          (SF_U1*SF_U1)
 #define SF_U3          (SF_U2*SF_U1)
index 2d0d3253e23fa52430f28a07f1ddba3d8ca238ba..d3f8915347dd5458d5f27a49db30d36bd60a3bb9 100644 (file)
@@ -90,7 +90,6 @@
     <ClCompile Include="sfextern.c" />
     <ClCompile Include="sffilbuf.c" />
     <ClCompile Include="sfflsbuf.c" />
-    <ClCompile Include="sfgetm.c" />
     <ClCompile Include="sfgetu.c" />
     <ClCompile Include="sfio_f\_sffileno.c" />
     <ClCompile Include="sfio_f\_sfgetc.c" />
index 6c3f9dcbf1de9b4f5cbc4979d108ccf5585f1100..bb61e0bc59951535a7468c9ad1edcbc343ec6204 100644 (file)
@@ -65,9 +65,6 @@
     <ClCompile Include="sfflsbuf.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="sfgetm.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="sfgetu.c">
       <Filter>Source Files</Filter>
     </ClCompile>