summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2016-07-29 14:29:33 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2016-07-29 14:36:03 (GMT)
commit55ed5436a098f478bc4c4326fa3ff564ef154b06 (patch) (side-by-side diff)
treea1bc8491408f62130809158ced1363ee5b62bb57
parentd5ae2f7493485606de05ad3c342412310f3c9352 (diff)
downloaddico-55ed5436a098f478bc4c4326fa3ff564ef154b06.tar.gz
dico-55ed5436a098f478bc4c4326fa3ff564ef154b06.tar.bz2
Upgrade grecs
* grecs: Pull latest commit. * dicod/main.c (config_init): Set GRECS_OPTION_QUOTED_STRING_CONCAT option. * dicod/accesslog.c: Use %td specifier to print ptrdiff_t values. * dicod/server.c (handle_connection): Return meaningful status in single_process mode. * modules/gcide/idxgcide.l: Set option noinput. * modules/gcide/markup.l: Likewise.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--dicod/accesslog.c8
-rw-r--r--dicod/main.c5
-rw-r--r--dicod/server.c6
m---------grecs0
-rw-r--r--modules/gcide/idxgcide.l1
-rw-r--r--modules/gcide/markup.l5
6 files changed, 14 insertions, 11 deletions
diff --git a/dicod/accesslog.c b/dicod/accesslog.c
index 1c93c59..5c1720a 100644
--- a/dicod/accesslog.c
+++ b/dicod/accesslog.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff
+ Copyright (C) 2008, 2010, 2012, 2016 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -484,7 +484,7 @@ compile_access_log()
if (!q) {
dico_log(L_ERR, 0,
- _("log format error (near char %ld): "
+ _("log format error (near char %td): "
"missing terminating `}'"),
p - access_log_format);
add_instr(alog_print, p - 1, 2);
@@ -499,7 +499,7 @@ compile_access_log()
tptr = find_alog_entry(*p);
if (!tptr) {
dico_log(L_ERR, 0,
- _("log format error (near char %ld): "
+ _("log format error (near char %td): "
"unknown format char `%c'"),
p - access_log_format,
*p);
@@ -507,7 +507,7 @@ compile_access_log()
} else {
if (arg && !tptr->allow_fmt) {
dico_log(L_ERR, 0,
- _("log format warning (near char %ld): "
+ _("log format warning (near char %td): "
"format char `%c' does not "
"take arguments"),
p - access_log_format,
diff --git a/dicod/main.c b/dicod/main.c
index 42c968c..6ee5e8d 100644
--- a/dicod/main.c
+++ b/dicod/main.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff
+ Copyright (C) 1998-2000, 2008, 2010, 2012, 2016 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -743,7 +743,7 @@ mime_headers_cb (enum grecs_callback_command cmd,
grecs_error(locus, 0, _("cannot parse headers: %s"),
strerror(errno));
- if (enc = dico_assoc_find(*pasc, CONTENT_TRANSFER_ENCODING_HEADER)) {
+ if ((enc = dico_assoc_find(*pasc, CONTENT_TRANSFER_ENCODING_HEADER))) {
if (!(strcmp(enc, "quoted-printable") == 0
|| strcmp(enc, "base64") == 0
|| strcmp(enc, "8bit") == 0))
@@ -1345,6 +1345,7 @@ config_init()
grecs_preprocessor = DEFAULT_PREPROCESSOR;
grecs_log_to_stderr = 1;
grecs_default_port = htons(DICO_DICT_PORT);
+ grecs_parser_options = GRECS_OPTION_QUOTED_STRING_CONCAT;
}
void
diff --git a/dicod/server.c b/dicod/server.c
index 8f81ae4..60edb1f 100644
--- a/dicod/server.c
+++ b/dicod/server.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff
+ Copyright (C) 2008, 2010, 2012, 2016 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -406,13 +406,13 @@ handle_connection(int n)
}
if (single_process) {
- int status;
dico_stream_t str = dicod_iostream(connfd, connfd);
if (str) {
status = dicod_loop(str);
dico_stream_close(str);
dico_stream_destroy(&str);
- }
+ } else
+ status = -1;
} else {
pid_t pid = fork();
if (pid == -1) {
diff --git a/grecs b/grecs
-Subproject d51e1365118ce87016a39bd94437e31b35b8d30
+Subproject 95b9dbb21aa2a7721c091aa79c680b4531fa804
diff --git a/modules/gcide/idxgcide.l b/modules/gcide/idxgcide.l
index b48b11c..7dba32f 100644
--- a/modules/gcide/idxgcide.l
+++ b/modules/gcide/idxgcide.l
@@ -171,6 +171,7 @@ flush_headwords()
%}
%option 8bit
%option nounput
+%option noinput
%x HEADWORD MHW COMMENT HTMLCOM
diff --git a/modules/gcide/markup.l b/modules/gcide/markup.l
index dbe6ea5..c4dabd8 100644
--- a/modules/gcide/markup.l
+++ b/modules/gcide/markup.l
@@ -1,6 +1,6 @@
%top {
/* This file is part of GNU Dico.
- Copyright (C) 2012 Sergey Poznyakoff
+ Copyright (C) 2012, 2016 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -259,6 +259,7 @@ pop_tag(const char *tagstr, size_t taglen)
%option 8bit
%option nounput
+%option noinput
%x COMMENT
@@ -470,7 +471,7 @@ gcide_markup_parse(char const *text, size_t len, int dbg)
append_tag(tag);
}
- while (p = dico_list_pop(tagstk))
+ while ((p = dico_list_pop(tagstk)))
/* FIXME: Report unclosed tag */
current_tag = p;

Return to:

Send suggestions and report system problems to the System administrator.