summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2009-12-05Add support for #-commentsAntti-Juhani Kaijanaho1-0/+30
Debian Policy allows, in debian/control, lines that start with the '#'-character. Those lines are treated as comments by Policy, and ignored. This patch adds parser support for these comments in dctrl-tools. Unfortunately, it is not possible (without major changes) to ignore those comments semantically, since dctrl-tools represents paragraphs and fields as substrings of the input file. Accordingly, what this patch does is allow the parser to not choke on comments. Comments found inside a paragraph are left semantically significant (ie. part of the field body in which they are found), while comments otside of paragraphs are elided. Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2009-08-08Fix Debian bug #511022.Antti-Juhani Kaijanaho1-1/+1
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2009-04-16grep-dctrl: add new mode for exact package name matchingStefano Zacchiroli2-2/+18
Add to grep-dctrl the new matching mode --whole-pkg / -w. It behaves as -e (extended regexp matching), but matches over exact package names, thus avoiding sub-package name matching. Closes: #383921 Signed-off-by: Stefano Zacchiroli <zack@debian.org>
2008-07-05msg.[ch] (and others): allow the message functions to handle format stringsAntti-Juhani Kaijanaho6-36/+57
There are some places in the code where it would simplify both the code and the translations to have message strings be printf-formatted. This change changes the message function interfaces so that they can take a variable number of arguments. This required changes at all call sites. At the same time, the key logic of the message functions is moved out of the headers, leaving only the "shall we output this" test for inlining. Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2008-07-05*/*.[ch]: Use the copyright symbol instead of (c) or (C).Antti-Juhani Kaijanaho30-33/+33
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2008-07-05lib/msg.c: Remove (obsolete) snail mail and email addresses for me.Antti-Juhani Kaijanaho1-11/+0
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2008-07-05grep-dctrl/rc.c, lib/msg.c: Recode to UTF-8Antti-Juhani Kaijanaho1-2/+2
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2007-12-06Fix git ignore targetsJon Bernard1-0/+2
Files listed in .gitignore should not list files that are generated in specific subdirectories. Add them in the ".gitignore" file in that subdirectory instead. For example, having "grep-dctrl" in ".gitignore" causes the directory "grep-dctrl" and all of its contents to be ignored, rather than the executable which was intended. Signed-off-by: Jon Bernard <jbernard@debian.org>
2007-11-07lib/paragraph.c (para_parse_next): Use gotos, not a state variableAntti-Juhani Kaijanaho1-136/+127
On modern processors, unconditional jumps are always better than conditional jumps. This rewrite eliminates a set of conditional jumps by encoding the states as goto targets and not using a while-switch strategy. Recent simple measurements on several systems show ca. 20 % speedup. Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2007-08-05Update copyright linesAntti-Juhani Kaijanaho2-2/+2
2007-04-10export para_compare from lib/sorter.[ch]Antti-Juhani Kaijanaho3-10/+18
2007-04-08GNUmakefile. ifile.c: start using -Werror, fix one warningAntti-Juhani Kaijanaho1-1/+1
2007-04-08grep-dctrl: new option --invert-show (-I)Antti-Juhani Kaijanaho6-33/+81
Closes: #144174 (please provide a --filter-fields option of some sort) Reported by Yann Dirson <dirson@debian.org> Merged with #264905 (show all fields except FIELD,FIELD,...) Reported by Dan Jacobson <jidanni@jidanni.org>
2007-04-08paragraph.c (para_parse_next): fix outdated assertionAntti-Juhani Kaijanaho1-1/+1
2006-10-26create lib/, man/ and $(program)/Antti-Juhani Kaijanaho32-0/+3006