diff options
Diffstat (limited to 'gmp/demos')
47 files changed, 2813 insertions, 4824 deletions
diff --git a/gmp/demos/Makefile.am b/gmp/demos/Makefile.am index 0a7c2a4732..97cb3ef465 100644 --- a/gmp/demos/Makefile.am +++ b/gmp/demos/Makefile.am @@ -1,36 +1,25 @@ ## Process this file with automake to generate Makefile.in -# Copyright 2000-2002, 2012 Free Software Foundation, Inc. +# Copyright 2000, 2001, 2002 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at your +# option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. SUBDIRS = calc expr -EXTRA_DIST = perl primes.h +EXTRA_DIST = perl INCLUDES = -I$(top_srcdir) LDADD = $(top_builddir)/libgmp.la diff --git a/gmp/demos/Makefile.in b/gmp/demos/Makefile.in index 129c786f1c..a4a88fdae7 100644 --- a/gmp/demos/Makefile.in +++ b/gmp/demos/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.8.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# 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. @@ -15,56 +14,33 @@ @SET_MAKE@ -# Copyright 2000-2002, 2012 Free Software Foundation, Inc. +# Copyright 2000, 2001, 2002 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at your +# option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. +SOURCES = factorize.c isprime.c pexpr.c primes.c qcn.c + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -76,8 +52,8 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -build_triplet = @build@ host_triplet = @host@ +ANSI2KNR = $(top_builddir)/ansi2knr EXTRA_PROGRAMS = factorize$(EXEEXT) isprime$(EXEEXT) pexpr$(EXEEXT) \ primes$(EXEEXT) qcn$(EXEEXT) subdir = demos @@ -85,92 +61,55 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/pexpr-config-h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d +mkinstalldirs = $(mkdir_p) CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = pexpr-config.h -CONFIG_CLEAN_VPATH_FILES = factorize_SOURCES = factorize.c -factorize_OBJECTS = factorize.$(OBJEXT) +factorize_OBJECTS = factorize$U.$(OBJEXT) factorize_LDADD = $(LDADD) factorize_DEPENDENCIES = $(top_builddir)/libgmp.la isprime_SOURCES = isprime.c -isprime_OBJECTS = isprime.$(OBJEXT) +isprime_OBJECTS = isprime$U.$(OBJEXT) isprime_LDADD = $(LDADD) isprime_DEPENDENCIES = $(top_builddir)/libgmp.la pexpr_SOURCES = pexpr.c -pexpr_OBJECTS = pexpr.$(OBJEXT) +pexpr_OBJECTS = pexpr$U.$(OBJEXT) pexpr_LDADD = $(LDADD) pexpr_DEPENDENCIES = $(top_builddir)/libgmp.la primes_SOURCES = primes.c -primes_OBJECTS = primes.$(OBJEXT) -am__DEPENDENCIES_1 = -primes_DEPENDENCIES = $(LDADD) $(am__DEPENDENCIES_1) +primes_OBJECTS = primes$U.$(OBJEXT) +am__DEPENDENCIES_1 = $(top_builddir)/libgmp.la +am__DEPENDENCIES_2 = +primes_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) qcn_SOURCES = qcn.c -qcn_OBJECTS = qcn.$(OBJEXT) -qcn_DEPENDENCIES = $(LDADD) $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +qcn_OBJECTS = qcn$U.$(OBJEXT) +qcn_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = am__depfiles_maybe = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = factorize.c isprime.c pexpr.c primes.c qcn.c DIST_SOURCES = factorize.c isprime.c pexpr.c primes.c qcn.c RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" ABI = @ABI@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -181,6 +120,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -196,17 +136,16 @@ CYGPATH_W = @CYGPATH_W@ DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ +ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_STATIC_FALSE = @ENABLE_STATIC_FALSE@ +ENABLE_STATIC_TRUE = @ENABLE_STATIC_TRUE@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -220,12 +159,10 @@ HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ HAVE_STACK_T_01 = @HAVE_STACK_T_01@ HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ @@ -240,26 +177,20 @@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -269,31 +200,26 @@ SHELL = @SHELL@ SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ STRIP = @STRIP@ TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ +U = @U@ U_FOR_BUILD = @U_FOR_BUILD@ VERSION = @VERSION@ +WANT_CXX_FALSE = @WANT_CXX_FALSE@ +WANT_CXX_TRUE = @WANT_CXX_TRUE@ +WANT_MPBSD_FALSE = @WANT_MPBSD_FALSE@ +WANT_MPBSD_TRUE = @WANT_MPBSD_TRUE@ WITH_READLINE_01 = @WITH_READLINE_01@ YACC = @YACC@ YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ -builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -317,6 +243,7 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ +mpn_objs_in_libmp = @mpn_objs_in_libmp@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ @@ -324,14 +251,10 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ SUBDIRS = calc expr -EXTRA_DIST = perl primes.h +EXTRA_DIST = perl INCLUDES = -I$(top_srcdir) LDADD = $(top_builddir)/libgmp.la qcn_LDADD = $(LDADD) $(LIBM) @@ -345,14 +268,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps demos/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps demos/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps demos/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu --ignore-deps demos/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -370,30 +293,34 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): pexpr-config.h: $(top_builddir)/config.status $(srcdir)/pexpr-config-h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -factorize$(EXEEXT): $(factorize_OBJECTS) $(factorize_DEPENDENCIES) $(EXTRA_factorize_DEPENDENCIES) +factorize$(EXEEXT): $(factorize_OBJECTS) $(factorize_DEPENDENCIES) @rm -f factorize$(EXEEXT) - $(LINK) $(factorize_OBJECTS) $(factorize_LDADD) $(LIBS) -isprime$(EXEEXT): $(isprime_OBJECTS) $(isprime_DEPENDENCIES) $(EXTRA_isprime_DEPENDENCIES) + $(LINK) $(factorize_LDFLAGS) $(factorize_OBJECTS) $(factorize_LDADD) $(LIBS) +isprime$(EXEEXT): $(isprime_OBJECTS) $(isprime_DEPENDENCIES) @rm -f isprime$(EXEEXT) - $(LINK) $(isprime_OBJECTS) $(isprime_LDADD) $(LIBS) -pexpr$(EXEEXT): $(pexpr_OBJECTS) $(pexpr_DEPENDENCIES) $(EXTRA_pexpr_DEPENDENCIES) + $(LINK) $(isprime_LDFLAGS) $(isprime_OBJECTS) $(isprime_LDADD) $(LIBS) +pexpr$(EXEEXT): $(pexpr_OBJECTS) $(pexpr_DEPENDENCIES) @rm -f pexpr$(EXEEXT) - $(LINK) $(pexpr_OBJECTS) $(pexpr_LDADD) $(LIBS) -primes$(EXEEXT): $(primes_OBJECTS) $(primes_DEPENDENCIES) $(EXTRA_primes_DEPENDENCIES) + $(LINK) $(pexpr_LDFLAGS) $(pexpr_OBJECTS) $(pexpr_LDADD) $(LIBS) +primes$(EXEEXT): $(primes_OBJECTS) $(primes_DEPENDENCIES) @rm -f primes$(EXEEXT) - $(LINK) $(primes_OBJECTS) $(primes_LDADD) $(LIBS) -qcn$(EXEEXT): $(qcn_OBJECTS) $(qcn_DEPENDENCIES) $(EXTRA_qcn_DEPENDENCIES) + $(LINK) $(primes_LDFLAGS) $(primes_OBJECTS) $(primes_LDADD) $(LIBS) +qcn$(EXEEXT): $(qcn_OBJECTS) $(qcn_DEPENDENCIES) @rm -f qcn$(EXEEXT) - $(LINK) $(qcn_OBJECTS) $(qcn_LDADD) $(LIBS) + $(LINK) $(qcn_LDFLAGS) $(qcn_OBJECTS) $(qcn_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c +$(top_builddir)/ansi2knr: + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) ansi2knr + +mostlyclean-kr: + -test "$U" = "" || rm -f *_.c .c.o: $(COMPILE) -c $< @@ -403,6 +330,19 @@ distclean-compile: .c.lo: $(LTCOMPILE) -c -o $@ $< +factorize_.c: factorize.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/factorize.c; then echo $(srcdir)/factorize.c; else echo factorize.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +isprime_.c: isprime.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/isprime.c; then echo $(srcdir)/isprime.c; else echo isprime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +pexpr_.c: pexpr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/pexpr.c; then echo $(srcdir)/pexpr.c; else echo pexpr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +primes_.c: primes.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/primes.c; then echo $(srcdir)/primes.c; else echo primes.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +qcn_.c: qcn.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/qcn.c; then echo $(srcdir)/qcn.c; else echo qcn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +factorize_.$(OBJEXT) factorize_.lo isprime_.$(OBJEXT) isprime_.lo \ +pexpr_.$(OBJEXT) pexpr_.lo primes_.$(OBJEXT) primes_.lo qcn_.$(OBJEXT) \ +qcn_.lo : $(ANSI2KNR) mostlyclean-libtool: -rm -f *.lo @@ -410,6 +350,10 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +distclean-libtool: + -rm -f libtool +uninstall-info-am: + # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, @@ -417,13 +361,7 @@ clean-libtool: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ + @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -434,21 +372,16 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ @@ -468,16 +401,16 @@ $(RECURSIVE_CLEAN_TARGETS): else \ local_target="$$target"; \ fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -485,14 +418,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - set x; \ + tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -503,99 +436,80 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + test -f $$subdir/TAGS && \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -z "$$unique" && unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique + $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ + @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 \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ + test -d "$(distdir)/$$subdir" \ + || mkdir "$(distdir)/$$subdir" \ + || exit 1; \ + (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ + top_distdir="../$(top_distdir)" \ + distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ @@ -615,23 +529,17 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi + $(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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -643,7 +551,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags + distclean-libtool distclean-tags dvi: dvi-recursive @@ -651,38 +559,18 @@ dvi-am: html: html-recursive -html-am: - info: info-recursive info-am: install-data-am: -install-dvi: install-dvi-recursive - -install-dvi-am: - install-exec-am: -install-html: install-html-recursive - -install-html-am: - install-info: install-info-recursive -install-info-am: - install-man: -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -691,7 +579,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ +mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr \ mostlyclean-libtool pdf: pdf-recursive @@ -702,30 +590,28 @@ ps: ps-recursive ps-am: -uninstall-am: +uninstall-am: uninstall-info-am -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +uninstall-info: uninstall-info-recursive -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-generic clean-libtool clean-recursive ctags \ + ctags-recursive distclean distclean-compile distclean-generic \ + distclean-libtool distclean-recursive distclean-tags 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 installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am + maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-kr mostlyclean-libtool \ + mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-info-am allprogs: $(EXTRA_PROGRAMS) cd calc; $(MAKE) $(AM_MAKEFLAGS) allprogs cd expr; $(MAKE) $(AM_MAKEFLAGS) allprogs - # 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/gmp/demos/calc/Makefile.am b/gmp/demos/calc/Makefile.am index 3a461ebc59..da6490755c 100644 --- a/gmp/demos/calc/Makefile.am +++ b/gmp/demos/calc/Makefile.am @@ -1,32 +1,21 @@ ## Process this file with automake to generate Makefile.in -# Copyright 2000-2004 Free Software Foundation, Inc. +# Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at your +# option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. INCLUDES = -I$(top_srcdir) diff --git a/gmp/demos/calc/Makefile.in b/gmp/demos/calc/Makefile.in index 6606f87bc8..6637bac632 100644 --- a/gmp/demos/calc/Makefile.in +++ b/gmp/demos/calc/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.8.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# 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. @@ -15,56 +14,33 @@ @SET_MAKE@ -# Copyright 2000-2004 Free Software Foundation, Inc. +# Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at your +# option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. +SOURCES = $(calc_SOURCES) + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -76,55 +52,45 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -build_triplet = @build@ host_triplet = @host@ +ANSI2KNR = $(top_builddir)/ansi2knr EXTRA_PROGRAMS = calc$(EXEEXT) subdir = demos/calc DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/calc-config-h.in calc.c calc.h calclex.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d +mkinstalldirs = $(mkdir_p) CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = calc-config.h -CONFIG_CLEAN_VPATH_FILES = -am_calc_OBJECTS = calc.$(OBJEXT) calclex.$(OBJEXT) calcread.$(OBJEXT) +am_calc_OBJECTS = calc$U.$(OBJEXT) calclex$U.$(OBJEXT) \ + calcread$U.$(OBJEXT) calc_OBJECTS = $(am_calc_OBJECTS) calc_LDADD = $(LDADD) am__DEPENDENCIES_1 = calc_DEPENDENCIES = $(top_builddir)/libgmp.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = am__depfiles_maybe = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || -LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) -LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) -YLWRAP = $(top_srcdir)/ylwrap -@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || -YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) -LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) +LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) +YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) +LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \ + $(AM_YFLAGS) SOURCES = $(calc_SOURCES) DIST_SOURCES = $(calc_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -138,6 +104,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -153,17 +120,16 @@ CYGPATH_W = @CYGPATH_W@ DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ +ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_STATIC_FALSE = @ENABLE_STATIC_FALSE@ +ENABLE_STATIC_TRUE = @ENABLE_STATIC_TRUE@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -177,12 +143,10 @@ HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ HAVE_STACK_T_01 = @HAVE_STACK_T_01@ HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ @@ -197,26 +161,20 @@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -226,31 +184,26 @@ SHELL = @SHELL@ SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ STRIP = @STRIP@ TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ +U = @U@ U_FOR_BUILD = @U_FOR_BUILD@ VERSION = @VERSION@ +WANT_CXX_FALSE = @WANT_CXX_FALSE@ +WANT_CXX_TRUE = @WANT_CXX_TRUE@ +WANT_MPBSD_FALSE = @WANT_MPBSD_FALSE@ +WANT_MPBSD_TRUE = @WANT_MPBSD_TRUE@ WITH_READLINE_01 = @WITH_READLINE_01@ YACC = @YACC@ YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ -builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -274,6 +227,7 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ +mpn_objs_in_libmp = @mpn_objs_in_libmp@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ @@ -281,12 +235,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ INCLUDES = -I$(top_srcdir) # $(LEXLIB) is not actually needed for flex (which means the distributed @@ -307,14 +257,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps demos/calc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps demos/calc/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps demos/calc/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu --ignore-deps demos/calc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -332,21 +282,27 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): calc-config.h: $(top_builddir)/config.status $(srcdir)/calc-config-h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ calc.h: calc.c - @if test ! -f $@; then rm -f calc.c; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) calc.c; else :; fi -calc$(EXEEXT): $(calc_OBJECTS) $(calc_DEPENDENCIES) $(EXTRA_calc_DEPENDENCIES) + @if test ! -f $@; then \ + rm -f calc.c; \ + $(MAKE) calc.c; \ + else :; fi +calc$(EXEEXT): $(calc_OBJECTS) $(calc_DEPENDENCIES) @rm -f calc$(EXEEXT) - $(LINK) $(calc_OBJECTS) $(calc_LDADD) $(LIBS) + $(LINK) $(calc_LDFLAGS) $(calc_OBJECTS) $(calc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c +$(top_builddir)/ansi2knr: + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) ansi2knr + +mostlyclean-kr: + -test "$U" = "" || rm -f *_.c .c.o: $(COMPILE) -c $< @@ -356,12 +312,39 @@ distclean-compile: .c.lo: $(LTCOMPILE) -c -o $@ $< +calc_.c: calc.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/calc.c; then echo $(srcdir)/calc.c; else echo calc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +calclex_.c: calclex.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/calclex.c; then echo $(srcdir)/calclex.c; else echo calclex.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +calcread_.c: calcread.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/calcread.c; then echo $(srcdir)/calcread.c; else echo calcread.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +calc_.$(OBJEXT) calc_.lo calclex_.$(OBJEXT) calclex_.lo \ +calcread_.$(OBJEXT) calcread_.lo : $(ANSI2KNR) .l.c: - $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) + $(LEXCOMPILE) $< + sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|$@|' $(LEX_OUTPUT_ROOT).c >$@ + rm -f $(LEX_OUTPUT_ROOT).c .y.c: - $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) + $(YACCCOMPILE) $< + if test -f y.tab.h; then \ + to=`echo "$*_H" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \ + sed "/^#/ s/Y_TAB_H/$$to/g" y.tab.h >$*.ht; \ + rm -f y.tab.h; \ + if cmp -s $*.ht $*.h; then \ + rm -f $*.ht ;\ + else \ + mv $*.ht $*.h; \ + fi; \ + fi + if test -f y.output; then \ + mv y.output $*.output; \ + fi + sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@ + rm -f y.tab.c mostlyclean-libtool: -rm -f *.lo @@ -369,85 +352,82 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +distclean-libtool: + -rm -f libtool +uninstall-info-am: + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - set x; \ + tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -z "$$unique" && unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique + $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ + @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 \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done @@ -467,31 +447,25 @@ install-am: all-am installcheck: installcheck-am install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi + $(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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -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." - -rm -f calc.c -rm -f calc.h - -rm -f calclex.c + -rm -f calc.c -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -rm -f calclex.c clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -499,7 +473,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags + distclean-libtool distclean-tags dvi: dvi-am @@ -507,38 +481,18 @@ dvi-am: html: html-am -html-am: - info: info-am info-am: install-data-am: -install-dvi: install-dvi-am - -install-dvi-am: - install-exec-am: -install-html: install-html-am - -install-html-am: - install-info: install-info-am -install-info-am: - install-man: -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - installcheck-am: maintainer-clean: maintainer-clean-am @@ -547,7 +501,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ +mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr \ mostlyclean-libtool pdf: pdf-am @@ -558,26 +512,21 @@ ps: ps-am ps-am: -uninstall-am: - -.MAKE: all check install install-am install-strip +uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ + 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-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + mostlyclean-generic mostlyclean-kr mostlyclean-libtool pdf \ + pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am allprogs: $(EXTRA_PROGRAMS) - # 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/gmp/demos/calc/README b/gmp/demos/calc/README index 660394ecbc..f2f613049d 100644 --- a/gmp/demos/calc/README +++ b/gmp/demos/calc/README @@ -12,7 +12,7 @@ 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 https://www.gnu.org/licenses/. +this program. If not, see http://www.gnu.org/licenses/. diff --git a/gmp/demos/calc/calc-common.h b/gmp/demos/calc/calc-common.h index 7a9187826f..c9ca8a6743 100644 --- a/gmp/demos/calc/calc-common.h +++ b/gmp/demos/calc/calc-common.h @@ -14,7 +14,7 @@ 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 https://www.gnu.org/licenses/. */ +this program. If not, see http://www.gnu.org/licenses/. */ #include <stddef.h> /* for size_t */ #ifndef NO_CALC_H diff --git a/gmp/demos/calc/calc-config-h.in b/gmp/demos/calc/calc-config-h.in index 42cdd440c2..6ecf43e72e 100644 --- a/gmp/demos/calc/calc-config-h.in +++ b/gmp/demos/calc/calc-config-h.in @@ -14,7 +14,7 @@ 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 https://www.gnu.org/licenses/. */ +this program. If not, see http://www.gnu.org/licenses/. */ /* Define if GNU readline should be used. */ diff --git a/gmp/demos/calc/calc.c b/gmp/demos/calc/calc.c index a306d1a563..afc7660d24 100644 --- a/gmp/demos/calc/calc.c +++ b/gmp/demos/calc/calc.c @@ -1,73 +1,42 @@ -/* A Bison parser, made by GNU Bison 2.7.12-4996. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 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 <http://www.gnu.org/licenses/>. */ - -/* 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. */ +/* A Bison parser, made from calc.y + by GNU bison 1.34. */ + +#define YYBISON 1 /* Identify Bison output. */ + +# define EOS 257 +# define BAD 258 +# define HELP 259 +# define HEX 260 +# define DECIMAL 261 +# define QUIT 262 +# define ABS 263 +# define BIN 264 +# define FIB 265 +# define GCD 266 +# define KRON 267 +# define LCM 268 +# define LUCNUM 269 +# define NEXTPRIME 270 +# define POWM 271 +# define ROOT 272 +# define SQRT 273 +# define NUMBER 274 +# define VARIABLE 275 +# define LOR 276 +# define LAND 277 +# define EQ 278 +# define NE 279 +# define LE 280 +# define GE 281 +# define LSHIFT 282 +# define RSHIFT 283 +# define UMINUS 284 -/* 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.7.12-4996" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - - - - -/* Copy the first part of user declarations. */ -/* Line 371 of yacc.c */ #line 1 "calc.y" /* A simple integer desk calculator using yacc and gmp. -Copyright 2000-2002 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -81,7 +50,7 @@ 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 https://www.gnu.org/licenses/. */ +this program. If not, see http://www.gnu.org/licenses/. */ /* This is a simple program, meant only to show one way to use GMP for this @@ -171,10 +140,10 @@ mpz_t stack[100]; mpz_ptr sp = stack[0]; #define CHECK_OVERFLOW() \ - if (sp >= stack[numberof(stack)]) /* FIXME */ \ + if (sp >= stack[numberof(stack)]) \ { \ fprintf (stderr, \ - "Value stack overflow, too much nesting in expression\n"); \ + "Value stack overflow, too much nesting in expression\n"); \ YYERROR; \ } @@ -204,393 +173,29 @@ mpz_t variable[26]; } -/* Line 371 of yacc.c */ -#line 209 "calc.c" - -# ifndef YY_NULL -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr -# else -# define YY_NULL 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "y.tab.h". */ -#ifndef YY_YY_Y_TAB_H_INCLUDED -# define YY_YY_Y_TAB_H_INCLUDED -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - EOS = 258, - BAD = 259, - HELP = 260, - HEX = 261, - DECIMAL = 262, - QUIT = 263, - ABS = 264, - BIN = 265, - FIB = 266, - GCD = 267, - KRON = 268, - LCM = 269, - LUCNUM = 270, - NEXTPRIME = 271, - POWM = 272, - ROOT = 273, - SQRT = 274, - NUMBER = 275, - VARIABLE = 276, - LOR = 277, - LAND = 278, - GE = 279, - LE = 280, - NE = 281, - EQ = 282, - RSHIFT = 283, - LSHIFT = 284, - UMINUS = 285 - }; -#endif -/* Tokens. */ -#define EOS 258 -#define BAD 259 -#define HELP 260 -#define HEX 261 -#define DECIMAL 262 -#define QUIT 263 -#define ABS 264 -#define BIN 265 -#define FIB 266 -#define GCD 267 -#define KRON 268 -#define LCM 269 -#define LUCNUM 270 -#define NEXTPRIME 271 -#define POWM 272 -#define ROOT 273 -#define SQRT 274 -#define NUMBER 275 -#define VARIABLE 276 -#define LOR 277 -#define LAND 278 -#define GE 279 -#define LE 280 -#define NE 281 -#define EQ 282 -#define RSHIFT 283 -#define LSHIFT 284 -#define UMINUS 285 - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ -/* Line 387 of yacc.c */ -#line 142 "calc.y" - +#line 143 "calc.y" +#ifndef YYSTYPE +typedef union { char *str; int var; - - -/* Line 387 of yacc.c */ -#line 318 "calc.c" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - -extern YYSTYPE yylval; - -#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 */ - -#endif /* !YY_YY_Y_TAB_H_INCLUDED */ - -/* Copy the second part of user declarations. */ - -/* Line 390 of yacc.c */ -#line 346 "calc.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 <stddef.h> /* 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 <libintl.h> /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif +} yystype; +# define YYSTYPE yystype #endif - -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if (! defined __GNUC__ || __GNUC__ < 2 \ - || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) -# define __attribute__(Spec) /* empty */ -# endif +#ifndef YYDEBUG +# define YYDEBUG 0 #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 +#define YYFINAL 118 +#define YYFLAG -32768 +#define YYNTBASE 44 -#if ! defined yyoverflow || YYERROR_VERBOSE +/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ +#define YYTRANSLATE(x) ((unsigned)(x) <= 284 ? yytranslate[x] : 50) -/* 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 <alloca.h> /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# 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 EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (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 EXIT_SUCCESS && (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) - -# define YYCOPY_NEEDED 1 - -/* 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 - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 41 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 552 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 44 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 7 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 49 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 118 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 285 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = +/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ +static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -617,245 +222,223 @@ static const yytype_uint8 yytranslate[] = 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, 26, - 27, 28, 29, 30, 31, 37 + 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 26, 27, + 28, 29, 30, 31, 37 }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = +static const short yyprhs[] = { - 0, 0, 3, 5, 8, 11, 15, 18, 19, 21, - 25, 27, 29, 31, 33, 37, 41, 45, 49, 53, - 57, 61, 65, 69, 72, 75, 79, 83, 87, 91, - 95, 99, 103, 107, 112, 119, 124, 129, 136, 141, - 146, 151, 160, 167, 172, 174, 176, 178, 182, 184 + 0, 0, 2, 5, 8, 12, 15, 16, 18, 22, + 24, 26, 28, 30, 34, 38, 42, 46, 50, 54, + 58, 62, 66, 69, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 109, 116, 121, 126, 133, 138, 143, + 148, 157, 164, 169, 171, 173, 175, 179, 181 }; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = +static const short yyrhs[] = { - 45, 0, -1, 47, -1, 46, 47, -1, 47, 3, - -1, 46, 47, 3, -1, 1, 3, -1, -1, 48, - -1, 21, 40, 48, -1, 5, -1, 6, -1, 7, - -1, 8, -1, 41, 48, 42, -1, 48, 32, 48, - -1, 48, 33, 48, -1, 48, 34, 48, -1, 48, - 35, 48, -1, 48, 36, 48, -1, 48, 38, 48, - -1, 48, 31, 48, -1, 48, 30, 48, -1, 48, - 39, -1, 33, 48, -1, 48, 24, 48, -1, 48, - 27, 48, -1, 48, 29, 48, -1, 48, 28, 48, - -1, 48, 26, 48, -1, 48, 25, 48, -1, 48, - 23, 48, -1, 48, 22, 48, -1, 9, 41, 48, - 42, -1, 10, 41, 48, 43, 48, 42, -1, 11, - 41, 48, 42, -1, 12, 41, 49, 42, -1, 13, - 41, 48, 43, 48, 42, -1, 14, 41, 50, 42, - -1, 15, 41, 48, 42, -1, 16, 41, 48, 42, - -1, 17, 41, 48, 43, 48, 43, 48, 42, -1, - 18, 41, 48, 43, 48, 42, -1, 19, 41, 48, - 42, -1, 21, -1, 20, -1, 48, -1, 49, 43, - 48, -1, 48, -1, 50, 43, 48, -1 + 46, 0, 45, 46, 0, 46, 3, 0, 45, 46, + 3, 0, 1, 3, 0, 0, 47, 0, 21, 40, + 47, 0, 5, 0, 6, 0, 7, 0, 8, 0, + 41, 47, 42, 0, 47, 32, 47, 0, 47, 33, + 47, 0, 47, 34, 47, 0, 47, 35, 47, 0, + 47, 36, 47, 0, 47, 38, 47, 0, 47, 30, + 47, 0, 47, 31, 47, 0, 47, 39, 0, 33, + 47, 0, 47, 24, 47, 0, 47, 28, 47, 0, + 47, 26, 47, 0, 47, 27, 47, 0, 47, 29, + 47, 0, 47, 25, 47, 0, 47, 23, 47, 0, + 47, 22, 47, 0, 9, 41, 47, 42, 0, 10, + 41, 47, 43, 47, 42, 0, 11, 41, 47, 42, + 0, 12, 41, 48, 42, 0, 13, 41, 47, 43, + 47, 42, 0, 14, 41, 49, 42, 0, 15, 41, + 47, 42, 0, 16, 41, 47, 42, 0, 17, 41, + 47, 43, 47, 43, 47, 42, 0, 18, 41, 47, + 43, 47, 42, 0, 19, 41, 47, 42, 0, 21, + 0, 20, 0, 47, 0, 48, 43, 47, 0, 47, + 0, 49, 43, 47, 0 }; -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = +#endif + +#if YYDEBUG +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const short yyrline[] = { - 0, 167, 167, 168, 171, 172, 173, 175, 177, 182, - 188, 189, 190, 191, 197, 198, 199, 200, 201, 202, - 203, 205, 207, 209, 211, 213, 214, 215, 216, 217, - 218, 220, 221, 223, 224, 226, 228, 229, 231, 232, - 234, 235, 236, 238, 240, 246, 257, 258, 261, 262 + 0, 167, 169, 171, 173, 174, 176, 178, 183, 189, + 190, 191, 192, 197, 199, 200, 201, 202, 203, 204, + 206, 208, 210, 212, 214, 215, 216, 217, 218, 219, + 221, 222, 224, 225, 227, 229, 230, 232, 233, 235, + 236, 237, 239, 241, 247, 257, 259, 261, 263 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ + +#if (YYDEBUG) || defined YYERROR_VERBOSE + +/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "EOS", "BAD", "HELP", "HEX", "DECIMAL", - "QUIT", "ABS", "BIN", "FIB", "GCD", "KRON", "LCM", "LUCNUM", "NEXTPRIME", - "POWM", "ROOT", "SQRT", "NUMBER", "VARIABLE", "LOR", "LAND", "'<'", - "'>'", "GE", "LE", "NE", "EQ", "RSHIFT", "LSHIFT", "'+'", "'-'", "'*'", - "'/'", "'%'", "UMINUS", "'^'", "'!'", "'='", "'('", "')'", "','", - "$accept", "top", "statements", "statement", "e", "gcdlist", "lcmlist", YY_NULL + "$", "error", "$undefined.", "EOS", "BAD", "HELP", "HEX", "DECIMAL", + "QUIT", "ABS", "BIN", "FIB", "GCD", "KRON", "LCM", "LUCNUM", + "NEXTPRIME", "POWM", "ROOT", "SQRT", "NUMBER", "VARIABLE", "LOR", + "LAND", "'<'", "'>'", "EQ", "NE", "LE", "GE", "LSHIFT", "RSHIFT", "'+'", + "'-'", "'*'", "'/'", "'%'", "UMINUS", "'^'", "'!'", "'='", "'('", "')'", + "','", "top", "statements", "statement", "e", "gcdlist", "lcmlist", 0 }; #endif -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const short yyr1[] = { - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 60, 62, 279, 280, 281, 282, - 283, 284, 43, 45, 42, 47, 37, 285, 94, 33, - 61, 40, 41, 44 + 0, 44, 44, 45, 45, 45, 46, 46, 46, 46, + 46, 46, 46, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 48, 48, 49, 49 }; -# endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const short yyr2[] = { - 0, 44, 45, 45, 46, 46, 46, 47, 47, 47, - 47, 47, 47, 47, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 49, 49, 50, 50 + 0, 1, 2, 2, 3, 2, 0, 1, 3, 1, + 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, + 3, 3, 4, 6, 4, 4, 6, 4, 4, 4, + 8, 6, 4, 1, 1, 1, 3, 1, 3 }; -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE + doesn't specify something else to do. Zero means the default is an + error. */ +static const short yydefact[] = { - 0, 2, 1, 2, 2, 3, 2, 0, 1, 3, - 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 4, 6, 4, 4, 6, 4, 4, - 4, 8, 6, 4, 1, 1, 1, 3, 1, 3 + 0, 0, 9, 10, 11, 12, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 44, 43, 0, + 0, 6, 1, 7, 5, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 43, 23, 0, + 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, + 0, 0, 45, 0, 0, 47, 0, 0, 0, 0, + 0, 0, 8, 13, 4, 31, 30, 24, 29, 26, + 27, 25, 28, 20, 21, 14, 15, 16, 17, 18, + 19, 32, 0, 34, 35, 0, 0, 37, 0, 38, + 39, 0, 0, 42, 0, 46, 0, 48, 0, 0, + 33, 36, 0, 41, 0, 40, 0, 0, 0 }; -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = +static const short yydefgoto[] = { - 0, 0, 10, 11, 12, 13, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 45, 44, 0, - 0, 0, 7, 2, 8, 6, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 44, 24, - 0, 1, 3, 4, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 23, 0, 0, 0, 46, 0, 0, 48, 0, 0, - 0, 0, 0, 0, 9, 14, 5, 32, 31, 25, - 30, 29, 26, 28, 27, 22, 21, 15, 16, 17, - 18, 19, 20, 33, 0, 35, 36, 0, 0, 38, - 0, 39, 40, 0, 0, 43, 0, 47, 0, 49, - 0, 0, 34, 37, 0, 42, 0, 41 + 116, 21, 22, 23, 63, 66 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = +static const short yypact[] = { - -1, 21, 22, 23, 24, 65, 68 + 39, 17,-32768,-32768,-32768,-32768, -20, 0, 2, 25, + 28, 30, 33, 34, 37, 40, 46,-32768, -18, 122, + 122, 89, 67, 462,-32768, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122,-32768, -36, 252, + 87,-32768, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122,-32768, 273, + 142, 294, 462, -38, 164, 462, -24, 315, 336, 186, + 208, 357, 462,-32768,-32768, 479, 495, 511, 511, 511, + 511, 511, 511, 29, 29, 50, 50, -36, -36, -36, + -36,-32768, 122,-32768,-32768, 122, 122,-32768, 122,-32768, + -32768, 122, 122,-32768, 378, 462, 399, 462, 230, 420, + -32768,-32768, 122,-32768, 441,-32768, 91, 92,-32768 }; -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -39 -static const yytype_int16 yypact[] = +static const short yypgoto[] = { - 41, 3, -39, -39, -39, -39, 2, 4, 27, 32, - 35, 36, 39, 42, 45, 46, 47, -39, -18, 124, - 124, 89, 91, 87, 464, -39, 124, 124, 124, 124, - 124, 124, 124, 124, 124, 124, 124, 124, -39, -36, - 254, -39, 88, -39, 124, 124, 124, 124, 124, 124, - 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, - -39, 275, 144, 296, 464, -38, 166, 464, 29, 317, - 338, 188, 210, 359, 464, -39, -39, 481, 497, 513, - 513, 513, 513, 513, 513, 31, 31, -15, -15, -36, - -36, -36, -36, -39, 124, -39, -39, 124, 124, -39, - 124, -39, -39, 124, 124, -39, 380, 464, 401, 464, - 232, 422, -39, -39, 124, -39, 443, -39 + -32768,-32768, 90, -19,-32768,-32768 }; -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -39, -39, -39, 70, -19, -39, -39 -}; -/* 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 YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -8 -static const yytype_int8 yytable[] = +#define YYLAST 550 + + +static const short yytable[] = { - 39, 40, 59, 60, 96, 97, 25, 61, 62, 63, - 64, 66, 67, 69, 70, 71, 72, 73, 74, 56, - 57, 58, 37, 59, 60, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, -7, 1, 26, -7, 27, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 54, 55, 56, 57, 58, 28, 59, - 60, 99, 100, 29, 19, 106, 30, 31, 107, 108, - 32, 109, 20, 33, 110, 111, 34, 35, 36, 41, - 43, 76, 42, 0, 0, 116, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, - 0, 0, 20, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 38, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, - 0, 0, 0, 0, 0, 20, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 0, 59, 60, 0, 0, 0, 94, 44, 45, + 38, 39, 57, 58, 94, 95, 59, 60, 61, 62, + 64, 65, 67, 68, 69, 70, 71, 72, 97, 98, + 24, 25, 36, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, -6, + 1, 26, -6, 27, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 52, 53, 54, 55, 56, 28, 57, 58, 29, + 41, 30, 19, 104, 31, 32, 105, 106, 33, 107, + 20, 34, 108, 109, 54, 55, 56, 35, 57, 58, + 74, 117, 118, 114, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 40, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, + 20, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 37, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, + 0, 0, 0, 20, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 0, + 57, 58, 0, 0, 0, 92, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 0, 59, 60, 0, 0, 0, 98, + 56, 0, 57, 58, 0, 0, 0, 96, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 0, 59, 60, 0, 0, - 0, 103, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 0, 59, 60, - 0, 0, 0, 104, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, - 59, 60, 0, 0, 0, 114, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 0, 59, 60, 0, 0, 75, 44, 45, 46, + 54, 55, 56, 0, 57, 58, 0, 0, 0, 101, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 0, 57, 58, 0, 0, + 0, 102, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 0, 57, 58, + 0, 0, 0, 112, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 0, + 57, 58, 0, 0, 73, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 0, 59, 60, 0, 0, 93, 44, 45, + 0, 57, 58, 0, 0, 91, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 0, 59, 60, 0, 0, 95, 44, + 56, 0, 57, 58, 0, 0, 93, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 0, 59, 60, 0, 0, 101, + 55, 56, 0, 57, 58, 0, 0, 99, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 0, 59, 60, 0, 0, - 102, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 0, 59, 60, 0, - 0, 105, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 0, 59, 60, - 0, 0, 112, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 0, 59, - 60, 0, 0, 113, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, - 59, 60, 0, 0, 115, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 0, 59, 60, 0, 0, 117, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 0, 59, 60, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 0, 59, - 60, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 0, 59, 60, -8, -8, -8, - -8, -8, -8, 52, 53, 54, 55, 56, 57, 58, - 0, 59, 60 + 54, 55, 56, 0, 57, 58, 0, 0, 100, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 0, 57, 58, 0, 0, 103, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 0, 57, 58, 0, 0, + 110, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 0, 57, 58, 0, + 0, 111, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 0, 57, 58, + 0, 0, 113, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 0, 57, + 58, 0, 0, 115, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 0, + 57, 58, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 0, 57, 58, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 0, 57, 58,-32768,-32768,-32768,-32768,-32768, + -32768, 50, 51, 52, 53, 54, 55, 56, 0, 57, + 58 }; -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-39))) - -#define yytable_value_is_error(Yytable_value) \ - (!!((Yytable_value) == (-8))) - -static const yytype_int8 yycheck[] = +static const short yycheck[] = { - 19, 20, 38, 39, 42, 43, 3, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 34, - 35, 36, 40, 38, 39, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 0, 1, 41, 3, 41, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 32, 33, 34, 35, 36, 41, 38, - 39, 42, 43, 41, 33, 94, 41, 41, 97, 98, - 41, 100, 41, 41, 103, 104, 41, 41, 41, 0, - 3, 3, 22, -1, -1, 114, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, - -1, -1, 41, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, - -1, -1, -1, -1, -1, 41, 22, 23, 24, 25, + 19, 20, 38, 39, 42, 43, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 42, 43, + 3, 41, 40, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, + 1, 41, 3, 41, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 32, 33, 34, 35, 36, 41, 38, 39, 41, + 3, 41, 33, 92, 41, 41, 95, 96, 41, 98, + 41, 41, 101, 102, 34, 35, 36, 41, 38, 39, + 3, 0, 0, 112, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 21, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 33, -1, -1, -1, -1, -1, -1, -1, + 41, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, + -1, -1, -1, 41, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, + 38, 39, -1, -1, -1, 43, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, 38, 39, -1, -1, -1, 43, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, @@ -866,7 +449,9 @@ static const yytype_int8 yycheck[] = 30, 31, 32, 33, 34, 35, 36, -1, 38, 39, -1, -1, -1, 43, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, - 38, 39, -1, -1, -1, 43, 22, 23, 24, 25, + 38, 39, -1, -1, 42, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + -1, 38, 39, -1, -1, 42, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, 38, 39, -1, -1, 42, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, @@ -885,97 +470,209 @@ static const yytype_int8 yycheck[] = 29, 30, 31, 32, 33, 34, 35, 36, -1, 38, 39, -1, -1, 42, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, - 38, 39, -1, -1, 42, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - -1, 38, 39, -1, -1, 42, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, -1, 38, 39, 23, 24, 25, 26, 27, 28, + 38, 39, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, -1, 38, 39, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, -1, 38, 39, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, 38, - 39, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, -1, 38, 39, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - -1, 38, 39 + 39 }; +/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ +#line 3 "/usr/share/bison/bison.simple" + +/* Skeleton output parser for bison, + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 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, 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 http://www.gnu.org/licenses/. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* This is the parser code that is written into each bison parser when + the %semantic_parser declaration is not specified in the grammar. + It was written by Richard Stallman by simplifying the hairy parser + used when %semantic_parser is specified. */ -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = +/* 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. */ + +#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# if YYSTACK_USE_ALLOCA +# define YYSTACK_ALLOC alloca +# else +# ifndef YYSTACK_USE_ALLOCA +# if defined (alloca) || defined (_ALLOCA_H) +# define YYSTACK_ALLOC alloca +# else +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# else +# if defined (__STDC__) || defined (__cplusplus) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +# define YYSTACK_ALLOC malloc +# define YYSTACK_FREE free +# endif + +/* A type that is properly aligned for any stack member. */ +union yyalloc { - 0, 1, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 33, - 41, 45, 46, 47, 48, 3, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 40, 21, 48, - 48, 0, 47, 3, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, - 39, 48, 48, 48, 48, 49, 48, 48, 50, 48, - 48, 48, 48, 48, 48, 42, 3, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 42, 43, 42, 42, 43, 43, 42, - 43, 42, 42, 43, 43, 42, 48, 48, 48, 48, - 48, 48, 42, 42, 43, 42, 48, 42 + short yyss; + YYSTYPE yyvs; +# if YYLSP_NEEDED + YYLTYPE yyls; +# endif }; +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# if YYLSP_NEEDED +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAX) +# else +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAX) +# endif + +/* Relocate the TYPE 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(Type, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + yymemcpy ((char *) yyptr, (char *) (Stack), \ + yysize * (YYSIZE_T) sizeof (Type)); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ + + +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ +#endif +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# if defined (__STDC__) || defined (__cplusplus) +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) +#define YYEMPTY -2 #define YYEOF 0 - #define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrlab1 /* 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. */ - + Once GCC version 2 has supplanted version 1, this can go. */ #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) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yychar1 = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror ("syntax error: cannot back up"); \ YYERROR; \ } \ -while (YYID (0)) +while (0) -/* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +/* YYLLOC_DEFAULT -- Compute the default location (before the actions + are run). + + When YYLLOC_DEFAULT is run, CURRENT is set the location of the + first token. By default, to implement support for ranges, extend + its range to the last symbol. */ + +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + Current.last_line = Rhs[N].last_line; \ + Current.last_column = Rhs[N].last_column; #endif /* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif + +#if YYPURE +# if YYLSP_NEEDED +# ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) +# else +# define YYLEX yylex (&yylval, &yylloc) +# endif +# else /* !YYLSP_NEEDED */ +# ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +# else +# define YYLEX yylex (&yylval) +# endif +# endif /* !YYLSP_NEEDED */ +#else /* !YYPURE */ +# define YYLEX yylex () +#endif /* !YYPURE */ + /* Enable debugging if requested. */ #if YYDEBUG @@ -989,156 +686,14 @@ while (YYID (0)) 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 -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| 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)) - +} while (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 @@ -1148,58 +703,86 @@ int yydebug; 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) + SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ +#if YYMAXDEPTH == 0 +# undef YYMAXDEPTH +#endif + #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif + +#if ! defined (yyoverflow) && ! defined (yymemcpy) +# if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +# define yymemcpy __builtin_memcpy +# else /* not GNU C or C++ */ + +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ +static void +# if defined (__STDC__) || defined (__cplusplus) +yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount) +# else +yymemcpy (yyto, yyfrom, yycount) + char *yyto; + const char *yyfrom; + YYSIZE_T yycount; +# endif +{ + register const char *yyf = yyfrom; + register char *yyt = yyto; + register YYSIZE_T yyi = yycount; + while (yyi-- != 0) + *yyt++ = *yyf++; +} +# endif +#endif -#if YYERROR_VERBOSE +#ifdef YYERROR_VERBOSE # ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H +# 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 +# if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) -#else -static YYSIZE_T +# else yystrlen (yystr) - const char *yystr; -#endif + const char *yystr; +# endif { - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) + register const char *yys = yystr; + + while (*yys++ != '\0') continue; - return yylen; + + return yys - yystr - 1; } # endif # endif # ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# 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 * +# if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) -#else -static char * +# else yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif + char *yydest; + const char *yysrc; +# endif { - char *yyd = yydest; - const char *yys = yysrc; + register char *yyd = yydest; + register const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; @@ -1208,323 +791,149 @@ yystpcpy (yydest, yysrc) } # endif # endif +#endif + +#line 319 "/usr/share/bison/bison.simple" -# 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); +/* The user can define YYPARSE_PARAM as the name of an argument to be passed + into yyparse. The argument should have type void *. + It should actually point to an object. + Grammar actions can access the variable by casting it + to the proper pointer type. */ - return yystpcpy (yyres, yystr) - yyres; -} +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM +# define YYPARSE_PARAM_DECL +# else +# define YYPARSE_PARAM_ARG YYPARSE_PARAM +# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; # endif +#else /* !YYPARSE_PARAM */ +# define YYPARSE_PARAM_ARG +# define YYPARSE_PARAM_DECL +#endif /* !YYPARSE_PARAM */ + +/* Prevent warning if -Wstrict-prototypes. */ +#ifdef __GNUC__ +# ifdef YYPARSE_PARAM +int yyparse (void *); +# else +int yyparse (void); +# endif +#endif -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULL; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - 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 yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* 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 = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ +/* YY_DECL_VARIABLES -- depending whether we use a pure parser, + variables are global, or local to YYPARSE. */ + +#define YY_DECL_NON_LSP_VARIABLES \ +/* The lookahead symbol. */ \ +int yychar; \ + \ +/* The semantic value of the lookahead symbol. */ \ +YYSTYPE yylval; \ + \ +/* Number of parse errors so far. */ \ +int yynerrs; -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#if YYLSP_NEEDED +# define YY_DECL_VARIABLES \ +YY_DECL_NON_LSP_VARIABLES \ + \ +/* Location data for the lookahead symbol. */ \ +YYLTYPE yylloc; #else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; +# define YY_DECL_VARIABLES \ +YY_DECL_NON_LSP_VARIABLES #endif -{ - YYUSE (yyvaluep); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YYUSE (yytype); -} +/* If nonreentrant, generate the variables here. */ +#if !YYPURE +YY_DECL_VARIABLES +#endif /* !YYPURE */ -/* The lookahead symbol. */ -int yychar; - +int +yyparse (YYPARSE_PARAM_ARG) + YYPARSE_PARAM_DECL +{ + /* If reentrant, generate the variables here. */ +#if YYPURE + YY_DECL_VARIABLES +#endif /* !YYPURE */ -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ + register int yystate; + register int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Lookahead token as an internal (translated) token number. */ + int yychar1 = 0; + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + short yyssa[YYINITDEPTH]; + short *yyss = yyssa; + register short *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + register YYSTYPE *yyvsp; + +#if YYLSP_NEEDED + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; #endif -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - -/* Number of syntax errors so far. */ -int yynerrs; - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) +#if YYLSP_NEEDED +# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; +# define YYPOPSTACK (yyvsp--, yyssp--) #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. + YYSIZE_T yystacksize = YYINITDEPTH; - Refer to the stacks through 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 = 0; /* 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; +#if YYLSP_NEEDED + YYLTYPE yyloc; #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; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; + /* When reducing, the number of symbols on the RHS of the reduced + rule. */ + int yylen; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + 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; +#if YYLSP_NEEDED + yylsp = yyls; +#endif goto yysetstate; /*------------------------------------------------------------. @@ -1532,143 +941,191 @@ yyparse () `------------------------------------------------------------*/ 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. */ + have just been pushed. so pushing a state here evens the stacks. + */ yyssp++; yysetstate: *yyssp = yystate; - if (yyss + yystacksize - 1 <= yyssp) + if (yyssp >= yyss + yystacksize - 1) { /* 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 + /* 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; + short *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"), + data in use in that stack, in bytes. */ +# if YYLSP_NEEDED + YYLTYPE *yyls1 = yyls; + /* This used to be a conditional around just the two extra args, + but that might be undefined if yyoverflow is a macro. */ + yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), + &yyls1, yysize * sizeof (*yylsp), &yystacksize); - + yyls = yyls1; +# else + yyoverflow ("parser stack overflow", + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); +# endif yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + if (yystacksize >= YYMAXDEPTH) + goto yyoverflowlab; yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) + if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; + short *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 + goto yyoverflowlab; + YYSTACK_RELOCATE (short, yyss); + YYSTACK_RELOCATE (YYSTYPE, yyvs); +# if YYLSP_NEEDED + YYSTACK_RELOCATE (YYLTYPE, yyls); +# endif +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } -# endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; +#if YYLSP_NEEDED + yylsp = yyls + yysize - 1; +#endif YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); - if (yyss + yystacksize - 1 <= yyssp) + if (yyssp >= yyss + yystacksize - 1) 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. */ +/* Do appropriate processing given the current state. */ +/* Read a lookahead token if we need one and don't already have one. */ +/* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yyn == YYFLAG) 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. */ + /* yychar is either YYEMPTY or YYEOF + or a valid token in external form. */ + if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } - if (yychar <= YYEOF) + /* Convert token to internal form (in yychar1) for indexing tables with */ + + if (yychar <= 0) /* This means end of input. */ { - yychar = yytoken = YYEOF; + yychar1 = 0; + yychar = YYEOF; /* Don't call YYLEX any more */ + YYDPRINTF ((stderr, "Now at end of input.\n")); } else { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + yychar1 = YYTRANSLATE (yychar); + +#if YYDEBUG + /* We have to keep this `#if YYDEBUG', since we use variables + which are defined only if `YYDEBUG' is set. */ + if (yydebug) + { + YYFPRINTF (stderr, "Next token is %d (%s", + yychar, yytname[yychar1]); + /* Give the individual parser a way to print the precise + meaning of a token, for further debugging info. */ +# ifdef YYPRINT + YYPRINT (stderr, yychar, yylval); +# endif + YYFPRINTF (stderr, ")\n"); + } +#endif } - /* 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) + yyn += yychar1; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; + yyn = yytable[yyn]; - if (yyn <= 0) + + /* yyn is what to do for this token type in this state. + Negative => reduce, -yyn is rule number. + Positive => shift, yyn is new state. + New state is final state => don't bother to shift, + just return success. + 0, or most negative number => error. */ + + if (yyn < 0) { - if (yytable_value_is_error (yyn)) - goto yyerrlab; + if (yyn == YYFLAG) + goto yyerrlab; yyn = -yyn; goto yyreduce; } + else if (yyn == 0) + goto yyerrlab; - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; + if (yyn == YYFINAL) + YYACCEPT; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + YYDPRINTF ((stderr, "Shifting token %d (%s), ", + yychar, yytname[yychar1])); - /* Discard the shifted token. */ - yychar = YYEMPTY; + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END +#if YYLSP_NEEDED + *++yylsp = yylloc; +#endif + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + yystate = yyn; goto yynewstate; @@ -1692,299 +1149,248 @@ yyreduce: /* 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 + Otherwise, the following line sets YYVAL to the semantic value of + the lookahead token. 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]; +#if YYLSP_NEEDED + /* Similarly for the default location. Let the user run additional + commands if for instance locations are ranges. */ + yyloc = yylsp[1-yylen]; + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); +#endif - YY_REDUCE_PRINT (yyn); - switch (yyn) +#if YYDEBUG + /* We have to keep this `#if YYDEBUG', since we use variables which + are defined only if `YYDEBUG' is set. */ + if (yydebug) { - case 6: -/* Line 1787 of yacc.c */ -#line 173 "calc.y" - { sp = stack[0]; yyerrok; } - break; + int yyi; - case 8: -/* Line 1787 of yacc.c */ -#line 177 "calc.y" - { + YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", + yyn, yyrline[yyn]); + + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) + YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); + YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); + } +#endif + + switch (yyn) { + +case 5: +#line 174 "calc.y" +{ sp = stack[0]; yyerrok; } + break; +case 7: +#line 178 "calc.y" +{ mpz_out_str (stdout, obase, sp); putchar ('\n'); sp--; CHECK_EMPTY (); } break; - - case 9: -/* Line 1787 of yacc.c */ -#line 182 "calc.y" - { - CHECK_VARIABLE ((yyvsp[(1) - (3)].var)); - mpz_swap (variable[(yyvsp[(1) - (3)].var)], sp); +case 8: +#line 183 "calc.y" +{ + CHECK_VARIABLE (yyvsp[-2].var); + mpz_swap (variable[yyvsp[-2].var], sp); sp--; CHECK_EMPTY (); } break; - - case 10: -/* Line 1787 of yacc.c */ -#line 188 "calc.y" - { calc_help (); } - break; - - case 11: -/* Line 1787 of yacc.c */ +case 9: #line 189 "calc.y" - { ibase = 16; obase = -16; } +{ calc_help (); } break; - - case 12: -/* Line 1787 of yacc.c */ +case 10: #line 190 "calc.y" - { ibase = 0; obase = 10; } +{ ibase = 16; obase = -16; } break; - - case 13: -/* Line 1787 of yacc.c */ +case 11: #line 191 "calc.y" - { exit (0); } +{ ibase = 0; obase = 10; } break; - - case 15: -/* Line 1787 of yacc.c */ -#line 198 "calc.y" - { sp--; mpz_add (sp, sp, sp+1); } +case 12: +#line 192 "calc.y" +{ exit (0); } break; - - case 16: -/* Line 1787 of yacc.c */ +case 14: #line 199 "calc.y" - { sp--; mpz_sub (sp, sp, sp+1); } +{ sp--; mpz_add (sp, sp, sp+1); } break; - - case 17: -/* Line 1787 of yacc.c */ +case 15: #line 200 "calc.y" - { sp--; mpz_mul (sp, sp, sp+1); } +{ sp--; mpz_sub (sp, sp, sp+1); } break; - - case 18: -/* Line 1787 of yacc.c */ +case 16: #line 201 "calc.y" - { sp--; mpz_fdiv_q (sp, sp, sp+1); } +{ sp--; mpz_mul (sp, sp, sp+1); } break; - - case 19: -/* Line 1787 of yacc.c */ +case 17: #line 202 "calc.y" - { sp--; mpz_fdiv_r (sp, sp, sp+1); } +{ sp--; mpz_fdiv_q (sp, sp, sp+1); } break; - - case 20: -/* Line 1787 of yacc.c */ +case 18: #line 203 "calc.y" - { CHECK_UI ("Exponent", sp); - sp--; mpz_pow_ui (sp, sp, mpz_get_ui (sp+1)); } +{ sp--; mpz_fdiv_r (sp, sp, sp+1); } break; - - case 21: -/* Line 1787 of yacc.c */ -#line 205 "calc.y" - { CHECK_UI ("Shift count", sp); - sp--; mpz_mul_2exp (sp, sp, mpz_get_ui (sp+1)); } +case 19: +#line 204 "calc.y" +{ CHECK_UI ("Exponent", sp); + sp--; mpz_pow_ui (sp, sp, mpz_get_ui (sp+1)); } break; - - case 22: -/* Line 1787 of yacc.c */ -#line 207 "calc.y" - { CHECK_UI ("Shift count", sp); - sp--; mpz_fdiv_q_2exp (sp, sp, mpz_get_ui (sp+1)); } +case 20: +#line 206 "calc.y" +{ CHECK_UI ("Shift count", sp); + sp--; mpz_mul_2exp (sp, sp, mpz_get_ui (sp+1)); } break; - - case 23: -/* Line 1787 of yacc.c */ -#line 209 "calc.y" - { CHECK_UI ("Factorial", sp); - mpz_fac_ui (sp, mpz_get_ui (sp)); } +case 21: +#line 208 "calc.y" +{ CHECK_UI ("Shift count", sp); + sp--; mpz_fdiv_q_2exp (sp, sp, mpz_get_ui (sp+1)); } break; - - case 24: -/* Line 1787 of yacc.c */ -#line 211 "calc.y" - { mpz_neg (sp, sp); } +case 22: +#line 210 "calc.y" +{ CHECK_UI ("Factorial", sp); + mpz_fac_ui (sp, mpz_get_ui (sp)); } break; - - case 25: -/* Line 1787 of yacc.c */ -#line 213 "calc.y" - { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) < 0); } +case 23: +#line 212 "calc.y" +{ mpz_neg (sp, sp); } break; - - case 26: -/* Line 1787 of yacc.c */ +case 24: #line 214 "calc.y" - { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) <= 0); } +{ sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) < 0); } break; - - case 27: -/* Line 1787 of yacc.c */ +case 25: #line 215 "calc.y" - { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) == 0); } +{ sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) <= 0); } break; - - case 28: -/* Line 1787 of yacc.c */ +case 26: #line 216 "calc.y" - { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) != 0); } +{ sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) == 0); } break; - - case 29: -/* Line 1787 of yacc.c */ +case 27: #line 217 "calc.y" - { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) >= 0); } +{ sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) != 0); } break; - - case 30: -/* Line 1787 of yacc.c */ +case 28: #line 218 "calc.y" - { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) > 0); } +{ sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) >= 0); } break; - - case 31: -/* Line 1787 of yacc.c */ -#line 220 "calc.y" - { sp--; mpz_set_ui (sp, mpz_sgn (sp) && mpz_sgn (sp+1)); } +case 29: +#line 219 "calc.y" +{ sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) > 0); } break; - - case 32: -/* Line 1787 of yacc.c */ +case 30: #line 221 "calc.y" - { sp--; mpz_set_ui (sp, mpz_sgn (sp) || mpz_sgn (sp+1)); } +{ sp--; mpz_set_ui (sp, mpz_sgn (sp) && mpz_sgn (sp+1)); } break; - - case 33: -/* Line 1787 of yacc.c */ -#line 223 "calc.y" - { mpz_abs (sp, sp); } +case 31: +#line 222 "calc.y" +{ sp--; mpz_set_ui (sp, mpz_sgn (sp) || mpz_sgn (sp+1)); } break; - - case 34: -/* Line 1787 of yacc.c */ +case 32: #line 224 "calc.y" - { sp--; CHECK_UI ("Binomial base", sp+1); - mpz_bin_ui (sp, sp, mpz_get_ui (sp+1)); } +{ mpz_abs (sp, sp); } break; - - case 35: -/* Line 1787 of yacc.c */ -#line 226 "calc.y" - { CHECK_UI ("Fibonacci", sp); - mpz_fib_ui (sp, mpz_get_ui (sp)); } +case 33: +#line 225 "calc.y" +{ sp--; CHECK_UI ("Binomial base", sp+1); + mpz_bin_ui (sp, sp, mpz_get_ui (sp+1)); } break; - - case 37: -/* Line 1787 of yacc.c */ -#line 229 "calc.y" - { sp--; mpz_set_si (sp, - mpz_kronecker (sp, sp+1)); } +case 34: +#line 227 "calc.y" +{ CHECK_UI ("Fibonacci", sp); + mpz_fib_ui (sp, mpz_get_ui (sp)); } break; - - case 39: -/* Line 1787 of yacc.c */ -#line 232 "calc.y" - { CHECK_UI ("Lucas number", sp); - mpz_lucnum_ui (sp, mpz_get_ui (sp)); } +case 36: +#line 230 "calc.y" +{ sp--; mpz_set_si (sp, + mpz_kronecker (sp, sp+1)); } break; - - case 40: -/* Line 1787 of yacc.c */ -#line 234 "calc.y" - { mpz_nextprime (sp, sp); } +case 38: +#line 233 "calc.y" +{ CHECK_UI ("Lucas number", sp); + mpz_lucnum_ui (sp, mpz_get_ui (sp)); } break; - - case 41: -/* Line 1787 of yacc.c */ +case 39: #line 235 "calc.y" - { sp -= 2; mpz_powm (sp, sp, sp+1, sp+2); } +{ mpz_nextprime (sp, sp); } break; - - case 42: -/* Line 1787 of yacc.c */ +case 40: #line 236 "calc.y" - { sp--; CHECK_UI ("Nth-root", sp+1); - mpz_root (sp, sp, mpz_get_ui (sp+1)); } +{ sp -= 2; mpz_powm (sp, sp, sp+1, sp+2); } break; - - case 43: -/* Line 1787 of yacc.c */ -#line 238 "calc.y" - { mpz_sqrt (sp, sp); } +case 41: +#line 237 "calc.y" +{ sp--; CHECK_UI ("Nth-root", sp+1); + mpz_root (sp, sp, mpz_get_ui (sp+1)); } break; - - case 44: -/* Line 1787 of yacc.c */ -#line 240 "calc.y" - { - sp++; - CHECK_OVERFLOW (); - CHECK_VARIABLE ((yyvsp[(1) - (1)].var)); - mpz_set (sp, variable[(yyvsp[(1) - (1)].var)]); +case 42: +#line 239 "calc.y" +{ mpz_sqrt (sp, sp); } + break; +case 43: +#line 241 "calc.y" +{ + sp++; + CHECK_OVERFLOW (); + CHECK_VARIABLE (yyvsp[0].var); + mpz_set (sp, variable[yyvsp[0].var]); } break; - - case 45: -/* Line 1787 of yacc.c */ -#line 246 "calc.y" - { - sp++; - CHECK_OVERFLOW (); - if (mpz_set_str (sp, (yyvsp[(1) - (1)].str), ibase) != 0) - { - fprintf (stderr, "Invalid number: %s\n", (yyvsp[(1) - (1)].str)); - YYERROR; - } +case 44: +#line 247 "calc.y" +{ + sp++; + CHECK_OVERFLOW (); + if (mpz_set_str (sp, yyvsp[0].str, ibase) != 0) + { + fprintf (stderr, "Invalid number: %s\n", yyvsp[0].str); + YYERROR; + } } break; - - case 47: -/* Line 1787 of yacc.c */ -#line 258 "calc.y" - { sp--; mpz_gcd (sp, sp, sp+1); } +case 46: +#line 259 "calc.y" +{ sp--; mpz_gcd (sp, sp, sp+1); } break; - - case 49: -/* Line 1787 of yacc.c */ -#line 262 "calc.y" - { sp--; mpz_lcm (sp, sp, sp+1); } +case 48: +#line 263 "calc.y" +{ sp--; mpz_lcm (sp, sp, sp+1); } break; +} +#line 705 "/usr/share/bison/bison.simple" -/* Line 1787 of yacc.c */ -#line 1968 "calc.c" - default: break; + + yyvsp -= yylen; + yyssp -= yylen; +#if YYLSP_NEEDED + yylsp -= yylen; +#endif + +#if YYDEBUG + if (yydebug) + { + short *yyssp1 = yyss - 1; + YYFPRINTF (stderr, "state stack now"); + while (yyssp1 != yyssp) + YYFPRINTF (stderr, " %d", *++yyssp1); + YYFPRINTF (stderr, "\n"); } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); +#endif *++yyvsp = yyval; +#if YYLSP_NEEDED + *++yylsp = yyloc; +#endif /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule @@ -1992,11 +1398,11 @@ yyreduce: yyn = yyr1[yyn]; - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yypgoto[yyn - YYNTBASE] + *yyssp; + if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else - yystate = yydefgoto[yyn - YYNTOKENS]; + yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; @@ -2005,135 +1411,159 @@ yyreduce: | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } +#ifdef YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (yyn > YYFLAG && yyn < YYLAST) + { + YYSIZE_T yysize = 0; + char *yymsg; + int yyx, yycount; + + yycount = 0; + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + for (yyx = yyn < 0 ? -yyn : 0; + yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) + if (yycheck[yyx + yyn] == yyx) + yysize += yystrlen (yytname[yyx]) + 15, yycount++; + yysize += yystrlen ("parse error, unexpected ") + 1; + yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg != 0) + { + char *yyp = yystpcpy (yymsg, "parse error, unexpected "); + yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); + + if (yycount < 5) + { + yycount = 0; + for (yyx = yyn < 0 ? -yyn : 0; + yyx < (int) (sizeof (yytname) / sizeof (char *)); + yyx++) + if (yycheck[yyx + yyn] == yyx) + { + const char *yyq = ! yycount ? ", expecting " : " or "; + yyp = yystpcpy (yyp, yyq); + yyp = yystpcpy (yyp, yytname[yyx]); + yycount++; + } + } + yyerror (yymsg); + YYSTACK_FREE (yymsg); + } + else + yyerror ("parse error; also virtual memory exhausted"); + } + else +#endif /* defined (YYERROR_VERBOSE) */ + yyerror ("parse error"); + } + goto yyerrlab1; +/*--------------------------------------------------. +| yyerrlab1 -- error raised explicitly by an action | +`--------------------------------------------------*/ +yyerrlab1: 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; - } + /* return failure if at end of input */ + if (yychar == YYEOF) + YYABORT; + YYDPRINTF ((stderr, "Discarding token %d (%s).\n", + yychar, yytname[yychar1])); + yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ - goto yyerrlab1; + yyerrstatus = 3; /* Each real token shifted decrements this */ -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: + goto yyerrhandle; - /* 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; +/*-------------------------------------------------------------------. +| yyerrdefault -- current state does not do anything special for the | +| error token. | +`-------------------------------------------------------------------*/ +yyerrdefault: +#if 0 + /* This is wrong; only states that explicitly want error tokens + should shift them. */ + + /* If its default is to accept any token, ok. Otherwise pop it. */ + yyn = yydefact[yystate]; + if (yyn) + goto yydefault; +#endif -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ +/*---------------------------------------------------------------. +| yyerrpop -- pop the current state because it cannot handle the | +| error token | +`---------------------------------------------------------------*/ +yyerrpop: + if (yyssp == yyss) + YYABORT; + yyvsp--; + yystate = *--yyssp; +#if YYLSP_NEEDED + yylsp--; +#endif - for (;;) +#if YYDEBUG + if (yydebug) { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + short *yyssp1 = yyss - 1; + YYFPRINTF (stderr, "Error: state stack now"); + while (yyssp1 != yyssp) + YYFPRINTF (stderr, " %d", *++yyssp1); + YYFPRINTF (stderr, "\n"); + } +#endif - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; +/*--------------. +| yyerrhandle. | +`--------------*/ +yyerrhandle: + yyn = yypact[yystate]; + if (yyn == YYFLAG) + goto yyerrdefault; + yyn += YYTERROR; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) + goto yyerrdefault; - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); + yyn = yytable[yyn]; + if (yyn < 0) + { + if (yyn == YYFLAG) + goto yyerrpop; + yyn = -yyn; + goto yyreduce; } + else if (yyn == 0) + goto yyerrpop; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END + if (yyn == YYFINAL) + YYACCEPT; + YYDPRINTF ((stderr, "Shifting error token, ")); - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + *++yyvsp = yylval; +#if YYLSP_NEEDED + *++yylsp = yylloc; +#endif yystate = yyn; goto yynewstate; @@ -2153,50 +1583,22 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); +/*---------------------------------------------. +| yyoverflowab -- parser overflow comes here. | +`---------------------------------------------*/ +yyoverflowlab: + yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ -#endif yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - 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); + return yyresult; } - - -/* Line 2050 of yacc.c */ -#line 264 "calc.y" +#line 265 "calc.y" yyerror (char *s) @@ -2214,24 +1616,24 @@ main (int argc, char *argv[]) for (i = 1; i < argc; i++) { if (strcmp (argv[i], "--readline") == 0) - calc_option_readline = 1; + calc_option_readline = 1; else if (strcmp (argv[i], "--noreadline") == 0) - calc_option_readline = 0; + calc_option_readline = 0; else if (strcmp (argv[i], "--help") == 0) - { - printf ("Usage: calc [--option]...\n"); - printf (" --readline use readline\n"); - printf (" --noreadline don't use readline\n"); - printf (" --help this message\n"); - printf ("Readline is only available when compiled in,\n"); - printf ("and in that case it's the default on a tty.\n"); - exit (0); - } + { + printf ("Usage: calc [--option]...\n"); + printf (" --readline use readline\n"); + printf (" --noreadline don't use readline\n"); + printf (" --help this message\n"); + printf ("Readline is only available when compiled in,\n"); + printf ("and in that case it's the default on a tty.\n"); + exit (0); + } else - { - fprintf (stderr, "Unrecognised option: %s\n", argv[i]); - exit (1); - } + { + fprintf (stderr, "Unrecognised option: %s\n", argv[i]); + exit (1); + } } #if WITH_READLINE diff --git a/gmp/demos/calc/calc.h b/gmp/demos/calc/calc.h index 78e0195d24..448cc425c5 100644 --- a/gmp/demos/calc/calc.h +++ b/gmp/demos/calc/calc.h @@ -1,145 +1,43 @@ -/* A Bison parser, made by GNU Bison 2.7.12-4996. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 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 <http://www.gnu.org/licenses/>. */ - -/* 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. */ - -#ifndef YY_YY_CALC_H_INCLUDED -# define YY_YY_CALC_H_INCLUDED -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - EOS = 258, - BAD = 259, - HELP = 260, - HEX = 261, - DECIMAL = 262, - QUIT = 263, - ABS = 264, - BIN = 265, - FIB = 266, - GCD = 267, - KRON = 268, - LCM = 269, - LUCNUM = 270, - NEXTPRIME = 271, - POWM = 272, - ROOT = 273, - SQRT = 274, - NUMBER = 275, - VARIABLE = 276, - LOR = 277, - LAND = 278, - GE = 279, - LE = 280, - NE = 281, - EQ = 282, - RSHIFT = 283, - LSHIFT = 284, - UMINUS = 285 - }; -#endif -/* Tokens. */ -#define EOS 258 -#define BAD 259 -#define HELP 260 -#define HEX 261 -#define DECIMAL 262 -#define QUIT 263 -#define ABS 264 -#define BIN 265 -#define FIB 266 -#define GCD 267 -#define KRON 268 -#define LCM 269 -#define LUCNUM 270 -#define NEXTPRIME 271 -#define POWM 272 -#define ROOT 273 -#define SQRT 274 -#define NUMBER 275 -#define VARIABLE 276 -#define LOR 277 -#define LAND 278 -#define GE 279 -#define LE 280 -#define NE 281 -#define EQ 282 -#define RSHIFT 283 -#define LSHIFT 284 -#define UMINUS 285 - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ -/* Line 2053 of yacc.c */ -#line 142 "calc.y" +#ifndef BISON_CALC_H +# define BISON_CALC_H +#ifndef YYSTYPE +typedef union { char *str; int var; - - -/* Line 2053 of yacc.c */ -#line 123 "calc.h" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 +} yystype; +# define YYSTYPE yystype #endif +# define EOS 257 +# define BAD 258 +# define HELP 259 +# define HEX 260 +# define DECIMAL 261 +# define QUIT 262 +# define ABS 263 +# define BIN 264 +# define FIB 265 +# define GCD 266 +# define KRON 267 +# define LCM 268 +# define LUCNUM 269 +# define NEXTPRIME 270 +# define POWM 271 +# define ROOT 272 +# define SQRT 273 +# define NUMBER 274 +# define VARIABLE 275 +# define LOR 276 +# define LAND 277 +# define EQ 278 +# define NE 279 +# define LE 280 +# define GE 281 +# define LSHIFT 282 +# define RSHIFT 283 +# define UMINUS 284 -extern YYSTYPE yylval; -#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 */ +extern YYSTYPE yylval; -#endif /* !YY_YY_CALC_H_INCLUDED */ +#endif /* not BISON_CALC_H */ diff --git a/gmp/demos/calc/calc.y b/gmp/demos/calc/calc.y index 0fa1206f79..0f9b1baad6 100644 --- a/gmp/demos/calc/calc.y +++ b/gmp/demos/calc/calc.y @@ -1,7 +1,7 @@ %{ /* A simple integer desk calculator using yacc and gmp. -Copyright 2000-2002 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -15,7 +15,7 @@ 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 https://www.gnu.org/licenses/. */ +this program. If not, see http://www.gnu.org/licenses/. */ /* This is a simple program, meant only to show one way to use GMP for this diff --git a/gmp/demos/calc/calclex.c b/gmp/demos/calc/calclex.c index bf65cba425..ebd1f0a1a5 100644 --- a/gmp/demos/calc/calclex.c +++ b/gmp/demos/calc/calclex.c @@ -1,113 +1,70 @@ - -#line 3 "calclex.c" - -#define YY_INT_ALIGNED short int - +#line 2 "calclex.c" /* A lexical scanner generated by flex */ +/* Scanner skeleton version: + * $Header$ + */ + #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ -/* begin standard C headers. */ #include <stdio.h> -#include <string.h> #include <errno.h> -#include <stdlib.h> - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include <inttypes.h> -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus #endif -#ifndef INT8_MAX -#define INT8_MAX (127) #endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ -#endif /* ! FLEXINT_H */ #ifdef __cplusplus +#include <stdlib.h> +#ifndef _WIN32 +#include <unistd.h> +#endif + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) +#if __STDC__ +#define YY_USE_PROTOS #define YY_USE_CONST -#endif /* defined (__STDC__) */ +#endif /* __STDC__ */ #endif /* ! __cplusplus */ +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include <io.h> +#include <stdlib.h> +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + /* Returned upon end-of-file. */ #define YY_NULL 0 @@ -122,70 +79,71 @@ typedef unsigned int flex_uint32_t; * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ -#define BEGIN (yy_start) = 1 + 2 * +#define BEGIN yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ -#define YY_START (((yy_start) - 1) / 2) +#define YY_START ((yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin ) +#define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ -#ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 -#endif -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -extern yy_size_t yyleng; +extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ + *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) -#define unput(c) yyunput( c, (yytext_ptr) ) +#define unput(c) yyunput( c, yytext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; @@ -201,7 +159,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -222,16 +180,12 @@ struct yy_buffer_state */ int yy_at_bol; - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; - #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process @@ -245,38 +199,28 @@ struct yy_buffer_state * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ +static YY_BUFFER_STATE yy_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". - * - * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) +#define YY_CURRENT_BUFFER yy_current_buffer -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t yyleng; + +static int yy_n_chars; /* number of characters read into yy_ch_buf */ + + +int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ +static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches @@ -284,92 +228,66 @@ static int yy_start = 0; /* start state number */ */ static int yy_did_buffer_switch_on_eof; -void yyrestart (FILE *input_file ); -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); -void yy_delete_buffer (YY_BUFFER_STATE b ); -void yy_flush_buffer (YY_BUFFER_STATE b ); -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); -void yypop_buffer_state (void ); - -static void yyensure_buffer_stack (void ); -static void yy_load_buffer_state (void ); -static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); +void yyrestart YY_PROTO(( FILE *input_file )); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +void yy_load_buffer_state YY_PROTO(( void )); +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); -void *yyalloc (yy_size_t ); -void *yyrealloc (void *,yy_size_t ); -void yyfree (void * ); +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ } -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) typedef unsigned char YY_CHAR; - FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; - typedef int yy_state_type; - -extern int yylineno; - -int yylineno = 1; - extern char *yytext; #define yytext_ptr yytext -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); +static yy_state_type yy_get_previous_state YY_PROTO(( void )); +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +static int yy_get_next_buffer YY_PROTO(( void )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; + yy_c_buf_p = yy_cp; #define YY_NUM_RULES 19 #define YY_END_OF_BUFFER 20 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[39] = +static yyconst short int yy_accept[39] = { 0, 0, 0, 20, 18, 1, 2, 7, 6, 7, 18, 16, 16, 2, 7, 7, 7, 16, 17, 18, 18, @@ -377,7 +295,7 @@ static yyconst flex_int16_t yy_accept[39] = 9, 13, 16, 17, 3, 15, 4, 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, @@ -409,13 +327,13 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[19] = +static yyconst int yy_meta[19] = { 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 3, 2, 1, 1 } ; -static yyconst flex_int16_t yy_base[43] = +static yyconst short int yy_base[43] = { 0, 0, 0, 39, 49, 49, 49, 26, 16, 49, 30, 20, 19, 49, 9, 22, 10, 9, 0, 29, 13, @@ -424,7 +342,7 @@ static yyconst flex_int16_t yy_base[43] = 43, 45 } ; -static yyconst flex_int16_t yy_def[43] = +static yyconst short int yy_def[43] = { 0, 38, 1, 38, 38, 38, 38, 38, 39, 38, 38, 40, 40, 38, 38, 38, 38, 41, 42, 38, 38, @@ -433,7 +351,7 @@ static yyconst flex_int16_t yy_def[43] = 38, 38 } ; -static yyconst flex_int16_t yy_nxt[68] = +static yyconst short int yy_nxt[68] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 23, 28, @@ -444,7 +362,7 @@ static yyconst flex_int16_t yy_nxt[68] = 38, 38, 38, 38, 38, 38, 38 } ; -static yyconst flex_int16_t yy_chk[68] = +static yyconst short int yy_chk[68] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 14, @@ -458,9 +376,6 @@ static yyconst flex_int16_t yy_chk[68] = static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; -extern int yy_flex_debug; -int yy_flex_debug = 0; - /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ @@ -470,9 +385,10 @@ int yy_flex_debug = 0; #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "calclex.l" +#define INITIAL 0 /* Lexical analyzer for calc program. -Copyright 2000-2002 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -486,8 +402,9 @@ 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 https://www.gnu.org/licenses/. */ -#line 20 "calclex.l" +this program. If not, see http://www.gnu.org/licenses/. */ + +#line 21 "calclex.l" #include <string.h> #include "calc-common.h" @@ -523,52 +440,7 @@ const struct calc_keywords_t calc_keywords[] = { { "sqrt", SQRT }, { NULL } }; -#line 527 "calclex.c" - -#define INITIAL 0 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include <unistd.h> -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -static int yy_init_globals (void ); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int yylex_destroy (void ); - -int yyget_debug (void ); - -void yyset_debug (int debug_flag ); - -YY_EXTRA_TYPE yyget_extra (void ); - -void yyset_extra (YY_EXTRA_TYPE user_defined ); - -FILE *yyget_in (void ); - -void yyset_in (FILE * in_str ); - -FILE *yyget_out (void ); - -void yyset_out (FILE * out_str ); - -yy_size_t yyget_leng (void ); - -char *yyget_text (void ); - -int yyget_lineno (void ); - -void yyset_lineno (int line_number ); +#line 444 "calclex.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -576,30 +448,65 @@ void yyset_lineno (int line_number ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap (void ); +extern "C" int yywrap YY_PROTO(( void )); #else -extern int yywrap (void ); +extern int yywrap YY_PROTO(( void )); #endif #endif - static void yyunput (int c,char *buf_ptr ); - +#ifndef YY_NO_UNPUT +static void yyunput YY_PROTO(( int c, char *buf_ptr )); +#endif + #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); +static int yy_flex_strlen YY_PROTO(( yyconst char * )); #endif #ifndef YY_NO_INPUT - #ifdef __cplusplus -static int yyinput (void ); +static int yyinput YY_PROTO(( void )); #else -static int input (void ); +static int input YY_PROTO(( void )); +#endif #endif +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include <stdlib.h> +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif #endif /* Amount of stuff to slurp up with each read. */ @@ -608,11 +515,12 @@ static int input (void ); #endif /* Copy whatever the last rule matched to the standard output. */ + #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -620,10 +528,9 @@ static int input (void ); */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + if ( yy_current_buffer->yy_is_interactive ) \ { \ - int c = '*'; \ - size_t n; \ + int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -646,9 +553,7 @@ static int input (void ); errno=0; \ clearerr(yyin); \ } \ - }\ -\ - + } #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -669,18 +574,12 @@ static int input (void ); #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif -/* end tables serialization structures and prototypes */ - /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int yylex (void); - -#define YY_DECL int yylex (void) -#endif /* !YY_DECL */ +#define YY_DECL int yylex YY_PROTO(( void )) +#endif /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. @@ -697,29 +596,27 @@ extern int yylex (void); #define YY_RULE_SETUP \ YY_USER_ACTION -/** The main scanner function which does all the work. - */ YY_DECL -{ + { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; - -#line 57 "calclex.l" + +#line 58 "calclex.l" -#line 712 "calclex.c" +#line 609 "calclex.c" - if ( !(yy_init) ) + if ( yy_init ) { - (yy_init) = 1; + yy_init = 0; #ifdef YY_USER_INIT YY_USER_INIT; #endif - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ + if ( ! yy_start ) + yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; @@ -727,36 +624,34 @@ YY_DECL if ( ! yyout ) yyout = stdout; - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); - } + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); - yy_load_buffer_state( ); + yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { - yy_cp = (yy_c_buf_p); + yy_cp = yy_c_buf_p; /* Support of yytext. */ - *yy_cp = (yy_hold_char); + *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; - yy_current_state = (yy_start); + yy_current_state = yy_start; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -773,118 +668,116 @@ yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); + yy_cp = yy_last_accepting_cpos; + yy_current_state = yy_last_accepting_state; yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; + do_action: /* This label is used only to access EOF actions. */ + switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); + *yy_cp = yy_hold_char; + yy_cp = yy_last_accepting_cpos; + yy_current_state = yy_last_accepting_state; goto yy_find_action; case 1: YY_RULE_SETUP -#line 59 "calclex.l" +#line 60 "calclex.l" { /* white space is skipped */ } YY_BREAK case 2: -/* rule 2 can match eol */ YY_RULE_SETUP -#line 61 "calclex.l" +#line 62 "calclex.l" { /* semicolon or newline separates statements */ calc_more_input = 0; return EOS; } YY_BREAK case 3: -/* rule 3 can match eol */ YY_RULE_SETUP -#line 64 "calclex.l" +#line 65 "calclex.l" { /* escaped newlines are skipped */ } YY_BREAK case 4: -/* rule 4 can match eol */ YY_RULE_SETUP -#line 67 "calclex.l" +#line 68 "calclex.l" { /* comment through to escaped newline is skipped */ } YY_BREAK case 5: -/* rule 5 can match eol */ YY_RULE_SETUP -#line 69 "calclex.l" +#line 70 "calclex.l" { /* comment through to newline is a separator */ calc_more_input = 0; return EOS; } YY_BREAK case 6: YY_RULE_SETUP -#line 72 "calclex.l" +#line 73 "calclex.l" { /* comment through to EOF skipped */ } YY_BREAK case 7: YY_RULE_SETUP -#line 75 "calclex.l" +#line 76 "calclex.l" { return yytext[0]; } YY_BREAK case 8: YY_RULE_SETUP -#line 76 "calclex.l" +#line 77 "calclex.l" { return LE; } YY_BREAK case 9: YY_RULE_SETUP -#line 77 "calclex.l" +#line 78 "calclex.l" { return GE; } YY_BREAK case 10: YY_RULE_SETUP -#line 78 "calclex.l" +#line 79 "calclex.l" { return EQ; } YY_BREAK case 11: YY_RULE_SETUP -#line 79 "calclex.l" +#line 80 "calclex.l" { return NE; } YY_BREAK case 12: YY_RULE_SETUP -#line 80 "calclex.l" +#line 81 "calclex.l" { return LSHIFT; } YY_BREAK case 13: YY_RULE_SETUP -#line 81 "calclex.l" +#line 82 "calclex.l" { return RSHIFT; } YY_BREAK case 14: YY_RULE_SETUP -#line 82 "calclex.l" +#line 83 "calclex.l" { return LAND; } YY_BREAK case 15: YY_RULE_SETUP -#line 83 "calclex.l" +#line 84 "calclex.l" { return LOR; } YY_BREAK case 16: YY_RULE_SETUP -#line 85 "calclex.l" +#line 86 "calclex.l" { yylval.str = yytext; return NUMBER; } YY_BREAK case 17: YY_RULE_SETUP -#line 89 "calclex.l" +#line 90 "calclex.l" { int i; @@ -903,41 +796,41 @@ YY_RULE_SETUP YY_BREAK case 18: YY_RULE_SETUP -#line 105 "calclex.l" +#line 106 "calclex.l" { return BAD; } YY_BREAK case 19: YY_RULE_SETUP -#line 107 "calclex.l" +#line 108 "calclex.l" ECHO; YY_BREAK -#line 915 "calclex.c" +#line 808 "calclex.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); + *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our + * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position @@ -947,13 +840,13 @@ case YY_STATE_EOF(INITIAL): * end-of-buffer state). Contrast this with the test * in input(). */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state( ); + yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have @@ -966,30 +859,30 @@ case YY_STATE_EOF(INITIAL): yy_next_state = yy_try_NUL_trans( yy_current_state ); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; + yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); + yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { - yy_cp = (yy_c_buf_p); + yy_cp = yy_c_buf_p; goto yy_find_action; } } - else switch ( yy_get_next_buffer( ) ) + else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { - (yy_did_buffer_switch_on_eof) = 0; + yy_did_buffer_switch_on_eof = 0; - if ( yywrap( ) ) + if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -1000,7 +893,7 @@ case YY_STATE_EOF(INITIAL): * YY_NULL, it'll still work - another * YY_NULL will get returned. */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; @@ -1008,30 +901,30 @@ case YY_STATE_EOF(INITIAL): else { - if ( ! (yy_did_buffer_switch_on_eof) ) + if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state( ); + yy_current_state = yy_get_previous_state(); - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; - yy_current_state = yy_get_previous_state( ); + yy_current_state = yy_get_previous_state(); - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; @@ -1042,7 +935,8 @@ case YY_STATE_EOF(INITIAL): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ -} /* end of yylex */ + } /* end of yylex */ + /* yy_get_next_buffer - try to read in a new buffer * @@ -1051,20 +945,21 @@ case YY_STATE_EOF(INITIAL): * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer (void) -{ - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); + +static int yy_get_next_buffer() + { + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; register int number_to_move, i; int ret_val; - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. @@ -1084,34 +979,38 @@ static int yy_get_next_buffer (void) /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); + (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1120,7 +1019,8 @@ static int yy_get_next_buffer (void) b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ @@ -1130,35 +1030,35 @@ static int yy_get_next_buffer (void) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; - +#endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + yy_current_buffer->yy_n_chars = yy_n_chars; } - if ( (yy_n_chars) == 0 ) + if ( yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ); + yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } @@ -1166,39 +1066,32 @@ static int yy_get_next_buffer (void) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; return ret_val; -} + } + /* yy_get_previous_state - get the state just before the EOB char was reached */ - static yy_state_type yy_get_previous_state (void) -{ +static yy_state_type yy_get_previous_state() + { register yy_state_type yy_current_state; register char *yy_cp; - - yy_current_state = (yy_start); - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + yy_current_state = yy_start; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1210,23 +1103,30 @@ static int yy_get_next_buffer (void) } return yy_current_state; -} + } + /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ + +#ifdef YY_USE_PROTOS +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +#else +static yy_state_type yy_try_NUL_trans( yy_current_state ) +yy_state_type yy_current_state; +#endif + { register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); + register char *yy_cp = yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1237,74 +1137,81 @@ static int yy_get_next_buffer (void) yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 38); - return yy_is_jam ? 0 : yy_current_state; -} + return yy_is_jam ? 0 : yy_current_state; + } - static void yyunput (int c, register char * yy_bp ) -{ - register char *yy_cp; - - yy_cp = (yy_c_buf_p); + +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void yyunput( int c, register char *yy_bp ) +#else +static void yyunput( c, yy_bp ) +int c; +register char *yy_bp; +#endif + { + register char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ - *yy_cp = (yy_hold_char); + *yy_cp = yy_hold_char; - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register yy_size_t number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + &yy_current_buffer->yy_ch_buf[number_to_move]; - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; -} -#ifndef YY_NO_INPUT + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ + + #ifdef __cplusplus - static int yyinput (void) +static int yyinput() #else - static int input (void) +static int input() #endif - -{ + { int c; - - *(yy_c_buf_p) = (yy_hold_char); - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; + *yy_c_buf_p = '\0'; else { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; - switch ( yy_get_next_buffer( ) ) + switch ( yy_get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() @@ -1318,16 +1225,16 @@ static int yy_get_next_buffer (void) */ /* Reset buffer status. */ - yyrestart(yyin ); + yyrestart( yyin ); - /*FALLTHROUGH*/ + /* fall through */ case EOB_ACT_END_OF_FILE: { - if ( yywrap( ) ) + if ( yywrap() ) return EOF; - if ( ! (yy_did_buffer_switch_on_eof) ) + if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); @@ -1337,92 +1244,90 @@ static int yy_get_next_buffer (void) } case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; + yy_c_buf_p = yytext_ptr + offset; break; } } } - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yytext */ - (yy_hold_char) = *++(yy_c_buf_p); + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + return c; -} -#endif /* ifndef YY_NO_INPUT */ + } -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void yyrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); + +#ifdef YY_USE_PROTOS +void yyrestart( FILE *input_file ) +#else +void yyrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); } - yy_init_buffer(YY_CURRENT_BUFFER,input_file ); - yy_load_buffer_state( ); -} -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) +#ifdef YY_USE_PROTOS +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +#else +void yy_switch_to_buffer( new_buffer ) +YY_BUFFER_STATE new_buffer; +#endif + { + if ( yy_current_buffer == new_buffer ) return; - if ( YY_CURRENT_BUFFER ) + if ( yy_current_buffer ) { /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; } - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( ); + yy_current_buffer = new_buffer; + yy_load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ - (yy_did_buffer_switch_on_eof) = 1; -} + yy_did_buffer_switch_on_eof = 1; + } -static void yy_load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) -{ +#ifdef YY_USE_PROTOS +void yy_load_buffer_state( void ) +#else +void yy_load_buffer_state() +#endif + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } + + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +#else +YY_BUFFER_STATE yy_create_buffer( file, size ) +FILE *file; +int size; +#endif + { YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1431,71 +1336,84 @@ static void yy_load_buffer_state (void) /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer(b,file ); + yy_init_buffer( b, file ); return b; -} + } -/** Destroy the buffer. - * @param b a buffer created with yy_create_buffer() - * - */ - void yy_delete_buffer (YY_BUFFER_STATE b ) -{ - + +#ifdef YY_USE_PROTOS +void yy_delete_buffer( YY_BUFFER_STATE b ) +#else +void yy_delete_buffer( b ) +YY_BUFFER_STATE b; +#endif + { if ( ! b ) return; - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ); + yy_flex_free( (void *) b->yy_ch_buf ); - yyfree((void *) b ); -} + yy_flex_free( (void *) b ); + } -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a yyrestart() or at EOF. - */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) -{ - int oerrno = errno; - - yy_flush_buffer(b ); +#ifndef _WIN32 +#include <unistd.h> +#else +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif +#endif + +#ifdef YY_USE_PROTOS +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +#else +void yy_init_buffer( b, file ) +YY_BUFFER_STATE b; +FILE *file; +#endif + + + { + yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} +#if YY_ALWAYS_INTERACTIVE + b->yy_is_interactive = 1; +#else +#if YY_NEVER_INTERACTIVE + b->yy_is_interactive = 0; +#else + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void yy_flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) + +#ifdef YY_USE_PROTOS +void yy_flush_buffer( YY_BUFFER_STATE b ) +#else +void yy_flush_buffer( b ) +YY_BUFFER_STATE b; +#endif + + { + if ( ! b ) return; b->yy_n_chars = 0; @@ -1512,125 +1430,29 @@ static void yy_load_buffer_state (void) b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void yypop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void yyensure_buffer_stack (void) -{ - yy_size_t num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; + if ( b == yy_current_buffer ) + yy_load_buffer_state(); } - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) -{ +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +#else +YY_BUFFER_STATE yy_scan_buffer( base, size ) +char *base; +yy_size_t size; +#endif + { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); @@ -1644,51 +1466,56 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer(b ); + yy_switch_to_buffer( b ); return b; -} + } +#endif -/** Setup the input buffer state to scan a string. The next call to yylex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * yy_scan_bytes() instead. - */ -YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) -{ - - return yy_scan_bytes(yystr,strlen(yystr) ); -} -/** Setup the input buffer state to scan the given bytes. The next call to yylex() will - * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) -{ +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) +#else +YY_BUFFER_STATE yy_scan_string( yy_str ) +yyconst char *yy_str; +#endif + { + int len; + for ( len = 0; yy_str[len]; ++len ) + ; + + return yy_scan_bytes( yy_str, len ); + } +#endif + + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +#else +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +yyconst char *bytes; +int len; +#endif + { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) yyalloc(n ); + n = len + 2; + buf = (char *) yy_flex_alloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer(buf,n ); + b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); @@ -1698,196 +1525,148 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len b->yy_is_our_buffer = 1; return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 + } #endif -static void yy_fatal_error (yyconst char* msg ) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} -/* Redefine yyless() so it works in section 3 code. */ +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void yy_push_state( int new_state ) +#else +static void yy_push_state( new_state ) +int new_state; +#endif + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); -/* Accessor methods (get/set functions) to struct members. */ + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); -/** Get the current line number. - * - */ -int yyget_lineno (void) -{ - - return yylineno; -} - -/** Get the input stream. - * - */ -FILE *yyget_in (void) -{ - return yyin; -} + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); -/** Get the output stream. - * - */ -FILE *yyget_out (void) -{ - return yyout; -} + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } -/** Get the length of the current token. - * - */ -yy_size_t yyget_leng (void) -{ - return yyleng; -} + yy_start_stack[yy_start_stack_ptr++] = YY_START; -/** Get the current token. - * - */ + BEGIN(new_state); + } +#endif -char *yyget_text (void) -{ - return yytext; -} -/** Set the current line number. - * @param line_number - * - */ -void yyset_lineno (int line_number ) -{ - - yylineno = line_number; -} +#ifndef YY_NO_POP_STATE +static void yy_pop_state() + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * - * @see yy_switch_to_buffer - */ -void yyset_in (FILE * in_str ) -{ - yyin = in_str ; -} + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } +#endif -void yyset_out (FILE * out_str ) -{ - yyout = out_str ; -} -int yyget_debug (void) -{ - return yy_flex_debug; -} +#ifndef YY_NO_TOP_STATE +static int yy_top_state() + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } +#endif -void yyset_debug (int bdebug ) -{ - yy_flex_debug = bdebug ; -} +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; +#ifdef YY_USE_PROTOS +static void yy_fatal_error( yyconst char msg[] ) #else - yyin = (FILE *) 0; - yyout = (FILE *) 0; +static void yy_fatal_error( msg ) +char msg[]; #endif + { + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); + } - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; -} -/* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(); - } - /* Destroy the stack itself. */ - yyfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; +/* Redefine yyless() so it works in section 3 code. */ - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( ); +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) - return 0; -} -/* - * Internal utility routines. - */ +/* Internal utility routines. */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) -{ +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; -} + } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) -{ +#ifdef YY_USE_PROTOS +static int yy_flex_strlen( yyconst char *s ) +#else +static int yy_flex_strlen( s ) +yyconst char *s; +#endif + { register int n; for ( n = 0; s[n]; ++n ) ; return n; -} + } #endif -void *yyalloc (yy_size_t size ) -{ + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + { return (void *) malloc( size ); -} + } -void *yyrealloc (void * ptr, yy_size_t size ) -{ +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -1896,17 +1675,26 @@ void *yyrealloc (void * ptr, yy_size_t size ) * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); -} - -void yyfree (void * ptr ) -{ - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" + } -#line 107 "calclex.l" +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + { + free( ptr ); + } +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif +#line 108 "calclex.l" int @@ -1914,4 +1702,3 @@ yywrap () { return 1; } - diff --git a/gmp/demos/calc/calclex.l b/gmp/demos/calc/calclex.l index 44df848fad..32d4fc23cb 100644 --- a/gmp/demos/calc/calclex.l +++ b/gmp/demos/calc/calclex.l @@ -1,6 +1,6 @@ /* Lexical analyzer for calc program. -Copyright 2000-2002 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -14,7 +14,7 @@ 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 https://www.gnu.org/licenses/. */ +this program. If not, see http://www.gnu.org/licenses/. */ %{ #include <string.h> diff --git a/gmp/demos/calc/calcread.c b/gmp/demos/calc/calcread.c index 40433686c1..53291ff732 100644 --- a/gmp/demos/calc/calcread.c +++ b/gmp/demos/calc/calcread.c @@ -14,7 +14,7 @@ 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 https://www.gnu.org/licenses/. */ +this program. If not, see http://www.gnu.org/licenses/. */ #include "calc-common.h" diff --git a/gmp/demos/expr/Makefile.am b/gmp/demos/expr/Makefile.am index 369e751743..333cacc496 100644 --- a/gmp/demos/expr/Makefile.am +++ b/gmp/demos/expr/Makefile.am @@ -1,32 +1,21 @@ ## Process this file with automake to generate Makefile.in -# Copyright 2001-2004 Free Software Foundation, Inc. +# Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at your +# option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/tests diff --git a/gmp/demos/expr/Makefile.in b/gmp/demos/expr/Makefile.in index adb9eba91a..5754abece6 100644 --- a/gmp/demos/expr/Makefile.in +++ b/gmp/demos/expr/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.8.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# 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. @@ -15,56 +14,33 @@ @SET_MAKE@ -# Copyright 2001-2004 Free Software Foundation, Inc. +# Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at your +# option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. +SOURCES = $(libexpr_a_SOURCES) run-expr.c t-expr.c + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -76,52 +52,47 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -build_triplet = @build@ host_triplet = @host@ +ANSI2KNR = $(top_builddir)/ansi2knr EXTRA_PROGRAMS = run-expr$(EXEEXT) t-expr$(EXEEXT) subdir = demos/expr DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d +mkinstalldirs = $(mkdir_p) CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = libexpr_a_AR = $(AR) $(ARFLAGS) libexpr_a_LIBADD = -am_libexpr_a_OBJECTS = expr.$(OBJEXT) exprv.$(OBJEXT) exprz.$(OBJEXT) \ - exprza.$(OBJEXT) exprq.$(OBJEXT) exprqa.$(OBJEXT) \ - exprf.$(OBJEXT) exprfa.$(OBJEXT) +am_libexpr_a_OBJECTS = expr$U.$(OBJEXT) exprv$U.$(OBJEXT) \ + exprz$U.$(OBJEXT) exprza$U.$(OBJEXT) exprq$U.$(OBJEXT) \ + exprqa$U.$(OBJEXT) exprf$U.$(OBJEXT) exprfa$U.$(OBJEXT) libexpr_a_OBJECTS = $(am_libexpr_a_OBJECTS) run_expr_SOURCES = run-expr.c -run_expr_OBJECTS = run-expr.$(OBJEXT) +run_expr_OBJECTS = run-expr$U.$(OBJEXT) run_expr_LDADD = $(LDADD) run_expr_DEPENDENCIES = libexpr.a $(top_builddir)/libgmp.la t_expr_SOURCES = t-expr.c -t_expr_OBJECTS = t-expr.$(OBJEXT) -t_expr_DEPENDENCIES = $(top_builddir)/tests/libtests.la $(LDADD) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +t_expr_OBJECTS = t-expr$U.$(OBJEXT) +am__DEPENDENCIES_1 = libexpr.a $(top_builddir)/libgmp.la +t_expr_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(am__DEPENDENCIES_1) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = am__depfiles_maybe = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libexpr_a_SOURCES) run-expr.c t-expr.c DIST_SOURCES = $(libexpr_a_SOURCES) run-expr.c t-expr.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -135,6 +106,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -150,17 +122,16 @@ CYGPATH_W = @CYGPATH_W@ DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ +ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_STATIC_FALSE = @ENABLE_STATIC_FALSE@ +ENABLE_STATIC_TRUE = @ENABLE_STATIC_TRUE@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -174,12 +145,10 @@ HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ HAVE_STACK_T_01 = @HAVE_STACK_T_01@ HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ @@ -194,26 +163,20 @@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -223,31 +186,26 @@ SHELL = @SHELL@ SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ STRIP = @STRIP@ TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ +U = @U@ U_FOR_BUILD = @U_FOR_BUILD@ VERSION = @VERSION@ +WANT_CXX_FALSE = @WANT_CXX_FALSE@ +WANT_CXX_TRUE = @WANT_CXX_TRUE@ +WANT_MPBSD_FALSE = @WANT_MPBSD_FALSE@ +WANT_MPBSD_TRUE = @WANT_MPBSD_TRUE@ WITH_READLINE_01 = @WITH_READLINE_01@ YACC = @YACC@ YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ -builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -271,6 +229,7 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ +mpn_objs_in_libmp = @mpn_objs_in_libmp@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ @@ -278,12 +237,8 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/tests # FIXME: This is a workaround for a bug in automake 1.8.4. When the only @@ -307,14 +262,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps demos/expr/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps demos/expr/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps demos/expr/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu --ignore-deps demos/expr/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -332,23 +287,27 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -libexpr.a: $(libexpr_a_OBJECTS) $(libexpr_a_DEPENDENCIES) $(EXTRA_libexpr_a_DEPENDENCIES) +libexpr.a: $(libexpr_a_OBJECTS) $(libexpr_a_DEPENDENCIES) -rm -f libexpr.a $(libexpr_a_AR) libexpr.a $(libexpr_a_OBJECTS) $(libexpr_a_LIBADD) $(RANLIB) libexpr.a -run-expr$(EXEEXT): $(run_expr_OBJECTS) $(run_expr_DEPENDENCIES) $(EXTRA_run_expr_DEPENDENCIES) +run-expr$(EXEEXT): $(run_expr_OBJECTS) $(run_expr_DEPENDENCIES) @rm -f run-expr$(EXEEXT) - $(LINK) $(run_expr_OBJECTS) $(run_expr_LDADD) $(LIBS) -t-expr$(EXEEXT): $(t_expr_OBJECTS) $(t_expr_DEPENDENCIES) $(EXTRA_t_expr_DEPENDENCIES) + $(LINK) $(run_expr_LDFLAGS) $(run_expr_OBJECTS) $(run_expr_LDADD) $(LIBS) +t-expr$(EXEEXT): $(t_expr_OBJECTS) $(t_expr_DEPENDENCIES) @rm -f t-expr$(EXEEXT) - $(LINK) $(t_expr_OBJECTS) $(t_expr_LDADD) $(LIBS) + $(LINK) $(t_expr_LDFLAGS) $(t_expr_OBJECTS) $(t_expr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c +$(top_builddir)/ansi2knr: + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) ansi2knr + +mostlyclean-kr: + -test "$U" = "" || rm -f *_.c .c.o: $(COMPILE) -c $< @@ -358,6 +317,31 @@ distclean-compile: .c.lo: $(LTCOMPILE) -c -o $@ $< +expr_.c: expr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/expr.c; then echo $(srcdir)/expr.c; else echo expr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +exprf_.c: exprf.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/exprf.c; then echo $(srcdir)/exprf.c; else echo exprf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +exprfa_.c: exprfa.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/exprfa.c; then echo $(srcdir)/exprfa.c; else echo exprfa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +exprq_.c: exprq.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/exprq.c; then echo $(srcdir)/exprq.c; else echo exprq.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +exprqa_.c: exprqa.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/exprqa.c; then echo $(srcdir)/exprqa.c; else echo exprqa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +exprv_.c: exprv.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/exprv.c; then echo $(srcdir)/exprv.c; else echo exprv.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +exprz_.c: exprz.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/exprz.c; then echo $(srcdir)/exprz.c; else echo exprz.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +exprza_.c: exprza.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/exprza.c; then echo $(srcdir)/exprza.c; else echo exprza.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +run-expr_.c: run-expr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/run-expr.c; then echo $(srcdir)/run-expr.c; else echo run-expr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-expr_.c: t-expr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-expr.c; then echo $(srcdir)/t-expr.c; else echo t-expr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +expr_.$(OBJEXT) expr_.lo exprf_.$(OBJEXT) exprf_.lo exprfa_.$(OBJEXT) \ +exprfa_.lo exprq_.$(OBJEXT) exprq_.lo exprqa_.$(OBJEXT) exprqa_.lo \ +exprv_.$(OBJEXT) exprv_.lo exprz_.$(OBJEXT) exprz_.lo \ +exprza_.$(OBJEXT) exprza_.lo run-expr_.$(OBJEXT) run-expr_.lo \ +t-expr_.$(OBJEXT) t-expr_.lo : $(ANSI2KNR) mostlyclean-libtool: -rm -f *.lo @@ -365,85 +349,82 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +distclean-libtool: + -rm -f libtool +uninstall-info-am: + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - set x; \ + tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -z "$$unique" && unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique + $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ + @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 \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done @@ -461,23 +442,17 @@ install-am: all-am installcheck: installcheck-am install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi + $(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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -489,7 +464,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags + distclean-libtool distclean-tags dvi: dvi-am @@ -497,38 +472,18 @@ dvi-am: html: html-am -html-am: - info: info-am info-am: install-data-am: -install-dvi: install-dvi-am - -install-dvi-am: - install-exec-am: -install-html: install-html-am - -install-html-am: - install-info: install-info-am -install-info-am: - install-man: -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - installcheck-am: maintainer-clean: maintainer-clean-am @@ -537,7 +492,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ +mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr \ mostlyclean-libtool pdf: pdf-am @@ -548,29 +503,24 @@ ps: ps-am ps-am: -uninstall-am: - -.MAKE: install-am install-strip +uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ + 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-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + mostlyclean-generic mostlyclean-kr mostlyclean-libtool pdf \ + pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am allprogs: $(EXTRA_PROGRAMS) $(top_builddir)/tests/libtests.la: cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la - # 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/gmp/demos/expr/README b/gmp/demos/expr/README index a54fe42c08..2283cd3ff3 100644 --- a/gmp/demos/expr/README +++ b/gmp/demos/expr/README @@ -3,28 +3,17 @@ Copyright 2001, 2004 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. @@ -101,7 +90,7 @@ hex when base==0. White space, as indicated by <ctype.h> isspace(), is ignored except for the purpose of separating tokens. -Variables can be included in expressions by putting them in the stdarg list +Variables can be included in expressions by putting them in the varargs list after the string. "a", "b", "c" etc in the expression string designate those values. For example, @@ -485,7 +474,7 @@ Assignment could be an operator attribute, making it expect an lvalue. There would want to be a standard table without assignments available though, so user input could be safely parsed. -The closing parenthesis table entry could specify the type of open paren it +The closing parethesis table entry could specify the type of open paren it expects, so that "(" and ")" could match and "[" and "]" match but not a mixture of the two. Currently "[" and "]" can be added, but there's no error on writing a mixed expression like "2*(3+4]". Maybe also there could diff --git a/gmp/demos/expr/expr-impl.h b/gmp/demos/expr/expr-impl.h index 9b6458fbd0..e6050c5622 100644 --- a/gmp/demos/expr/expr-impl.h +++ b/gmp/demos/expr/expr-impl.h @@ -1,34 +1,37 @@ /* Implementation specifics for expression evaluation. -Copyright 2000-2002, 2004 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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 copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +/* Same tests as gmp.h. */ +#if defined (__STDC__) \ + || defined (__cplusplus) \ + || defined (_AIX) \ + || defined (__DECC) \ + || (defined (__mips) && defined (_SYSTYPE_SVR4)) \ + || defined (_MSC_VER) \ + || defined (_WIN32) +#define HAVE_STDARG 1 #include <stdarg.h> +#else +#define HAVE_STDARG 0 +#include <varargs.h> +#endif #include "expr.h" @@ -50,76 +53,83 @@ union mpX_t { }; typedef union mpX_t *mpX_ptr; -typedef const union mpX_t *mpX_srcptr; - -typedef void (*mpexpr_fun_one_t) (mpX_ptr); -typedef unsigned long (*mpexpr_fun_ui_one_t) (mpX_ptr); - -typedef void (*mpexpr_fun_0ary_t) (mpX_ptr); -typedef int (*mpexpr_fun_i_0ary_t) (void); - -typedef void (*mpexpr_fun_unary_t) (mpX_ptr, mpX_srcptr); -typedef void (*mpexpr_fun_unary_ui_t) (mpX_ptr, unsigned long); -typedef int (*mpexpr_fun_i_unary_t) (mpX_srcptr); -typedef int (*mpexpr_fun_i_unary_ui_t) (unsigned long); - -typedef void (*mpexpr_fun_binary_t) (mpX_ptr, mpX_srcptr, mpX_srcptr); -typedef void (*mpexpr_fun_binary_ui_t) (mpX_ptr, mpX_srcptr, unsigned long); -typedef int (*mpexpr_fun_i_binary_t) (mpX_srcptr, mpX_srcptr); -typedef int (*mpexpr_fun_i_binary_ui_t) (mpX_srcptr, unsigned long); - -typedef void (*mpexpr_fun_ternary_t) (mpX_ptr, mpX_srcptr, mpX_srcptr, mpX_srcptr); -typedef void (*mpexpr_fun_ternary_ui_t) (mpX_ptr, mpX_srcptr, mpX_srcptr, unsigned long); -typedef int (*mpexpr_fun_i_ternary_t) (mpX_srcptr, mpX_srcptr, mpX_srcptr); -typedef int (*mpexpr_fun_i_ternary_ui_t) (mpX_srcptr, mpX_srcptr, unsigned long); - -typedef size_t (*mpexpr_fun_number_t) (mpX_ptr, const char *str, size_t len, int base); -typedef void (*mpexpr_fun_swap_t) (mpX_ptr, mpX_ptr); -typedef unsigned long (*mpexpr_fun_get_ui_t) (mpX_srcptr); -typedef void (*mpexpr_fun_set_si_t) (mpX_srcptr, long); +typedef __gmp_const union mpX_t *mpX_srcptr; + +typedef void (*mpexpr_fun_one_t) __GMP_PROTO ((mpX_ptr)); +typedef unsigned long (*mpexpr_fun_ui_one_t) __GMP_PROTO ((mpX_ptr)); + +typedef void (*mpexpr_fun_0ary_t) __GMP_PROTO ((mpX_ptr)); +typedef int (*mpexpr_fun_i_0ary_t) __GMP_PROTO ((void)); + +typedef void (*mpexpr_fun_unary_t) __GMP_PROTO ((mpX_ptr, mpX_srcptr)); +typedef void (*mpexpr_fun_unary_ui_t) __GMP_PROTO ((mpX_ptr, unsigned long)); +typedef int (*mpexpr_fun_i_unary_t) __GMP_PROTO ((mpX_srcptr)); +typedef int (*mpexpr_fun_i_unary_ui_t) __GMP_PROTO ((unsigned long)); + +typedef void (*mpexpr_fun_binary_t) __GMP_PROTO ((mpX_ptr, mpX_srcptr, mpX_srcptr)); +typedef void (*mpexpr_fun_binary_ui_t) __GMP_PROTO ((mpX_ptr, mpX_srcptr, unsigned long)); +typedef int (*mpexpr_fun_i_binary_t) __GMP_PROTO ((mpX_srcptr, mpX_srcptr)); +typedef int (*mpexpr_fun_i_binary_ui_t) __GMP_PROTO ((mpX_srcptr, unsigned long)); + +typedef void (*mpexpr_fun_ternary_t) + __GMP_PROTO ((mpX_ptr, mpX_srcptr, mpX_srcptr, mpX_srcptr)); +typedef void (*mpexpr_fun_ternary_ui_t) + __GMP_PROTO ((mpX_ptr, mpX_srcptr, mpX_srcptr, unsigned long)); +typedef int (*mpexpr_fun_i_ternary_t) + __GMP_PROTO ((mpX_srcptr, mpX_srcptr, mpX_srcptr)); +typedef int (*mpexpr_fun_i_ternary_ui_t) + __GMP_PROTO ((mpX_srcptr, mpX_srcptr, unsigned long)); + +typedef size_t (*mpexpr_fun_number_t) + __GMP_PROTO ((mpX_ptr, __gmp_const char *str, size_t len, int base)); +typedef void (*mpexpr_fun_swap_t) __GMP_PROTO ((mpX_ptr, mpX_ptr)); +typedef unsigned long (*mpexpr_fun_get_ui_t) __GMP_PROTO ((mpX_srcptr)); +typedef void (*mpexpr_fun_set_si_t) __GMP_PROTO ((mpX_srcptr, long)); struct mpexpr_control_t { - const struct mpexpr_operator_t *op; - int argcount; + __gmp_const struct mpexpr_operator_t *op; + int argcount; }; #define MPEXPR_VARIABLES 26 struct mpexpr_parse_t { - const struct mpexpr_operator_t *table; - - mpX_ptr res; - int base; - unsigned long prec; - const char *e; - size_t elen; - mpX_srcptr *var; - int error_code; - - int token; - const struct mpexpr_operator_t *token_op; - - union mpX_t *data_stack; - int data_top; - int data_alloc; - int data_inited; - - struct mpexpr_control_t *control_stack; - int control_top; - int control_alloc; - - mpexpr_fun_0ary_t mpX_clear; - mpexpr_fun_i_unary_t mpX_ulong_p; - mpexpr_fun_get_ui_t mpX_get_ui; - mpexpr_fun_unary_ui_t mpX_init; - mpexpr_fun_number_t mpX_number; - mpexpr_fun_unary_t mpX_set; - mpexpr_fun_unary_t mpX_set_or_swap; - mpexpr_fun_set_si_t mpX_set_si; - mpexpr_fun_swap_t mpX_swap; + __gmp_const struct mpexpr_operator_t *table; + + mpX_ptr res; + int base; + unsigned long prec; + __gmp_const char *e; + size_t elen; + mpX_srcptr *var; + int error_code; + + int token; + __gmp_const struct mpexpr_operator_t *token_op; + + union mpX_t *data_stack; + int data_top; + int data_alloc; + int data_inited; + + struct mpexpr_control_t *control_stack; + int control_top; + int control_alloc; + + + mpexpr_fun_0ary_t mpX_clear; + mpexpr_fun_i_unary_t mpX_ulong_p; + mpexpr_fun_get_ui_t mpX_get_ui; + mpexpr_fun_unary_ui_t mpX_init; + mpexpr_fun_number_t mpX_number; + mpexpr_fun_unary_t mpX_set; + mpexpr_fun_unary_t mpX_set_or_swap; + mpexpr_fun_set_si_t mpX_set_si; + mpexpr_fun_swap_t mpX_swap; }; -int mpexpr_evaluate (struct mpexpr_parse_t *p); -int mpexpr_va_to_var (void *var[], va_list ap); -size_t mpexpr_mpz_number (mpz_ptr res, const char *e, size_t elen, int base); +int mpexpr_evaluate __GMP_PROTO ((struct mpexpr_parse_t *p)); +int mpexpr_va_to_var __GMP_PROTO ((void *var[], va_list ap)); +size_t mpexpr_mpz_number __GMP_PROTO ((mpz_ptr res, + __gmp_const char *e, size_t elen, int base)); diff --git a/gmp/demos/expr/expr.c b/gmp/demos/expr/expr.c index 42dd7966be..f78c321738 100644 --- a/gmp/demos/expr/expr.c +++ b/gmp/demos/expr/expr.c @@ -1,32 +1,21 @@ /* mpexpr_evaluate -- shared code for simple expression evaluation -Copyright 2000-2002, 2004 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #include <ctype.h> #include <stdio.h> @@ -147,7 +136,7 @@ see https://www.gnu.org/licenses/. */ static int lookahead (struct mpexpr_parse_t *p, int prefix) { - const struct mpexpr_operator_t *op, *op_found; + __gmp_const struct mpexpr_operator_t *op, *op_found; size_t oplen, oplen_found, wlen; int i; @@ -289,7 +278,7 @@ lookahead (struct mpexpr_parse_t *p, int prefix) a reference through CP. */ #define CONTROL_PUSH(opptr,args) \ do { \ - const struct mpexpr_operator_t *op = opptr; \ + __gmp_const struct mpexpr_operator_t *op = opptr; \ struct mpexpr_control_t *cp; \ CONTROL_SPACE (); \ p->control_top++; \ @@ -382,7 +371,7 @@ mpexpr_evaluate (struct mpexpr_parse_t *p) /* "done" is a special sentinel at the bottom of the control stack, precedence -1 is lower than any normal operator. */ { - static const struct mpexpr_operator_t operator_done + static __gmp_const struct mpexpr_operator_t operator_done = { "DONE", NULL, MPEXPR_TYPE_DONE, -1 }; p->control_alloc = 20; diff --git a/gmp/demos/expr/expr.h b/gmp/demos/expr/expr.h index d3b7c77cc3..c3525b61ee 100644 --- a/gmp/demos/expr/expr.h +++ b/gmp/demos/expr/expr.h @@ -1,32 +1,21 @@ /* Header for expression evaluation. -Copyright 2000-2002, 2004 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #ifndef __EXPR_H__ @@ -109,34 +98,32 @@ see https://www.gnu.org/licenses/. */ #define MPEXPR_TYPE_OPERATOR 0x2000 -#ifdef __cplusplus -extern "C" { -#endif - -typedef void (*mpexpr_fun_t) (void); +typedef void (*mpexpr_fun_t) __GMP_PROTO ((void)); struct mpexpr_operator_t { - const char *name; - mpexpr_fun_t fun; - int type; - int precedence; + __gmp_const char *name; + mpexpr_fun_t fun; + int type; + int precedence; }; -int mpf_expr_a (const struct mpexpr_operator_t *, mpf_ptr, int, - unsigned long, const char *, size_t, mpf_srcptr [26]); -int mpf_expr (mpf_ptr, int, const char *, ...); +int mpf_expr_a __GMP_PROTO ((__gmp_const struct mpexpr_operator_t *table, + mpf_ptr res, int base, unsigned long prec, + __gmp_const char *e, size_t elen, + mpf_srcptr var[26])); +int mpf_expr __GMP_PROTO ((mpf_ptr res, int base, __gmp_const char *e, ...)); -int mpq_expr_a (const struct mpexpr_operator_t *, mpq_ptr, - int, const char *, size_t, mpq_srcptr [26]); -int mpq_expr (mpq_ptr, int, const char *, ...); +int mpq_expr_a __GMP_PROTO ((__gmp_const struct mpexpr_operator_t *table, + mpq_ptr res, int base, + __gmp_const char *e, size_t elen, + mpq_srcptr var[26])); +int mpq_expr __GMP_PROTO ((mpq_ptr res, int base, __gmp_const char *e, ...)); -int mpz_expr_a (const struct mpexpr_operator_t *, mpz_ptr, int, - const char *, size_t, mpz_srcptr [26]); -int mpz_expr (mpz_ptr, int, const char *, ...); - -#ifdef __cplusplus -} /* extern "C" */ -#endif +int mpz_expr_a __GMP_PROTO ((__gmp_const struct mpexpr_operator_t *table, + mpz_ptr res, int base, + __gmp_const char *e, size_t elen, + mpz_srcptr var[26])); +int mpz_expr __GMP_PROTO ((mpz_ptr res, int base, __gmp_const char *e, ...)); #endif diff --git a/gmp/demos/expr/exprf.c b/gmp/demos/expr/exprf.c index 1f7e21f893..c67ee51783 100644 --- a/gmp/demos/expr/exprf.c +++ b/gmp/demos/expr/exprf.c @@ -1,32 +1,21 @@ /* mpf expression evaluation -Copyright 2000-2002 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #include <stdio.h> #include <string.h> @@ -45,7 +34,7 @@ e_mpf_sgn (mpf_srcptr x) } -static const struct mpexpr_operator_t _mpf_expr_standard_table[] = { +static __gmp_const struct mpexpr_operator_t _mpf_expr_standard_table[] = { { "**", (mpexpr_fun_t) mpf_pow_ui, MPEXPR_TYPE_BINARY_UI | MPEXPR_TYPE_RIGHTASSOC, 220 }, @@ -99,17 +88,32 @@ static const struct mpexpr_operator_t _mpf_expr_standard_table[] = { { NULL } }; -const struct mpexpr_operator_t * const mpf_expr_standard_table +__gmp_const struct mpexpr_operator_t * __gmp_const mpf_expr_standard_table = _mpf_expr_standard_table; int -mpf_expr (mpf_ptr res, int base, const char *e, ...) +#if HAVE_STDARG +mpf_expr (mpf_ptr res, int base, __gmp_const char *e, ...) +#else +mpf_expr (va_alist) + va_dcl +#endif { mpf_srcptr var[MPEXPR_VARIABLES]; va_list ap; int ret; +#if HAVE_STDARG va_start (ap, e); +#else + mpf_ptr res; + int base; + __gmp_const char *e; + va_start (ap); + res = va_arg (ap, mpf_ptr); + base = va_arg (ap, int); + e = va_arg (ap, __gmp_const char *); +#endif TRACE (printf ("mpf_expr(): base %d, %s\n", base, e)); ret = mpexpr_va_to_var ((void **) var, ap); diff --git a/gmp/demos/expr/exprfa.c b/gmp/demos/expr/exprfa.c index 1918cb55cd..1cc00e0f04 100644 --- a/gmp/demos/expr/exprfa.c +++ b/gmp/demos/expr/exprfa.c @@ -1,32 +1,21 @@ /* mpf expression evaluation -Copyright 2000-2002, 2004 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ /* Future: Bitwise "&", "|" and "&" could be done, if desired. Not sure @@ -46,7 +35,7 @@ see https://www.gnu.org/licenses/. */ static size_t -e_mpf_number (mpf_ptr res, const char *e, size_t elen, int base) +e_mpf_number (mpf_ptr res, __gmp_const char *e, size_t elen, int base) { char *edup; size_t i, ret, extra=0; @@ -162,9 +151,9 @@ e_mpf_set_or_swap (mpf_ptr w, mpf_ptr x) int -mpf_expr_a (const struct mpexpr_operator_t *table, +mpf_expr_a (__gmp_const struct mpexpr_operator_t *table, mpf_ptr res, int base, unsigned long prec, - const char *e, size_t elen, + __gmp_const char *e, size_t elen, mpf_srcptr var[26]) { struct mpexpr_parse_t p; diff --git a/gmp/demos/expr/exprq.c b/gmp/demos/expr/exprq.c index 96432006ef..af91b00167 100644 --- a/gmp/demos/expr/exprq.c +++ b/gmp/demos/expr/exprq.c @@ -1,32 +1,21 @@ /* mpq expression evaluation -Copyright 2000-2002 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #include <stdio.h> #include <string.h> @@ -83,7 +72,7 @@ e_mpq_den (mpq_ptr w, mpq_srcptr x) } -static const struct mpexpr_operator_t _mpq_expr_standard_table[] = { +static __gmp_const struct mpexpr_operator_t _mpq_expr_standard_table[] = { { "**", (mpexpr_fun_t) e_mpq_pow_ui, MPEXPR_TYPE_BINARY_UI | MPEXPR_TYPE_RIGHTASSOC, 220 }, @@ -132,17 +121,32 @@ static const struct mpexpr_operator_t _mpq_expr_standard_table[] = { { NULL } }; -const struct mpexpr_operator_t * const mpq_expr_standard_table +__gmp_const struct mpexpr_operator_t * __gmp_const mpq_expr_standard_table = _mpq_expr_standard_table; int -mpq_expr (mpq_ptr res, int base, const char *e, ...) +#if HAVE_STDARG +mpq_expr (mpq_ptr res, int base, __gmp_const char *e, ...) +#else +mpq_expr (va_alist) + va_dcl +#endif { mpq_srcptr var[MPEXPR_VARIABLES]; va_list ap; int ret; +#if HAVE_STDARG va_start (ap, e); +#else + mpq_ptr res; + int base; + __gmp_const char *e; + va_start (ap); + res = va_arg (ap, mpq_ptr); + base = va_arg (ap, int); + e = va_arg (ap, __gmp_const char *); +#endif TRACE (printf ("mpq_expr(): base %d, %s\n", base, e)); ret = mpexpr_va_to_var ((void **) var, ap); diff --git a/gmp/demos/expr/exprqa.c b/gmp/demos/expr/exprqa.c index f3b6ecb495..c56f1ca691 100644 --- a/gmp/demos/expr/exprqa.c +++ b/gmp/demos/expr/exprqa.c @@ -5,28 +5,17 @@ Copyright 2000, 2001, 2004 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #include <stdio.h> @@ -57,7 +46,7 @@ e_mpq_set_si1 (mpq_ptr q, long num) /* The same as mpz, but putting the result in the numerator. Negatives and fractions aren't parsed here because '-' and '/' are operators. */ static size_t -e_mpq_number (mpq_ptr res, const char *e, size_t elen, int base) +e_mpq_number (mpq_ptr res, __gmp_const char *e, size_t elen, int base) { mpz_set_ui (mpq_denref (res), 1L); return mpexpr_mpz_number (mpq_numref (res), e, elen, base); @@ -72,9 +61,9 @@ e_mpq_init (mpq_ptr q, unsigned long prec) } int -mpq_expr_a (const struct mpexpr_operator_t *table, +mpq_expr_a (__gmp_const struct mpexpr_operator_t *table, mpq_ptr res, int base, - const char *e, size_t elen, + __gmp_const char *e, size_t elen, mpq_srcptr var[26]) { struct mpexpr_parse_t p; diff --git a/gmp/demos/expr/exprv.c b/gmp/demos/expr/exprv.c index c25741b023..b53682eec6 100644 --- a/gmp/demos/expr/exprv.c +++ b/gmp/demos/expr/exprv.c @@ -6,28 +6,17 @@ Copyright 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #include <stdio.h> #include "gmp.h" diff --git a/gmp/demos/expr/exprz.c b/gmp/demos/expr/exprz.c index bac1a9992e..7c01b9dc5f 100644 --- a/gmp/demos/expr/exprz.c +++ b/gmp/demos/expr/exprz.c @@ -1,32 +1,21 @@ /* mpz expression evaluation, simple part -Copyright 2000-2002 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #include <ctype.h> #include <stdio.h> @@ -97,7 +86,7 @@ e_mpz_clrbit (mpz_ptr w, mpz_srcptr x, unsigned long n) mpz_clrbit (w, n); } -static const struct mpexpr_operator_t _mpz_expr_standard_table[] = { +static __gmp_const struct mpexpr_operator_t _mpz_expr_standard_table[] = { { "**", (mpexpr_fun_t) mpz_pow_ui, MPEXPR_TYPE_BINARY_UI | MPEXPR_TYPE_RIGHTASSOC, 220 }, @@ -183,17 +172,32 @@ static const struct mpexpr_operator_t _mpz_expr_standard_table[] = { /* The table is available globally only through a pointer, so the table size can change without breaking binary compatibility. */ -const struct mpexpr_operator_t * const mpz_expr_standard_table +__gmp_const struct mpexpr_operator_t * __gmp_const mpz_expr_standard_table = _mpz_expr_standard_table; int -mpz_expr (mpz_ptr res, int base, const char *e, ...) +#if HAVE_STDARG +mpz_expr (mpz_ptr res, int base, __gmp_const char *e, ...) +#else +mpz_expr (va_alist) + va_dcl +#endif { mpz_srcptr var[MPEXPR_VARIABLES]; va_list ap; int ret; +#if HAVE_STDARG va_start (ap, e); +#else + mpz_ptr res; + int base; + __gmp_const char *e; + va_start (ap); + res = va_arg (ap, mpz_ptr); + base = va_arg (ap, int); + e = va_arg (ap, __gmp_const char *); +#endif TRACE (printf ("mpz_expr(): base %d, %s\n", base, e)); ret = mpexpr_va_to_var ((void **) var, ap); diff --git a/gmp/demos/expr/exprza.c b/gmp/demos/expr/exprza.c index eda830d970..81e16ce286 100644 --- a/gmp/demos/expr/exprza.c +++ b/gmp/demos/expr/exprza.c @@ -1,32 +1,21 @@ /* mpz expression evaluation -Copyright 2000-2002, 2004 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #include <ctype.h> #include <stdio.h> @@ -38,7 +27,7 @@ see https://www.gnu.org/licenses/. */ /* No need to parse '-' since that's handled as an operator. This function also by mpq_expr_a, so it's not static. */ size_t -mpexpr_mpz_number (mpz_ptr res, const char *e, size_t elen, int base) +mpexpr_mpz_number (mpz_ptr res, __gmp_const char *e, size_t elen, int base) { char *edup; size_t i, ret; @@ -80,9 +69,9 @@ e_mpz_init (mpz_ptr z, unsigned long prec) } int -mpz_expr_a (const struct mpexpr_operator_t *table, +mpz_expr_a (__gmp_const struct mpexpr_operator_t *table, mpz_ptr res, int base, - const char *e, size_t elen, + __gmp_const char *e, size_t elen, mpz_srcptr var[26]) { struct mpexpr_parse_t p; diff --git a/gmp/demos/expr/run-expr.c b/gmp/demos/expr/run-expr.c index 706b910287..169f5a8814 100644 --- a/gmp/demos/expr/run-expr.c +++ b/gmp/demos/expr/run-expr.c @@ -1,32 +1,21 @@ /* Demo program to run expression evaluation. -Copyright 2000-2002, 2004 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ /* Usage: ./run-expr [-z] [-q] [-f] [-p prec] [-b base] expression... diff --git a/gmp/demos/expr/t-expr.c b/gmp/demos/expr/t-expr.c index 2f808dd8cd..195350e829 100644 --- a/gmp/demos/expr/t-expr.c +++ b/gmp/demos/expr/t-expr.c @@ -1,32 +1,21 @@ /* Test expression evaluation (print nothing and exit 0 if successful). -Copyright 2000-2004 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #include <stdio.h> #include <stdlib.h> diff --git a/gmp/demos/factorize.c b/gmp/demos/factorize.c index 0d5f26d909..0d6c11ee45 100644 --- a/gmp/demos/factorize.c +++ b/gmp/demos/factorize.c @@ -1,6 +1,7 @@ /* Factoring with Pollard's rho method. -Copyright 1995, 1997-2003, 2005, 2009, 2012 Free Software Foundation, Inc. +Copyright 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 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 @@ -12,375 +13,297 @@ 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 https://www.gnu.org/licenses/. */ +this program. If not, see http://www.gnu.org/licenses/. */ #include <stdlib.h> #include <stdio.h> #include <string.h> -#include <inttypes.h> #include "gmp.h" -static unsigned char primes_diff[] = { -#define P(a,b,c) a, -#include "primes.h" -#undef P -}; -#define PRIMES_PTAB_ENTRIES (sizeof(primes_diff) / sizeof(primes_diff[0])) - int flag_verbose = 0; -/* Prove primality or run probabilistic tests. */ -int flag_prove_primality = 1; - -/* Number of Miller-Rabin tests to run when not proving primality. */ -#define MR_REPS 25 - -struct factors -{ - mpz_t *p; - unsigned long *e; - long nfactors; -}; - -void factor (mpz_t, struct factors *); +static unsigned add[] = {4, 2, 4, 2, 4, 6, 2, 6}; void -factor_init (struct factors *factors) +factor_using_division (mpz_t t, unsigned int limit) { - factors->p = malloc (1); - factors->e = malloc (1); - factors->nfactors = 0; -} + mpz_t q, r; + unsigned long int f; + int ai; + unsigned *addv = add; + unsigned int failures; -void -factor_clear (struct factors *factors) -{ - int i; - - for (i = 0; i < factors->nfactors; i++) - mpz_clear (factors->p[i]); - - free (factors->p); - free (factors->e); -} - -void -factor_insert (struct factors *factors, mpz_t prime) -{ - long nfactors = factors->nfactors; - mpz_t *p = factors->p; - unsigned long *e = factors->e; - long i, j; - - /* Locate position for insert new or increment e. */ - for (i = nfactors - 1; i >= 0; i--) + if (flag_verbose) { - if (mpz_cmp (p[i], prime) <= 0) - break; + printf ("[trial division (%u)] ", limit); + fflush (stdout); } - if (i < 0 || mpz_cmp (p[i], prime) != 0) - { - p = realloc (p, (nfactors + 1) * sizeof p[0]); - e = realloc (e, (nfactors + 1) * sizeof e[0]); - - mpz_init (p[nfactors]); - for (j = nfactors - 1; j > i; j--) - { - mpz_set (p[j + 1], p[j]); - e[j + 1] = e[j]; - } - mpz_set (p[i + 1], prime); - e[i + 1] = 1; + mpz_init (q); + mpz_init (r); - factors->p = p; - factors->e = e; - factors->nfactors = nfactors + 1; - } - else + f = mpz_scan1 (t, 0); + mpz_div_2exp (t, t, f); + while (f) { - e[i] += 1; + printf ("2 "); + fflush (stdout); + --f; } -} - -void -factor_insert_ui (struct factors *factors, unsigned long prime) -{ - mpz_t pz; - - mpz_init_set_ui (pz, prime); - factor_insert (factors, pz); - mpz_clear (pz); -} - - -void -factor_using_division (mpz_t t, struct factors *factors) -{ - mpz_t q; - unsigned long int p; - int i; - if (flag_verbose > 0) + for (;;) { - printf ("[trial division] "); + mpz_tdiv_qr_ui (q, r, t, 3); + if (mpz_cmp_ui (r, 0) != 0) + break; + mpz_set (t, q); + printf ("3 "); + fflush (stdout); } - mpz_init (q); - - p = mpz_scan1 (t, 0); - mpz_div_2exp (t, t, p); - while (p) + for (;;) { - factor_insert_ui (factors, 2); - --p; + mpz_tdiv_qr_ui (q, r, t, 5); + if (mpz_cmp_ui (r, 0) != 0) + break; + mpz_set (t, q); + printf ("5 "); + fflush (stdout); } - p = 3; - for (i = 1; i <= PRIMES_PTAB_ENTRIES;) + failures = 0; + f = 7; + ai = 0; + while (mpz_cmp_ui (t, 1) != 0) { - if (! mpz_divisible_ui_p (t, p)) + mpz_tdiv_qr_ui (q, r, t, f); + if (mpz_cmp_ui (r, 0) != 0) { - p += primes_diff[i++]; - if (mpz_cmp_ui (t, p * p) < 0) + f += addv[ai]; + if (mpz_cmp_ui (q, f) < 0) + break; + ai = (ai + 1) & 7; + failures++; + if (failures > limit) break; } else { - mpz_tdiv_q_ui (t, t, p); - factor_insert_ui (factors, p); + mpz_swap (t, q); + printf ("%lu ", f); + fflush (stdout); + failures = 0; } } mpz_clear (q); + mpz_clear (r); } -static int -mp_millerrabin (mpz_srcptr n, mpz_srcptr nm1, mpz_ptr x, mpz_ptr y, - mpz_srcptr q, unsigned long int k) -{ - unsigned long int i; - - mpz_powm (y, x, q, n); - - if (mpz_cmp_ui (y, 1) == 0 || mpz_cmp (y, nm1) == 0) - return 1; - - for (i = 1; i < k; i++) - { - mpz_powm_ui (y, y, 2, n); - if (mpz_cmp (y, nm1) == 0) - return 1; - if (mpz_cmp_ui (y, 1) == 0) - return 0; - } - return 0; -} - -int -mp_prime_p (mpz_t n) +void +factor_using_division_2kp (mpz_t t, unsigned int limit, unsigned long p) { - int k, r, is_prime; - mpz_t q, a, nm1, tmp; - struct factors factors; - - if (mpz_cmp_ui (n, 1) <= 0) - return 0; + mpz_t r; + mpz_t f; + unsigned int k; - /* We have already casted out small primes. */ - if (mpz_cmp_ui (n, (long) FIRST_OMITTED_PRIME * FIRST_OMITTED_PRIME) < 0) - return 1; - - mpz_inits (q, a, nm1, tmp, NULL); - - /* Precomputation for Miller-Rabin. */ - mpz_sub_ui (nm1, n, 1); - - /* Find q and k, where q is odd and n = 1 + 2**k * q. */ - k = mpz_scan1 (nm1, 0); - mpz_tdiv_q_2exp (q, nm1, k); - - mpz_set_ui (a, 2); - - /* Perform a Miller-Rabin test, finds most composites quickly. */ - if (!mp_millerrabin (n, nm1, a, tmp, q, k)) + if (flag_verbose) { - is_prime = 0; - goto ret2; + printf ("[trial division (%u)] ", limit); + fflush (stdout); } - if (flag_prove_primality) + mpz_init (r); + mpz_init_set_ui (f, 2 * p); + mpz_add_ui (f, f, 1); + for (k = 1; k < limit; k++) { - /* Factor n-1 for Lucas. */ - mpz_set (tmp, nm1); - factor (tmp, &factors); - } - - /* Loop until Lucas proves our number prime, or Miller-Rabin proves our - number composite. */ - for (r = 0; r < PRIMES_PTAB_ENTRIES; r++) - { - int i; - - if (flag_prove_primality) + mpz_tdiv_r (r, t, f); + while (mpz_cmp_ui (r, 0) == 0) { - is_prime = 1; - for (i = 0; i < factors.nfactors && is_prime; i++) - { - mpz_divexact (tmp, nm1, factors.p[i]); - mpz_powm (tmp, a, tmp, n); - is_prime = mpz_cmp_ui (tmp, 1) != 0; - } - } - else - { - /* After enough Miller-Rabin runs, be content. */ - is_prime = (r == MR_REPS - 1); - } - - if (is_prime) - goto ret1; - - mpz_add_ui (a, a, primes_diff[r]); /* Establish new base. */ - - if (!mp_millerrabin (n, nm1, a, tmp, q, k)) - { - is_prime = 0; - goto ret1; + mpz_tdiv_q (t, t, f); + mpz_tdiv_r (r, t, f); + mpz_out_str (stdout, 10, f); + fflush (stdout); + fputc (' ', stdout); } + mpz_add_ui (f, f, 2 * p); } - fprintf (stderr, "Lucas prime test failure. This should not happen\n"); - abort (); - - ret1: - if (flag_prove_primality) - factor_clear (&factors); - ret2: - mpz_clears (q, a, nm1, tmp, NULL); - - return is_prime; + mpz_clear (f); + mpz_clear (r); } void -factor_using_pollard_rho (mpz_t n, unsigned long a, struct factors *factors) +factor_using_pollard_rho (mpz_t n, int a_int, unsigned long p) { - mpz_t x, z, y, P; - mpz_t t, t2; - unsigned long long k, l, i; + mpz_t x, x1, y, P; + mpz_t a; + mpz_t g; + mpz_t t1, t2; + int k, l, c, i; - if (flag_verbose > 0) + if (flag_verbose) { - printf ("[pollard-rho (%lu)] ", a); + printf ("[pollard-rho (%d)] ", a_int); + fflush (stdout); } - mpz_inits (t, t2, NULL); + mpz_init (g); + mpz_init (t1); + mpz_init (t2); + + mpz_init_set_si (a, a_int); mpz_init_set_si (y, 2); mpz_init_set_si (x, 2); - mpz_init_set_si (z, 2); - mpz_init_set_ui (P, 1); + mpz_init_set_si (x1, 2); k = 1; l = 1; + mpz_init_set_ui (P, 1); + c = 0; while (mpz_cmp_ui (n, 1) != 0) { - for (;;) +S2: + if (p != 0) { - do + mpz_powm_ui (x, x, p, n); mpz_add (x, x, a); + } + else + { + mpz_mul (x, x, x); mpz_add (x, x, a); mpz_mod (x, x, n); + } + mpz_sub (t1, x1, x); mpz_mul (t2, P, t1); mpz_mod (P, t2, n); + c++; + if (c == 20) + { + c = 0; + mpz_gcd (g, P, n); + if (mpz_cmp_ui (g, 1) != 0) + goto S4; + mpz_set (y, x); + } +S3: + k--; + if (k > 0) + goto S2; + + mpz_gcd (g, P, n); + if (mpz_cmp_ui (g, 1) != 0) + goto S4; + + mpz_set (x1, x); + k = l; + l = 2 * l; + for (i = 0; i < k; i++) + { + if (p != 0) { - mpz_mul (t, x, x); - mpz_mod (x, t, n); - mpz_add_ui (x, x, a); - - mpz_sub (t, z, x); - mpz_mul (t2, P, t); - mpz_mod (P, t2, n); - - if (k % 32 == 1) - { - mpz_gcd (t, P, n); - if (mpz_cmp_ui (t, 1) != 0) - goto factor_found; - mpz_set (y, x); - } + mpz_powm_ui (x, x, p, n); mpz_add (x, x, a); } - while (--k != 0); - - mpz_set (z, x); - k = l; - l = 2 * l; - for (i = 0; i < k; i++) + else { - mpz_mul (t, x, x); - mpz_mod (x, t, n); - mpz_add_ui (x, x, a); + mpz_mul (x, x, x); mpz_add (x, x, a); mpz_mod (x, x, n); } - mpz_set (y, x); } - - factor_found: + mpz_set (y, x); + c = 0; + goto S2; +S4: do { - mpz_mul (t, y, y); - mpz_mod (y, t, n); - mpz_add_ui (y, y, a); - - mpz_sub (t, z, y); - mpz_gcd (t, t, n); + if (p != 0) + { + mpz_powm_ui (y, y, p, n); mpz_add (y, y, a); + } + else + { + mpz_mul (y, y, y); mpz_add (y, y, a); mpz_mod (y, y, n); + } + mpz_sub (t1, x1, y); mpz_gcd (g, t1, n); } - while (mpz_cmp_ui (t, 1) == 0); + while (mpz_cmp_ui (g, 1) == 0); - mpz_divexact (n, n, t); /* divide by t, before t is overwritten */ + mpz_div (n, n, g); /* divide by g, before g is overwritten */ - if (!mp_prime_p (t)) + if (!mpz_probab_prime_p (g, 3)) { - if (flag_verbose > 0) + do + { + mp_limb_t a_limb; + mpn_random (&a_limb, (mp_size_t) 1); + a_int = (int) a_limb; + } + while (a_int == -2 || a_int == 0); + + if (flag_verbose) { printf ("[composite factor--restarting pollard-rho] "); + fflush (stdout); } - factor_using_pollard_rho (t, a + 1, factors); + factor_using_pollard_rho (g, a_int, p); } else { - factor_insert (factors, t); + mpz_out_str (stdout, 10, g); + fflush (stdout); + fputc (' ', stdout); } - - if (mp_prime_p (n)) + mpz_mod (x, x, n); + mpz_mod (x1, x1, n); + mpz_mod (y, y, n); + if (mpz_probab_prime_p (n, 3)) { - factor_insert (factors, n); + mpz_out_str (stdout, 10, n); + fflush (stdout); + fputc (' ', stdout); break; } - - mpz_mod (x, x, n); - mpz_mod (z, z, n); - mpz_mod (y, y, n); } - mpz_clears (P, t2, t, z, x, y, NULL); + mpz_clear (g); + mpz_clear (P); + mpz_clear (t2); + mpz_clear (t1); + mpz_clear (a); + mpz_clear (x1); + mpz_clear (x); + mpz_clear (y); } void -factor (mpz_t t, struct factors *factors) +factor (mpz_t t, unsigned long p) { - factor_init (factors); + unsigned int division_limit; - if (mpz_sgn (t) != 0) - { - factor_using_division (t, factors); + if (mpz_sgn (t) == 0) + return; - if (mpz_cmp_ui (t, 1) != 0) + /* Set the trial division limit according the size of t. */ + division_limit = mpz_sizeinbase (t, 2); + if (division_limit > 1000) + division_limit = 1000 * 1000; + else + division_limit = division_limit * division_limit; + + if (p != 0) + factor_using_division_2kp (t, division_limit / 10, p); + else + factor_using_division (t, division_limit); + + if (mpz_cmp_ui (t, 1) != 0) + { + if (flag_verbose) { - if (flag_verbose > 0) - { - printf ("[is number prime?] "); - } - if (mp_prime_p (t)) - factor_insert (factors, t); - else - factor_using_pollard_rho (t, 1, factors); + printf ("[is number prime?] "); + fflush (stdout); } + if (mpz_probab_prime_p (t, 3)) + mpz_out_str (stdout, 10, t); + else + factor_using_pollard_rho (t, 1, p); } } @@ -388,18 +311,12 @@ int main (int argc, char *argv[]) { mpz_t t; - int i, j, k; - struct factors factors; + unsigned long p; + int i; - while (argc > 1) + if (argc > 1 && !strcmp (argv[1], "-v")) { - if (!strcmp (argv[1], "-v")) - flag_verbose = 1; - else if (!strcmp (argv[1], "-w")) - flag_prove_primality = 0; - else - break; - + flag_verbose = 1; argv++; argc--; } @@ -407,19 +324,33 @@ main (int argc, char *argv[]) mpz_init (t); if (argc > 1) { + p = 0; for (i = 1; i < argc; i++) { - mpz_set_str (t, argv[i], 0); - - gmp_printf ("%Zd:", t); - factor (t, &factors); - - for (j = 0; j < factors.nfactors; j++) - for (k = 0; k < factors.e[j]; k++) - gmp_printf (" %Zd", factors.p[j]); + if (!strncmp (argv[i], "-Mp", 3)) + { + p = atoi (argv[i] + 3); + mpz_set_ui (t, 1); + mpz_mul_2exp (t, t, p); + mpz_sub_ui (t, t, 1); + } + else if (!strncmp (argv[i], "-2kp", 4)) + { + p = atoi (argv[i] + 4); + continue; + } + else + { + mpz_set_str (t, argv[i], 0); + } - puts (""); - factor_clear (&factors); + if (mpz_cmp_ui (t, 0) == 0) + puts ("-"); + else + { + factor (t, p); + puts (""); + } } } else @@ -429,16 +360,9 @@ main (int argc, char *argv[]) mpz_inp_str (t, stdin, 0); if (feof (stdin)) break; - - gmp_printf ("%Zd:", t); - factor (t, &factors); - - for (j = 0; j < factors.nfactors; j++) - for (k = 0; k < factors.e[j]; k++) - gmp_printf (" %Zd", factors.p[j]); - + mpz_out_str (stdout, 10, t); printf (" = "); + factor (t, 0); puts (""); - factor_clear (&factors); } } diff --git a/gmp/demos/isprime.c b/gmp/demos/isprime.c index 40ee70eb99..5b245dd088 100644 --- a/gmp/demos/isprime.c +++ b/gmp/demos/isprime.c @@ -1,7 +1,7 @@ /* Classify numbers as probable primes, primes or composites. With -q return true if the following argument is a (probable) prime. -Copyright 1999, 2000, 2002, 2005, 2012 Free Software Foundation, Inc. +Copyright 1999, 2000, 2002, 2005 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 @@ -13,7 +13,7 @@ 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 https://www.gnu.org/licenses/. */ +this program. If not, see http://www.gnu.org/licenses/. */ #include <stdlib.h> #include <string.h> @@ -47,7 +47,7 @@ main (int argc, char **argv) { if (mpz_set_str (n, argv[2], 0) != 0) print_usage_and_exit (); - exit (mpz_probab_prime_p (n, 25) == 0); + exit (mpz_probab_prime_p (n, 5) == 0); } for (i = 1; i < argc; i++) @@ -55,7 +55,7 @@ main (int argc, char **argv) int class; if (mpz_set_str (n, argv[i], 0) != 0) print_usage_and_exit (); - class = mpz_probab_prime_p (n, 25); + class = mpz_probab_prime_p (n, 5); mpz_out_str (stdout, 10, n); if (class == 0) puts (" is composite"); diff --git a/gmp/demos/perl/GMP.pm b/gmp/demos/perl/GMP.pm index 46bc707cfe..00b6761662 100644 --- a/gmp/demos/perl/GMP.pm +++ b/gmp/demos/perl/GMP.pm @@ -1,32 +1,21 @@ # GMP perl module -# Copyright 2001-2004 Free Software Foundation, Inc. +# Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. # [Note: The above copyright notice is repeated in the documentation section # below, in order to get it into man pages etc generated by the various pod @@ -220,7 +209,7 @@ and must be a multiple of $size bytes. C<mpz_export> conversely returns a string of byte data, which will be a multiple of $size bytes. C<invert> returns the inverse, or undef if it doesn't exist. C<remove> -returns a remainder/multiplicity pair. C<root> returns the nth root, and +returns a remainder/multiplicty pair. C<root> returns the nth root, and C<roote> returns a root/bool pair, the bool indicating whether the root is exact. C<sqrtrem> and C<rootrem> return a root/remainder pair. @@ -488,7 +477,7 @@ corresponding GMP function. For example, Arguments to operators and functions are converted as necessary to the appropriate type. For instance C<**> requires an unsigned integer exponent, and an mpq argument will be converted, so long as it's an integer in the -appropriate range. +apropriate range. use GMP::Mpz (mpz); use GMP::Mpq (mpq); @@ -635,33 +624,22 @@ Some assertion checking is available as a compile-time option. =head1 COPYRIGHT -Copyright 2001-2004 Free Software Foundation, Inc. +Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published +by the Free Software Foundation; either version 3 of the License, or (at +your option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. =cut diff --git a/gmp/demos/perl/GMP.xs b/gmp/demos/perl/GMP.xs index 9738259c2a..2282c89282 100644 --- a/gmp/demos/perl/GMP.xs +++ b/gmp/demos/perl/GMP.xs @@ -1,32 +1,21 @@ /* GMP module external subroutines. -Copyright 2001-2003 Free Software Foundation, Inc. +Copyright 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. /* Notes: diff --git a/gmp/demos/perl/GMP/Mpf.pm b/gmp/demos/perl/GMP/Mpf.pm index 4c0dec6cea..ea7b28b40e 100644 --- a/gmp/demos/perl/GMP/Mpf.pm +++ b/gmp/demos/perl/GMP/Mpf.pm @@ -2,31 +2,20 @@ # Copyright 2001, 2003 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. package GMP::Mpf; diff --git a/gmp/demos/perl/GMP/Mpq.pm b/gmp/demos/perl/GMP/Mpq.pm index fe010849e0..cd60cbef17 100644 --- a/gmp/demos/perl/GMP/Mpq.pm +++ b/gmp/demos/perl/GMP/Mpq.pm @@ -2,31 +2,20 @@ # Copyright 2001 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. package GMP::Mpq; diff --git a/gmp/demos/perl/GMP/Mpz.pm b/gmp/demos/perl/GMP/Mpz.pm index 27e6336775..a86d4aba4d 100644 --- a/gmp/demos/perl/GMP/Mpz.pm +++ b/gmp/demos/perl/GMP/Mpz.pm @@ -1,32 +1,21 @@ # GMP mpz module. -# Copyright 2001-2003 Free Software Foundation, Inc. +# Copyright 2001, 2002, 2003 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. package GMP::Mpz; diff --git a/gmp/demos/perl/GMP/Rand.pm b/gmp/demos/perl/GMP/Rand.pm index 9f7d763dd5..049c729353 100644 --- a/gmp/demos/perl/GMP/Rand.pm +++ b/gmp/demos/perl/GMP/Rand.pm @@ -2,31 +2,20 @@ # Copyright 2001, 2003 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. package GMP::Rand; diff --git a/gmp/demos/perl/INSTALL b/gmp/demos/perl/INSTALL index f3d7c53b1c..e503c79dd8 100644 --- a/gmp/demos/perl/INSTALL +++ b/gmp/demos/perl/INSTALL @@ -3,28 +3,17 @@ Copyright 2001, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. The GNU MP Library 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. +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. diff --git a/gmp/demos/perl/Makefile.PL b/gmp/demos/perl/Makefile.PL index a676710c1c..c30b503439 100644 --- a/gmp/demos/perl/Makefile.PL +++ b/gmp/demos/perl/Makefile.PL @@ -2,31 +2,20 @@ # Copyright 2001, 2003, 2004 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. # Bugs: diff --git a/gmp/demos/perl/sample.pl b/gmp/demos/perl/sample.pl index 8a10ee1ebb..20ca5a7040 100644 --- a/gmp/demos/perl/sample.pl +++ b/gmp/demos/perl/sample.pl @@ -4,31 +4,20 @@ # Copyright 2001, 2004 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. use strict; diff --git a/gmp/demos/perl/test.pl b/gmp/demos/perl/test.pl index 2b54089165..40a903378d 100644 --- a/gmp/demos/perl/test.pl +++ b/gmp/demos/perl/test.pl @@ -2,33 +2,22 @@ # GMP perl module tests -# Copyright 2001-2003 Free Software Foundation, Inc. +# Copyright 2001, 2002, 2003 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. # These tests aim to exercise the many possible combinations of operands diff --git a/gmp/demos/perl/test2.pl b/gmp/demos/perl/test2.pl index 31a1d6bdd9..645d3cfbb7 100644 --- a/gmp/demos/perl/test2.pl +++ b/gmp/demos/perl/test2.pl @@ -2,31 +2,20 @@ # Copyright 2001 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. # The following uses of :constants seem to provoke segvs in perl 5.005_03, diff --git a/gmp/demos/perl/typemap b/gmp/demos/perl/typemap index e863a9c516..7ad7976418 100644 --- a/gmp/demos/perl/typemap +++ b/gmp/demos/perl/typemap @@ -2,31 +2,20 @@ # Copyright 2001, 2003 Free Software Foundation, Inc. # -# This file is part of the GNU MP Library. +# This file is part of the GNU MP Library. # -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: +# The GNU MP Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. # -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. +# The GNU MP Library 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 Lesser General Public +# License for more details. # -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library 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 copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. +# You should have received a copy of the GNU Lesser General Public License +# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. TYPEMAP @@ -84,7 +73,7 @@ ULONG_COERCE ORDER_NOSWAP assert ($arg != &PL_sv_yes); DUMMY - /* dummy $var */ + /* dummy $var */ CONST_STRING_ASSUME /* No need to check for SvPOKp and use SvPV, this mapping is only used for overload_constant, which always gets literal diff --git a/gmp/demos/pexpr-config-h.in b/gmp/demos/pexpr-config-h.in index b3e7f5d46f..77f767f7ac 100644 --- a/gmp/demos/pexpr-config-h.in +++ b/gmp/demos/pexpr-config-h.in @@ -14,7 +14,7 @@ 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 https://www.gnu.org/licenses/. */ +this program. If not, see http://www.gnu.org/licenses/. */ /* Define if you have the <sys/resource.h> header file. */ diff --git a/gmp/demos/pexpr.c b/gmp/demos/pexpr.c index ce28187811..ec4eecbb2f 100644 --- a/gmp/demos/pexpr.c +++ b/gmp/demos/pexpr.c @@ -1,7 +1,7 @@ /* Program for computing integer expressions using the GNU Multiple Precision Arithmetic Library. -Copyright 1997, 1999-2002, 2005, 2008, 2012 Free Software Foundation, Inc. +Copyright 1997, 1999, 2000, 2001, 2002, 2005 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 @@ -13,7 +13,7 @@ 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 https://www.gnu.org/licenses/. */ +this program. If not, see http://www.gnu.org/licenses/. */ /* This expressions evaluator works by building an expression tree (using a @@ -109,21 +109,21 @@ struct expr typedef struct expr *expr_t; -void cleanup_and_exit (int); - -char *skipspace (char *); -void makeexp (expr_t *, enum op_t, expr_t, expr_t); -void free_expr (expr_t); -char *expr (char *, expr_t *); -char *term (char *, expr_t *); -char *power (char *, expr_t *); -char *factor (char *, expr_t *); -int match (char *, char *); -int matchp (char *, char *); -int cputime (void); - -void mpz_eval_expr (mpz_ptr, expr_t); -void mpz_eval_mod_expr (mpz_ptr, expr_t, mpz_ptr); +void cleanup_and_exit __GMP_PROTO ((int)); + +char *skipspace __GMP_PROTO ((char *)); +void makeexp __GMP_PROTO ((expr_t *, enum op_t, expr_t, expr_t)); +void free_expr __GMP_PROTO ((expr_t)); +char *expr __GMP_PROTO ((char *, expr_t *)); +char *term __GMP_PROTO ((char *, expr_t *)); +char *power __GMP_PROTO ((char *, expr_t *)); +char *factor __GMP_PROTO ((char *, expr_t *)); +int match __GMP_PROTO ((char *, char *)); +int matchp __GMP_PROTO ((char *, char *)); +int cputime __GMP_PROTO ((void)); + +void mpz_eval_expr __GMP_PROTO ((mpz_ptr, expr_t)); +void mpz_eval_mod_expr __GMP_PROTO ((mpz_ptr, expr_t, mpz_ptr)); char *error; int flag_print = 1; diff --git a/gmp/demos/primes.c b/gmp/demos/primes.c index 3cb32e2e25..db763062ca 100644 --- a/gmp/demos/primes.c +++ b/gmp/demos/primes.c @@ -2,7 +2,7 @@ Written by tege while on holiday in Rodupp, August 2001. Between 10 and 500 times faster than previous program. -Copyright 2001, 2002, 2006, 2012 Free Software Foundation, Inc. +Copyright 2001, 2002, 2006 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 @@ -14,7 +14,7 @@ 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 https://www.gnu.org/licenses/. */ +this program. If not, see http://www.gnu.org/licenses/. */ #include <stdlib.h> #include <stdio.h> @@ -61,9 +61,9 @@ struct primes struct primes *primes; unsigned long n_primes; -void find_primes (unsigned char *, mpz_t, unsigned long, mpz_t); -void sieve_region (unsigned char *, mpz_t, unsigned long); -void make_primelist (unsigned long); +void find_primes __GMP_PROTO ((unsigned char *, mpz_t, unsigned long, mpz_t)); +void sieve_region __GMP_PROTO ((unsigned char *, mpz_t, unsigned long)); +void make_primelist __GMP_PROTO ((unsigned long)); int flag_print = 1; int flag_count = 0; @@ -283,7 +283,7 @@ sieve_region (unsigned char *s, mpz_t fr, unsigned long rsize) { start = (prime - mpz_tdiv_ui (fr, prime)) % prime; if (start % 2 != 0) - start += prime; /* adjust if even divisible */ + start += prime; /* adjust if even divisable */ } start2 = start / 2; } diff --git a/gmp/demos/primes.h b/gmp/demos/primes.h deleted file mode 100644 index b85c7e1ff2..0000000000 --- a/gmp/demos/primes.h +++ /dev/null @@ -1,552 +0,0 @@ -P( 1, 0xaaaaaaaaaaaaaaabUL, 0x5555555555555555UL) /* 3 */ -P( 2, 0xcccccccccccccccdUL, 0x3333333333333333UL) /* 5 */ -P( 2, 0x6db6db6db6db6db7UL, 0x2492492492492492UL) /* 7 */ -P( 4, 0x2e8ba2e8ba2e8ba3UL, 0x1745d1745d1745d1UL) /* 11 */ -P( 2, 0x4ec4ec4ec4ec4ec5UL, 0x13b13b13b13b13b1UL) /* 13 */ -P( 4, 0xf0f0f0f0f0f0f0f1UL, 0x0f0f0f0f0f0f0f0fUL) /* 17 */ -P( 2, 0x86bca1af286bca1bUL, 0x0d79435e50d79435UL) /* 19 */ -P( 4, 0xd37a6f4de9bd37a7UL, 0x0b21642c8590b216UL) /* 23 */ -P( 6, 0x34f72c234f72c235UL, 0x08d3dcb08d3dcb08UL) /* 29 */ -P( 2, 0xef7bdef7bdef7bdfUL, 0x0842108421084210UL) /* 31 */ -P( 6, 0x14c1bacf914c1badUL, 0x06eb3e45306eb3e4UL) /* 37 */ -P( 4, 0x8f9c18f9c18f9c19UL, 0x063e7063e7063e70UL) /* 41 */ -P( 2, 0x82fa0be82fa0be83UL, 0x05f417d05f417d05UL) /* 43 */ -P( 4, 0x51b3bea3677d46cfUL, 0x0572620ae4c415c9UL) /* 47 */ -P( 6, 0x21cfb2b78c13521dUL, 0x04d4873ecade304dUL) /* 53 */ -P( 6, 0xcbeea4e1a08ad8f3UL, 0x0456c797dd49c341UL) /* 59 */ -P( 2, 0x4fbcda3ac10c9715UL, 0x04325c53ef368eb0UL) /* 61 */ -P( 6, 0xf0b7672a07a44c6bUL, 0x03d226357e16ece5UL) /* 67 */ -P( 4, 0x193d4bb7e327a977UL, 0x039b0ad12073615aUL) /* 71 */ -P( 2, 0x7e3f1f8fc7e3f1f9UL, 0x0381c0e070381c0eUL) /* 73 */ -P( 6, 0x9b8b577e613716afUL, 0x033d91d2a2067b23UL) /* 79 */ -P( 4, 0xa3784a062b2e43dbUL, 0x03159721ed7e7534UL) /* 83 */ -P( 6, 0xf47e8fd1fa3f47e9UL, 0x02e05c0b81702e05UL) /* 89 */ -P( 8, 0xa3a0fd5c5f02a3a1UL, 0x02a3a0fd5c5f02a3UL) /* 97 */ -P( 4, 0x3a4c0a237c32b16dUL, 0x0288df0cac5b3f5dUL) /* 101 */ -P( 2, 0xdab7ec1dd3431b57UL, 0x027c45979c95204fUL) /* 103 */ -P( 4, 0x77a04c8f8d28ac43UL, 0x02647c69456217ecUL) /* 107 */ -P( 2, 0xa6c0964fda6c0965UL, 0x02593f69b02593f6UL) /* 109 */ -P( 4, 0x90fdbc090fdbc091UL, 0x0243f6f0243f6f02UL) /* 113 */ -P(14, 0x7efdfbf7efdfbf7fUL, 0x0204081020408102UL) /* 127 */ -P( 4, 0x03e88cb3c9484e2bUL, 0x01f44659e4a42715UL) /* 131 */ -P( 6, 0xe21a291c077975b9UL, 0x01de5d6e3f8868a4UL) /* 137 */ -P( 2, 0x3aef6ca970586723UL, 0x01d77b654b82c339UL) /* 139 */ -P(10, 0xdf5b0f768ce2cabdUL, 0x01b7d6c3dda338b2UL) /* 149 */ -P( 2, 0x6fe4dfc9bf937f27UL, 0x01b2036406c80d90UL) /* 151 */ -P( 6, 0x5b4fe5e92c0685b5UL, 0x01a16d3f97a4b01aUL) /* 157 */ -P( 6, 0x1f693a1c451ab30bUL, 0x01920fb49d0e228dUL) /* 163 */ -P( 4, 0x8d07aa27db35a717UL, 0x01886e5f0abb0499UL) /* 167 */ -P( 6, 0x882383b30d516325UL, 0x017ad2208e0ecc35UL) /* 173 */ -P( 6, 0xed6866f8d962ae7bUL, 0x016e1f76b4337c6cUL) /* 179 */ -P( 2, 0x3454dca410f8ed9dUL, 0x016a13cd15372904UL) /* 181 */ -P(10, 0x1d7ca632ee936f3fUL, 0x01571ed3c506b39aUL) /* 191 */ -P( 2, 0x70bf015390948f41UL, 0x015390948f40feacUL) /* 193 */ -P( 4, 0xc96bdb9d3d137e0dUL, 0x014cab88725af6e7UL) /* 197 */ -P( 2, 0x2697cc8aef46c0f7UL, 0x0149539e3b2d066eUL) /* 199 */ -P(12, 0xc0e8f2a76e68575bUL, 0x013698df3de07479UL) /* 211 */ -P(12, 0x687763dfdb43bb1fUL, 0x0125e22708092f11UL) /* 223 */ -P( 4, 0x1b10ea929ba144cbUL, 0x0120b470c67c0d88UL) /* 227 */ -P( 2, 0x1d10c4c0478bbcedUL, 0x011e2ef3b3fb8744UL) /* 229 */ -P( 4, 0x63fb9aeb1fdcd759UL, 0x0119453808ca29c0UL) /* 233 */ -P( 6, 0x64afaa4f437b2e0fUL, 0x0112358e75d30336UL) /* 239 */ -P( 2, 0xf010fef010fef011UL, 0x010fef010fef010fUL) /* 241 */ -P(10, 0x28cbfbeb9a020a33UL, 0x0105197f7d734041UL) /* 251 */ -P( 6, 0xff00ff00ff00ff01UL, 0x00ff00ff00ff00ffUL) /* 257 */ -P( 6, 0xd624fd1470e99cb7UL, 0x00f92fb2211855a8UL) /* 263 */ -P( 6, 0x8fb3ddbd6205b5c5UL, 0x00f3a0d52cba8723UL) /* 269 */ -P( 2, 0xd57da36ca27acdefUL, 0x00f1d48bcee0d399UL) /* 271 */ -P( 6, 0xee70c03b25e4463dUL, 0x00ec979118f3fc4dUL) /* 277 */ -P( 4, 0xc5b1a6b80749cb29UL, 0x00e939651fe2d8d3UL) /* 281 */ -P( 2, 0x47768073c9b97113UL, 0x00e79372e225fe30UL) /* 283 */ -P(10, 0x2591e94884ce32adUL, 0x00dfac1f74346c57UL) /* 293 */ -P(14, 0xf02806abc74be1fbUL, 0x00d578e97c3f5fe5UL) /* 307 */ -P( 4, 0x7ec3e8f3a7198487UL, 0x00d2ba083b445250UL) /* 311 */ -P( 2, 0x58550f8a39409d09UL, 0x00d161543e28e502UL) /* 313 */ -P( 4, 0xec9e48ae6f71de15UL, 0x00cebcf8bb5b4169UL) /* 317 */ -P(14, 0x2ff3a018bfce8063UL, 0x00c5fe740317f9d0UL) /* 331 */ -P( 6, 0x7f9ec3fcf61fe7b1UL, 0x00c2780613c0309eUL) /* 337 */ -P(10, 0x89f5abe570e046d3UL, 0x00bcdd535db1cc5bUL) /* 347 */ -P( 2, 0xda971b23f1545af5UL, 0x00bbc8408cd63069UL) /* 349 */ -P( 4, 0x79d5f00b9a7862a1UL, 0x00b9a7862a0ff465UL) /* 353 */ -P( 6, 0x4dba1df32a128a57UL, 0x00b68d31340e4307UL) /* 359 */ -P( 8, 0x87530217b7747d8fUL, 0x00b2927c29da5519UL) /* 367 */ -P( 6, 0x30baae53bb5e06ddUL, 0x00afb321a1496fdfUL) /* 373 */ -P( 6, 0xee70206c12e9b5b3UL, 0x00aceb0f891e6551UL) /* 379 */ -P( 4, 0xcdde9462ec9dbe7fUL, 0x00ab1cbdd3e2970fUL) /* 383 */ -P( 6, 0xafb64b05ec41cf4dUL, 0x00a87917088e262bUL) /* 389 */ -P( 8, 0x02944ff5aec02945UL, 0x00a513fd6bb00a51UL) /* 397 */ -P( 4, 0x2cb033128382df71UL, 0x00a36e71a2cb0331UL) /* 401 */ -P( 8, 0x1ccacc0c84b1c2a9UL, 0x00a03c1688732b30UL) /* 409 */ -P(10, 0x19a93db575eb3a0bUL, 0x009c69169b30446dUL) /* 419 */ -P( 2, 0xcebeef94fa86fe2dUL, 0x009baade8e4a2f6eUL) /* 421 */ -P(10, 0x6faa77fb3f8df54fUL, 0x00980e4156201301UL) /* 431 */ -P( 2, 0x68a58af00975a751UL, 0x00975a750ff68a58UL) /* 433 */ -P( 6, 0xd56e36d0c3efac07UL, 0x009548e4979e0829UL) /* 439 */ -P( 4, 0xd8b44c47a8299b73UL, 0x0093efd1c50e726bUL) /* 443 */ -P( 6, 0x02d9ccaf9ba70e41UL, 0x0091f5bcb8bb02d9UL) /* 449 */ -P( 8, 0x0985e1c023d9e879UL, 0x008f67a1e3fdc261UL) /* 457 */ -P( 4, 0x2a343316c494d305UL, 0x008e2917e0e702c6UL) /* 461 */ -P( 2, 0x70cb7916ab67652fUL, 0x008d8be33f95d715UL) /* 463 */ -P( 4, 0xd398f132fb10fe5bUL, 0x008c55841c815ed5UL) /* 467 */ -P(12, 0x6f2a38a6bf54fa1fUL, 0x0088d180cd3a4133UL) /* 479 */ -P( 8, 0x211df689b98f81d7UL, 0x00869222b1acf1ceUL) /* 487 */ -P( 4, 0x0e994983e90f1ec3UL, 0x0085797b917765abUL) /* 491 */ -P( 8, 0xad671e44bed87f3bUL, 0x008355ace3c897dbUL) /* 499 */ -P( 4, 0xf9623a0516e70fc7UL, 0x00824a4e60b3262bUL) /* 503 */ -P( 6, 0x4b7129be9dece355UL, 0x0080c121b28bd1baUL) /* 509 */ -P(12, 0x190f3b7473f62c39UL, 0x007dc9f3397d4c29UL) /* 521 */ -P( 2, 0x63dacc9aad46f9a3UL, 0x007d4ece8fe88139UL) /* 523 */ -P(18, 0xc1108fda24e8d035UL, 0x0079237d65bcce50UL) /* 541 */ -P( 6, 0xb77578472319bd8bUL, 0x0077cf53c5f7936cUL) /* 547 */ -P(10, 0x473d20a1c7ed9da5UL, 0x0075a8accfbdd11eUL) /* 557 */ -P( 6, 0xfbe85af0fea2c8fbUL, 0x007467ac557c228eUL) /* 563 */ -P( 6, 0x58a1f7e6ce0f4c09UL, 0x00732d70ed8db8e9UL) /* 569 */ -P( 2, 0x1a00e58c544986f3UL, 0x0072c62a24c3797fUL) /* 571 */ -P( 6, 0x7194a17f55a10dc1UL, 0x007194a17f55a10dUL) /* 577 */ -P(10, 0x7084944785e33763UL, 0x006fa549b41da7e7UL) /* 587 */ -P( 6, 0xba10679bd84886b1UL, 0x006e8419e6f61221UL) /* 593 */ -P( 6, 0xebe9c6bb31260967UL, 0x006d68b5356c207bUL) /* 599 */ -P( 2, 0x97a3fe4bd1ff25e9UL, 0x006d0b803685c01bUL) /* 601 */ -P( 6, 0x6c6388395b84d99fUL, 0x006bf790a8b2d207UL) /* 607 */ -P( 6, 0x8c51da6a1335df6dUL, 0x006ae907ef4b96c2UL) /* 613 */ -P( 4, 0x46f3234475d5add9UL, 0x006a37991a23aeadUL) /* 617 */ -P( 2, 0x905605ca3c619a43UL, 0x0069dfbdd4295b66UL) /* 619 */ -P(12, 0xcee8dff304767747UL, 0x0067dc4c45c8033eUL) /* 631 */ -P(10, 0xff99c27f00663d81UL, 0x00663d80ff99c27fUL) /* 641 */ -P( 2, 0xacca407f671ddc2bUL, 0x0065ec17e3559948UL) /* 643 */ -P( 4, 0xe71298bac1e12337UL, 0x00654ac835cfba5cUL) /* 647 */ -P( 6, 0xfa1e94309cd09045UL, 0x00645c854ae10772UL) /* 653 */ -P( 6, 0xbebccb8e91496b9bUL, 0x006372990e5f901fUL) /* 659 */ -P( 2, 0x312fa30cc7d7b8bdUL, 0x006325913c07beefUL) /* 661 */ -P(12, 0x6160ff9e9f006161UL, 0x006160ff9e9f0061UL) /* 673 */ -P( 4, 0x6b03673b5e28152dUL, 0x0060cdb520e5e88eUL) /* 677 */ -P( 6, 0xfe802ffa00bfe803UL, 0x005ff4017fd005ffUL) /* 683 */ -P( 8, 0xe66fe25c9e907c7bUL, 0x005ed79e31a4dccdUL) /* 691 */ -P(10, 0x3f8b236c76528895UL, 0x005d7d42d48ac5efUL) /* 701 */ -P( 8, 0xf6f923bf01ce2c0dUL, 0x005c6f35ccba5028UL) /* 709 */ -P(10, 0x6c3d3d98bed7c42fUL, 0x005b2618ec6ad0a5UL) /* 719 */ -P( 8, 0x30981efcd4b010e7UL, 0x005a2553748e42e7UL) /* 727 */ -P( 6, 0x6f691fc81ebbe575UL, 0x0059686cf744cd5bUL) /* 733 */ -P( 6, 0xb10480ddb47b52cbUL, 0x0058ae97bab79976UL) /* 739 */ -P( 4, 0x74cd59ed64f3f0d7UL, 0x0058345f1876865fUL) /* 743 */ -P( 8, 0x0105cb81316d6c0fUL, 0x005743d5bb24795aUL) /* 751 */ -P( 6, 0x9be64c6d91c1195dUL, 0x005692c4d1ab74abUL) /* 757 */ -P( 4, 0x71b3f945a27b1f49UL, 0x00561e46a4d5f337UL) /* 761 */ -P( 8, 0x77d80d50e508fd01UL, 0x005538ed06533997UL) /* 769 */ -P( 4, 0xa5eb778e133551cdUL, 0x0054c807f2c0bec2UL) /* 773 */ -P(14, 0x18657d3c2d8a3f1bUL, 0x005345efbc572d36UL) /* 787 */ -P(10, 0x2e40e220c34ad735UL, 0x00523a758f941345UL) /* 797 */ -P(12, 0xa76593c70a714919UL, 0x005102370f816c89UL) /* 809 */ -P( 2, 0x1eef452124eea383UL, 0x0050cf129fb94acfUL) /* 811 */ -P(10, 0x38206dc242ba771dUL, 0x004fd31941cafdd1UL) /* 821 */ -P( 2, 0x4cd4c35807772287UL, 0x004fa1704aa75945UL) /* 823 */ -P( 4, 0x83de917d5e69ddf3UL, 0x004f3ed6d45a63adUL) /* 827 */ -P( 2, 0x882ef0403b4a6c15UL, 0x004f0de57154ebedUL) /* 829 */ -P(10, 0xf8fb6c51c606b677UL, 0x004e1cae8815f811UL) /* 839 */ -P(14, 0xb4abaac446d3e1fdUL, 0x004cd47ba5f6ff19UL) /* 853 */ -P( 4, 0xa9f83bbe484a14e9UL, 0x004c78ae734df709UL) /* 857 */ -P( 2, 0x0bebbc0d1ce874d3UL, 0x004c4b19ed85cfb8UL) /* 859 */ -P( 4, 0xbd418eaf0473189fUL, 0x004bf093221d1218UL) /* 863 */ -P(14, 0x44e3af6f372b7e65UL, 0x004aba3c21dc633fUL) /* 877 */ -P( 4, 0xc87fdace4f9e5d91UL, 0x004a6360c344de00UL) /* 881 */ -P( 2, 0xec93479c446bd9bbUL, 0x004a383e9f74d68aUL) /* 883 */ -P( 4, 0xdac4d592e777c647UL, 0x0049e28fbabb9940UL) /* 887 */ -P(20, 0xa63ea8c8f61f0c23UL, 0x0048417b57c78cd7UL) /* 907 */ -P( 4, 0xe476062ea5cbbb6fUL, 0x0047f043713f3a2bUL) /* 911 */ -P( 8, 0xdf68761c69daac27UL, 0x00474ff2a10281cfUL) /* 919 */ -P(10, 0xb813d737637aa061UL, 0x00468b6f9a978f91UL) /* 929 */ -P( 8, 0xa3a77aac1fb15099UL, 0x0045f13f1caff2e2UL) /* 937 */ -P( 4, 0x17f0c3e0712c5825UL, 0x0045a5228cec23e9UL) /* 941 */ -P( 6, 0xfd912a70ff30637bUL, 0x0045342c556c66b9UL) /* 947 */ -P( 6, 0xfbb3b5dc01131289UL, 0x0044c4a23feeced7UL) /* 953 */ -P(14, 0x856d560a0f5acdf7UL, 0x0043c5c20d3c9fe6UL) /* 967 */ -P( 4, 0x96472f314d3f89e3UL, 0x00437e494b239798UL) /* 971 */ -P( 6, 0xa76f5c7ed2253531UL, 0x0043142d118e47cbUL) /* 977 */ -P( 6, 0x816eae7c7bf69fe7UL, 0x0042ab5c73a13458UL) /* 983 */ -P( 8, 0xb6a2bea4cfb1781fUL, 0x004221950db0f3dbUL) /* 991 */ -P( 6, 0xa3900c53318e81edUL, 0x0041bbb2f80a4553UL) /* 997 */ -P(12, 0x60aa7f5d9f148d11UL, 0x0040f391612c6680UL) /* 1009 */ -P( 4, 0x6be8c0102c7a505dUL, 0x0040b1e94173fefdUL) /* 1013 */ -P( 6, 0x8ff3f0ed28728f33UL, 0x004050647d9d0445UL) /* 1019 */ -P( 2, 0x680e0a87e5ec7155UL, 0x004030241b144f3bUL) /* 1021 */ -P(10, 0xbbf70fa49fe829b7UL, 0x003f90c2ab542cb1UL) /* 1031 */ -P( 2, 0xd69d1e7b6a50ca39UL, 0x003f71412d59f597UL) /* 1033 */ -P( 6, 0x1a1e0f46b6d26aefUL, 0x003f137701b98841UL) /* 1039 */ -P(10, 0x7429f9a7a8251829UL, 0x003e79886b60e278UL) /* 1049 */ -P( 2, 0xd9c2219d1b863613UL, 0x003e5b1916a7181dUL) /* 1051 */ -P(10, 0x91406c1820d077adUL, 0x003dc4a50968f524UL) /* 1061 */ -P( 2, 0x521f4ec02e3d2b97UL, 0x003da6e4c9550321UL) /* 1063 */ -P( 6, 0xbb8283b63dc8eba5UL, 0x003d4e4f06f1def3UL) /* 1069 */ -P(18, 0x431eda153229ebbfUL, 0x003c4a6bdd24f9a4UL) /* 1087 */ -P( 4, 0xaf0bf78d7e01686bUL, 0x003c11d54b525c73UL) /* 1091 */ -P( 2, 0xa9ced0742c086e8dUL, 0x003bf5b1c5721065UL) /* 1093 */ -P( 4, 0xc26458ad9f632df9UL, 0x003bbdb9862f23b4UL) /* 1097 */ -P( 6, 0xbbff1255dff892afUL, 0x003b6a8801db5440UL) /* 1103 */ -P( 6, 0xcbd49a333f04d8fdUL, 0x003b183cf0fed886UL) /* 1109 */ -P( 8, 0xec84ed6f9cfdeff5UL, 0x003aabe394bdc3f4UL) /* 1117 */ -P( 6, 0x97980cc40bda9d4bUL, 0x003a5ba3e76156daUL) /* 1123 */ -P( 6, 0x777f34d524f5cbd9UL, 0x003a0c3e953378dbUL) /* 1129 */ -P(22, 0x2797051d94cbbb7fUL, 0x0038f03561320b1eUL) /* 1151 */ -P( 2, 0xea769051b4f43b81UL, 0x0038d6ecaef5908aUL) /* 1153 */ -P(10, 0xce7910f3034d4323UL, 0x003859cf221e6069UL) /* 1163 */ -P( 8, 0x92791d1374f5b99bUL, 0x0037f7415dc9588aUL) /* 1171 */ -P(10, 0x89a5645cc68ea1b5UL, 0x00377df0d3902626UL) /* 1181 */ -P( 6, 0x5f8aacf796c0cf0bUL, 0x00373622136907faUL) /* 1187 */ -P( 6, 0xf2e90a15e33edf99UL, 0x0036ef0c3b39b92fUL) /* 1193 */ -P( 8, 0x8e99e5feb897c451UL, 0x0036915f47d55e6dUL) /* 1201 */ -P(12, 0xaca2eda38fb91695UL, 0x0036072cf3f866fdUL) /* 1213 */ -P( 4, 0x5d9b737be5ea8b41UL, 0x0035d9b737be5ea8UL) /* 1217 */ -P( 6, 0x4aefe1db93fd7cf7UL, 0x0035961559cc81c7UL) /* 1223 */ -P( 6, 0xa0994ef20b3f8805UL, 0x0035531c897a4592UL) /* 1229 */ -P( 2, 0x103890bda912822fUL, 0x00353ceebd3e98a4UL) /* 1231 */ -P( 6, 0xb441659d13a9147dUL, 0x0034fad381585e5eUL) /* 1237 */ -P(12, 0x1e2134440c4c3f21UL, 0x00347884d1103130UL) /* 1249 */ -P(10, 0x263a27727a6883c3UL, 0x00340dd3ac39bf56UL) /* 1259 */ -P(18, 0x78e221472ab33855UL, 0x003351fdfecc140cUL) /* 1277 */ -P( 2, 0x95eac88e82e6faffUL, 0x00333d72b089b524UL) /* 1279 */ -P( 4, 0xf66c258317be8dabUL, 0x0033148d44d6b261UL) /* 1283 */ -P( 6, 0x09ee202c7cb91939UL, 0x0032d7aef8412458UL) /* 1289 */ -P( 2, 0x8d2fca1042a09ea3UL, 0x0032c3850e79c0f1UL) /* 1291 */ -P( 6, 0x82779c856d8b8bf1UL, 0x00328766d59048a2UL) /* 1297 */ -P( 4, 0x3879361cba8a223dUL, 0x00325fa18cb11833UL) /* 1301 */ -P( 2, 0xf23f43639c3182a7UL, 0x00324bd659327e22UL) /* 1303 */ -P( 4, 0xa03868fc474bcd13UL, 0x0032246e784360f4UL) /* 1307 */ -P(12, 0x651e78b8c5311a97UL, 0x0031afa5f1a33a08UL) /* 1319 */ -P( 2, 0x8ffce639c00c6719UL, 0x00319c63ff398e70UL) /* 1321 */ -P( 6, 0xf7b460754b0b61cfUL, 0x003162f7519a86a7UL) /* 1327 */ -P(34, 0x7b03f3359b8e63b1UL, 0x0030271fc9d3fc3cUL) /* 1361 */ -P( 6, 0xa55c5326041eb667UL, 0x002ff104ae89750bUL) /* 1367 */ -P( 6, 0x647f88ab896a76f5UL, 0x002fbb62a236d133UL) /* 1373 */ -P( 8, 0x8fd971434a55a46dUL, 0x002f74997d2070b4UL) /* 1381 */ -P(18, 0x9fbf969958046447UL, 0x002ed84aa8b6fce3UL) /* 1399 */ -P(10, 0x9986feba69be3a81UL, 0x002e832df7a46dbdUL) /* 1409 */ -P(14, 0xa668b3e6d053796fUL, 0x002e0e0846857cabUL) /* 1423 */ -P( 4, 0x97694e6589f4e09bUL, 0x002decfbdfb55ee6UL) /* 1427 */ -P( 2, 0x37890c00b7721dbdUL, 0x002ddc876f3ff488UL) /* 1429 */ -P( 4, 0x5ac094a235f37ea9UL, 0x002dbbc1d4c482c4UL) /* 1433 */ -P( 6, 0x31cff775f2d5d65fUL, 0x002d8af0e0de0556UL) /* 1439 */ -P( 8, 0xddad8e6b36505217UL, 0x002d4a7b7d14b30aUL) /* 1447 */ -P( 4, 0x5a27df897062cd03UL, 0x002d2a85073bcf4eUL) /* 1451 */ -P( 2, 0xe2396fe0fdb5a625UL, 0x002d1a9ab13e8be4UL) /* 1453 */ -P( 6, 0xb352a4957e82317bUL, 0x002ceb1eb4b9fd8bUL) /* 1459 */ -P(12, 0xd8ab3f2c60c2ea3fUL, 0x002c8d503a79794cUL) /* 1471 */ -P(10, 0x6893f702f0452479UL, 0x002c404d708784edUL) /* 1481 */ -P( 2, 0x9686fdc182acf7e3UL, 0x002c31066315ec52UL) /* 1483 */ -P( 4, 0x6854037173dce12fUL, 0x002c1297d80f2664UL) /* 1487 */ -P( 2, 0x7f0ded1685c27331UL, 0x002c037044c55f6bUL) /* 1489 */ -P( 4, 0xeeda72e1fe490b7dUL, 0x002be5404cd13086UL) /* 1493 */ -P( 6, 0x9e7bfc959a8e6e53UL, 0x002bb845adaf0cceUL) /* 1499 */ -P(12, 0x49b314d6d4753dd7UL, 0x002b5f62c639f16dUL) /* 1511 */ -P(12, 0x2e8f8c5ac4aa1b3bUL, 0x002b07e6734f2b88UL) /* 1523 */ -P( 8, 0xb8ef723481163d33UL, 0x002ace569d8342b7UL) /* 1531 */ -P(12, 0x6a2ec96a594287b7UL, 0x002a791d5dbd4dcfUL) /* 1543 */ -P( 6, 0xdba41c6d13aab8c5UL, 0x002a4eff8113017cUL) /* 1549 */ -P( 4, 0xc2adbe648dc3aaf1UL, 0x002a3319e156df32UL) /* 1553 */ -P( 6, 0x87a2bade565f91a7UL, 0x002a0986286526eaUL) /* 1559 */ -P( 8, 0x4d6fe8798c01f5dfUL, 0x0029d29551d91e39UL) /* 1567 */ -P( 4, 0x3791310c8c23d98bUL, 0x0029b7529e109f0aUL) /* 1571 */ -P( 8, 0xf80e446b01228883UL, 0x00298137491ea465UL) /* 1579 */ -P( 4, 0x9aed1436fbf500cfUL, 0x0029665e1eb9f9daUL) /* 1583 */ -P(14, 0x7839b54cc8b24115UL, 0x002909752e019a5eUL) /* 1597 */ -P( 4, 0xc128c646ad0309c1UL, 0x0028ef35e2e5efb0UL) /* 1601 */ -P( 6, 0x14de631624a3c377UL, 0x0028c815aa4b8278UL) /* 1607 */ -P( 2, 0x3f7b9fe68b0ecbf9UL, 0x0028bb1b867199daUL) /* 1609 */ -P( 4, 0x284ffd75ec00a285UL, 0x0028a13ff5d7b002UL) /* 1613 */ -P( 6, 0x37803cb80dea2ddbUL, 0x00287ab3f173e755UL) /* 1619 */ -P( 2, 0x86b63f7c9ac4c6fdUL, 0x00286dead67713bdUL) /* 1621 */ -P( 6, 0x8b6851d1bd99b9d3UL, 0x002847bfcda6503eUL) /* 1627 */ -P(10, 0xb62fda77ca343b6dUL, 0x002808c1ea6b4777UL) /* 1637 */ -P(20, 0x1f0dc009e34383c9UL, 0x00278d0e0f23ff61UL) /* 1657 */ -P( 6, 0x496dc21ddd35b97fUL, 0x002768863c093c7fUL) /* 1663 */ -P( 4, 0xb0e96ce17090f82bUL, 0x0027505115a73ca8UL) /* 1667 */ -P( 2, 0xaadf05acdd7d024dUL, 0x00274441a61dc1b9UL) /* 1669 */ -P(24, 0xcb138196746eafb5UL, 0x0026b5c166113cf0UL) /* 1693 */ -P( 4, 0x347f523736755d61UL, 0x00269e65ad07b18eUL) /* 1697 */ -P( 2, 0xd14a48a051f7dd0bUL, 0x002692c25f877560UL) /* 1699 */ -P(10, 0x474d71b1ce914d25UL, 0x002658fa7523cd11UL) /* 1709 */ -P(12, 0x386063f5e28c1f89UL, 0x0026148710cf0f9eUL) /* 1721 */ -P( 2, 0x1db7325e32d04e73UL, 0x002609363b22524fUL) /* 1723 */ -P(10, 0xfef748d3893b880dUL, 0x0025d1065a1c1122UL) /* 1733 */ -P( 8, 0x2f3351506e935605UL, 0x0025a48a382b863fUL) /* 1741 */ -P( 6, 0x7a3637fa2376415bUL, 0x0025837190eccdbcUL) /* 1747 */ -P( 6, 0x4ac525d2baa21969UL, 0x00256292e95d510cUL) /* 1753 */ -P( 6, 0x3a11c16b42cd351fUL, 0x002541eda98d068cUL) /* 1759 */ -P(18, 0x6c7abde0049c2a11UL, 0x0024e15087fed8f5UL) /* 1777 */ -P( 6, 0x54dad0303e069ac7UL, 0x0024c18b20979e5dUL) /* 1783 */ -P( 4, 0xebf1ac9fdfe91433UL, 0x0024ac7b336de0c5UL) /* 1787 */ -P( 2, 0xfafdda8237cec655UL, 0x0024a1fc478c60bbUL) /* 1789 */ -P(12, 0xdce3ff6e71ffb739UL, 0x002463801231c009UL) /* 1801 */ -P(10, 0xbed5737d6286db1bUL, 0x0024300fd506ed33UL) /* 1811 */ -P(12, 0xe479e431fe08b4dfUL, 0x0023f314a494da81UL) /* 1823 */ -P( 8, 0x9dd9b0dd7742f897UL, 0x0023cadedd2fad3aUL) /* 1831 */ -P(16, 0x8f09d7402c5a5e87UL, 0x00237b7ed2664a03UL) /* 1847 */ -P(14, 0x9216d5c4d958738dUL, 0x0023372967dbaf1dUL) /* 1861 */ -P( 6, 0xb3139ba11d34ca63UL, 0x00231a308a371f20UL) /* 1867 */ -P( 4, 0x47d54f7ed644afafUL, 0x002306fa63e1e600UL) /* 1871 */ -P( 2, 0x92a81d85cf11a1b1UL, 0x0022fd6731575684UL) /* 1873 */ -P( 4, 0x754b26533253bdfdUL, 0x0022ea507805749cUL) /* 1877 */ -P( 2, 0xbbe0efc980bfd467UL, 0x0022e0cce8b3d720UL) /* 1879 */ -P(10, 0xc0d8d594f024dca1UL, 0x0022b1887857d161UL) /* 1889 */ -P(12, 0x8238d43bcaac1a65UL, 0x00227977fcc49cc0UL) /* 1901 */ -P( 6, 0x27779c1fae6175bbUL, 0x00225db37b5e5f4fUL) /* 1907 */ -P( 6, 0xa746ca9af708b2c9UL, 0x0022421b91322ed6UL) /* 1913 */ -P(18, 0x93f3cd9f389be823UL, 0x0021f05b35f52102UL) /* 1931 */ -P( 2, 0x5cb4a4c04c489345UL, 0x0021e75de5c70d60UL) /* 1933 */ -P(16, 0xbf6047743e85b6b5UL, 0x0021a01d6c19be96UL) /* 1949 */ -P( 2, 0x61c147831563545fUL, 0x0021974a6615c81aUL) /* 1951 */ -P(22, 0xedb47c0ae62dee9dUL, 0x00213767697cf36aUL) /* 1973 */ -P( 6, 0x0a3824386673a573UL, 0x00211d9f7fad35f1UL) /* 1979 */ -P( 8, 0xa4a77d19e575a0ebUL, 0x0020fb7d9dd36c18UL) /* 1987 */ -P( 6, 0xa2bee045e066c279UL, 0x0020e2123d661e0eUL) /* 1993 */ -P( 4, 0xc23618de8ab43d05UL, 0x0020d135b66ae990UL) /* 1997 */ -P( 2, 0x266b515216cb9f2fUL, 0x0020c8cded4d7a8eUL) /* 1999 */ -P( 4, 0xe279edd9e9c2e85bUL, 0x0020b80b3f43ddbfUL) /* 2003 */ -P( 8, 0xd0c591c221dc9c53UL, 0x002096b9180f46a6UL) /* 2011 */ -P( 6, 0x06da8ee9c9ee7c21UL, 0x00207de7e28de5daUL) /* 2017 */ -P(10, 0x9dfebcaf4c27e8c3UL, 0x002054dec8cf1fb3UL) /* 2027 */ -P( 2, 0x49aeff9f19dd6de5UL, 0x00204cb630b3aab5UL) /* 2029 */ -P(10, 0x86976a57a296e9c7UL, 0x00202428adc37bebUL) /* 2039 */ -P(14, 0xa3b9abf4872b84cdUL, 0x001fec0c7834def4UL) /* 2053 */ -P(10, 0x34fca6483895e6efUL, 0x001fc46fae98a1d0UL) /* 2063 */ -P( 6, 0x34b5a333988f873dUL, 0x001facda430ff619UL) /* 2069 */ -P(12, 0xd9dd4f19b5f17be1UL, 0x001f7e17dd8e15e5UL) /* 2081 */ -P( 2, 0xb935b507fd0ce78bUL, 0x001f765a3556a4eeUL) /* 2083 */ -P( 4, 0xb450f5540660e797UL, 0x001f66ea49d802f1UL) /* 2087 */ -P( 2, 0x63ff82831ffc1419UL, 0x001f5f3800faf9c0UL) /* 2089 */ -P(10, 0x8992f718c22a32fbUL, 0x001f38f4e6c0f1f9UL) /* 2099 */ -P(12, 0x5f3253ad0d37e7bfUL, 0x001f0b8546752578UL) /* 2111 */ -P( 2, 0x007c0ffe0fc007c1UL, 0x001f03ff83f001f0UL) /* 2113 */ -P(16, 0x4d8ebadc0c0640b1UL, 0x001ec853b0a3883cUL) /* 2129 */ -P( 2, 0xe2729af831037bdbUL, 0x001ec0ee573723ebUL) /* 2131 */ -P( 6, 0xb8f64bf30feebfe9UL, 0x001eaad38e6f6894UL) /* 2137 */ -P( 4, 0xda93124b544c0bf5UL, 0x001e9c28a765fe53UL) /* 2141 */ -P( 2, 0x9cf7ff0b593c539fUL, 0x001e94d8758c2003UL) /* 2143 */ -P(10, 0xd6bd8861fa0e07d9UL, 0x001e707ba8f65e68UL) /* 2153 */ -P( 8, 0x5cfe75c0bd8ab891UL, 0x001e53a2a68f574eUL) /* 2161 */ -P(18, 0x43e808757c2e862bUL, 0x001e1380a56b438dUL) /* 2179 */ -P(24, 0x90caa96d595c9d93UL, 0x001dbf9f513a3802UL) /* 2203 */ -P( 4, 0x8fd550625d07135fUL, 0x001db1d1d58bc600UL) /* 2207 */ -P( 6, 0x76b010a86e209f2dUL, 0x001d9d358f53de38UL) /* 2213 */ -P( 8, 0xecc0426447769b25UL, 0x001d81e6df6165c7UL) /* 2221 */ -P(16, 0xe381339caabe3295UL, 0x001d4bdf7fd40e30UL) /* 2237 */ -P( 2, 0xd1b190a2d0c7673fUL, 0x001d452c7a1c958dUL) /* 2239 */ -P( 4, 0xc3bce3cf26b0e7ebUL, 0x001d37cf9b902659UL) /* 2243 */ -P( 8, 0x5f87e76f56c61ce3UL, 0x001d1d3a5791e97bUL) /* 2251 */ -P(16, 0xc06c6857a124b353UL, 0x001ce89fe6b47416UL) /* 2267 */ -P( 2, 0x38c040fcba630f75UL, 0x001ce219f3235071UL) /* 2269 */ -P( 4, 0xd078bc4fbd533b21UL, 0x001cd516dcf92139UL) /* 2273 */ -P( 8, 0xde8e15c5dd354f59UL, 0x001cbb33bd1c2b8bUL) /* 2281 */ -P( 6, 0xca61d53d7414260fUL, 0x001ca7e7d2546688UL) /* 2287 */ -P( 6, 0xb56bf5ba8eae635dUL, 0x001c94b5c1b3dbd3UL) /* 2293 */ -P( 4, 0x44a72cb0fb6e3949UL, 0x001c87f7f9c241c1UL) /* 2297 */ -P(12, 0x879839a714f45bcdUL, 0x001c6202706c35a9UL) /* 2309 */ -P( 2, 0x02a8994fde5314b7UL, 0x001c5bb8a9437632UL) /* 2311 */ -P(22, 0xb971920cf2b90135UL, 0x001c174343b4111eUL) /* 2333 */ -P( 6, 0x8a8fd0b7df9a6e8bUL, 0x001c04d0d3e46b42UL) /* 2339 */ -P( 2, 0xb31f9a84c1c6eaadUL, 0x001bfeb00fbf4308UL) /* 2341 */ -P( 6, 0x92293b02823c6d83UL, 0x001bec5dce0b202dUL) /* 2347 */ -P( 4, 0xeee77ff20fe5ddcfUL, 0x001be03444620037UL) /* 2351 */ -P( 6, 0x0e1ea0f6c496c11dUL, 0x001bce09c66f6fc3UL) /* 2357 */ -P(14, 0xfdf2d3d6f88ccb6bUL, 0x001ba40228d02b30UL) /* 2371 */ -P( 6, 0xfa9d74a3457738f9UL, 0x001b9225b1cf8919UL) /* 2377 */ -P( 4, 0xefc3ca3db71a5785UL, 0x001b864a2ff3f53fUL) /* 2381 */ -P( 2, 0x8e2071718d0d6dafUL, 0x001b80604150e49bUL) /* 2383 */ -P( 6, 0xbc0fdbfeb6cfabfdUL, 0x001b6eb1aaeaacf3UL) /* 2389 */ -P( 4, 0x1eeab613e5e5aee9UL, 0x001b62f48da3c8ccUL) /* 2393 */ -P( 6, 0x2d2388e90e9e929fUL, 0x001b516babe96092UL) /* 2399 */ -P(12, 0x81dbafba588ddb43UL, 0x001b2e9cef1e0c87UL) /* 2411 */ -P( 6, 0x52eebc51c4799791UL, 0x001b1d56bedc849bUL) /* 2417 */ -P( 6, 0x1c6bc4693b45a047UL, 0x001b0c267546aec0UL) /* 2423 */ -P(14, 0x06eee0974498874dUL, 0x001ae45f62024fa0UL) /* 2437 */ -P( 4, 0xd85b7377a9953cb9UL, 0x001ad917631b5f54UL) /* 2441 */ -P( 6, 0x4b6df412d4caf56fUL, 0x001ac83d18cb608fUL) /* 2447 */ -P(12, 0x6b8afbbb4a053493UL, 0x001aa6c7ad8c063fUL) /* 2459 */ -P( 8, 0xcc5299c96ac7720bUL, 0x001a90a7b1228e2aUL) /* 2467 */ -P( 6, 0xadce84b5c710aa99UL, 0x001a8027c03ba059UL) /* 2473 */ -P( 4, 0x9d673f5aa3804225UL, 0x001a7533289deb89UL) /* 2477 */ -P(26, 0xe6541268efbce7f7UL, 0x001a2ed7ce16b49fUL) /* 2503 */ -P(18, 0xfcf41e76cf5be669UL, 0x0019fefc0a279a73UL) /* 2521 */ -P(10, 0x5c3eb5dc31c383cbUL, 0x0019e4b0cd873b5fUL) /* 2531 */ -P( 8, 0x301832d11d8ad6c3UL, 0x0019cfcdfd60e514UL) /* 2539 */ -P( 4, 0x2e9c0942f1ce450fUL, 0x0019c56932d66c85UL) /* 2543 */ -P( 6, 0x97f3f2be37a39a5dUL, 0x0019b5e1ab6fc7c2UL) /* 2549 */ -P( 2, 0xe8b7d8a9654187c7UL, 0x0019b0b8a62f2a73UL) /* 2551 */ -P( 6, 0xb5d024d7da5b1b55UL, 0x0019a149fc98942cUL) /* 2557 */ -P(22, 0xb8ba9d6e7ae3501bUL, 0x001969517ec25b85UL) /* 2579 */ -P(12, 0xf50865f71b90f1dfUL, 0x00194b3083360ba8UL) /* 2591 */ -P( 2, 0x739c1682847df9e1UL, 0x00194631f4bebdc1UL) /* 2593 */ -P(16, 0xc470a4d842b90ed1UL, 0x00191e84127268fdUL) /* 2609 */ -P( 8, 0x1fb1be11698cc409UL, 0x00190adbb543984fUL) /* 2617 */ -P( 4, 0xd8d5512a7cd35d15UL, 0x001901130bd18200UL) /* 2621 */ -P(12, 0xa5496821723e07f9UL, 0x0018e3e6b889ac94UL) /* 2633 */ -P(14, 0xbcc8c6d7abaa8167UL, 0x0018c233420e1ec1UL) /* 2647 */ -P(10, 0x52c396c95eb619a1UL, 0x0018aa5872d92bd6UL) /* 2657 */ -P( 2, 0x6eb7e380878ec74bUL, 0x0018a5989945ccf9UL) /* 2659 */ -P( 4, 0x3d5513b504537157UL, 0x00189c1e60b57f60UL) /* 2663 */ -P( 8, 0x314391f8862e948fUL, 0x0018893fbc8690b9UL) /* 2671 */ -P( 6, 0xdc0b17cfcd81f5ddUL, 0x00187b2bb3e1041cUL) /* 2677 */ -P( 6, 0x2f6bea3ec89044b3UL, 0x00186d27c9cdcfb8UL) /* 2683 */ -P( 4, 0xce13a05869f1b57fUL, 0x001863d8bf4f2c1cUL) /* 2687 */ -P( 2, 0x7593474e8ace3581UL, 0x00185f33e2ad7593UL) /* 2689 */ -P( 4, 0x07fc329295a05e4dUL, 0x001855ef75973e13UL) /* 2693 */ -P( 6, 0xb05377cba4908d23UL, 0x001848160153f134UL) /* 2699 */ -P( 8, 0xe7b2131a628aa39bUL, 0x001835b72e6f0656UL) /* 2707 */ -P( 4, 0x9031dbed7de01527UL, 0x00182c922d83eb39UL) /* 2711 */ -P( 2, 0x76844b1c670aa9a9UL, 0x0018280243c0365aUL) /* 2713 */ -P( 6, 0x6a03f4533b08915fUL, 0x00181a5cd5898e73UL) /* 2719 */ -P(10, 0x1dbca579db0a3999UL, 0x001803c0961773aaUL) /* 2729 */ -P( 2, 0x002ffe800bffa003UL, 0x0017ff4005ffd001UL) /* 2731 */ -P(10, 0x478ab1a3e936139dUL, 0x0017e8d670433edbUL) /* 2741 */ -P( 8, 0x66e722bc4c5cc095UL, 0x0017d7066cf4bb5dUL) /* 2749 */ -P( 4, 0x7a8f63c717278541UL, 0x0017ce285b806b1fUL) /* 2753 */ -P(14, 0xdf6eee24d292bc2fUL, 0x0017af52cdf27e02UL) /* 2767 */ -P(10, 0x9fc20d17237dd569UL, 0x0017997d47d01039UL) /* 2777 */ -P(12, 0xcdf9932356bda2edUL, 0x00177f7ec2c6d0baUL) /* 2789 */ -P( 2, 0x97b5e332e80f68d7UL, 0x00177b2f3cd00756UL) /* 2791 */ -P( 6, 0x46eee26fd875e2e5UL, 0x00176e4a22f692a0UL) /* 2797 */ -P( 4, 0x3548a8e65157a611UL, 0x001765b94271e11bUL) /* 2801 */ -P( 2, 0xc288d03be9b71e3bUL, 0x001761732b044ae4UL) /* 2803 */ -P(16, 0x8151186db38937abUL, 0x00173f7a5300a2bcUL) /* 2819 */ -P(14, 0x7800b910895a45f1UL, 0x001722112b48be1fUL) /* 2833 */ -P( 4, 0xaee0b024182eec3dUL, 0x001719b7a16eb843UL) /* 2837 */ -P( 6, 0x96323eda173b5713UL, 0x00170d3c99cc5052UL) /* 2843 */ -P( 8, 0x0ed0dbd03ae77c8bUL, 0x0016fcad7aed3bb6UL) /* 2851 */ -P( 6, 0xf73800b7828dc119UL, 0x0016f051b8231ffdUL) /* 2857 */ -P( 4, 0x1b61715ec22b7ca5UL, 0x0016e81beae20643UL) /* 2861 */ -P(18, 0xa8533a991ead64bfUL, 0x0016c3721584c1d8UL) /* 2879 */ -P( 8, 0x7f6c7290e46c2e77UL, 0x0016b34c2ba09663UL) /* 2887 */ -P(10, 0x6325e8d907b01db1UL, 0x00169f3ce292ddcdUL) /* 2897 */ -P( 6, 0x28909f70152a1067UL, 0x00169344b2220a0dUL) /* 2903 */ -P( 6, 0xea7077af0997a0f5UL, 0x001687592593c1b1UL) /* 2909 */ -P( 8, 0x7e605cad10c32e6dUL, 0x00167787f1418ec9UL) /* 2917 */ -P(10, 0x471b33570635b38fUL, 0x001663e190395ff2UL) /* 2927 */ -P(12, 0xab559fa997a61bb3UL, 0x00164c7a4b6eb5b3UL) /* 2939 */ -P(14, 0xad4bdae562bddab9UL, 0x0016316a061182fdUL) /* 2953 */ -P( 4, 0x055e1b2f2ed62f45UL, 0x001629ba914584e4UL) /* 2957 */ -P( 6, 0x03cd328b1a2dca9bUL, 0x00161e3d57de21b2UL) /* 2963 */ -P( 6, 0xd28f4e08733218a9UL, 0x001612cc01b977f0UL) /* 2969 */ -P( 2, 0xb6800b077f186293UL, 0x00160efe30c525ffUL) /* 2971 */ -P(28, 0x6fbd138c3fd9c207UL, 0x0015da45249ec5deUL) /* 2999 */ -P( 2, 0xb117ccd12ae88a89UL, 0x0015d68ab4acff92UL) /* 3001 */ -P(10, 0x2f1a1a044046bcebUL, 0x0015c3f989d1eb15UL) /* 3011 */ -P( 8, 0x548aba0b060541e3UL, 0x0015b535ad11b8f0UL) /* 3019 */ -P( 4, 0xcf4e808cea111b2fUL, 0x0015addb3f424ec1UL) /* 3023 */ -P(14, 0xdbec1b4fa855a475UL, 0x00159445cb91be6bUL) /* 3037 */ -P( 4, 0xe3f794eb600d7821UL, 0x00158d0199771e63UL) /* 3041 */ -P( 8, 0x34fae0d9a11f7c59UL, 0x00157e87d9b69e04UL) /* 3049 */ -P(12, 0xf006b0ccbbac085dUL, 0x001568f58bc01ac3UL) /* 3061 */ -P( 6, 0x3f45076dc3114733UL, 0x00155e3c993fda9bUL) /* 3067 */ -P(12, 0xeef49bfa58a1a1b7UL, 0x001548eacc5e1e6eUL) /* 3079 */ -P( 4, 0x12c4218bea691fa3UL, 0x001541d8f91ba6a7UL) /* 3083 */ -P( 6, 0xbc7504e3bd5e64f1UL, 0x00153747060cc340UL) /* 3089 */ -P(20, 0x4ee21c292bb92fadUL, 0x001514569f93f7c4UL) /* 3109 */ -P(10, 0x34338b7327a4bacfUL, 0x00150309705d3d79UL) /* 3119 */ -P( 2, 0x3fe5c0833d6fccd1UL, 0x0014ff97020cf5bfUL) /* 3121 */ -P(16, 0xb1e70743535203c1UL, 0x0014e42c114cf47eUL) /* 3137 */ -P(26, 0xefbb5dcdfb4e43d3UL, 0x0014b835bdcb6447UL) /* 3163 */ -P( 4, 0xca68467ca5394f9fUL, 0x0014b182b53a9ab7UL) /* 3167 */ -P( 2, 0x8c51c081408b97a1UL, 0x0014ae2ad094a3d3UL) /* 3169 */ -P(12, 0x3275a899dfa5dd65UL, 0x00149a320ea59f96UL) /* 3181 */ -P( 6, 0x9e674cb62e1b78bbUL, 0x001490441de1a2fbUL) /* 3187 */ -P( 4, 0xa37ff5bb2a998d47UL, 0x001489aacce57200UL) /* 3191 */ -P(12, 0x792a999db131a22bUL, 0x001475f82ad6ff99UL) /* 3203 */ -P( 6, 0x1b48841bc30d29b9UL, 0x00146c2cfe53204fUL) /* 3209 */ -P( 8, 0xf06721d2011d3471UL, 0x00145f2ca490d4a1UL) /* 3217 */ -P( 4, 0x93fd2386dff85ebdUL, 0x001458b2aae0ec87UL) /* 3221 */ -P( 8, 0x4ce72f54c07ed9b5UL, 0x00144bcb0a3a3150UL) /* 3229 */ -P(22, 0xd6d0fd3e71dd827bUL, 0x001428a1e65441d4UL) /* 3251 */ -P( 2, 0x856405fb1eed819dUL, 0x00142575a6c210d7UL) /* 3253 */ -P( 4, 0x8ea8aceb7c443989UL, 0x00141f2025ba5c46UL) /* 3257 */ -P( 2, 0x34a13026f62e5873UL, 0x00141bf6e35420fdUL) /* 3259 */ -P(12, 0x1eea0208ec0af4f7UL, 0x001409141d1d313aUL) /* 3271 */ -P(28, 0x63679853cea598cbUL, 0x0013dd8bc19c3513UL) /* 3299 */ -P( 2, 0xc30b3ebd61f2d0edUL, 0x0013da76f714dc8fUL) /* 3301 */ -P( 6, 0x7eb9037bc7f43bc3UL, 0x0013d13e50f8f49eUL) /* 3307 */ -P( 6, 0xa583e6f6ce016411UL, 0x0013c80e37ca3819UL) /* 3313 */ -P( 6, 0xf1938d895f1a74c7UL, 0x0013bee69fa99ccfUL) /* 3319 */ -P( 4, 0x80cf1491c1e81e33UL, 0x0013b8d0ede55835UL) /* 3323 */ -P( 6, 0x3c0f12886ba8f301UL, 0x0013afb7680bb054UL) /* 3329 */ -P( 2, 0x0e4b786e0dfcc5abUL, 0x0013acb0c3841c96UL) /* 3331 */ -P(12, 0x672684c93f2d41efUL, 0x00139a9c5f434fdeUL) /* 3343 */ -P( 4, 0xe00757badb35c51bUL, 0x0013949cf33a0d9dUL) /* 3347 */ -P(12, 0xd6d84afe66472edfUL, 0x001382b4a00c31b0UL) /* 3359 */ -P( 2, 0xfbbc0eedcbbfb6e1UL, 0x00137fbbc0eedcbbUL) /* 3361 */ -P(10, 0x250f43aa08a84983UL, 0x001370ecf047b069UL) /* 3371 */ -P( 2, 0x04400e927b1acaa5UL, 0x00136df9790e3155UL) /* 3373 */ -P(16, 0x56572be34b9d3215UL, 0x0013567dd8defd5bUL) /* 3389 */ -P( 2, 0x87964ef7781c62bfUL, 0x0013539261fdbc34UL) /* 3391 */ -P(16, 0x29ed84051c06e9afUL, 0x00133c564292d28aUL) /* 3407 */ -P( 6, 0xb00acd11ed3f87fdUL, 0x001333ae178d6388UL) /* 3413 */ -P(20, 0x06307881744152d9UL, 0x0013170ad00d1fd7UL) /* 3433 */ -P(16, 0x7a786459f5c1ccc9UL, 0x0013005f01db0947UL) /* 3449 */ -P( 8, 0x1308125d74563281UL, 0x0012f51d40342210UL) /* 3457 */ -P( 4, 0x395310a480b3e34dUL, 0x0012ef815e4ed950UL) /* 3461 */ -P( 2, 0x35985baa8b202837UL, 0x0012ecb4abccd827UL) /* 3463 */ -P( 4, 0x96304a6e052b3223UL, 0x0012e71dc1d3d820UL) /* 3467 */ -P( 2, 0xbd8265fc9af8fd45UL, 0x0012e45389a16495UL) /* 3469 */ -P(22, 0x1b6d0b383ec58e0bUL, 0x0012c5d9226476ccUL) /* 3491 */ -P( 8, 0xc21a7c3b68b28503UL, 0x0012badc391156fdUL) /* 3499 */ -P(12, 0x236fa180fbfd6007UL, 0x0012aa78e412f522UL) /* 3511 */ -P( 6, 0xc42accd440ed9595UL, 0x0012a251f5f47fd1UL) /* 3517 */ -P(10, 0x7acf7128236ba3f7UL, 0x001294cb85c53534UL) /* 3527 */ -P( 2, 0xf909367a987b9c79UL, 0x0012921963beb65eUL) /* 3529 */ -P( 4, 0xb64efb252bfba705UL, 0x00128cb777c69ca8UL) /* 3533 */ -P( 6, 0x980d4f5a7e4cd25bUL, 0x001284aa6cf07294UL) /* 3539 */ -P( 2, 0xe1ecc4ef27b0c37dUL, 0x001281fcf6ac7f87UL) /* 3541 */ -P( 6, 0x9111aebb81d72653UL, 0x001279f937367db9UL) /* 3547 */ -P(10, 0x8951f985cb2c67edUL, 0x00126cad0488be94UL) /* 3557 */ -P( 2, 0xc439d4fc54e0b5d7UL, 0x00126a06794646a2UL) /* 3559 */ -P(12, 0xe857bf31896d533bUL, 0x00125a2f2bcd3e95UL) /* 3571 */ -P(10, 0xb614bb4cb5023755UL, 0x00124d108389e6b1UL) /* 3581 */ -P( 2, 0x938a89e5473bf1ffUL, 0x00124a73083771acUL) /* 3583 */ -P(10, 0xeac481aca34de039UL, 0x00123d6acda0620aUL) /* 3593 */ -P(14, 0x14b961badf4809a7UL, 0x00122b4b2917eafdUL) /* 3607 */ -P( 6, 0x76784fecba352435UL, 0x00122391bfce1e2fUL) /* 3613 */ -P( 4, 0xefa689bb58aef5e1UL, 0x00121e6f1ea579f2UL) /* 3617 */ -P( 6, 0xb2b2c4db9c3a8197UL, 0x001216c09e471568UL) /* 3623 */ -P( 8, 0x2503bc992279f8cfUL, 0x00120c8cb9d93909UL) /* 3631 */ -P( 6, 0xd2ab9aec5ca1541dUL, 0x001204ed58e64ef9UL) /* 3637 */ -P( 6, 0x3e78ba1460f99af3UL, 0x0011fd546578f00cUL) /* 3643 */ -P(16, 0x0a01426572cfcb63UL, 0x0011e9310b8b4c9cUL) /* 3659 */ -P(12, 0xbea857968f3cbd67UL, 0x0011da3405db9911UL) /* 3671 */ -P( 2, 0x78db213eefe659e9UL, 0x0011d7b6f4eb055dUL) /* 3673 */ -P( 4, 0x963e8541a74d35f5UL, 0x0011d2bee748c145UL) /* 3677 */ -P(14, 0x9e22d152776f2e43UL, 0x0011c1706ddce7a7UL) /* 3691 */ -P( 6, 0x05d10d39d1e1f291UL, 0x0011ba0fed2a4f14UL) /* 3697 */ -P( 4, 0x374468dccaced1ddUL, 0x0011b528538ed64aUL) /* 3701 */ -P( 8, 0x8d145c7d110c5ad5UL, 0x0011ab61404242acUL) /* 3709 */ -P(10, 0x3251a39f5acb5737UL, 0x00119f378ce81d2fUL) /* 3719 */ -P( 8, 0xa66e50171443506fUL, 0x001195889ece79daUL) /* 3727 */ -P( 6, 0x124f69ad91dd4cbdUL, 0x00118e4c65387077UL) /* 3733 */ -P( 6, 0xec24f8f2a61a2793UL, 0x001187161d70e725UL) /* 3739 */ -P(22, 0xb472148e656b7a51UL, 0x00116cd6d1c85239UL) /* 3761 */ -P( 6, 0x0adf9570e1142f07UL, 0x001165bbe7ce86b1UL) /* 3767 */ -P( 2, 0x89bf33b065119789UL, 0x0011635ee344ce36UL) /* 3769 */ -P(10, 0x8f0149803cb291ebUL, 0x0011579767b6d679UL) /* 3779 */ -P(14, 0x8334b63afd190a31UL, 0x00114734711e2b54UL) /* 3793 */ -P( 4, 0x920908d50d6aba7dUL, 0x0011428b90147f05UL) /* 3797 */ -P( 6, 0x57d8b018c5a33d53UL, 0x00113b92f3021636UL) /* 3803 */ -P(18, 0xea1773092dc27ee5UL, 0x001126cabc886884UL) /* 3821 */ -P( 2, 0xcae5f38b7bf2e00fUL, 0x0011247eb1b85976UL) /* 3823 */ -P(10, 0x2bd02df34f695349UL, 0x0011190bb01efd65UL) /* 3833 */ -P(14, 0xddfecd5be62e2eb7UL, 0x0011091de0fd679cUL) /* 3847 */ -P( 4, 0xdbf849ebec96c4a3UL, 0x001104963c7e4e0bUL) /* 3851 */ -P( 2, 0xda31d4d0187357c5UL, 0x00110253516420b0UL) /* 3853 */ -P(10, 0xe34e21cc2d5418a7UL, 0x0010f70db7c41797UL) /* 3863 */ -P(14, 0x68ca5137a9e574adUL, 0x0010e75ee2bf9ecdUL) /* 3877 */ -P( 4, 0x3eaa0d0f804bfd19UL, 0x0010e2e91c6e0676UL) /* 3881 */ -P( 8, 0x554fb753cc20e9d1UL, 0x0010da049b9d428dUL) /* 3889 */ -P(18, 0x797afcca1300756bUL, 0x0010c6248fe3b1a2UL) /* 3907 */ -P( 4, 0x8b8d950b52eeea77UL, 0x0010c1c03ed690ebUL) /* 3911 */ -P( 6, 0xfb6cd166acabc185UL, 0x0010bb2e1379e3a2UL) /* 3917 */ -P( 2, 0x4eb6c5ed9437a7afUL, 0x0010b8fe7f61228eUL) /* 3919 */ -P( 4, 0xd1eddbd91b790cdbUL, 0x0010b4a10d60a4f7UL) /* 3923 */ -P( 6, 0x93d714ea4d8948e9UL, 0x0010ae192681ec0fUL) /* 3929 */ -P( 2, 0x3ca13ed8145188d3UL, 0x0010abecfbe5b0aeUL) /* 3931 */ -P(12, 0x829086016da89c57UL, 0x00109eefd568b96dUL) /* 3943 */ -P( 4, 0xd7da1f432124a543UL, 0x00109a9ff178b40cUL) /* 3947 */ -P(20, 0x7ead5581632fb07fUL, 0x00108531e22f9ff9UL) /* 3967 */ -P(22, 0x35443837f63ec3bdUL, 0x00106ddec1af4417UL) /* 3989 */ - -#undef FIRST_OMITTED_PRIME -#define FIRST_OMITTED_PRIME 4001 diff --git a/gmp/demos/qcn.c b/gmp/demos/qcn.c index 9d76446804..b0c7e63473 100644 --- a/gmp/demos/qcn.c +++ b/gmp/demos/qcn.c @@ -2,7 +2,7 @@ class number h(d), for a given negative fundamental discriminant, using Dirichlet's analytic formula. -Copyright 1999-2002 Free Software Foundation, Inc. +Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -17,7 +17,7 @@ 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 https://www.gnu.org/licenses/. */ +this program. If not, see http://www.gnu.org/licenses/. */ /* Usage: qcn [-p limit] <discriminant>... |