]> granicus.if.org Git - graphviz/commitdiff
remove unused sfputm() and variants
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 23 Sep 2020 03:30:21 +0000 (20:30 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 30 Sep 2020 00:01:03 +0000 (17:01 -0700)
lib/sfio/Makefile.am
lib/sfio/Sfio_f/Makefile.am
lib/sfio/Sfio_f/_sfputm.c [deleted file]
lib/sfio/sfio.h
lib/sfio/sfio.vcxproj
lib/sfio/sfio.vcxproj.filters
lib/sfio/sfputm.c [deleted file]

index af2c9f1cb39fcdb7d7e6c02d0596e47589bbcfc2..ee8f4360b10305d40b55530d2c8afe878a6e1259 100644 (file)
@@ -13,7 +13,7 @@ libsfio_C_la_SOURCES = sfclose.c sfclrlock.c sfcvt.c sfdisc.c \
        sfflsbuf.c sfgetd.c sfgetl.c sfgetm.c sfgetr.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 sfputm.c \
+       sfprintf.c sfprints.c sfpurge.c \
        sfputr.c sfputu.c sfraise.c sfrd.c sfread.c sfreserve.c \
        sfresize.c sfscanf.c sfseek.c sfset.c sfsetbuf.c sfsetfd.c \
        sfsize.c sfsk.c sfstack.c sfstrtod.c sfswap.c sfsync.c \
index b5b9f329a6a03af21a9091e28b0b6efb584e814b..1bca9221c9d1d06f7b35353f3de157482be5437e 100644 (file)
@@ -7,5 +7,5 @@ noinst_LTLIBRARIES = libsfiof_C.la
 
 libsfiof_C_la_SOURCES = \
        _sffileno.c _sfgetc.c _sfputc.c \
-       _sfputm.c _sfputu.c _sfslen.c _sfstacked.c \
+       _sfputu.c _sfslen.c _sfstacked.c \
        _sfulen.c _sfvalue.c
diff --git a/lib/sfio/Sfio_f/_sfputm.c b/lib/sfio/Sfio_f/_sfputm.c
deleted file mode 100644 (file)
index ec60c1f..0000000
+++ /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       <sfio/sfhdr.h>
-
-#undef sfputm
-
-int sfputm(Sfio_t * f, Sfulong_t u, Sfulong_t m)
-{
-    return __sf_putm(f, u, m);
-}
index 1156566dc862a81de433ccadaf1ca04c11cf6a49..d61575b7adc5c6fb624dbed182b8dd7a7bfc034d 100644 (file)
@@ -340,7 +340,6 @@ extern "C" {
     extern int sfulen(Sfulong_t);
 
     extern int sfputu(Sfio_t *, Sfulong_t);
-    extern int sfputm(Sfio_t *, Sfulong_t, Sfulong_t);
     extern int sfputc(Sfio_t *, int);
 
     extern Sfdouble_t sfgetd(Sfio_t *);
@@ -350,7 +349,6 @@ extern "C" {
     extern int sfgetc(Sfio_t *);
 
     extern int _sfputu(Sfio_t *, Sfulong_t);
-    extern int _sfputm(Sfio_t *, Sfulong_t, Sfulong_t);
     extern int _sfflsbuf(Sfio_t *, int);
 
     extern int _sffilbuf(Sfio_t *, int);
@@ -383,7 +381,6 @@ extern "C" {
 #define _SF_(f)                ((Sfio_t*)(f))
 #endif
 #define __sf_putu(f,v)         (_sfputu(_SF_(f),(Sfulong_t)(v)))
-#define __sf_putm(f,v,m)       (_sfputm(_SF_(f),(Sfulong_t)(v),(Sfulong_t)(m)))
 #define __sf_putc(f,c) (_SF_(f)->next >= _SF_(f)->endw ? \
                         _sfflsbuf(_SF_(f),(int)((unsigned char)(c))) : \
                         (int)(*_SF_(f)->next++ = (unsigned char)(c)) )
@@ -397,7 +394,6 @@ extern "C" {
 #define __sf_slen()    (_Sfi)
 
 #define sfputu(f,v)                            ( __sf_putu((f),(v))            )
-#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 sfulen(v)                              ( __sf_ulen(v)                  )
index 087ee6f2f42e511034840758bd994e5608cc0e2a..67dd59dc6548f83f59e4606df16cc1e536a3d86a 100644 (file)
@@ -99,7 +99,6 @@
     <ClCompile Include="sfio_f\_sffileno.c" />
     <ClCompile Include="sfio_f\_sfgetc.c" />
     <ClCompile Include="sfio_f\_sfputc.c" />
-    <ClCompile Include="sfio_f\_sfputm.c" />
     <ClCompile Include="sfio_f\_sfputu.c" />
     <ClCompile Include="sfio_f\_sfslen.c" />
     <ClCompile Include="sfio_f\_sfstacked.c" />
     <ClCompile Include="sfprintf.c" />
     <ClCompile Include="sfprints.c" />
     <ClCompile Include="sfpurge.c" />
-    <ClCompile Include="sfputm.c" />
     <ClCompile Include="sfputr.c" />
     <ClCompile Include="sfputu.c" />
     <ClCompile Include="sfraise.c" />
index 51fb85ebd68ed2a1ce826730f1a9186c1d3b9c78..b82f4f0f43f6a090374965f48bc716f274b5d372 100644 (file)
@@ -38,9 +38,6 @@
     <ClCompile Include="sfio_f\_sfputc.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="sfio_f\_sfputm.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="sfio_f\_sfputu.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="sfpurge.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="sfputm.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="sfputr.c">
       <Filter>Source Files</Filter>
     </ClCompile>
diff --git a/lib/sfio/sfputm.c b/lib/sfio/sfputm.c
deleted file mode 100644 (file)
index 9812f06..0000000
+++ /dev/null
@@ -1,74 +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>
-
-/*     Write out an unsigned long value in a portable format.
-**
-**     Written by Kiem-Phong Vo.
-*/
-
-/**
- * @param f write a portable ulong to this stream
- * @param v the unsigned value to be written
- * @param max the max value of the range
- */
-int _sfputm(Sfio_t * f, Sfulong_t v, Sfulong_t max)
-{
-#define N_ARRAY                (2*sizeof(Sfulong_t))
-    uchar *s, *ps;
-    ssize_t n, p;
-    uchar c[N_ARRAY];
-
-    SFMTXSTART(f, -1);
-
-    if (v > max || (f->mode != SF_WRITE && _sfmode(f, SF_WRITE, 0) < 0))
-       SFMTXRETURN(f, -1);
-    SFLOCK(f, 0);
-
-    /* code v as integers in base SF_UBASE */
-    s = ps = &(c[N_ARRAY - 1]);
-    *s = (uchar) SFBVALUE(v);
-    while ((max >>= SF_BBITS) > 0) {
-       v >>= SF_BBITS;
-       *--s = (uchar) SFBVALUE(v);
-    }
-    n = (ps - s) + 1;
-
-    if (n > 8 || SFWPEEK(f, ps, p) < n)
-       n = SFWRITE(f, (void *) s, n);  /* write the hard way */
-    else {
-       switch (n) {
-       case 8:
-           *ps++ = *s++;
-       case 7:
-           *ps++ = *s++;
-       case 6:
-           *ps++ = *s++;
-       case 5:
-           *ps++ = *s++;
-       case 4:
-           *ps++ = *s++;
-       case 3:
-           *ps++ = *s++;
-       case 2:
-           *ps++ = *s++;
-       case 1:
-           *ps++ = *s++;
-       }
-       f->next = ps;
-    }
-
-    SFOPEN(f, 0);
-    SFMTXRETURN(f, (int) n);
-}