From 5713fedeabb503fd76a03416f05902777a8363e3 Mon Sep 17 00:00:00 2001 From: Alexander Skovpen Date: Tue, 10 Jun 2014 21:31:49 +0400 Subject: [PATCH] removing unneeded --- debian/Makefile | 263 ----- source/Makefile | 203 ---- source/bforce/expression.c | 2136 ------------------------------------ source/include/config.h | 154 --- 4 files changed, 2756 deletions(-) delete mode 100644 debian/Makefile delete mode 100644 source/Makefile delete mode 100644 source/bforce/expression.c delete mode 100644 source/include/config.h diff --git a/debian/Makefile b/debian/Makefile deleted file mode 100644 index 4ba6be0..0000000 --- a/debian/Makefile +++ /dev/null @@ -1,263 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# ../debian/Makefile. Generated from Makefile.in by configure. - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = . -top_srcdir = ../.. - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = /usr/bin/install -c -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = x86_64-unknown-linux-gnu -host_triplet = x86_64-unknown-linux-gnu -target_triplet = x86_64-unknown-linux-gnu -subdir = ../debian -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -CC = gcc -CFLAGS = -g -O2 -CPP = gcc -E -CPPFLAGS = -DEFS = -DHAVE_CONFIG_H -ECHO_C = -ECHO_N = -n -ECHO_T = -EGREP = /bin/grep -E -EXEEXT = -GROUP = ftn -INSTALL_DATA = ${INSTALL} -m 644 -INSTALL_PROGRAM = ${INSTALL} -INSTALL_SCRIPT = ${INSTALL} -LDFLAGS = -LIBOBJS = -LIBS = -LTLIBOBJS = -OBJEXT = o -OWNER = ftn -PACKAGE_BUGREPORT = sergey@fidoman.ru -PACKAGE_NAME = bforce -PACKAGE_STRING = bforce 0.24 -PACKAGE_TARNAME = bforce -PACKAGE_VERSION = 0.24 -PATH_SEPARATOR = : -SHELL = /bin/sh -YACC = bison -y -ac_ct_CC = gcc -bindir = ${exec_prefix}/bin -build = x86_64-unknown-linux-gnu -build_alias = -build_cpu = x86_64 -build_os = linux-gnu -build_vendor = unknown -datadir = ${prefix}/share -exec_prefix = ${prefix} -host = x86_64-unknown-linux-gnu -host_alias = -host_cpu = x86_64 -host_os = linux-gnu -host_vendor = unknown -includedir = ${prefix}/include -infodir = ${prefix}/share/info -libdir = ${exec_prefix}/lib -libexecdir = ${exec_prefix}/libexec -localstatedir = ${prefix}/var -mandir = ${prefix}/share/man -oldincludedir = /usr/include -prefix = /usr/local -program_transform_name = s,x,x, -sbindir = ${exec_prefix}/sbin -sharedstatedir = ${prefix}/com -sysconfdir = /usr/local/etc/ftn/bforce -target = x86_64-unknown-linux-gnu -target_alias = -target_cpu = x86_64 -target_os = linux-gnu -target_vendor = unknown - -# $Id$ -EXTRA_DIST = copyright changelog rules conffiles \ - control dirs init.d - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ../debian/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu ../debian/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/source/Makefile b/source/Makefile deleted file mode 100644 index 5b90c43..0000000 --- a/source/Makefile +++ /dev/null @@ -1,203 +0,0 @@ -# -# Copyright (c) 1999-2000, Alexander Belkin -# -# Copyright (c) 2004, Evgeniy Kozhuhovskiy -# -# $Id$ -# - -prefix=/usr/local -exec_prefix=${prefix} - -CC = gcc -INCLUDES = -I./include -CFLAGS = -g -O2 -fno-builtin -LIBS = -YACC = bison -y -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 -SRCDIR = . -SRCDIRCONF = $(SRCDIR)/../examples -CONTRIBDIR = $(SRCDIR)/../contrib - -OWNER = ftn -GROUP = ftn -CONFDIR = /usr/local/etc/ftn/bforce -BINDIR = ${exec_prefix}/bin -LOGDIR = /var/log/bforce -SPOOLDIR = /var/spool/bforce - -DAEMON_LOGFILE = $(LOGDIR)/bf-daemon -BFORCE_LOGFILE = $(LOGDIR)/bf-log -BFORCE_DEBFILE = $(LOGDIR)/bf-debug -BFORCE_DEBLEVEL = 0L -BFORCE_CFGFILE = $(CONFDIR)/bforce.conf - -DEFINES = -DDAEMON_LOGFILE=\"$(DAEMON_LOGFILE)\" \ - -DBFORCE_LOGFILE=\"$(BFORCE_LOGFILE)\" \ - -DBFORCE_DEBFILE=\"$(BFORCE_DEBFILE)\" \ - -DBFORCE_DEBLEVEL=$(BFORCE_DEBLEVEL) \ - -DBFORCE_CFGFILE=\"$(BFORCE_CFGFILE)\" \ - -DBF_OS=\"linux-gnu\" -DHAVE_CONFIG_H - -SUBDIRS = bforce bfutil - -BFINDEX_OBJS = bfutil/bfindex.o \ - bforce/conf_deinit.o bforce/conf_proc.o \ - bforce/conf_read.o bforce/conf_get.o \ - bforce/logger.o bforce/nodelist.o \ - bforce/u_file.o bforce/u_ftn.o \ - bforce/u_misc.o bforce/u_string.o \ - bforce/u_time.o - -NLOOKUP_OBJS = bfutil/nlookup.o \ - bforce/conf_deinit.o bforce/conf_proc.o \ - bforce/conf_read.o bforce/conf_get.o \ - bforce/logger.o bforce/nodelist.o \ - bforce/u_file.o bforce/u_ftn.o \ - bforce/u_misc.o bforce/u_string.o \ - bforce/u_time.o - -BFSTAT_OBJS = bfutil/bfstat.o \ - bforce/conf_deinit.o bforce/conf_proc.o \ - bforce/conf_read.o bforce/conf_get.o \ - bforce/outb_flo.o bforce/outb_fsqueue.o \ - bforce/sess_stat.o \ - bforce/outb_getname.o bforce/outb_sysqueue.o \ - bforce/outb_scan.o bforce/logger.o \ - bforce/u_file.o \ - bforce/u_ftn.o bforce/u_misc.o \ - bforce/u_string.o bforce/u_time.o \ - bforce/u_plock.o - -BFORCE_OBJS = bforce/bforce.o \ - bforce/daemon.o bforce/daemon_branch.o \ - bforce/daemon_call.o bforce/daemon_lines.o \ - bforce/conf_deinit.o \ - bforce/conf_proc.o bforce/conf_read.o \ - bforce/conf_get.o bforce/expression.o \ - bforce/freq_bark.o bforce/freq_proc.o \ - bforce/freq_srif.o bforce/freq_wazoo.o \ - bforce/io_modem.o bforce/io_tcpip.o \ - bforce/io_unix_lock.o bforce/io_unix_modem.o \ - bforce/io_unix_tio.o bforce/io_unix_tty.o \ - bforce/logger.o bforce/nodelist.o \ - bforce/os_unix.o bforce/outb_bsy.o \ - bforce/outb_flo.o bforce/outb_fsqueue.o \ - bforce/outb_getname.o bforce/outb_sysqueue.o \ - bforce/outb_scan.o bforce/prot_common.o \ - bforce/prot_binkp.o bforce/prot_binkp_api.o \ - bforce/prot_binkp_misc.o bforce/prot_hydra.o \ - bforce/prot_xmrecv.o bforce/prot_xmsend.o \ - bforce/prot_zmmisc.o bforce/prot_zmrecv.o \ - bforce/prot_zmsend.o \ - bforce/prot_yoohoo.o bforce/prot_yoohoo_api.o \ - bforce/prot_emsi.o bforce/prot_emsi_misc.o \ - bforce/prot_emsi_api.o \ - bforce/sess_common.o bforce/sess_stat.o \ - bforce/sess_call.o bforce/sess_answ.o \ - bforce/sess_init.o bforce/sess_main.o \ - bforce/u_crc.o bforce/u_ftn.o \ - bforce/u_md5.o \ - bforce/u_misc.o bforce/u_string.o \ - bforce/u_time.o bforce/u_file.o \ - bforce/u_pkt.o bforce/u_recode.o \ - bforce/u_plock.o bforce/netspool.o \ - bforce/prot_binkp_crypt.o - -.c.o: - @echo Compiling $*.c - @$(CC) $(CFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ - -all: bin bin/bforce bin/bfindex bin/bfstat bin/nlookup - -bin: - test -d bin || mkdir bin - -bforce/expression.c: bforce/expression.y - $(YACC) bforce/expression.y - mv y.tab.c bforce/expression.c - -bin/bforce: $(BFLIB_OBJS) $(BFORCE_OBJS) - @echo "Linking $@" - @$(CC) $(BFLIB_OBJS) $(BFORCE_OBJS) $(LIBS) -o $@ - -bin/bfindex: $(BFLIB_OBJS) $(BFINDEX_OBJS) - @echo "Linking $@" - @$(CC) $(BFLIB_OBJS) $(BFINDEX_OBJS) $(LIBS) -o $@ - -bin/nlookup: $(BFLIB_OBJS) $(NLOOKUP_OBJS) - @echo "Linking $@" - @$(CC) $(BFLIB_OBJS) $(NLOOKUP_OBJS) $(LIBS) -o $@ - -bin/bfstat: $(BFLIB_OBJS) $(BFSTAT_OBJS) - @echo "Linking $@" - @$(CC) $(BFLIB_OBJS) $(BFSTAT_OBJS) $(LIBS) -o $@ - - -clean: - @for i in $(SUBDIRS); do (rm -f $$i/*.o || exit 1); done - rm -f ./bforce/expression.c - rm -f ./bin/bforce - rm -f ./bin/bfindex - rm -f ./bin/bfstat - rm -f ./bin/nlookup - rm -f ./bin/core -clean-am: - rm -f ./Makefile - rm -f ./include/config.h - rm -f ./config.log - rm -f ./config.status -clean-ac: - rm -f ./configure - -distclean: clean clean-am - -distclean-m: distclean clean-ac - - -ifnames: - @for i in $(SUBDIRS); do (ifnames $$i/*.c || exit 1); done - -bforce/expression.y.o: bforce/expression.y.c bforce/expression.l.c - -bforce/expression.l.o: bforce/expression.y.c bforce/expression.l.c - -installdirs: - if [ ! -d $(CONFDIR) ]; then mkdir -p $(CONFDIR); fi - if [ ! -d $(BINDIR) ]; then mkdir -p $(BINDIR); fi - if [ ! -d $(LOGDIR) ]; then mkdir -p $(LOGDIR); fi - if [ ! -d $(SPOOLDIR) ]; then mkdir -p $(SPOOLDIR); fi - if [ ! -d $(SPOOLDIR)/bt/in ]; then mkdir -p $(SPOOLDIR)/bt/in; fi - if [ ! -d $(SPOOLDIR)/bt/pin ]; then mkdir -p $(SPOOLDIR)/bt/pin; fi - if [ ! -d $(SPOOLDIR)/bt/out ]; then mkdir -p $(SPOOLDIR)/bt/out; fi - if [ ! -d $(SPOOLDIR)/ndl ]; then mkdir -p $(SPOOLDIR)/ndl; fi - if [ ! -d $(SPOOLDIR)/bforce ]; then mkdir -p $(SPOOLDIR); fi - chown $(OWNER):$(GROUP) $(CONFDIR) - chown $(OWNER):$(GROUP) $(LOGDIR) - chown $(OWNER):$(GROUP) $(SPOOLDIR)/bt/in - chown $(OWNER):$(GROUP) $(SPOOLDIR)/bt/pin - chown $(OWNER):$(GROUP) $(SPOOLDIR)/bt/out - chown $(OWNER):$(GROUP) $(SPOOLDIR)/ndl - chown $(OWNER):$(GROUP) $(SPOOLDIR) - -install-bin: - $(INSTALL_PROGRAM) -o $(OWNER) -g $(GROUP) $(SRCDIR)/bin/bforce $(BINDIR)/bforce - $(INSTALL_PROGRAM) -o $(OWNER) -g $(GROUP) $(SRCDIR)/bin/bfindex $(BINDIR)/bfindex - $(INSTALL_PROGRAM) -o $(OWNER) -g $(GROUP) $(SRCDIR)/bin/bfstat $(BINDIR)/bfstat - $(INSTALL_PROGRAM) -o $(OWNER) -g $(GROUP) $(SRCDIR)/bin/nlookup $(BINDIR)/nlookup - -install-config: - $(INSTALL_DATA) -o $(OWNER) -g $(GROUP) $(SRCDIRCONF)/bforce.conf $(CONFDIR)/bforce.conf.sample - $(INSTALL_DATA) -o $(OWNER) -g $(GROUP) $(SRCDIRCONF)/bforce.subst $(CONFDIR)/bforce.subst.sample - $(INSTALL_DATA) -o $(OWNER) -g $(GROUP) $(SRCDIRCONF)/bforce.passwd $(CONFDIR)/bforce.passwd.sample - $(INSTALL_DATA) -o $(OWNER) -g $(GROUP) $(SRCDIRCONF)/freq.aliases $(CONFDIR)/freq.aliases.sample - $(INSTALL_DATA) -o $(OWNER) -g $(GROUP) $(SRCDIRCONF)/freq.dirs $(CONFDIR)/freq.dirs.sample - -install-contrib: - $(INSTALL_PROGRAM) -o $(OWNER) -g $(GROUP) $(CONTRIBDIR)/outman $(BINDIR)/outman - @echo "Please, edit $(BINDIR)/outman" - -install: install-bin install-config - diff --git a/source/bforce/expression.c b/source/bforce/expression.c deleted file mode 100644 index e13e22f..0000000 --- a/source/bforce/expression.c +++ /dev/null @@ -1,2136 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.4.3" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - - - -/* Copy the first part of user declarations. */ - -/* Line 189 of yacc.c */ -#line 48 "bforce/expression.y" - -#include "includes.h" -#include "confread.h" -#include "util.h" -#include "logger.h" -#include "session.h" -#include "nodelist.h" -#include "io.h" - -static struct tm *now = NULL; -static int expr_result = 0; -static char *expr_p_pos = NULL; -static char *expr_p_text = NULL; - -/* - * These are expression element checkers (not only) - * Return values: - * 0 - FALSE - * 1 - TRUE - * -1 - cannot check, because some data is not available yet - * -2 - invalid element (we should not check this expression more) - */ -static int expr_check_incoming(void); -static int expr_check_outgoing(void); -static int expr_check_protected(void); -static int expr_check_listed(void); -static int expr_check_logic(int e1, int op, int e2); -static int expr_check_phone(const char *phone); -static int expr_check_arop(int num1, int op, int num2); -static int expr_check_flag(const char *str); -static int expr_check_exec(const char *str); -static int expr_check_exist(const char *str); -static int expr_check_port(const char *str); -static int expr_check_mailer(const char *str); -static int expr_check_addr(const char *str); -static int expr_check_time(const char *str); - -static int yylex(void); -static int yyparse(void); -static int yyerror(const char *s); - - - -/* Line 189 of yacc.c */ -#line 116 "y.tab.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - COMMA = 258, - TEXT = 259, - NUMBER = 260, - INCOMING = 261, - OUTGOING = 262, - LISTED = 263, - PROTECTED = 264, - CONNSPEED = 265, - EXEC = 266, - EXIST = 267, - PORT = 268, - MAILER = 269, - TZ = 270, - FLAG = 271, - SPEED = 272, - PHONE = 273, - TIME = 274, - ADDRESS = 275, - EQ = 276, - NE = 277, - GT = 278, - GE = 279, - LT = 280, - LE = 281, - AND = 282, - OR = 283, - NOT = 284, - XOR = 285, - OPENB = 286, - CLOSEB = 287, - AROP = 288, - LOGOP = 289 - }; -#endif -/* Tokens. */ -#define COMMA 258 -#define TEXT 259 -#define NUMBER 260 -#define INCOMING 261 -#define OUTGOING 262 -#define LISTED 263 -#define PROTECTED 264 -#define CONNSPEED 265 -#define EXEC 266 -#define EXIST 267 -#define PORT 268 -#define MAILER 269 -#define TZ 270 -#define FLAG 271 -#define SPEED 272 -#define PHONE 273 -#define TIME 274 -#define ADDRESS 275 -#define EQ 276 -#define NE 277 -#define GT 278 -#define GE 279 -#define LT 280 -#define LE 281 -#define AND 282 -#define OR 283 -#define NOT 284 -#define XOR 285 -#define OPENB 286 -#define CLOSEB 287 -#define AROP 288 -#define LOGOP 289 - - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef int YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - -/* Copy the second part of user declarations. */ - - -/* Line 264 of yacc.c */ -#line 226 "y.tab.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 35 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 43 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 35 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 6 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 25 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 46 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 289 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 5, 7, 10, 14, 18, 20, 22, - 24, 26, 29, 33, 37, 41, 44, 47, 50, 53, - 56, 59, 61, 63, 67, 69 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 36, 0, -1, 37, -1, 38, -1, 29, 37, -1, - 37, 34, 37, -1, 31, 37, 32, -1, 6, -1, - 7, -1, 8, -1, 9, -1, 16, 39, -1, 10, - 33, 5, -1, 17, 33, 5, -1, 15, 33, 5, - -1, 18, 4, -1, 19, 40, -1, 11, 4, -1, - 12, 4, -1, 13, 4, -1, 14, 4, -1, 4, - -1, 4, -1, 4, 3, 39, -1, 4, -1, 4, - 3, 40, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint8 yyrline[] = -{ - 0, 92, 92, 98, 103, 111, 115, 121, 125, 129, - 133, 137, 141, 148, 155, 159, 163, 167, 171, 175, - 179, 183, 190, 194, 199, 205 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "COMMA", "TEXT", "NUMBER", "INCOMING", - "OUTGOING", "LISTED", "PROTECTED", "CONNSPEED", "EXEC", "EXIST", "PORT", - "MAILER", "TZ", "FLAG", "SPEED", "PHONE", "TIME", "ADDRESS", "EQ", "NE", - "GT", "GE", "LT", "LE", "AND", "OR", "NOT", "XOR", "OPENB", "CLOSEB", - "AROP", "LOGOP", "$accept", "fullline", "expression", "elemexp", - "flagstring", "timestring", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 35, 36, 37, 37, 37, 37, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 39, 39, 40, 40 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 2, 3, 3, 1, 1, 1, - 1, 2, 3, 3, 3, 2, 2, 2, 2, 2, - 2, 1, 1, 3, 1, 3 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 21, 7, 8, 9, 10, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 3, 0, 17, 18, 19, 20, 0, 22, 11, 0, - 15, 24, 16, 4, 0, 1, 0, 12, 14, 0, - 13, 0, 6, 5, 23, 25 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 18, 19, 20, 28, 32 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -33 -static const yytype_int8 yypact[] = -{ - -4, -33, -33, -33, -33, -33, -32, 15, 17, 18, - 19, -9, 22, -5, 25, 26, -4, -4, 31, -2, - -33, 28, -33, -33, -33, -33, 29, 32, -33, 33, - -33, 34, -33, -2, -14, -33, -4, -33, -33, 22, - -33, 26, -33, -2, -33, -33 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -33, -33, 0, -33, 1, 2 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 -static const yytype_uint8 yytable[] = -{ - 1, 21, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 33, 34, 42, 22, - 36, 23, 24, 25, 26, 16, 27, 17, 29, 30, - 31, 35, 36, 37, 38, 39, 43, 41, 40, 0, - 44, 0, 0, 45 -}; - -static const yytype_int8 yycheck[] = -{ - 4, 33, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 16, 17, 32, 4, - 34, 4, 4, 4, 33, 29, 4, 31, 33, 4, - 4, 0, 34, 5, 5, 3, 36, 3, 5, -1, - 39, -1, -1, 41 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 4, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 29, 31, 36, 37, - 38, 33, 4, 4, 4, 4, 33, 4, 39, 33, - 4, 4, 40, 37, 37, 0, 34, 5, 5, 3, - 5, 3, 32, 37, 39, 40 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; - } -} -#endif /* YYERROR_VERBOSE */ - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - YYUSE (yyvaluep); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void) -#else -int -yyparse () - -#endif -#endif -{ - - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: - -/* Line 1464 of yacc.c */ -#line 93 "bforce/expression.y" - { - DEB((D_EVENT, "[yacc] expression return %d", (yyvsp[(1) - (1)]))); - expr_result = (yyvsp[(1) - (1)]); - } - break; - - case 3: - -/* Line 1464 of yacc.c */ -#line 99 "bforce/expression.y" - { - DEB((D_EVENT, "[yacc] elemexp return %d", (yyvsp[(1) - (1)]))); - (yyval) = (yyvsp[(1) - (1)]); - } - break; - - case 4: - -/* Line 1464 of yacc.c */ -#line 104 "bforce/expression.y" - { - DEB((D_EVENT, "[yacc] not exprression %d", (yyvsp[(2) - (2)]))); - if( ((yyvsp[(2) - (2)])) < 0 ) - (yyval) = 0; - else - (yyval) = !((yyvsp[(2) - (2)])); - } - break; - - case 5: - -/* Line 1464 of yacc.c */ -#line 112 "bforce/expression.y" - { - (yyval) = expr_check_logic((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)])); - } - break; - - case 6: - -/* Line 1464 of yacc.c */ -#line 116 "bforce/expression.y" - { - DEB((D_EVENT, "eventexp: [yacc] backeted.expr %d", (yyvsp[(2) - (3)]))); - (yyval) = (yyvsp[(2) - (3)]); - } - break; - - case 7: - -/* Line 1464 of yacc.c */ -#line 122 "bforce/expression.y" - { - (yyval) = expr_check_incoming(); - } - break; - - case 8: - -/* Line 1464 of yacc.c */ -#line 126 "bforce/expression.y" - { - (yyval) = expr_check_outgoing(); - } - break; - - case 9: - -/* Line 1464 of yacc.c */ -#line 130 "bforce/expression.y" - { - (yyval) = expr_check_listed(); - } - break; - - case 10: - -/* Line 1464 of yacc.c */ -#line 134 "bforce/expression.y" - { - (yyval) = expr_check_protected(); - } - break; - - case 11: - -/* Line 1464 of yacc.c */ -#line 138 "bforce/expression.y" - { - (yyval) = (yyvsp[(2) - (2)]); - } - break; - - case 12: - -/* Line 1464 of yacc.c */ -#line 142 "bforce/expression.y" - { - if( state.valid && state.connspeed > 0 ) - (yyval) = expr_check_arop(state.connspeed, (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)])); - else - (yyval) = -1; - } - break; - - case 13: - -/* Line 1464 of yacc.c */ -#line 149 "bforce/expression.y" - { - if( state.valid && state.node.speed > 0 ) - (yyval) = expr_check_arop(state.node.speed, (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)])); - else - (yyval) = -1; - } - break; - - case 14: - -/* Line 1464 of yacc.c */ -#line 156 "bforce/expression.y" - { - (yyval) = expr_check_arop(time_gmtoffset(), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)])); - } - break; - - case 15: - -/* Line 1464 of yacc.c */ -#line 160 "bforce/expression.y" - { - (yyval) = expr_check_phone(expr_p_text); - } - break; - - case 16: - -/* Line 1464 of yacc.c */ -#line 164 "bforce/expression.y" - { - (yyval) = (yyvsp[(2) - (2)]); - } - break; - - case 17: - -/* Line 1464 of yacc.c */ -#line 168 "bforce/expression.y" - { - (yyval) = expr_check_exec(expr_p_text); - } - break; - - case 18: - -/* Line 1464 of yacc.c */ -#line 172 "bforce/expression.y" - { - (yyval) = expr_check_exist(expr_p_text); - } - break; - - case 19: - -/* Line 1464 of yacc.c */ -#line 176 "bforce/expression.y" - { - (yyval) = expr_check_port(expr_p_text); - } - break; - - case 20: - -/* Line 1464 of yacc.c */ -#line 180 "bforce/expression.y" - { - (yyval) = expr_check_mailer(expr_p_text); - } - break; - - case 21: - -/* Line 1464 of yacc.c */ -#line 184 "bforce/expression.y" - { - (yyval) = expr_check_addr(expr_p_text); - if( (yyval) == -2 ) - YYABORT; - } - break; - - case 22: - -/* Line 1464 of yacc.c */ -#line 191 "bforce/expression.y" - { - (yyval) = expr_check_flag(expr_p_text); - } - break; - - case 23: - -/* Line 1464 of yacc.c */ -#line 195 "bforce/expression.y" - { - (yyval) = expr_check_logic((yyvsp[(1) - (3)]), OR, (yyvsp[(3) - (3)])); - } - break; - - case 24: - -/* Line 1464 of yacc.c */ -#line 200 "bforce/expression.y" - { - (yyval) = expr_check_time(expr_p_text); - if( (yyval) == -2 ) - YYABORT; - } - break; - - case 25: - -/* Line 1464 of yacc.c */ -#line 206 "bforce/expression.y" - { - (yyval) = expr_check_logic((yyvsp[(1) - (3)]), OR, (yyvsp[(3) - (3)])); - } - break; - - - -/* Line 1464 of yacc.c */ -#line 1690 "y.tab.c" - default: break; - } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } - } -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - *++yyvsp = yylval; - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined(yyoverflow) || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - - -/* Line 1684 of yacc.c */ -#line 210 "bforce/expression.y" - - -#include "expression_lex.c" - -static int expr_check_incoming(void) -{ - if( !state.valid ) - return -1; - - return state.caller ? 0 : 1; -} - -static int expr_check_outgoing(void) -{ - if( !state.valid ) - return -1; - - return state.caller ? 1 : 0; -} - -static int expr_check_protected(void) -{ - if( !state.valid || !state.node.addr.zone ) - return -1; - - return state.protected ? 1 : 0; -} - -static int expr_check_listed(void) -{ - if( !state.valid || !state.node.addr.zone ) - return -1; - - return state.node.listed ? 1 : 0; -} - -static int expr_check_logic(int e1, int op, int e2) -{ - DEB((D_EVENT, "[yacc] logic: %d %d %d", e1, op, e2)); - - if( e1 < 0 ) e1 = 0; - if( e2 < 0 ) e2 = 0; - - switch(op) { - case AND: - return (e1 && e2); - case OR: - return (e1 || e2); - case XOR: - return (e1 ^ e2); - } - - log("invalid logical operator in expression"); - - return 0; -} - -static int expr_check_phone(const char *phone) -{ - DEB((D_EVENT, "[yacc] phone: is %s in %s", - phone, state.node.phone)); - - if( !state.valid ) - return 0; - - return strstr(state.node.phone, phone) ? 1 : 0; -} - -static int expr_check_arop(int num1, int op, int num2) -{ - DEB((D_EVENT, "[yacc] arop: %d %d %d", num1, op, num2)); - - switch(op) { - case EQ: return (num1 == num2); - case NE: return (num1 != num2); - case GT: return (num1 > num2); - case GE: return (num1 >= num2); - case LT: return (num1 < num2); - case LE: return (num1 <= num2); - } - - log("invalid arithmetic operator in expression"); - - return 0; -} - -static int expr_check_flag(const char *str) -{ - DEB((D_EVENT, "[yacc] flag: \"%s\"", str)); - - if( !state.valid ) - return 0; - - return !nodelist_checkflag(state.node.flags, str); -} - -static int expr_check_exec(const char *str) -{ - DEB((D_EVENT, "[yacc] exec: \"%s\"", str)); - - return session_run_command(str) ? 0 : 1; -} - -static int expr_check_exist(const char *str) -{ - DEB((D_EVENT, "[yacc] exist: \"%s\"", str)); - - return access(str, F_OK) ? 1 : 0; -} - -static int expr_check_port(const char *str) -{ - DEB((D_EVENT, "[yacc] port: \"%s\"", str)); - - if( !state.valid ) - return -1; - - if( !strcasecmp(str, "tcpip") ) - { - return state.inet ? 1 : 0; - } - else if( state.modemport && state.modemport->name ) - { - return strstr(state.modemport->name, str) ? 1 : 0; - } - else if( isatty(0) ) - { - return strstr(ttyname(0), str) ? 1 : 0; - } - - return -1; -} - -static int expr_check_mailer(const char *str) -{ - char *p; - - DEB((D_EVENT, "[yacc] mailer: \"%s\"", str)); - - if( !state.valid ) - return -1; - - if( state.handshake && state.handshake->remote_mailer ) - p = state.handshake->remote_mailer(state.handshake); - else - return -1; - - return (p && string_casestr(p, str)) ? 1 : 0; -} - -static int expr_check_addr(const char *str) -{ - s_faddr addr; -#ifdef DEBUG - char abuf1[BF_MAXADDRSTR+1]; - char abuf2[BF_MAXADDRSTR+1]; - - DEB((D_EVENT, "[yacc] addr: \"%s\" (session with \"%s\")", - ftn_addrstr(abuf1, addr), - ftn_addrstr(abuf2, state.node.addr))); -#endif - - if( !state.valid ) - return -1; - - if( ftn_addrparse(&addr, str, TRUE) ) - { - log("invalid address \"%s\"", str); - return -2; - } - - return !ftn_addrcomp_mask(state.node.addr, addr); -} - -static int expr_check_time(const char *str) -{ - DEB((D_EVENT, "[yacc] time: \"%s\"", str)); - - switch( time_check(str, now) ) { - case -1: - log("invalid time string \"%s\"", str); - return -2; - case 0: - return 1; - } - - return 0; -} - -bool eventexpr(s_expr *expr) -{ - time_t tt; - char *tmp; - - if( !expr || !expr->expr ) - return 1; - - if( expr->error ) - return 0; - - DEB((D_EVENT, "eventexpr: [yacc] check expression \"%s\"", - expr->expr)); - - tt = time(NULL); - now = localtime(&tt); - tmp = (char*)xstrcpy(expr->expr); - - expr_p_pos = tmp; - expr_result = 0; - - if( yyparse() ) - { - expr->error = TRUE; - - log("cannot parse expression \"%s\"", expr->expr); - DEB((D_EVENT, "eventexpr: [yacc] $yyparse return error")); - - expr_result = 0; - } - - free(tmp); - - DEB((D_EVENT, "eventexpr: [yacc] checking result is \"%s\" (%d)", - (expr_result == 1) ? "TRUE" : "FALSE", expr_result)); - - return (expr_result == 1) ? TRUE : FALSE; -} - -static int yyerror(const char *str) -{ - log("expression check failure: %s", str); - - return 0; -} - diff --git a/source/include/config.h b/source/include/config.h deleted file mode 100644 index 1ba0e68..0000000 --- a/source/include/config.h +++ /dev/null @@ -1,154 +0,0 @@ -/* include/config.h. Generated from config.h.in by configure. */ -/* include/config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* Define if the `getpgrp' function takes no argument. */ -#define GETPGRP_VOID 1 - -/* Define if you don't have vprintf but do have _doprnt. */ -/* #undef HAVE_DOPRNT */ - -/* Define if you have that is POSIX.1 compatible. */ -#define HAVE_SYS_WAIT_H 1 - -/* Define if you have the vprintf function. */ -#define HAVE_VPRINTF 1 - -/* Define to `int' if doesn't define. */ -/* #undef mode_t */ - -/* Define to `int' if doesn't define. */ -/* #undef pid_t */ - -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE void - -/* Define if the setvbuf function takes the buffering type as its second - argument and the buffer pointer as the third, as on System V - before release 3. */ -/* #undef SETVBUF_REVERSED */ - -/* Define to `unsigned' if doesn't define. */ -/* #undef size_t */ - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define if your declares struct tm. */ -/* #undef TM_IN_SYS_TIME */ - -/* Do you want debug code to be compiled? */ -#define DEBUG 1 - -/* Do you want use DCD line control? */ -#define MODEM_WATCH_CARRIER 1 - -/* Do you want hangup to watch for modem DCD line? */ -#define MODEM_HANGUP_WATCH_CARRIER 1 - -/* Version string */ -#define RELEASE_VERSION "0.23" - -/* Disable passwords logging? */ -#define BFORCE_LOG_PASSWD 1 - -/* Path to the UUCP lock files directory */ -#define BFORCE_LOCK_DIR "/var/lock/" - -/* Do you want to use syslog? */ -/* #undef USE_SYSLOG */ - -/* Netspool */ -#define NETSPOOL 1 - -/* Do you want use .csy locks? */ -#define BFORCE_USE_CSY 1 - -/* Define if you have the mkdir function. */ -#define HAVE_MKDIR 1 - -/* Define if you have the mktime function. */ -#define HAVE_MKTIME 1 - -/* Define if you have the rename function. */ -#define HAVE_RENAME 1 - -/* Define if you have the select function. */ -#define HAVE_SELECT 1 - -/* Define if you have the setproctitle function. */ -/* #undef HAVE_SETPROCTITLE */ - -/* Define if you have the socket function. */ -#define HAVE_SOCKET 1 - -/* Define if you have the statfs function. */ -#define HAVE_STATFS 1 - -/* Define if you have the statvfs function. */ -#define HAVE_STATVFS 1 - -/* Define if you have the strcasecmp function. */ -#define HAVE_STRCASECMP 1 - -/* Define if you have the strspn function. */ -#define HAVE_STRSPN 1 - -/* Define if you have the header file. */ -#define HAVE_DIRENT_H 1 - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_NDIR_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define if you have the header file. */ -#define HAVE_SYS_FILE_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_MOUNT_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_STATFS_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_STATVFS_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_TERMIOX_H */ - -/* Define if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_VFS_H 1 - -/* Define if you have the header file. */ -#define HAVE_TERMIOS_H 1 - -/* Define if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define if you want buggy emsi :) */ -#define BUGGY_EMSI 0