Commit Briefs
don't yyerror if we can't open the file
the global var file could still be NULL and yyerror would crash.
contrib/vim: add Syntastic integration
Error and warning messages are prefixed with "error: " and "warning: " correspondingly to ease integration with automated tooling. `yywarn' function added. Off-by-one line numbers in warnings are fixed. Two error messages are reworded to avoid repeating like "error: error in server directive" or "error: syntax error".
move parse_portno to gmid.c
it's used only to parse the -p flag. While there add check_port_num to check the range for the port.
drop unsigned
it causes a cascade of warnings on some architectures. Also, for what we're doing here, the signed/unsigned property isn't important.
@-macros, rollback changes to strings and optional semicolons
* expand $-macros as string, only the new @-macros get expanded as-is * rollback changes to characters allowed in bare strings * optional semicolons in optnl, useful for readable @-macros
parsing: bring lots of goodies from OpenBSD' parse.y
This allows to solve the problem with the \n in the grammar (before two following macro declaration were treated as invalid. This also brings in a nice `include' keyword.
change (again) the env/param separator: use '='
Given that env/param are new features of this release, no support for the "old" syntax is needed.
add => in env/param and `port' between hostname and port for fastcgi
In the same spite of the last commit, add the missing separators between strings to avoid the auto-concat pitfalls. `=>' is used to separate between `env' and `param' arguments, while for `fastcgi' the keyword `port' is required between the hostname/ip address and the port (if provided). Since `env', `param' and `fastcgi' are all new stuff, there's no need to keep compatibility.
rename `mime MIME EXT' to `map MIME to-ext EXT'
With the newish automatic string concatenation, options like `mime' that accepts two strings as parameter start to become ambiguous: which strings gets concatenated? Instead of trying to document in the manpage which argument(s) is subject to string concatenation, do the concat always and introduce a separator. In the case of mime, `to-ext' now acts as a separator to distinguish. While there, also use a new keyword because it sounds better. It's dead-easy to upgrade to the new configuration, possibly with some sed magic, but for the moment the old `mime' form is preserved: (with a warning!) Will be dropped in the next release.
use bsearch to match the keywords
not that it's a bottleneck, but it's fancier this way.