]> granicus.if.org Git - graphviz/commitdiff
remove unused sfprints()
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 10 Oct 2020 00:19:03 +0000 (17:19 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 16 Oct 2020 03:01:20 +0000 (20:01 -0700)
lib/sfio/Makefile.am
lib/sfio/sfio.h
lib/sfio/sfio.vcxproj
lib/sfio/sfio.vcxproj.filters
lib/sfio/sfprints.c [deleted file]

index 6f7982dbf7ce01266f53e102b3feb07d833500bc..7ff3f5c8bd3c6ee9083900d514f1ce2c861309a2 100644 (file)
@@ -13,7 +13,7 @@ libsfio_C_la_SOURCES = sfclose.c sfcvt.c sfdisc.c \
        sfflsbuf.c \
        sfmode.c sfnew.c \
        sfnputc.c sfopen.c sfpkrd.c \
-       sfprintf.c sfprints.c sfpurge.c \
+       sfprintf.c sfpurge.c \
        sfputr.c sfraise.c sfrd.c sfread.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 3fd4165c2266f66fa1f782c21d4f045d4f87876a..e7f9f3d9665fd4855cc7431aa1e3a81d657c9f12 100644 (file)
@@ -310,7 +310,6 @@ extern "C" {
     extern ssize_t sfnputc(Sfio_t *, int, size_t);
     extern int sfungetc(Sfio_t *, int);
     extern int sfprintf(Sfio_t *, const char *, ...);
-    extern char *sfprints(const char *, ...);
     extern int sfsprintf(char *, int, const char *, ...);
     extern int sfvsprintf(char *, int, const char *, va_list);
     extern int sfvprintf(Sfio_t *, const char *, va_list);
index 706bacbb1ff2b4744c1f4229f13575df181d49f6..ac93e48afa8f1ad4e0b9995d3dcc3c4b07252624 100644 (file)
     <ClCompile Include="sfopen.c" />
     <ClCompile Include="sfpkrd.c" />
     <ClCompile Include="sfprintf.c" />
-    <ClCompile Include="sfprints.c" />
     <ClCompile Include="sfpurge.c" />
     <ClCompile Include="sfputr.c" />
     <ClCompile Include="sfraise.c" />
index cff66ae1c4a4c823cc04308c3cfc3dc762304568..15ea6f7fc0a42694b49d6798e86f2d350a1ac083 100644 (file)
@@ -83,9 +83,6 @@
     <ClCompile Include="sfprintf.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="sfprints.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="sfpurge.c">
       <Filter>Source Files</Filter>
     </ClCompile>
diff --git a/lib/sfio/sfprints.c b/lib/sfio/sfprints.c
deleted file mode 100644 (file)
index 904c3c1..0000000
+++ /dev/null
@@ -1,47 +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>
-
-/*     Construct a string with the given format and data.
-**     This function allocates space as necessary to store the string.
-**     This avoids overflow problems typical with sprintf() in stdio.
-**
-**     Written by Kiem-Phong Vo.
-*/
-
-char *sfprints(const char *form, ...)
-{
-    va_list args;
-    int rv;
-    static Sfio_t *f;
-    va_start(args, form);
-
-    /* make a fake stream */
-    if (!f &&
-       !(f = sfnew(NIL(Sfio_t *), NIL(char *), (size_t) SF_UNBOUND,
-                   -1, SF_WRITE | SF_STRING))) {
-       va_end(args);
-       return NIL(char *);
-    }
-
-    sfseek(f, (Sfoff_t) 0, 0);
-    rv = sfvprintf(f, form, args);
-    va_end(args);
-
-    if (rv < 0 || sfputc(f, '\0') < 0)
-       return NIL(char *);
-
-    _Sfi = (f->next - f->data) - 1;
-    return (char *) f->data;
-}