From: Matthew Fernandez Date: Sun, 2 May 2021 02:15:24 +0000 (-0700) Subject: remove unused exlexname X-Git-Tag: 2.47.2~7^2~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e4bee93589fea401a784228c7df0ddbde0a8bff;p=graphviz remove unused exlexname This function is uncalled and not exposed to users. --- diff --git a/lib/expr/CMakeLists.txt b/lib/expr/CMakeLists.txt index d58a7d455..655119749 100644 --- a/lib/expr/CMakeLists.txt +++ b/lib/expr/CMakeLists.txt @@ -46,7 +46,6 @@ add_library(expr STATIC exerror.c exeval.c exexpr.c - exlexname.c exopen.c exrewind.c extoken.c diff --git a/lib/expr/Makefile.am b/lib/expr/Makefile.am index c80999854..67bab9678 100644 --- a/lib/expr/Makefile.am +++ b/lib/expr/Makefile.am @@ -33,7 +33,7 @@ endif #libexpr_la_LDFLAGS = -version-info $(EXPR_VERSION) -no-undefined libexpr_C_la_SOURCES = excc.c excontext.c exdata.c exerror.c \ - exeval.c exexpr.c exlexname.c exopen.c exrewind.c extoken.c \ + exeval.c exexpr.c exopen.c exrewind.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/exlexname.c b/lib/expr/exlexname.c deleted file mode 100644 index 2bebc990d..000000000 --- a/lib/expr/exlexname.c +++ /dev/null @@ -1,50 +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 - * - * return lex name for op[subop] - */ - -#include -#include -#include - -#define TOTNAME 3 -#define MAXNAME 16 - -char* -exlexname(int op, int subop) -{ - char* b; - - static int n; - static char buf[TOTNAME][MAXNAME]; - - if (op > MINTOKEN && op < MAXTOKEN) - return (char*)exop((size_t)op - MINTOKEN); - if (++n > TOTNAME) - n = 0; - b = buf[n]; - if (op == '=') - { - if (subop > MINTOKEN && subop < MAXTOKEN) - sfsprintf(b, MAXNAME, "%s=", exop((size_t)subop - MINTOKEN)); - else if (subop > ' ' && subop <= '~') - sfsprintf(b, MAXNAME, "%c=", subop); - else sfsprintf(b, MAXNAME, "(%d)=", subop); - } - else if (op > ' ' && op <= '~') - sfsprintf(b, MAXNAME, "%c", op); - else sfsprintf(b, MAXNAME, "(%d)", op); - return b; -} diff --git a/lib/expr/expr.vcxproj b/lib/expr/expr.vcxproj index 7b849aaa9..7866ad8d4 100644 --- a/lib/expr/expr.vcxproj +++ b/lib/expr/expr.vcxproj @@ -96,7 +96,6 @@ - diff --git a/lib/expr/expr.vcxproj.filters b/lib/expr/expr.vcxproj.filters index 8c3da6680..2957568e1 100644 --- a/lib/expr/expr.vcxproj.filters +++ b/lib/expr/expr.vcxproj.filters @@ -50,9 +50,6 @@ Source Files - - Source Files - Source Files