[pkg-lighttpd] r536 - in lighttpd/tags: . 1.4.28-4/debian 1.4.28-4/debian/patches 1.4.28-4/src
Krzysztof Krzyzaniak
eloy at alioth.debian.org
Tue Apr 26 13:05:04 UTC 2011
Author: eloy
Date: 2011-04-26 13:04:52 +0000 (Tue, 26 Apr 2011)
New Revision: 536
Added:
lighttpd/tags/1.4.28-4/
lighttpd/tags/1.4.28-4/debian/changelog
lighttpd/tags/1.4.28-4/debian/control
lighttpd/tags/1.4.28-4/debian/patches/series
lighttpd/tags/1.4.28-4/src/configparser.c
lighttpd/tags/1.4.28-4/src/mod_ssi_exprparser.c
Removed:
lighttpd/tags/1.4.28-4/debian/changelog
lighttpd/tags/1.4.28-4/debian/control
lighttpd/tags/1.4.28-4/debian/patches/series
lighttpd/tags/1.4.28-4/src/configparser.c
lighttpd/tags/1.4.28-4/src/mod_ssi_exprparser.c
Log:
[svn-buildpackage] Tagging lighttpd 1.4.28-4
Deleted: lighttpd/tags/1.4.28-4/debian/changelog
===================================================================
--- lighttpd/trunk/debian/changelog 2011-04-24 18:00:55 UTC (rev 528)
+++ lighttpd/tags/1.4.28-4/debian/changelog 2011-04-26 13:04:52 UTC (rev 536)
@@ -1,780 +0,0 @@
-lighttpd (1.4.28-4) UNRELEASED; urgency=low
-
- [Arno Töll]
- * Fix "leaves dangling alternatives on upgrade" add preinst script which
- removes the dangling symlink (Closes: #614716)
- * Fix "/etc/lighttpd/conf-available/15-fastcgi-php.conf: fastcgi-php
- file missing a required directive" add a dependency based recursive module
- enable system in lighty-enable-mod (Closes: #600050)
- * Fix "binNMU for openssl 1.0.0 broke SSL support" backport fix from upstream
- to avoid name clashes between OpenSSL and Lighty's MD5 implementation
- (Closes: #622733)
-
- -- XXXXX YYYYYY <XXXXXX at YYYYYY> Sat, 09 Apr 2011 13:22:45 -0400
-
-lighttpd (1.4.28-3) unstable; urgency=low
-
- [ Krzysztof Krzyżaniak (eloy) ]
- * Updated debian/control and debian/copyright files
- * fix for debhelper-overrides-need-versioned-build-depends (>= 7.0.50~)
- * debian/compat: increased to 8
-
- [ Olaf van der Spek]
- * Don't fail install if server fails to start (closes: #383425)
- * Fix index-file.names typo (closes: #609890)
-
- -- Olaf van der Spek <olafvdspek at gmail.com> Mon, 03 Jan 2011 22:56:38 +0100
-
-lighttpd (1.4.28-2) unstable; urgency=medium
-
- [ Olaf van der Spek ]
- * Use relative instead of absolute links for conf-enabled (closes: #541645)
- * Fix /doc/ for IPv6 (closes: #512583)
-
- [ Krzysztof Krzyżaniak (eloy) ]
- * Added patch patches/silence-errors.diff (closes: #601177)
-
- -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Fri, 12 Nov 2010 12:08:48 +0100
-
-lighttpd (1.4.28-1) unstable; urgency=low
-
- [ Olaf van der Spek ]
- * New upstream release (closes: 521235, 572031, 564556)
- * Add check_syntax() from Ubuntu (closes: 589200)
-
- -- Thijs Kinkhorst <thijs at debian.org> Mon, 30 Aug 2010 20:53:18 +0200
-
-lighttpd (1.4.26-3) unstable; urgency=low
-
- * Ack for NMU, fix for SSL incompatibility (closes: #572031)
-
- -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Thu, 03 Jun 2010 21:22:24 +0200
-
-lighttpd (1.4.26-2) unstable; urgency=low
-
- [ Krzysztof Krzyżaniak (eloy) ]
- * Switch to dpkg-source 3.0 (quilt) format
- * debian/control:
- + removed Franz Pletz from Uploaders, he's MIA (closes: #579366)
- + change dependency from libmysqlclient15-dev to more general
- libmysqlclient-dev
-
- [ Olaf van der Spek ]
- * take conf dir as an optional parameter (closes: 489854)
- * don't try to make /var/run/lighttpd when invoked with status
- (closes: 538662)
- * split FastCGI PHP conf from FastCGI conf (closes: 515699)
- * reduce max-procs from 2 to 1 (closes: 456200)
- * move debian doc handling into it's own file
- * set default vhost dir to /srv/<host>/htdocs (closes: 471054)
- * use delaycompress instead of copytruncate for logrotate (closes: 563626)
- * don't wait for old process to stop before starting new one for reload
- (closes: 504315)
- * use reopen-logs for logrotate (closes: 504319)
- * add no-www.conf (for use with evhost and simple-vhost, closes: 471055)
- * move evhost conf into it's own file
-
-
- -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Tue, 01 Jun 2010 17:08:42 +0200
-
-lighttpd (1.4.26-1) unstable; urgency=low
-
- * New upstream release (closes: #568735)
- * Use provided patch from Andres Rodriguez <andreserl at ubuntu.com>
- to implement status action in init.d script (closes: #539955)
-
- -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Tue, 09 Feb 2010 18:02:13 +0100
-
-lighttpd (1.4.25-2) unstable; urgency=low
-
- * Change behaviour of use-ipv6.pl script (closes: #560837)
-
- -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Mon, 30 Nov 2009 14:23:03 +0100
-
-lighttpd (1.4.25-1) unstable; urgency=low
-
- * New upstream release (closes: #558045)
- * debian/watch: updated
- * debian/control: Section field changed to web
-
- -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Mon, 30 Nov 2009 14:03:15 +0100
-
-lighttpd (1.4.24-1) unstable; urgency=low
-
- * New upstream release (closes: #530892) (closes: #538135) (closes: #482601)
- (closes: #541428)
- * debian/control:
- + Standards-Version: 3.8.3
- * debian/init.d renamed to debian/lighttpd.init
- * Added $syslog to LSB header in init script (closes: #545576)
- (Jeremy Lal <kapouer at melix.org>)
- * debian/init.d: force-reload moved to reload section (closes: #538661)
- (Peter Eisentraut <petere at debian.org>)
-
- -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Fri, 30 Oct 2009 17:37:29 +0100
-
-lighttpd (1.4.23-3) unstable; urgency=low
-
- * debian/rules: make sure that scripts have proper rights
- (closes: #536668), (closes: #536681), (closes: #536688) (closes: #536668)
-
- -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Mon, 13 Jul 2009 11:17:09 +0200
-
-lighttpd (1.4.23-2) unstable; urgency=low
-
- * Add lighttpd.docs with README & NEWS file
- * New upstream closes wishlist bugs (closes: #535065) (closes: #515777)
-
- -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Fri, 10 Jul 2009 11:11:15 +0200
-
-lighttpd (1.4.23-1) unstable; urgency=low
-
- * New upstream release
- * spawn-fcgi is now separate package, recommends it debian/control
- * Update Standards-Version to 3.8.2 without changes
- * Remove cdbs, patchutils from Build-Depends, debian/rules uses
- debhelper 7 scripts
- * lighttpd.logrotate apply patch (closes: #535523)
- from Ubuntu (Daniel Hahler, https://launchpad.net/bugs/393792)
-
- -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Thu, 09 Jul 2009 11:24:16 +0200
-
-lighttpd (1.4.22-1) unstable; urgency=low
-
- * New upstream release (closes: #520124) (closes: #516897) (closes: #441173)
- * debian/control: Update to Standards-Version 3.8.1 (no changes so far),
- debhelper dependency updated to 7, utfize my name, satisfy lintian
- * Remove all patches, all fixed upstream but rewrite_redirect_decode_url
- Do NOT use rewrite/redirect to protect specific urls.
-
- -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Wed, 18 Mar 2009 11:19:55 +0100
-
-lighttpd (1.4.19-5) unstable; urgency=high
-
- * Remove the alias.url stanza from 10-cgi.conf (Closes: #499334).
- * Add patches for lighttpd security 2008-05 to 2008-07 (no CVE yet):
- + patches/lighttpd-1.4.x_request_header_memleak.patch
- + patches/lighttpd-1.4.x_rewrite_redirect_decode_url.patch
- + patches/lighttpd-1.4.x_userdir_lowercase.patch
- * Urgency set to high for security fix.
-
- -- Pierre Habouzit <madcoder at debian.org> Sat, 27 Sep 2008 12:00:47 +0200
-
-lighttpd (1.4.19-4) unstable; urgency=high
-
- * Make debian/use-ipv6.pl executable in debian/rules, thanks to Marco d'Itri
- for finding about this inexcusable mistake.
-
- -- Pierre Habouzit <madcoder at debian.org> Mon, 12 May 2008 17:12:28 +0200
-
-lighttpd (1.4.19-3) unstable; urgency=medium
-
- * Fix /var/cache/lighttpd/uploads permissions in postinst (Closes: 476870).
- * Update patches/ssl-connection-errors.patch using upstream r2144, thanks to
- upstream for noticing.
- * cherokee and lighttpd both provide spawn-fcgi, fix that using alternatives
- (Closes: 479501):
- + add spawn-fcgi.lighttpd.1 shamelessly stolen from cherokee packaging
- (thanks Gunnar).
- + install spawn-fcgi as spawn-fcgi.lighttpd.
- + install master alternatives on spawn-fcgi.lighttpd and
- spawn-fcgi.lighttd.1.
- + add Conflict against cherokee <= 0.6.1-1.
- * Quote "dangerous" bits of conf-available/10-cgi.conf (Closes: 479276).
-
- -- Pierre Habouzit <madcoder at debian.org> Tue, 06 May 2008 20:01:37 +0200
-
-lighttpd (1.4.19-2) unstable; urgency=low
-
- * Add patches/ssl-connection-errors.patch for CVE-2008-1531
- (Closes: 475438).
- * Test for /var/cache/lighttpd/compress in lighttpd.cron.daily to avoid
- spurious errors for uninstalled and not purged lighttpd's
- (Closes: 472175).
-
- * Add handling of /var/cache/lighttpd/uploads (Closes: 408521):
- + add it in lighttpd.dirs.
- + add it as a server.upload-dirs in lighttpd.conf.
- + purge it daily in lighttpd.cron.daily.
-
- * Fix typo in lighttpd.preinst causing failure to update 05-auth symlink
- properly (Closes: 472119).
-
- * init.d: stopping an already stopped lighttpd, or starting an already
- running one should not fail (Closes: 472122).
-
- * Use $HTTP["remoteip"] =~ "127.0.0.1" in configuration snipplets so that it
- works when ipv6 is enabled by default too (Closes: 473510).
-
- * Use perl to detect if the host has ipv6, and generate the server.use-ipv6
- snipplet on the fly instead of forcing it to true (Closes: 473053).
-
- -- Pierre Habouzit <madcoder at debian.org> Sun, 13 Apr 2008 13:20:40 +0200
-
-lighttpd (1.4.19-1~bpo40+1) etch-backports; urgency=low
-
- * Rebuild for etch-backports.
-
- -- Pierre Habouzit <madcoder at debian.org> Thu, 20 Mar 2008 00:41:49 +0100
-
-lighttpd (1.4.19-1) unstable; urgency=low
-
- * New upstream release.
-
- * debian/control:
- + add Build-Depends upon quilt, remove dpatch.
- + Bump Standards-Version to 3.7.3 (no changes required).
- + Move Homepage pseudo-headers as real headers.
-
- * debian/patches:
- + migrate to quilt.
- + remove 05_fdevent_fix.patch (merged upstream).
- + remove 06_mod_cgi_vuln_fix.patch (merged upstream).
- + refresh the rest of the series.
-
- * debian/lighty-enable-mod:
- + Reindent and remove trailing spaces.
- + don't fail to remove a module that is already removed.
- Patch from Michal Čihař (Closes: 448682).
- + Allow full stops in module names (Closes: 462199).
-
- * debian/lighttpd.conf:
- + enable ipv6 by default (Closes: 448054).
- + remove mod_status stanza, create conf-available/10-status.conf with it.
-
- * debian/lighttpd.cron.daily: new file, cleanup compressed cache.
- Thanks to Michal Čihař (Closes: 445224).
-
- * be sure mod_auth is loaded first (Closes: 419176):
- + add debian/lighttpd.preinst to rename 10-auth.conf into 05-auth.conf
- automagically (when it's a sane thing to do).
- + Document all that in NEWS.Debian.
- + debian/lighttpd.install: add 10-status.conf and 05-auth.conf.
-
- * debian/lighttpd.postinst:
- + chmod'ing /var/cache/lighttpd recursively is useless and too long. Just
- chmod the base directory, content is likely to be only created by
- lighty anyways. (Closes: 468297).
-
- * debian/init.d:
- + Add $remote_fs and $network (instead of networking) to
- Required-{Start,Stop}.
- + Add fam to Should-{Start,Stop} (Closes: 461180).
-
- * debian/lighttpd.links: add symlinks on lighty-* so that lighttpd-*
- commands exists as well (Closes: 435131).
-
- -- Pierre Habouzit <madcoder at debian.org> Sun, 16 Mar 2008 12:01:41 +0100
-
-lighttpd (1.4.18-4) unstable; urgency=high
-
- * The “I HATE DPATCH”-release.
- * Add patches for real as dpatch-edit-patch is stupid enough for not doing
- it by itself (Closes: 463368, 469307).
-
- -- Pierre Habouzit <madcoder at debian.org> Tue, 11 Mar 2008 10:07:35 +0100
-
-lighttpd (1.4.18-3) unstable; urgency=high
-
- * Force use of deprecated ldap interfaces (Closes: 463368),
- thanks to Dann Frazier (patches/ldap-deprecated.dpatch).
- * Add sample configuration for the mod_rrdtool (Closes: 462907).
- * add patches/06_mod_cgi_vuln_fix.dpatch to fix CVE-2008-1111
- (Closes: 469307).
- * Remove spurious mkdir in debian/rules (Closes: 448160).
- * Bump urgency for RC bug fixes.
-
- -- Pierre Habouzit <madcoder at debian.org> Sat, 08 Mar 2008 17:30:03 +0100
-
-lighttpd (1.4.18-2) unstable; urgency=high
-
- * Move the aliases on /doc/ and /images/ mandated by policy at the end to
- circumvent #445459.
- * Add patches/05_fdevent_fix.dpatch to fix possible remote DoS
- (Closes: 466663).
- * bump urgency for security fix.
-
- -- Pierre Habouzit <madcoder at debian.org> Wed, 27 Feb 2008 16:56:16 +0100
-
-lighttpd (1.4.18-1) unstable; urgency=low
-
- * New upstream release, fixes CVE-2007-4727 (closes: #441787)
- * lighttpd-angel is installed but not used yet
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 11 Sep 2007 12:45:11 +0200
-
-lighttpd (1.4.17-1) unstable; urgency=low
-
- * New upstream release
- * patches/05_mysql_autoreconnect.dpatch - dropped, fixed in upstream
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 04 Sep 2007 12:19:01 +0200
-
-lighttpd (1.4.16-5~bpo40+2) etch-backports; urgency=low
-
- * Rebuild in an etch chroot *doh*.
-
- -- Pierre Habouzit <madcoder at debian.org> Tue, 28 Aug 2007 11:37:38 +0200
-
-lighttpd (1.4.16-5~bpo40+1) etch-backports; urgency=low
-
- * Rebuild for Etch backports.
-
- -- Pierre Habouzit <madcoder at debian.org> Fri, 24 Aug 2007 10:12:10 +0200
-
-lighttpd (1.4.16-5) unstable; urgency=low
-
- * debian/control: Drop conflict with gamin as it appears it was not the
- issue. (Closes: #438058). For real this time.
-
- -- Pierre Habouzit <madcoder at debian.org> Sun, 19 Aug 2007 12:22:32 +0200
-
-lighttpd (1.4.16-4) unstable; urgency=low
-
- * debian/control: Drop conflict with gamin as it appears it was not the
- issue. (Closes: #438058).
- * src/mod_mysql_vhost.c: Enable mysql auto-connect mode, as it's not default
- in mysql 5.x anymore. (Closes: #428677).
-
- -- Pierre Habouzit <madcoder at debian.org> Sat, 18 Aug 2007 10:27:22 +0200
-
-lighttpd (1.4.16-3) unstable; urgency=high
-
- * Urgency set to high due to RC bug fix.
- * debian/lighttpd.logrotate: fix stupid typo (closes: #437341).
- * debian/control: add Conflict against gamin, to avoid #437307.
-
- -- Pierre Habouzit <madcoder at debian.org> Wed, 15 Aug 2007 09:46:48 +0200
-
-lighttpd (1.4.16-2) unstable; urgency=low
-
- * patches/04_ldap_build_filter_fix.dpatch: add patch from Peter Colberg to
- fix first LDAP search that fails because of the filter being
- uninitialized. (closes: #419661)
- * Enable fam support (closes: #407820):
- + debian/rules: add --enable-fam configure flag.
- + debian/control: add libfam-dev to Build-Depends, and also wrap
- build-dependencies to make diff more understandable.
- * Enable support for kerberos (with openssl):
- + debian/rules; add --enable-kerberos5 configure flag.
- + debian/control: add libkrb5-dev to the Build-Depends.
- * lighttpd.logrotate: redirect stderr to /dev/null as well to prevent
- defunct processes (presumably due to full unread pipes/buffers)
- (closes: #419992).
- * debian/control: replace lighttpd dependency on perl with
- libterm-readline-perl-perl as Readline.pm is needed for lighty-enable-mod
- (closes: #435077).
- * debian/control:
- + Add myself to uploaders (closes: #401575).
- + Drop Recommands on php5-cgi, there is absolutely no reason to have it,
- or we would have to recommend ruby, python, lua, perl, .... and every
- $language on earth to be fair. (closes: #435587).
- * debian/conf-available/10-webdav.conf: add default configuration for webdav.
- (closes: #406641).
- * debian/conf-enabled: remove directory, it is already installed through
- lighttpd.dirs.
- * lighttpd.postinst, lighttpd.postrm, init.d: be sure there is a
- /var/run/lighttpd owned by www-data:www-data, helpful to store locks and
- things like that.
-
- -- Pierre Habouzit <madcoder at debian.org> Fri, 03 Aug 2007 10:06:15 +0200
-
-lighttpd (1.4.16-1) unstable; urgency=low
-
- * New upstream release (closes: #434546)
- * Acknowledge NMU by Pierre Habouzit for CVE-2007-2841 (closes: #428368)
- * Added static-file.exclude-extensions section to lighttpd.conf (closes: #408374)
- * Fixed description of conf-available/10-fastcgi.conf (closes: #430469)
- * Added mod_extforward to debian/lighttpd.install (closes: #434717)
- * config.guess taken from upstream (closes: #419664)
- * turn on compression (closes: #397514)
- * debian/control: XS-Vcs-Svn header added
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Fri, 27 Jul 2007 10:32:51 +0200
-
-lighttpd (1.4.15-1.1) unstable; urgency=low
-
- * Non-maintainer upload.
- * add patches/04_wrapping_headers_bugfix.dpatch to fix crash with wrapping
- headers (Closes: 428368).
-
- -- Pierre Habouzit <madcoder at debian.org> Fri, 20 Jul 2007 11:04:07 +0200
-
-lighttpd (1.4.15-1) unstable; urgency=low
-
- * New upstream release (closes: #419131)
- * 01_mod_fastcgi_missing_cleanup.dpatch is now in upstream so it's removed from
- patches
- * 04_pidfile_bugfix.dpatch is now in upstream so it's removed from patches
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Fri, 06 Apr 2007 11:24:54 +0200
-
-lighttpd (1.4.13-10) unstable; urgency=medium
-
- * 03_ldap_leak_bugfix.dpatch added from yann at pleiades.fr.eu.org (Yann Rouillard)
- (closes: #413917)
- * Lowered priority of index.lighttpd.html (closes: #397492)
- * We don't need now check md5 sum of index.html since we provide our own
- index.lighttpd.html (closes: #407794)
- * 04_pidfile_bugfix.dpatch by Chris Webb <chris at arachsys.com> added - some fixes
- with graceful restart
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 8 Mar 2007 22:18:42 +0100
-
-lighttpd (1.4.13-9) unstable; urgency=low
-
- * debian/lighttpd.default - removed, it is not ready yet. We'll back after
- etch release (closes: #406021)
- * debian/index.html.md5 - fixed path to file (full path to index.html)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 2 Jan 2007 14:24:42 +0100
-
-lighttpd (1.4.13-8) unstable; urgency=medium
-
- * Typo fixed in debian/lighttpd.postinst (closes: #405123)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 2 Jan 2007 13:23:25 +0100
-
-lighttpd (1.4.13-7) unstable; urgency=low
-
- [ Franz Pletz ]
- * debian/conf-available/10-cgi.conf:
- + match /cgi-bin/ only at the beginning of a path
- + convert match for host == localhost to remoteip == 127.0.0.1 like in
- lighttpd.conf; due to bugs in mod_alias, the cgi-bin, doc and images
- aliases didn't work anymore
- * debian/lighttpd.logrotate
- + use reload instead of force-reload for graceful restart
- (closes: #398169, #380080)
- * added debian/patches/01_mod_fastcgi_missing_cleanup.dpatch
- + source: http://trac.lighttpd.net/trac/ticket/910
- + fixes memleak in mod_fastcgi (closes: #400167)
- * added debian/patches/02_fastcgi_detach.dpatch
- + disconnect stderr/stdout from the terminal (closes: #368670)
- + point them either to errorlog or /dev/null
- * debian/control: added myself to Uploaders
- * Don't touch /var/www/index.html, create /var/www/index.lighttpd.html
- instead (closes: #397492)
- + debian/lighttpd.postinst: copy to /var/www/index.lighttpd.html
- + debian/lighttpd.conf: add index.lighttpd.html as first index-filename
-
- [ Krzysztof Krzyzaniak (eloy) ]
- * Typo fixed in index.html (closes: #403620)
-
- -- Franz Pletz <fpletz at franz-pletz.org> Fri, 8 Dec 2006 16:15:27 +0100
-
-lighttpd (1.4.13-6) unstable; urgency=low
-
- * debian/lighttpd.postinst: change only permission for /var/log/lighttpd/
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 4 Dec 2006 16:34:11 +0100
-
-lighttpd (1.4.13-5) unstable; urgency=low
-
- * debian/control:
- + perl added to dependencies (closes: #396629)
- * debian/conf-available/10-fastcgi.conf:
- + /usr/bin/php4-cgi changed to /usr/bin/php-cgi (closes: #397142)
- * debian/lighttpd.postinst: fix permission of /var/log/lighttpd
- (closes: #398834)
- * debian/lighty-enable-mod - fixed bug with undefined values (closes: #397493)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 9 Nov 2006 12:18:25 +0100
-
-lighttpd (1.4.13-4) unstable; urgency=low
-
- * fixed config file for logrotote (reload action changed to force-reload)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 26 Oct 2006 11:36:13 +0200
-
-lighttpd (1.4.13-3) unstable; urgency=low
-
- * debian/control: libxml2-dev added to Build-Depends (closes: #394882)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 24 Oct 2006 13:31:27 +0200
-
-lighttpd (1.4.13-2) unstable; urgency=medium
-
- * Patch from Pierre Habouzit <madcoder at debian.org> to init.d applied
- (closes: #380080)
- * Patch from Adrian Friendli <adi at koalatux.ch> to lighttpd.conf applied
- (closes: #392890)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 16 Oct 2006 11:14:28 +0200
-
-lighttpd (1.4.13-1) unstable; urgency=low
-
- * New upstream release
- * mod_webdav as separate lighttpd-mod-webdav package
- * Compiled with --with-webdav-locks, added uuid-dev to Build-Depends
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 10 Oct 2006 10:26:54 +0200
-
-lighttpd (1.4.13~r1385-1) unstable; urgency=low
-
- * New upstream release
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 9 Oct 2006 10:28:32 +0200
-
-lighttpd (1.4.13~r1370-1) unstable; urgency=low
-
- * New upstream release (closes: #390877) (closes: #389911)
- * Compiled with --with-attr param (closes: #389712)
- * dropped 01-lua5.1.dpatch, issue fixed by upstream
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 5 Oct 2006 10:08:19 +0200
-
-lighttpd (1.4.12-1) unstable; urgency=low
-
- * New upstream release
- * fixes in debian/lighttpd.install (closes: #377802)
- * mod_cml is deprecated from now on and it will be removed in 1.5.0
- mod_magnet provides the same functionality and more with a
- cleaner syntax and in a more generic form
- * added separate module for mod_magnet (closes: #389578)
- * changed dependency from lua-5.0 to lua-5.1
- * added patch patches/01-lua5.1.dpatch
- * added pkg-config to Build-Depends
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 12 Sep 2006 19:17:41 +0200
-
-lighttpd (1.4.12~20060907-1) unstable; urgency=low
-
- * New upstream release
- * Removed debian/patches/01_use_bin_sh.dpatch - fixed in upstream
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 7 Sep 2006 14:50:47 +0200
-
-lighttpd (1.4.12~20060901-1) unstable; urgency=low
-
- * New upstream release
- * Removed debian/patches/02_ssl_fix.dpatch - it's now fixed in upstream
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 4 Sep 2006 11:07:42 +0200
-
-lighttpd (1.4.11-8) UNRELEASED; urgency=low
-
- * debian/lighttpd.dirs:
- + usr/lib/cgi-bin added
- * debian/conf-available/10-cgi.conf
- + proper configuration for localhost as well (again Bug#345554)
- * debian/lighttpd.conf:
- + server.bind commented out as in default configuration (closes: #380267)
- * debian/patches/02_ssl_fix.dpatch - added fix for ssl connection with POST
- request (http://trac.lighttpd.net/trac/ticket/607), thanks to
- RISKO Gergely <risko at debian.org> (closes: #381455)
- * debian/lighttpd.logrotate - some values changes (now rotate weekly
- and keep 12 logfiles)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 28 Aug 2006 13:06:25 +0200
-
-lighttpd (1.4.11-7) unstable; urgency=low
-
- * debian/create-mime.assign.pl - catchup error when /etc/mime.types is not
- readable (closes: #375347)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 27 Jun 2006 20:19:57 +0200
-
-lighttpd (1.4.11-6) unstable; urgency=low
-
- * debian/control:
- - Recommends: Changed to alternative: php4-cgi | php5-cgi (closes: #368215)
- * include-conf-enabled.pl script changed according to patch from
- Tobias Gruetzmacher <tobias at portfolio16.de> (closes: #368352)
- * debian/lighttpd.conf: removed global for local aliases (/images/, /doc/)
- (closes: #366801)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 23 May 2006 16:48:36 +0200
-
-lighttpd (1.4.11-5) unstable; urgency=low
-
- * debian/init.d:
- - --oknodo added to section "stop" to close finally #35979
- - --retry 30 added to section "reload", to prevents problems with
- logrotating (closes: #366366)
- * debian/control:
- Standards-Version: increased to 3.7.2 without additional changes
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Wed, 10 May 2006 14:26:04 +0200
-
-lighttpd (1.4.11-4) unstable; urgency=low
-
- [ Krzysztof Krzyzaniak (eloy) ]
- * debian/init.d:
- - "exit 1" after failed actions removed (closes: #359792)
- * debian/conf-available/10-fastcgi.conf updated (closes: #362827)
- thanks to Joerg Rieger <a.mailinglists#lumrix.net>
-
- [ Torsten Marek ]
- * Change my email address to shlomme at debian.org
- * Remove --background from the start action, since it
- breaks the error checking of start-stop-daemon.
- The behaviour described in #355865 is not reproducable
- any more.
- * make reload action in initscript more well-behaved
-
- -- Torsten Marek <shlomme at debian.org> Sun, 9 Apr 2006 15:51:51 +0200
-
-lighttpd (1.4.11-3) unstable; urgency=low
-
- * debian/lighttpd.conf - added dir-listing.encoding = "utf-8", suggested
- by Silvestre Zabala <silvestre(at)zabala.name> (closes: #359100)
- * debian/lighttpd.install - fix bug with installing *.conf files
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 27 Mar 2006 09:50:55 +0200
-
-lighttpd (1.4.11-2) unstable; urgency=low
-
- * Provide debian/conf-available/10-ssl.conf, (closes: #355868)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Fri, 24 Mar 2006 13:53:54 +0100
-
-lighttpd (1.4.11-1) unstable; urgency=low
-
- * New upstream release (closes: #356496)
- * init.d script - added --background to "start" (thanks goes to
- Marcello Nuccio <marcenuc at cicaia160.unimo.it>) (closes: #355865)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Fri, 10 Mar 2006 09:51:10 +0100
-
-lighttpd (1.4.10-6) unstable; urgency=low
-
- * Patch from <tobias at portfolio16.de> on lighty-enable-mod
- (closes: #355773)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Wed, 8 Mar 2006 11:17:07 +0100
-
-lighttpd (1.4.10-5) unstable; urgency=low
-
- [ Krzysztof Krzyzaniak (eloy) ]
- * debian/control - libmysqlclient14-dev have to be removede because is not
- available in debian/sid
-
- [ Torsten Marek ]
- * debian/rules - build with support for LUA, libmemcache and GDBM
- * debian/lighttpd.install - install mod_evasive into lighttpd package
- * debian/control - own packages for mod_trigger_b4_dl and mod_cml
- * debian/control - small fixes
- * debian/conf-available/10-ssi.conf - comment out link to web documentation
-
- -- Torsten Marek <shlomme at gmx.net> Mon, 6 Mar 2006 12:07:29 +0100
-
-lighttpd (1.4.10-4) unstable; urgency=low
-
- * bugfix release
- * Fixed bug with 10-fastcgi.conf, (closes: #353964)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 23 Feb 2006 16:14:42 +0100
-
-lighttpd (1.4.10-3) unstable; urgency=low
-
- * lighttpd.conf - changed configuration for /images/ & /doc/ handling
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 14 Feb 2006 09:57:15 +0100
-
-lighttpd (1.4.10-2) unstable; urgency=low
-
- * debian/control - libmysqlclient14-dev added as alternative (will be easier for
- backports.org)
- * lighty-enable-mod script fixed - files with dash were skipped, thanks
- to Silvester Zabala for patch (closes: #352577)
- * install doc/lighttpd.conf as example (closes: #344961)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 13 Feb 2006 12:58:54 +0100
-
-lighttpd (1.4.10-1) unstable; urgency=low
-
- * New upstream release
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Wed, 8 Feb 2006 16:02:16 +0100
-
-lighttpd (1.4.9-5) unstable; urgency=low
-
- * Properly fixed bug with overwritting index.html (closes: #349676)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 30 Jan 2006 10:17:57 +0100
-
-lighttpd (1.4.9-4) unstable; urgency=low
-
- [ Krzysztof Krzyzaniak (eloy) ]
- * Fixed bug with 10-userdir.conf, (closes: #349821)
- * index.html is not replaced when md5 string desn't match (closes: #349676)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Wed, 25 Jan 2006 16:33:34 +0100
-
-lighttpd (1.4.9-3) unstable; urgency=low
-
- [ Torsten Marek ]
- * Added some configuration examples from upstream sample
- configuration
- * Implement "reload" init.d action with graceful restart,
- taken from http://trac.lighttpd.net/trac/ticket/267 (Closes: #346038)
- * ssi, auth, fastcgi, proxy and simple-vhost are now in separte
- config files
- * Put path to plugin documentation into every config snippet
- * Build against libmysqlclient15
-
- -- Torsten Marek <shlomme at gmx.net> Sat, 21 Jan 2006 15:16:01 +0100
-
-lighttpd (1.4.9-2) unstable; urgency=low
-
- [ Krzysztof Krzyzaniak (eloy) ]
- * mod_alias enabled by default - removed conf-avaiable/00-alias.conf
- * Added handling of http://localhost/doc/ & http://localhost/images/
- (closes: #348823)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 19 Jan 2006 12:39:04 +0100
-
-lighttpd (1.4.9-1) unstable; urgency=low
-
- * New upstream release
- * Closing bug from not uploaded release 1.4.8-5, (closes: #347737)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 16 Jan 2006 20:06:39 +0100
-
-lighttpd (1.4.8-5) unstable; urgency=low
-
- * create /var/www directory (closes: #347737), default /var/www/index.html
- added (based on apache2 index.html file).
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 12 Jan 2006 16:54:32 +0100
-
-lighttpd (1.4.8-4) unstable; urgency=low
-
- * fixed permissions and directories (closes: #347565)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Wed, 11 Jan 2006 17:15:12 +0100
-
-lighttpd (1.4.8-3) unstable; urgency=low
-
- * New configuration layout (closes: #345554) (closes: #344959),
- read /etc/lighttpd/conf-available/README
- - conf-available directory for all templates
- - conf-enabled directory for enabled modules
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 9 Jan 2006 13:49:34 +0100
-
-lighttpd (1.4.8-2) unstable; urgency=low
-
- [ Krzysztof Krzyzaniak (eloy) ]
- * debian/control: lsb-base dependency narrowed to (>= 3.0-3)
- * create-mime.assign.pl set as executable (closes: #344938)
-
- -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Wed, 28 Dec 2005 12:40:55 +0100
-
-lighttpd (1.4.8-1) unstable; urgency=low
-
- * New upstream version (closes: #304271)
- * Does not rely on $SHELL to execute external commands
-
- -- Torsten Marek <shlomme at gmx.net> Sat, 26 Nov 2005 11:48:51 +0100
-
-lighttpd (1.4.7-1) unstable; urgency=low
-
- * New upstream version, Initial debian version
- * Better debian/rules file
- * Split mysql vhost module into separate package
- * Create separate package for documentation
- * Create a better init script
-
- -- Torsten Marek <shlomme at gmx.net> Sat, 5 Nov 2005 18:56:53 +0100
Copied: lighttpd/tags/1.4.28-4/debian/changelog (from rev 534, lighttpd/trunk/debian/changelog)
===================================================================
--- lighttpd/tags/1.4.28-4/debian/changelog (rev 0)
+++ lighttpd/tags/1.4.28-4/debian/changelog 2011-04-26 13:04:52 UTC (rev 536)
@@ -0,0 +1,783 @@
+lighttpd (1.4.28-4) unstable; urgency=low
+
+ [ Krzysztof Krzyżaniak (eloy) ]
+ * Add Arno Töll to Uploaders
+
+ [ Arno Töll ]
+ * Fix "leaves dangling alternatives on upgrade" add preinst script which
+ removes the dangling symlink (Closes: #614716)
+ * Fix "/etc/lighttpd/conf-available/15-fastcgi-php.conf: fastcgi-php
+ file missing a required directive" add a dependency based recursive module
+ enable system in lighty-enable-mod (Closes: #600050)
+ * Fix "binNMU for openssl 1.0.0 broke SSL support" backport fix from upstream
+ to avoid name clashes between OpenSSL and Lighty's MD5 implementation
+ (Closes: #622733)
+
+ -- Arno Töll <debian at toell.net> Sat, 09 Apr 2011 13:22:45 -0400
+
+lighttpd (1.4.28-3) unstable; urgency=low
+
+ [ Krzysztof Krzyżaniak (eloy) ]
+ * Updated debian/control and debian/copyright files
+ * fix for debhelper-overrides-need-versioned-build-depends (>= 7.0.50~)
+ * debian/compat: increased to 8
+
+ [ Olaf van der Spek]
+ * Don't fail install if server fails to start (closes: #383425)
+ * Fix index-file.names typo (closes: #609890)
+
+ -- Olaf van der Spek <olafvdspek at gmail.com> Mon, 03 Jan 2011 22:56:38 +0100
+
+lighttpd (1.4.28-2) unstable; urgency=medium
+
+ [ Olaf van der Spek ]
+ * Use relative instead of absolute links for conf-enabled (closes: #541645)
+ * Fix /doc/ for IPv6 (closes: #512583)
+
+ [ Krzysztof Krzyżaniak (eloy) ]
+ * Added patch patches/silence-errors.diff (closes: #601177)
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Fri, 12 Nov 2010 12:08:48 +0100
+
+lighttpd (1.4.28-1) unstable; urgency=low
+
+ [ Olaf van der Spek ]
+ * New upstream release (closes: 521235, 572031, 564556)
+ * Add check_syntax() from Ubuntu (closes: 589200)
+
+ -- Thijs Kinkhorst <thijs at debian.org> Mon, 30 Aug 2010 20:53:18 +0200
+
+lighttpd (1.4.26-3) unstable; urgency=low
+
+ * Ack for NMU, fix for SSL incompatibility (closes: #572031)
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Thu, 03 Jun 2010 21:22:24 +0200
+
+lighttpd (1.4.26-2) unstable; urgency=low
+
+ [ Krzysztof Krzyżaniak (eloy) ]
+ * Switch to dpkg-source 3.0 (quilt) format
+ * debian/control:
+ + removed Franz Pletz from Uploaders, he's MIA (closes: #579366)
+ + change dependency from libmysqlclient15-dev to more general
+ libmysqlclient-dev
+
+ [ Olaf van der Spek ]
+ * take conf dir as an optional parameter (closes: 489854)
+ * don't try to make /var/run/lighttpd when invoked with status
+ (closes: 538662)
+ * split FastCGI PHP conf from FastCGI conf (closes: 515699)
+ * reduce max-procs from 2 to 1 (closes: 456200)
+ * move debian doc handling into it's own file
+ * set default vhost dir to /srv/<host>/htdocs (closes: 471054)
+ * use delaycompress instead of copytruncate for logrotate (closes: 563626)
+ * don't wait for old process to stop before starting new one for reload
+ (closes: 504315)
+ * use reopen-logs for logrotate (closes: 504319)
+ * add no-www.conf (for use with evhost and simple-vhost, closes: 471055)
+ * move evhost conf into it's own file
+
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Tue, 01 Jun 2010 17:08:42 +0200
+
+lighttpd (1.4.26-1) unstable; urgency=low
+
+ * New upstream release (closes: #568735)
+ * Use provided patch from Andres Rodriguez <andreserl at ubuntu.com>
+ to implement status action in init.d script (closes: #539955)
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Tue, 09 Feb 2010 18:02:13 +0100
+
+lighttpd (1.4.25-2) unstable; urgency=low
+
+ * Change behaviour of use-ipv6.pl script (closes: #560837)
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Mon, 30 Nov 2009 14:23:03 +0100
+
+lighttpd (1.4.25-1) unstable; urgency=low
+
+ * New upstream release (closes: #558045)
+ * debian/watch: updated
+ * debian/control: Section field changed to web
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Mon, 30 Nov 2009 14:03:15 +0100
+
+lighttpd (1.4.24-1) unstable; urgency=low
+
+ * New upstream release (closes: #530892) (closes: #538135) (closes: #482601)
+ (closes: #541428)
+ * debian/control:
+ + Standards-Version: 3.8.3
+ * debian/init.d renamed to debian/lighttpd.init
+ * Added $syslog to LSB header in init script (closes: #545576)
+ (Jeremy Lal <kapouer at melix.org>)
+ * debian/init.d: force-reload moved to reload section (closes: #538661)
+ (Peter Eisentraut <petere at debian.org>)
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Fri, 30 Oct 2009 17:37:29 +0100
+
+lighttpd (1.4.23-3) unstable; urgency=low
+
+ * debian/rules: make sure that scripts have proper rights
+ (closes: #536668), (closes: #536681), (closes: #536688) (closes: #536668)
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Mon, 13 Jul 2009 11:17:09 +0200
+
+lighttpd (1.4.23-2) unstable; urgency=low
+
+ * Add lighttpd.docs with README & NEWS file
+ * New upstream closes wishlist bugs (closes: #535065) (closes: #515777)
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Fri, 10 Jul 2009 11:11:15 +0200
+
+lighttpd (1.4.23-1) unstable; urgency=low
+
+ * New upstream release
+ * spawn-fcgi is now separate package, recommends it debian/control
+ * Update Standards-Version to 3.8.2 without changes
+ * Remove cdbs, patchutils from Build-Depends, debian/rules uses
+ debhelper 7 scripts
+ * lighttpd.logrotate apply patch (closes: #535523)
+ from Ubuntu (Daniel Hahler, https://launchpad.net/bugs/393792)
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Thu, 09 Jul 2009 11:24:16 +0200
+
+lighttpd (1.4.22-1) unstable; urgency=low
+
+ * New upstream release (closes: #520124) (closes: #516897) (closes: #441173)
+ * debian/control: Update to Standards-Version 3.8.1 (no changes so far),
+ debhelper dependency updated to 7, utfize my name, satisfy lintian
+ * Remove all patches, all fixed upstream but rewrite_redirect_decode_url
+ Do NOT use rewrite/redirect to protect specific urls.
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Wed, 18 Mar 2009 11:19:55 +0100
+
+lighttpd (1.4.19-5) unstable; urgency=high
+
+ * Remove the alias.url stanza from 10-cgi.conf (Closes: #499334).
+ * Add patches for lighttpd security 2008-05 to 2008-07 (no CVE yet):
+ + patches/lighttpd-1.4.x_request_header_memleak.patch
+ + patches/lighttpd-1.4.x_rewrite_redirect_decode_url.patch
+ + patches/lighttpd-1.4.x_userdir_lowercase.patch
+ * Urgency set to high for security fix.
+
+ -- Pierre Habouzit <madcoder at debian.org> Sat, 27 Sep 2008 12:00:47 +0200
+
+lighttpd (1.4.19-4) unstable; urgency=high
+
+ * Make debian/use-ipv6.pl executable in debian/rules, thanks to Marco d'Itri
+ for finding about this inexcusable mistake.
+
+ -- Pierre Habouzit <madcoder at debian.org> Mon, 12 May 2008 17:12:28 +0200
+
+lighttpd (1.4.19-3) unstable; urgency=medium
+
+ * Fix /var/cache/lighttpd/uploads permissions in postinst (Closes: 476870).
+ * Update patches/ssl-connection-errors.patch using upstream r2144, thanks to
+ upstream for noticing.
+ * cherokee and lighttpd both provide spawn-fcgi, fix that using alternatives
+ (Closes: 479501):
+ + add spawn-fcgi.lighttpd.1 shamelessly stolen from cherokee packaging
+ (thanks Gunnar).
+ + install spawn-fcgi as spawn-fcgi.lighttpd.
+ + install master alternatives on spawn-fcgi.lighttpd and
+ spawn-fcgi.lighttd.1.
+ + add Conflict against cherokee <= 0.6.1-1.
+ * Quote "dangerous" bits of conf-available/10-cgi.conf (Closes: 479276).
+
+ -- Pierre Habouzit <madcoder at debian.org> Tue, 06 May 2008 20:01:37 +0200
+
+lighttpd (1.4.19-2) unstable; urgency=low
+
+ * Add patches/ssl-connection-errors.patch for CVE-2008-1531
+ (Closes: 475438).
+ * Test for /var/cache/lighttpd/compress in lighttpd.cron.daily to avoid
+ spurious errors for uninstalled and not purged lighttpd's
+ (Closes: 472175).
+
+ * Add handling of /var/cache/lighttpd/uploads (Closes: 408521):
+ + add it in lighttpd.dirs.
+ + add it as a server.upload-dirs in lighttpd.conf.
+ + purge it daily in lighttpd.cron.daily.
+
+ * Fix typo in lighttpd.preinst causing failure to update 05-auth symlink
+ properly (Closes: 472119).
+
+ * init.d: stopping an already stopped lighttpd, or starting an already
+ running one should not fail (Closes: 472122).
+
+ * Use $HTTP["remoteip"] =~ "127.0.0.1" in configuration snipplets so that it
+ works when ipv6 is enabled by default too (Closes: 473510).
+
+ * Use perl to detect if the host has ipv6, and generate the server.use-ipv6
+ snipplet on the fly instead of forcing it to true (Closes: 473053).
+
+ -- Pierre Habouzit <madcoder at debian.org> Sun, 13 Apr 2008 13:20:40 +0200
+
+lighttpd (1.4.19-1~bpo40+1) etch-backports; urgency=low
+
+ * Rebuild for etch-backports.
+
+ -- Pierre Habouzit <madcoder at debian.org> Thu, 20 Mar 2008 00:41:49 +0100
+
+lighttpd (1.4.19-1) unstable; urgency=low
+
+ * New upstream release.
+
+ * debian/control:
+ + add Build-Depends upon quilt, remove dpatch.
+ + Bump Standards-Version to 3.7.3 (no changes required).
+ + Move Homepage pseudo-headers as real headers.
+
+ * debian/patches:
+ + migrate to quilt.
+ + remove 05_fdevent_fix.patch (merged upstream).
+ + remove 06_mod_cgi_vuln_fix.patch (merged upstream).
+ + refresh the rest of the series.
+
+ * debian/lighty-enable-mod:
+ + Reindent and remove trailing spaces.
+ + don't fail to remove a module that is already removed.
+ Patch from Michal Čihař (Closes: 448682).
+ + Allow full stops in module names (Closes: 462199).
+
+ * debian/lighttpd.conf:
+ + enable ipv6 by default (Closes: 448054).
+ + remove mod_status stanza, create conf-available/10-status.conf with it.
+
+ * debian/lighttpd.cron.daily: new file, cleanup compressed cache.
+ Thanks to Michal Čihař (Closes: 445224).
+
+ * be sure mod_auth is loaded first (Closes: 419176):
+ + add debian/lighttpd.preinst to rename 10-auth.conf into 05-auth.conf
+ automagically (when it's a sane thing to do).
+ + Document all that in NEWS.Debian.
+ + debian/lighttpd.install: add 10-status.conf and 05-auth.conf.
+
+ * debian/lighttpd.postinst:
+ + chmod'ing /var/cache/lighttpd recursively is useless and too long. Just
+ chmod the base directory, content is likely to be only created by
+ lighty anyways. (Closes: 468297).
+
+ * debian/init.d:
+ + Add $remote_fs and $network (instead of networking) to
+ Required-{Start,Stop}.
+ + Add fam to Should-{Start,Stop} (Closes: 461180).
+
+ * debian/lighttpd.links: add symlinks on lighty-* so that lighttpd-*
+ commands exists as well (Closes: 435131).
+
+ -- Pierre Habouzit <madcoder at debian.org> Sun, 16 Mar 2008 12:01:41 +0100
+
+lighttpd (1.4.18-4) unstable; urgency=high
+
+ * The “I HATE DPATCH”-release.
+ * Add patches for real as dpatch-edit-patch is stupid enough for not doing
+ it by itself (Closes: 463368, 469307).
+
+ -- Pierre Habouzit <madcoder at debian.org> Tue, 11 Mar 2008 10:07:35 +0100
+
+lighttpd (1.4.18-3) unstable; urgency=high
+
+ * Force use of deprecated ldap interfaces (Closes: 463368),
+ thanks to Dann Frazier (patches/ldap-deprecated.dpatch).
+ * Add sample configuration for the mod_rrdtool (Closes: 462907).
+ * add patches/06_mod_cgi_vuln_fix.dpatch to fix CVE-2008-1111
+ (Closes: 469307).
+ * Remove spurious mkdir in debian/rules (Closes: 448160).
+ * Bump urgency for RC bug fixes.
+
+ -- Pierre Habouzit <madcoder at debian.org> Sat, 08 Mar 2008 17:30:03 +0100
+
+lighttpd (1.4.18-2) unstable; urgency=high
+
+ * Move the aliases on /doc/ and /images/ mandated by policy at the end to
+ circumvent #445459.
+ * Add patches/05_fdevent_fix.dpatch to fix possible remote DoS
+ (Closes: 466663).
+ * bump urgency for security fix.
+
+ -- Pierre Habouzit <madcoder at debian.org> Wed, 27 Feb 2008 16:56:16 +0100
+
+lighttpd (1.4.18-1) unstable; urgency=low
+
+ * New upstream release, fixes CVE-2007-4727 (closes: #441787)
+ * lighttpd-angel is installed but not used yet
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 11 Sep 2007 12:45:11 +0200
+
+lighttpd (1.4.17-1) unstable; urgency=low
+
+ * New upstream release
+ * patches/05_mysql_autoreconnect.dpatch - dropped, fixed in upstream
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 04 Sep 2007 12:19:01 +0200
+
+lighttpd (1.4.16-5~bpo40+2) etch-backports; urgency=low
+
+ * Rebuild in an etch chroot *doh*.
+
+ -- Pierre Habouzit <madcoder at debian.org> Tue, 28 Aug 2007 11:37:38 +0200
+
+lighttpd (1.4.16-5~bpo40+1) etch-backports; urgency=low
+
+ * Rebuild for Etch backports.
+
+ -- Pierre Habouzit <madcoder at debian.org> Fri, 24 Aug 2007 10:12:10 +0200
+
+lighttpd (1.4.16-5) unstable; urgency=low
+
+ * debian/control: Drop conflict with gamin as it appears it was not the
+ issue. (Closes: #438058). For real this time.
+
+ -- Pierre Habouzit <madcoder at debian.org> Sun, 19 Aug 2007 12:22:32 +0200
+
+lighttpd (1.4.16-4) unstable; urgency=low
+
+ * debian/control: Drop conflict with gamin as it appears it was not the
+ issue. (Closes: #438058).
+ * src/mod_mysql_vhost.c: Enable mysql auto-connect mode, as it's not default
+ in mysql 5.x anymore. (Closes: #428677).
+
+ -- Pierre Habouzit <madcoder at debian.org> Sat, 18 Aug 2007 10:27:22 +0200
+
+lighttpd (1.4.16-3) unstable; urgency=high
+
+ * Urgency set to high due to RC bug fix.
+ * debian/lighttpd.logrotate: fix stupid typo (closes: #437341).
+ * debian/control: add Conflict against gamin, to avoid #437307.
+
+ -- Pierre Habouzit <madcoder at debian.org> Wed, 15 Aug 2007 09:46:48 +0200
+
+lighttpd (1.4.16-2) unstable; urgency=low
+
+ * patches/04_ldap_build_filter_fix.dpatch: add patch from Peter Colberg to
+ fix first LDAP search that fails because of the filter being
+ uninitialized. (closes: #419661)
+ * Enable fam support (closes: #407820):
+ + debian/rules: add --enable-fam configure flag.
+ + debian/control: add libfam-dev to Build-Depends, and also wrap
+ build-dependencies to make diff more understandable.
+ * Enable support for kerberos (with openssl):
+ + debian/rules; add --enable-kerberos5 configure flag.
+ + debian/control: add libkrb5-dev to the Build-Depends.
+ * lighttpd.logrotate: redirect stderr to /dev/null as well to prevent
+ defunct processes (presumably due to full unread pipes/buffers)
+ (closes: #419992).
+ * debian/control: replace lighttpd dependency on perl with
+ libterm-readline-perl-perl as Readline.pm is needed for lighty-enable-mod
+ (closes: #435077).
+ * debian/control:
+ + Add myself to uploaders (closes: #401575).
+ + Drop Recommands on php5-cgi, there is absolutely no reason to have it,
+ or we would have to recommend ruby, python, lua, perl, .... and every
+ $language on earth to be fair. (closes: #435587).
+ * debian/conf-available/10-webdav.conf: add default configuration for webdav.
+ (closes: #406641).
+ * debian/conf-enabled: remove directory, it is already installed through
+ lighttpd.dirs.
+ * lighttpd.postinst, lighttpd.postrm, init.d: be sure there is a
+ /var/run/lighttpd owned by www-data:www-data, helpful to store locks and
+ things like that.
+
+ -- Pierre Habouzit <madcoder at debian.org> Fri, 03 Aug 2007 10:06:15 +0200
+
+lighttpd (1.4.16-1) unstable; urgency=low
+
+ * New upstream release (closes: #434546)
+ * Acknowledge NMU by Pierre Habouzit for CVE-2007-2841 (closes: #428368)
+ * Added static-file.exclude-extensions section to lighttpd.conf (closes: #408374)
+ * Fixed description of conf-available/10-fastcgi.conf (closes: #430469)
+ * Added mod_extforward to debian/lighttpd.install (closes: #434717)
+ * config.guess taken from upstream (closes: #419664)
+ * turn on compression (closes: #397514)
+ * debian/control: XS-Vcs-Svn header added
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Fri, 27 Jul 2007 10:32:51 +0200
+
+lighttpd (1.4.15-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * add patches/04_wrapping_headers_bugfix.dpatch to fix crash with wrapping
+ headers (Closes: 428368).
+
+ -- Pierre Habouzit <madcoder at debian.org> Fri, 20 Jul 2007 11:04:07 +0200
+
+lighttpd (1.4.15-1) unstable; urgency=low
+
+ * New upstream release (closes: #419131)
+ * 01_mod_fastcgi_missing_cleanup.dpatch is now in upstream so it's removed from
+ patches
+ * 04_pidfile_bugfix.dpatch is now in upstream so it's removed from patches
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Fri, 06 Apr 2007 11:24:54 +0200
+
+lighttpd (1.4.13-10) unstable; urgency=medium
+
+ * 03_ldap_leak_bugfix.dpatch added from yann at pleiades.fr.eu.org (Yann Rouillard)
+ (closes: #413917)
+ * Lowered priority of index.lighttpd.html (closes: #397492)
+ * We don't need now check md5 sum of index.html since we provide our own
+ index.lighttpd.html (closes: #407794)
+ * 04_pidfile_bugfix.dpatch by Chris Webb <chris at arachsys.com> added - some fixes
+ with graceful restart
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 8 Mar 2007 22:18:42 +0100
+
+lighttpd (1.4.13-9) unstable; urgency=low
+
+ * debian/lighttpd.default - removed, it is not ready yet. We'll back after
+ etch release (closes: #406021)
+ * debian/index.html.md5 - fixed path to file (full path to index.html)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 2 Jan 2007 14:24:42 +0100
+
+lighttpd (1.4.13-8) unstable; urgency=medium
+
+ * Typo fixed in debian/lighttpd.postinst (closes: #405123)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 2 Jan 2007 13:23:25 +0100
+
+lighttpd (1.4.13-7) unstable; urgency=low
+
+ [ Franz Pletz ]
+ * debian/conf-available/10-cgi.conf:
+ + match /cgi-bin/ only at the beginning of a path
+ + convert match for host == localhost to remoteip == 127.0.0.1 like in
+ lighttpd.conf; due to bugs in mod_alias, the cgi-bin, doc and images
+ aliases didn't work anymore
+ * debian/lighttpd.logrotate
+ + use reload instead of force-reload for graceful restart
+ (closes: #398169, #380080)
+ * added debian/patches/01_mod_fastcgi_missing_cleanup.dpatch
+ + source: http://trac.lighttpd.net/trac/ticket/910
+ + fixes memleak in mod_fastcgi (closes: #400167)
+ * added debian/patches/02_fastcgi_detach.dpatch
+ + disconnect stderr/stdout from the terminal (closes: #368670)
+ + point them either to errorlog or /dev/null
+ * debian/control: added myself to Uploaders
+ * Don't touch /var/www/index.html, create /var/www/index.lighttpd.html
+ instead (closes: #397492)
+ + debian/lighttpd.postinst: copy to /var/www/index.lighttpd.html
+ + debian/lighttpd.conf: add index.lighttpd.html as first index-filename
+
+ [ Krzysztof Krzyzaniak (eloy) ]
+ * Typo fixed in index.html (closes: #403620)
+
+ -- Franz Pletz <fpletz at franz-pletz.org> Fri, 8 Dec 2006 16:15:27 +0100
+
+lighttpd (1.4.13-6) unstable; urgency=low
+
+ * debian/lighttpd.postinst: change only permission for /var/log/lighttpd/
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 4 Dec 2006 16:34:11 +0100
+
+lighttpd (1.4.13-5) unstable; urgency=low
+
+ * debian/control:
+ + perl added to dependencies (closes: #396629)
+ * debian/conf-available/10-fastcgi.conf:
+ + /usr/bin/php4-cgi changed to /usr/bin/php-cgi (closes: #397142)
+ * debian/lighttpd.postinst: fix permission of /var/log/lighttpd
+ (closes: #398834)
+ * debian/lighty-enable-mod - fixed bug with undefined values (closes: #397493)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 9 Nov 2006 12:18:25 +0100
+
+lighttpd (1.4.13-4) unstable; urgency=low
+
+ * fixed config file for logrotote (reload action changed to force-reload)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 26 Oct 2006 11:36:13 +0200
+
+lighttpd (1.4.13-3) unstable; urgency=low
+
+ * debian/control: libxml2-dev added to Build-Depends (closes: #394882)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 24 Oct 2006 13:31:27 +0200
+
+lighttpd (1.4.13-2) unstable; urgency=medium
+
+ * Patch from Pierre Habouzit <madcoder at debian.org> to init.d applied
+ (closes: #380080)
+ * Patch from Adrian Friendli <adi at koalatux.ch> to lighttpd.conf applied
+ (closes: #392890)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 16 Oct 2006 11:14:28 +0200
+
+lighttpd (1.4.13-1) unstable; urgency=low
+
+ * New upstream release
+ * mod_webdav as separate lighttpd-mod-webdav package
+ * Compiled with --with-webdav-locks, added uuid-dev to Build-Depends
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 10 Oct 2006 10:26:54 +0200
+
+lighttpd (1.4.13~r1385-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 9 Oct 2006 10:28:32 +0200
+
+lighttpd (1.4.13~r1370-1) unstable; urgency=low
+
+ * New upstream release (closes: #390877) (closes: #389911)
+ * Compiled with --with-attr param (closes: #389712)
+ * dropped 01-lua5.1.dpatch, issue fixed by upstream
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 5 Oct 2006 10:08:19 +0200
+
+lighttpd (1.4.12-1) unstable; urgency=low
+
+ * New upstream release
+ * fixes in debian/lighttpd.install (closes: #377802)
+ * mod_cml is deprecated from now on and it will be removed in 1.5.0
+ mod_magnet provides the same functionality and more with a
+ cleaner syntax and in a more generic form
+ * added separate module for mod_magnet (closes: #389578)
+ * changed dependency from lua-5.0 to lua-5.1
+ * added patch patches/01-lua5.1.dpatch
+ * added pkg-config to Build-Depends
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 12 Sep 2006 19:17:41 +0200
+
+lighttpd (1.4.12~20060907-1) unstable; urgency=low
+
+ * New upstream release
+ * Removed debian/patches/01_use_bin_sh.dpatch - fixed in upstream
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 7 Sep 2006 14:50:47 +0200
+
+lighttpd (1.4.12~20060901-1) unstable; urgency=low
+
+ * New upstream release
+ * Removed debian/patches/02_ssl_fix.dpatch - it's now fixed in upstream
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 4 Sep 2006 11:07:42 +0200
+
+lighttpd (1.4.11-8) UNRELEASED; urgency=low
+
+ * debian/lighttpd.dirs:
+ + usr/lib/cgi-bin added
+ * debian/conf-available/10-cgi.conf
+ + proper configuration for localhost as well (again Bug#345554)
+ * debian/lighttpd.conf:
+ + server.bind commented out as in default configuration (closes: #380267)
+ * debian/patches/02_ssl_fix.dpatch - added fix for ssl connection with POST
+ request (http://trac.lighttpd.net/trac/ticket/607), thanks to
+ RISKO Gergely <risko at debian.org> (closes: #381455)
+ * debian/lighttpd.logrotate - some values changes (now rotate weekly
+ and keep 12 logfiles)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 28 Aug 2006 13:06:25 +0200
+
+lighttpd (1.4.11-7) unstable; urgency=low
+
+ * debian/create-mime.assign.pl - catchup error when /etc/mime.types is not
+ readable (closes: #375347)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 27 Jun 2006 20:19:57 +0200
+
+lighttpd (1.4.11-6) unstable; urgency=low
+
+ * debian/control:
+ - Recommends: Changed to alternative: php4-cgi | php5-cgi (closes: #368215)
+ * include-conf-enabled.pl script changed according to patch from
+ Tobias Gruetzmacher <tobias at portfolio16.de> (closes: #368352)
+ * debian/lighttpd.conf: removed global for local aliases (/images/, /doc/)
+ (closes: #366801)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 23 May 2006 16:48:36 +0200
+
+lighttpd (1.4.11-5) unstable; urgency=low
+
+ * debian/init.d:
+ - --oknodo added to section "stop" to close finally #35979
+ - --retry 30 added to section "reload", to prevents problems with
+ logrotating (closes: #366366)
+ * debian/control:
+ Standards-Version: increased to 3.7.2 without additional changes
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Wed, 10 May 2006 14:26:04 +0200
+
+lighttpd (1.4.11-4) unstable; urgency=low
+
+ [ Krzysztof Krzyzaniak (eloy) ]
+ * debian/init.d:
+ - "exit 1" after failed actions removed (closes: #359792)
+ * debian/conf-available/10-fastcgi.conf updated (closes: #362827)
+ thanks to Joerg Rieger <a.mailinglists#lumrix.net>
+
+ [ Torsten Marek ]
+ * Change my email address to shlomme at debian.org
+ * Remove --background from the start action, since it
+ breaks the error checking of start-stop-daemon.
+ The behaviour described in #355865 is not reproducable
+ any more.
+ * make reload action in initscript more well-behaved
+
+ -- Torsten Marek <shlomme at debian.org> Sun, 9 Apr 2006 15:51:51 +0200
+
+lighttpd (1.4.11-3) unstable; urgency=low
+
+ * debian/lighttpd.conf - added dir-listing.encoding = "utf-8", suggested
+ by Silvestre Zabala <silvestre(at)zabala.name> (closes: #359100)
+ * debian/lighttpd.install - fix bug with installing *.conf files
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 27 Mar 2006 09:50:55 +0200
+
+lighttpd (1.4.11-2) unstable; urgency=low
+
+ * Provide debian/conf-available/10-ssl.conf, (closes: #355868)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Fri, 24 Mar 2006 13:53:54 +0100
+
+lighttpd (1.4.11-1) unstable; urgency=low
+
+ * New upstream release (closes: #356496)
+ * init.d script - added --background to "start" (thanks goes to
+ Marcello Nuccio <marcenuc at cicaia160.unimo.it>) (closes: #355865)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Fri, 10 Mar 2006 09:51:10 +0100
+
+lighttpd (1.4.10-6) unstable; urgency=low
+
+ * Patch from <tobias at portfolio16.de> on lighty-enable-mod
+ (closes: #355773)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Wed, 8 Mar 2006 11:17:07 +0100
+
+lighttpd (1.4.10-5) unstable; urgency=low
+
+ [ Krzysztof Krzyzaniak (eloy) ]
+ * debian/control - libmysqlclient14-dev have to be removede because is not
+ available in debian/sid
+
+ [ Torsten Marek ]
+ * debian/rules - build with support for LUA, libmemcache and GDBM
+ * debian/lighttpd.install - install mod_evasive into lighttpd package
+ * debian/control - own packages for mod_trigger_b4_dl and mod_cml
+ * debian/control - small fixes
+ * debian/conf-available/10-ssi.conf - comment out link to web documentation
+
+ -- Torsten Marek <shlomme at gmx.net> Mon, 6 Mar 2006 12:07:29 +0100
+
+lighttpd (1.4.10-4) unstable; urgency=low
+
+ * bugfix release
+ * Fixed bug with 10-fastcgi.conf, (closes: #353964)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 23 Feb 2006 16:14:42 +0100
+
+lighttpd (1.4.10-3) unstable; urgency=low
+
+ * lighttpd.conf - changed configuration for /images/ & /doc/ handling
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 14 Feb 2006 09:57:15 +0100
+
+lighttpd (1.4.10-2) unstable; urgency=low
+
+ * debian/control - libmysqlclient14-dev added as alternative (will be easier for
+ backports.org)
+ * lighty-enable-mod script fixed - files with dash were skipped, thanks
+ to Silvester Zabala for patch (closes: #352577)
+ * install doc/lighttpd.conf as example (closes: #344961)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 13 Feb 2006 12:58:54 +0100
+
+lighttpd (1.4.10-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Wed, 8 Feb 2006 16:02:16 +0100
+
+lighttpd (1.4.9-5) unstable; urgency=low
+
+ * Properly fixed bug with overwritting index.html (closes: #349676)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 30 Jan 2006 10:17:57 +0100
+
+lighttpd (1.4.9-4) unstable; urgency=low
+
+ [ Krzysztof Krzyzaniak (eloy) ]
+ * Fixed bug with 10-userdir.conf, (closes: #349821)
+ * index.html is not replaced when md5 string desn't match (closes: #349676)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Wed, 25 Jan 2006 16:33:34 +0100
+
+lighttpd (1.4.9-3) unstable; urgency=low
+
+ [ Torsten Marek ]
+ * Added some configuration examples from upstream sample
+ configuration
+ * Implement "reload" init.d action with graceful restart,
+ taken from http://trac.lighttpd.net/trac/ticket/267 (Closes: #346038)
+ * ssi, auth, fastcgi, proxy and simple-vhost are now in separte
+ config files
+ * Put path to plugin documentation into every config snippet
+ * Build against libmysqlclient15
+
+ -- Torsten Marek <shlomme at gmx.net> Sat, 21 Jan 2006 15:16:01 +0100
+
+lighttpd (1.4.9-2) unstable; urgency=low
+
+ [ Krzysztof Krzyzaniak (eloy) ]
+ * mod_alias enabled by default - removed conf-avaiable/00-alias.conf
+ * Added handling of http://localhost/doc/ & http://localhost/images/
+ (closes: #348823)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 19 Jan 2006 12:39:04 +0100
+
+lighttpd (1.4.9-1) unstable; urgency=low
+
+ * New upstream release
+ * Closing bug from not uploaded release 1.4.8-5, (closes: #347737)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 16 Jan 2006 20:06:39 +0100
+
+lighttpd (1.4.8-5) unstable; urgency=low
+
+ * create /var/www directory (closes: #347737), default /var/www/index.html
+ added (based on apache2 index.html file).
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Thu, 12 Jan 2006 16:54:32 +0100
+
+lighttpd (1.4.8-4) unstable; urgency=low
+
+ * fixed permissions and directories (closes: #347565)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Wed, 11 Jan 2006 17:15:12 +0100
+
+lighttpd (1.4.8-3) unstable; urgency=low
+
+ * New configuration layout (closes: #345554) (closes: #344959),
+ read /etc/lighttpd/conf-available/README
+ - conf-available directory for all templates
+ - conf-enabled directory for enabled modules
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Mon, 9 Jan 2006 13:49:34 +0100
+
+lighttpd (1.4.8-2) unstable; urgency=low
+
+ [ Krzysztof Krzyzaniak (eloy) ]
+ * debian/control: lsb-base dependency narrowed to (>= 3.0-3)
+ * create-mime.assign.pl set as executable (closes: #344938)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Wed, 28 Dec 2005 12:40:55 +0100
+
+lighttpd (1.4.8-1) unstable; urgency=low
+
+ * New upstream version (closes: #304271)
+ * Does not rely on $SHELL to execute external commands
+
+ -- Torsten Marek <shlomme at gmx.net> Sat, 26 Nov 2005 11:48:51 +0100
+
+lighttpd (1.4.7-1) unstable; urgency=low
+
+ * New upstream version, Initial debian version
+ * Better debian/rules file
+ * Split mysql vhost module into separate package
+ * Create separate package for documentation
+ * Create a better init script
+
+ -- Torsten Marek <shlomme at gmx.net> Sat, 5 Nov 2005 18:56:53 +0100
Deleted: lighttpd/tags/1.4.28-4/debian/control
===================================================================
--- lighttpd/trunk/debian/control 2011-04-24 18:00:55 UTC (rev 528)
+++ lighttpd/tags/1.4.28-4/debian/control 2011-04-26 13:04:52 UTC (rev 536)
@@ -1,98 +0,0 @@
-Source: lighttpd
-Section: httpd
-Priority: optional
-Maintainer: Debian lighttpd maintainers <pkg-lighttpd-maintainers at lists.alioth.debian.org>
-Uploaders: Krzysztof Krzyżaniak (eloy) <eloy at debian.org>,
- Olaf van der Spek <olafvdspek at gmail.com>
-Homepage: http://lighttpd.net/
-Build-Depends: debhelper (>= 8), mime-support, libssl-dev,
- zlib1g-dev, libbz2-dev, libattr1-dev, libpcre3-dev, libmysqlclient-dev,
- libfam-dev, libldap2-dev, libfcgi-dev, libgdbm-dev, libmemcache-dev,
- liblua5.1-0-dev, pkg-config, uuid-dev, libsqlite3-dev,
- libxml2-dev, libkrb5-dev, perl
-Vcs-Svn: svn://svn.debian.org/pkg-lighttpd/lighttpd/trunk
-Vcs-Browser: http://svn.debian.org/wsvn/pkg-lighttpd/lighttpd/
-Standards-Version: 3.9.2.0
-
-Package: lighttpd
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.2-14), mime-support, libterm-readline-perl-perl
-Provides: httpd, httpd-cgi
-Suggests: openssl, rrdtool, apache2-utils
-Recommends: spawn-fcgi
-Description: A fast webserver with minimal memory footprint
- lighttpd is a small webserver and fast webserver developed with
- security in mind and a lot of features.
- It has support for
- * CGI, FastCGI and SSI
- * virtual hosts
- * URL rewriting
- * authentication (plain files, htpasswd, ldap)
- * transparent content compression
- * conditional configuration
- and configuration is straight-forward and easy.
-
-Package: lighttpd-doc
-Architecture: all
-Section: doc
-Depends: ${misc:Depends}
-Suggests: lighttpd
-Description: Documentation for lighttpd
- This package contains all documentation files for lighttpd.
-
-Package: lighttpd-mod-mysql-vhost
-Architecture: any
-Depends: lighttpd (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
-Description: MySQL-based virtual host configuration for lighttpd
- This package contains the myqsl_vhost module for lighttpd. With
- this module, it is possible to write the configuration for virtual
- hosts into a MySQL table instead of including it in the lighttpd
- configuration file.
-
-Package: lighttpd-mod-trigger-b4-dl
-Architecture: any
-Depends: lighttpd (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
-Replaces: lighttpd (<< 1.4.10-5)
-Recommends: memcached
-Description: Anti-deep-linking module for lighttpd
- The trigger-b4-dl module for lighttpd can prevent deep linking
- from other sites by requiring users to visit a trigger URL to
- be able to download certain files.
-
-Package: lighttpd-mod-cml
-Architecture: any
-Depends: lighttpd (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
-Recommends: memcached
-Description: Cache meta language module for lighttpd
- With the cache meta language, it is possible to describe to the
- dependencies of a cached file to its source files/scripts. For the
- cache files, the scripting language LUA is used.
- .
- THIS MODULE IS OBSOLETED AND WILL BE REMOVED IN LIGHTTPD 1.5.
- USE mod_magnet INSTEAD.
-
-Package: lighttpd-mod-magnet
-Architecture: any
-Depends: lighttpd (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
-Description: Control the request handling module for lighttpd
- mod_magnet can attract a request in several stages in the request-handling.
- either at the same level as mod_rewrite, before any parsing of the URL is done
- or at a later stage, when the doc-root is known and the physical-path is
- already setup
-
-Package: lighttpd-mod-webdav
-Architecture: any
-Depends: lighttpd (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
-Description: WebDAV module for lighttpd
- The WebDAV module is a very minimalistic implementation of RFC 2518.
- Minimalistic means that not all operations are implemented yet.
- .
- Currently supports:
- GET
- POST
- HEAD
- PROPFIND
- OPTIONS
- MKCOL
- DELETE
- PUT
Copied: lighttpd/tags/1.4.28-4/debian/control (from rev 531, lighttpd/trunk/debian/control)
===================================================================
--- lighttpd/tags/1.4.28-4/debian/control (rev 0)
+++ lighttpd/tags/1.4.28-4/debian/control 2011-04-26 13:04:52 UTC (rev 536)
@@ -0,0 +1,99 @@
+Source: lighttpd
+Section: httpd
+Priority: optional
+Maintainer: Debian lighttpd maintainers <pkg-lighttpd-maintainers at lists.alioth.debian.org>
+Uploaders: Krzysztof Krzyżaniak (eloy) <eloy at debian.org>,
+ Olaf van der Spek <olafvdspek at gmail.com>,
+ Arno Töll <debian at toell.net>
+Homepage: http://lighttpd.net/
+Build-Depends: debhelper (>= 8), mime-support, libssl-dev,
+ zlib1g-dev, libbz2-dev, libattr1-dev, libpcre3-dev, libmysqlclient-dev,
+ libfam-dev, libldap2-dev, libfcgi-dev, libgdbm-dev, libmemcache-dev,
+ liblua5.1-0-dev, pkg-config, uuid-dev, libsqlite3-dev,
+ libxml2-dev, libkrb5-dev, perl
+Vcs-Svn: svn://svn.debian.org/pkg-lighttpd/lighttpd/trunk
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-lighttpd/lighttpd/
+Standards-Version: 3.9.2.0
+
+Package: lighttpd
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.2-14), mime-support, libterm-readline-perl-perl
+Provides: httpd, httpd-cgi
+Suggests: openssl, rrdtool, apache2-utils
+Recommends: spawn-fcgi
+Description: Fast webserver with minimal memory footprint
+ lighttpd is a small webserver and fast webserver developed with
+ security in mind and a lot of features.
+ It has support for
+ * CGI, FastCGI and SSI
+ * virtual hosts
+ * URL rewriting
+ * authentication (plain files, htpasswd, ldap)
+ * transparent content compression
+ * conditional configuration
+ and configuration is straight-forward and easy.
+
+Package: lighttpd-doc
+Architecture: all
+Section: doc
+Depends: ${misc:Depends}
+Suggests: lighttpd
+Description: Documentation for lighttpd
+ This package contains all documentation files for lighttpd.
+
+Package: lighttpd-mod-mysql-vhost
+Architecture: any
+Depends: lighttpd (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: MySQL-based virtual host configuration for lighttpd
+ This package contains the myqsl_vhost module for lighttpd. With
+ this module, it is possible to write the configuration for virtual
+ hosts into a MySQL table instead of including it in the lighttpd
+ configuration file.
+
+Package: lighttpd-mod-trigger-b4-dl
+Architecture: any
+Depends: lighttpd (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Replaces: lighttpd (<< 1.4.10-5)
+Recommends: memcached
+Description: Anti-deep-linking module for lighttpd
+ The trigger-b4-dl module for lighttpd can prevent deep linking
+ from other sites by requiring users to visit a trigger URL to
+ be able to download certain files.
+
+Package: lighttpd-mod-cml
+Architecture: any
+Depends: lighttpd (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Recommends: memcached
+Description: Cache meta language module for lighttpd
+ With the cache meta language, it is possible to describe to the
+ dependencies of a cached file to its source files/scripts. For the
+ cache files, the scripting language LUA is used.
+ .
+ THIS MODULE IS OBSOLETED AND WILL BE REMOVED IN LIGHTTPD 1.5.
+ USE mod_magnet INSTEAD.
+
+Package: lighttpd-mod-magnet
+Architecture: any
+Depends: lighttpd (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: Control the request handling module for lighttpd
+ mod_magnet can attract a request in several stages in the request-handling.
+ either at the same level as mod_rewrite, before any parsing of the URL is done
+ or at a later stage, when the doc-root is known and the physical-path is
+ already setup
+
+Package: lighttpd-mod-webdav
+Architecture: any
+Depends: lighttpd (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: WebDAV module for lighttpd
+ The WebDAV module is a very minimalistic implementation of RFC 2518.
+ Minimalistic means that not all operations are implemented yet.
+ .
+ Currently supports:
+ GET
+ POST
+ HEAD
+ PROPFIND
+ OPTIONS
+ MKCOL
+ DELETE
+ PUT
Deleted: lighttpd/tags/1.4.28-4/debian/patches/series
===================================================================
--- lighttpd/trunk/debian/patches/series 2011-04-24 18:00:55 UTC (rev 528)
+++ lighttpd/tags/1.4.28-4/debian/patches/series 2011-04-26 13:04:52 UTC (rev 536)
@@ -1,2 +0,0 @@
-silence-errors.diff
-ssl-fix.patch
Copied: lighttpd/tags/1.4.28-4/debian/patches/series (from rev 530, lighttpd/trunk/debian/patches/series)
===================================================================
--- lighttpd/tags/1.4.28-4/debian/patches/series (rev 0)
+++ lighttpd/tags/1.4.28-4/debian/patches/series 2011-04-26 13:04:52 UTC (rev 536)
@@ -0,0 +1,4 @@
+silence-errors.diff
+ssl-fix.patch
+
+debian-changes-1.4.28-4
Deleted: lighttpd/tags/1.4.28-4/src/configparser.c
===================================================================
--- lighttpd/trunk/src/configparser.c 2011-04-24 18:00:55 UTC (rev 528)
+++ lighttpd/tags/1.4.28-4/src/configparser.c 2011-04-26 13:04:52 UTC (rev 536)
@@ -1,1616 +0,0 @@
-/* Driver template for the LEMON parser generator.
-** The author disclaims copyright to this source code.
-*/
-/* First off, code is include which follows the "include" declaration
-** in the input file. */
-#include <stdio.h>
-#line 5 "./configparser.y"
-
-#include "configfile.h"
-#include "buffer.h"
-#include "array.h"
-
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-
-static void configparser_push(config_t *ctx, data_config *dc, int isnew) {
- if (isnew) {
- dc->context_ndx = ctx->all_configs->used;
- assert(dc->context_ndx > ctx->current->context_ndx);
- array_insert_unique(ctx->all_configs, (data_unset *)dc);
- dc->parent = ctx->current;
- array_insert_unique(dc->parent->childs, (data_unset *)dc);
- }
- if (ctx->configs_stack->used > 0 && ctx->current->context_ndx == 0) {
- fprintf(stderr, "Cannot use conditionals inside a global { ... } block\n");
- exit(-1);
- }
- array_insert_unique(ctx->configs_stack, (data_unset *)ctx->current);
- ctx->current = dc;
-}
-
-static data_config *configparser_pop(config_t *ctx) {
- data_config *old = ctx->current;
- ctx->current = (data_config *) array_pop(ctx->configs_stack);
- return old;
-}
-
-/* return a copied variable */
-static data_unset *configparser_get_variable(config_t *ctx, const buffer *key) {
- data_unset *du;
- data_config *dc;
-
-#if 0
- fprintf(stderr, "get var %s\n", key->ptr);
-#endif
- for (dc = ctx->current; dc; dc = dc->parent) {
-#if 0
- fprintf(stderr, "get var on block: %s\n", dc->key->ptr);
- array_print(dc->value, 0);
-#endif
- if (NULL != (du = array_get_element(dc->value, key->ptr))) {
- return du->copy(du);
- }
- }
- return NULL;
-}
-
-/* op1 is to be eat/return by this function if success, op1->key is not cared
- op2 is left untouch, unreferenced
- */
-data_unset *configparser_merge_data(data_unset *op1, const data_unset *op2) {
- /* type mismatch */
- if (op1->type != op2->type) {
- if (op1->type == TYPE_STRING && op2->type == TYPE_INTEGER) {
- data_string *ds = (data_string *)op1;
- buffer_append_long(ds->value, ((data_integer*)op2)->value);
- return op1;
- } else if (op1->type == TYPE_INTEGER && op2->type == TYPE_STRING) {
- data_string *ds = data_string_init();
- buffer_append_long(ds->value, ((data_integer*)op1)->value);
- buffer_append_string_buffer(ds->value, ((data_string*)op2)->value);
- op1->free(op1);
- return (data_unset *)ds;
- } else {
- fprintf(stderr, "data type mismatch, cannot merge\n");
- return NULL;
- }
- }
-
- switch (op1->type) {
- case TYPE_STRING:
- buffer_append_string_buffer(((data_string *)op1)->value, ((data_string *)op2)->value);
- break;
- case TYPE_INTEGER:
- ((data_integer *)op1)->value += ((data_integer *)op2)->value;
- break;
- case TYPE_ARRAY: {
- array *dst = ((data_array *)op1)->value;
- array *src = ((data_array *)op2)->value;
- data_unset *du;
- size_t i;
-
- for (i = 0; i < src->used; i ++) {
- du = (data_unset *)src->data[i];
- if (du) {
- array_insert_unique(dst, du->copy(du));
- }
- }
- break;
- default:
- assert(0);
- break;
- }
- }
- return op1;
-}
-
-
-#line 111 "configparser.c"
-/* Next is all token values, in a form suitable for use by makeheaders.
-** This section will be null unless lemon is run with the -m switch.
-*/
-/*
-** These constants (all generated automatically by the parser generator)
-** specify the various kinds of tokens (terminals) that the parser
-** understands.
-**
-** Each symbol here is a terminal symbol in the grammar.
-*/
-/* Make sure the INTERFACE macro is defined.
-*/
-#ifndef INTERFACE
-# define INTERFACE 1
-#endif
-/* The next thing included is series of defines which control
-** various aspects of the generated parser.
-** YYCODETYPE is the data type used for storing terminal
-** and nonterminal numbers. "unsigned char" is
-** used if there are fewer than 250 terminals
-** and nonterminals. "int" is used otherwise.
-** YYNOCODE is a number of type YYCODETYPE which corresponds
-** to no legal terminal or nonterminal number. This
-** number is used to fill in empty slots of the hash
-** table.
-** YYFALLBACK If defined, this indicates that one or more tokens
-** have fall-back values which should be used if the
-** original value of the token will not parse.
-** YYACTIONTYPE is the data type used for storing terminal
-** and nonterminal numbers. "unsigned char" is
-** used if there are fewer than 250 rules and
-** states combined. "int" is used otherwise.
-** configparserTOKENTYPE is the data type used for minor tokens given
-** directly to the parser from the tokenizer.
-** YYMINORTYPE is the data type used for all minor tokens.
-** This is typically a union of many types, one of
-** which is configparserTOKENTYPE. The entry in the union
-** for base tokens is called "yy0".
-** YYSTACKDEPTH is the maximum depth of the parser's stack.
-** configparserARG_SDECL A static variable declaration for the %extra_argument
-** configparserARG_PDECL A parameter declaration for the %extra_argument
-** configparserARG_STORE Code to store %extra_argument into yypParser
-** configparserARG_FETCH Code to extract %extra_argument from yypParser
-** YYNSTATE the combined number of states.
-** YYNRULE the number of rules in the grammar
-** YYERRORSYMBOL is the code number of the error symbol. If not
-** defined, then do no error processing.
-*/
-/* */
-#define YYCODETYPE unsigned char
-#define YYNOCODE 48
-#define YYACTIONTYPE unsigned char
-#define configparserTOKENTYPE buffer *
-typedef union {
- configparserTOKENTYPE yy0;
- config_cond_t yy27;
- array * yy40;
- data_unset * yy41;
- buffer * yy43;
- data_config * yy78;
- int yy95;
-} YYMINORTYPE;
-#define YYSTACKDEPTH 100
-#define configparserARG_SDECL config_t *ctx;
-#define configparserARG_PDECL ,config_t *ctx
-#define configparserARG_FETCH config_t *ctx = yypParser->ctx
-#define configparserARG_STORE yypParser->ctx = ctx
-#define YYNSTATE 63
-#define YYNRULE 40
-#define YYERRORSYMBOL 26
-#define YYERRSYMDT yy95
-#define YY_NO_ACTION (YYNSTATE+YYNRULE+2)
-#define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1)
-#define YY_ERROR_ACTION (YYNSTATE+YYNRULE)
-
-/* Next are that tables used to determine what action to take based on the
-** current state and lookahead token. These tables are used to implement
-** functions that take a state number and lookahead value and return an
-** action integer.
-**
-** Suppose the action integer is N. Then the action is determined as
-** follows
-**
-** 0 <= N < YYNSTATE Shift N. That is, push the lookahead
-** token onto the stack and goto state N.
-**
-** YYNSTATE <= N < YYNSTATE+YYNRULE Reduce by rule N-YYNSTATE.
-**
-** N == YYNSTATE+YYNRULE A syntax error has occurred.
-**
-** N == YYNSTATE+YYNRULE+1 The parser accepts its input.
-**
-** N == YYNSTATE+YYNRULE+2 No such action. Denotes unused
-** slots in the yy_action[] table.
-**
-** The action table is constructed as a single large table named yy_action[].
-** Given state S and lookahead X, the action is computed as
-**
-** yy_action[ yy_shift_ofst[S] + X ]
-**
-** If the index value yy_shift_ofst[S]+X is out of range or if the value
-** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
-** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
-** and that yy_default[S] should be used instead.
-**
-** The formula above is for computing the action when the lookahead is
-** a terminal symbol. If the lookahead is a non-terminal (as occurs after
-** a reduce action) then the yy_reduce_ofst[] array is used in place of
-** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
-** YY_SHIFT_USE_DFLT.
-**
-** The following are the tables generated in this section:
-**
-** yy_action[] A single table containing all actions.
-** yy_lookahead[] A table containing the lookahead for each entry in
-** yy_action. Used to detect hash collisions.
-** yy_shift_ofst[] For each state, the offset into yy_action for
-** shifting terminals.
-** yy_reduce_ofst[] For each state, the offset into yy_action for
-** shifting non-terminals after a reduce.
-** yy_default[] Default action for each state.
-*/
-static YYACTIONTYPE yy_action[] = {
- /* 0 */ 2, 3, 4, 5, 13, 14, 63, 15, 7, 45,
- /* 10 */ 20, 88, 16, 46, 28, 49, 41, 10, 40, 25,
- /* 20 */ 22, 50, 46, 8, 15, 104, 1, 20, 28, 18,
- /* 30 */ 58, 60, 6, 25, 22, 40, 47, 62, 11, 46,
- /* 40 */ 20, 9, 23, 24, 26, 29, 89, 58, 60, 10,
- /* 50 */ 17, 38, 28, 27, 37, 19, 30, 25, 22, 34,
- /* 60 */ 15, 100, 20, 20, 23, 24, 26, 12, 19, 31,
- /* 70 */ 32, 40, 19, 44, 43, 46, 95, 35, 90, 89,
- /* 80 */ 28, 49, 42, 58, 60, 25, 22, 59, 28, 27,
- /* 90 */ 33, 48, 52, 25, 22, 34, 28, 49, 51, 28,
- /* 100 */ 36, 25, 22, 61, 25, 22, 89, 28, 39, 89,
- /* 110 */ 89, 89, 25, 22, 54, 55, 56, 57, 89, 28,
- /* 120 */ 53, 21, 89, 89, 25, 22, 25, 22,
-};
-static YYCODETYPE yy_lookahead[] = {
- /* 0 */ 29, 30, 31, 32, 33, 34, 0, 1, 44, 38,
- /* 10 */ 4, 15, 41, 16, 35, 36, 45, 46, 12, 40,
- /* 20 */ 41, 42, 16, 15, 1, 27, 28, 4, 35, 36,
- /* 30 */ 24, 25, 1, 40, 41, 12, 17, 14, 13, 16,
- /* 40 */ 4, 38, 6, 7, 8, 9, 15, 24, 25, 46,
- /* 50 */ 2, 3, 35, 36, 37, 5, 39, 40, 41, 42,
- /* 60 */ 1, 11, 4, 4, 6, 7, 8, 28, 5, 9,
- /* 70 */ 10, 12, 5, 14, 28, 16, 13, 11, 13, 47,
- /* 80 */ 35, 36, 13, 24, 25, 40, 41, 42, 35, 36,
- /* 90 */ 37, 18, 43, 40, 41, 42, 35, 36, 19, 35,
- /* 100 */ 36, 40, 41, 42, 40, 41, 47, 35, 36, 47,
- /* 110 */ 47, 47, 40, 41, 20, 21, 22, 23, 47, 35,
- /* 120 */ 36, 35, 47, 47, 40, 41, 40, 41,
-};
-#define YY_SHIFT_USE_DFLT (-5)
-static signed char yy_shift_ofst[] = {
- /* 0 */ -5, 6, -5, -5, -5, 31, -4, 8, -3, -5,
- /* 10 */ 25, -5, 23, -5, -5, -5, 48, 58, 67, 58,
- /* 20 */ -5, -5, -5, -5, -5, -5, 36, 50, -5, -5,
- /* 30 */ 60, -5, 58, -5, 66, 58, 67, -5, 58, 67,
- /* 40 */ 65, 69, -5, 59, -5, -5, 19, 73, 58, 67,
- /* 50 */ 79, 94, 58, 63, -5, -5, -5, -5, 58, -5,
- /* 60 */ 58, -5, -5,
-};
-#define YY_REDUCE_USE_DFLT (-37)
-static signed char yy_reduce_ofst[] = {
- /* 0 */ -2, -29, -37, -37, -37, -36, -37, -37, 3, -37,
- /* 10 */ -37, 39, -29, -37, -37, -37, -37, -7, -37, 86,
- /* 20 */ -37, -37, -37, -37, -37, -37, 17, -37, -37, -37,
- /* 30 */ -37, -37, 53, -37, -37, 64, -37, -37, 72, -37,
- /* 40 */ -37, -37, 46, -29, -37, -37, -37, -37, -21, -37,
- /* 50 */ -37, 49, 84, -37, -37, -37, -37, -37, 45, -37,
- /* 60 */ 61, -37, -37,
-};
-static YYACTIONTYPE yy_default[] = {
- /* 0 */ 65, 103, 64, 66, 67, 103, 68, 103, 103, 92,
- /* 10 */ 103, 65, 103, 69, 70, 71, 103, 103, 72, 103,
- /* 20 */ 74, 75, 77, 78, 79, 80, 103, 86, 76, 81,
- /* 30 */ 103, 82, 84, 83, 103, 103, 87, 85, 103, 73,
- /* 40 */ 103, 103, 65, 103, 91, 93, 103, 103, 103, 100,
- /* 50 */ 103, 103, 103, 103, 96, 97, 98, 99, 103, 101,
- /* 60 */ 103, 102, 94,
-};
-#define YY_SZ_ACTTAB (sizeof(yy_action)/sizeof(yy_action[0]))
-
-/* The next table maps tokens into fallback tokens. If a construct
-** like the following:
-**
-** %fallback ID X Y Z.
-**
-** appears in the grammer, then ID becomes a fallback token for X, Y,
-** and Z. Whenever one of the tokens X, Y, or Z is input to the parser
-** but it does not parse, the type of the token is changed to ID and
-** the parse is retried before an error is thrown.
-*/
-#ifdef YYFALLBACK
-static const YYCODETYPE yyFallback[] = {
-};
-#endif /* YYFALLBACK */
-
-/* The following structure represents a single element of the
-** parser's stack. Information stored includes:
-**
-** + The state number for the parser at this level of the stack.
-**
-** + The value of the token stored at this level of the stack.
-** (In other words, the "major" token.)
-**
-** + The semantic value stored at this level of the stack. This is
-** the information used by the action routines in the grammar.
-** It is sometimes called the "minor" token.
-*/
-struct yyStackEntry {
- int stateno; /* The state-number */
- int major; /* The major token value. This is the code
- ** number for the token at this stack level */
- YYMINORTYPE minor; /* The user-supplied minor token value. This
- ** is the value of the token */
-};
-typedef struct yyStackEntry yyStackEntry;
-
-/* The state of the parser is completely contained in an instance of
-** the following structure */
-struct yyParser {
- int yyidx; /* Index of top element in stack */
- int yyerrcnt; /* Shifts left before out of the error */
- configparserARG_SDECL /* A place to hold %extra_argument */
- yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */
-};
-typedef struct yyParser yyParser;
-
-#ifndef NDEBUG
-#include <stdio.h>
-static FILE *yyTraceFILE = 0;
-static char *yyTracePrompt = 0;
-#endif /* NDEBUG */
-
-#ifndef NDEBUG
-/*
-** Turn parser tracing on by giving a stream to which to write the trace
-** and a prompt to preface each trace message. Tracing is turned off
-** by making either argument NULL
-**
-** Inputs:
-** <ul>
-** <li> A FILE* to which trace output should be written.
-** If NULL, then tracing is turned off.
-** <li> A prefix string written at the beginning of every
-** line of trace output. If NULL, then tracing is
-** turned off.
-** </ul>
-**
-** Outputs:
-** None.
-*/
-#if 0
-void configparserTrace(FILE *TraceFILE, char *zTracePrompt){
- yyTraceFILE = TraceFILE;
- yyTracePrompt = zTracePrompt;
- if( yyTraceFILE==0 ) yyTracePrompt = 0;
- else if( yyTracePrompt==0 ) yyTraceFILE = 0;
-}
-#endif
-#endif /* NDEBUG */
-
-#ifndef NDEBUG
-/* For tracing shifts, the names of all terminals and nonterminals
-** are required. The following table supplies these names */
-static const char *yyTokenName[] = {
- "$", "EOL", "ASSIGN", "APPEND",
- "LKEY", "PLUS", "STRING", "INTEGER",
- "LPARAN", "RPARAN", "COMMA", "ARRAY_ASSIGN",
- "GLOBAL", "LCURLY", "RCURLY", "ELSE",
- "DOLLAR", "SRVVARNAME", "LBRACKET", "RBRACKET",
- "EQ", "MATCH", "NE", "NOMATCH",
- "INCLUDE", "INCLUDE_SHELL", "error", "input",
- "metalines", "metaline", "varline", "global",
- "condlines", "include", "include_shell", "value",
- "expression", "aelement", "condline", "aelements",
- "array", "key", "stringop", "cond",
- "eols", "globalstart", "context",
-};
-#endif /* NDEBUG */
-
-#ifndef NDEBUG
-/* For tracing reduce actions, the names of all rules are required.
-*/
-static const char *yyRuleName[] = {
- /* 0 */ "input ::= metalines",
- /* 1 */ "metalines ::= metalines metaline",
- /* 2 */ "metalines ::=",
- /* 3 */ "metaline ::= varline",
- /* 4 */ "metaline ::= global",
- /* 5 */ "metaline ::= condlines EOL",
- /* 6 */ "metaline ::= include",
- /* 7 */ "metaline ::= include_shell",
- /* 8 */ "metaline ::= EOL",
- /* 9 */ "varline ::= key ASSIGN expression",
- /* 10 */ "varline ::= key APPEND expression",
- /* 11 */ "key ::= LKEY",
- /* 12 */ "expression ::= expression PLUS value",
- /* 13 */ "expression ::= value",
- /* 14 */ "value ::= key",
- /* 15 */ "value ::= STRING",
- /* 16 */ "value ::= INTEGER",
- /* 17 */ "value ::= array",
- /* 18 */ "array ::= LPARAN RPARAN",
- /* 19 */ "array ::= LPARAN aelements RPARAN",
- /* 20 */ "aelements ::= aelements COMMA aelement",
- /* 21 */ "aelements ::= aelements COMMA",
- /* 22 */ "aelements ::= aelement",
- /* 23 */ "aelement ::= expression",
- /* 24 */ "aelement ::= stringop ARRAY_ASSIGN expression",
- /* 25 */ "eols ::= EOL",
- /* 26 */ "eols ::=",
- /* 27 */ "globalstart ::= GLOBAL",
- /* 28 */ "global ::= globalstart LCURLY metalines RCURLY",
- /* 29 */ "condlines ::= condlines eols ELSE condline",
- /* 30 */ "condlines ::= condline",
- /* 31 */ "condline ::= context LCURLY metalines RCURLY",
- /* 32 */ "context ::= DOLLAR SRVVARNAME LBRACKET stringop RBRACKET cond expression",
- /* 33 */ "cond ::= EQ",
- /* 34 */ "cond ::= MATCH",
- /* 35 */ "cond ::= NE",
- /* 36 */ "cond ::= NOMATCH",
- /* 37 */ "stringop ::= expression",
- /* 38 */ "include ::= INCLUDE stringop",
- /* 39 */ "include_shell ::= INCLUDE_SHELL stringop",
-};
-#endif /* NDEBUG */
-
-/*
-** This function returns the symbolic name associated with a token
-** value.
-*/
-#if 0
-const char *configparserTokenName(int tokenType){
-#ifndef NDEBUG
- if( tokenType>0 && (size_t)tokenType<(sizeof(yyTokenName)/sizeof(yyTokenName[0])) ){
- return yyTokenName[tokenType];
- }else{
- return "Unknown";
- }
-#else
- return "";
-#endif
-}
-#endif
-
-/*
-** This function allocates a new parser.
-** The only argument is a pointer to a function which works like
-** malloc.
-**
-** Inputs:
-** A pointer to the function used to allocate memory.
-**
-** Outputs:
-** A pointer to a parser. This pointer is used in subsequent calls
-** to configparser and configparserFree.
-*/
-void *configparserAlloc(void *(*mallocProc)(size_t)){
- yyParser *pParser;
- pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) );
- if( pParser ){
- pParser->yyidx = -1;
- }
- return pParser;
-}
-
-/* The following function deletes the value associated with a
-** symbol. The symbol can be either a terminal or nonterminal.
-** "yymajor" is the symbol code, and "yypminor" is a pointer to
-** the value.
-*/
-static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){
- switch( yymajor ){
- /* Here is inserted the actions which take place when a
- ** terminal or non-terminal is destroyed. This can happen
- ** when the symbol is popped from the stack during a
- ** reduce or during error processing or when a parser is
- ** being destroyed before it is finished parsing.
- **
- ** Note: during a reduce, the only symbols destroyed are those
- ** which appear on the RHS of the rule, but which are not used
- ** inside the C code.
- */
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 20:
- case 21:
- case 22:
- case 23:
- case 24:
- case 25:
-#line 144 "./configparser.y"
-{ buffer_free((yypminor->yy0)); }
-#line 523 "configparser.c"
- break;
- case 35:
-#line 135 "./configparser.y"
-{ (yypminor->yy41)->free((yypminor->yy41)); }
-#line 528 "configparser.c"
- break;
- case 36:
-#line 136 "./configparser.y"
-{ (yypminor->yy41)->free((yypminor->yy41)); }
-#line 533 "configparser.c"
- break;
- case 37:
-#line 137 "./configparser.y"
-{ (yypminor->yy41)->free((yypminor->yy41)); }
-#line 538 "configparser.c"
- break;
- case 39:
-#line 138 "./configparser.y"
-{ array_free((yypminor->yy40)); }
-#line 543 "configparser.c"
- break;
- case 40:
-#line 139 "./configparser.y"
-{ array_free((yypminor->yy40)); }
-#line 548 "configparser.c"
- break;
- case 41:
-#line 140 "./configparser.y"
-{ buffer_free((yypminor->yy43)); }
-#line 553 "configparser.c"
- break;
- case 42:
-#line 141 "./configparser.y"
-{ buffer_free((yypminor->yy43)); }
-#line 558 "configparser.c"
- break;
- default: break; /* If no destructor action specified: do nothing */
- }
-}
-
-/*
-** Pop the parser's stack once.
-**
-** If there is a destructor routine associated with the token which
-** is popped from the stack, then call it.
-**
-** Return the major token number for the symbol popped.
-*/
-static int yy_pop_parser_stack(yyParser *pParser){
- YYCODETYPE yymajor;
- yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];
-
- if( pParser->yyidx<0 ) return 0;
-#ifndef NDEBUG
- if( yyTraceFILE && pParser->yyidx>=0 ){
- fprintf(yyTraceFILE,"%sPopping %s\n",
- yyTracePrompt,
- yyTokenName[yytos->major]);
- }
-#endif
- yymajor = yytos->major;
- yy_destructor( yymajor, &yytos->minor);
- pParser->yyidx--;
- return yymajor;
-}
-
-/*
-** Deallocate and destroy a parser. Destructors are all called for
-** all stack elements before shutting the parser down.
-**
-** Inputs:
-** <ul>
-** <li> A pointer to the parser. This should be a pointer
-** obtained from configparserAlloc.
-** <li> A pointer to a function used to reclaim memory obtained
-** from malloc.
-** </ul>
-*/
-void configparserFree(
- void *p, /* The parser to be deleted */
- void (*freeProc)(void*) /* Function used to reclaim memory */
-){
- yyParser *pParser = (yyParser*)p;
- if( pParser==0 ) return;
- while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);
- (*freeProc)((void*)pParser);
-}
-
-/*
-** Find the appropriate action for a parser given the terminal
-** look-ahead token iLookAhead.
-**
-** If the look-ahead token is YYNOCODE, then check to see if the action is
-** independent of the look-ahead. If it is, return the action, otherwise
-** return YY_NO_ACTION.
-*/
-static int yy_find_shift_action(
- yyParser *pParser, /* The parser */
- int iLookAhead /* The look-ahead token */
-){
- int i;
- int stateno = pParser->yystack[pParser->yyidx].stateno;
-
- /* if( pParser->yyidx<0 ) return YY_NO_ACTION; */
- i = yy_shift_ofst[stateno];
- if( i==YY_SHIFT_USE_DFLT ){
- return yy_default[stateno];
- }
- if( iLookAhead==YYNOCODE ){
- return YY_NO_ACTION;
- }
- i += iLookAhead;
- if( i<0 || (size_t)i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
-#ifdef YYFALLBACK
- int iFallback; /* Fallback token */
- if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
- && (iFallback = yyFallback[iLookAhead])!=0 ){
-#ifndef NDEBUG
- if( yyTraceFILE ){
- fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
- yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
- }
-#endif
- return yy_find_shift_action(pParser, iFallback);
- }
-#endif
- return yy_default[stateno];
- }else{
- return yy_action[i];
- }
-}
-
-/*
-** Find the appropriate action for a parser given the non-terminal
-** look-ahead token iLookAhead.
-**
-** If the look-ahead token is YYNOCODE, then check to see if the action is
-** independent of the look-ahead. If it is, return the action, otherwise
-** return YY_NO_ACTION.
-*/
-static int yy_find_reduce_action(
- yyParser *pParser, /* The parser */
- int iLookAhead /* The look-ahead token */
-){
- int i;
- int stateno = pParser->yystack[pParser->yyidx].stateno;
-
- i = yy_reduce_ofst[stateno];
- if( i==YY_REDUCE_USE_DFLT ){
- return yy_default[stateno];
- }
- if( iLookAhead==YYNOCODE ){
- return YY_NO_ACTION;
- }
- i += iLookAhead;
- if( i<0 || (size_t)i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
- return yy_default[stateno];
- }else{
- return yy_action[i];
- }
-}
-
-/*
-** Perform a shift action.
-*/
-static void yy_shift(
- yyParser *yypParser, /* The parser to be shifted */
- int yyNewState, /* The new state to shift in */
- int yyMajor, /* The major token to shift in */
- YYMINORTYPE *yypMinor /* Pointer ot the minor token to shift in */
-){
- yyStackEntry *yytos;
- yypParser->yyidx++;
- if( yypParser->yyidx>=YYSTACKDEPTH ){
- configparserARG_FETCH;
- yypParser->yyidx--;
-#ifndef NDEBUG
- if( yyTraceFILE ){
- fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
- }
-#endif
- while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
- /* Here code is inserted which will execute if the parser
- ** stack every overflows */
- configparserARG_STORE; /* Suppress warning about unused %extra_argument var */
- return;
- }
- yytos = &yypParser->yystack[yypParser->yyidx];
- yytos->stateno = yyNewState;
- yytos->major = yyMajor;
- yytos->minor = *yypMinor;
-#ifndef NDEBUG
- if( yyTraceFILE && yypParser->yyidx>0 ){
- int i;
- fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState);
- fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);
- for(i=1; i<=yypParser->yyidx; i++)
- fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);
- fprintf(yyTraceFILE,"\n");
- }
-#endif
-}
-
-/* The following table contains information about every rule that
-** is used during the reduce.
-*/
-static struct {
- YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */
- unsigned char nrhs; /* Number of right-hand side symbols in the rule */
-} yyRuleInfo[] = {
- { 27, 1 },
- { 28, 2 },
- { 28, 0 },
- { 29, 1 },
- { 29, 1 },
- { 29, 2 },
- { 29, 1 },
- { 29, 1 },
- { 29, 1 },
- { 30, 3 },
- { 30, 3 },
- { 41, 1 },
- { 36, 3 },
- { 36, 1 },
- { 35, 1 },
- { 35, 1 },
- { 35, 1 },
- { 35, 1 },
- { 40, 2 },
- { 40, 3 },
- { 39, 3 },
- { 39, 2 },
- { 39, 1 },
- { 37, 1 },
- { 37, 3 },
- { 44, 1 },
- { 44, 0 },
- { 45, 1 },
- { 31, 4 },
- { 32, 4 },
- { 32, 1 },
- { 38, 4 },
- { 46, 7 },
- { 43, 1 },
- { 43, 1 },
- { 43, 1 },
- { 43, 1 },
- { 42, 1 },
- { 33, 2 },
- { 34, 2 },
-};
-
-static void yy_accept(yyParser*); /* Forward Declaration */
-
-/*
-** Perform a reduce action and the shift that must immediately
-** follow the reduce.
-*/
-static void yy_reduce(
- yyParser *yypParser, /* The parser */
- int yyruleno /* Number of the rule by which to reduce */
-){
- int yygoto; /* The next state */
- int yyact; /* The next action */
- YYMINORTYPE yygotominor; /* The LHS of the rule reduced */
- yyStackEntry *yymsp; /* The top of the parser's stack */
- int yysize; /* Amount to pop the stack */
- configparserARG_FETCH;
- yymsp = &yypParser->yystack[yypParser->yyidx];
-#ifndef NDEBUG
- if( yyTraceFILE && yyruleno>=0
- && (size_t)yyruleno<sizeof(yyRuleName)/sizeof(yyRuleName[0]) ){
- fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
- yyRuleName[yyruleno]);
- }
-#endif /* NDEBUG */
-
- switch( yyruleno ){
- /* Beginning here are the reduction cases. A typical example
- ** follows:
- ** case 0:
- ** #line <lineno> <grammarfile>
- ** { ... } // User supplied code
- ** #line <lineno> <thisfile>
- ** break;
- */
- case 0:
- /* No destructor defined for metalines */
- break;
- case 1:
- /* No destructor defined for metalines */
- /* No destructor defined for metaline */
- break;
- case 2:
- break;
- case 3:
- /* No destructor defined for varline */
- break;
- case 4:
- /* No destructor defined for global */
- break;
- case 5:
-#line 117 "./configparser.y"
-{ yymsp[-1].minor.yy78 = NULL; }
-#line 828 "configparser.c"
- yy_destructor(1,&yymsp[0].minor);
- break;
- case 6:
- /* No destructor defined for include */
- break;
- case 7:
- /* No destructor defined for include_shell */
- break;
- case 8:
- yy_destructor(1,&yymsp[0].minor);
- break;
- case 9:
-#line 146 "./configparser.y"
-{
- if (ctx->ok) {
- buffer_copy_string_buffer(yymsp[0].minor.yy41->key, yymsp[-2].minor.yy43);
- if (strncmp(yymsp[-2].minor.yy43->ptr, "env.", sizeof("env.") - 1) == 0) {
- fprintf(stderr, "Setting env variable is not supported in conditional %d %s: %s\n",
- ctx->current->context_ndx,
- ctx->current->key->ptr, yymsp[-2].minor.yy43->ptr);
- ctx->ok = 0;
- } else if (NULL == array_get_element(ctx->current->value, yymsp[0].minor.yy41->key->ptr)) {
- array_insert_unique(ctx->current->value, yymsp[0].minor.yy41);
- yymsp[0].minor.yy41 = NULL;
- } else {
- fprintf(stderr, "Duplicate config variable in conditional %d %s: %s\n",
- ctx->current->context_ndx,
- ctx->current->key->ptr, yymsp[0].minor.yy41->key->ptr);
- ctx->ok = 0;
- yymsp[0].minor.yy41->free(yymsp[0].minor.yy41);
- yymsp[0].minor.yy41 = NULL;
- }
- }
- buffer_free(yymsp[-2].minor.yy43);
- yymsp[-2].minor.yy43 = NULL;
-}
-#line 865 "configparser.c"
- yy_destructor(2,&yymsp[-1].minor);
- break;
- case 10:
-#line 170 "./configparser.y"
-{
- array *vars = ctx->current->value;
- data_unset *du;
-
- if (strncmp(yymsp[-2].minor.yy43->ptr, "env.", sizeof("env.") - 1) == 0) {
- fprintf(stderr, "Appending env variable is not supported in conditional %d %s: %s\n",
- ctx->current->context_ndx,
- ctx->current->key->ptr, yymsp[-2].minor.yy43->ptr);
- ctx->ok = 0;
- } else if (NULL != (du = array_get_element(vars, yymsp[-2].minor.yy43->ptr))) {
- /* exists in current block */
- du = configparser_merge_data(du, yymsp[0].minor.yy41);
- if (NULL == du) {
- ctx->ok = 0;
- }
- else {
- buffer_copy_string_buffer(du->key, yymsp[-2].minor.yy43);
- array_replace(vars, du);
- }
- yymsp[0].minor.yy41->free(yymsp[0].minor.yy41);
- } else if (NULL != (du = configparser_get_variable(ctx, yymsp[-2].minor.yy43))) {
- du = configparser_merge_data(du, yymsp[0].minor.yy41);
- if (NULL == du) {
- ctx->ok = 0;
- }
- else {
- buffer_copy_string_buffer(du->key, yymsp[-2].minor.yy43);
- array_insert_unique(ctx->current->value, du);
- }
- yymsp[0].minor.yy41->free(yymsp[0].minor.yy41);
- } else {
- buffer_copy_string_buffer(yymsp[0].minor.yy41->key, yymsp[-2].minor.yy43);
- array_insert_unique(ctx->current->value, yymsp[0].minor.yy41);
- }
- buffer_free(yymsp[-2].minor.yy43);
- yymsp[-2].minor.yy43 = NULL;
- yymsp[0].minor.yy41 = NULL;
-}
-#line 908 "configparser.c"
- yy_destructor(3,&yymsp[-1].minor);
- break;
- case 11:
-#line 209 "./configparser.y"
-{
- if (strchr(yymsp[0].minor.yy0->ptr, '.') == NULL) {
- yygotominor.yy43 = buffer_init_string("var.");
- buffer_append_string_buffer(yygotominor.yy43, yymsp[0].minor.yy0);
- buffer_free(yymsp[0].minor.yy0);
- yymsp[0].minor.yy0 = NULL;
- } else {
- yygotominor.yy43 = yymsp[0].minor.yy0;
- yymsp[0].minor.yy0 = NULL;
- }
-}
-#line 924 "configparser.c"
- break;
- case 12:
-#line 221 "./configparser.y"
-{
- yygotominor.yy41 = configparser_merge_data(yymsp[-2].minor.yy41, yymsp[0].minor.yy41);
- if (NULL == yygotominor.yy41) {
- ctx->ok = 0;
- }
- yymsp[-2].minor.yy41 = NULL;
- yymsp[0].minor.yy41->free(yymsp[0].minor.yy41);
- yymsp[0].minor.yy41 = NULL;
-}
-#line 937 "configparser.c"
- yy_destructor(5,&yymsp[-1].minor);
- break;
- case 13:
-#line 231 "./configparser.y"
-{
- yygotominor.yy41 = yymsp[0].minor.yy41;
- yymsp[0].minor.yy41 = NULL;
-}
-#line 946 "configparser.c"
- break;
- case 14:
-#line 236 "./configparser.y"
-{
- yygotominor.yy41 = NULL;
- if (strncmp(yymsp[0].minor.yy43->ptr, "env.", sizeof("env.") - 1) == 0) {
- char *env;
-
- if (NULL != (env = getenv(yymsp[0].minor.yy43->ptr + 4))) {
- data_string *ds;
- ds = data_string_init();
- buffer_append_string(ds->value, env);
- yygotominor.yy41 = (data_unset *)ds;
- }
- else {
- fprintf(stderr, "Undefined env variable: %s\n", yymsp[0].minor.yy43->ptr + 4);
- ctx->ok = 0;
- }
- } else if (NULL == (yygotominor.yy41 = configparser_get_variable(ctx, yymsp[0].minor.yy43))) {
- fprintf(stderr, "Undefined config variable: %s\n", yymsp[0].minor.yy43->ptr);
- ctx->ok = 0;
- }
- if (!yygotominor.yy41) {
- /* make a dummy so it won't crash */
- yygotominor.yy41 = (data_unset *)data_string_init();
- }
- buffer_free(yymsp[0].minor.yy43);
- yymsp[0].minor.yy43 = NULL;
-}
-#line 976 "configparser.c"
- break;
- case 15:
-#line 263 "./configparser.y"
-{
- yygotominor.yy41 = (data_unset *)data_string_init();
- buffer_copy_string_buffer(((data_string *)(yygotominor.yy41))->value, yymsp[0].minor.yy0);
- buffer_free(yymsp[0].minor.yy0);
- yymsp[0].minor.yy0 = NULL;
-}
-#line 986 "configparser.c"
- break;
- case 16:
-#line 270 "./configparser.y"
-{
- yygotominor.yy41 = (data_unset *)data_integer_init();
- ((data_integer *)(yygotominor.yy41))->value = strtol(yymsp[0].minor.yy0->ptr, NULL, 10);
- buffer_free(yymsp[0].minor.yy0);
- yymsp[0].minor.yy0 = NULL;
-}
-#line 996 "configparser.c"
- break;
- case 17:
-#line 276 "./configparser.y"
-{
- yygotominor.yy41 = (data_unset *)data_array_init();
- array_free(((data_array *)(yygotominor.yy41))->value);
- ((data_array *)(yygotominor.yy41))->value = yymsp[0].minor.yy40;
- yymsp[0].minor.yy40 = NULL;
-}
-#line 1006 "configparser.c"
- break;
- case 18:
-#line 282 "./configparser.y"
-{
- yygotominor.yy40 = array_init();
-}
-#line 1013 "configparser.c"
- yy_destructor(8,&yymsp[-1].minor);
- yy_destructor(9,&yymsp[0].minor);
- break;
- case 19:
-#line 285 "./configparser.y"
-{
- yygotominor.yy40 = yymsp[-1].minor.yy40;
- yymsp[-1].minor.yy40 = NULL;
-}
-#line 1023 "configparser.c"
- yy_destructor(8,&yymsp[-2].minor);
- yy_destructor(9,&yymsp[0].minor);
- break;
- case 20:
-#line 290 "./configparser.y"
-{
- if (buffer_is_empty(yymsp[0].minor.yy41->key) ||
- NULL == array_get_element(yymsp[-2].minor.yy40, yymsp[0].minor.yy41->key->ptr)) {
- array_insert_unique(yymsp[-2].minor.yy40, yymsp[0].minor.yy41);
- yymsp[0].minor.yy41 = NULL;
- } else {
- fprintf(stderr, "Duplicate array-key: %s\n",
- yymsp[0].minor.yy41->key->ptr);
- ctx->ok = 0;
- yymsp[0].minor.yy41->free(yymsp[0].minor.yy41);
- yymsp[0].minor.yy41 = NULL;
- }
-
- yygotominor.yy40 = yymsp[-2].minor.yy40;
- yymsp[-2].minor.yy40 = NULL;
-}
-#line 1045 "configparser.c"
- yy_destructor(10,&yymsp[-1].minor);
- break;
- case 21:
-#line 307 "./configparser.y"
-{
- yygotominor.yy40 = yymsp[-1].minor.yy40;
- yymsp[-1].minor.yy40 = NULL;
-}
-#line 1054 "configparser.c"
- yy_destructor(10,&yymsp[0].minor);
- break;
- case 22:
-#line 312 "./configparser.y"
-{
- yygotominor.yy40 = array_init();
- array_insert_unique(yygotominor.yy40, yymsp[0].minor.yy41);
- yymsp[0].minor.yy41 = NULL;
-}
-#line 1064 "configparser.c"
- break;
- case 23:
-#line 318 "./configparser.y"
-{
- yygotominor.yy41 = yymsp[0].minor.yy41;
- yymsp[0].minor.yy41 = NULL;
-}
-#line 1072 "configparser.c"
- break;
- case 24:
-#line 322 "./configparser.y"
-{
- buffer_copy_string_buffer(yymsp[0].minor.yy41->key, yymsp[-2].minor.yy43);
- buffer_free(yymsp[-2].minor.yy43);
- yymsp[-2].minor.yy43 = NULL;
-
- yygotominor.yy41 = yymsp[0].minor.yy41;
- yymsp[0].minor.yy41 = NULL;
-}
-#line 1084 "configparser.c"
- yy_destructor(11,&yymsp[-1].minor);
- break;
- case 25:
- yy_destructor(1,&yymsp[0].minor);
- break;
- case 26:
- break;
- case 27:
-#line 334 "./configparser.y"
-{
- data_config *dc;
- dc = (data_config *)array_get_element(ctx->srv->config_context, "global");
- assert(dc);
- configparser_push(ctx, dc, 0);
-}
-#line 1100 "configparser.c"
- yy_destructor(12,&yymsp[0].minor);
- break;
- case 28:
-#line 341 "./configparser.y"
-{
- data_config *cur;
-
- cur = ctx->current;
- configparser_pop(ctx);
-
- assert(cur && ctx->current);
-
- yygotominor.yy78 = cur;
-}
-#line 1115 "configparser.c"
- /* No destructor defined for globalstart */
- yy_destructor(13,&yymsp[-2].minor);
- /* No destructor defined for metalines */
- yy_destructor(14,&yymsp[0].minor);
- break;
- case 29:
-#line 352 "./configparser.y"
-{
- if (yymsp[-3].minor.yy78->context_ndx >= yymsp[0].minor.yy78->context_ndx) {
- fprintf(stderr, "unreachable else condition\n");
- ctx->ok = 0;
- }
- yymsp[0].minor.yy78->prev = yymsp[-3].minor.yy78;
- yymsp[-3].minor.yy78->next = yymsp[0].minor.yy78;
- yygotominor.yy78 = yymsp[0].minor.yy78;
- yymsp[-3].minor.yy78 = NULL;
- yymsp[0].minor.yy78 = NULL;
-}
-#line 1134 "configparser.c"
- /* No destructor defined for eols */
- yy_destructor(15,&yymsp[-1].minor);
- break;
- case 30:
-#line 364 "./configparser.y"
-{
- yygotominor.yy78 = yymsp[0].minor.yy78;
- yymsp[0].minor.yy78 = NULL;
-}
-#line 1144 "configparser.c"
- break;
- case 31:
-#line 369 "./configparser.y"
-{
- data_config *cur;
-
- cur = ctx->current;
- configparser_pop(ctx);
-
- assert(cur && ctx->current);
-
- yygotominor.yy78 = cur;
-}
-#line 1158 "configparser.c"
- /* No destructor defined for context */
- yy_destructor(13,&yymsp[-2].minor);
- /* No destructor defined for metalines */
- yy_destructor(14,&yymsp[0].minor);
- break;
- case 32:
-#line 380 "./configparser.y"
-{
- data_config *dc;
- buffer *b, *rvalue, *op;
-
- if (ctx->ok && yymsp[0].minor.yy41->type != TYPE_STRING) {
- fprintf(stderr, "rvalue must be string");
- ctx->ok = 0;
- }
-
- switch(yymsp[-1].minor.yy27) {
- case CONFIG_COND_NE:
- op = buffer_init_string("!=");
- break;
- case CONFIG_COND_EQ:
- op = buffer_init_string("==");
- break;
- case CONFIG_COND_NOMATCH:
- op = buffer_init_string("!~");
- break;
- case CONFIG_COND_MATCH:
- op = buffer_init_string("=~");
- break;
- default:
- assert(0);
- return;
- }
-
- b = buffer_init();
- buffer_copy_string_buffer(b, ctx->current->key);
- buffer_append_string(b, "/");
- buffer_append_string_buffer(b, yymsp[-5].minor.yy0);
- buffer_append_string_buffer(b, yymsp[-3].minor.yy43);
- buffer_append_string_buffer(b, op);
- rvalue = ((data_string*)yymsp[0].minor.yy41)->value;
- buffer_append_string_buffer(b, rvalue);
-
- if (NULL != (dc = (data_config *)array_get_element(ctx->all_configs, b->ptr))) {
- configparser_push(ctx, dc, 0);
- } else {
- struct {
- comp_key_t comp;
- char *comp_key;
- size_t len;
- } comps[] = {
- { COMP_SERVER_SOCKET, CONST_STR_LEN("SERVER[\"socket\"]" ) },
- { COMP_HTTP_URL, CONST_STR_LEN("HTTP[\"url\"]" ) },
- { COMP_HTTP_HOST, CONST_STR_LEN("HTTP[\"host\"]" ) },
- { COMP_HTTP_REFERER, CONST_STR_LEN("HTTP[\"referer\"]" ) },
- { COMP_HTTP_USER_AGENT, CONST_STR_LEN("HTTP[\"useragent\"]" ) },
- { COMP_HTTP_USER_AGENT, CONST_STR_LEN("HTTP[\"user-agent\"]" ) },
- { COMP_HTTP_LANGUAGE, CONST_STR_LEN("HTTP[\"language\"]" ) },
- { COMP_HTTP_COOKIE, CONST_STR_LEN("HTTP[\"cookie\"]" ) },
- { COMP_HTTP_REMOTE_IP, CONST_STR_LEN("HTTP[\"remoteip\"]" ) },
- { COMP_HTTP_REMOTE_IP, CONST_STR_LEN("HTTP[\"remote-ip\"]" ) },
- { COMP_HTTP_QUERY_STRING, CONST_STR_LEN("HTTP[\"querystring\"]") },
- { COMP_HTTP_QUERY_STRING, CONST_STR_LEN("HTTP[\"query-string\"]") },
- { COMP_HTTP_REQUEST_METHOD, CONST_STR_LEN("HTTP[\"request-method\"]") },
- { COMP_HTTP_SCHEME, CONST_STR_LEN("HTTP[\"scheme\"]" ) },
- { COMP_UNSET, NULL, 0 },
- };
- size_t i;
-
- dc = data_config_init();
-
- buffer_copy_string_buffer(dc->key, b);
- buffer_copy_string_buffer(dc->op, op);
- buffer_copy_string_buffer(dc->comp_key, yymsp[-5].minor.yy0);
- buffer_append_string_len(dc->comp_key, CONST_STR_LEN("[\""));
- buffer_append_string_buffer(dc->comp_key, yymsp[-3].minor.yy43);
- buffer_append_string_len(dc->comp_key, CONST_STR_LEN("\"]"));
- dc->cond = yymsp[-1].minor.yy27;
-
- for (i = 0; comps[i].comp_key; i ++) {
- if (buffer_is_equal_string(
- dc->comp_key, comps[i].comp_key, comps[i].len)) {
- dc->comp = comps[i].comp;
- break;
- }
- }
- if (COMP_UNSET == dc->comp) {
- fprintf(stderr, "error comp_key %s", dc->comp_key->ptr);
- ctx->ok = 0;
- }
-
- switch(yymsp[-1].minor.yy27) {
- case CONFIG_COND_NE:
- case CONFIG_COND_EQ:
- dc->string = buffer_init_buffer(rvalue);
- break;
- case CONFIG_COND_NOMATCH:
- case CONFIG_COND_MATCH: {
-#ifdef HAVE_PCRE_H
- const char *errptr;
- int erroff, captures;
-
- if (NULL == (dc->regex =
- pcre_compile(rvalue->ptr, 0, &errptr, &erroff, NULL))) {
- dc->string = buffer_init_string(errptr);
- dc->cond = CONFIG_COND_UNSET;
-
- fprintf(stderr, "parsing regex failed: %s -> %s at offset %d\n",
- rvalue->ptr, errptr, erroff);
-
- ctx->ok = 0;
- } else if (NULL == (dc->regex_study =
- pcre_study(dc->regex, 0, &errptr)) &&
- errptr != NULL) {
- fprintf(stderr, "studying regex failed: %s -> %s\n",
- rvalue->ptr, errptr);
- ctx->ok = 0;
- } else if (0 != (pcre_fullinfo(dc->regex, dc->regex_study, PCRE_INFO_CAPTURECOUNT, &captures))) {
- fprintf(stderr, "getting capture count for regex failed: %s\n",
- rvalue->ptr);
- ctx->ok = 0;
- } else if (captures > 9) {
- fprintf(stderr, "Too many captures in regex, use (?:...) instead of (...): %s\n",
- rvalue->ptr);
- ctx->ok = 0;
- } else {
- dc->string = buffer_init_buffer(rvalue);
- }
-#else
- fprintf(stderr, "can't handle '$%s[%s] =~ ...' as you compiled without pcre support. \n"
- "(perhaps just a missing pcre-devel package ?) \n",
- yymsp[-5].minor.yy0->ptr, yymsp[-3].minor.yy43->ptr);
- ctx->ok = 0;
-#endif
- break;
- }
-
- default:
- fprintf(stderr, "unknown condition for $%s[%s]\n",
- yymsp[-5].minor.yy0->ptr, yymsp[-3].minor.yy43->ptr);
- ctx->ok = 0;
- break;
- }
-
- configparser_push(ctx, dc, 1);
- }
-
- buffer_free(b);
- buffer_free(op);
- buffer_free(yymsp[-5].minor.yy0);
- yymsp[-5].minor.yy0 = NULL;
- buffer_free(yymsp[-3].minor.yy43);
- yymsp[-3].minor.yy43 = NULL;
- yymsp[0].minor.yy41->free(yymsp[0].minor.yy41);
- yymsp[0].minor.yy41 = NULL;
-}
-#line 1315 "configparser.c"
- yy_destructor(16,&yymsp[-6].minor);
- yy_destructor(18,&yymsp[-4].minor);
- yy_destructor(19,&yymsp[-2].minor);
- break;
- case 33:
-#line 529 "./configparser.y"
-{
- yygotominor.yy27 = CONFIG_COND_EQ;
-}
-#line 1325 "configparser.c"
- yy_destructor(20,&yymsp[0].minor);
- break;
- case 34:
-#line 532 "./configparser.y"
-{
- yygotominor.yy27 = CONFIG_COND_MATCH;
-}
-#line 1333 "configparser.c"
- yy_destructor(21,&yymsp[0].minor);
- break;
- case 35:
-#line 535 "./configparser.y"
-{
- yygotominor.yy27 = CONFIG_COND_NE;
-}
-#line 1341 "configparser.c"
- yy_destructor(22,&yymsp[0].minor);
- break;
- case 36:
-#line 538 "./configparser.y"
-{
- yygotominor.yy27 = CONFIG_COND_NOMATCH;
-}
-#line 1349 "configparser.c"
- yy_destructor(23,&yymsp[0].minor);
- break;
- case 37:
-#line 542 "./configparser.y"
-{
- yygotominor.yy43 = NULL;
- if (ctx->ok) {
- if (yymsp[0].minor.yy41->type == TYPE_STRING) {
- yygotominor.yy43 = buffer_init_buffer(((data_string*)yymsp[0].minor.yy41)->value);
- } else if (yymsp[0].minor.yy41->type == TYPE_INTEGER) {
- yygotominor.yy43 = buffer_init();
- buffer_copy_long(yygotominor.yy43, ((data_integer *)yymsp[0].minor.yy41)->value);
- } else {
- fprintf(stderr, "operand must be string");
- ctx->ok = 0;
- }
- }
- yymsp[0].minor.yy41->free(yymsp[0].minor.yy41);
- yymsp[0].minor.yy41 = NULL;
-}
-#line 1370 "configparser.c"
- break;
- case 38:
-#line 559 "./configparser.y"
-{
- if (ctx->ok) {
- if (0 != config_parse_file(ctx->srv, ctx, yymsp[0].minor.yy43->ptr)) {
- ctx->ok = 0;
- }
- buffer_free(yymsp[0].minor.yy43);
- yymsp[0].minor.yy43 = NULL;
- }
-}
-#line 1383 "configparser.c"
- yy_destructor(24,&yymsp[-1].minor);
- break;
- case 39:
-#line 569 "./configparser.y"
-{
- if (ctx->ok) {
- if (0 != config_parse_cmd(ctx->srv, ctx, yymsp[0].minor.yy43->ptr)) {
- ctx->ok = 0;
- }
- buffer_free(yymsp[0].minor.yy43);
- yymsp[0].minor.yy43 = NULL;
- }
-}
-#line 1397 "configparser.c"
- yy_destructor(25,&yymsp[-1].minor);
- break;
- };
- yygoto = yyRuleInfo[yyruleno].lhs;
- yysize = yyRuleInfo[yyruleno].nrhs;
- yypParser->yyidx -= yysize;
- yyact = yy_find_reduce_action(yypParser,yygoto);
- if( yyact < YYNSTATE ){
- yy_shift(yypParser,yyact,yygoto,&yygotominor);
- }else if( yyact == YYNSTATE + YYNRULE + 1 ){
- yy_accept(yypParser);
- }
-}
-
-/*
-** The following code executes when the parse fails
-*/
-static void yy_parse_failed(
- yyParser *yypParser /* The parser */
-){
- configparserARG_FETCH;
-#ifndef NDEBUG
- if( yyTraceFILE ){
- fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
- }
-#endif
- while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
- /* Here code is inserted which will be executed whenever the
- ** parser fails */
-#line 108 "./configparser.y"
-
- ctx->ok = 0;
-
-#line 1431 "configparser.c"
- configparserARG_STORE; /* Suppress warning about unused %extra_argument variable */
-}
-
-/*
-** The following code executes when a syntax error first occurs.
-*/
-static void yy_syntax_error(
- yyParser *yypParser, /* The parser */
- int yymajor, /* The major type of the error token */
- YYMINORTYPE yyminor /* The minor type of the error token */
-){
- configparserARG_FETCH;
- UNUSED(yymajor);
- UNUSED(yyminor);
-#define TOKEN (yyminor.yy0)
- configparserARG_STORE; /* Suppress warning about unused %extra_argument variable */
-}
-
-/*
-** The following is executed when the parser accepts
-*/
-static void yy_accept(
- yyParser *yypParser /* The parser */
-){
- configparserARG_FETCH;
-#ifndef NDEBUG
- if( yyTraceFILE ){
- fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
- }
-#endif
- while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
- /* Here code is inserted which will be executed whenever the
- ** parser accepts */
- configparserARG_STORE; /* Suppress warning about unused %extra_argument variable */
-}
-
-/* The main parser program.
-** The first argument is a pointer to a structure obtained from
-** "configparserAlloc" which describes the current state of the parser.
-** The second argument is the major token number. The third is
-** the minor token. The fourth optional argument is whatever the
-** user wants (and specified in the grammar) and is available for
-** use by the action routines.
-**
-** Inputs:
-** <ul>
-** <li> A pointer to the parser (an opaque structure.)
-** <li> The major token number.
-** <li> The minor token number.
-** <li> An option argument of a grammar-specified type.
-** </ul>
-**
-** Outputs:
-** None.
-*/
-void configparser(
- void *yyp, /* The parser */
- int yymajor, /* The major token code number */
- configparserTOKENTYPE yyminor /* The value for the token */
- configparserARG_PDECL /* Optional %extra_argument parameter */
-){
- YYMINORTYPE yyminorunion;
- int yyact; /* The parser action. */
- int yyendofinput; /* True if we are at the end of input */
- int yyerrorhit = 0; /* True if yymajor has invoked an error */
- yyParser *yypParser; /* The parser */
-
- /* (re)initialize the parser, if necessary */
- yypParser = (yyParser*)yyp;
- if( yypParser->yyidx<0 ){
- if( yymajor==0 ) return;
- yypParser->yyidx = 0;
- yypParser->yyerrcnt = -1;
- yypParser->yystack[0].stateno = 0;
- yypParser->yystack[0].major = 0;
- }
- yyminorunion.yy0 = yyminor;
- yyendofinput = (yymajor==0);
- configparserARG_STORE;
-
-#ifndef NDEBUG
- if( yyTraceFILE ){
- fprintf(yyTraceFILE,"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);
- }
-#endif
-
- do{
- yyact = yy_find_shift_action(yypParser,yymajor);
- if( yyact<YYNSTATE ){
- yy_shift(yypParser,yyact,yymajor,&yyminorunion);
- yypParser->yyerrcnt--;
- if( yyendofinput && yypParser->yyidx>=0 ){
- yymajor = 0;
- }else{
- yymajor = YYNOCODE;
- }
- }else if( yyact < YYNSTATE + YYNRULE ){
- yy_reduce(yypParser,yyact-YYNSTATE);
- }else if( yyact == YY_ERROR_ACTION ){
- int yymx;
-#ifndef NDEBUG
- if( yyTraceFILE ){
- fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
- }
-#endif
-#ifdef YYERRORSYMBOL
- /* A syntax error has occurred.
- ** The response to an error depends upon whether or not the
- ** grammar defines an error token "ERROR".
- **
- ** This is what we do if the grammar does define ERROR:
- **
- ** * Call the %syntax_error function.
- **
- ** * Begin popping the stack until we enter a state where
- ** it is legal to shift the error symbol, then shift
- ** the error symbol.
- **
- ** * Set the error count to three.
- **
- ** * Begin accepting and shifting new tokens. No new error
- ** processing will occur until three tokens have been
- ** shifted successfully.
- **
- */
- if( yypParser->yyerrcnt<0 ){
- yy_syntax_error(yypParser,yymajor,yyminorunion);
- }
- yymx = yypParser->yystack[yypParser->yyidx].major;
- if( yymx==YYERRORSYMBOL || yyerrorhit ){
-#ifndef NDEBUG
- if( yyTraceFILE ){
- fprintf(yyTraceFILE,"%sDiscard input token %s\n",
- yyTracePrompt,yyTokenName[yymajor]);
- }
-#endif
- yy_destructor(yymajor,&yyminorunion);
- yymajor = YYNOCODE;
- }else{
- while(
- yypParser->yyidx >= 0 &&
- yymx != YYERRORSYMBOL &&
- (yyact = yy_find_shift_action(yypParser,YYERRORSYMBOL)) >= YYNSTATE
- ){
- yy_pop_parser_stack(yypParser);
- }
- if( yypParser->yyidx < 0 || yymajor==0 ){
- yy_destructor(yymajor,&yyminorunion);
- yy_parse_failed(yypParser);
- yymajor = YYNOCODE;
- }else if( yymx!=YYERRORSYMBOL ){
- YYMINORTYPE u2;
- u2.YYERRSYMDT = 0;
- yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);
- }
- }
- yypParser->yyerrcnt = 3;
- yyerrorhit = 1;
-#else /* YYERRORSYMBOL is not defined */
- /* This is what we do if the grammar does not define ERROR:
- **
- ** * Report an error message, and throw away the input token.
- **
- ** * If the input token is $, then fail the parse.
- **
- ** As before, subsequent error messages are suppressed until
- ** three input tokens have been successfully shifted.
- */
- if( yypParser->yyerrcnt<=0 ){
- yy_syntax_error(yypParser,yymajor,yyminorunion);
- }
- yypParser->yyerrcnt = 3;
- yy_destructor(yymajor,&yyminorunion);
- if( yyendofinput ){
- yy_parse_failed(yypParser);
- }
- yymajor = YYNOCODE;
-#endif
- }else{
- yy_accept(yypParser);
- yymajor = YYNOCODE;
- }
- }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
- return;
-}
Copied: lighttpd/tags/1.4.28-4/src/configparser.c (from rev 535, lighttpd/trunk/src/configparser.c)
===================================================================
--- lighttpd/tags/1.4.28-4/src/configparser.c (rev 0)
+++ lighttpd/tags/1.4.28-4/src/configparser.c 2011-04-26 13:04:52 UTC (rev 536)
@@ -0,0 +1,1616 @@
+/* Driver template for the LEMON parser generator.
+** The author disclaims copyright to this source code.
+*/
+/* First off, code is include which follows the "include" declaration
+** in the input file. */
+#include <stdio.h>
+#line 5 "./configparser.y"
+
+#include "configfile.h"
+#include "buffer.h"
+#include "array.h"
+
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+
+static void configparser_push(config_t *ctx, data_config *dc, int isnew) {
+ if (isnew) {
+ dc->context_ndx = ctx->all_configs->used;
+ assert(dc->context_ndx > ctx->current->context_ndx);
+ array_insert_unique(ctx->all_configs, (data_unset *)dc);
+ dc->parent = ctx->current;
+ array_insert_unique(dc->parent->childs, (data_unset *)dc);
+ }
+ if (ctx->configs_stack->used > 0 && ctx->current->context_ndx == 0) {
+ fprintf(stderr, "Cannot use conditionals inside a global { ... } block\n");
+ exit(-1);
+ }
+ array_insert_unique(ctx->configs_stack, (data_unset *)ctx->current);
+ ctx->current = dc;
+}
+
+static data_config *configparser_pop(config_t *ctx) {
+ data_config *old = ctx->current;
+ ctx->current = (data_config *) array_pop(ctx->configs_stack);
+ return old;
+}
+
+/* return a copied variable */
+static data_unset *configparser_get_variable(config_t *ctx, const buffer *key) {
+ data_unset *du;
+ data_config *dc;
+
+#if 0
+ fprintf(stderr, "get var %s\n", key->ptr);
+#endif
+ for (dc = ctx->current; dc; dc = dc->parent) {
+#if 0
+ fprintf(stderr, "get var on block: %s\n", dc->key->ptr);
+ array_print(dc->value, 0);
+#endif
+ if (NULL != (du = array_get_element(dc->value, key->ptr))) {
+ return du->copy(du);
+ }
+ }
+ return NULL;
+}
+
+/* op1 is to be eat/return by this function if success, op1->key is not cared
+ op2 is left untouch, unreferenced
+ */
+data_unset *configparser_merge_data(data_unset *op1, const data_unset *op2) {
+ /* type mismatch */
+ if (op1->type != op2->type) {
+ if (op1->type == TYPE_STRING && op2->type == TYPE_INTEGER) {
+ data_string *ds = (data_string *)op1;
+ buffer_append_long(ds->value, ((data_integer*)op2)->value);
+ return op1;
+ } else if (op1->type == TYPE_INTEGER && op2->type == TYPE_STRING) {
+ data_string *ds = data_string_init();
+ buffer_append_long(ds->value, ((data_integer*)op1)->value);
+ buffer_append_string_buffer(ds->value, ((data_string*)op2)->value);
+ op1->free(op1);
+ return (data_unset *)ds;
+ } else {
+ fprintf(stderr, "data type mismatch, cannot merge\n");
+ return NULL;
+ }
+ }
+
+ switch (op1->type) {
+ case TYPE_STRING:
+ buffer_append_string_buffer(((data_string *)op1)->value, ((data_string *)op2)->value);
+ break;
+ case TYPE_INTEGER:
+ ((data_integer *)op1)->value += ((data_integer *)op2)->value;
+ break;
+ case TYPE_ARRAY: {
+ array *dst = ((data_array *)op1)->value;
+ array *src = ((data_array *)op2)->value;
+ data_unset *du;
+ size_t i;
+
+ for (i = 0; i < src->used; i ++) {
+ du = (data_unset *)src->data[i];
+ if (du) {
+ array_insert_unique(dst, du->copy(du));
+ }
+ }
+ break;
+ default:
+ assert(0);
+ break;
+ }
+ }
+ return op1;
+}
+
+
+#line 111 "configparser.c"
+/* Next is all token values, in a form suitable for use by makeheaders.
+** This section will be null unless lemon is run with the -m switch.
+*/
+/*
+** These constants (all generated automatically by the parser generator)
+** specify the various kinds of tokens (terminals) that the parser
+** understands.
+**
+** Each symbol here is a terminal symbol in the grammar.
+*/
+/* Make sure the INTERFACE macro is defined.
+*/
+#ifndef INTERFACE
+# define INTERFACE 1
+#endif
+/* The next thing included is series of defines which control
+** various aspects of the generated parser.
+** YYCODETYPE is the data type used for storing terminal
+** and nonterminal numbers. "unsigned char" is
+** used if there are fewer than 250 terminals
+** and nonterminals. "int" is used otherwise.
+** YYNOCODE is a number of type YYCODETYPE which corresponds
+** to no legal terminal or nonterminal number. This
+** number is used to fill in empty slots of the hash
+** table.
+** YYFALLBACK If defined, this indicates that one or more tokens
+** have fall-back values which should be used if the
+** original value of the token will not parse.
+** YYACTIONTYPE is the data type used for storing terminal
+** and nonterminal numbers. "unsigned char" is
+** used if there are fewer than 250 rules and
+** states combined. "int" is used otherwise.
+** configparserTOKENTYPE is the data type used for minor tokens given
+** directly to the parser from the tokenizer.
+** YYMINORTYPE is the data type used for all minor tokens.
+** This is typically a union of many types, one of
+** which is configparserTOKENTYPE. The entry in the union
+** for base tokens is called "yy0".
+** YYSTACKDEPTH is the maximum depth of the parser's stack.
+** configparserARG_SDECL A static variable declaration for the %extra_argument
+** configparserARG_PDECL A parameter declaration for the %extra_argument
+** configparserARG_STORE Code to store %extra_argument into yypParser
+** configparserARG_FETCH Code to extract %extra_argument from yypParser
+** YYNSTATE the combined number of states.
+** YYNRULE the number of rules in the grammar
+** YYERRORSYMBOL is the code number of the error symbol. If not
+** defined, then do no error processing.
+*/
+/* */
+#define YYCODETYPE unsigned char
+#define YYNOCODE 48
+#define YYACTIONTYPE unsigned char
+#define configparserTOKENTYPE buffer *
+typedef union {
+ configparserTOKENTYPE yy0;
+ config_cond_t yy27;
+ array * yy40;
+ data_unset * yy41;
+ buffer * yy43;
+ data_config * yy78;
+ int yy95;
+} YYMINORTYPE;
+#define YYSTACKDEPTH 100
+#define configparserARG_SDECL config_t *ctx;
+#define configparserARG_PDECL ,config_t *ctx
+#define configparserARG_FETCH config_t *ctx = yypParser->ctx
+#define configparserARG_STORE yypParser->ctx = ctx
+#define YYNSTATE 63
+#define YYNRULE 40
+#define YYERRORSYMBOL 26
+#define YYERRSYMDT yy95
+#define YY_NO_ACTION (YYNSTATE+YYNRULE+2)
+#define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1)
+#define YY_ERROR_ACTION (YYNSTATE+YYNRULE)
+
+/* Next are that tables used to determine what action to take based on the
+** current state and lookahead token. These tables are used to implement
+** functions that take a state number and lookahead value and return an
+** action integer.
+**
+** Suppose the action integer is N. Then the action is determined as
+** follows
+**
+** 0 <= N < YYNSTATE Shift N. That is, push the lookahead
+** token onto the stack and goto state N.
+**
+** YYNSTATE <= N < YYNSTATE+YYNRULE Reduce by rule N-YYNSTATE.
+**
+** N == YYNSTATE+YYNRULE A syntax error has occurred.
+**
+** N == YYNSTATE+YYNRULE+1 The parser accepts its input.
+**
+** N == YYNSTATE+YYNRULE+2 No such action. Denotes unused
+** slots in the yy_action[] table.
+**
+** The action table is constructed as a single large table named yy_action[].
+** Given state S and lookahead X, the action is computed as
+**
+** yy_action[ yy_shift_ofst[S] + X ]
+**
+** If the index value yy_shift_ofst[S]+X is out of range or if the value
+** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
+** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
+** and that yy_default[S] should be used instead.
+**
+** The formula above is for computing the action when the lookahead is
+** a terminal symbol. If the lookahead is a non-terminal (as occurs after
+** a reduce action) then the yy_reduce_ofst[] array is used in place of
+** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
+** YY_SHIFT_USE_DFLT.
+**
+** The following are the tables generated in this section:
+**
+** yy_action[] A single table containing all actions.
+** yy_lookahead[] A table containing the lookahead for each entry in
+** yy_action. Used to detect hash collisions.
+** yy_shift_ofst[] For each state, the offset into yy_action for
+** shifting terminals.
+** yy_reduce_ofst[] For each state, the offset into yy_action for
+** shifting non-terminals after a reduce.
+** yy_default[] Default action for each state.
+*/
+static YYACTIONTYPE yy_action[] = {
+ /* 0 */ 2, 3, 4, 5, 13, 14, 63, 15, 7, 45,
+ /* 10 */ 20, 88, 16, 46, 28, 49, 41, 10, 40, 25,
+ /* 20 */ 22, 50, 46, 8, 15, 104, 1, 20, 28, 18,
+ /* 30 */ 58, 60, 6, 25, 22, 40, 47, 62, 11, 46,
+ /* 40 */ 20, 9, 23, 24, 26, 29, 89, 58, 60, 10,
+ /* 50 */ 17, 38, 28, 27, 37, 19, 30, 25, 22, 34,
+ /* 60 */ 15, 100, 20, 20, 23, 24, 26, 12, 19, 31,
+ /* 70 */ 32, 40, 19, 44, 43, 46, 95, 35, 90, 89,
+ /* 80 */ 28, 49, 42, 58, 60, 25, 22, 59, 28, 27,
+ /* 90 */ 33, 48, 52, 25, 22, 34, 28, 49, 51, 28,
+ /* 100 */ 36, 25, 22, 61, 25, 22, 89, 28, 39, 89,
+ /* 110 */ 89, 89, 25, 22, 54, 55, 56, 57, 89, 28,
+ /* 120 */ 53, 21, 89, 89, 25, 22, 25, 22,
+};
+static YYCODETYPE yy_lookahead[] = {
+ /* 0 */ 29, 30, 31, 32, 33, 34, 0, 1, 44, 38,
+ /* 10 */ 4, 15, 41, 16, 35, 36, 45, 46, 12, 40,
+ /* 20 */ 41, 42, 16, 15, 1, 27, 28, 4, 35, 36,
+ /* 30 */ 24, 25, 1, 40, 41, 12, 17, 14, 13, 16,
+ /* 40 */ 4, 38, 6, 7, 8, 9, 15, 24, 25, 46,
+ /* 50 */ 2, 3, 35, 36, 37, 5, 39, 40, 41, 42,
+ /* 60 */ 1, 11, 4, 4, 6, 7, 8, 28, 5, 9,
+ /* 70 */ 10, 12, 5, 14, 28, 16, 13, 11, 13, 47,
+ /* 80 */ 35, 36, 13, 24, 25, 40, 41, 42, 35, 36,
+ /* 90 */ 37, 18, 43, 40, 41, 42, 35, 36, 19, 35,
+ /* 100 */ 36, 40, 41, 42, 40, 41, 47, 35, 36, 47,
+ /* 110 */ 47, 47, 40, 41, 20, 21, 22, 23, 47, 35,
+ /* 120 */ 36, 35, 47, 47, 40, 41, 40, 41,
+};
+#define YY_SHIFT_USE_DFLT (-5)
+static signed char yy_shift_ofst[] = {
+ /* 0 */ -5, 6, -5, -5, -5, 31, -4, 8, -3, -5,
+ /* 10 */ 25, -5, 23, -5, -5, -5, 48, 58, 67, 58,
+ /* 20 */ -5, -5, -5, -5, -5, -5, 36, 50, -5, -5,
+ /* 30 */ 60, -5, 58, -5, 66, 58, 67, -5, 58, 67,
+ /* 40 */ 65, 69, -5, 59, -5, -5, 19, 73, 58, 67,
+ /* 50 */ 79, 94, 58, 63, -5, -5, -5, -5, 58, -5,
+ /* 60 */ 58, -5, -5,
+};
+#define YY_REDUCE_USE_DFLT (-37)
+static signed char yy_reduce_ofst[] = {
+ /* 0 */ -2, -29, -37, -37, -37, -36, -37, -37, 3, -37,
+ /* 10 */ -37, 39, -29, -37, -37, -37, -37, -7, -37, 86,
+ /* 20 */ -37, -37, -37, -37, -37, -37, 17, -37, -37, -37,
+ /* 30 */ -37, -37, 53, -37, -37, 64, -37, -37, 72, -37,
+ /* 40 */ -37, -37, 46, -29, -37, -37, -37, -37, -21, -37,
+ /* 50 */ -37, 49, 84, -37, -37, -37, -37, -37, 45, -37,
+ /* 60 */ 61, -37, -37,
+};
+static YYACTIONTYPE yy_default[] = {
+ /* 0 */ 65, 103, 64, 66, 67, 103, 68, 103, 103, 92,
+ /* 10 */ 103, 65, 103, 69, 70, 71, 103, 103, 72, 103,
+ /* 20 */ 74, 75, 77, 78, 79, 80, 103, 86, 76, 81,
+ /* 30 */ 103, 82, 84, 83, 103, 103, 87, 85, 103, 73,
+ /* 40 */ 103, 103, 65, 103, 91, 93, 103, 103, 103, 100,
+ /* 50 */ 103, 103, 103, 103, 96, 97, 98, 99, 103, 101,
+ /* 60 */ 103, 102, 94,
+};
+#define YY_SZ_ACTTAB (sizeof(yy_action)/sizeof(yy_action[0]))
+
+/* The next table maps tokens into fallback tokens. If a construct
+** like the following:
+**
+** %fallback ID X Y Z.
+**
+** appears in the grammer, then ID becomes a fallback token for X, Y,
+** and Z. Whenever one of the tokens X, Y, or Z is input to the parser
+** but it does not parse, the type of the token is changed to ID and
+** the parse is retried before an error is thrown.
+*/
+#ifdef YYFALLBACK
+static const YYCODETYPE yyFallback[] = {
+};
+#endif /* YYFALLBACK */
+
+/* The following structure represents a single element of the
+** parser's stack. Information stored includes:
+**
+** + The state number for the parser at this level of the stack.
+**
+** + The value of the token stored at this level of the stack.
+** (In other words, the "major" token.)
+**
+** + The semantic value stored at this level of the stack. This is
+** the information used by the action routines in the grammar.
+** It is sometimes called the "minor" token.
+*/
+struct yyStackEntry {
+ int stateno; /* The state-number */
+ int major; /* The major token value. This is the code
+ ** number for the token at this stack level */
+ YYMINORTYPE minor; /* The user-supplied minor token value. This
+ ** is the value of the token */
+};
+typedef struct yyStackEntry yyStackEntry;
+
+/* The state of the parser is completely contained in an instance of
+** the following structure */
+struct yyParser {
+ int yyidx; /* Index of top element in stack */
+ int yyerrcnt; /* Shifts left before out of the error */
+ configparserARG_SDECL /* A place to hold %extra_argument */
+ yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */
+};
+typedef struct yyParser yyParser;
+
+#ifndef NDEBUG
+#include <stdio.h>
+static FILE *yyTraceFILE = 0;
+static char *yyTracePrompt = 0;
+#endif /* NDEBUG */
+
+#ifndef NDEBUG
+/*
+** Turn parser tracing on by giving a stream to which to write the trace
+** and a prompt to preface each trace message. Tracing is turned off
+** by making either argument NULL
+**
+** Inputs:
+** <ul>
+** <li> A FILE* to which trace output should be written.
+** If NULL, then tracing is turned off.
+** <li> A prefix string written at the beginning of every
+** line of trace output. If NULL, then tracing is
+** turned off.
+** </ul>
+**
+** Outputs:
+** None.
+*/
+#if 0
+void configparserTrace(FILE *TraceFILE, char *zTracePrompt){
+ yyTraceFILE = TraceFILE;
+ yyTracePrompt = zTracePrompt;
+ if( yyTraceFILE==0 ) yyTracePrompt = 0;
+ else if( yyTracePrompt==0 ) yyTraceFILE = 0;
+}
+#endif
+#endif /* NDEBUG */
+
+#ifndef NDEBUG
+/* For tracing shifts, the names of all terminals and nonterminals
+** are required. The following table supplies these names */
+static const char *yyTokenName[] = {
+ "$", "EOL", "ASSIGN", "APPEND",
+ "LKEY", "PLUS", "STRING", "INTEGER",
+ "LPARAN", "RPARAN", "COMMA", "ARRAY_ASSIGN",
+ "GLOBAL", "LCURLY", "RCURLY", "ELSE",
+ "DOLLAR", "SRVVARNAME", "LBRACKET", "RBRACKET",
+ "EQ", "MATCH", "NE", "NOMATCH",
+ "INCLUDE", "INCLUDE_SHELL", "error", "input",
+ "metalines", "metaline", "varline", "global",
+ "condlines", "include", "include_shell", "value",
+ "expression", "aelement", "condline", "aelements",
+ "array", "key", "stringop", "cond",
+ "eols", "globalstart", "context",
+};
+#endif /* NDEBUG */
+
+#ifndef NDEBUG
+/* For tracing reduce actions, the names of all rules are required.
+*/
+static const char *yyRuleName[] = {
+ /* 0 */ "input ::= metalines",
+ /* 1 */ "metalines ::= metalines metaline",
+ /* 2 */ "metalines ::=",
+ /* 3 */ "metaline ::= varline",
+ /* 4 */ "metaline ::= global",
+ /* 5 */ "metaline ::= condlines EOL",
+ /* 6 */ "metaline ::= include",
+ /* 7 */ "metaline ::= include_shell",
+ /* 8 */ "metaline ::= EOL",
+ /* 9 */ "varline ::= key ASSIGN expression",
+ /* 10 */ "varline ::= key APPEND expression",
+ /* 11 */ "key ::= LKEY",
+ /* 12 */ "expression ::= expression PLUS value",
+ /* 13 */ "expression ::= value",
+ /* 14 */ "value ::= key",
+ /* 15 */ "value ::= STRING",
+ /* 16 */ "value ::= INTEGER",
+ /* 17 */ "value ::= array",
+ /* 18 */ "array ::= LPARAN RPARAN",
+ /* 19 */ "array ::= LPARAN aelements RPARAN",
+ /* 20 */ "aelements ::= aelements COMMA aelement",
+ /* 21 */ "aelements ::= aelements COMMA",
+ /* 22 */ "aelements ::= aelement",
+ /* 23 */ "aelement ::= expression",
+ /* 24 */ "aelement ::= stringop ARRAY_ASSIGN expression",
+ /* 25 */ "eols ::= EOL",
+ /* 26 */ "eols ::=",
+ /* 27 */ "globalstart ::= GLOBAL",
+ /* 28 */ "global ::= globalstart LCURLY metalines RCURLY",
+ /* 29 */ "condlines ::= condlines eols ELSE condline",
+ /* 30 */ "condlines ::= condline",
+ /* 31 */ "condline ::= context LCURLY metalines RCURLY",
+ /* 32 */ "context ::= DOLLAR SRVVARNAME LBRACKET stringop RBRACKET cond expression",
+ /* 33 */ "cond ::= EQ",
+ /* 34 */ "cond ::= MATCH",
+ /* 35 */ "cond ::= NE",
+ /* 36 */ "cond ::= NOMATCH",
+ /* 37 */ "stringop ::= expression",
+ /* 38 */ "include ::= INCLUDE stringop",
+ /* 39 */ "include_shell ::= INCLUDE_SHELL stringop",
+};
+#endif /* NDEBUG */
+
+/*
+** This function returns the symbolic name associated with a token
+** value.
+*/
+#if 0
+const char *configparserTokenName(int tokenType){
+#ifndef NDEBUG
+ if( tokenType>0 && (size_t)tokenType<(sizeof(yyTokenName)/sizeof(yyTokenName[0])) ){
+ return yyTokenName[tokenType];
+ }else{
+ return "Unknown";
+ }
+#else
+ return "";
+#endif
+}
+#endif
+
+/*
+** This function allocates a new parser.
+** The only argument is a pointer to a function which works like
+** malloc.
+**
+** Inputs:
+** A pointer to the function used to allocate memory.
+**
+** Outputs:
+** A pointer to a parser. This pointer is used in subsequent calls
+** to configparser and configparserFree.
+*/
+void *configparserAlloc(void *(*mallocProc)(size_t)){
+ yyParser *pParser;
+ pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) );
+ if( pParser ){
+ pParser->yyidx = -1;
+ }
+ return pParser;
+}
+
+/* The following function deletes the value associated with a
+** symbol. The symbol can be either a terminal or nonterminal.
+** "yymajor" is the symbol code, and "yypminor" is a pointer to
+** the value.
+*/
+static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){
+ switch( yymajor ){
+ /* Here is inserted the actions which take place when a
+ ** terminal or non-terminal is destroyed. This can happen
+ ** when the symbol is popped from the stack during a
+ ** reduce or during error processing or when a parser is
+ ** being destroyed before it is finished parsing.
+ **
+ ** Note: during a reduce, the only symbols destroyed are those
+ ** which appear on the RHS of the rule, but which are not used
+ ** inside the C code.
+ */
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 18:
+ case 19:
+ case 20:
+ case 21:
+ case 22:
+ case 23:
+ case 24:
+ case 25:
+#line 144 "./configparser.y"
+{ buffer_free((yypminor->yy0)); }
+#line 523 "configparser.c"
+ break;
+ case 35:
+#line 135 "./configparser.y"
+{ (yypminor->yy41)->free((yypminor->yy41)); }
+#line 528 "configparser.c"
+ break;
+ case 36:
+#line 136 "./configparser.y"
+{ (yypminor->yy41)->free((yypminor->yy41)); }
+#line 533 "configparser.c"
+ break;
+ case 37:
+#line 137 "./configparser.y"
+{ (yypminor->yy41)->free((yypminor->yy41)); }
+#line 538 "configparser.c"
+ break;
+ case 39:
+#line 138 "./configparser.y"
+{ array_free((yypminor->yy40)); }
+#line 543 "configparser.c"
+ break;
+ case 40:
+#line 139 "./configparser.y"
+{ array_free((yypminor->yy40)); }
+#line 548 "configparser.c"
+ break;
+ case 41:
+#line 140 "./configparser.y"
+{ buffer_free((yypminor->yy43)); }
+#line 553 "configparser.c"
+ break;
+ case 42:
+#line 141 "./configparser.y"
+{ buffer_free((yypminor->yy43)); }
+#line 558 "configparser.c"
+ break;
+ default: break; /* If no destructor action specified: do nothing */
+ }
+}
+
+/*
+** Pop the parser's stack once.
+**
+** If there is a destructor routine associated with the token which
+** is popped from the stack, then call it.
+**
+** Return the major token number for the symbol popped.
+*/
+static int yy_pop_parser_stack(yyParser *pParser){
+ YYCODETYPE yymajor;
+ yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];
+
+ if( pParser->yyidx<0 ) return 0;
+#ifndef NDEBUG
+ if( yyTraceFILE && pParser->yyidx>=0 ){
+ fprintf(yyTraceFILE,"%sPopping %s\n",
+ yyTracePrompt,
+ yyTokenName[yytos->major]);
+ }
+#endif
+ yymajor = yytos->major;
+ yy_destructor( yymajor, &yytos->minor);
+ pParser->yyidx--;
+ return yymajor;
+}
+
+/*
+** Deallocate and destroy a parser. Destructors are all called for
+** all stack elements before shutting the parser down.
+**
+** Inputs:
+** <ul>
+** <li> A pointer to the parser. This should be a pointer
+** obtained from configparserAlloc.
+** <li> A pointer to a function used to reclaim memory obtained
+** from malloc.
+** </ul>
+*/
+void configparserFree(
+ void *p, /* The parser to be deleted */
+ void (*freeProc)(void*) /* Function used to reclaim memory */
+){
+ yyParser *pParser = (yyParser*)p;
+ if( pParser==0 ) return;
+ while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);
+ (*freeProc)((void*)pParser);
+}
+
+/*
+** Find the appropriate action for a parser given the terminal
+** look-ahead token iLookAhead.
+**
+** If the look-ahead token is YYNOCODE, then check to see if the action is
+** independent of the look-ahead. If it is, return the action, otherwise
+** return YY_NO_ACTION.
+*/
+static int yy_find_shift_action(
+ yyParser *pParser, /* The parser */
+ int iLookAhead /* The look-ahead token */
+){
+ int i;
+ int stateno = pParser->yystack[pParser->yyidx].stateno;
+
+ /* if( pParser->yyidx<0 ) return YY_NO_ACTION; */
+ i = yy_shift_ofst[stateno];
+ if( i==YY_SHIFT_USE_DFLT ){
+ return yy_default[stateno];
+ }
+ if( iLookAhead==YYNOCODE ){
+ return YY_NO_ACTION;
+ }
+ i += iLookAhead;
+ if( i<0 || (size_t)i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
+#ifdef YYFALLBACK
+ int iFallback; /* Fallback token */
+ if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
+ && (iFallback = yyFallback[iLookAhead])!=0 ){
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
+ yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
+ }
+#endif
+ return yy_find_shift_action(pParser, iFallback);
+ }
+#endif
+ return yy_default[stateno];
+ }else{
+ return yy_action[i];
+ }
+}
+
+/*
+** Find the appropriate action for a parser given the non-terminal
+** look-ahead token iLookAhead.
+**
+** If the look-ahead token is YYNOCODE, then check to see if the action is
+** independent of the look-ahead. If it is, return the action, otherwise
+** return YY_NO_ACTION.
+*/
+static int yy_find_reduce_action(
+ yyParser *pParser, /* The parser */
+ int iLookAhead /* The look-ahead token */
+){
+ int i;
+ int stateno = pParser->yystack[pParser->yyidx].stateno;
+
+ i = yy_reduce_ofst[stateno];
+ if( i==YY_REDUCE_USE_DFLT ){
+ return yy_default[stateno];
+ }
+ if( iLookAhead==YYNOCODE ){
+ return YY_NO_ACTION;
+ }
+ i += iLookAhead;
+ if( i<0 || (size_t)i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
+ return yy_default[stateno];
+ }else{
+ return yy_action[i];
+ }
+}
+
+/*
+** Perform a shift action.
+*/
+static void yy_shift(
+ yyParser *yypParser, /* The parser to be shifted */
+ int yyNewState, /* The new state to shift in */
+ int yyMajor, /* The major token to shift in */
+ YYMINORTYPE *yypMinor /* Pointer ot the minor token to shift in */
+){
+ yyStackEntry *yytos;
+ yypParser->yyidx++;
+ if( yypParser->yyidx>=YYSTACKDEPTH ){
+ configparserARG_FETCH;
+ yypParser->yyidx--;
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
+ }
+#endif
+ while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
+ /* Here code is inserted which will execute if the parser
+ ** stack every overflows */
+ configparserARG_STORE; /* Suppress warning about unused %extra_argument var */
+ return;
+ }
+ yytos = &yypParser->yystack[yypParser->yyidx];
+ yytos->stateno = yyNewState;
+ yytos->major = yyMajor;
+ yytos->minor = *yypMinor;
+#ifndef NDEBUG
+ if( yyTraceFILE && yypParser->yyidx>0 ){
+ int i;
+ fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState);
+ fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);
+ for(i=1; i<=yypParser->yyidx; i++)
+ fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);
+ fprintf(yyTraceFILE,"\n");
+ }
+#endif
+}
+
+/* The following table contains information about every rule that
+** is used during the reduce.
+*/
+static struct {
+ YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */
+ unsigned char nrhs; /* Number of right-hand side symbols in the rule */
+} yyRuleInfo[] = {
+ { 27, 1 },
+ { 28, 2 },
+ { 28, 0 },
+ { 29, 1 },
+ { 29, 1 },
+ { 29, 2 },
+ { 29, 1 },
+ { 29, 1 },
+ { 29, 1 },
+ { 30, 3 },
+ { 30, 3 },
+ { 41, 1 },
+ { 36, 3 },
+ { 36, 1 },
+ { 35, 1 },
+ { 35, 1 },
+ { 35, 1 },
+ { 35, 1 },
+ { 40, 2 },
+ { 40, 3 },
+ { 39, 3 },
+ { 39, 2 },
+ { 39, 1 },
+ { 37, 1 },
+ { 37, 3 },
+ { 44, 1 },
+ { 44, 0 },
+ { 45, 1 },
+ { 31, 4 },
+ { 32, 4 },
+ { 32, 1 },
+ { 38, 4 },
+ { 46, 7 },
+ { 43, 1 },
+ { 43, 1 },
+ { 43, 1 },
+ { 43, 1 },
+ { 42, 1 },
+ { 33, 2 },
+ { 34, 2 },
+};
+
+static void yy_accept(yyParser*); /* Forward Declaration */
+
+/*
+** Perform a reduce action and the shift that must immediately
+** follow the reduce.
+*/
+static void yy_reduce(
+ yyParser *yypParser, /* The parser */
+ int yyruleno /* Number of the rule by which to reduce */
+){
+ int yygoto; /* The next state */
+ int yyact; /* The next action */
+ YYMINORTYPE yygotominor; /* The LHS of the rule reduced */
+ yyStackEntry *yymsp; /* The top of the parser's stack */
+ int yysize; /* Amount to pop the stack */
+ configparserARG_FETCH;
+ yymsp = &yypParser->yystack[yypParser->yyidx];
+#ifndef NDEBUG
+ if( yyTraceFILE && yyruleno>=0
+ && (size_t)yyruleno<sizeof(yyRuleName)/sizeof(yyRuleName[0]) ){
+ fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
+ yyRuleName[yyruleno]);
+ }
+#endif /* NDEBUG */
+
+ switch( yyruleno ){
+ /* Beginning here are the reduction cases. A typical example
+ ** follows:
+ ** case 0:
+ ** #line <lineno> <grammarfile>
+ ** { ... } // User supplied code
+ ** #line <lineno> <thisfile>
+ ** break;
+ */
+ case 0:
+ /* No destructor defined for metalines */
+ break;
+ case 1:
+ /* No destructor defined for metalines */
+ /* No destructor defined for metaline */
+ break;
+ case 2:
+ break;
+ case 3:
+ /* No destructor defined for varline */
+ break;
+ case 4:
+ /* No destructor defined for global */
+ break;
+ case 5:
+#line 117 "./configparser.y"
+{ yymsp[-1].minor.yy78 = NULL; }
+#line 828 "configparser.c"
+ yy_destructor(1,&yymsp[0].minor);
+ break;
+ case 6:
+ /* No destructor defined for include */
+ break;
+ case 7:
+ /* No destructor defined for include_shell */
+ break;
+ case 8:
+ yy_destructor(1,&yymsp[0].minor);
+ break;
+ case 9:
+#line 146 "./configparser.y"
+{
+ if (ctx->ok) {
+ buffer_copy_string_buffer(yymsp[0].minor.yy41->key, yymsp[-2].minor.yy43);
+ if (strncmp(yymsp[-2].minor.yy43->ptr, "env.", sizeof("env.") - 1) == 0) {
+ fprintf(stderr, "Setting env variable is not supported in conditional %d %s: %s\n",
+ ctx->current->context_ndx,
+ ctx->current->key->ptr, yymsp[-2].minor.yy43->ptr);
+ ctx->ok = 0;
+ } else if (NULL == array_get_element(ctx->current->value, yymsp[0].minor.yy41->key->ptr)) {
+ array_insert_unique(ctx->current->value, yymsp[0].minor.yy41);
+ yymsp[0].minor.yy41 = NULL;
+ } else {
+ fprintf(stderr, "Duplicate config variable in conditional %d %s: %s\n",
+ ctx->current->context_ndx,
+ ctx->current->key->ptr, yymsp[0].minor.yy41->key->ptr);
+ ctx->ok = 0;
+ yymsp[0].minor.yy41->free(yymsp[0].minor.yy41);
+ yymsp[0].minor.yy41 = NULL;
+ }
+ }
+ buffer_free(yymsp[-2].minor.yy43);
+ yymsp[-2].minor.yy43 = NULL;
+}
+#line 865 "configparser.c"
+ yy_destructor(2,&yymsp[-1].minor);
+ break;
+ case 10:
+#line 170 "./configparser.y"
+{
+ array *vars = ctx->current->value;
+ data_unset *du;
+
+ if (strncmp(yymsp[-2].minor.yy43->ptr, "env.", sizeof("env.") - 1) == 0) {
+ fprintf(stderr, "Appending env variable is not supported in conditional %d %s: %s\n",
+ ctx->current->context_ndx,
+ ctx->current->key->ptr, yymsp[-2].minor.yy43->ptr);
+ ctx->ok = 0;
+ } else if (NULL != (du = array_get_element(vars, yymsp[-2].minor.yy43->ptr))) {
+ /* exists in current block */
+ du = configparser_merge_data(du, yymsp[0].minor.yy41);
+ if (NULL == du) {
+ ctx->ok = 0;
+ }
+ else {
+ buffer_copy_string_buffer(du->key, yymsp[-2].minor.yy43);
+ array_replace(vars, du);
+ }
+ yymsp[0].minor.yy41->free(yymsp[0].minor.yy41);
+ } else if (NULL != (du = configparser_get_variable(ctx, yymsp[-2].minor.yy43))) {
+ du = configparser_merge_data(du, yymsp[0].minor.yy41);
+ if (NULL == du) {
+ ctx->ok = 0;
+ }
+ else {
+ buffer_copy_string_buffer(du->key, yymsp[-2].minor.yy43);
+ array_insert_unique(ctx->current->value, du);
+ }
+ yymsp[0].minor.yy41->free(yymsp[0].minor.yy41);
+ } else {
+ buffer_copy_string_buffer(yymsp[0].minor.yy41->key, yymsp[-2].minor.yy43);
+ array_insert_unique(ctx->current->value, yymsp[0].minor.yy41);
+ }
+ buffer_free(yymsp[-2].minor.yy43);
+ yymsp[-2].minor.yy43 = NULL;
+ yymsp[0].minor.yy41 = NULL;
+}
+#line 908 "configparser.c"
+ yy_destructor(3,&yymsp[-1].minor);
+ break;
+ case 11:
+#line 209 "./configparser.y"
+{
+ if (strchr(yymsp[0].minor.yy0->ptr, '.') == NULL) {
+ yygotominor.yy43 = buffer_init_string("var.");
+ buffer_append_string_buffer(yygotominor.yy43, yymsp[0].minor.yy0);
+ buffer_free(yymsp[0].minor.yy0);
+ yymsp[0].minor.yy0 = NULL;
+ } else {
+ yygotominor.yy43 = yymsp[0].minor.yy0;
+ yymsp[0].minor.yy0 = NULL;
+ }
+}
+#line 924 "configparser.c"
+ break;
+ case 12:
+#line 221 "./configparser.y"
+{
+ yygotominor.yy41 = configparser_merge_data(yymsp[-2].minor.yy41, yymsp[0].minor.yy41);
+ if (NULL == yygotominor.yy41) {
+ ctx->ok = 0;
+ }
+ yymsp[-2].minor.yy41 = NULL;
+ yymsp[0].minor.yy41->free(yymsp[0].minor.yy41);
+ yymsp[0].minor.yy41 = NULL;
+}
+#line 937 "configparser.c"
+ yy_destructor(5,&yymsp[-1].minor);
+ break;
+ case 13:
+#line 231 "./configparser.y"
+{
+ yygotominor.yy41 = yymsp[0].minor.yy41;
+ yymsp[0].minor.yy41 = NULL;
+}
+#line 946 "configparser.c"
+ break;
+ case 14:
+#line 236 "./configparser.y"
+{
+ yygotominor.yy41 = NULL;
+ if (strncmp(yymsp[0].minor.yy43->ptr, "env.", sizeof("env.") - 1) == 0) {
+ char *env;
+
+ if (NULL != (env = getenv(yymsp[0].minor.yy43->ptr + 4))) {
+ data_string *ds;
+ ds = data_string_init();
+ buffer_append_string(ds->value, env);
+ yygotominor.yy41 = (data_unset *)ds;
+ }
+ else {
+ fprintf(stderr, "Undefined env variable: %s\n", yymsp[0].minor.yy43->ptr + 4);
+ ctx->ok = 0;
+ }
+ } else if (NULL == (yygotominor.yy41 = configparser_get_variable(ctx, yymsp[0].minor.yy43))) {
+ fprintf(stderr, "Undefined config variable: %s\n", yymsp[0].minor.yy43->ptr);
+ ctx->ok = 0;
+ }
+ if (!yygotominor.yy41) {
+ /* make a dummy so it won't crash */
+ yygotominor.yy41 = (data_unset *)data_string_init();
+ }
+ buffer_free(yymsp[0].minor.yy43);
+ yymsp[0].minor.yy43 = NULL;
+}
+#line 976 "configparser.c"
+ break;
+ case 15:
+#line 263 "./configparser.y"
+{
+ yygotominor.yy41 = (data_unset *)data_string_init();
+ buffer_copy_string_buffer(((data_string *)(yygotominor.yy41))->value, yymsp[0].minor.yy0);
+ buffer_free(yymsp[0].minor.yy0);
+ yymsp[0].minor.yy0 = NULL;
+}
+#line 986 "configparser.c"
+ break;
+ case 16:
+#line 270 "./configparser.y"
+{
+ yygotominor.yy41 = (data_unset *)data_integer_init();
+ ((data_integer *)(yygotominor.yy41))->value = strtol(yymsp[0].minor.yy0->ptr, NULL, 10);
+ buffer_free(yymsp[0].minor.yy0);
+ yymsp[0].minor.yy0 = NULL;
+}
+#line 996 "configparser.c"
+ break;
+ case 17:
+#line 276 "./configparser.y"
+{
+ yygotominor.yy41 = (data_unset *)data_array_init();
+ array_free(((data_array *)(yygotominor.yy41))->value);
+ ((data_array *)(yygotominor.yy41))->value = yymsp[0].minor.yy40;
+ yymsp[0].minor.yy40 = NULL;
+}
+#line 1006 "configparser.c"
+ break;
+ case 18:
+#line 282 "./configparser.y"
+{
+ yygotominor.yy40 = array_init();
+}
+#line 1013 "configparser.c"
+ yy_destructor(8,&yymsp[-1].minor);
+ yy_destructor(9,&yymsp[0].minor);
+ break;
+ case 19:
+#line 285 "./configparser.y"
+{
+ yygotominor.yy40 = yymsp[-1].minor.yy40;
+ yymsp[-1].minor.yy40 = NULL;
+}
+#line 1023 "configparser.c"
+ yy_destructor(8,&yymsp[-2].minor);
+ yy_destructor(9,&yymsp[0].minor);
+ break;
+ case 20:
+#line 290 "./configparser.y"
+{
+ if (buffer_is_empty(yymsp[0].minor.yy41->key) ||
+ NULL == array_get_element(yymsp[-2].minor.yy40, yymsp[0].minor.yy41->key->ptr)) {
+ array_insert_unique(yymsp[-2].minor.yy40, yymsp[0].minor.yy41);
+ yymsp[0].minor.yy41 = NULL;
+ } else {
+ fprintf(stderr, "Duplicate array-key: %s\n",
+ yymsp[0].minor.yy41->key->ptr);
+ ctx->ok = 0;
+ yymsp[0].minor.yy41->free(yymsp[0].minor.yy41);
+ yymsp[0].minor.yy41 = NULL;
+ }
+
+ yygotominor.yy40 = yymsp[-2].minor.yy40;
+ yymsp[-2].minor.yy40 = NULL;
+}
+#line 1045 "configparser.c"
+ yy_destructor(10,&yymsp[-1].minor);
+ break;
+ case 21:
+#line 307 "./configparser.y"
+{
+ yygotominor.yy40 = yymsp[-1].minor.yy40;
+ yymsp[-1].minor.yy40 = NULL;
+}
+#line 1054 "configparser.c"
+ yy_destructor(10,&yymsp[0].minor);
+ break;
+ case 22:
+#line 312 "./configparser.y"
+{
+ yygotominor.yy40 = array_init();
+ array_insert_unique(yygotominor.yy40, yymsp[0].minor.yy41);
+ yymsp[0].minor.yy41 = NULL;
+}
+#line 1064 "configparser.c"
+ break;
+ case 23:
+#line 318 "./configparser.y"
+{
+ yygotominor.yy41 = yymsp[0].minor.yy41;
+ yymsp[0].minor.yy41 = NULL;
+}
+#line 1072 "configparser.c"
+ break;
+ case 24:
+#line 322 "./configparser.y"
+{
+ buffer_copy_string_buffer(yymsp[0].minor.yy41->key, yymsp[-2].minor.yy43);
+ buffer_free(yymsp[-2].minor.yy43);
+ yymsp[-2].minor.yy43 = NULL;
+
+ yygotominor.yy41 = yymsp[0].minor.yy41;
+ yymsp[0].minor.yy41 = NULL;
+}
+#line 1084 "configparser.c"
+ yy_destructor(11,&yymsp[-1].minor);
+ break;
+ case 25:
+ yy_destructor(1,&yymsp[0].minor);
+ break;
+ case 26:
+ break;
+ case 27:
+#line 334 "./configparser.y"
+{
+ data_config *dc;
+ dc = (data_config *)array_get_element(ctx->srv->config_context, "global");
+ assert(dc);
+ configparser_push(ctx, dc, 0);
+}
+#line 1100 "configparser.c"
+ yy_destructor(12,&yymsp[0].minor);
+ break;
+ case 28:
+#line 341 "./configparser.y"
+{
+ data_config *cur;
+
+ cur = ctx->current;
+ configparser_pop(ctx);
+
+ assert(cur && ctx->current);
+
+ yygotominor.yy78 = cur;
+}
+#line 1115 "configparser.c"
+ /* No destructor defined for globalstart */
+ yy_destructor(13,&yymsp[-2].minor);
+ /* No destructor defined for metalines */
+ yy_destructor(14,&yymsp[0].minor);
+ break;
+ case 29:
+#line 352 "./configparser.y"
+{
+ if (yymsp[-3].minor.yy78->context_ndx >= yymsp[0].minor.yy78->context_ndx) {
+ fprintf(stderr, "unreachable else condition\n");
+ ctx->ok = 0;
+ }
+ yymsp[0].minor.yy78->prev = yymsp[-3].minor.yy78;
+ yymsp[-3].minor.yy78->next = yymsp[0].minor.yy78;
+ yygotominor.yy78 = yymsp[0].minor.yy78;
+ yymsp[-3].minor.yy78 = NULL;
+ yymsp[0].minor.yy78 = NULL;
+}
+#line 1134 "configparser.c"
+ /* No destructor defined for eols */
+ yy_destructor(15,&yymsp[-1].minor);
+ break;
+ case 30:
+#line 364 "./configparser.y"
+{
+ yygotominor.yy78 = yymsp[0].minor.yy78;
+ yymsp[0].minor.yy78 = NULL;
+}
+#line 1144 "configparser.c"
+ break;
+ case 31:
+#line 369 "./configparser.y"
+{
+ data_config *cur;
+
+ cur = ctx->current;
+ configparser_pop(ctx);
+
+ assert(cur && ctx->current);
+
+ yygotominor.yy78 = cur;
+}
+#line 1158 "configparser.c"
+ /* No destructor defined for context */
+ yy_destructor(13,&yymsp[-2].minor);
+ /* No destructor defined for metalines */
+ yy_destructor(14,&yymsp[0].minor);
+ break;
+ case 32:
+#line 380 "./configparser.y"
+{
+ data_config *dc;
+ buffer *b, *rvalue, *op;
+
+ if (ctx->ok && yymsp[0].minor.yy41->type != TYPE_STRING) {
+ fprintf(stderr, "rvalue must be string");
+ ctx->ok = 0;
+ }
+
+ switch(yymsp[-1].minor.yy27) {
+ case CONFIG_COND_NE:
+ op = buffer_init_string("!=");
+ break;
+ case CONFIG_COND_EQ:
+ op = buffer_init_string("==");
+ break;
+ case CONFIG_COND_NOMATCH:
+ op = buffer_init_string("!~");
+ break;
+ case CONFIG_COND_MATCH:
+ op = buffer_init_string("=~");
+ break;
+ default:
+ assert(0);
+ return;
+ }
+
+ b = buffer_init();
+ buffer_copy_string_buffer(b, ctx->current->key);
+ buffer_append_string(b, "/");
+ buffer_append_string_buffer(b, yymsp[-5].minor.yy0);
+ buffer_append_string_buffer(b, yymsp[-3].minor.yy43);
+ buffer_append_string_buffer(b, op);
+ rvalue = ((data_string*)yymsp[0].minor.yy41)->value;
+ buffer_append_string_buffer(b, rvalue);
+
+ if (NULL != (dc = (data_config *)array_get_element(ctx->all_configs, b->ptr))) {
+ configparser_push(ctx, dc, 0);
+ } else {
+ struct {
+ comp_key_t comp;
+ char *comp_key;
+ size_t len;
+ } comps[] = {
+ { COMP_SERVER_SOCKET, CONST_STR_LEN("SERVER[\"socket\"]" ) },
+ { COMP_HTTP_URL, CONST_STR_LEN("HTTP[\"url\"]" ) },
+ { COMP_HTTP_HOST, CONST_STR_LEN("HTTP[\"host\"]" ) },
+ { COMP_HTTP_REFERER, CONST_STR_LEN("HTTP[\"referer\"]" ) },
+ { COMP_HTTP_USER_AGENT, CONST_STR_LEN("HTTP[\"useragent\"]" ) },
+ { COMP_HTTP_USER_AGENT, CONST_STR_LEN("HTTP[\"user-agent\"]" ) },
+ { COMP_HTTP_LANGUAGE, CONST_STR_LEN("HTTP[\"language\"]" ) },
+ { COMP_HTTP_COOKIE, CONST_STR_LEN("HTTP[\"cookie\"]" ) },
+ { COMP_HTTP_REMOTE_IP, CONST_STR_LEN("HTTP[\"remoteip\"]" ) },
+ { COMP_HTTP_REMOTE_IP, CONST_STR_LEN("HTTP[\"remote-ip\"]" ) },
+ { COMP_HTTP_QUERY_STRING, CONST_STR_LEN("HTTP[\"querystring\"]") },
+ { COMP_HTTP_QUERY_STRING, CONST_STR_LEN("HTTP[\"query-string\"]") },
+ { COMP_HTTP_REQUEST_METHOD, CONST_STR_LEN("HTTP[\"request-method\"]") },
+ { COMP_HTTP_SCHEME, CONST_STR_LEN("HTTP[\"scheme\"]" ) },
+ { COMP_UNSET, NULL, 0 },
+ };
+ size_t i;
+
+ dc = data_config_init();
+
+ buffer_copy_string_buffer(dc->key, b);
+ buffer_copy_string_buffer(dc->op, op);
+ buffer_copy_string_buffer(dc->comp_key, yymsp[-5].minor.yy0);
+ buffer_append_string_len(dc->comp_key, CONST_STR_LEN("[\""));
+ buffer_append_string_buffer(dc->comp_key, yymsp[-3].minor.yy43);
+ buffer_append_string_len(dc->comp_key, CONST_STR_LEN("\"]"));
+ dc->cond = yymsp[-1].minor.yy27;
+
+ for (i = 0; comps[i].comp_key; i ++) {
+ if (buffer_is_equal_string(
+ dc->comp_key, comps[i].comp_key, comps[i].len)) {
+ dc->comp = comps[i].comp;
+ break;
+ }
+ }
+ if (COMP_UNSET == dc->comp) {
+ fprintf(stderr, "error comp_key %s", dc->comp_key->ptr);
+ ctx->ok = 0;
+ }
+
+ switch(yymsp[-1].minor.yy27) {
+ case CONFIG_COND_NE:
+ case CONFIG_COND_EQ:
+ dc->string = buffer_init_buffer(rvalue);
+ break;
+ case CONFIG_COND_NOMATCH:
+ case CONFIG_COND_MATCH: {
+#ifdef HAVE_PCRE_H
+ const char *errptr;
+ int erroff, captures;
+
+ if (NULL == (dc->regex =
+ pcre_compile(rvalue->ptr, 0, &errptr, &erroff, NULL))) {
+ dc->string = buffer_init_string(errptr);
+ dc->cond = CONFIG_COND_UNSET;
+
+ fprintf(stderr, "parsing regex failed: %s -> %s at offset %d\n",
+ rvalue->ptr, errptr, erroff);
+
+ ctx->ok = 0;
+ } else if (NULL == (dc->regex_study =
+ pcre_study(dc->regex, 0, &errptr)) &&
+ errptr != NULL) {
+ fprintf(stderr, "studying regex failed: %s -> %s\n",
+ rvalue->ptr, errptr);
+ ctx->ok = 0;
+ } else if (0 != (pcre_fullinfo(dc->regex, dc->regex_study, PCRE_INFO_CAPTURECOUNT, &captures))) {
+ fprintf(stderr, "getting capture count for regex failed: %s\n",
+ rvalue->ptr);
+ ctx->ok = 0;
+ } else if (captures > 9) {
+ fprintf(stderr, "Too many captures in regex, use (?:...) instead of (...): %s\n",
+ rvalue->ptr);
+ ctx->ok = 0;
+ } else {
+ dc->string = buffer_init_buffer(rvalue);
+ }
+#else
+ fprintf(stderr, "can't handle '$%s[%s] =~ ...' as you compiled without pcre support. \n"
+ "(perhaps just a missing pcre-devel package ?) \n",
+ yymsp[-5].minor.yy0->ptr, yymsp[-3].minor.yy43->ptr);
+ ctx->ok = 0;
+#endif
+ break;
+ }
+
+ default:
+ fprintf(stderr, "unknown condition for $%s[%s]\n",
+ yymsp[-5].minor.yy0->ptr, yymsp[-3].minor.yy43->ptr);
+ ctx->ok = 0;
+ break;
+ }
+
+ configparser_push(ctx, dc, 1);
+ }
+
+ buffer_free(b);
+ buffer_free(op);
+ buffer_free(yymsp[-5].minor.yy0);
+ yymsp[-5].minor.yy0 = NULL;
+ buffer_free(yymsp[-3].minor.yy43);
+ yymsp[-3].minor.yy43 = NULL;
+ yymsp[0].minor.yy41->free(yymsp[0].minor.yy41);
+ yymsp[0].minor.yy41 = NULL;
+}
+#line 1315 "configparser.c"
+ yy_destructor(16,&yymsp[-6].minor);
+ yy_destructor(18,&yymsp[-4].minor);
+ yy_destructor(19,&yymsp[-2].minor);
+ break;
+ case 33:
+#line 529 "./configparser.y"
+{
+ yygotominor.yy27 = CONFIG_COND_EQ;
+}
+#line 1325 "configparser.c"
+ yy_destructor(20,&yymsp[0].minor);
+ break;
+ case 34:
+#line 532 "./configparser.y"
+{
+ yygotominor.yy27 = CONFIG_COND_MATCH;
+}
+#line 1333 "configparser.c"
+ yy_destructor(21,&yymsp[0].minor);
+ break;
+ case 35:
+#line 535 "./configparser.y"
+{
+ yygotominor.yy27 = CONFIG_COND_NE;
+}
+#line 1341 "configparser.c"
+ yy_destructor(22,&yymsp[0].minor);
+ break;
+ case 36:
+#line 538 "./configparser.y"
+{
+ yygotominor.yy27 = CONFIG_COND_NOMATCH;
+}
+#line 1349 "configparser.c"
+ yy_destructor(23,&yymsp[0].minor);
+ break;
+ case 37:
+#line 542 "./configparser.y"
+{
+ yygotominor.yy43 = NULL;
+ if (ctx->ok) {
+ if (yymsp[0].minor.yy41->type == TYPE_STRING) {
+ yygotominor.yy43 = buffer_init_buffer(((data_string*)yymsp[0].minor.yy41)->value);
+ } else if (yymsp[0].minor.yy41->type == TYPE_INTEGER) {
+ yygotominor.yy43 = buffer_init();
+ buffer_copy_long(yygotominor.yy43, ((data_integer *)yymsp[0].minor.yy41)->value);
+ } else {
+ fprintf(stderr, "operand must be string");
+ ctx->ok = 0;
+ }
+ }
+ yymsp[0].minor.yy41->free(yymsp[0].minor.yy41);
+ yymsp[0].minor.yy41 = NULL;
+}
+#line 1370 "configparser.c"
+ break;
+ case 38:
+#line 559 "./configparser.y"
+{
+ if (ctx->ok) {
+ if (0 != config_parse_file(ctx->srv, ctx, yymsp[0].minor.yy43->ptr)) {
+ ctx->ok = 0;
+ }
+ buffer_free(yymsp[0].minor.yy43);
+ yymsp[0].minor.yy43 = NULL;
+ }
+}
+#line 1383 "configparser.c"
+ yy_destructor(24,&yymsp[-1].minor);
+ break;
+ case 39:
+#line 569 "./configparser.y"
+{
+ if (ctx->ok) {
+ if (0 != config_parse_cmd(ctx->srv, ctx, yymsp[0].minor.yy43->ptr)) {
+ ctx->ok = 0;
+ }
+ buffer_free(yymsp[0].minor.yy43);
+ yymsp[0].minor.yy43 = NULL;
+ }
+}
+#line 1397 "configparser.c"
+ yy_destructor(25,&yymsp[-1].minor);
+ break;
+ };
+ yygoto = yyRuleInfo[yyruleno].lhs;
+ yysize = yyRuleInfo[yyruleno].nrhs;
+ yypParser->yyidx -= yysize;
+ yyact = yy_find_reduce_action(yypParser,yygoto);
+ if( yyact < YYNSTATE ){
+ yy_shift(yypParser,yyact,yygoto,&yygotominor);
+ }else if( yyact == YYNSTATE + YYNRULE + 1 ){
+ yy_accept(yypParser);
+ }
+}
+
+/*
+** The following code executes when the parse fails
+*/
+static void yy_parse_failed(
+ yyParser *yypParser /* The parser */
+){
+ configparserARG_FETCH;
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
+ }
+#endif
+ while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
+ /* Here code is inserted which will be executed whenever the
+ ** parser fails */
+#line 108 "./configparser.y"
+
+ ctx->ok = 0;
+
+#line 1431 "configparser.c"
+ configparserARG_STORE; /* Suppress warning about unused %extra_argument variable */
+}
+
+/*
+** The following code executes when a syntax error first occurs.
+*/
+static void yy_syntax_error(
+ yyParser *yypParser, /* The parser */
+ int yymajor, /* The major type of the error token */
+ YYMINORTYPE yyminor /* The minor type of the error token */
+){
+ configparserARG_FETCH;
+ UNUSED(yymajor);
+ UNUSED(yyminor);
+#define TOKEN (yyminor.yy0)
+ configparserARG_STORE; /* Suppress warning about unused %extra_argument variable */
+}
+
+/*
+** The following is executed when the parser accepts
+*/
+static void yy_accept(
+ yyParser *yypParser /* The parser */
+){
+ configparserARG_FETCH;
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
+ }
+#endif
+ while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
+ /* Here code is inserted which will be executed whenever the
+ ** parser accepts */
+ configparserARG_STORE; /* Suppress warning about unused %extra_argument variable */
+}
+
+/* The main parser program.
+** The first argument is a pointer to a structure obtained from
+** "configparserAlloc" which describes the current state of the parser.
+** The second argument is the major token number. The third is
+** the minor token. The fourth optional argument is whatever the
+** user wants (and specified in the grammar) and is available for
+** use by the action routines.
+**
+** Inputs:
+** <ul>
+** <li> A pointer to the parser (an opaque structure.)
+** <li> The major token number.
+** <li> The minor token number.
+** <li> An option argument of a grammar-specified type.
+** </ul>
+**
+** Outputs:
+** None.
+*/
+void configparser(
+ void *yyp, /* The parser */
+ int yymajor, /* The major token code number */
+ configparserTOKENTYPE yyminor /* The value for the token */
+ configparserARG_PDECL /* Optional %extra_argument parameter */
+){
+ YYMINORTYPE yyminorunion;
+ int yyact; /* The parser action. */
+ int yyendofinput; /* True if we are at the end of input */
+ int yyerrorhit = 0; /* True if yymajor has invoked an error */
+ yyParser *yypParser; /* The parser */
+
+ /* (re)initialize the parser, if necessary */
+ yypParser = (yyParser*)yyp;
+ if( yypParser->yyidx<0 ){
+ if( yymajor==0 ) return;
+ yypParser->yyidx = 0;
+ yypParser->yyerrcnt = -1;
+ yypParser->yystack[0].stateno = 0;
+ yypParser->yystack[0].major = 0;
+ }
+ yyminorunion.yy0 = yyminor;
+ yyendofinput = (yymajor==0);
+ configparserARG_STORE;
+
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE,"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);
+ }
+#endif
+
+ do{
+ yyact = yy_find_shift_action(yypParser,yymajor);
+ if( yyact<YYNSTATE ){
+ yy_shift(yypParser,yyact,yymajor,&yyminorunion);
+ yypParser->yyerrcnt--;
+ if( yyendofinput && yypParser->yyidx>=0 ){
+ yymajor = 0;
+ }else{
+ yymajor = YYNOCODE;
+ }
+ }else if( yyact < YYNSTATE + YYNRULE ){
+ yy_reduce(yypParser,yyact-YYNSTATE);
+ }else if( yyact == YY_ERROR_ACTION ){
+ int yymx;
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
+ }
+#endif
+#ifdef YYERRORSYMBOL
+ /* A syntax error has occurred.
+ ** The response to an error depends upon whether or not the
+ ** grammar defines an error token "ERROR".
+ **
+ ** This is what we do if the grammar does define ERROR:
+ **
+ ** * Call the %syntax_error function.
+ **
+ ** * Begin popping the stack until we enter a state where
+ ** it is legal to shift the error symbol, then shift
+ ** the error symbol.
+ **
+ ** * Set the error count to three.
+ **
+ ** * Begin accepting and shifting new tokens. No new error
+ ** processing will occur until three tokens have been
+ ** shifted successfully.
+ **
+ */
+ if( yypParser->yyerrcnt<0 ){
+ yy_syntax_error(yypParser,yymajor,yyminorunion);
+ }
+ yymx = yypParser->yystack[yypParser->yyidx].major;
+ if( yymx==YYERRORSYMBOL || yyerrorhit ){
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE,"%sDiscard input token %s\n",
+ yyTracePrompt,yyTokenName[yymajor]);
+ }
+#endif
+ yy_destructor(yymajor,&yyminorunion);
+ yymajor = YYNOCODE;
+ }else{
+ while(
+ yypParser->yyidx >= 0 &&
+ yymx != YYERRORSYMBOL &&
+ (yyact = yy_find_shift_action(yypParser,YYERRORSYMBOL)) >= YYNSTATE
+ ){
+ yy_pop_parser_stack(yypParser);
+ }
+ if( yypParser->yyidx < 0 || yymajor==0 ){
+ yy_destructor(yymajor,&yyminorunion);
+ yy_parse_failed(yypParser);
+ yymajor = YYNOCODE;
+ }else if( yymx!=YYERRORSYMBOL ){
+ YYMINORTYPE u2;
+ u2.YYERRSYMDT = 0;
+ yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);
+ }
+ }
+ yypParser->yyerrcnt = 3;
+ yyerrorhit = 1;
+#else /* YYERRORSYMBOL is not defined */
+ /* This is what we do if the grammar does not define ERROR:
+ **
+ ** * Report an error message, and throw away the input token.
+ **
+ ** * If the input token is $, then fail the parse.
+ **
+ ** As before, subsequent error messages are suppressed until
+ ** three input tokens have been successfully shifted.
+ */
+ if( yypParser->yyerrcnt<=0 ){
+ yy_syntax_error(yypParser,yymajor,yyminorunion);
+ }
+ yypParser->yyerrcnt = 3;
+ yy_destructor(yymajor,&yyminorunion);
+ if( yyendofinput ){
+ yy_parse_failed(yypParser);
+ }
+ yymajor = YYNOCODE;
+#endif
+ }else{
+ yy_accept(yypParser);
+ yymajor = YYNOCODE;
+ }
+ }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
+ return;
+}
Deleted: lighttpd/tags/1.4.28-4/src/mod_ssi_exprparser.c
===================================================================
--- lighttpd/trunk/src/mod_ssi_exprparser.c 2011-04-24 18:00:55 UTC (rev 528)
+++ lighttpd/tags/1.4.28-4/src/mod_ssi_exprparser.c 2011-04-26 13:04:52 UTC (rev 536)
@@ -1,956 +0,0 @@
-/* Driver template for the LEMON parser generator.
-** The author disclaims copyright to this source code.
-*/
-/* First off, code is include which follows the "include" declaration
-** in the input file. */
-#include <stdio.h>
-#line 6 "./mod_ssi_exprparser.y"
-
-#include "mod_ssi_expr.h"
-#include "buffer.h"
-
-#include <assert.h>
-#include <string.h>
-
-#line 16 "mod_ssi_exprparser.c"
-/* Next is all token values, in a form suitable for use by makeheaders.
-** This section will be null unless lemon is run with the -m switch.
-*/
-/*
-** These constants (all generated automatically by the parser generator)
-** specify the various kinds of tokens (terminals) that the parser
-** understands.
-**
-** Each symbol here is a terminal symbol in the grammar.
-*/
-/* Make sure the INTERFACE macro is defined.
-*/
-#ifndef INTERFACE
-# define INTERFACE 1
-#endif
-/* The next thing included is series of defines which control
-** various aspects of the generated parser.
-** YYCODETYPE is the data type used for storing terminal
-** and nonterminal numbers. "unsigned char" is
-** used if there are fewer than 250 terminals
-** and nonterminals. "int" is used otherwise.
-** YYNOCODE is a number of type YYCODETYPE which corresponds
-** to no legal terminal or nonterminal number. This
-** number is used to fill in empty slots of the hash
-** table.
-** YYFALLBACK If defined, this indicates that one or more tokens
-** have fall-back values which should be used if the
-** original value of the token will not parse.
-** YYACTIONTYPE is the data type used for storing terminal
-** and nonterminal numbers. "unsigned char" is
-** used if there are fewer than 250 rules and
-** states combined. "int" is used otherwise.
-** ssiexprparserTOKENTYPE is the data type used for minor tokens given
-** directly to the parser from the tokenizer.
-** YYMINORTYPE is the data type used for all minor tokens.
-** This is typically a union of many types, one of
-** which is ssiexprparserTOKENTYPE. The entry in the union
-** for base tokens is called "yy0".
-** YYSTACKDEPTH is the maximum depth of the parser's stack.
-** ssiexprparserARG_SDECL A static variable declaration for the %extra_argument
-** ssiexprparserARG_PDECL A parameter declaration for the %extra_argument
-** ssiexprparserARG_STORE Code to store %extra_argument into yypParser
-** ssiexprparserARG_FETCH Code to extract %extra_argument from yypParser
-** YYNSTATE the combined number of states.
-** YYNRULE the number of rules in the grammar
-** YYERRORSYMBOL is the code number of the error symbol. If not
-** defined, then do no error processing.
-*/
-/* */
-#define YYCODETYPE unsigned char
-#define YYNOCODE 20
-#define YYACTIONTYPE unsigned char
-#define ssiexprparserTOKENTYPE buffer *
-typedef union {
- ssiexprparserTOKENTYPE yy0;
- int yy8;
- buffer * yy19;
- ssi_val_t * yy29;
- int yy39;
-} YYMINORTYPE;
-#define YYSTACKDEPTH 100
-#define ssiexprparserARG_SDECL ssi_ctx_t *ctx;
-#define ssiexprparserARG_PDECL ,ssi_ctx_t *ctx
-#define ssiexprparserARG_FETCH ssi_ctx_t *ctx = yypParser->ctx
-#define ssiexprparserARG_STORE yypParser->ctx = ctx
-#define YYNSTATE 23
-#define YYNRULE 16
-#define YYERRORSYMBOL 13
-#define YYERRSYMDT yy39
-#define YY_NO_ACTION (YYNSTATE+YYNRULE+2)
-#define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1)
-#define YY_ERROR_ACTION (YYNSTATE+YYNRULE)
-
-/* Next are that tables used to determine what action to take based on the
-** current state and lookahead token. These tables are used to implement
-** functions that take a state number and lookahead value and return an
-** action integer.
-**
-** Suppose the action integer is N. Then the action is determined as
-** follows
-**
-** 0 <= N < YYNSTATE Shift N. That is, push the lookahead
-** token onto the stack and goto state N.
-**
-** YYNSTATE <= N < YYNSTATE+YYNRULE Reduce by rule N-YYNSTATE.
-**
-** N == YYNSTATE+YYNRULE A syntax error has occurred.
-**
-** N == YYNSTATE+YYNRULE+1 The parser accepts its input.
-**
-** N == YYNSTATE+YYNRULE+2 No such action. Denotes unused
-** slots in the yy_action[] table.
-**
-** The action table is constructed as a single large table named yy_action[].
-** Given state S and lookahead X, the action is computed as
-**
-** yy_action[ yy_shift_ofst[S] + X ]
-**
-** If the index value yy_shift_ofst[S]+X is out of range or if the value
-** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
-** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
-** and that yy_default[S] should be used instead.
-**
-** The formula above is for computing the action when the lookahead is
-** a terminal symbol. If the lookahead is a non-terminal (as occurs after
-** a reduce action) then the yy_reduce_ofst[] array is used in place of
-** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
-** YY_SHIFT_USE_DFLT.
-**
-** The following are the tables generated in this section:
-**
-** yy_action[] A single table containing all actions.
-** yy_lookahead[] A table containing the lookahead for each entry in
-** yy_action. Used to detect hash collisions.
-** yy_shift_ofst[] For each state, the offset into yy_action for
-** shifting terminals.
-** yy_reduce_ofst[] For each state, the offset into yy_action for
-** shifting non-terminals after a reduce.
-** yy_default[] Default action for each state.
-*/
-static YYACTIONTYPE yy_action[] = {
- /* 0 */ 5, 7, 17, 18, 22, 20, 21, 19, 2, 14,
- /* 10 */ 1, 23, 40, 9, 11, 3, 16, 2, 14, 12,
- /* 20 */ 4, 14, 5, 7, 6, 14, 7, 8, 14, 10,
- /* 30 */ 14, 13, 37, 37, 15,
-};
-static YYCODETYPE yy_lookahead[] = {
- /* 0 */ 1, 2, 3, 4, 5, 6, 7, 8, 14, 15,
- /* 10 */ 16, 0, 18, 9, 10, 17, 12, 14, 15, 16,
- /* 20 */ 14, 15, 1, 2, 14, 15, 2, 14, 15, 14,
- /* 30 */ 15, 11, 19, 19, 12,
-};
-#define YY_SHIFT_USE_DFLT (-2)
-static signed char yy_shift_ofst[] = {
- /* 0 */ 4, 11, -1, 4, 21, 4, 24, 4, -2, 4,
- /* 10 */ -2, 4, 20, -2, 22, -2, -2, -2, -2, -2,
- /* 20 */ -2, -2, -2,
-};
-#define YY_REDUCE_USE_DFLT (-7)
-static signed char yy_reduce_ofst[] = {
- /* 0 */ -6, -7, -2, 6, -7, 10, -7, 13, -7, 15,
- /* 10 */ -7, 3, -7, -7, -7, -7, -7, -7, -7, -7,
- /* 20 */ -7, -7, -7,
-};
-static YYACTIONTYPE yy_default[] = {
- /* 0 */ 39, 39, 25, 39, 24, 39, 26, 39, 27, 39,
- /* 10 */ 28, 39, 39, 29, 30, 32, 31, 33, 34, 35,
- /* 20 */ 36, 37, 38,
-};
-#define YY_SZ_ACTTAB (sizeof(yy_action)/sizeof(yy_action[0]))
-
-/* The next table maps tokens into fallback tokens. If a construct
-** like the following:
-**
-** %fallback ID X Y Z.
-**
-** appears in the grammer, then ID becomes a fallback token for X, Y,
-** and Z. Whenever one of the tokens X, Y, or Z is input to the parser
-** but it does not parse, the type of the token is changed to ID and
-** the parse is retried before an error is thrown.
-*/
-#ifdef YYFALLBACK
-static const YYCODETYPE yyFallback[] = {
-};
-#endif /* YYFALLBACK */
-
-/* The following structure represents a single element of the
-** parser's stack. Information stored includes:
-**
-** + The state number for the parser at this level of the stack.
-**
-** + The value of the token stored at this level of the stack.
-** (In other words, the "major" token.)
-**
-** + The semantic value stored at this level of the stack. This is
-** the information used by the action routines in the grammar.
-** It is sometimes called the "minor" token.
-*/
-struct yyStackEntry {
- int stateno; /* The state-number */
- int major; /* The major token value. This is the code
- ** number for the token at this stack level */
- YYMINORTYPE minor; /* The user-supplied minor token value. This
- ** is the value of the token */
-};
-typedef struct yyStackEntry yyStackEntry;
-
-/* The state of the parser is completely contained in an instance of
-** the following structure */
-struct yyParser {
- int yyidx; /* Index of top element in stack */
- int yyerrcnt; /* Shifts left before out of the error */
- ssiexprparserARG_SDECL /* A place to hold %extra_argument */
- yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */
-};
-typedef struct yyParser yyParser;
-
-#ifndef NDEBUG
-#include <stdio.h>
-static FILE *yyTraceFILE = 0;
-static char *yyTracePrompt = 0;
-#endif /* NDEBUG */
-
-#ifndef NDEBUG
-/*
-** Turn parser tracing on by giving a stream to which to write the trace
-** and a prompt to preface each trace message. Tracing is turned off
-** by making either argument NULL
-**
-** Inputs:
-** <ul>
-** <li> A FILE* to which trace output should be written.
-** If NULL, then tracing is turned off.
-** <li> A prefix string written at the beginning of every
-** line of trace output. If NULL, then tracing is
-** turned off.
-** </ul>
-**
-** Outputs:
-** None.
-*/
-#if 0
-void ssiexprparserTrace(FILE *TraceFILE, char *zTracePrompt){
- yyTraceFILE = TraceFILE;
- yyTracePrompt = zTracePrompt;
- if( yyTraceFILE==0 ) yyTracePrompt = 0;
- else if( yyTracePrompt==0 ) yyTraceFILE = 0;
-}
-#endif
-#endif /* NDEBUG */
-
-#ifndef NDEBUG
-/* For tracing shifts, the names of all terminals and nonterminals
-** are required. The following table supplies these names */
-static const char *yyTokenName[] = {
- "$", "AND", "OR", "EQ",
- "NE", "GT", "GE", "LT",
- "LE", "NOT", "LPARAN", "RPARAN",
- "VALUE", "error", "expr", "value",
- "exprline", "cond", "input",
-};
-#endif /* NDEBUG */
-
-#ifndef NDEBUG
-/* For tracing reduce actions, the names of all rules are required.
-*/
-static const char *yyRuleName[] = {
- /* 0 */ "input ::= exprline",
- /* 1 */ "exprline ::= expr cond expr",
- /* 2 */ "exprline ::= expr",
- /* 3 */ "expr ::= expr AND expr",
- /* 4 */ "expr ::= expr OR expr",
- /* 5 */ "expr ::= NOT expr",
- /* 6 */ "expr ::= LPARAN exprline RPARAN",
- /* 7 */ "expr ::= value",
- /* 8 */ "value ::= VALUE",
- /* 9 */ "value ::= value VALUE",
- /* 10 */ "cond ::= EQ",
- /* 11 */ "cond ::= NE",
- /* 12 */ "cond ::= LE",
- /* 13 */ "cond ::= GE",
- /* 14 */ "cond ::= LT",
- /* 15 */ "cond ::= GT",
-};
-#endif /* NDEBUG */
-
-/*
-** This function returns the symbolic name associated with a token
-** value.
-*/
-#if 0
-const char *ssiexprparserTokenName(int tokenType){
-#ifndef NDEBUG
- if( tokenType>0 && (size_t)tokenType<(sizeof(yyTokenName)/sizeof(yyTokenName[0])) ){
- return yyTokenName[tokenType];
- }else{
- return "Unknown";
- }
-#else
- return "";
-#endif
-}
-#endif
-
-/*
-** This function allocates a new parser.
-** The only argument is a pointer to a function which works like
-** malloc.
-**
-** Inputs:
-** A pointer to the function used to allocate memory.
-**
-** Outputs:
-** A pointer to a parser. This pointer is used in subsequent calls
-** to ssiexprparser and ssiexprparserFree.
-*/
-void *ssiexprparserAlloc(void *(*mallocProc)(size_t)){
- yyParser *pParser;
- pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) );
- if( pParser ){
- pParser->yyidx = -1;
- }
- return pParser;
-}
-
-/* The following function deletes the value associated with a
-** symbol. The symbol can be either a terminal or nonterminal.
-** "yymajor" is the symbol code, and "yypminor" is a pointer to
-** the value.
-*/
-static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){
- switch( yymajor ){
- /* Here is inserted the actions which take place when a
- ** terminal or non-terminal is destroyed. This can happen
- ** when the symbol is popped from the stack during a
- ** reduce or during error processing or when a parser is
- ** being destroyed before it is finished parsing.
- **
- ** Note: during a reduce, the only symbols destroyed are those
- ** which appear on the RHS of the rule, but which are not used
- ** inside the C code.
- */
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12:
-#line 22 "./mod_ssi_exprparser.y"
-{ buffer_free((yypminor->yy0)); }
-#line 352 "mod_ssi_exprparser.c"
- break;
- default: break; /* If no destructor action specified: do nothing */
- }
-}
-
-/*
-** Pop the parser's stack once.
-**
-** If there is a destructor routine associated with the token which
-** is popped from the stack, then call it.
-**
-** Return the major token number for the symbol popped.
-*/
-static int yy_pop_parser_stack(yyParser *pParser){
- YYCODETYPE yymajor;
- yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];
-
- if( pParser->yyidx<0 ) return 0;
-#ifndef NDEBUG
- if( yyTraceFILE && pParser->yyidx>=0 ){
- fprintf(yyTraceFILE,"%sPopping %s\n",
- yyTracePrompt,
- yyTokenName[yytos->major]);
- }
-#endif
- yymajor = yytos->major;
- yy_destructor( yymajor, &yytos->minor);
- pParser->yyidx--;
- return yymajor;
-}
-
-/*
-** Deallocate and destroy a parser. Destructors are all called for
-** all stack elements before shutting the parser down.
-**
-** Inputs:
-** <ul>
-** <li> A pointer to the parser. This should be a pointer
-** obtained from ssiexprparserAlloc.
-** <li> A pointer to a function used to reclaim memory obtained
-** from malloc.
-** </ul>
-*/
-void ssiexprparserFree(
- void *p, /* The parser to be deleted */
- void (*freeProc)(void*) /* Function used to reclaim memory */
-){
- yyParser *pParser = (yyParser*)p;
- if( pParser==0 ) return;
- while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);
- (*freeProc)((void*)pParser);
-}
-
-/*
-** Find the appropriate action for a parser given the terminal
-** look-ahead token iLookAhead.
-**
-** If the look-ahead token is YYNOCODE, then check to see if the action is
-** independent of the look-ahead. If it is, return the action, otherwise
-** return YY_NO_ACTION.
-*/
-static int yy_find_shift_action(
- yyParser *pParser, /* The parser */
- int iLookAhead /* The look-ahead token */
-){
- int i;
- int stateno = pParser->yystack[pParser->yyidx].stateno;
-
- /* if( pParser->yyidx<0 ) return YY_NO_ACTION; */
- i = yy_shift_ofst[stateno];
- if( i==YY_SHIFT_USE_DFLT ){
- return yy_default[stateno];
- }
- if( iLookAhead==YYNOCODE ){
- return YY_NO_ACTION;
- }
- i += iLookAhead;
- if( i<0 || (size_t)i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
-#ifdef YYFALLBACK
- int iFallback; /* Fallback token */
- if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
- && (iFallback = yyFallback[iLookAhead])!=0 ){
-#ifndef NDEBUG
- if( yyTraceFILE ){
- fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
- yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
- }
-#endif
- return yy_find_shift_action(pParser, iFallback);
- }
-#endif
- return yy_default[stateno];
- }else{
- return yy_action[i];
- }
-}
-
-/*
-** Find the appropriate action for a parser given the non-terminal
-** look-ahead token iLookAhead.
-**
-** If the look-ahead token is YYNOCODE, then check to see if the action is
-** independent of the look-ahead. If it is, return the action, otherwise
-** return YY_NO_ACTION.
-*/
-static int yy_find_reduce_action(
- yyParser *pParser, /* The parser */
- int iLookAhead /* The look-ahead token */
-){
- int i;
- int stateno = pParser->yystack[pParser->yyidx].stateno;
-
- i = yy_reduce_ofst[stateno];
- if( i==YY_REDUCE_USE_DFLT ){
- return yy_default[stateno];
- }
- if( iLookAhead==YYNOCODE ){
- return YY_NO_ACTION;
- }
- i += iLookAhead;
- if( i<0 || (size_t)i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
- return yy_default[stateno];
- }else{
- return yy_action[i];
- }
-}
-
-/*
-** Perform a shift action.
-*/
-static void yy_shift(
- yyParser *yypParser, /* The parser to be shifted */
- int yyNewState, /* The new state to shift in */
- int yyMajor, /* The major token to shift in */
- YYMINORTYPE *yypMinor /* Pointer ot the minor token to shift in */
-){
- yyStackEntry *yytos;
- yypParser->yyidx++;
- if( yypParser->yyidx>=YYSTACKDEPTH ){
- ssiexprparserARG_FETCH;
- yypParser->yyidx--;
-#ifndef NDEBUG
- if( yyTraceFILE ){
- fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
- }
-#endif
- while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
- /* Here code is inserted which will execute if the parser
- ** stack every overflows */
- ssiexprparserARG_STORE; /* Suppress warning about unused %extra_argument var */
- return;
- }
- yytos = &yypParser->yystack[yypParser->yyidx];
- yytos->stateno = yyNewState;
- yytos->major = yyMajor;
- yytos->minor = *yypMinor;
-#ifndef NDEBUG
- if( yyTraceFILE && yypParser->yyidx>0 ){
- int i;
- fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState);
- fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);
- for(i=1; i<=yypParser->yyidx; i++)
- fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);
- fprintf(yyTraceFILE,"\n");
- }
-#endif
-}
-
-/* The following table contains information about every rule that
-** is used during the reduce.
-*/
-static struct {
- YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */
- unsigned char nrhs; /* Number of right-hand side symbols in the rule */
-} yyRuleInfo[] = {
- { 18, 1 },
- { 16, 3 },
- { 16, 1 },
- { 14, 3 },
- { 14, 3 },
- { 14, 2 },
- { 14, 3 },
- { 14, 1 },
- { 15, 1 },
- { 15, 2 },
- { 17, 1 },
- { 17, 1 },
- { 17, 1 },
- { 17, 1 },
- { 17, 1 },
- { 17, 1 },
-};
-
-static void yy_accept(yyParser*); /* Forward Declaration */
-
-/*
-** Perform a reduce action and the shift that must immediately
-** follow the reduce.
-*/
-static void yy_reduce(
- yyParser *yypParser, /* The parser */
- int yyruleno /* Number of the rule by which to reduce */
-){
- int yygoto; /* The next state */
- int yyact; /* The next action */
- YYMINORTYPE yygotominor; /* The LHS of the rule reduced */
- yyStackEntry *yymsp; /* The top of the parser's stack */
- int yysize; /* Amount to pop the stack */
- ssiexprparserARG_FETCH;
- yymsp = &yypParser->yystack[yypParser->yyidx];
-#ifndef NDEBUG
- if( yyTraceFILE && yyruleno>=0
- && (size_t)yyruleno<sizeof(yyRuleName)/sizeof(yyRuleName[0]) ){
- fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
- yyRuleName[yyruleno]);
- }
-#endif /* NDEBUG */
-
- switch( yyruleno ){
- /* Beginning here are the reduction cases. A typical example
- ** follows:
- ** case 0:
- ** #line <lineno> <grammarfile>
- ** { ... } // User supplied code
- ** #line <lineno> <thisfile>
- ** break;
- */
- case 0:
-#line 29 "./mod_ssi_exprparser.y"
-{
- ctx->val.bo = ssi_val_tobool(yymsp[0].minor.yy29);
- ctx->val.type = SSI_TYPE_BOOL;
-
- ssi_val_free(yymsp[0].minor.yy29);
-}
-#line 588 "mod_ssi_exprparser.c"
- break;
- case 1:
-#line 36 "./mod_ssi_exprparser.y"
-{
- int cmp;
-
- if (yymsp[-2].minor.yy29->type == SSI_TYPE_STRING &&
- yymsp[0].minor.yy29->type == SSI_TYPE_STRING) {
- cmp = strcmp(yymsp[-2].minor.yy29->str->ptr, yymsp[0].minor.yy29->str->ptr);
- } else {
- cmp = ssi_val_tobool(yymsp[-2].minor.yy29) - ssi_val_tobool(yymsp[0].minor.yy29);
- }
-
- yygotominor.yy29 = yymsp[-2].minor.yy29;
-
- switch(yymsp[-1].minor.yy8) {
- case SSI_COND_EQ: yygotominor.yy29->bo = (cmp == 0) ? 1 : 0; break;
- case SSI_COND_NE: yygotominor.yy29->bo = (cmp != 0) ? 1 : 0; break;
- case SSI_COND_GE: yygotominor.yy29->bo = (cmp >= 0) ? 1 : 0; break;
- case SSI_COND_GT: yygotominor.yy29->bo = (cmp > 0) ? 1 : 0; break;
- case SSI_COND_LE: yygotominor.yy29->bo = (cmp <= 0) ? 1 : 0; break;
- case SSI_COND_LT: yygotominor.yy29->bo = (cmp < 0) ? 1 : 0; break;
- }
-
- yygotominor.yy29->type = SSI_TYPE_BOOL;
-
- ssi_val_free(yymsp[0].minor.yy29);
-}
-#line 617 "mod_ssi_exprparser.c"
- break;
- case 2:
-#line 61 "./mod_ssi_exprparser.y"
-{
- yygotominor.yy29 = yymsp[0].minor.yy29;
-}
-#line 624 "mod_ssi_exprparser.c"
- break;
- case 3:
-#line 64 "./mod_ssi_exprparser.y"
-{
- int e;
-
- e = ssi_val_tobool(yymsp[-2].minor.yy29) && ssi_val_tobool(yymsp[0].minor.yy29);
-
- yygotominor.yy29 = yymsp[-2].minor.yy29;
- yygotominor.yy29->bo = e;
- yygotominor.yy29->type = SSI_TYPE_BOOL;
- ssi_val_free(yymsp[0].minor.yy29);
-}
-#line 638 "mod_ssi_exprparser.c"
- yy_destructor(1,&yymsp[-1].minor);
- break;
- case 4:
-#line 75 "./mod_ssi_exprparser.y"
-{
- int e;
-
- e = ssi_val_tobool(yymsp[-2].minor.yy29) || ssi_val_tobool(yymsp[0].minor.yy29);
-
- yygotominor.yy29 = yymsp[-2].minor.yy29;
- yygotominor.yy29->bo = e;
- yygotominor.yy29->type = SSI_TYPE_BOOL;
- ssi_val_free(yymsp[0].minor.yy29);
-}
-#line 653 "mod_ssi_exprparser.c"
- yy_destructor(2,&yymsp[-1].minor);
- break;
- case 5:
-#line 86 "./mod_ssi_exprparser.y"
-{
- int e;
-
- e = !ssi_val_tobool(yymsp[0].minor.yy29);
-
- yygotominor.yy29 = yymsp[0].minor.yy29;
- yygotominor.yy29->bo = e;
- yygotominor.yy29->type = SSI_TYPE_BOOL;
-}
-#line 667 "mod_ssi_exprparser.c"
- yy_destructor(9,&yymsp[-1].minor);
- break;
- case 6:
-#line 95 "./mod_ssi_exprparser.y"
-{
- yygotominor.yy29 = yymsp[-1].minor.yy29;
-}
-#line 675 "mod_ssi_exprparser.c"
- yy_destructor(10,&yymsp[-2].minor);
- yy_destructor(11,&yymsp[0].minor);
- break;
- case 7:
-#line 99 "./mod_ssi_exprparser.y"
-{
- yygotominor.yy29 = ssi_val_init();
- yygotominor.yy29->str = yymsp[0].minor.yy19;
- yygotominor.yy29->type = SSI_TYPE_STRING;
-}
-#line 686 "mod_ssi_exprparser.c"
- break;
- case 8:
-#line 105 "./mod_ssi_exprparser.y"
-{
- yygotominor.yy19 = yymsp[0].minor.yy0;
-}
-#line 693 "mod_ssi_exprparser.c"
- break;
- case 9:
-#line 109 "./mod_ssi_exprparser.y"
-{
- yygotominor.yy19 = yymsp[-1].minor.yy19;
- buffer_append_string_buffer(yygotominor.yy19, yymsp[0].minor.yy0);
- buffer_free(yymsp[0].minor.yy0);
-}
-#line 702 "mod_ssi_exprparser.c"
- break;
- case 10:
-#line 115 "./mod_ssi_exprparser.y"
-{ yygotominor.yy8 = SSI_COND_EQ; }
-#line 707 "mod_ssi_exprparser.c"
- yy_destructor(3,&yymsp[0].minor);
- break;
- case 11:
-#line 116 "./mod_ssi_exprparser.y"
-{ yygotominor.yy8 = SSI_COND_NE; }
-#line 713 "mod_ssi_exprparser.c"
- yy_destructor(4,&yymsp[0].minor);
- break;
- case 12:
-#line 117 "./mod_ssi_exprparser.y"
-{ yygotominor.yy8 = SSI_COND_LE; }
-#line 719 "mod_ssi_exprparser.c"
- yy_destructor(8,&yymsp[0].minor);
- break;
- case 13:
-#line 118 "./mod_ssi_exprparser.y"
-{ yygotominor.yy8 = SSI_COND_GE; }
-#line 725 "mod_ssi_exprparser.c"
- yy_destructor(6,&yymsp[0].minor);
- break;
- case 14:
-#line 119 "./mod_ssi_exprparser.y"
-{ yygotominor.yy8 = SSI_COND_LT; }
-#line 731 "mod_ssi_exprparser.c"
- yy_destructor(7,&yymsp[0].minor);
- break;
- case 15:
-#line 120 "./mod_ssi_exprparser.y"
-{ yygotominor.yy8 = SSI_COND_GT; }
-#line 737 "mod_ssi_exprparser.c"
- yy_destructor(5,&yymsp[0].minor);
- break;
- };
- yygoto = yyRuleInfo[yyruleno].lhs;
- yysize = yyRuleInfo[yyruleno].nrhs;
- yypParser->yyidx -= yysize;
- yyact = yy_find_reduce_action(yypParser,yygoto);
- if( yyact < YYNSTATE ){
- yy_shift(yypParser,yyact,yygoto,&yygotominor);
- }else if( yyact == YYNSTATE + YYNRULE + 1 ){
- yy_accept(yypParser);
- }
-}
-
-/*
-** The following code executes when the parse fails
-*/
-static void yy_parse_failed(
- yyParser *yypParser /* The parser */
-){
- ssiexprparserARG_FETCH;
-#ifndef NDEBUG
- if( yyTraceFILE ){
- fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
- }
-#endif
- while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
- /* Here code is inserted which will be executed whenever the
- ** parser fails */
-#line 14 "./mod_ssi_exprparser.y"
-
- ctx->ok = 0;
-
-#line 771 "mod_ssi_exprparser.c"
- ssiexprparserARG_STORE; /* Suppress warning about unused %extra_argument variable */
-}
-
-/*
-** The following code executes when a syntax error first occurs.
-*/
-static void yy_syntax_error(
- yyParser *yypParser, /* The parser */
- int yymajor, /* The major type of the error token */
- YYMINORTYPE yyminor /* The minor type of the error token */
-){
- ssiexprparserARG_FETCH;
- UNUSED(yymajor);
- UNUSED(yyminor);
-#define TOKEN (yyminor.yy0)
- ssiexprparserARG_STORE; /* Suppress warning about unused %extra_argument variable */
-}
-
-/*
-** The following is executed when the parser accepts
-*/
-static void yy_accept(
- yyParser *yypParser /* The parser */
-){
- ssiexprparserARG_FETCH;
-#ifndef NDEBUG
- if( yyTraceFILE ){
- fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
- }
-#endif
- while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
- /* Here code is inserted which will be executed whenever the
- ** parser accepts */
- ssiexprparserARG_STORE; /* Suppress warning about unused %extra_argument variable */
-}
-
-/* The main parser program.
-** The first argument is a pointer to a structure obtained from
-** "ssiexprparserAlloc" which describes the current state of the parser.
-** The second argument is the major token number. The third is
-** the minor token. The fourth optional argument is whatever the
-** user wants (and specified in the grammar) and is available for
-** use by the action routines.
-**
-** Inputs:
-** <ul>
-** <li> A pointer to the parser (an opaque structure.)
-** <li> The major token number.
-** <li> The minor token number.
-** <li> An option argument of a grammar-specified type.
-** </ul>
-**
-** Outputs:
-** None.
-*/
-void ssiexprparser(
- void *yyp, /* The parser */
- int yymajor, /* The major token code number */
- ssiexprparserTOKENTYPE yyminor /* The value for the token */
- ssiexprparserARG_PDECL /* Optional %extra_argument parameter */
-){
- YYMINORTYPE yyminorunion;
- int yyact; /* The parser action. */
- int yyendofinput; /* True if we are at the end of input */
- int yyerrorhit = 0; /* True if yymajor has invoked an error */
- yyParser *yypParser; /* The parser */
-
- /* (re)initialize the parser, if necessary */
- yypParser = (yyParser*)yyp;
- if( yypParser->yyidx<0 ){
- if( yymajor==0 ) return;
- yypParser->yyidx = 0;
- yypParser->yyerrcnt = -1;
- yypParser->yystack[0].stateno = 0;
- yypParser->yystack[0].major = 0;
- }
- yyminorunion.yy0 = yyminor;
- yyendofinput = (yymajor==0);
- ssiexprparserARG_STORE;
-
-#ifndef NDEBUG
- if( yyTraceFILE ){
- fprintf(yyTraceFILE,"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);
- }
-#endif
-
- do{
- yyact = yy_find_shift_action(yypParser,yymajor);
- if( yyact<YYNSTATE ){
- yy_shift(yypParser,yyact,yymajor,&yyminorunion);
- yypParser->yyerrcnt--;
- if( yyendofinput && yypParser->yyidx>=0 ){
- yymajor = 0;
- }else{
- yymajor = YYNOCODE;
- }
- }else if( yyact < YYNSTATE + YYNRULE ){
- yy_reduce(yypParser,yyact-YYNSTATE);
- }else if( yyact == YY_ERROR_ACTION ){
- int yymx;
-#ifndef NDEBUG
- if( yyTraceFILE ){
- fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
- }
-#endif
-#ifdef YYERRORSYMBOL
- /* A syntax error has occurred.
- ** The response to an error depends upon whether or not the
- ** grammar defines an error token "ERROR".
- **
- ** This is what we do if the grammar does define ERROR:
- **
- ** * Call the %syntax_error function.
- **
- ** * Begin popping the stack until we enter a state where
- ** it is legal to shift the error symbol, then shift
- ** the error symbol.
- **
- ** * Set the error count to three.
- **
- ** * Begin accepting and shifting new tokens. No new error
- ** processing will occur until three tokens have been
- ** shifted successfully.
- **
- */
- if( yypParser->yyerrcnt<0 ){
- yy_syntax_error(yypParser,yymajor,yyminorunion);
- }
- yymx = yypParser->yystack[yypParser->yyidx].major;
- if( yymx==YYERRORSYMBOL || yyerrorhit ){
-#ifndef NDEBUG
- if( yyTraceFILE ){
- fprintf(yyTraceFILE,"%sDiscard input token %s\n",
- yyTracePrompt,yyTokenName[yymajor]);
- }
-#endif
- yy_destructor(yymajor,&yyminorunion);
- yymajor = YYNOCODE;
- }else{
- while(
- yypParser->yyidx >= 0 &&
- yymx != YYERRORSYMBOL &&
- (yyact = yy_find_shift_action(yypParser,YYERRORSYMBOL)) >= YYNSTATE
- ){
- yy_pop_parser_stack(yypParser);
- }
- if( yypParser->yyidx < 0 || yymajor==0 ){
- yy_destructor(yymajor,&yyminorunion);
- yy_parse_failed(yypParser);
- yymajor = YYNOCODE;
- }else if( yymx!=YYERRORSYMBOL ){
- YYMINORTYPE u2;
- u2.YYERRSYMDT = 0;
- yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);
- }
- }
- yypParser->yyerrcnt = 3;
- yyerrorhit = 1;
-#else /* YYERRORSYMBOL is not defined */
- /* This is what we do if the grammar does not define ERROR:
- **
- ** * Report an error message, and throw away the input token.
- **
- ** * If the input token is $, then fail the parse.
- **
- ** As before, subsequent error messages are suppressed until
- ** three input tokens have been successfully shifted.
- */
- if( yypParser->yyerrcnt<=0 ){
- yy_syntax_error(yypParser,yymajor,yyminorunion);
- }
- yypParser->yyerrcnt = 3;
- yy_destructor(yymajor,&yyminorunion);
- if( yyendofinput ){
- yy_parse_failed(yypParser);
- }
- yymajor = YYNOCODE;
-#endif
- }else{
- yy_accept(yypParser);
- yymajor = YYNOCODE;
- }
- }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
- return;
-}
Copied: lighttpd/tags/1.4.28-4/src/mod_ssi_exprparser.c (from rev 535, lighttpd/trunk/src/mod_ssi_exprparser.c)
===================================================================
--- lighttpd/tags/1.4.28-4/src/mod_ssi_exprparser.c (rev 0)
+++ lighttpd/tags/1.4.28-4/src/mod_ssi_exprparser.c 2011-04-26 13:04:52 UTC (rev 536)
@@ -0,0 +1,956 @@
+/* Driver template for the LEMON parser generator.
+** The author disclaims copyright to this source code.
+*/
+/* First off, code is include which follows the "include" declaration
+** in the input file. */
+#include <stdio.h>
+#line 6 "./mod_ssi_exprparser.y"
+
+#include "mod_ssi_expr.h"
+#include "buffer.h"
+
+#include <assert.h>
+#include <string.h>
+
+#line 16 "mod_ssi_exprparser.c"
+/* Next is all token values, in a form suitable for use by makeheaders.
+** This section will be null unless lemon is run with the -m switch.
+*/
+/*
+** These constants (all generated automatically by the parser generator)
+** specify the various kinds of tokens (terminals) that the parser
+** understands.
+**
+** Each symbol here is a terminal symbol in the grammar.
+*/
+/* Make sure the INTERFACE macro is defined.
+*/
+#ifndef INTERFACE
+# define INTERFACE 1
+#endif
+/* The next thing included is series of defines which control
+** various aspects of the generated parser.
+** YYCODETYPE is the data type used for storing terminal
+** and nonterminal numbers. "unsigned char" is
+** used if there are fewer than 250 terminals
+** and nonterminals. "int" is used otherwise.
+** YYNOCODE is a number of type YYCODETYPE which corresponds
+** to no legal terminal or nonterminal number. This
+** number is used to fill in empty slots of the hash
+** table.
+** YYFALLBACK If defined, this indicates that one or more tokens
+** have fall-back values which should be used if the
+** original value of the token will not parse.
+** YYACTIONTYPE is the data type used for storing terminal
+** and nonterminal numbers. "unsigned char" is
+** used if there are fewer than 250 rules and
+** states combined. "int" is used otherwise.
+** ssiexprparserTOKENTYPE is the data type used for minor tokens given
+** directly to the parser from the tokenizer.
+** YYMINORTYPE is the data type used for all minor tokens.
+** This is typically a union of many types, one of
+** which is ssiexprparserTOKENTYPE. The entry in the union
+** for base tokens is called "yy0".
+** YYSTACKDEPTH is the maximum depth of the parser's stack.
+** ssiexprparserARG_SDECL A static variable declaration for the %extra_argument
+** ssiexprparserARG_PDECL A parameter declaration for the %extra_argument
+** ssiexprparserARG_STORE Code to store %extra_argument into yypParser
+** ssiexprparserARG_FETCH Code to extract %extra_argument from yypParser
+** YYNSTATE the combined number of states.
+** YYNRULE the number of rules in the grammar
+** YYERRORSYMBOL is the code number of the error symbol. If not
+** defined, then do no error processing.
+*/
+/* */
+#define YYCODETYPE unsigned char
+#define YYNOCODE 20
+#define YYACTIONTYPE unsigned char
+#define ssiexprparserTOKENTYPE buffer *
+typedef union {
+ ssiexprparserTOKENTYPE yy0;
+ int yy8;
+ buffer * yy19;
+ ssi_val_t * yy29;
+ int yy39;
+} YYMINORTYPE;
+#define YYSTACKDEPTH 100
+#define ssiexprparserARG_SDECL ssi_ctx_t *ctx;
+#define ssiexprparserARG_PDECL ,ssi_ctx_t *ctx
+#define ssiexprparserARG_FETCH ssi_ctx_t *ctx = yypParser->ctx
+#define ssiexprparserARG_STORE yypParser->ctx = ctx
+#define YYNSTATE 23
+#define YYNRULE 16
+#define YYERRORSYMBOL 13
+#define YYERRSYMDT yy39
+#define YY_NO_ACTION (YYNSTATE+YYNRULE+2)
+#define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1)
+#define YY_ERROR_ACTION (YYNSTATE+YYNRULE)
+
+/* Next are that tables used to determine what action to take based on the
+** current state and lookahead token. These tables are used to implement
+** functions that take a state number and lookahead value and return an
+** action integer.
+**
+** Suppose the action integer is N. Then the action is determined as
+** follows
+**
+** 0 <= N < YYNSTATE Shift N. That is, push the lookahead
+** token onto the stack and goto state N.
+**
+** YYNSTATE <= N < YYNSTATE+YYNRULE Reduce by rule N-YYNSTATE.
+**
+** N == YYNSTATE+YYNRULE A syntax error has occurred.
+**
+** N == YYNSTATE+YYNRULE+1 The parser accepts its input.
+**
+** N == YYNSTATE+YYNRULE+2 No such action. Denotes unused
+** slots in the yy_action[] table.
+**
+** The action table is constructed as a single large table named yy_action[].
+** Given state S and lookahead X, the action is computed as
+**
+** yy_action[ yy_shift_ofst[S] + X ]
+**
+** If the index value yy_shift_ofst[S]+X is out of range or if the value
+** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
+** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
+** and that yy_default[S] should be used instead.
+**
+** The formula above is for computing the action when the lookahead is
+** a terminal symbol. If the lookahead is a non-terminal (as occurs after
+** a reduce action) then the yy_reduce_ofst[] array is used in place of
+** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
+** YY_SHIFT_USE_DFLT.
+**
+** The following are the tables generated in this section:
+**
+** yy_action[] A single table containing all actions.
+** yy_lookahead[] A table containing the lookahead for each entry in
+** yy_action. Used to detect hash collisions.
+** yy_shift_ofst[] For each state, the offset into yy_action for
+** shifting terminals.
+** yy_reduce_ofst[] For each state, the offset into yy_action for
+** shifting non-terminals after a reduce.
+** yy_default[] Default action for each state.
+*/
+static YYACTIONTYPE yy_action[] = {
+ /* 0 */ 5, 7, 17, 18, 22, 20, 21, 19, 2, 14,
+ /* 10 */ 1, 23, 40, 9, 11, 3, 16, 2, 14, 12,
+ /* 20 */ 4, 14, 5, 7, 6, 14, 7, 8, 14, 10,
+ /* 30 */ 14, 13, 37, 37, 15,
+};
+static YYCODETYPE yy_lookahead[] = {
+ /* 0 */ 1, 2, 3, 4, 5, 6, 7, 8, 14, 15,
+ /* 10 */ 16, 0, 18, 9, 10, 17, 12, 14, 15, 16,
+ /* 20 */ 14, 15, 1, 2, 14, 15, 2, 14, 15, 14,
+ /* 30 */ 15, 11, 19, 19, 12,
+};
+#define YY_SHIFT_USE_DFLT (-2)
+static signed char yy_shift_ofst[] = {
+ /* 0 */ 4, 11, -1, 4, 21, 4, 24, 4, -2, 4,
+ /* 10 */ -2, 4, 20, -2, 22, -2, -2, -2, -2, -2,
+ /* 20 */ -2, -2, -2,
+};
+#define YY_REDUCE_USE_DFLT (-7)
+static signed char yy_reduce_ofst[] = {
+ /* 0 */ -6, -7, -2, 6, -7, 10, -7, 13, -7, 15,
+ /* 10 */ -7, 3, -7, -7, -7, -7, -7, -7, -7, -7,
+ /* 20 */ -7, -7, -7,
+};
+static YYACTIONTYPE yy_default[] = {
+ /* 0 */ 39, 39, 25, 39, 24, 39, 26, 39, 27, 39,
+ /* 10 */ 28, 39, 39, 29, 30, 32, 31, 33, 34, 35,
+ /* 20 */ 36, 37, 38,
+};
+#define YY_SZ_ACTTAB (sizeof(yy_action)/sizeof(yy_action[0]))
+
+/* The next table maps tokens into fallback tokens. If a construct
+** like the following:
+**
+** %fallback ID X Y Z.
+**
+** appears in the grammer, then ID becomes a fallback token for X, Y,
+** and Z. Whenever one of the tokens X, Y, or Z is input to the parser
+** but it does not parse, the type of the token is changed to ID and
+** the parse is retried before an error is thrown.
+*/
+#ifdef YYFALLBACK
+static const YYCODETYPE yyFallback[] = {
+};
+#endif /* YYFALLBACK */
+
+/* The following structure represents a single element of the
+** parser's stack. Information stored includes:
+**
+** + The state number for the parser at this level of the stack.
+**
+** + The value of the token stored at this level of the stack.
+** (In other words, the "major" token.)
+**
+** + The semantic value stored at this level of the stack. This is
+** the information used by the action routines in the grammar.
+** It is sometimes called the "minor" token.
+*/
+struct yyStackEntry {
+ int stateno; /* The state-number */
+ int major; /* The major token value. This is the code
+ ** number for the token at this stack level */
+ YYMINORTYPE minor; /* The user-supplied minor token value. This
+ ** is the value of the token */
+};
+typedef struct yyStackEntry yyStackEntry;
+
+/* The state of the parser is completely contained in an instance of
+** the following structure */
+struct yyParser {
+ int yyidx; /* Index of top element in stack */
+ int yyerrcnt; /* Shifts left before out of the error */
+ ssiexprparserARG_SDECL /* A place to hold %extra_argument */
+ yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */
+};
+typedef struct yyParser yyParser;
+
+#ifndef NDEBUG
+#include <stdio.h>
+static FILE *yyTraceFILE = 0;
+static char *yyTracePrompt = 0;
+#endif /* NDEBUG */
+
+#ifndef NDEBUG
+/*
+** Turn parser tracing on by giving a stream to which to write the trace
+** and a prompt to preface each trace message. Tracing is turned off
+** by making either argument NULL
+**
+** Inputs:
+** <ul>
+** <li> A FILE* to which trace output should be written.
+** If NULL, then tracing is turned off.
+** <li> A prefix string written at the beginning of every
+** line of trace output. If NULL, then tracing is
+** turned off.
+** </ul>
+**
+** Outputs:
+** None.
+*/
+#if 0
+void ssiexprparserTrace(FILE *TraceFILE, char *zTracePrompt){
+ yyTraceFILE = TraceFILE;
+ yyTracePrompt = zTracePrompt;
+ if( yyTraceFILE==0 ) yyTracePrompt = 0;
+ else if( yyTracePrompt==0 ) yyTraceFILE = 0;
+}
+#endif
+#endif /* NDEBUG */
+
+#ifndef NDEBUG
+/* For tracing shifts, the names of all terminals and nonterminals
+** are required. The following table supplies these names */
+static const char *yyTokenName[] = {
+ "$", "AND", "OR", "EQ",
+ "NE", "GT", "GE", "LT",
+ "LE", "NOT", "LPARAN", "RPARAN",
+ "VALUE", "error", "expr", "value",
+ "exprline", "cond", "input",
+};
+#endif /* NDEBUG */
+
+#ifndef NDEBUG
+/* For tracing reduce actions, the names of all rules are required.
+*/
+static const char *yyRuleName[] = {
+ /* 0 */ "input ::= exprline",
+ /* 1 */ "exprline ::= expr cond expr",
+ /* 2 */ "exprline ::= expr",
+ /* 3 */ "expr ::= expr AND expr",
+ /* 4 */ "expr ::= expr OR expr",
+ /* 5 */ "expr ::= NOT expr",
+ /* 6 */ "expr ::= LPARAN exprline RPARAN",
+ /* 7 */ "expr ::= value",
+ /* 8 */ "value ::= VALUE",
+ /* 9 */ "value ::= value VALUE",
+ /* 10 */ "cond ::= EQ",
+ /* 11 */ "cond ::= NE",
+ /* 12 */ "cond ::= LE",
+ /* 13 */ "cond ::= GE",
+ /* 14 */ "cond ::= LT",
+ /* 15 */ "cond ::= GT",
+};
+#endif /* NDEBUG */
+
+/*
+** This function returns the symbolic name associated with a token
+** value.
+*/
+#if 0
+const char *ssiexprparserTokenName(int tokenType){
+#ifndef NDEBUG
+ if( tokenType>0 && (size_t)tokenType<(sizeof(yyTokenName)/sizeof(yyTokenName[0])) ){
+ return yyTokenName[tokenType];
+ }else{
+ return "Unknown";
+ }
+#else
+ return "";
+#endif
+}
+#endif
+
+/*
+** This function allocates a new parser.
+** The only argument is a pointer to a function which works like
+** malloc.
+**
+** Inputs:
+** A pointer to the function used to allocate memory.
+**
+** Outputs:
+** A pointer to a parser. This pointer is used in subsequent calls
+** to ssiexprparser and ssiexprparserFree.
+*/
+void *ssiexprparserAlloc(void *(*mallocProc)(size_t)){
+ yyParser *pParser;
+ pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) );
+ if( pParser ){
+ pParser->yyidx = -1;
+ }
+ return pParser;
+}
+
+/* The following function deletes the value associated with a
+** symbol. The symbol can be either a terminal or nonterminal.
+** "yymajor" is the symbol code, and "yypminor" is a pointer to
+** the value.
+*/
+static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){
+ switch( yymajor ){
+ /* Here is inserted the actions which take place when a
+ ** terminal or non-terminal is destroyed. This can happen
+ ** when the symbol is popped from the stack during a
+ ** reduce or during error processing or when a parser is
+ ** being destroyed before it is finished parsing.
+ **
+ ** Note: during a reduce, the only symbols destroyed are those
+ ** which appear on the RHS of the rule, but which are not used
+ ** inside the C code.
+ */
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+#line 22 "./mod_ssi_exprparser.y"
+{ buffer_free((yypminor->yy0)); }
+#line 352 "mod_ssi_exprparser.c"
+ break;
+ default: break; /* If no destructor action specified: do nothing */
+ }
+}
+
+/*
+** Pop the parser's stack once.
+**
+** If there is a destructor routine associated with the token which
+** is popped from the stack, then call it.
+**
+** Return the major token number for the symbol popped.
+*/
+static int yy_pop_parser_stack(yyParser *pParser){
+ YYCODETYPE yymajor;
+ yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];
+
+ if( pParser->yyidx<0 ) return 0;
+#ifndef NDEBUG
+ if( yyTraceFILE && pParser->yyidx>=0 ){
+ fprintf(yyTraceFILE,"%sPopping %s\n",
+ yyTracePrompt,
+ yyTokenName[yytos->major]);
+ }
+#endif
+ yymajor = yytos->major;
+ yy_destructor( yymajor, &yytos->minor);
+ pParser->yyidx--;
+ return yymajor;
+}
+
+/*
+** Deallocate and destroy a parser. Destructors are all called for
+** all stack elements before shutting the parser down.
+**
+** Inputs:
+** <ul>
+** <li> A pointer to the parser. This should be a pointer
+** obtained from ssiexprparserAlloc.
+** <li> A pointer to a function used to reclaim memory obtained
+** from malloc.
+** </ul>
+*/
+void ssiexprparserFree(
+ void *p, /* The parser to be deleted */
+ void (*freeProc)(void*) /* Function used to reclaim memory */
+){
+ yyParser *pParser = (yyParser*)p;
+ if( pParser==0 ) return;
+ while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);
+ (*freeProc)((void*)pParser);
+}
+
+/*
+** Find the appropriate action for a parser given the terminal
+** look-ahead token iLookAhead.
+**
+** If the look-ahead token is YYNOCODE, then check to see if the action is
+** independent of the look-ahead. If it is, return the action, otherwise
+** return YY_NO_ACTION.
+*/
+static int yy_find_shift_action(
+ yyParser *pParser, /* The parser */
+ int iLookAhead /* The look-ahead token */
+){
+ int i;
+ int stateno = pParser->yystack[pParser->yyidx].stateno;
+
+ /* if( pParser->yyidx<0 ) return YY_NO_ACTION; */
+ i = yy_shift_ofst[stateno];
+ if( i==YY_SHIFT_USE_DFLT ){
+ return yy_default[stateno];
+ }
+ if( iLookAhead==YYNOCODE ){
+ return YY_NO_ACTION;
+ }
+ i += iLookAhead;
+ if( i<0 || (size_t)i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
+#ifdef YYFALLBACK
+ int iFallback; /* Fallback token */
+ if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
+ && (iFallback = yyFallback[iLookAhead])!=0 ){
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
+ yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
+ }
+#endif
+ return yy_find_shift_action(pParser, iFallback);
+ }
+#endif
+ return yy_default[stateno];
+ }else{
+ return yy_action[i];
+ }
+}
+
+/*
+** Find the appropriate action for a parser given the non-terminal
+** look-ahead token iLookAhead.
+**
+** If the look-ahead token is YYNOCODE, then check to see if the action is
+** independent of the look-ahead. If it is, return the action, otherwise
+** return YY_NO_ACTION.
+*/
+static int yy_find_reduce_action(
+ yyParser *pParser, /* The parser */
+ int iLookAhead /* The look-ahead token */
+){
+ int i;
+ int stateno = pParser->yystack[pParser->yyidx].stateno;
+
+ i = yy_reduce_ofst[stateno];
+ if( i==YY_REDUCE_USE_DFLT ){
+ return yy_default[stateno];
+ }
+ if( iLookAhead==YYNOCODE ){
+ return YY_NO_ACTION;
+ }
+ i += iLookAhead;
+ if( i<0 || (size_t)i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
+ return yy_default[stateno];
+ }else{
+ return yy_action[i];
+ }
+}
+
+/*
+** Perform a shift action.
+*/
+static void yy_shift(
+ yyParser *yypParser, /* The parser to be shifted */
+ int yyNewState, /* The new state to shift in */
+ int yyMajor, /* The major token to shift in */
+ YYMINORTYPE *yypMinor /* Pointer ot the minor token to shift in */
+){
+ yyStackEntry *yytos;
+ yypParser->yyidx++;
+ if( yypParser->yyidx>=YYSTACKDEPTH ){
+ ssiexprparserARG_FETCH;
+ yypParser->yyidx--;
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
+ }
+#endif
+ while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
+ /* Here code is inserted which will execute if the parser
+ ** stack every overflows */
+ ssiexprparserARG_STORE; /* Suppress warning about unused %extra_argument var */
+ return;
+ }
+ yytos = &yypParser->yystack[yypParser->yyidx];
+ yytos->stateno = yyNewState;
+ yytos->major = yyMajor;
+ yytos->minor = *yypMinor;
+#ifndef NDEBUG
+ if( yyTraceFILE && yypParser->yyidx>0 ){
+ int i;
+ fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState);
+ fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);
+ for(i=1; i<=yypParser->yyidx; i++)
+ fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);
+ fprintf(yyTraceFILE,"\n");
+ }
+#endif
+}
+
+/* The following table contains information about every rule that
+** is used during the reduce.
+*/
+static struct {
+ YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */
+ unsigned char nrhs; /* Number of right-hand side symbols in the rule */
+} yyRuleInfo[] = {
+ { 18, 1 },
+ { 16, 3 },
+ { 16, 1 },
+ { 14, 3 },
+ { 14, 3 },
+ { 14, 2 },
+ { 14, 3 },
+ { 14, 1 },
+ { 15, 1 },
+ { 15, 2 },
+ { 17, 1 },
+ { 17, 1 },
+ { 17, 1 },
+ { 17, 1 },
+ { 17, 1 },
+ { 17, 1 },
+};
+
+static void yy_accept(yyParser*); /* Forward Declaration */
+
+/*
+** Perform a reduce action and the shift that must immediately
+** follow the reduce.
+*/
+static void yy_reduce(
+ yyParser *yypParser, /* The parser */
+ int yyruleno /* Number of the rule by which to reduce */
+){
+ int yygoto; /* The next state */
+ int yyact; /* The next action */
+ YYMINORTYPE yygotominor; /* The LHS of the rule reduced */
+ yyStackEntry *yymsp; /* The top of the parser's stack */
+ int yysize; /* Amount to pop the stack */
+ ssiexprparserARG_FETCH;
+ yymsp = &yypParser->yystack[yypParser->yyidx];
+#ifndef NDEBUG
+ if( yyTraceFILE && yyruleno>=0
+ && (size_t)yyruleno<sizeof(yyRuleName)/sizeof(yyRuleName[0]) ){
+ fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
+ yyRuleName[yyruleno]);
+ }
+#endif /* NDEBUG */
+
+ switch( yyruleno ){
+ /* Beginning here are the reduction cases. A typical example
+ ** follows:
+ ** case 0:
+ ** #line <lineno> <grammarfile>
+ ** { ... } // User supplied code
+ ** #line <lineno> <thisfile>
+ ** break;
+ */
+ case 0:
+#line 29 "./mod_ssi_exprparser.y"
+{
+ ctx->val.bo = ssi_val_tobool(yymsp[0].minor.yy29);
+ ctx->val.type = SSI_TYPE_BOOL;
+
+ ssi_val_free(yymsp[0].minor.yy29);
+}
+#line 588 "mod_ssi_exprparser.c"
+ break;
+ case 1:
+#line 36 "./mod_ssi_exprparser.y"
+{
+ int cmp;
+
+ if (yymsp[-2].minor.yy29->type == SSI_TYPE_STRING &&
+ yymsp[0].minor.yy29->type == SSI_TYPE_STRING) {
+ cmp = strcmp(yymsp[-2].minor.yy29->str->ptr, yymsp[0].minor.yy29->str->ptr);
+ } else {
+ cmp = ssi_val_tobool(yymsp[-2].minor.yy29) - ssi_val_tobool(yymsp[0].minor.yy29);
+ }
+
+ yygotominor.yy29 = yymsp[-2].minor.yy29;
+
+ switch(yymsp[-1].minor.yy8) {
+ case SSI_COND_EQ: yygotominor.yy29->bo = (cmp == 0) ? 1 : 0; break;
+ case SSI_COND_NE: yygotominor.yy29->bo = (cmp != 0) ? 1 : 0; break;
+ case SSI_COND_GE: yygotominor.yy29->bo = (cmp >= 0) ? 1 : 0; break;
+ case SSI_COND_GT: yygotominor.yy29->bo = (cmp > 0) ? 1 : 0; break;
+ case SSI_COND_LE: yygotominor.yy29->bo = (cmp <= 0) ? 1 : 0; break;
+ case SSI_COND_LT: yygotominor.yy29->bo = (cmp < 0) ? 1 : 0; break;
+ }
+
+ yygotominor.yy29->type = SSI_TYPE_BOOL;
+
+ ssi_val_free(yymsp[0].minor.yy29);
+}
+#line 617 "mod_ssi_exprparser.c"
+ break;
+ case 2:
+#line 61 "./mod_ssi_exprparser.y"
+{
+ yygotominor.yy29 = yymsp[0].minor.yy29;
+}
+#line 624 "mod_ssi_exprparser.c"
+ break;
+ case 3:
+#line 64 "./mod_ssi_exprparser.y"
+{
+ int e;
+
+ e = ssi_val_tobool(yymsp[-2].minor.yy29) && ssi_val_tobool(yymsp[0].minor.yy29);
+
+ yygotominor.yy29 = yymsp[-2].minor.yy29;
+ yygotominor.yy29->bo = e;
+ yygotominor.yy29->type = SSI_TYPE_BOOL;
+ ssi_val_free(yymsp[0].minor.yy29);
+}
+#line 638 "mod_ssi_exprparser.c"
+ yy_destructor(1,&yymsp[-1].minor);
+ break;
+ case 4:
+#line 75 "./mod_ssi_exprparser.y"
+{
+ int e;
+
+ e = ssi_val_tobool(yymsp[-2].minor.yy29) || ssi_val_tobool(yymsp[0].minor.yy29);
+
+ yygotominor.yy29 = yymsp[-2].minor.yy29;
+ yygotominor.yy29->bo = e;
+ yygotominor.yy29->type = SSI_TYPE_BOOL;
+ ssi_val_free(yymsp[0].minor.yy29);
+}
+#line 653 "mod_ssi_exprparser.c"
+ yy_destructor(2,&yymsp[-1].minor);
+ break;
+ case 5:
+#line 86 "./mod_ssi_exprparser.y"
+{
+ int e;
+
+ e = !ssi_val_tobool(yymsp[0].minor.yy29);
+
+ yygotominor.yy29 = yymsp[0].minor.yy29;
+ yygotominor.yy29->bo = e;
+ yygotominor.yy29->type = SSI_TYPE_BOOL;
+}
+#line 667 "mod_ssi_exprparser.c"
+ yy_destructor(9,&yymsp[-1].minor);
+ break;
+ case 6:
+#line 95 "./mod_ssi_exprparser.y"
+{
+ yygotominor.yy29 = yymsp[-1].minor.yy29;
+}
+#line 675 "mod_ssi_exprparser.c"
+ yy_destructor(10,&yymsp[-2].minor);
+ yy_destructor(11,&yymsp[0].minor);
+ break;
+ case 7:
+#line 99 "./mod_ssi_exprparser.y"
+{
+ yygotominor.yy29 = ssi_val_init();
+ yygotominor.yy29->str = yymsp[0].minor.yy19;
+ yygotominor.yy29->type = SSI_TYPE_STRING;
+}
+#line 686 "mod_ssi_exprparser.c"
+ break;
+ case 8:
+#line 105 "./mod_ssi_exprparser.y"
+{
+ yygotominor.yy19 = yymsp[0].minor.yy0;
+}
+#line 693 "mod_ssi_exprparser.c"
+ break;
+ case 9:
+#line 109 "./mod_ssi_exprparser.y"
+{
+ yygotominor.yy19 = yymsp[-1].minor.yy19;
+ buffer_append_string_buffer(yygotominor.yy19, yymsp[0].minor.yy0);
+ buffer_free(yymsp[0].minor.yy0);
+}
+#line 702 "mod_ssi_exprparser.c"
+ break;
+ case 10:
+#line 115 "./mod_ssi_exprparser.y"
+{ yygotominor.yy8 = SSI_COND_EQ; }
+#line 707 "mod_ssi_exprparser.c"
+ yy_destructor(3,&yymsp[0].minor);
+ break;
+ case 11:
+#line 116 "./mod_ssi_exprparser.y"
+{ yygotominor.yy8 = SSI_COND_NE; }
+#line 713 "mod_ssi_exprparser.c"
+ yy_destructor(4,&yymsp[0].minor);
+ break;
+ case 12:
+#line 117 "./mod_ssi_exprparser.y"
+{ yygotominor.yy8 = SSI_COND_LE; }
+#line 719 "mod_ssi_exprparser.c"
+ yy_destructor(8,&yymsp[0].minor);
+ break;
+ case 13:
+#line 118 "./mod_ssi_exprparser.y"
+{ yygotominor.yy8 = SSI_COND_GE; }
+#line 725 "mod_ssi_exprparser.c"
+ yy_destructor(6,&yymsp[0].minor);
+ break;
+ case 14:
+#line 119 "./mod_ssi_exprparser.y"
+{ yygotominor.yy8 = SSI_COND_LT; }
+#line 731 "mod_ssi_exprparser.c"
+ yy_destructor(7,&yymsp[0].minor);
+ break;
+ case 15:
+#line 120 "./mod_ssi_exprparser.y"
+{ yygotominor.yy8 = SSI_COND_GT; }
+#line 737 "mod_ssi_exprparser.c"
+ yy_destructor(5,&yymsp[0].minor);
+ break;
+ };
+ yygoto = yyRuleInfo[yyruleno].lhs;
+ yysize = yyRuleInfo[yyruleno].nrhs;
+ yypParser->yyidx -= yysize;
+ yyact = yy_find_reduce_action(yypParser,yygoto);
+ if( yyact < YYNSTATE ){
+ yy_shift(yypParser,yyact,yygoto,&yygotominor);
+ }else if( yyact == YYNSTATE + YYNRULE + 1 ){
+ yy_accept(yypParser);
+ }
+}
+
+/*
+** The following code executes when the parse fails
+*/
+static void yy_parse_failed(
+ yyParser *yypParser /* The parser */
+){
+ ssiexprparserARG_FETCH;
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
+ }
+#endif
+ while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
+ /* Here code is inserted which will be executed whenever the
+ ** parser fails */
+#line 14 "./mod_ssi_exprparser.y"
+
+ ctx->ok = 0;
+
+#line 771 "mod_ssi_exprparser.c"
+ ssiexprparserARG_STORE; /* Suppress warning about unused %extra_argument variable */
+}
+
+/*
+** The following code executes when a syntax error first occurs.
+*/
+static void yy_syntax_error(
+ yyParser *yypParser, /* The parser */
+ int yymajor, /* The major type of the error token */
+ YYMINORTYPE yyminor /* The minor type of the error token */
+){
+ ssiexprparserARG_FETCH;
+ UNUSED(yymajor);
+ UNUSED(yyminor);
+#define TOKEN (yyminor.yy0)
+ ssiexprparserARG_STORE; /* Suppress warning about unused %extra_argument variable */
+}
+
+/*
+** The following is executed when the parser accepts
+*/
+static void yy_accept(
+ yyParser *yypParser /* The parser */
+){
+ ssiexprparserARG_FETCH;
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
+ }
+#endif
+ while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
+ /* Here code is inserted which will be executed whenever the
+ ** parser accepts */
+ ssiexprparserARG_STORE; /* Suppress warning about unused %extra_argument variable */
+}
+
+/* The main parser program.
+** The first argument is a pointer to a structure obtained from
+** "ssiexprparserAlloc" which describes the current state of the parser.
+** The second argument is the major token number. The third is
+** the minor token. The fourth optional argument is whatever the
+** user wants (and specified in the grammar) and is available for
+** use by the action routines.
+**
+** Inputs:
+** <ul>
+** <li> A pointer to the parser (an opaque structure.)
+** <li> The major token number.
+** <li> The minor token number.
+** <li> An option argument of a grammar-specified type.
+** </ul>
+**
+** Outputs:
+** None.
+*/
+void ssiexprparser(
+ void *yyp, /* The parser */
+ int yymajor, /* The major token code number */
+ ssiexprparserTOKENTYPE yyminor /* The value for the token */
+ ssiexprparserARG_PDECL /* Optional %extra_argument parameter */
+){
+ YYMINORTYPE yyminorunion;
+ int yyact; /* The parser action. */
+ int yyendofinput; /* True if we are at the end of input */
+ int yyerrorhit = 0; /* True if yymajor has invoked an error */
+ yyParser *yypParser; /* The parser */
+
+ /* (re)initialize the parser, if necessary */
+ yypParser = (yyParser*)yyp;
+ if( yypParser->yyidx<0 ){
+ if( yymajor==0 ) return;
+ yypParser->yyidx = 0;
+ yypParser->yyerrcnt = -1;
+ yypParser->yystack[0].stateno = 0;
+ yypParser->yystack[0].major = 0;
+ }
+ yyminorunion.yy0 = yyminor;
+ yyendofinput = (yymajor==0);
+ ssiexprparserARG_STORE;
+
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE,"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);
+ }
+#endif
+
+ do{
+ yyact = yy_find_shift_action(yypParser,yymajor);
+ if( yyact<YYNSTATE ){
+ yy_shift(yypParser,yyact,yymajor,&yyminorunion);
+ yypParser->yyerrcnt--;
+ if( yyendofinput && yypParser->yyidx>=0 ){
+ yymajor = 0;
+ }else{
+ yymajor = YYNOCODE;
+ }
+ }else if( yyact < YYNSTATE + YYNRULE ){
+ yy_reduce(yypParser,yyact-YYNSTATE);
+ }else if( yyact == YY_ERROR_ACTION ){
+ int yymx;
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
+ }
+#endif
+#ifdef YYERRORSYMBOL
+ /* A syntax error has occurred.
+ ** The response to an error depends upon whether or not the
+ ** grammar defines an error token "ERROR".
+ **
+ ** This is what we do if the grammar does define ERROR:
+ **
+ ** * Call the %syntax_error function.
+ **
+ ** * Begin popping the stack until we enter a state where
+ ** it is legal to shift the error symbol, then shift
+ ** the error symbol.
+ **
+ ** * Set the error count to three.
+ **
+ ** * Begin accepting and shifting new tokens. No new error
+ ** processing will occur until three tokens have been
+ ** shifted successfully.
+ **
+ */
+ if( yypParser->yyerrcnt<0 ){
+ yy_syntax_error(yypParser,yymajor,yyminorunion);
+ }
+ yymx = yypParser->yystack[yypParser->yyidx].major;
+ if( yymx==YYERRORSYMBOL || yyerrorhit ){
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE,"%sDiscard input token %s\n",
+ yyTracePrompt,yyTokenName[yymajor]);
+ }
+#endif
+ yy_destructor(yymajor,&yyminorunion);
+ yymajor = YYNOCODE;
+ }else{
+ while(
+ yypParser->yyidx >= 0 &&
+ yymx != YYERRORSYMBOL &&
+ (yyact = yy_find_shift_action(yypParser,YYERRORSYMBOL)) >= YYNSTATE
+ ){
+ yy_pop_parser_stack(yypParser);
+ }
+ if( yypParser->yyidx < 0 || yymajor==0 ){
+ yy_destructor(yymajor,&yyminorunion);
+ yy_parse_failed(yypParser);
+ yymajor = YYNOCODE;
+ }else if( yymx!=YYERRORSYMBOL ){
+ YYMINORTYPE u2;
+ u2.YYERRSYMDT = 0;
+ yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);
+ }
+ }
+ yypParser->yyerrcnt = 3;
+ yyerrorhit = 1;
+#else /* YYERRORSYMBOL is not defined */
+ /* This is what we do if the grammar does not define ERROR:
+ **
+ ** * Report an error message, and throw away the input token.
+ **
+ ** * If the input token is $, then fail the parse.
+ **
+ ** As before, subsequent error messages are suppressed until
+ ** three input tokens have been successfully shifted.
+ */
+ if( yypParser->yyerrcnt<=0 ){
+ yy_syntax_error(yypParser,yymajor,yyminorunion);
+ }
+ yypParser->yyerrcnt = 3;
+ yy_destructor(yymajor,&yyminorunion);
+ if( yyendofinput ){
+ yy_parse_failed(yypParser);
+ }
+ yymajor = YYNOCODE;
+#endif
+ }else{
+ yy_accept(yypParser);
+ yymajor = YYNOCODE;
+ }
+ }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
+ return;
+}
More information about the pkg-lighttpd-maintainers
mailing list