]> granicus.if.org Git - graphviz/commitdiff
remove unused exrewind()
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 26 May 2021 01:45:59 +0000 (18:45 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 1 Jun 2021 14:13:20 +0000 (07:13 -0700)
lib/expr/CMakeLists.txt
lib/expr/Makefile.am
lib/expr/Makefile.nmake
lib/expr/expr.3
lib/expr/expr.h
lib/expr/expr.vcxproj
lib/expr/expr.vcxproj.filters
lib/expr/exrewind.c [deleted file]

index 655119749f8f7154daea460deae2fdd94729d722..b11c6ea0c886f8d49fdc349289570db1ce36ad55 100644 (file)
@@ -47,7 +47,6 @@ add_library(expr STATIC
     exeval.c
     exexpr.c
     exopen.c
-    exrewind.c
     extoken.c
     extype.c
     exzero.c
index 925a46c4202ffe575c8f1d943706462fc6e257e1..6f221e48823f0a32d39c1d56d9fcb576ba763587 100644 (file)
@@ -28,7 +28,7 @@ pdf =
 endif
 
 libexpr_C_la_SOURCES = excc.c excontext.c exdata.c exerror.c \
-       exeval.c exexpr.c exopen.c exrewind.c extoken.c \
+       exeval.c exexpr.c exopen.c extoken.c \
        extype.c exzero.c exparse.y exnospace.c exstash.c 
 libexpr_C_la_LIBADD = \
        $(top_builddir)/lib/ast/libast_C.la \
index 5bfdfec1e6868469294156680e86dadefef047ce..d097d638f04e1cac25aefcbaa3e4ded583341cb4 100644 (file)
@@ -11,7 +11,7 @@ CCFLAGS = $(CC.OPTIMIZE) $(CC.SUFFIX.DYNAMIC:@?$(CC.DLL)??)
 
 expr 2.0 :LIBRARY: expr.h exlib.h exgram.h exparse.y \
                excc.c excontext.c exdata.c exeval.c exexpr.c \
-               exerror.c exopen.c exrewind.c extoken.c extype.c \
+               exerror.c exopen.c extoken.c extype.c \
                exzero.c
 
 if CC.HOSTTYPE == "*.i386" || "$(-mam)" == "static*"
index 2fad380b387bffb4c16c01db8dc67b8a63b6f7f6..c00de830bc56db02dab4ba29118616c1f825510f 100644 (file)
@@ -46,7 +46,6 @@ void             exfreenode(Expr_t*, Exnode_t*);
 int              expush(Expr_t*, const char*, int, const char*, Sfio_t*);
 int              expop(Expr_t*);
 int              excomp(Expr_t*, const char*, int, const char*, Sfio_t*);
-int              exrewind(Expr_t*);
 int              extoken(Expr_t*);
 char*            extype(int);
 Extype_t         exzero(int);
@@ -58,6 +57,5 @@ exopen() is the first function called.
 exclose() is the last function called.
 exccopen() is the called if code generation will be used.
 exccclose() releases the state information allocated in exccopen().
-exrewind() restores statement start information saved by exstatement().
 
 .SH "SEE ALSO"
index e3cea35327dcc3fb6c1c60fb80837059c9842123..0d908cfaa79785c1cc4e0c1e0133d5e445202a3f 100644 (file)
@@ -289,7 +289,6 @@ extern char*                exnospace(void);
 extern Expr_t*         exopen(Exdisc_t*);
 extern int             expop(Expr_t*);
 extern int             expush(Expr_t*, const char*, int, const char*, Sfio_t*);
-extern int             exrewind(Expr_t*);
 extern char*           exstash(Sfio_t*, Vmalloc_t*);
 extern int             extoken_fn(Expr_t*);
 extern char*           exstring(Expr_t *, char *);
index 7866ad8d4d795beeb3b58a7df99909f9fddd5858..d7f3e432f696f41e02a70159c50faa33434637ea 100644 (file)
@@ -98,7 +98,6 @@
     <ClCompile Include="exexpr.c" />
     <ClCompile Include="exnospace.c" />
     <ClCompile Include="exopen.c" />
-    <ClCompile Include="exrewind.c" />
     <ClCompile Include="exstash.c" />
     <ClCompile Include="extoken.c" />
     <ClCompile Include="extype.c" />
index 2957568e18d2818f5ad115fb93fc67782bc9b426..7dace3a84804feba24690bc7940ca4c708b2ab4f 100644 (file)
@@ -56,9 +56,6 @@
     <ClCompile Include="exopen.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="exrewind.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="exstash.c">
       <Filter>Source Files</Filter>
     </ClCompile>
diff --git a/lib/expr/exrewind.c b/lib/expr/exrewind.c
deleted file mode 100644 (file)
index 9e7b3c4..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*************************************************************************
- * 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: Details at https://graphviz.org
- *************************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * expression library
- */
-
-#include <expr/exlib.h>
-#include <string.h>
-
-int
-exrewind(Expr_t* ex)
-{
-       int     n;
-
-       if (ex->linewrap)
-       {
-               exerror("too much pushback");
-               return -1;
-       }
-       if (!ex->input->pushback && !(ex->input->pushback = oldof(0, char, sizeof(ex->line), 3)))
-       {
-               exnospace();
-               return -1;
-       }
-       if ((n = ex->linep - ex->line))
-               memcpy(ex->input->pushback, ex->line, n);
-       if (ex->input->peek)
-       {
-               ex->input->pushback[n++] = ex->input->peek;
-               ex->input->peek = 0;
-       }
-       ex->input->pushback[n++] = ' ';
-       ex->input->pushback[n] = 0;
-       ex->input->pp = ex->input->pushback;
-       ex->input->nesting = ex->nesting;
-       setcontext(ex);
-       return 0;
-}