summaryrefslogtreecommitdiffabout
path: root/build-aux/git2chg.awk
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-03 18:06:47 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-05-03 18:23:25 (GMT)
commited838ca0467f7cc9745b042099b568cdf0f2b835 (patch) (side-by-side diff)
tree1ffa754e73507d31ece0151e68db25a4ecb81592 /build-aux/git2chg.awk
parent3d679b3df641f59fb81ca1651799f4e2965ed67e (diff)
downloadgrecs-ed838ca0467f7cc9745b042099b568cdf0f2b835.tar.gz
grecs-ed838ca0467f7cc9745b042099b568cdf0f2b835.tar.bz2
Various impovements.
* am/grecs.m4 (GRECS_SETUP): New flags: getopt and git2chg. * src/format.c (grecs_format_locus): Ignore NULL loci. (grecs_format_node_ident): Rename to grecs_format_node_path. Change semantics of the second argument. (grecs_format_value): Change signature (take flags). Correctly quote string values. * src/grecs.h: Protect the contents with #ifndef _GRECS_H. (GRECS_AGGR): New flag (for future use). (grecs_node) <prev>: New member. (grecs_format_value): Change signature. (grecs_format_node_ident): Rename to grecs_format_node_path. (GRECS_NODE_FLAG_PATH,GRECS_NODE_FLAG_VALUE) (GRECS_NODE_FLAG_QUOTE,GRECS_NODE_FLAG_QUOTE_HEX) (GRECS_NODE_FLAG_DEFAULT): New flags. (grecs_node_from_path): New proto. * src/lookup.c (grecs_node_from_path): New function. * src/tree.c (grecs_node_bind): Keep track of node->prev.
Diffstat (limited to 'build-aux/git2chg.awk') (more/less context) (ignore whitespace changes)
-rw-r--r--build-aux/git2chg.awk45
1 files changed, 45 insertions, 0 deletions
diff --git a/build-aux/git2chg.awk b/build-aux/git2chg.awk
new file mode 100644
index 0000000..1ddf698
--- a/dev/null
+++ b/build-aux/git2chg.awk
@@ -0,0 +1,45 @@
+# This file is part of grecs
+# Copyright (C) 2007, 2009-2011 Sergey Poznyakoff
+#
+# Grecs 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, or (at your option)
+# any later version.
+#
+# Grecs 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 Grecs. If not, see <http://www.gnu.org/licenses/>.
+
+/^[0-9]+ .* +<[^>]+>/ {
+ s = strftime("%F", $1)
+ sub(/^[0-9]+ +/,"")
+ if (s == datestr && author == $0)
+ next
+ datestr = s
+ author = $0
+ if (runlen) { runlen = 0; print "" }
+ printf("%s %s\n", datestr, author)
+ next
+}
+/^Signed-off-by:/ { next }
+/^<unknown>$/ { next }
+NF==0 {
+ runlen++
+ next
+}
+{ if (runlen) { runlen = 0; print "" }
+ print "\t" $0 }
+
+END {
+ print "\f"
+ # Make sure Emacs won't recognize this line:
+ print "Local", "Variables:"
+ print "mode: change-log"
+ print "version-control: never"
+ print "buffer-read-only: t"
+ print "End:"
+}

Return to:

Send suggestions and report system problems to the System administrator.