mirror of https://github.com/omar-polo/gmid.git
Compare commits
5 Commits
ebe2e54900
...
acf244c516
Author | SHA1 | Date |
---|---|---|
Omar Polo | acf244c516 | |
Anna “CyberTailor” | 53ad458e22 | |
Omar Polo | bb5a25d287 | |
Omar Polo | f862d389ff | |
Omar Polo | 574f71f7a3 |
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
||||||
|
2024-01-30 Anna “CyberTailor”
|
||||||
|
|
||||||
|
* contrib/vim/indent/gmid.vim: fix indent
|
||||||
|
|
||||||
|
2024-01-30 Omar Polo <op@omarpolo.com>
|
||||||
|
|
||||||
|
* parse.y: don't make log styles reserved keywords. Unbreaks the
|
||||||
|
example in the manpage with `common = ...'.
|
||||||
|
|
||||||
|
2024-01-26 Omar Polo <op@omarpolo.com>
|
||||||
|
|
||||||
|
* parse.y: rework grammar to allow the semicolon after
|
||||||
|
variables/macros definition and top-level options
|
||||||
|
|
||||||
2024-01-24 Omar Polo <op@omarpolo.com>
|
2024-01-24 Omar Polo <op@omarpolo.com>
|
||||||
|
|
||||||
* configure (VERSION): release 2.0.1
|
* configure (VERSION): release 2.0.1
|
||||||
|
|
|
@ -9,3 +9,5 @@ setlocal indentexpr=
|
||||||
setlocal cindent
|
setlocal cindent
|
||||||
" Just make sure that the comments are not reset as defs would be.
|
" Just make sure that the comments are not reset as defs would be.
|
||||||
setlocal cinkeys-=0#
|
setlocal cinkeys-=0#
|
||||||
|
" And indentation works correctly without semicolons.
|
||||||
|
setlocal cinoptions=+0
|
||||||
|
|
35
parse.y
35
parse.y
|
@ -1,7 +1,7 @@
|
||||||
%{
|
%{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, 2022, 2023 Omar Polo <op@omarpolo.com>
|
* Copyright (c) 2021-2024 Omar Polo <op@omarpolo.com>
|
||||||
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
|
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
|
||||||
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
|
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
|
||||||
* Copyright (c) 2004 Ryan McBride <mcbride@openbsd.org>
|
* Copyright (c) 2004 Ryan McBride <mcbride@openbsd.org>
|
||||||
|
@ -46,7 +46,7 @@ static struct file {
|
||||||
TAILQ_ENTRY(file) entry;
|
TAILQ_ENTRY(file) entry;
|
||||||
FILE *stream;
|
FILE *stream;
|
||||||
char *name;
|
char *name;
|
||||||
size_t ungetpos;
|
size_t ungetpos;
|
||||||
size_t ungetsize;
|
size_t ungetsize;
|
||||||
u_char *ungetbuf;
|
u_char *ungetbuf;
|
||||||
int eof_reached;
|
int eof_reached;
|
||||||
|
@ -125,12 +125,12 @@ typedef struct {
|
||||||
|
|
||||||
%token ACCESS ALIAS AUTO
|
%token ACCESS ALIAS AUTO
|
||||||
%token BLOCK
|
%token BLOCK
|
||||||
%token CA CERT CHROOT CLIENT COMBINED COMMON CONDENSED
|
%token CA CERT CHROOT CLIENT
|
||||||
%token DEFAULT
|
%token DEFAULT
|
||||||
%token FACILITY FASTCGI FOR_HOST
|
%token FACILITY FASTCGI FOR_HOST
|
||||||
%token INCLUDE INDEX IPV6
|
%token INCLUDE INDEX IPV6
|
||||||
%token KEY
|
%token KEY
|
||||||
%token LANG LEGACY LISTEN LOCATION LOG
|
%token LANG LISTEN LOCATION LOG
|
||||||
%token OCSP OFF ON
|
%token OCSP OFF ON
|
||||||
%token PARAM PORT PREFORK PROTO PROTOCOLS PROXY
|
%token PARAM PORT PREFORK PROTO PROTOCOLS PROXY
|
||||||
%token RELAY_TO REQUIRE RETURN ROOT
|
%token RELAY_TO REQUIRE RETURN ROOT
|
||||||
|
@ -264,17 +264,18 @@ logopt : ACCESS string {
|
||||||
free(conf->log_access);
|
free(conf->log_access);
|
||||||
conf->log_access = $2;
|
conf->log_access = $2;
|
||||||
}
|
}
|
||||||
| STYLE COMMON {
|
| STYLE string {
|
||||||
conf->log_format = LOG_FORMAT_COMMON;
|
if (!strcmp("combined", $2))
|
||||||
}
|
conf->log_format = LOG_FORMAT_COMBINED;
|
||||||
| STYLE COMBINED {
|
else if (!strcmp("common", $2))
|
||||||
conf->log_format = LOG_FORMAT_COMBINED;
|
conf->log_format = LOG_FORMAT_COMMON;
|
||||||
}
|
else if (!strcmp("condensed", $2))
|
||||||
| STYLE CONDENSED {
|
conf->log_format = LOG_FORMAT_CONDENSED;
|
||||||
conf->log_format = LOG_FORMAT_CONDENSED;
|
else if (!strcmp("legacy", $2))
|
||||||
}
|
conf->log_format = LOG_FORMAT_LEGACY;
|
||||||
| STYLE LEGACY {
|
else
|
||||||
conf->log_format = LOG_FORMAT_LEGACY;
|
yyerror("unknown log style: %s", $2);
|
||||||
|
free($2);
|
||||||
}
|
}
|
||||||
| SYSLOG FACILITY string {
|
| SYSLOG FACILITY string {
|
||||||
const char *str = $3;
|
const char *str = $3;
|
||||||
|
@ -654,9 +655,6 @@ static const struct keyword {
|
||||||
{"cert", CERT},
|
{"cert", CERT},
|
||||||
{"chroot", CHROOT},
|
{"chroot", CHROOT},
|
||||||
{"client", CLIENT},
|
{"client", CLIENT},
|
||||||
{"combined", COMBINED},
|
|
||||||
{"common", COMMON},
|
|
||||||
{"condensed", CONDENSED},
|
|
||||||
{"default", DEFAULT},
|
{"default", DEFAULT},
|
||||||
{"facility", FACILITY},
|
{"facility", FACILITY},
|
||||||
{"fastcgi", FASTCGI},
|
{"fastcgi", FASTCGI},
|
||||||
|
@ -666,7 +664,6 @@ static const struct keyword {
|
||||||
{"ipv6", IPV6},
|
{"ipv6", IPV6},
|
||||||
{"key", KEY},
|
{"key", KEY},
|
||||||
{"lang", LANG},
|
{"lang", LANG},
|
||||||
{"legacy", LEGACY},
|
|
||||||
{"listen", LISTEN},
|
{"listen", LISTEN},
|
||||||
{"location", LOCATION},
|
{"location", LOCATION},
|
||||||
{"log", LOG},
|
{"log", LOG},
|
||||||
|
|
|
@ -287,7 +287,7 @@ test_fastcgi_deprecated_syntax() {
|
||||||
test_macro_expansion() {
|
test_macro_expansion() {
|
||||||
cat <<EOF > reg.conf
|
cat <<EOF > reg.conf
|
||||||
pwd = "$PWD"
|
pwd = "$PWD"
|
||||||
common_opts = "lang it; auto index on"
|
common = "lang it; auto index on"
|
||||||
|
|
||||||
server "localhost" {
|
server "localhost" {
|
||||||
# the quoting of \$ is for sh
|
# the quoting of \$ is for sh
|
||||||
|
@ -295,7 +295,7 @@ server "localhost" {
|
||||||
key \$pwd "/localhost.key"
|
key \$pwd "/localhost.key"
|
||||||
root \$pwd "/testdata"
|
root \$pwd "/testdata"
|
||||||
listen on $REGRESS_HOST port $port
|
listen on $REGRESS_HOST port $port
|
||||||
@common_opts
|
@common
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue