From: Matthew Fernandez Date: Wed, 26 May 2021 01:45:59 +0000 (-0700) Subject: remove unused exrewind() X-Git-Tag: 2.47.3~19^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=26d412040d19e29a5ad2908ce44e16cfe9f1d7d1;p=graphviz remove unused exrewind() --- diff --git a/lib/expr/CMakeLists.txt b/lib/expr/CMakeLists.txt index 655119749..b11c6ea0c 100644 --- a/lib/expr/CMakeLists.txt +++ b/lib/expr/CMakeLists.txt @@ -47,7 +47,6 @@ add_library(expr STATIC exeval.c exexpr.c exopen.c - exrewind.c extoken.c extype.c exzero.c diff --git a/lib/expr/Makefile.am b/lib/expr/Makefile.am index 925a46c42..6f221e488 100644 --- a/lib/expr/Makefile.am +++ b/lib/expr/Makefile.am @@ -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 \ diff --git a/lib/expr/Makefile.nmake b/lib/expr/Makefile.nmake index 5bfdfec1e..d097d638f 100644 --- a/lib/expr/Makefile.nmake +++ b/lib/expr/Makefile.nmake @@ -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*" diff --git a/lib/expr/expr.3 b/lib/expr/expr.3 index 2fad380b3..c00de830b 100644 --- a/lib/expr/expr.3 +++ b/lib/expr/expr.3 @@ -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" diff --git a/lib/expr/expr.h b/lib/expr/expr.h index e3cea3532..0d908cfaa 100644 --- a/lib/expr/expr.h +++ b/lib/expr/expr.h @@ -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 *); diff --git a/lib/expr/expr.vcxproj b/lib/expr/expr.vcxproj index 7866ad8d4..d7f3e432f 100644 --- a/lib/expr/expr.vcxproj +++ b/lib/expr/expr.vcxproj @@ -98,7 +98,6 @@ - diff --git a/lib/expr/expr.vcxproj.filters b/lib/expr/expr.vcxproj.filters index 2957568e1..7dace3a84 100644 --- a/lib/expr/expr.vcxproj.filters +++ b/lib/expr/expr.vcxproj.filters @@ -56,9 +56,6 @@ Source Files - - Source Files - Source Files diff --git a/lib/expr/exrewind.c b/lib/expr/exrewind.c deleted file mode 100644 index 9e7b3c411..000000000 --- a/lib/expr/exrewind.c +++ /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 -#include - -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; -}