This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project iwhd.git.
The branch, master has been updated
via 9f30bdb8086d10b45b27ee8d582e81615bf28b22 (commit)
via c7748e96024d9a845f8f7fbd0305a72a1f8bc077 (commit)
via b9c444677501e24e5aa1b2d10d58b8a99faf41fd (commit)
via cd22b27d3fc97df06f7e5917f958d3a5660627fe (commit)
via 406cc793d1241acbc0c4dcb6bd070209b4289507 (commit)
via ded3c1df9c18a30ce4794b12ab7d82297a9e6d2e (commit)
via 3c5b2840f6ef9d562ef12299f1cd6d7442a3f1a0 (commit)
via 0c4fa8c07b57aa79f89a371231d98b01162d3e12 (commit)
via 398c516c99ae513d259767af4b6e91701aeec2ad (commit)
from 3a8570e05e1e906435c97f456150ec8683b35c91 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/iwhd.git/commit/9f30bdb8086d10b45b27ee8d582e81615bf28b22
commit 9f30bdb8086d10b45b27ee8d582e81615bf28b22
Author: Jim Meyering <meyering(a)redhat.com>
Date: Wed Oct 20 12:03:30 2010 +0200
query parser: avoid 25 reduce/reduce conflicts
* qparser.y (T_SPACE): Remove token and all related rules.
* qlexer.l: Ignore white space rather than returning T_SPACE.
* t/parser-test: Adjust sole failing test: "$ a" was rejected before,
due to ignored white space; now it's interpreted as "$a".
Add one more: "$.a" that does still fail.
diff --git a/qlexer.l b/qlexer.l
index 59c6fb1..976939b 100644
--- a/qlexer.l
+++ b/qlexer.l
@@ -35,7 +35,7 @@
! { return T_NOT; }
&& { return T_AND; }
|| { return T_OR; }
-[ tnr]+ { return T_SPACE; }
+[ tnr]+ { }
. { return T_INVALID; }
<<EOF>> { yyterminate (); /* aka return 0; */ }
diff --git a/qparser.y b/qparser.y
index 4369036..99267c4 100644
--- a/qparser.y
+++ b/qparser.y
@@ -162,7 +162,7 @@ yyerror (void *scanner ATTRIBUTE_UNUSED,
%parse-param { value_t **result }
%token <str> T_STRING T_COMP T_DATE T_ID T_LINK T_NUMBER T_OFIELD T_SFIELD
-%token T_EQ T_NE T_NOT T_AND T_OR T_SPACE T_INVALID
+%token T_EQ T_NE T_NOT T_AND T_OR T_INVALID
%token T_LT T_GT T_LE T_GE
%type <val> atom bbool_expr comp_expr field
@@ -189,11 +189,6 @@ bbool_expr:
bbool_expr T_OR ubool_expr {
// printf("found OR expressionn");
$$ = make_tree(T_OR,$1,$3);
- }|
- bbool_expr T_SPACE {
- $$ = $1;
- }| T_SPACE bbool_expr {
- $$ = $2;
};
ubool_expr:
@@ -204,11 +199,6 @@ ubool_expr:
T_NOT comp_expr {
// printf("found NOT expressionn");
$$ = make_tree(T_NOT,$2,NULL);
- }|
- ubool_expr T_SPACE {
- $$ = $1;
- }| T_SPACE ubool_expr {
- $$ = $2;
};
@@ -240,11 +230,6 @@ comp_expr:
atom T_GT atom {
// printf("found GREATER THAN expressionn");
$$ = make_comp(C_GREATERTHAN,$1,$3);
- }|
- comp_expr T_SPACE {
- $$ = $1;
- }| T_SPACE comp_expr {
- $$ = $2;
};
atom:
@@ -259,11 +244,6 @@ atom:
paren_expr {
// printf("promoting paren_expr to atomn");
$$ = $1;
- }|
- atom T_SPACE {
- $$ = $1;
- }| T_SPACE atom {
- $$ = $2;
};
link_field:
diff --git a/t/parser-test b/t/parser-test
index cf006c6..0daead1 100755
--- a/t/parser-test
+++ b/t/parser-test
@@ -27,8 +27,12 @@ parser '#a == "fubar" && ! ( $b.c.d < 3)'
> white-space 2> err || fail=1
compare white-space f.exp || fail=1
compare /dev/null err || fail=1
-parser '$ a' > e1.out 2>&1; test $? = 1 || fail=1
-printf "could not parse '$ a'n" > e1.exp
+parser '$ a' > a.out 2>&1 || fail=1
+printf "OBJECT FIELD a (2)ns= 2n" > a.exp
+compare a.out a.exp || fail=1
+
+parser '$.a' > e1.out 2>&1; test $? = 1 || fail=1
+printf "could not parse '$.a'n" > e1.exp
compare e1.exp e1.out || fail=1
parser '1 = = 1' > e2.out 2>&1; test $? = 1 || fail=1
http://repo.or.cz/w/iwhd.git/commit/c7748e96024d9a845f8f7fbd0305a72a1f8bc077
commit c7748e96024d9a845f8f7fbd0305a72a1f8bc077
Author: Jim Meyering <meyering(a)redhat.com>
Date: Wed Oct 20 11:37:18 2010 +0200
simplify parser: <, >, >=, <=
diff --git a/qlexer.l b/qlexer.l
index 6bb82f4..59c6fb1 100644
--- a/qlexer.l
+++ b/qlexer.l
@@ -25,7 +25,11 @@
return yylval_param->str ? T_NUMBER : T_INVALID; }
[a-z_]+ { yylval_param->str = strdup(yytext);
return yylval_param->str ? T_ID : T_INVALID; }
-[=$#()<>.] { return yytext[0]; }
+[$#().] { return yytext[0]; }
+[<] { return T_LT; }
+[<]= { return T_LE; }
+> { return T_GT; }
+>= { return T_GE; }
== { return T_EQ; }
!= { return T_NE; }
! { return T_NOT; }
diff --git a/qparser.y b/qparser.y
index 7516ab7..4369036 100644
--- a/qparser.y
+++ b/qparser.y
@@ -163,6 +163,7 @@ yyerror (void *scanner ATTRIBUTE_UNUSED,
%token <str> T_STRING T_COMP T_DATE T_ID T_LINK T_NUMBER T_OFIELD T_SFIELD
%token T_EQ T_NE T_NOT T_AND T_OR T_SPACE T_INVALID
+%token T_LT T_GT T_LE T_GE
%type <val> atom bbool_expr comp_expr field
%type <val> link_field literal paren_expr ubool_expr
@@ -216,13 +217,13 @@ comp_expr:
// printf("promoting atom to comp_exprn");
$$ = $1;
}|
- atom '<' atom {
+ atom T_LT atom {
// printf("found LESS THAN expressionn");
$$ = make_comp(C_LESSTHAN,$1,$3);
}|
- atom '<' '=' atom {
+ atom T_LE atom {
// printf("found LESS OR EQUAL expressionn");
- $$ = make_comp(C_LESSOREQ,$1,$4);
+ $$ = make_comp(C_LESSOREQ,$1,$3);
}|
atom T_EQ atom {
// printf("found EQUAL expressionn");
@@ -232,11 +233,11 @@ comp_expr:
// printf("found NOT EQUAL expressionn");
$$ = make_comp(C_DIFFERENT,$1,$3);
}|
- atom '>' '=' atom {
+ atom T_GE atom {
// printf("found GREATER OR EQUAL expressionn");
- $$ = make_comp(C_GREATEROREQ,$1,$4);
+ $$ = make_comp(C_GREATEROREQ,$1,$3);
}|
- atom '>' atom {
+ atom T_GT atom {
// printf("found GREATER THAN expressionn");
$$ = make_comp(C_GREATERTHAN,$1,$3);
}|
http://repo.or.cz/w/iwhd.git/commit/b9c444677501e24e5aa1b2d10d58b8a99faf41fd
commit b9c444677501e24e5aa1b2d10d58b8a99faf41fd
Author: Jim Meyering <meyering(a)redhat.com>
Date: Wed Oct 20 11:34:00 2010 +0200
simplify parser: T_EQ
diff --git a/qlexer.l b/qlexer.l
index 5d0e488..6bb82f4 100644
--- a/qlexer.l
+++ b/qlexer.l
@@ -26,6 +26,7 @@
[a-z_]+ { yylval_param->str = strdup(yytext);
return yylval_param->str ? T_ID : T_INVALID; }
[=$#()<>.] { return yytext[0]; }
+== { return T_EQ; }
!= { return T_NE; }
! { return T_NOT; }
&& { return T_AND; }
diff --git a/qparser.y b/qparser.y
index 17f4100..7516ab7 100644
--- a/qparser.y
+++ b/qparser.y
@@ -162,7 +162,7 @@ yyerror (void *scanner ATTRIBUTE_UNUSED,
%parse-param { value_t **result }
%token <str> T_STRING T_COMP T_DATE T_ID T_LINK T_NUMBER T_OFIELD T_SFIELD
-%token T_NE T_NOT T_AND T_OR T_SPACE T_INVALID
+%token T_EQ T_NE T_NOT T_AND T_OR T_SPACE T_INVALID
%type <val> atom bbool_expr comp_expr field
%type <val> link_field literal paren_expr ubool_expr
@@ -224,9 +224,9 @@ comp_expr:
// printf("found LESS OR EQUAL expressionn");
$$ = make_comp(C_LESSOREQ,$1,$4);
}|
- atom '=' '=' atom {
+ atom T_EQ atom {
// printf("found EQUAL expressionn");
- $$ = make_comp(C_EQUAL,$1,$4);
+ $$ = make_comp(C_EQUAL,$1,$3);
}|
atom T_NE atom {
// printf("found NOT EQUAL expressionn");
http://repo.or.cz/w/iwhd.git/commit/cd22b27d3fc97df06f7e5917f958d3a5660627fe
commit cd22b27d3fc97df06f7e5917f958d3a5660627fe
Author: Jim Meyering <meyering(a)redhat.com>
Date: Wed Oct 20 11:32:59 2010 +0200
simplify parser: T_NE
diff --git a/qlexer.l b/qlexer.l
index 5f354df..5d0e488 100644
--- a/qlexer.l
+++ b/qlexer.l
@@ -26,6 +26,7 @@
[a-z_]+ { yylval_param->str = strdup(yytext);
return yylval_param->str ? T_ID : T_INVALID; }
[=$#()<>.] { return yytext[0]; }
+!= { return T_NE; }
! { return T_NOT; }
&& { return T_AND; }
|| { return T_OR; }
diff --git a/qparser.y b/qparser.y
index a881b64..17f4100 100644
--- a/qparser.y
+++ b/qparser.y
@@ -162,7 +162,7 @@ yyerror (void *scanner ATTRIBUTE_UNUSED,
%parse-param { value_t **result }
%token <str> T_STRING T_COMP T_DATE T_ID T_LINK T_NUMBER T_OFIELD T_SFIELD
-%token T_NOT T_AND T_OR T_SPACE T_INVALID
+%token T_NE T_NOT T_AND T_OR T_SPACE T_INVALID
%type <val> atom bbool_expr comp_expr field
%type <val> link_field literal paren_expr ubool_expr
@@ -228,9 +228,9 @@ comp_expr:
// printf("found EQUAL expressionn");
$$ = make_comp(C_EQUAL,$1,$4);
}|
- atom T_NOT '=' atom {
+ atom T_NE atom {
// printf("found NOT EQUAL expressionn");
- $$ = make_comp(C_DIFFERENT,$1,$4);
+ $$ = make_comp(C_DIFFERENT,$1,$3);
}|
atom '>' '=' atom {
// printf("found GREATER OR EQUAL expressionn");
http://repo.or.cz/w/iwhd.git/commit/406cc793d1241acbc0c4dcb6bd070209b4289507
commit 406cc793d1241acbc0c4dcb6bd070209b4289507
Author: Jim Meyering <meyering(a)redhat.com>
Date: Wed Oct 20 11:14:53 2010 +0200
mark more unused parameters
diff --git a/qparser.y b/qparser.y
index 94416fb..a881b64 100644
--- a/qparser.y
+++ b/qparser.y
@@ -148,8 +148,11 @@ make_link (value_t *left, const char *right)
}
static void
-yyerror (void *scanner, value_t **result, const char *msg)
+yyerror (void *scanner ATTRIBUTE_UNUSED,
+ value_t **result ATTRIBUTE_UNUSED,
+ const char *msg ATTRIBUTE_UNUSED)
{
+ /* empty */
}
%}
http://repo.or.cz/w/iwhd.git/commit/ded3c1df9c18a30ce4794b12ab7d82297a9e6d2e
commit ded3c1df9c18a30ce4794b12ab7d82297a9e6d2e
Author: Jim Meyering <meyering(a)redhat.com>
Date: Wed Oct 20 09:43:03 2010 +0200
remove final "static" state variable from the parser
* qparser.y: Remove "syntax_error" decl.
(yyerror): Adjust. Make this function static, too.
<policy>: Adjust the sole rule that used it.
diff --git a/qparser.y b/qparser.y
index e5bd1ad..94416fb 100644
--- a/qparser.y
+++ b/qparser.y
@@ -19,6 +19,8 @@
#include <string.h>
#include <ctype.h>
+#include "iwh.h"
+
#define YY_DECL int yylex(YYSTYPE *, void *scanner);
YY_DECL
@@ -145,22 +147,9 @@ make_link (value_t *left, const char *right)
return make_tree(T_LINK,left,(value_t *)copy);
}
-/*
- * IMO it's wrong for us to get into the bbool_expr=policy rule when there's
- * a syntax error, but we do. The good news is that it's easy to free the
- * erroneous tree properly this way. The bad news is that we need to wait
- * until yyparse is done, then check this flag (which we have to maintain
- * ourselves) to figure out whether we got a valid tree or not.
- * No, yynerrs doesn't seem to give the right answer.
- */
-static int syntax_error = 0;
-
-void
+static void
yyerror (void *scanner, value_t **result, const char *msg)
{
- // error (0, 0, "parse error: %sn", msg);
- // FIXME do this via param, not file-global
- syntax_error = 1;
}
%}
@@ -181,12 +170,7 @@ yyerror (void *scanner, value_t **result, const char *msg)
policy:
bbool_expr {
- if (syntax_error) {
- printf("bad policy!n");
- }
- else {
- *result = $1;
- }
+ *result = $1;
};
bbool_expr:
http://repo.or.cz/w/iwhd.git/commit/3c5b2840f6ef9d562ef12299f1cd6d7442a3f1a0
commit 3c5b2840f6ef9d562ef12299f1cd6d7442a3f1a0
Author: Jim Meyering <meyering(a)redhat.com>
Date: Wed Oct 20 10:20:33 2010 +0200
mark unused parameters as such
diff --git a/backend.c b/backend.c
index 8d3547c..6795ef9 100644
--- a/backend.c
+++ b/backend.c
@@ -1035,13 +1035,13 @@ cf_put_child (void * ctx)
}
static int
-cf_delete (const provider_t *prov, const char *bucket, const char *key,
- const char *url)
+cf_delete (const provider_t *prov,
+ const char *bucket ATTRIBUTE_UNUSED,
+ const char *key ATTRIBUTE_UNUSED,
+ const char *url)
{
CURL *curl;
char fixed[1024];
- int chars;
- char auth_hdr[HEADER_SIZE];
long rc;
struct curl_slist *slist = NULL;
@@ -1072,7 +1072,10 @@ cf_delete (const provider_t *prov, const char *bucket, const char
*key,
}
static size_t
-cf_null_reader (void *ptr, size_t size, size_t nmemb, void *stream)
+cf_null_reader (void *ptr ATTRIBUTE_UNUSED,
+ size_t size ATTRIBUTE_UNUSED,
+ size_t nmemb ATTRIBUTE_UNUSED,
+ void *stream ATTRIBUTE_UNUSED)
{
return 0;
}
http://repo.or.cz/w/iwhd.git/commit/0c4fa8c07b57aa79f89a371231d98b01162d3e12
commit 0c4fa8c07b57aa79f89a371231d98b01162d3e12
Author: Jim Meyering <meyering(a)redhat.com>
Date: Wed Oct 20 09:25:33 2010 +0200
remove decls of unused variables
diff --git a/backend.c b/backend.c
index 502ce14..8d3547c 100644
--- a/backend.c
+++ b/backend.c
@@ -868,7 +868,6 @@ cf_add_token (struct curl_slist *in_slist, const char *token)
{
int chars;
char auth_hdr[HEADER_SIZE];
- struct curl_slist *out_slist;
if (!token) {
return in_slist;
@@ -887,10 +886,9 @@ static void
cf_init (provider_t *prov)
{
CURL *curl;
- char addr[ADDR_SIZE];
- char auth_user[HEADER_SIZE];
- char auth_key[HEADER_SIZE];
- char *token;
+ char addr[ADDR_SIZE];
+ char auth_user[HEADER_SIZE];
+ char auth_key[HEADER_SIZE];
struct curl_slist *slist;
int chars;
@@ -1084,8 +1082,6 @@ cf_bcreate (const provider_t *prov, const char *bucket)
{
char fixed[1024];
CURL *curl;
- int chars;
- char auth_hdr[HEADER_SIZE];
long rc;
struct curl_slist *slist = NULL;
diff --git a/meta.cpp b/meta.cpp
index de9dfa2..d467c1e 100644
--- a/meta.cpp
+++ b/meta.cpp
@@ -644,10 +644,7 @@ RepoMeta::GetAttrList (const char *bucket, const char *key)
{
auto_ptr<DBClientCursor> curs;
Query q;
- AttrList * poc;
BSONObj bo;
- const char * name;
- const char * value;
q = QUERY("bucket"<<bucket<<"key"<<key);
curs = GetCursor(q);
diff --git a/replica.c b/replica.c
index 4376d0a..9487c33 100644
--- a/replica.c
+++ b/replica.c
@@ -93,7 +93,6 @@ proxy_repl_cons (void *ctx)
repl_item *item = ctx;
my_state *ms = item->ms;
pipe_private *pp;
- void *rc;
pp = pipe_init_private(&ms->pipe);
if (!pp) {
http://repo.or.cz/w/iwhd.git/commit/398c516c99ae513d259767af4b6e91701aeec2ad
commit 398c516c99ae513d259767af4b6e91701aeec2ad
Author: Jim Meyering <meyering(a)redhat.com>
Date: Tue Oct 19 18:27:52 2010 +0200
automatically generate man page
* configure.ac (AC_CONFIG_FILES): Add man/Makefile.
Check for help2man.
* Makefile.am (SUBDIRS): Add "." and man.
* man/Makefile.am: New file.
* .gitignore: Ignore new artifacts and anchor patterns.
* iwhd.spec.in (%files): Add man page file name.
diff --git a/.gitignore b/.gitignore
index e85dc40..6fbf252 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,25 +2,26 @@
*~
.#*
.deps
+/aclocal.m4
+/autom4te.cache/
+/build-aux
+/config.h
+/config.hin
+/config.log
+/config.status
+/configure
+/iwhd
+/iwhd-*.tar.gz
+/iwhd-qparser.c
+/iwhd-qparser.h
+/iwhd.spec
+/man/iwhd.8
+/qlexer.c
+/stamp-h1
+/t/*.log
+/t/parser
+/t/parser.c
ChangeLog
Makefile
Makefile.in
#*#
-aclocal.m4
-autom4te.cache/
-build-aux
-config.h
-config.hin
-config.log
-config.status
-configure
-iwhd
-iwhd-*.tar.gz
-iwhd-qparser.c
-iwhd-qparser.h
-iwhd.spec
-qlexer.c
-stamp-h1
-t/*.log
-t/parser
-t/parser.c
diff --git a/Makefile.am b/Makefile.am
index 5510cf1..44ff506 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,7 +20,7 @@ AM_CPPFLAGS = -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
iwhd_YFLAGS = -d
-SUBDIRS = t
+SUBDIRS = . t man
ACLOCAL_AMFLAGS = -I ax
# iwhd is short for Image WareHouse Daemon.
diff --git a/configure.ac b/configure.ac
index afbe4c3..78eb70b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,6 +30,7 @@ AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_YACC
AC_PROG_LEX
+AM_MISSING_PROG([HELP2MAN], [help2man])
AC_CHECK_LIB([curl], [curl_easy_init],
[CURL_LIB=-lcurl],
@@ -88,5 +89,9 @@ AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([gettimeofday memmove memset strcasecmp strdup strndup strtoul])
-AC_CONFIG_FILES([Makefile t/Makefile])
+AC_CONFIG_FILES([
+Makefile
+t/Makefile
+man/Makefile
+])
AC_OUTPUT
diff --git a/iwhd.spec.in b/iwhd.spec.in
index 282370e..2b28b53 100644
--- a/iwhd.spec.in
+++ b/iwhd.spec.in
@@ -57,6 +57,7 @@ rm -rf %{buildroot}
%defattr(-,root,root,-)
%doc AUTHORS COPYING README NEWS
%{_bindir}/iwhd
+%{_mandir}/man8/iwhd.8*
%changelog
* Wed Oct 7 2010 Jim Meyering <meyering(a)redhat.com> - 0.90-1
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 0000000..a5f6051
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,26 @@
+# Automakefile for GNU diffutils man pages
+
+# Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <
http://www.gnu.org/licenses/>.
+
+dist_man8_MANS = iwhd.8
+MAINTAINERCLEANFILES = $(dist_man8_MANS)
+
+# Depend on configure.ac to get version number changes.
+iwhd.8: $(top_srcdir)/configure.ac $(top_srcdir)/rest.c
+ $(AM_V_GEN) + (echo '[NAME]' && sed 's@/* *@@; s/-/\-/; q'
$(top_srcdir)/rest.c)|+ $(HELP2MAN) -i - -S '$(PACKAGE) $(VERSION)' ../iwhd | +
sed 's/^.B info .*/.B info FIXME/' > $@-t && mv $@-t $@
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 37 ++++++++++++++-------------
Makefile.am | 2 +-
backend.c | 23 ++++++++---------
configure.ac | 7 ++++-
iwhd.spec.in | 1 +
man/Makefile.am | 26 ++++++++++++++++++++
meta.cpp | 3 --
qlexer.l | 10 ++++++-
qparser.y | 72 +++++++++++++++---------------------------------------
replica.c | 1 -
t/parser-test | 8 ++++-
11 files changed, 98 insertions(+), 92 deletions(-)
create mode 100644 man/Makefile.am
repo.or.cz automatic notification. Contact project admin jim(a)meyering.net
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
iwhd.git ("image warehouse daemon")